Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1020515/?format=api
{ "id": 1020515, "url": "http://patchwork.ozlabs.org/api/patches/1020515/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190103213519.9754-1-jeffrey.t.kirsher@intel.com/", "project": { "id": 46, "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api", "name": "Intel Wired Ethernet development", "link_name": "intel-wired-lan", "list_id": "intel-wired-lan.osuosl.org", "list_email": "intel-wired-lan@osuosl.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20190103213519.9754-1-jeffrey.t.kirsher@intel.com>", "list_archive_url": null, "date": "2019-01-03T21:35:19", "name": "ixgbe: fix Kconfig when driver is not a module", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "a15442a6001fc556c2f3407e81cd6f5f53678f71", "submitter": { "id": 473, "url": "http://patchwork.ozlabs.org/api/people/473/?format=api", "name": "Kirsher, Jeffrey T", "email": "jeffrey.t.kirsher@intel.com" }, "delegate": { "id": 68, "url": "http://patchwork.ozlabs.org/api/users/68/?format=api", "username": "jtkirshe", "first_name": "Jeff", "last_name": "Kirsher", "email": "jeffrey.t.kirsher@intel.com" }, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190103213519.9754-1-jeffrey.t.kirsher@intel.com/mbox/", "series": [ { "id": 84349, "url": "http://patchwork.ozlabs.org/api/series/84349/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=84349", "date": "2019-01-03T21:35:19", "name": "ixgbe: fix Kconfig when driver is not a module", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/84349/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1020515/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1020515/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@osuosl.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Authentication-Results": [ "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.133; helo=hemlock.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=intel.com" ], "Received": [ "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 43W1Rr1YsLz9s7h\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 4 Jan 2019 08:35:35 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 4A2F687108;\n\tThu, 3 Jan 2019 21:35:34 +0000 (UTC)", "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id rwrGIylIi1ez; Thu, 3 Jan 2019 21:35:33 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 207D9870F3;\n\tThu, 3 Jan 2019 21:35:33 +0000 (UTC)", "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id 173B21BF46F\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 3 Jan 2019 21:35:32 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 141FB8358F\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 3 Jan 2019 21:35:32 +0000 (UTC)", "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id l2OPb5VlNsff for <intel-wired-lan@lists.osuosl.org>;\n\tThu, 3 Jan 2019 21:35:31 +0000 (UTC)", "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id 1853281BD2\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 3 Jan 2019 21:35:31 +0000 (UTC)", "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t03 Jan 2019 13:35:30 -0800", "from jtkirshe-desk1.jf.intel.com ([134.134.177.96])\n\tby orsmga001.jf.intel.com with ESMTP; 03 Jan 2019 13:35:30 -0800" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.56,436,1539673200\"; d=\"scan'208\";a=\"123901228\"", "From": "Jeff Kirsher <jeffrey.t.kirsher@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Thu, 3 Jan 2019 13:35:19 -0800", "Message-Id": "<20190103213519.9754-1-jeffrey.t.kirsher@intel.com>", "X-Mailer": "git-send-email 2.20.1", "MIME-Version": "1.0", "Subject": "[Intel-wired-lan] [PATCH] ixgbe: fix Kconfig when driver is not a\n\tmodule", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>", "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>", "Cc": "netdev@vger.kernel.org, Florian Fainelli <f.fainelli@gmail.com>,\n\tDave Jones <davej@codemonkey.org.uk>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "intel-wired-lan-bounces@osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>" }, "content": "The new ability added to the driver to use mii_bus to handle MII related\nioctls is causing compile issues when the driver is compiled into the\nkernel (i.e. not a module).\n\nThe simple solution of requiring the driver to be compiled as a module when\nMDIO_BUS is a module, causes a recursion Kconfig issue due to IPSec\ndependencies.\n\nSo created another Kconfig option for ixgbe, to enable mdio_bus support for\nDSA devices. This solution solves the problem when the ixgbe driver is\ncompiled into the kernel and MDIO_BUS is compiled as a module. In this\ncase, the IXGBE_MDIO option is disabled and the code is not compiled\ninto the driver.\n\nCC: Dave Jones <davej@codemonkey.org.uk>\nCC: Steve Douthit <stephend@silicom-usa.com>\nCC: Florian Fainelli <f.fainelli@gmail.com>\nSigned-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>\n---\n drivers/net/ethernet/intel/Kconfig | 11 ++++++++++-\n drivers/net/ethernet/intel/ixgbe/ixgbe.h | 4 ++++\n drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 12 ++++++++++--\n drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | 4 ++++\n drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h | 3 ++-\n 5 files changed, 30 insertions(+), 4 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/Kconfig b/drivers/net/ethernet/intel/Kconfig\nindex 31fb76ee9d82..35317ecdd0c3 100644\n--- a/drivers/net/ethernet/intel/Kconfig\n+++ b/drivers/net/ethernet/intel/Kconfig\n@@ -159,7 +159,6 @@ config IXGBE\n \ttristate \"Intel(R) 10GbE PCI Express adapters support\"\n \tdepends on PCI\n \tselect MDIO\n-\tselect MDIO_DEVICE\n \timply PTP_1588_CLOCK\n \t---help---\n \t This driver supports Intel(R) 10GbE PCI Express family of\n@@ -210,6 +209,16 @@ config IXGBE_IPSEC\n \t---help---\n \t Enable support for IPSec offload in ixgbe.ko\n \n+config IXGBE_MDIO\n+\tbool \"MDIO Support for DSA devices\"\n+\tdefault n\n+\tdepends on IXGBE && MDIO_BUS && !(IXGBE=y && MDIO_BUS=m)\n+\t---help---\n+\t Say Y here if you want MDIO_BUS support for DSA devices in the\n+\t driver.\n+\n+\t If unsure, say N.\n+\n config IXGBEVF\n \ttristate \"Intel(R) 10GbE PCI Express Virtual Function Ethernet support\"\n \tdepends on PCI_MSI\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h\nindex 08d85e336bd4..9d7496508ee0 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h\n@@ -12,7 +12,9 @@\n #include <linux/aer.h>\n #include <linux/if_vlan.h>\n #include <linux/jiffies.h>\n+#ifdef CONFIG_IXGBE_MDIO\n #include <linux/phy.h>\n+#endif\n \n #include <linux/timecounter.h>\n #include <linux/net_tstamp.h>\n@@ -562,7 +564,9 @@ struct ixgbe_adapter {\n \tstruct net_device *netdev;\n \tstruct bpf_prog *xdp_prog;\n \tstruct pci_dev *pdev;\n+#ifdef CONFIG_IXGBE_MDIO\n \tstruct mii_bus *mii_bus;\n+#endif\n \n \tunsigned long state;\n \ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\nindex d2ce7f0bc32d..afa0337f7ba0 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n@@ -39,7 +39,9 @@\n #include \"ixgbe.h\"\n #include \"ixgbe_common.h\"\n #include \"ixgbe_dcb_82599.h\"\n+#ifdef CONFIG_IXGBE_MDIO\n #include \"ixgbe_phy.h\"\n+#endif\n #include \"ixgbe_sriov.h\"\n #include \"ixgbe_model.h\"\n #include \"ixgbe_txrx_common.h\"\n@@ -8791,6 +8793,7 @@ ixgbe_mdio_read(struct net_device *netdev, int prtad, int devad, u16 addr)\n \tu16 value;\n \tint rc;\n \n+#ifdef CONFIG_IXGBE_MDIO\n \tif (adapter->mii_bus) {\n \t\tint regnum = addr;\n \n@@ -8799,7 +8802,7 @@ ixgbe_mdio_read(struct net_device *netdev, int prtad, int devad, u16 addr)\n \n \t\treturn mdiobus_read(adapter->mii_bus, prtad, regnum);\n \t}\n-\n+#endif\n \tif (prtad != hw->phy.mdio.prtad)\n \t\treturn -EINVAL;\n \trc = hw->phy.ops.read_reg(hw, addr, devad, &value);\n@@ -8814,6 +8817,7 @@ static int ixgbe_mdio_write(struct net_device *netdev, int prtad, int devad,\n \tstruct ixgbe_adapter *adapter = netdev_priv(netdev);\n \tstruct ixgbe_hw *hw = &adapter->hw;\n \n+#ifdef CONFIG_IXGBE_MDIO\n \tif (adapter->mii_bus) {\n \t\tint regnum = addr;\n \n@@ -8822,7 +8826,7 @@ static int ixgbe_mdio_write(struct net_device *netdev, int prtad, int devad,\n \n \t\treturn mdiobus_write(adapter->mii_bus, prtad, regnum, value);\n \t}\n-\n+#endif\n \tif (prtad != hw->phy.mdio.prtad)\n \t\treturn -EINVAL;\n \treturn hw->phy.ops.write_reg(hw, addr, devad, value);\n@@ -11141,7 +11145,9 @@ static int ixgbe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)\n \t\t\tIXGBE_LINK_SPEED_10GB_FULL | IXGBE_LINK_SPEED_1GB_FULL,\n \t\t\ttrue);\n \n+#ifdef CONFIG_IXGBE_MDIO\n \tixgbe_mii_bus_init(hw);\n+#endif\n \n \treturn 0;\n \n@@ -11193,8 +11199,10 @@ static void ixgbe_remove(struct pci_dev *pdev)\n \tset_bit(__IXGBE_REMOVING, &adapter->state);\n \tcancel_work_sync(&adapter->service_task);\n \n+#ifdef CONFIG_IXGBE_MDIO\n \tif (adapter->mii_bus)\n \t\tmdiobus_unregister(adapter->mii_bus);\n+#endif\n \n #ifdef CONFIG_IXGBE_DCA\n \tif (adapter->flags & IXGBE_FLAG_DCA_ENABLED) {\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c\nindex cc4907f9ff02..05da21920863 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c\n@@ -3,7 +3,9 @@\n \n #include <linux/pci.h>\n #include <linux/delay.h>\n+#ifdef CONFIG_IXGBE_MDIO\n #include <linux/iopoll.h>\n+#endif\n #include <linux/sched.h>\n \n #include \"ixgbe.h\"\n@@ -659,6 +661,7 @@ s32 ixgbe_write_phy_reg_generic(struct ixgbe_hw *hw, u32 reg_addr,\n \treturn status;\n }\n \n+#ifdef CONFIG_IXGBE_MDIO\n #define IXGBE_HW_READ_REG(addr) IXGBE_READ_REG(hw, addr)\n \n /**\n@@ -956,6 +959,7 @@ s32 ixgbe_mii_bus_init(struct ixgbe_hw *hw)\n \tadapter->mii_bus = NULL;\n \treturn -ENODEV;\n }\n+#endif\n \n /**\n * ixgbe_setup_phy_link_generic - Set and restart autoneg\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h\nindex 214b01085718..88b851178d7e 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h\n@@ -120,8 +120,9 @@\n /* SFP+ SFF-8472 Compliance code */\n #define IXGBE_SFF_SFF_8472_UNSUP 0x00\n \n+#ifdef CONFIG_IXGBE_MDIO\n s32 ixgbe_mii_bus_init(struct ixgbe_hw *hw);\n-\n+#endif\n s32 ixgbe_identify_phy_generic(struct ixgbe_hw *hw);\n s32 ixgbe_reset_phy_generic(struct ixgbe_hw *hw);\n s32 ixgbe_read_phy_reg_generic(struct ixgbe_hw *hw, u32 reg_addr,\n", "prefixes": [] }