From patchwork Sun Dec 15 22:12:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 181630 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp3581262ile; Sun, 15 Dec 2019 14:13:10 -0800 (PST) X-Google-Smtp-Source: APXvYqzYuKf7kVbQFMXmYPoRCauFZ0nZJohrJBzDGCOWab1h5s/z5domezKnAw4GHH9d7008i5r7 X-Received: by 2002:a05:6830:1185:: with SMTP id u5mr26491467otq.147.1576447990900; Sun, 15 Dec 2019 14:13:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576447990; cv=none; d=google.com; s=arc-20160816; b=H/HA8dgC3ffvHdkjp3y33HJ5yoP2V+f/7/eMSJoLKxC4D34Tal1sAYHOv0vC7Fl0aW RD8IuhD2B9mIZM2vt9WUaABFcOwAgAaRmYyxhgq+QJaXj+YAeIHiwt5D7BfSVb59hSfF Fv5d802//acKHqCvprjVET/DGgm8Z4wyeRkGJ45/bG/tLaEzA7H6CApLZmOi+6ztMLSA 0ZyxSssFloNHfMoOWhKCUKK2B1R+nGLWqGeahkIVV9Xwj45qxCmnLIMW1LbAEAH0on1m 3/A0EJxcxkWTB5VDqNeM9oSjvN8QKKkYGSuQkRBY3hJ5nzjrYNfTgcFpOcEO5cHSxKuV NENA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=Fg1vsAsuu7r+fiHBg9UoeGH5ICk21CnUpnQUQhW68qQ=; b=V4VnHLmm8FA0mIzIiT6IFfEfvSNKRmKfWbC9s90y7ctd9tY8+pMFHFLJiImTperjMR Qi4GDvmWiNBlxiOxiZBfVWDbmR2YvzCk/Zrgy4rxTgCKmJ8a/gPBV9kIaGT6e1CHnHsT 0Ikj/0+nogoVQrOf4VDOlLz1mV4WDObsIsWOrx7//5tB/jGHTO08cvbkkwv8/bD3psjt YeimImfql8Ra2JIEQUsohPcXjYQOEhybinUQ/UVr1fOQBC/t/cBl7dD7NoNYTNMFR2nw fZLrIpnm53M36OAbdKdLt+mKC8NZTcslSk4a1RH24/Cm+KgFtQDd7i6sMw4DEla/YSMh Xuhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IPOFPNLk; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-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. [209.132.180.67]) by mx.google.com with ESMTP id x7si9570307oto.264.2019.12.15.14.13.10; Sun, 15 Dec 2019 14:13:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IPOFPNLk; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-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 S1726380AbfLOWNJ (ORCPT + 9 others); Sun, 15 Dec 2019 17:13:09 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:46247 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726295AbfLOWNJ (ORCPT ); Sun, 15 Dec 2019 17:13:09 -0500 Received: by mail-wr1-f65.google.com with SMTP id z7so4899923wrl.13 for ; Sun, 15 Dec 2019 14:13:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Fg1vsAsuu7r+fiHBg9UoeGH5ICk21CnUpnQUQhW68qQ=; b=IPOFPNLkCPAycyrJNrpzQAoQfmOMMErrcMfWpVGvIWiCNOBqTIA+e/xxI7c+R4aZaW FsoTvseioKgPySSNsC6mLiNsDJCvODWTFvhk2gfX+vaZ/75vrgNpt9LIRCUq+03Wk23f cMmOcFmg/gqkWVfqUT16g53cqUh+9e0jZHnMh+mql7v4ijqBPERg5V9E9//Jk2ChkZWX 0sgb75mTaXIEM0qIPtTs/nEu+4AGhFNYQ6OUeKeE2RjtCGgHwFgwQlYij906uLdNtQt+ 6CuQktaUDOIg7dExaBiv8578EARi6cGBiDVRHf6GixZb51UGNrbcs+lrfJ8K/DgdJjQW HXjA== 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; bh=Fg1vsAsuu7r+fiHBg9UoeGH5ICk21CnUpnQUQhW68qQ=; b=UIWeQu+KgZ74h5MIhWF4DXS3TXhU1CLd4JZVFfZTKjicGmj3fDjhY+AsIhT5vk7YOv MCCG4vO/6E96sUnX5aS3aUe6AGlOF8CFGDAqUpUDbCUyqNNNwDUTQdhVRxV4nAVf2tyz iVSLr4p5dLBbv4io7OzQ2FCPHnIxt2EExapLjceS6aiGTVAVStt6HWakUYrt9XN2wdIZ Wr8aALB+vk2yFQZ8iAYHenyanm/MQNabm0msXcZlBxo+DDLvxMFgTEo4z3VeFzaz5oWy kGr+iAhZwOmPbL5JkTlhTPmSKOiTgoIB48DgcHhWJVycQwZGX0dC9gCFlY8uwdoEwr93 CR0w== X-Gm-Message-State: APjAAAVb/zoFIp10QdqKh6IfZ1oy6Dl9JmKcPGJQ+WFXUNJEzLerDhya LmqVVyqdBE1EF7x6rum2+J0= X-Received: by 2002:a05:6000:11c5:: with SMTP id i5mr25805068wrx.102.1576447987233; Sun, 15 Dec 2019 14:13:07 -0800 (PST) Received: from localhost.localdomain ([86.121.29.241]) by smtp.gmail.com with ESMTPSA id s10sm19228066wrw.12.2019.12.15.14.13.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Dec 2019 14:13:06 -0800 (PST) From: Vladimir Oltean To: davem@davemloft.net Cc: arnd@arndb.de, maowenan@huawei.com, andrew@lunn.ch, f.fainelli@gmail.com, vivien.didelot@gmail.com, claudiu.manoil@nxp.com, alexandru.marginean@nxp.com, xiaoliang.yang_1@nxp.com, yangbo.lu@nxp.com, netdev@vger.kernel.org, alexandre.belloni@bootlin.com, UNGLinuxDriver@microchip.com, Vladimir Oltean Subject: [PATCH net v2] net: dsa: ocelot: add NET_VENDOR_MICROSEMI dependency Date: Mon, 16 Dec 2019 00:12:14 +0200 Message-Id: <20191215221214.15337-1-olteanv@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann Selecting MSCC_OCELOT_SWITCH is not possible when NET_VENDOR_MICROSEMI is disabled: WARNING: unmet direct dependencies detected for MSCC_OCELOT_SWITCH Depends on [n]: NETDEVICES [=y] && ETHERNET [=n] && NET_VENDOR_MICROSEMI [=n] && NET_SWITCHDEV [=y] && HAS_IOMEM [=y] Selected by [m]: - NET_DSA_MSCC_FELIX [=m] && NETDEVICES [=y] && HAVE_NET_DSA [=y] && NET_DSA [=y] && PCI [=y] Add a Kconfig dependency on NET_VENDOR_MICROSEMI, which also implies CONFIG_NETDEVICES. Depending on a vendor config violates menuconfig locality for the DSA driver, but is the smallest compromise since all other solutions are much more complicated (see [0]). https://www.spinics.net/lists/netdev/msg618808.html Fixes: 56051948773e ("net: dsa: ocelot: add driver for Felix switch family") Signed-off-by: Arnd Bergmann Signed-off-by: Mao Wenan Signed-off-by: Vladimir Oltean --- Changes in v2: - Back to Arnd's and Mao's original proposal. The final straw to the much more complicated approach in the v1 linked above is the need to do this in drivers/net/ethernet/Makefile: -obj-$(CONFIG_NET_VENDOR_MICROSEMI) += mscc/ +obj-y += mscc/ drivers/net/dsa/ocelot/Kconfig | 1 + 1 file changed, 1 insertion(+) -- 2.17.1 diff --git a/drivers/net/dsa/ocelot/Kconfig b/drivers/net/dsa/ocelot/Kconfig index 0031ca814346..6f9804093150 100644 --- a/drivers/net/dsa/ocelot/Kconfig +++ b/drivers/net/dsa/ocelot/Kconfig @@ -2,6 +2,7 @@ config NET_DSA_MSCC_FELIX tristate "Ocelot / Felix Ethernet switch support" depends on NET_DSA && PCI + depends on NET_VENDOR_MICROSEMI select MSCC_OCELOT_SWITCH select NET_DSA_TAG_OCELOT help