Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/685322/?format=api
{ "id": 685322, "url": "http://patchwork.ozlabs.org/api/patches/685322/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1477098654-29228-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": "<1477098654-29228-1-git-send-email-donald.c.skidmore@intel.com>", "list_archive_url": null, "date": "2016-10-22T01:10:54", "name": "ixgbe: Update setup PHY link to unset all speeds", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "b8f484a86b8432d53cf4889fb674d80bb03d41f9", "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/1477098654-29228-1-git-send-email-donald.c.skidmore@intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/685322/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/685322/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 hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\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 3t131Q1zBMz9s65\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 22 Oct 2016 11:13:45 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 7E2D29563C;\n\tSat, 22 Oct 2016 00:13:43 +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 mHwQTa2k-Kvv; Sat, 22 Oct 2016 00:13:41 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id D29F095625;\n\tSat, 22 Oct 2016 00:13:41 +0000 (UTC)", "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id CFE1C1CE786\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tSat, 22 Oct 2016 00:13:40 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id C9C2D3162A\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tSat, 22 Oct 2016 00:13:40 +0000 (UTC)", "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id mVoVQctHLo2c for <intel-wired-lan@lists.osuosl.org>;\n\tSat, 22 Oct 2016 00:13:40 +0000 (UTC)", "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby silver.osuosl.org (Postfix) with ESMTPS id 08A3E3161F\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tSat, 22 Oct 2016 00:13:39 +0000 (UTC)", "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby orsmga103.jf.intel.com with ESMTP; 21 Oct 2016 17:13:40 -0700", "from dcskidmo-m40.jf.intel.com ([134.134.3.124])\n\tby orsmga003.jf.intel.com with ESMTP; 21 Oct 2016 17:13:39 -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.31,527,1473145200\"; d=\"scan'208\";a=\"892654513\"", "From": "Donald C Skidmore <donald.c.skidmore@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Fri, 21 Oct 2016 21:10:54 -0400", "Message-Id": "<1477098654-29228-1-git-send-email-donald.c.skidmore@intel.com>", "X-Mailer": "git-send-email 2.4.3", "Subject": "[Intel-wired-lan] [PATCH] ixgbe: Update setup PHY link to unset all\n\tspeeds", "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 updates ixgbe_setup_phy_link_generic to set/unset\nauto-negotiation for all speeds. This ensures that unsupported\nspeeds are unset. This is necessary since the PHY NVM may\nadvertise unsupported speeds.\n\nSigned-off-by: Don Skidmore <donald.c.skidmore@intel.com>\n---\n drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | 77 ++++++++++++++--------------\n 1 file changed, 38 insertions(+), 39 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c\nindex 2019db5..e27798d9 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c\n@@ -678,53 +678,52 @@ s32 ixgbe_setup_phy_link_generic(struct ixgbe_hw *hw)\n \n \tixgbe_get_copper_link_capabilities_generic(hw, &speed, &autoneg);\n \n-\tif (speed & IXGBE_LINK_SPEED_10GB_FULL) {\n-\t\t/* Set or unset auto-negotiation 10G advertisement */\n-\t\thw->phy.ops.read_reg(hw, MDIO_AN_10GBT_CTRL,\n-\t\t\t\t MDIO_MMD_AN,\n-\t\t\t\t &autoneg_reg);\n+\t/* Set or unset auto-negotiation 10G advertisement */\n+\thw->phy.ops.read_reg(hw, MDIO_AN_10GBT_CTRL, MDIO_MMD_AN, &autoneg_reg);\n \n-\t\tautoneg_reg &= ~MDIO_AN_10GBT_CTRL_ADV10G;\n-\t\tif (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_10GB_FULL)\n-\t\t\tautoneg_reg |= MDIO_AN_10GBT_CTRL_ADV10G;\n+\tautoneg_reg &= ~MDIO_AN_10GBT_CTRL_ADV10G;\n+\tif ((hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_10GB_FULL) &&\n+\t (speed & IXGBE_LINK_SPEED_10GB_FULL))\n+\t\tautoneg_reg |= MDIO_AN_10GBT_CTRL_ADV10G;\n \n-\t\thw->phy.ops.write_reg(hw, MDIO_AN_10GBT_CTRL,\n-\t\t\t\t MDIO_MMD_AN,\n-\t\t\t\t autoneg_reg);\n-\t}\n+\thw->phy.ops.write_reg(hw, MDIO_AN_10GBT_CTRL, MDIO_MMD_AN, autoneg_reg);\n \n-\tif (speed & IXGBE_LINK_SPEED_1GB_FULL) {\n-\t\t/* Set or unset auto-negotiation 1G advertisement */\n-\t\thw->phy.ops.read_reg(hw,\n-\t\t\t\t IXGBE_MII_AUTONEG_VENDOR_PROVISION_1_REG,\n-\t\t\t\t MDIO_MMD_AN,\n-\t\t\t\t &autoneg_reg);\n-\n-\t\tautoneg_reg &= ~IXGBE_MII_1GBASE_T_ADVERTISE;\n-\t\tif (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_1GB_FULL)\n-\t\t\tautoneg_reg |= IXGBE_MII_1GBASE_T_ADVERTISE;\n+\thw->phy.ops.read_reg(hw, IXGBE_MII_AUTONEG_VENDOR_PROVISION_1_REG,\n+\t\t\t MDIO_MMD_AN, &autoneg_reg);\n \n-\t\thw->phy.ops.write_reg(hw,\n-\t\t\t\t IXGBE_MII_AUTONEG_VENDOR_PROVISION_1_REG,\n-\t\t\t\t MDIO_MMD_AN,\n-\t\t\t\t autoneg_reg);\n+\tif (hw->mac.type == ixgbe_mac_X550) {\n+\t\t/* Set or unset auto-negotiation 5G advertisement */\n+\t\tautoneg_reg &= ~IXGBE_MII_5GBASE_T_ADVERTISE;\n+\t\tif ((hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_5GB_FULL) &&\n+\t\t (speed & IXGBE_LINK_SPEED_5GB_FULL))\n+\t\t\tautoneg_reg |= IXGBE_MII_5GBASE_T_ADVERTISE;\n+\n+\t\t/* Set or unset auto-negotiation 2.5G advertisement */\n+\t\tautoneg_reg &= ~IXGBE_MII_2_5GBASE_T_ADVERTISE;\n+\t\tif ((hw->phy.autoneg_advertised &\n+\t\t IXGBE_LINK_SPEED_2_5GB_FULL) &&\n+\t\t (speed & IXGBE_LINK_SPEED_2_5GB_FULL))\n+\t\t\tautoneg_reg |= IXGBE_MII_2_5GBASE_T_ADVERTISE;\n \t}\n \n-\tif (speed & IXGBE_LINK_SPEED_100_FULL) {\n-\t\t/* Set or unset auto-negotiation 100M advertisement */\n-\t\thw->phy.ops.read_reg(hw, MDIO_AN_ADVERTISE,\n-\t\t\t\t MDIO_MMD_AN,\n-\t\t\t\t &autoneg_reg);\n+\t/* Set or unset auto-negotiation 1G advertisement */\n+\tautoneg_reg &= ~IXGBE_MII_1GBASE_T_ADVERTISE;\n+\tif ((hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_1GB_FULL) &&\n+\t (speed & IXGBE_LINK_SPEED_1GB_FULL))\n+\t\tautoneg_reg |= IXGBE_MII_1GBASE_T_ADVERTISE;\n \n-\t\tautoneg_reg &= ~(ADVERTISE_100FULL |\n-\t\t\t\t ADVERTISE_100HALF);\n-\t\tif (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_100_FULL)\n-\t\t\tautoneg_reg |= ADVERTISE_100FULL;\n+\thw->phy.ops.write_reg(hw, IXGBE_MII_AUTONEG_VENDOR_PROVISION_1_REG,\n+\t\t\t MDIO_MMD_AN, autoneg_reg);\n \n-\t\thw->phy.ops.write_reg(hw, MDIO_AN_ADVERTISE,\n-\t\t\t\t MDIO_MMD_AN,\n-\t\t\t\t autoneg_reg);\n-\t}\n+\t/* Set or unset auto-negotiation 100M advertisement */\n+\thw->phy.ops.read_reg(hw, MDIO_AN_ADVERTISE, MDIO_MMD_AN, &autoneg_reg);\n+\n+\tautoneg_reg &= ~(ADVERTISE_100FULL | ADVERTISE_100HALF);\n+\tif ((hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_100_FULL) &&\n+\t (speed & IXGBE_LINK_SPEED_100_FULL))\n+\t\tautoneg_reg |= ADVERTISE_100FULL;\n+\n+\thw->phy.ops.write_reg(hw, MDIO_AN_ADVERTISE, MDIO_MMD_AN, autoneg_reg);\n \n \t/* Blocked by MNG FW so don't reset PHY */\n \tif (ixgbe_check_reset_blocked(hw))\n", "prefixes": [] }