Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/726017/?format=api
{ "id": 726017, "url": "http://patchwork.ozlabs.org/api/patches/726017/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1486609408-6770-1-git-send-email-yanjun.zhu@oracle.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": "<1486609408-6770-1-git-send-email-yanjun.zhu@oracle.com>", "list_archive_url": null, "date": "2017-02-09T03:03:27", "name": "[1/1] ixgbe: add the external ixgbe fiber transceiver status", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "4e8067cd19f87539ba727e4306d0a82848329a12", "submitter": { "id": 70718, "url": "http://patchwork.ozlabs.org/api/people/70718/?format=api", "name": "Zhu Yanjun", "email": "yanjun.zhu@oracle.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/1486609408-6770-1-git-send-email-yanjun.zhu@oracle.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/726017/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/726017/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 3vJtkc244Dz9s7Z\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 9 Feb 2017 20:56:08 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id D7AD38A338;\n\tThu, 9 Feb 2017 09:56:06 +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 bLvjMHBfeHPh; Thu, 9 Feb 2017 09:56:04 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id C2F0C8A315;\n\tThu, 9 Feb 2017 09:56:03 +0000 (UTC)", "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 9CBF41C0CF8\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 9 Feb 2017 03:03:05 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 95F69307B7\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 9 Feb 2017 03:03:05 +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 Vg10MnumiHU6 for <intel-wired-lan@lists.osuosl.org>;\n\tThu, 9 Feb 2017 03:03:05 +0000 (UTC)", "from aserp1040.oracle.com (aserp1040.oracle.com [141.146.126.69])\n\tby silver.osuosl.org (Postfix) with ESMTPS id D404A30735\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 9 Feb 2017 03:03:04 +0000 (UTC)", "from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74])\n\tby aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with\n\tESMTP id v1932t83021934\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256\n\tverify=OK); Thu, 9 Feb 2017 03:02:55 GMT", "from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235])\n\tby userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id\n\tv1932r13018655\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);\n\tThu, 9 Feb 2017 03:02:54 GMT", "from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12])\n\tby aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id\n\tv1932p3F028435; Thu, 9 Feb 2017 03:02:52 GMT", "from dhcp-cn-10-182-70-94.cn.oracle.com (/10.182.70.94)\n\tby default (Oracle Beehive Gateway v4.0)\n\twith ESMTP ; Wed, 08 Feb 2017 19:02:50 -0800" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "From": "Zhu Yanjun <yanjun.zhu@oracle.com>", "To": "jeffrey.t.kirsher@intel.com, broonie@kernel.org, davem@davemloft.net,\n\tintel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org", "Date": "Wed, 8 Feb 2017 22:03:27 -0500", "Message-Id": "<1486609408-6770-1-git-send-email-yanjun.zhu@oracle.com>", "X-Mailer": "git-send-email 2.7.4", "X-Source-IP": "userv0022.oracle.com [156.151.31.74]", "X-Mailman-Approved-At": "Thu, 09 Feb 2017 09:56:02 +0000", "Subject": "[Intel-wired-lan] [PATCH 1/1] ixgbe: add the external ixgbe fiber\n\ttransceiver status", "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": "When the ixgbe fiber transceiver is external, it is necessary to get\nthe present/absent status of this external ixgbe fiber transceiver.\n\nThe steps to get the present/absent status:\nThe enp1s0f0 is an external ixgbe fiber NIC.\n\nethtool enp1s0f0\n\n...\n Port: FIBRE\n PHYAD: 0\n Transceiver: external(present) <---The transceiver is present.\n Auto-negotiation: on\n Supports Wake-on: d\n...\n\nOr\n...\n Port: FIBRE\n PHYAD: 0\n Transceiver: external(absent) <---The transceiver is absent\n Auto-negotiation: on\n Supports Wake-on: d\n...\n\nSigned-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>\n---\n drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 15 +++++++++++++++\n include/uapi/linux/ethtool.h | 4 ++++\n 2 files changed, 19 insertions(+)", "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c\nindex fd192bf..b3f86f4 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c\n@@ -313,6 +313,21 @@ static int ixgbe_get_settings(struct net_device *netdev,\n \t\tbreak;\n \t}\n \n+\t/* When the tranceiver is external, the following is meaningful.\n+\t * ecmd->reserved[0] has 3 values:\n+\t * 0x0: tranceiver absent\n+\t * 0x4: tranceiver present\n+\t * others: not support\n+\t */\n+\tif (ecmd->port == PORT_FIBRE) {\n+\t\tu32 status = IXGBE_READ_REG(hw, IXGBE_ESDP) & IXGBE_ESDP_SDP2;\n+\n+\t\tif (status == 0x4)\n+\t\t\tecmd->transceiver = XCVR_EXTERNAL_PRESENT;\n+\t\tif (status == 0x0)\n+\t\t\tecmd->transceiver = XCVR_EXTERNAL_ABSENT;\n+\t}\n+\n \t/* Indicate pause support */\n \tecmd->supported |= SUPPORTED_Pause;\n \ndiff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h\nindex 3dc91a4..8e8225a 100644\n--- a/include/uapi/linux/ethtool.h\n+++ b/include/uapi/linux/ethtool.h\n@@ -1541,6 +1541,10 @@ static inline int ethtool_validate_duplex(__u8 duplex)\n #define XCVR_DUMMY2\t\t0x03\n #define XCVR_DUMMY3\t\t0x04\n \n+/* The fiber transceiver status */\n+#define XCVR_EXTERNAL_ABSENT\t0x05\n+#define XCVR_EXTERNAL_PRESENT\t0x06\n+\n /* Enable or disable autonegotiation. */\n #define AUTONEG_DISABLE\t\t0x00\n #define AUTONEG_ENABLE\t\t0x01\n", "prefixes": [ "1/1" ] }