Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp423858lqo; Thu, 16 May 2024 09:56:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWplk5lfYfuUnfNc8YWuWSz8vAZnjPieT2b4Hda7Iw+EiDv60rRt1b2NwjjphZzbchUQcgkfdhIA6mBIqxlQoiJiEqUYmNHRCN+GgMRlA== X-Google-Smtp-Source: AGHT+IHWHAbbVwQMfN3NMuzzuvIwEUPvdOVpZA7zcqVbTBGJWzz3OVtSL18CiTsv8mKlUjvZaZ08 X-Received: by 2002:a05:6870:9451:b0:23e:69ae:462b with SMTP id 586e51a60fabf-24172c5d729mr27318575fac.35.1715878609051; Thu, 16 May 2024 09:56:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715878609; cv=pass; d=google.com; s=arc-20160816; b=iG4W/N7MhujgkAzTwGptXL7C41NoREaPY+s+9Pbjv/KqO73Mq1a0x5b4hYb3hlpMSZ LG+dguqjelNG78+4jXUmJU18B69iXOjJt0Z7cMUewuuSC34M8Rme0qxDOspaCL8oTyoG Ftzr7JOlNk9Jniy/zIvGnErmw9QRzXEkGMJA5zStly26efz0KamV/jaoftLAZShyJs3w HcRy0tyoD1u05XURYJi0ehlH86b6su7Hg7tJZA2Pnf+Ve0n7TXQd/c9jo+pGSP+348n8 wjmzJ1F/cqiHMdVtEqh68VlvkKmcBD5aSU2QQOkujSSIu7DLwXZbU/cdLc58PDymIynH F13w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature:dkim-filter; bh=l7jq/qjtQWK9/AgG/L7ErGrS/kgvhzn/ysLrzSnKLe0=; fh=IWfuZJWM1PomBU4hmAsYoWTxWrNwlPk/0cIemno1RAw=; b=Dz83Ilnb5Nugqi/drz2lsao5q4OLNwDmQTZUEdaMFIvzkFOCA2UrQH3ojkKC+7ZsdJ pOhoYSDyhhhFjBspBM1IPlUkK7XPDVprGt8NYlBwpf3oQzFf68uNhVSnuD7vxVVyCqAD Q31DONvMp+yQwTB4wpM9mgSYqAEEst0yG+3iGmXVEvPyg0JgVSTkp4oYI9Fp6wW6SBDy fLnP0bxbFk5Ij3p1LqcZXpRJNgNCE3JT9GkdLvA6MM0j885Enu7VBnabc0FWJ2jFmNcy UcJhKkgdIAxr/Ed319DEO0r1T+rgPonf3f0yGC7rdC9pPWh0Sz7XnBSb/kbb7umsBwpn rcAQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@broadcom.com header.s=dkimrelay header.b=NNOqXQe8; arc=pass (i=1 dkim=pass dkdomain=broadcom.com dmarc=pass fromdomain=broadcom.com); spf=pass (google.com: domain of linux-kernel+bounces-181343-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181343-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43e3c3bdcf7si21613681cf.272.2024.05.16.09.56.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 09:56:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-181343-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=dkimrelay header.b=NNOqXQe8; arc=pass (i=1 dkim=pass dkdomain=broadcom.com dmarc=pass fromdomain=broadcom.com); spf=pass (google.com: domain of linux-kernel+bounces-181343-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181343-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 810111C20C0D for ; Thu, 16 May 2024 16:56:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9E01D1487F2; Thu, 16 May 2024 16:56:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="NNOqXQe8" Received: from relay.smtp-ext.broadcom.com (relay.smtp-ext.broadcom.com [192.19.144.205]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5A9394A3D; Thu, 16 May 2024 16:56:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.19.144.205 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715878600; cv=none; b=SSs+5HRT3nWLnRM440wirCHFBoYXnZcPECw1JLvUnzTSYzmd/vgr/LClFyPijdyNr3Wtp4s9tw51akLnqtgY80H5GsQPu7a4fMQTf9w3zPp6xEZjIq62RLZs/RIsFTqyHLv9UCKDW6nWSmRkNHwwNIngIb+hW7ky/cUa3mr+0VY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715878600; c=relaxed/simple; bh=JiYIaXNGNN4bIc2eJBmYK2Cz7bigDfMqs63xzVRAJwM=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=EZY893JEN/wZBlbS7NHryAf3DafV/qTZ4ydaidqeOX0ulbXdOKvBeCP1DghuCL15250g3ttGwQkWiO/h3Ox9Qnji7hNP+ib9Y+wNw9ave9PjzCeA9M//otUawF6GyBLFhOtRoFyjT48ypT4afDyoM3GPCjQC8QAADhxuLnb/5tI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=NNOqXQe8; arc=none smtp.client-ip=192.19.144.205 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Received: from mail-lvn-it-01.lvn.broadcom.net (mail-lvn-it-01.lvn.broadcom.net [10.36.132.253]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id 0654AC0000FB; Thu, 16 May 2024 09:56:38 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 0654AC0000FB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1715878598; bh=JiYIaXNGNN4bIc2eJBmYK2Cz7bigDfMqs63xzVRAJwM=; h=From:To:Cc:Subject:Date:From; b=NNOqXQe8wsUijRd5kdUTEIdp5jeUQ1WriTZTnw9Up1z0G1Neqlj6GF83bBP9s01Is 7MBryZms/6v5og1Cxa0BN2MohVAfQqGXUevJ3BwDU0MxGTngHotRLNVK46u69soXGu Joy58c7aI9Ec3cwdafRP7Nr9J6HzZi1H+EKzBWHc= Received: from fainelli-desktop.igp.broadcom.net (fainelli-desktop.dhcp.broadcom.net [10.67.48.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail-lvn-it-01.lvn.broadcom.net (Postfix) with ESMTPSA id 025ED18041CAC4; Thu, 16 May 2024 09:56:35 -0700 (PDT) From: Florian Fainelli To: netdev@vger.kernel.org Cc: stephenlangstaff1@gmail.com, aleksander.lobakin@intel.com, Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Vladimir Oltean , Florian Fainelli , Alexander Lobakin , linux-kernel@vger.kernel.org (open list) Subject: [PATCH net v2] net: Always descend into dsa/ folder with CONFIG_NET_DSA enabled Date: Thu, 16 May 2024 09:56:30 -0700 Message-Id: <20240516165631.1929731-1-florian.fainelli@broadcom.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Stephen reported that he was unable to get the dsa_loop driver to get probed, and the reason ended up being because he had CONFIG_FIXED_PHY=y in his kernel configuration. As Masahiro explained it: "obj-m += dsa/" means everything under dsa/ must be modular. If there is a built-in object under dsa/ with CONFIG_NET_DSA=m, you cannot do "obj-$(CONFIG_NET_DSA) += dsa/". You need to change it back to "obj-y += dsa/". This was the case here whereby CONFIG_NET_DSA=m, and so the obj-$(CONFIG_FIXED_PHY) += dsa_loop_bdinfo.o rule is not executed and the DSA loop mdio_board info structure is not registered with the kernel, and eventually the device is simply not found. To preserve the intention of the original commit of limiting the amount of folder descending, conditionally descend into drivers/net/dsa when CONFIG_NET_DSA is enabled. Fixes: 227d72063fcc ("dsa: simplify Kconfig symbols and dependencies") Reported-by: Stephen Langstaff Signed-off-by: Florian Fainelli --- Changes in v2: - conditionally descend into the dsa folder based upon CONFIG_NET_DSA - change subject a bit to reflect the change drivers/net/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 9c053673d6b2..13743d0e83b5 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -49,7 +49,9 @@ obj-$(CONFIG_MHI_NET) += mhi_net.o obj-$(CONFIG_ARCNET) += arcnet/ obj-$(CONFIG_CAIF) += caif/ obj-$(CONFIG_CAN) += can/ -obj-$(CONFIG_NET_DSA) += dsa/ +ifdef CONFIG_NET_DSA +obj-y += dsa/ +endif obj-$(CONFIG_ETHERNET) += ethernet/ obj-$(CONFIG_FDDI) += fddi/ obj-$(CONFIG_HIPPI) += hippi/ -- 2.34.1