Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3509346pxf; Mon, 15 Mar 2021 11:06:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOoU7ytXdjFO2CIN8Onqpn3GwWky2eoNtjtbzOBW0eBwrmVfteIZkPPgJitIj10uDuCphl X-Received: by 2002:a17:906:5d06:: with SMTP id g6mr25103721ejt.216.1615831610614; Mon, 15 Mar 2021 11:06:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615831610; cv=none; d=google.com; s=arc-20160816; b=MW9pTBX/XZ+4tQdKhD6Ac32OCn4ATLfNbsrhkPqURxDYYWHvSoyGI/zQVElHgYRU4e QOHmoa1zSi5Ho5zWqxxeZ/LVpF8Iv1nM4bsfI5kwto7uMZ7ii6nMQGap5tmaolzETQK/ xwOHHkGXUdNWoVJgJLwWbRwDPs8Bcc48XSPOVRHYF3lrijKgazWI6TwOoDBrrx33SkQN v5f67dJY/aefd1jxe2OujgooG9S/saL2z8mWIi+ig2TsriIFxZiZRyvbhUaMK9J93+Hp 2lGbr4qsIzpv0pL+Lg9epyhh2+6pMh0zsXOPEarku8dhA/iUQmp2X8WBsW1n/JKa/zDA dC+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=SXgnHc8eRI16Z83wp6nw9GTcya0r1FvMliwHOVbGeSc=; b=AwNUShpAzK/khO4+8wD9v2t9HqTpkqPe+NecQIUFHhTQQ0Zh590PLT+83g6cj+ko9s wtZAb0iGfbeeJPfc11PwlpKzG2Kfz0DX0C85R0K3YPis87rqN3xbD9qPW0KYOecdRkRN 3Zz5YJhM/uCjWZnPqTW2e4tDk+MGwYsCP3qod6JnXamvfeo8AjCjkX6XONA7T82Ro5Pa U0f9oSvPhFVaL8iOsVeF9tGxhubE5QOPnb/mKciTF5xP6jGiDzzXM5DqnkboVgQlHsXi GK8upV7NG4kcA8ncAro8JourOwYZ5/BhwoqkIDTISyP1aEoqGNNF8XojjRjHGB1t8y6W lkqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0j9jTEUr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ga24si11229063ejc.422.2021.03.15.11.06.24; Mon, 15 Mar 2021 11:06:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0j9jTEUr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235592AbhCOOHy (ORCPT + 99 others); Mon, 15 Mar 2021 10:07:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:35186 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232252AbhCON6H (ORCPT ); Mon, 15 Mar 2021 09:58:07 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 41AB364F36; Mon, 15 Mar 2021 13:58:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816686; bh=HHA26jaEx0TVIHhjA6y4M+tOOuCMpp/jBGSy2ZKii+8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0j9jTEUrlvZTx84esilYoEtlswEjkxvTZ373m9Ggmo6jE4QK7MXtMx3toJ0dYhszG nhf/WtKxZRv2bEgb/chdMZwJzFP7MZFoNkGLo9QN8CZNSwl3ayLobT8GLS376tRAfn CPZsr0L9Re9PiNwcIz/CeyNqUtoD3e38AsWuM7dc= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wong Vee Khee , Voon Weifeng , Ong Boon Leong , "David S. Miller" Subject: [PATCH 5.10 055/290] stmmac: intel: Fixes clock registration error seen for multiple interfaces Date: Mon, 15 Mar 2021 14:52:28 +0100 Message-Id: <20210315135543.794433623@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135541.921894249@linuxfoundation.org> References: <20210315135541.921894249@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Kroah-Hartman From: Wong Vee Khee commit 8eb37ab7cc045ec6305a6a1a9c32374695a1a977 upstream. Issue seen when enumerating multiple Intel mGbE interfaces in EHL. [ 6.898141] intel-eth-pci 0000:00:1d.2: enabling device (0000 -> 0002) [ 6.900971] intel-eth-pci 0000:00:1d.2: Fail to register stmmac-clk [ 6.906434] intel-eth-pci 0000:00:1d.2: User ID: 0x51, Synopsys ID: 0x52 We fix it by making the clock name to be unique following the format of stmmac-pci_name(pci_dev) so that we can differentiate the clock for these Intel mGbE interfaces in EHL platform as follow: /sys/kernel/debug/clk/stmmac-0000:00:1d.1 /sys/kernel/debug/clk/stmmac-0000:00:1d.2 /sys/kernel/debug/clk/stmmac-0000:00:1e.4 Fixes: 58da0cfa6cf1 ("net: stmmac: create dwmac-intel.c to contain all Intel platform") Signed-off-by: Wong Vee Khee Signed-off-by: Voon Weifeng Co-developed-by: Ong Boon Leong Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c @@ -233,6 +233,7 @@ static void common_default_data(struct p static int intel_mgbe_common_data(struct pci_dev *pdev, struct plat_stmmacenet_data *plat) { + char clk_name[20]; int ret; int i; @@ -300,8 +301,10 @@ static int intel_mgbe_common_data(struct plat->eee_usecs_rate = plat->clk_ptp_rate; /* Set system clock */ + sprintf(clk_name, "%s-%s", "stmmac", pci_name(pdev)); + plat->stmmac_clk = clk_register_fixed_rate(&pdev->dev, - "stmmac-clk", NULL, 0, + clk_name, NULL, 0, plat->clk_ptp_rate); if (IS_ERR(plat->stmmac_clk)) {