Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5300705pxj; Tue, 22 Jun 2021 21:02:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytjfy1RxG8WOyCbQDVFRWc5/JQKBZlji6whAl7A4EYV9PihXb4jlIAe/gg2ztdhCFJMZl4 X-Received: by 2002:a05:6402:1103:: with SMTP id u3mr9441516edv.342.1624420973620; Tue, 22 Jun 2021 21:02:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624420973; cv=none; d=google.com; s=arc-20160816; b=p5or/dNnfh2t+UsX5PMpWt6WT+fPSv+f/0fjy1PpbnyHbiXjGojAt9nK2VhRBot9Bm TfyFbnNb4Z5dC7pmnY2yS9aRt65+FKOAaD+46+SCw2rZHcr6dPVDvrhYgYvJNjh7ezOt sCC13O+AVOPVCt7csPppD+iYWEo/7ity4M0XohqsE9mmoJTRNnxtcsczbRjmgnZBY4D9 wCURj+KeZeAliUhn4PA/BeKaWhHMhlc2ykacJ80CAM/qiQZ3z7xVjtJ9FjS/wgl+xKgn V432FZxnQxgSDnbGxml76kD7xyP7dFt9w/iLfmkS70DdwCIuRutIs3exf+ouD+bNds6h l8UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=xu3J0MG1DAoiBty4+jXpzlIZwsi55uVKyRQkNX9z39w=; b=dA5mpXf6CneuRQgvyo4+yJssIRQmshjf9NcxayYyv4StY6yj0RWHiXu5giXVj9wSpn DMDSUuk+e6k3RelCI6DQOkVmSHuo8OAhCx4KNau2cXTk/XODjF5QHOMTiyNkuO60uAXe eaeWO6Kuw95Wh4Bx7JEptj+UnjdOpUUl4UowGWrTDqHUBFgnbf05gH6O4D6pzGEN7IFG 6wYUoZ3P/qsy3RII2qiJP7LXfbqSbeMO1dwDXEp2N+WAYkWiyBsndLUu+vNBe00iAq9u VOceLm+HGzNM0A+Rx0F/2KH8zQq3qtJITEEDbMMYyV4OheVTSL0RFxE1gT/Y7a3UPQy8 lpiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=My2OQKbp; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id el21si5383809ejc.403.2021.06.22.21.02.31; Tue, 22 Jun 2021 21:02:53 -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=@gmail.com header.s=20161025 header.b=My2OQKbp; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229902AbhFWEDU (ORCPT + 99 others); Wed, 23 Jun 2021 00:03:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229485AbhFWEDT (ORCPT ); Wed, 23 Jun 2021 00:03:19 -0400 Received: from mail-ot1-x331.google.com (mail-ot1-x331.google.com [IPv6:2607:f8b0:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D66B0C061574; Tue, 22 Jun 2021 21:01:02 -0700 (PDT) Received: by mail-ot1-x331.google.com with SMTP id f3-20020a0568301c23b029044ce5da4794so603282ote.11; Tue, 22 Jun 2021 21:01:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=xu3J0MG1DAoiBty4+jXpzlIZwsi55uVKyRQkNX9z39w=; b=My2OQKbp4vxT5pp+htE5GMVR5w/CffUe54PAXG5EIXkMvDictyyJ36KpPZ++gkbfmJ MnJ9CmikGlbXwhEgrByuLfqsHRKamVBtlmMGxbdMbn+yMLL0ZTERCdGrqN5o4YirofI1 a3GWa8F/wv1dm5+I38cLFEMt5cf6oNPB0jA1t1qqrkulCheBp1lDftNPkZyx4f7COxey qAfnjXzIXv+/g/IX/2efNJWsSOkwgIvwWg/5KjBsqevDUAoTxM8lvoPUIvzCF5xbdkeb v8vOszEaF9pXXQOPZt6RaxD0XcClJRcBr5pD5TnQIlX0s2OzsDY2CJtA+pIIbRYCe/Qp HXSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=xu3J0MG1DAoiBty4+jXpzlIZwsi55uVKyRQkNX9z39w=; b=rogdcqkXn86SoWxPqBIx8nUTUE7JBoHCYuKKpB7cVbZezZAOB3O9l872RzAowrJ7b0 vAKQWkJEe5oLFzuJ7K4VWvEtF2uuri6yYffDnwLj0LXoPg+5LQV5+MXhyEwqyR8N7tfq idPCf5tPDTen1b3sl2LzL1hJWf7AYPEctwtR0wcqLAAxindicEdoVoPIv13Gir1iUsxp B0QYmtij0qrz+/+yDI3LkN2iEknV5hOWzmjxF3IYV6uSA8Al+E5Hqy2AllyaWmlqGyI5 iWXi7INQ1J+lKsnMXXcDP0Q7kUEIjNtaWpDZM4qXJygtvQgIECMUeSFXlL4has5hd+f0 WXnA== X-Gm-Message-State: AOAM530vSHMdTBPgJhQgh16tYWm9Scmy4pNICL0+cMsU+/Af0rkaJksA l0NTsIiPefXLxC0QqgS/XgA= X-Received: by 2002:a05:6830:2315:: with SMTP id u21mr6068794ote.365.1624420861910; Tue, 22 Jun 2021 21:01:01 -0700 (PDT) Received: from ?IPv6:2600:1700:dfe0:49f0:702e:9530:891f:215c? ([2600:1700:dfe0:49f0:702e:9530:891f:215c]) by smtp.gmail.com with ESMTPSA id y5sm59578otq.5.2021.06.22.21.00.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Jun 2021 21:01:01 -0700 (PDT) Subject: Re: [PATCH v2] net: bcmgenet: Fix attaching to PYH failed on RPi 4B To: Jian-Hong Pan , Florian Fainelli , Stefan Wahren , Doug Berger Cc: Andrew Lunn , bcm-kernel-feedback-list@broadcom.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux@endlessos.org, linux-rpi-kernel@lists.infradead.org References: <20210623032802.3377-1-jhp@endlessos.org> From: Florian Fainelli Message-ID: Date: Tue, 22 Jun 2021 21:00:55 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210623032802.3377-1-jhp@endlessos.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The subject should be fixed s/PYH/PHY/ and also probably reworded to be: net: bcmgenet: Add mdio-bcm-unimac soft dependency On 6/22/2021 8:28 PM, Jian-Hong Pan wrote: > The Broadcom UniMAC MDIO bus from mdio-bcm-unimac module comes too late. It is not just coming too late, there is also no way for the module loader to figure out the dependency between GENET and its MDIO bus driver unless we provide this MODULE_SOFTDEP hint. > So, GENET cannot find the ethernet PHY on UniMAC MDIO bus. This leads > GENET fail to attach the PHY as following log: > > bcmgenet fd580000.ethernet: GENET 5.0 EPHY: 0x0000 > ... > could not attach to PHY > bcmgenet fd580000.ethernet eth0: failed to connect to PHY > uart-pl011 fe201000.serial: no DMA platform data > libphy: bcmgenet MII bus: probed > ... > unimac-mdio unimac-mdio.-19: Broadcom UniMAC MDIO bus > > This patch adds the soft dependency to load mdio-bcm-unimac module > before genet module to avoid the issue. > > Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=213485 > Signed-off-by: Jian-Hong Pan Signed-off-by: Florian Fainelli Fixes: 9a4e79697009 ("net: bcmgenet: utilize generic Broadcom UniMAC MDIO controller driver") > --- > v2: Load mdio-bcm-unimac before genet module instead of trying to > connect the PHY in a loop. > > drivers/net/ethernet/broadcom/genet/bcmgenet.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c > index fcca023f22e5..41f7f078cd27 100644 > --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c > +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c > @@ -4296,3 +4296,4 @@ MODULE_AUTHOR("Broadcom Corporation"); > MODULE_DESCRIPTION("Broadcom GENET Ethernet controller driver"); > MODULE_ALIAS("platform:bcmgenet"); > MODULE_LICENSE("GPL"); > +MODULE_SOFTDEP("pre: mdio-bcm-unimac"); > -- Florian