Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/675330/?format=api
{ "id": 675330, "url": "http://patchwork.ozlabs.org/api/patches/675330/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20160926210818.30339.75039.stgit@localhost6.localdomain6/", "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": "<20160926210818.30339.75039.stgit@localhost6.localdomain6>", "list_archive_url": null, "date": "2016-09-26T21:08:18", "name": "[2/2] ixgbe: fix link status check for copper X550em", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "8164e596f3712de61fa2bb34461127c648ec50e3", "submitter": { "id": 1670, "url": "http://patchwork.ozlabs.org/api/people/1670/?format=api", "name": "Tantilov, Emil S", "email": "emil.s.tantilov@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/20160926210818.30339.75039.stgit@localhost6.localdomain6/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/675330/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/675330/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 3sjc0K01kVz9s9c\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 27 Sep 2016 07:04:16 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 8D5E88AE87;\n\tMon, 26 Sep 2016 21:04:15 +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 TOUy0Co4S6To; Mon, 26 Sep 2016 21:04:15 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 10B988AF19;\n\tMon, 26 Sep 2016 21:04:15 +0000 (UTC)", "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 118071C29FC\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 26 Sep 2016 21:04:12 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 10D648AB91\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 26 Sep 2016 21:04:12 +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 lFKswRwPT+HU for <intel-wired-lan@lists.osuosl.org>;\n\tMon, 26 Sep 2016 21:04:11 +0000 (UTC)", "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id 5605E8AF69\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 26 Sep 2016 21:04:11 +0000 (UTC)", "from fmsmga005.fm.intel.com ([10.253.24.32])\n\tby orsmga105.jf.intel.com with ESMTP; 26 Sep 2016 14:04:10 -0700", "from estantil-desk3.jf.intel.com (HELO localhost6.localdomain6)\n\t([134.134.3.186])\n\tby fmsmga005.fm.intel.com with ESMTP; 26 Sep 2016 14:04:10 -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.30,401,1470726000\"; d=\"scan'208\";a=\"13482959\"", "From": "Emil Tantilov <emil.s.tantilov@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Mon, 26 Sep 2016 14:08:18 -0700", "Message-ID": "<20160926210818.30339.75039.stgit@localhost6.localdomain6>", "In-Reply-To": "<20160926210813.30339.95294.stgit@localhost6.localdomain6>", "References": "<20160926210813.30339.95294.stgit@localhost6.localdomain6>", "User-Agent": "StGit/0.17.1-17-ge4e0", "MIME-Version": "1.0", "Subject": "[Intel-wired-lan] [PATCH 2/2] ixgbe: fix link status check for\n\tcopper X550em", "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>", "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": "Read the PHY register twice in order to get the correct value for\nautoneg_status.\n\n\nSigned-off-by: Emil Tantilov <emil.s.tantilov@intel.com>\n---\n drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 21 +++++++++++++--------\n 1 file changed, 13 insertions(+), 8 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c\nindex aa32e61..fffefcf 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c\n@@ -1556,7 +1556,7 @@ static s32 ixgbe_check_link_t_X550em(struct ixgbe_hw *hw,\n \t\t\t\t bool link_up_wait_to_complete)\n {\n \tu32 status;\n-\tu16 autoneg_status;\n+\tu16 i, autoneg_status;\n \n \tif (hw->mac.ops.get_media_type(hw) != ixgbe_media_type_copper)\n \t\treturn IXGBE_ERR_CONFIG;\n@@ -1568,13 +1568,18 @@ static s32 ixgbe_check_link_t_X550em(struct ixgbe_hw *hw,\n \tif (status || !(*link_up))\n \t\treturn status;\n \n-\t /* MAC link is up, so check external PHY link.\n-\t * Read this twice back to back to indicate current status.\n-\t */\n-\tstatus = hw->phy.ops.read_reg(hw, MDIO_STAT1, MDIO_MMD_AN,\n-\t\t\t\t &autoneg_status);\n-\tif (status)\n-\t\treturn status;\n+\t/* MAC link is up, so check external PHY link.\n+\t * Link status is latching low, and can only be used to detect link\n+\t * drop, and not the current status of the link without performing\n+\t * back-to-back reads.\n+\t */\n+\tfor (i = 0; i < 2; i++) {\n+\t\tstatus = hw->phy.ops.read_reg(hw, MDIO_STAT1, MDIO_MMD_AN,\n+\t\t\t\t\t &autoneg_status);\n+\n+\t\tif (status)\n+\t\t\treturn status;\n+\t}\n \n \t/* If external PHY link is not up, then indicate link not up */\n \tif (!(autoneg_status & IXGBE_MDIO_AUTO_NEG_LINK_STATUS))\n", "prefixes": [ "2/2" ] }