get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/609769/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 609769,
    "url": "http://patchwork.ozlabs.org/api/patches/609769/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1460503510-33043-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": "<1460503510-33043-1-git-send-email-donald.c.skidmore@intel.com>",
    "list_archive_url": null,
    "date": "2016-04-12T23:25:10",
    "name": "ixgbe: Add work around for empty SFP+ cage crosstalk",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "0bd6cfddf6a16c356f6a7cf7401bf733d3035b5d",
    "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/1460503510-33043-1-git-send-email-donald.c.skidmore@intel.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/609769/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/609769/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\tby ozlabs.org (Postfix) with ESMTP id 3ql1mW1wvcz9t3c\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Apr 2016 08:28:27 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 6469F8B4E6;\n\tTue, 12 Apr 2016 22:28:26 +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 3iMtFfFevGu3; Tue, 12 Apr 2016 22:28:25 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 84AE28B33B;\n\tTue, 12 Apr 2016 22:28:25 +0000 (UTC)",
            "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id E92661C1104\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 12 Apr 2016 22:28:23 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id E327187920\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 12 Apr 2016 22:28:23 +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 Iyczh-F4MSkN for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 12 Apr 2016 22:28:23 +0000 (UTC)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 0D2CA878E2\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 12 Apr 2016 22:28:22 +0000 (UTC)",
            "from fmsmga004.fm.intel.com ([10.253.24.48])\n\tby fmsmga103.fm.intel.com with ESMTP; 12 Apr 2016 15:28:22 -0700",
            "from dcskidmo-m40.jf.intel.com ([134.134.3.25])\n\tby fmsmga004.fm.intel.com with ESMTP; 12 Apr 2016 15:28:22 -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.24,476,1455004800\"; d=\"scan'208\";a=\"83996296\"",
        "From": "Donald C Skidmore <donald.c.skidmore@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Tue, 12 Apr 2016 19:25:10 -0400",
        "Message-Id": "<1460503510-33043-1-git-send-email-donald.c.skidmore@intel.com>",
        "X-Mailer": "git-send-email 2.4.3",
        "Subject": "[Intel-wired-lan] [PATCH] ixgbe: Add work around for empty SFP+\n\tcage crosstalk",
        "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": "It is possible on some systems that crosstalk could lead to link flap\non empty SFP+ cages.  A new NVM bit was defined to let SW know it\nneeds to implement the work around which consists of verifying that\nthere is a module in the cage before acting on the LSC.\n\nSigned-off-by: Don Skidmore <donald.c.skidmore@intel.com>\n---\n drivers/net/ethernet/intel/ixgbe/ixgbe.h      |  2 ++\n drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 39 +++++++++++++++++++++++++++\n drivers/net/ethernet/intel/ixgbe/ixgbe_type.h |  1 +\n 3 files changed, 42 insertions(+)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h\nindex 94e39c1..22cf2a9 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h\n@@ -803,6 +803,8 @@ struct ixgbe_adapter {\n \n #define IXGBE_RSS_KEY_SIZE     40  /* size of RSS Hash Key in bytes */\n \tu32 rss_key[IXGBE_RSS_KEY_SIZE / sizeof(u32)];\n+\n+\tbool need_crosstalk_fix;\n };\n \n static inline u8 ixgbe_max_rss_indices(struct ixgbe_adapter *adapter)\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\nindex 974aa7c..7b99c5b 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n@@ -5573,6 +5573,7 @@ static int ixgbe_sw_init(struct ixgbe_adapter *adapter)\n \tstruct pci_dev *pdev = adapter->pdev;\n \tunsigned int rss, fdir;\n \tu32 fwsm;\n+\tu16 device_caps;\n #ifdef CONFIG_IXGBE_DCB\n \tint j;\n \tstruct tc_configuration *tc;\n@@ -5738,6 +5739,22 @@ static int ixgbe_sw_init(struct ixgbe_adapter *adapter)\n \tadapter->tx_ring_count = IXGBE_DEFAULT_TXD;\n \tadapter->rx_ring_count = IXGBE_DEFAULT_RXD;\n \n+\t/* Cache bit indicating need for crosstalk fix */\n+\tswitch (hw->mac.type) {\n+\tcase ixgbe_mac_82599EB:\n+\tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n+\t\thw->mac.ops.get_device_caps(hw, &device_caps);\n+\t\tif (device_caps & IXGBE_DEVICE_CAPS_NO_CROSSTALK_WR)\n+\t\t\tadapter->need_crosstalk_fix = false;\n+\t\telse\n+\t\t\tadapter->need_crosstalk_fix = true;\n+\t\tbreak;\n+\tdefault:\n+\t\tadapter->need_crosstalk_fix = false;\n+\t\tbreak;\n+\t}\n+\n \t/* set default work limits */\n \tadapter->tx_work_limit = IXGBE_DEFAULT_TX_WORK;\n \n@@ -6660,6 +6677,18 @@ static void ixgbe_watchdog_update_link(struct ixgbe_adapter *adapter)\n \t\tlink_up = true;\n \t}\n \n+\t/* If Crosstalk fix enabled do the sanity check of making sure\n+\t * the SFP+ cage is empty.\n+\t */\n+\tif (adapter->need_crosstalk_fix) {\n+\t\tu32 sfp_cage_full;\n+\n+\t\tsfp_cage_full = IXGBE_READ_REG(hw, IXGBE_ESDP) &\n+\t\t\t\tIXGBE_ESDP_SDP2;\n+\t\tif (ixgbe_is_sfp(hw) && link_up && !sfp_cage_full)\n+\t\t\tlink_up = false;\n+\t}\n+\n \tif (adapter->ixgbe_ieee_pfc)\n \t\tpfc_en |= !!(adapter->ixgbe_ieee_pfc->pfc_en);\n \n@@ -7006,6 +7035,16 @@ static void ixgbe_sfp_detection_subtask(struct ixgbe_adapter *adapter)\n \tstruct ixgbe_hw *hw = &adapter->hw;\n \ts32 err;\n \n+\t/* If crosstalk fix enabled verify the SFP+ cage is full */\n+\tif (adapter->need_crosstalk_fix) {\n+\t\tu32 sfp_cage_full;\n+\n+\t\tsfp_cage_full = IXGBE_READ_REG(hw, IXGBE_ESDP) &\n+\t\t\t\tIXGBE_ESDP_SDP2;\n+\t\tif (!sfp_cage_full)\n+\t\t\treturn;\n+\t}\n+\n \t/* not searching for SFP so there is nothing to do here */\n \tif (!(adapter->flags2 & IXGBE_FLAG2_SEARCH_FOR_SFP) &&\n \t    !(adapter->flags2 & IXGBE_FLAG2_SFP_NEEDS_RESET))\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h\nindex 29a1c42..8e7decb 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h\n@@ -2124,6 +2124,7 @@ enum {\n #define IXGBE_SAN_MAC_ADDR_PORT1_OFFSET  0x3\n #define IXGBE_DEVICE_CAPS_ALLOW_ANY_SFP  0x1\n #define IXGBE_DEVICE_CAPS_FCOE_OFFLOADS  0x2\n+#define IXGBE_DEVICE_CAPS_NO_CROSSTALK_WR\tBIT(7)\n #define IXGBE_FW_LESM_PARAMETERS_PTR     0x2\n #define IXGBE_FW_LESM_STATE_1            0x1\n #define IXGBE_FW_LESM_STATE_ENABLED      0x8000 /* LESM Enable bit */\n",
    "prefixes": []
}