Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5284095pxj; Tue, 22 Jun 2021 20:30:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzAEWiUvXhnBketapfXMpkamuSDJoMiD2G9m/hxsvRfkWVW2j3G2D+MkfNQH3CXsk+fos9/ X-Received: by 2002:a02:b919:: with SMTP id v25mr7100841jan.120.1624419054642; Tue, 22 Jun 2021 20:30:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624419054; cv=none; d=google.com; s=arc-20160816; b=b+Q45Pn5TbLg2uZSZFfOdUOYbHl7rvXR0Ln3Bnu5JDSlZjkngBpuNe+TaIUnTSMbwv FMMhXLMNjS0vGPHFcWgdn/lUM9zSsN7lOnPApvb8sP5ZHbuHtaQHggVqYlUVsWnIhzI3 D3b+KHsvy4oFSfiSKx1bXZkw4Wz8PEsPZDhJw+GOaCG1tKPYlkqq/LsCdT1C6P3Fk9CM i/GsJIfTraH3pyM/pezVnoknEhKQ2Rk1fXiilk/2/qN/hFeBwvO+dxSKy6YK7unKZ2wQ CyPGbX+Mg0o5yMzLMnT9XHYqCW4GvO6Z6gvy6FbhewuNSrrqfg/12erk3OWfc9bSXMq8 QIOg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=60XQsMd92Sa0BwHkSN6e2HLScKheGrl/4tQBqgRYzXE=; b=PVQUGa2cfkPT4NXEgRjZcHW0gUyrPKp8LfEdv2OtBMLk1zJTNB+TRn/0vmQvlonBHE klB4qZGDxSdStphue+ne4mmUqlfexokIYoWT8az7WL7EBlr33xxox9YQp9YuH2ka3b+r QdG/T/BZWqTgs86MFFXLVnbQ6CyaMpOtSYvPJHee7dbVXCUQu7RicvicHv9xGnJwVI8U WVuVNB3QvFKHn39kCEAMpnXlLGfQ5wTwxp6Mti3bdgmXh+bvssGSY2Jbn2R2XQzx4oyc Ez8ZLdt+K+4jun7dnl5/SYihZr18TfBVzm7VpWHU3b2Ja1bsXL8C89nTxRqNwG0ozI7f nAnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@endlessos.org header.s=google header.b=E3TGIyZv; 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=endlessos.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v6si19751104ilu.109.2021.06.22.20.30.43; Tue, 22 Jun 2021 20:30:54 -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=@endlessos.org header.s=google header.b=E3TGIyZv; 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=endlessos.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230380AbhFWDcF (ORCPT + 99 others); Tue, 22 Jun 2021 23:32:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230379AbhFWDcE (ORCPT ); Tue, 22 Jun 2021 23:32:04 -0400 Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42750C061574 for ; Tue, 22 Jun 2021 20:29:47 -0700 (PDT) Received: by mail-pg1-x52a.google.com with SMTP id n12so562308pgs.13 for ; Tue, 22 Jun 2021 20:29:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=endlessos.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=60XQsMd92Sa0BwHkSN6e2HLScKheGrl/4tQBqgRYzXE=; b=E3TGIyZv13qZZUX3TdwtqYP1wuLVPcqrFFrjW+B3M2l135qXpsJKjy0tvSEZIwkstk 0BA9sT7dmIA0/x7YcCHB6ymzJzUECuV+zKiYeAXeKpqoo4tyMZD+cJfsimyZvjWjrDzm Mg5IbT5znb9w5LgV7/NrvpaRk4akStOMeYOnrxPg3/r8kAa0v0LswXrPfiSZFNrvnMsf CKQKVFnLfes83jXaxjbR9MDrDTOuXhKKDpdxcLI8C4M8X55XjbpZyIF11UZfT5FUC+EX AYk8SF4OWnPglqvVVs1wTjK4BhotbM6mhtY9Y0Qv21uSENeV/CHQj+ugLwJUxkqpzHOW NvvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=60XQsMd92Sa0BwHkSN6e2HLScKheGrl/4tQBqgRYzXE=; b=ZVvLNAmJPGJhaveBAkC/IRczIJiEyhZnDGaWWUeU5y4/GJqCczdKoKFGQhzH6d8q12 n17CATbKXm82GwaYEplrnkhhwSPo/MIyn3qCMI5mAZjsQq5BtoVWYeiVIaMyWk7aMx+p ESA1UqRMFkXjHmktwmdYPrFLAvON36qAemMjfhHLjyG5D/3FncnGEpz/RmwRi2q7SAQo YwKSDBo4HOyc/PimxCKBBCV5oUiNxJ5KR4fujHmHeJIUZC30oe9DsZtslY5x5HGiZEQ+ D4/tpdBCqYK64elIIwbWdrxbE9hq/tiqmXEY1ty9w2T/NR5mJDRXlmnFo5LgZTuag1Q7 YRXA== X-Gm-Message-State: AOAM530ame+QHEFpLjifhmwKQJ7W/OI65/U6mi7aLsVN23Oopu+bHd2s 1FYJVuLPg0DVWDdz8AVnjkgVuw== X-Received: by 2002:a63:2546:: with SMTP id l67mr1787408pgl.148.1624418986782; Tue, 22 Jun 2021 20:29:46 -0700 (PDT) Received: from starnight.local ([150.116.242.79]) by smtp.googlemail.com with ESMTPSA id z9sm658546pfa.2.2021.06.22.20.29.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Jun 2021 20:29:46 -0700 (PDT) From: Jian-Hong Pan To: 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, Jian-Hong Pan Subject: [PATCH v2] net: bcmgenet: Fix attaching to PYH failed on RPi 4B Date: Wed, 23 Jun 2021 11:28:03 +0800 Message-Id: <20210623032802.3377-1-jhp@endlessos.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The Broadcom UniMAC MDIO bus from mdio-bcm-unimac module comes too late. 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 --- 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"); -- 2.32.0