Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/540139/?format=api
{ "id": 540139, "url": "http://patchwork.ozlabs.org/api/patches/540139/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/2113406542.305783.1446575849467.JavaMail.zimbra@xes-inc.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": "<2113406542.305783.1446575849467.JavaMail.zimbra@xes-inc.com>", "list_archive_url": null, "date": "2015-11-03T18:37:29", "name": "[4/5] igb: Explicitly label self-test result indices", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "2bbec71c840aba03c329685db85805b5fb9cbee5", "submitter": { "id": 10211, "url": "http://patchwork.ozlabs.org/api/people/10211/?format=api", "name": "Aaron Sierra", "email": "asierra@xes-inc.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/2113406542.305783.1446575849467.JavaMail.zimbra@xes-inc.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/540139/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/540139/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\tby ozlabs.org (Postfix) with ESMTP id 0E5E01413DB\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 5 Nov 2015 05:59:33 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 5A88093973;\n\tWed, 4 Nov 2015 18:59:32 +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 irltRugfieiJ; Wed, 4 Nov 2015 18:59:29 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id CECE7939D8;\n\tWed, 4 Nov 2015 18:59:26 +0000 (UTC)", "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id 964831C15DE\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 3 Nov 2015 19:34:26 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 92562841A0\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 3 Nov 2015 19:34:26 +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 dP77O85xytxQ for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 3 Nov 2015 19:34:24 +0000 (UTC)", "from xes-mad.com (xes-mad.com [216.165.139.218])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id 1443E84218\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 3 Nov 2015 19:34:24 +0000 (UTC)", "from zimbra.xes-mad.com (zimbra.xes-mad.com [10.52.0.127])\n\tby xes-mad.com (8.13.8/8.13.8) with ESMTP id tA3IbTjN028504;\n\tTue, 3 Nov 2015 12:37:29 -0600" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "from auto-whitelisted by SQLgrey-1.7.6", "Date": "Tue, 3 Nov 2015 12:37:29 -0600 (CST)", "From": "Aaron Sierra <asierra@xes-inc.com>", "To": "Jeff Kirsher <jeffrey.t.kirsher@intel.com>,\n\tintel-wired-lan@lists.osuosl.org", "Message-ID": "<2113406542.305783.1446575849467.JavaMail.zimbra@xes-inc.com>", "In-Reply-To": "<1888067736.304762.1446575427308.JavaMail.zimbra@xes-inc.com>", "MIME-Version": "1.0", "X-Originating-IP": "[10.52.16.65]", "X-Mailer": "Zimbra 8.0.6_GA_5922 (ZimbraWebClient - FF40 (Linux)/8.0.6_GA_5922)", "Thread-Topic": "Explicitly label self-test result indices", "Thread-Index": "M2PGRTRzWMmuTFRgCgU0+UZuJ/VpMg==", "X-Mailman-Approved-At": "Wed, 04 Nov 2015 18:59:25 +0000", "Cc": "Joe Schultz <jschultz@xes-inc.com>", "Subject": "[Intel-wired-lan] [PATCH 4/5] igb: Explicitly label self-test\n\tresult indices", "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": "From: Joe Schultz <jschultz@xes-inc.com>\n\nPreviously, the ethtool self-test gstrings/data arrays were accessed via\nhardcoded indices, which made the code difficult to follow. This patch\nreplaces the hardcoded values with enum-based labels.\n\nSigned-off-by: Joe Schultz <jschultz@xes-inc.com>\nSigned-off-by: Aaron Sierra <asierra@xes-inc.com>\n---\n drivers/net/ethernet/intel/igb/igb_ethtool.c | 38 ++++++++++++++++++----------\n 1 file changed, 24 insertions(+), 14 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c\nindex 7426276..f5da885 100644\n--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c\n+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c\n@@ -127,10 +127,20 @@ static const struct igb_stats igb_gstrings_net_stats[] = {\n #define IGB_STATS_LEN \\\n \t(IGB_GLOBAL_STATS_LEN + IGB_NETDEV_STATS_LEN + IGB_QUEUE_STATS_LEN)\n \n+enum igb_diagnostics_results {\n+\tTEST_REG = 0,\n+\tTEST_EEP,\n+\tTEST_IRQ,\n+\tTEST_LOOP,\n+\tTEST_LINK\n+};\n+\n static const char igb_gstrings_test[][ETH_GSTRING_LEN] = {\n-\t\"Register test (offline)\", \"Eeprom test (offline)\",\n-\t\"Interrupt test (offline)\", \"Loopback test (offline)\",\n-\t\"Link test (on/offline)\"\n+\t[TEST_REG] = \"Register test (offline)\",\n+\t[TEST_EEP] = \"Eeprom test (offline)\",\n+\t[TEST_IRQ] = \"Interrupt test (offline)\",\n+\t[TEST_LOOP] = \"Loopback test (offline)\",\n+\t[TEST_LINK] = \"Link test (on/offline)\"\n };\n #define IGB_TEST_LEN (sizeof(igb_gstrings_test) / ETH_GSTRING_LEN)\n \n@@ -2006,7 +2016,7 @@ static void igb_diag_test(struct net_device *netdev,\n \t\t/* Link test performed before hardware reset so autoneg doesn't\n \t\t * interfere with test result\n \t\t */\n-\t\tif (igb_link_test(adapter, &data[4]))\n+\t\tif (igb_link_test(adapter, &data[TEST_LINK]))\n \t\t\teth_test->flags |= ETH_TEST_FL_FAILED;\n \n \t\tif (if_running)\n@@ -2015,21 +2025,21 @@ static void igb_diag_test(struct net_device *netdev,\n \t\telse\n \t\t\tigb_reset(adapter);\n \n-\t\tif (igb_reg_test(adapter, &data[0]))\n+\t\tif (igb_reg_test(adapter, &data[TEST_REG]))\n \t\t\teth_test->flags |= ETH_TEST_FL_FAILED;\n \n \t\tigb_reset(adapter);\n-\t\tif (igb_eeprom_test(adapter, &data[1]))\n+\t\tif (igb_eeprom_test(adapter, &data[TEST_EEP]))\n \t\t\teth_test->flags |= ETH_TEST_FL_FAILED;\n \n \t\tigb_reset(adapter);\n-\t\tif (igb_intr_test(adapter, &data[2]))\n+\t\tif (igb_intr_test(adapter, &data[TEST_IRQ]))\n \t\t\teth_test->flags |= ETH_TEST_FL_FAILED;\n \n \t\tigb_reset(adapter);\n \t\t/* power up link for loopback test */\n \t\tigb_power_up_link(adapter);\n-\t\tif (igb_loopback_test(adapter, &data[3]))\n+\t\tif (igb_loopback_test(adapter, &data[TEST_LOOP]))\n \t\t\teth_test->flags |= ETH_TEST_FL_FAILED;\n \n \t\t/* restore speed, duplex, autoneg settings */\n@@ -2049,16 +2059,16 @@ static void igb_diag_test(struct net_device *netdev,\n \t\tdev_info(&adapter->pdev->dev, \"online testing starting\\n\");\n \n \t\t/* PHY is powered down when interface is down */\n-\t\tif (if_running && igb_link_test(adapter, &data[4]))\n+\t\tif (if_running && igb_link_test(adapter, &data[TEST_LINK]))\n \t\t\teth_test->flags |= ETH_TEST_FL_FAILED;\n \t\telse\n-\t\t\tdata[4] = 0;\n+\t\t\tdata[TEST_LINK] = 0;\n \n \t\t/* Online tests aren't run; pass by default */\n-\t\tdata[0] = 0;\n-\t\tdata[1] = 0;\n-\t\tdata[2] = 0;\n-\t\tdata[3] = 0;\n+\t\tdata[TEST_REG] = 0;\n+\t\tdata[TEST_EEP] = 0;\n+\t\tdata[TEST_IRQ] = 0;\n+\t\tdata[TEST_LOOP] = 0;\n \n \t\tclear_bit(__IGB_TESTING, &adapter->state);\n \t}\n", "prefixes": [ "4/5" ] }