Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3510314pxf; Mon, 15 Mar 2021 11:08:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAcBMGtEBlnOeyF+4aKvcq2nxyIKme5eSdoVOgaoPJyyVyktLdHp2NObLdyooI4kZICPpd X-Received: by 2002:a05:6402:26ce:: with SMTP id x14mr31023532edd.359.1615831689006; Mon, 15 Mar 2021 11:08:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615831689; cv=none; d=google.com; s=arc-20160816; b=vlI5vYqVqsTrIRae10htvSJxJz7qrJX51f7GZ3SkDBwgm7uj/oHob0ps794LKu/GVA XQxjHlQmBkivkJ+EoqF+cqn3oRGPGLuGsvxGG+FGnziyg/qz5xGtWcRGgVqNSbYoyB8C PFCJXDhnkjqiIfitsUnzBh4DqmSG4erVZCFSknHxMPUZwHGMiKQK5tT3gw0uilZZtn8W NKSmzTlucDJ8oElR1/8T97peRYA+JYa6FeV/rWJCyB0nq664Ik1JMHK8fHxyOY2A2Uso vniuu3OwSwcVzo87mroXLiapE/MqfmVw3oceYeU1o1WPiAiWgeN3HxV83t0NUTtH9moi y+vw== 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=SvX8s2nbGT7/55O5Hgi8TQ6aSuJmdF652yjcxAR4+9OLnWTYq0h8+wIn0SCNcKqBox PSOSBEPE4PXz5X5EE/Wq3dgjrpV9Mn36It3fPAVUDvIUlIPAiYMOJK1CRz6Rgce6pjBX hkI+vImiL1r6JCUasVx4+ui2l6Gty/1kUOD4IlNo+JMbEKbUxV9YyZgmQEx6k8orK/R8 J7EwkTSQ0MU7IXsQwnSC/AgucuC5RhLINF21/LDCtfgVXgzhtEt6QiBsVAIguat/Zujq ob6jAs/9+U5OqesXsn/gDPHsCbaheLQowmhsAU9F/BteDOel0gM+hZG4BaF6uy1lvIP7 DeTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qC5GjrRN; 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 m7si12063132edd.486.2021.03.15.11.07.37; Mon, 15 Mar 2021 11:08:08 -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=qC5GjrRN; 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 S235202AbhCOOIi (ORCPT + 99 others); Mon, 15 Mar 2021 10:08:38 -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 S231272AbhCON6K (ORCPT ); Mon, 15 Mar 2021 09:58:10 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 34A5D64F23; Mon, 15 Mar 2021 13:58:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816690; bh=HHA26jaEx0TVIHhjA6y4M+tOOuCMpp/jBGSy2ZKii+8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qC5GjrRNzQ/LYTuk8SUYX5LcEE7q39g1frbdLB//PUnJagZI5J+uRqBU4W1+L4bQp xVs+24nt2R9A7Qiam6t+q7zPM1iQulqyKFSX/ljQFmVgkHWWwiHD/cy8PnOfx9kCC+ nqhCt/4do356yJLk6U/Yw1fxuRZZ+osb954S0Pro= 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.11 066/306] stmmac: intel: Fixes clock registration error seen for multiple interfaces Date: Mon, 15 Mar 2021 14:52:09 +0100 Message-Id: <20210315135509.872037958@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135507.611436477@linuxfoundation.org> References: <20210315135507.611436477@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)) {