Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/660199/?format=api
{ "id": 660199, "url": "http://patchwork.ozlabs.org/api/patches/660199/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1471457517-28904-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": "<1471457517-28904-1-git-send-email-donald.c.skidmore@intel.com>", "list_archive_url": null, "date": "2016-08-17T18:11:57", "name": "ixgbe: Fix led interface for X557 devices.", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "a4367a1f6652455b338bc1bf96aa854cf2b2788f", "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/1471457517-28904-1-git-send-email-donald.c.skidmore@intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/660199/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/660199/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 3sDwnv2NlLz9t2S\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 18 Aug 2016 03:14:42 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 8EC1F8A4CB;\n\tWed, 17 Aug 2016 17:14:40 +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 O9MEaNV7Zo6P; Wed, 17 Aug 2016 17:14:40 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 0AD358A4BC;\n\tWed, 17 Aug 2016 17:14:40 +0000 (UTC)", "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 267621C220E\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 17 Aug 2016 17:14:38 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 2143430AEC\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 17 Aug 2016 17:14:38 +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 Ef5MULQkKGJ5 for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 17 Aug 2016 17:14:37 +0000 (UTC)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby silver.osuosl.org (Postfix) with ESMTP id 30F9A2E401\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 17 Aug 2016 17:14:37 +0000 (UTC)", "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga102.fm.intel.com with ESMTP; 17 Aug 2016 10:14:36 -0700", "from dcskidmo-m40.jf.intel.com ([134.134.3.25])\n\tby FMSMGA003.fm.intel.com with ESMTP; 17 Aug 2016 10:14:37 -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,529,1464678000\"; d=\"scan'208\";a=\"750022440\"", "From": "Donald C Skidmore <donald.c.skidmore@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Wed, 17 Aug 2016 14:11:57 -0400", "Message-Id": "<1471457517-28904-1-git-send-email-donald.c.skidmore@intel.com>", "X-Mailer": "git-send-email 2.4.3", "Subject": "[Intel-wired-lan] [PATCH] ixgbe: Fix led interface for X557 devices.", "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": "The X557 devices use a different interface to the LED for the port.\nThis patch reflect that change.\n\nSigned-off-by: Don Skidmore <donald.c.skidmore@intel.com>\n---\n drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 3 ++\n drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 52 +++++++++++++++++++++++++--\n 2 files changed, 53 insertions(+), 2 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h\nindex 5ff91b8..a59b65f7 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h\n@@ -1830,6 +1830,9 @@ enum {\n #define IXGBE_LED_IVRT(_i) IXGBE_LED_OFFSET(IXGBE_LED_IVRT_BASE, _i)\n #define IXGBE_LED_BLINK(_i) IXGBE_LED_OFFSET(IXGBE_LED_BLINK_BASE, _i)\n #define IXGBE_LED_MODE_MASK(_i) IXGBE_LED_OFFSET(IXGBE_LED_MODE_MASK_BASE, _i)\n+#define IXGBE_X557_LED_MANUAL_SET_MASK\tBIT(8)\n+#define IXGBE_X557_MAX_LED_INDEX\t3\n+#define IXGBE_X557_LED_PROVISIONING\t0xC430\n \n /* LED modes */\n #define IXGBE_LED_LINK_UP 0x0\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c\nindex 4716ca4..45ad6b1 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c\n@@ -2114,6 +2114,50 @@ static s32 ixgbe_reset_phy_t_X550em(struct ixgbe_hw *hw)\n \treturn ixgbe_enable_lasi_ext_t_x550em(hw);\n }\n \n+/**\n+ * ixgbe_led_on_t_x550em - Turns on the software controllable LEDs.\n+ * @hw: pointer to hardware structure\n+ * @led_idx: led number to turn on\n+ **/\n+s32 ixgbe_led_on_t_x550em(struct ixgbe_hw *hw, u32 led_idx)\n+{\n+\tu16 phy_data;\n+\n+\tif (led_idx >= IXGBE_X557_MAX_LED_INDEX)\n+\t\treturn IXGBE_ERR_PARAM;\n+\n+\t/* To turn on the LED, set mode to ON. */\n+\thw->phy.ops.read_reg(hw, IXGBE_X557_LED_PROVISIONING + led_idx,\n+\t\t\t IXGBE_MDIO_VENDOR_SPECIFIC_1_DEV_TYPE, &phy_data);\n+\tphy_data |= IXGBE_X557_LED_MANUAL_SET_MASK;\n+\thw->phy.ops.write_reg(hw, IXGBE_X557_LED_PROVISIONING + led_idx,\n+\t\t\t IXGBE_MDIO_VENDOR_SPECIFIC_1_DEV_TYPE, phy_data);\n+\n+\treturn 0;\n+}\n+\n+/**\n+ * ixgbe_led_off_t_x550em - Turns off the software controllable LEDs.\n+ * @hw: pointer to hardware structure\n+ * @led_idx: led number to turn off\n+ **/\n+s32 ixgbe_led_off_t_x550em(struct ixgbe_hw *hw, u32 led_idx)\n+{\n+\tu16 phy_data;\n+\n+\tif (led_idx >= IXGBE_X557_MAX_LED_INDEX)\n+\t\treturn IXGBE_ERR_PARAM;\n+\n+\t/* To turn on the LED, set mode to ON. */\n+\thw->phy.ops.read_reg(hw, IXGBE_X557_LED_PROVISIONING + led_idx,\n+\t\t\t IXGBE_MDIO_VENDOR_SPECIFIC_1_DEV_TYPE, &phy_data);\n+\tphy_data &= ~IXGBE_X557_LED_MANUAL_SET_MASK;\n+\thw->phy.ops.write_reg(hw, IXGBE_X557_LED_PROVISIONING + led_idx,\n+\t\t\t IXGBE_MDIO_VENDOR_SPECIFIC_1_DEV_TYPE, phy_data);\n+\n+\treturn 0;\n+}\n+\n /** ixgbe_get_lcd_x550em - Determine lowest common denominator\n * @hw: pointer to hardware structure\n * @lcd_speed: pointer to lowest common link speed\n@@ -2853,8 +2897,6 @@ static s32 ixgbe_write_phy_reg_x550a(struct ixgbe_hw *hw, u32 reg_addr,\n \t.write_analog_reg8\t\t= NULL, \\\n \t.set_rxpba\t\t\t= &ixgbe_set_rxpba_generic, \\\n \t.check_link\t\t\t= &ixgbe_check_mac_link_generic, \\\n-\t.led_on\t\t\t\t= &ixgbe_led_on_generic, \\\n-\t.led_off\t\t\t= &ixgbe_led_off_generic, \\\n \t.blink_led_start\t\t= &ixgbe_blink_led_start_X540, \\\n \t.blink_led_stop\t\t\t= &ixgbe_blink_led_stop_X540, \\\n \t.set_rar\t\t\t= &ixgbe_set_rar_generic, \\\n@@ -2886,6 +2928,8 @@ static s32 ixgbe_write_phy_reg_x550a(struct ixgbe_hw *hw, u32 reg_addr,\n \n static const struct ixgbe_mac_operations mac_ops_X550 = {\n \tX550_COMMON_MAC\n+\t.led_on\t\t\t= ixgbe_led_on_generic,\n+\t.led_off\t\t= ixgbe_led_off_generic,\n \t.reset_hw\t\t= &ixgbe_reset_hw_X540,\n \t.get_media_type\t\t= &ixgbe_get_media_type_X540,\n \t.get_san_mac_addr\t= &ixgbe_get_san_mac_addr_generic,\n@@ -2904,6 +2948,8 @@ static const struct ixgbe_mac_operations mac_ops_X550 = {\n \n static const struct ixgbe_mac_operations mac_ops_X550EM_x = {\n \tX550_COMMON_MAC\n+\t.led_on\t\t\t= ixgbe_led_on_t_x550em,\n+\t.led_off\t\t= ixgbe_led_off_t_x550em,\n \t.reset_hw\t\t= &ixgbe_reset_hw_X550em,\n \t.get_media_type\t\t= &ixgbe_get_media_type_X550em,\n \t.get_san_mac_addr\t= NULL,\n@@ -2922,6 +2968,8 @@ static const struct ixgbe_mac_operations mac_ops_X550EM_x = {\n \n static struct ixgbe_mac_operations mac_ops_x550em_a = {\n \tX550_COMMON_MAC\n+\t.led_on\t\t\t= ixgbe_led_on_t_x550em,\n+\t.led_off\t\t= ixgbe_led_off_t_x550em,\n \t.reset_hw\t\t= ixgbe_reset_hw_X550em,\n \t.get_media_type\t\t= ixgbe_get_media_type_X550em,\n \t.get_san_mac_addr\t= NULL,\n", "prefixes": [] }