Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/650489/?format=api
{ "id": 650489, "url": "http://patchwork.ozlabs.org/api/patches/650489/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1468971808-39023-1-git-send-email-donald.c.skidmore@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": "<1468971808-39023-1-git-send-email-donald.c.skidmore@intel.com>", "list_archive_url": null, "date": "2016-07-19T23:43:28", "name": "ixgbe: cleanup crosstalk fix", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "f574939e221c6123bd48eec716b07a0c1d9db412", "submitter": { "id": 4487, "url": "http://patchwork.ozlabs.org/api/people/4487/?format=api", "name": "Skidmore, Donald C", "email": "donald.c.skidmore@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/1468971808-39023-1-git-send-email-donald.c.skidmore@intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/650489/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/650489/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@lists.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" ], "Received": [ "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3rvFX96cZTz9stY\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 20 Jul 2016 08:46:32 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 699A18A67B;\n\tTue, 19 Jul 2016 22:46:30 +0000 (UTC)", "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id k1HTVjeGy2pn; Tue, 19 Jul 2016 22:46:29 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 282FE8A877;\n\tTue, 19 Jul 2016 22:46:29 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id B29751C0D7B\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 19 Jul 2016 22:46:27 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id AD65E843A5\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 19 Jul 2016 22:46:27 +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 XPJzml8n7Eux for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 19 Jul 2016 22:46:27 +0000 (UTC)", "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id EB4D884333\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 19 Jul 2016 22:46:26 +0000 (UTC)", "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga103.fm.intel.com with ESMTP; 19 Jul 2016 15:46:26 -0700", "from dcskidmo-m40.jf.intel.com ([134.134.3.25])\n\tby FMSMGA003.fm.intel.com with ESMTP; 19 Jul 2016 15:46:26 -0700" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.28,391,1464678000\"; d=\"scan'208\";a=\"736875348\"", "From": "Donald C Skidmore <donald.c.skidmore@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Tue, 19 Jul 2016 19:43:28 -0400", "Message-Id": "<1468971808-39023-1-git-send-email-donald.c.skidmore@intel.com>", "X-Mailer": "git-send-email 2.4.3", "Subject": "[Intel-wired-lan] [PATCH] ixgbe: cleanup crosstalk fix", "X-BeenThere": "intel-wired-lan@lists.osuosl.org", "X-Mailman-Version": "2.1.18-1", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.lists.osuosl.org>", "List-Unsubscribe": "<http://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@lists.osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@lists.osuosl.org?subject=help>", "List-Subscribe": "<http://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "intel-wired-lan-bounces@lists.osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@lists.osuosl.org>" }, "content": "This patch address a few issues with the initial crosstalk fix. Most\nimportant of which is the SDP that indicates the presents of a SFP+\nmodule changes between HW types. With this change that is taken in\nto consideration\n\nIt also moves the check closer to the base code that checks link. This\nmakes it so we only need to do the check in one spot.\n\nSigned-off-by: Don Skidmore <donald.c.skidmore@intel.com>\n---\n drivers/net/ethernet/intel/ixgbe/ixgbe.h | 2 -\n drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 71 +++++++++++++++++++++++++\n drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 39 --------------\n drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 1 +\n 4 files changed, 72 insertions(+), 41 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h\nindex 9f2db18..9475ff9 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h\n@@ -804,8 +804,6 @@ struct ixgbe_adapter {\n \n #define IXGBE_RSS_KEY_SIZE 40 /* size of RSS Hash Key in bytes */\n \tu32 rss_key[IXGBE_RSS_KEY_SIZE / sizeof(u32)];\n-\n-\tbool need_crosstalk_fix;\n };\n \n static inline u8 ixgbe_max_rss_indices(struct ixgbe_adapter *adapter)\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c\nindex ce881a7..b4217f3 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c\n@@ -277,6 +277,7 @@ s32 ixgbe_start_hw_generic(struct ixgbe_hw *hw)\n {\n \ts32 ret_val;\n \tu32 ctrl_ext;\n+\tu16 device_caps;\n \n \t/* Set the media type */\n \thw->phy.media_type = hw->mac.ops.get_media_type(hw);\n@@ -301,6 +302,22 @@ s32 ixgbe_start_hw_generic(struct ixgbe_hw *hw)\n \tif (ret_val)\n \t\treturn ret_val;\n \n+\t/* Cashe bit indicating need for crosstalk fix */\n+\tswitch (hw->mac.type) {\n+\tcase ixgbe_mac_82599EB:\n+\tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n+\t\thw->mac.ops.get_device_caps(hw, &device_caps);\n+\t\tif (device_caps & IXGBE_DEVICE_CAPS_NO_CROSSTALK_WR)\n+\t\t\thw->need_crosstalk_fix = false;\n+\t\telse\n+\t\t\thw->need_crosstalk_fix = true;\n+\t\tbreak;\n+\tdefault:\n+\t\thw->need_crosstalk_fix = false;\n+\t\tbreak;\n+\t}\n+\n \t/* Clear adapter stopped flag */\n \thw->adapter_stopped = false;\n \n@@ -3200,6 +3217,31 @@ s32 ixgbe_clear_vfta_generic(struct ixgbe_hw *hw)\n }\n \n /**\n+ * ixgbe_need_crosstalk_fix - Determine if we need to do cross talk fix\n+ * @hw: pointer to hardware structure\n+ *\n+ * Contains the logic to identify if we need to verify link for the\n+ * crosstalk fix\n+ **/\n+static bool ixgbe_need_crosstalk_fix(struct ixgbe_hw *hw)\n+{\n+\t/* Does FW say we need the fix */\n+\tif (!hw->need_crosstalk_fix)\n+\t\treturn false;\n+\n+\t/* Only consider SFP+ PHYs i.e. media type fiber */\n+\tswitch (hw->mac.ops.get_media_type(hw)) {\n+\tcase ixgbe_media_type_fiber:\n+\tcase ixgbe_media_type_fiber_qsfp:\n+\t\tbreak;\n+\tdefault:\n+\t\treturn false;\n+\t}\n+\n+\treturn true;\n+}\n+\n+/**\n * ixgbe_check_mac_link_generic - Determine link and speed status\n * @hw: pointer to hardware structure\n * @speed: pointer to link speed\n@@ -3214,6 +3256,35 @@ s32 ixgbe_check_mac_link_generic(struct ixgbe_hw *hw, ixgbe_link_speed *speed,\n \tu32 links_reg, links_orig;\n \tu32 i;\n \n+\t/* If Crosstalk fix enabled do the sanity check of making sure\n+\t * the SFP+ cage is full.\n+\t */\n+\tif (ixgbe_need_crosstalk_fix(hw)) {\n+\t\tu32 sfp_cage_full;\n+\n+\t\tswitch (hw->mac.type) {\n+\t\tcase ixgbe_mac_82599EB:\n+\t\t\tsfp_cage_full = IXGBE_READ_REG(hw, IXGBE_ESDP) &\n+\t\t\t\t\tIXGBE_ESDP_SDP2;\n+\t\t\tbreak;\n+\t\tcase ixgbe_mac_X550EM_x:\n+\t\tcase ixgbe_mac_x550em_a:\n+\t\t\tsfp_cage_full = IXGBE_READ_REG(hw, IXGBE_ESDP) &\n+\t\t\t\t\tIXGBE_ESDP_SDP0;\n+\t\t\tbreak;\n+\t\tdefault:\n+\t\t\t/* sanity check - No SFP+ devices here */\n+\t\t\tsfp_cage_full = false;\n+\t\t\tbreak;\n+\t\t}\n+\n+\t\tif (!sfp_cage_full) {\n+\t\t\t*link_up = false;\n+\t\t\t*speed = IXGBE_LINK_SPEED_UNKNOWN;\n+\t\t\treturn 0;\n+\t\t}\n+\t}\n+\n \t/* clear the old state */\n \tlinks_orig = IXGBE_READ_REG(hw, IXGBE_LINKS);\n \ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\nindex 82771f6..7871f53 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n@@ -5625,7 +5625,6 @@ static int ixgbe_sw_init(struct ixgbe_adapter *adapter)\n \tstruct pci_dev *pdev = adapter->pdev;\n \tunsigned int rss, fdir;\n \tu32 fwsm;\n-\tu16 device_caps;\n \tint i;\n \n \t/* PCI config space info */\n@@ -5771,22 +5770,6 @@ static int ixgbe_sw_init(struct ixgbe_adapter *adapter)\n \tadapter->tx_ring_count = IXGBE_DEFAULT_TXD;\n \tadapter->rx_ring_count = IXGBE_DEFAULT_RXD;\n \n-\t/* Cache bit indicating need for crosstalk fix */\n-\tswitch (hw->mac.type) {\n-\tcase ixgbe_mac_82599EB:\n-\tcase ixgbe_mac_X550EM_x:\n-\tcase ixgbe_mac_x550em_a:\n-\t\thw->mac.ops.get_device_caps(hw, &device_caps);\n-\t\tif (device_caps & IXGBE_DEVICE_CAPS_NO_CROSSTALK_WR)\n-\t\t\tadapter->need_crosstalk_fix = false;\n-\t\telse\n-\t\t\tadapter->need_crosstalk_fix = true;\n-\t\tbreak;\n-\tdefault:\n-\t\tadapter->need_crosstalk_fix = false;\n-\t\tbreak;\n-\t}\n-\n \t/* set default work limits */\n \tadapter->tx_work_limit = IXGBE_DEFAULT_TX_WORK;\n \n@@ -6707,18 +6690,6 @@ static void ixgbe_watchdog_update_link(struct ixgbe_adapter *adapter)\n \t\tlink_up = true;\n \t}\n \n-\t/* If Crosstalk fix enabled do the sanity check of making sure\n-\t * the SFP+ cage is empty.\n-\t */\n-\tif (adapter->need_crosstalk_fix) {\n-\t\tu32 sfp_cage_full;\n-\n-\t\tsfp_cage_full = IXGBE_READ_REG(hw, IXGBE_ESDP) &\n-\t\t\t\tIXGBE_ESDP_SDP2;\n-\t\tif (ixgbe_is_sfp(hw) && link_up && !sfp_cage_full)\n-\t\t\tlink_up = false;\n-\t}\n-\n \tif (adapter->ixgbe_ieee_pfc)\n \t\tpfc_en |= !!(adapter->ixgbe_ieee_pfc->pfc_en);\n \n@@ -7065,16 +7036,6 @@ static void ixgbe_sfp_detection_subtask(struct ixgbe_adapter *adapter)\n \tstruct ixgbe_hw *hw = &adapter->hw;\n \ts32 err;\n \n-\t/* If crosstalk fix enabled verify the SFP+ cage is full */\n-\tif (adapter->need_crosstalk_fix) {\n-\t\tu32 sfp_cage_full;\n-\n-\t\tsfp_cage_full = IXGBE_READ_REG(hw, IXGBE_ESDP) &\n-\t\t\t\tIXGBE_ESDP_SDP2;\n-\t\tif (!sfp_cage_full)\n-\t\t\treturn;\n-\t}\n-\n \t/* not searching for SFP so there is nothing to do here */\n \tif (!(adapter->flags2 & IXGBE_FLAG2_SEARCH_FOR_SFP) &&\n \t !(adapter->flags2 & IXGBE_FLAG2_SFP_NEEDS_RESET))\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h\nindex da3d835..1248a99 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h\n@@ -3525,6 +3525,7 @@ struct ixgbe_hw {\n \tbool\t\t\t\tforce_full_reset;\n \tbool\t\t\t\tallow_unsupported_sfp;\n \tbool\t\t\t\twol_enabled;\n+\tbool\t\t\t\tneed_crosstalk_fix;\n };\n \n struct ixgbe_info {\n", "prefixes": [] }