get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1133787,
    "url": "http://patchwork.ozlabs.org/api/patches/1133787/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190718175202.14909-1-maurosr@linux.vnet.ibm.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": "<20190718175202.14909-1-maurosr@linux.vnet.ibm.com>",
    "list_archive_url": null,
    "date": "2019-07-18T17:52:02",
    "name": "i40e: Check if transceiver implements DDM before access",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "d4c43fe8624984c3cedd6eaf1f0202539f6b6be8",
    "submitter": {
        "id": 71608,
        "url": "http://patchwork.ozlabs.org/api/people/71608/?format=api",
        "name": "Mauro S. M. Rodrigues",
        "email": "maurosr@linux.vnet.ibm.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/20190718175202.14909-1-maurosr@linux.vnet.ibm.com/mbox/",
    "series": [
        {
            "id": 120239,
            "url": "http://patchwork.ozlabs.org/api/series/120239/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=120239",
            "date": "2019-07-18T17:52:02",
            "name": "i40e: Check if transceiver implements DDM before access",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/120239/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1133787/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1133787/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@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"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.133; helo=hemlock.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org; dmarc=none (p=none dis=none)\n\theader.from=linux.vnet.ibm.com"
        ],
        "Received": [
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 45qMCq38Dtz9s3l\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 19 Jul 2019 03:52:21 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 7BE4B8836C;\n\tThu, 18 Jul 2019 17:52:19 +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 AB6SDZMSEuHp; Thu, 18 Jul 2019 17:52:18 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id E6B9988277;\n\tThu, 18 Jul 2019 17:52:18 +0000 (UTC)",
            "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 5ED4C1BF841\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 18 Jul 2019 17:52:18 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 5AEB8227B1\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 18 Jul 2019 17:52:18 +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 3KTNCVgDEakz for <intel-wired-lan@lists.osuosl.org>;\n\tThu, 18 Jul 2019 17:52:17 +0000 (UTC)",
            "from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com\n\t[148.163.158.5])\n\tby silver.osuosl.org (Postfix) with ESMTPS id 9F16B20113\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 18 Jul 2019 17:52:17 +0000 (UTC)",
            "from pps.filterd (m0098413.ppops.net [127.0.0.1])\n\tby mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id\n\tx6IHlpiU028992; Thu, 18 Jul 2019 13:52:11 -0400",
            "from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com\n\t[169.62.189.11])\n\tby mx0b-001b2d01.pphosted.com with ESMTP id 2ttvbbu0g6-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256\n\tverify=NOT); Thu, 18 Jul 2019 13:52:11 -0400",
            "from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1])\n\tby ppma03dal.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id\n\tx6IHpMSd009559; Thu, 18 Jul 2019 17:52:10 GMT",
            "from b01cxnp23034.gho.pok.ibm.com (b01cxnp23034.gho.pok.ibm.com\n\t[9.57.198.29]) by ppma03dal.us.ibm.com with ESMTP id 2tq6x7s3w8-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256\n\tverify=NOT); Thu, 18 Jul 2019 17:52:10 +0000",
            "from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com\n\t[9.57.199.110])\n\tby b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP\n\tid x6IHqA2K55443760\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256\n\tverify=OK); Thu, 18 Jul 2019 17:52:10 GMT",
            "from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 2110BAE05F;\n\tThu, 18 Jul 2019 17:52:10 +0000 (GMT)",
            "from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id E8CA9AE060;\n\tThu, 18 Jul 2019 17:52:09 +0000 (GMT)",
            "from localhost (unknown [9.18.239.187])\n\tby b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP;\n\tThu, 18 Jul 2019 17:52:09 +0000 (GMT)"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "From": "\"Mauro S. M. Rodrigues\" <maurosr@linux.vnet.ibm.com>",
        "To": "intel-wired-lan@lists.osuosl.org,\n\tJeff Kirsher <jeffrey.t.kirsher@intel.com>",
        "Date": "Thu, 18 Jul 2019 14:52:02 -0300",
        "Message-Id": "<20190718175202.14909-1-maurosr@linux.vnet.ibm.com>",
        "X-Mailer": "git-send-email 2.21.0",
        "MIME-Version": "1.0",
        "X-TM-AS-GCONF": "00",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:, ,\n\tdefinitions=2019-07-18_08:, , signatures=0",
        "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n\tpriorityscore=1501\n\tmalwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0\n\tclxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0\n\tmlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx\n\tscancount=1 engine=8.0.1-1810050000 definitions=main-1907180185",
        "Subject": "[Intel-wired-lan] [PATCH] i40e: Check if transceiver implements DDM\n\tbefore access",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>",
        "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>",
        "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>",
        "Cc": "wangyugui@e16-tech.com",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "intel-wired-lan-bounces@osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"
    },
    "content": "Similar to the ixgbe issue fixed in:\n655c91414579 (\"ixgbe: Check DDM existence in transceiver before access)\n\ni40e has the same issue when reading eeprom from SFP's module that comply\nwith SFF-8472 but not implement the Digital Diagnostic Monitoring (DDM)\ninterface described in it. The existence of such area is specified by bit\n6 of byte 92, set to 1 if implemented.\n\nWithout this patch, due to not checking this bit i40e fails to read SFP\nmodule's eeprom with the follow message:\n\nethtool -m enP51p1s0f0\nCannot get Module EEPROM data: Input/output error\n\nBecause it fails to read the additional 256 bytes in which it was assumed\nto exist the DDM data.\n\nSigned-off-by: \"Mauro S. M. Rodrigues\" <maurosr@linux.vnet.ibm.com>\n---\n drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 6 ++++++\n drivers/net/ethernet/intel/i40e/i40e_type.h    | 1 +\n 2 files changed, 7 insertions(+)",
    "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c\nindex 527eb52c5401..e456e2122fea 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c\n@@ -5123,6 +5123,12 @@ static int i40e_get_module_info(struct net_device *netdev,\n \t\t\t/* Module is not SFF-8472 compliant */\n \t\t\tmodinfo->type = ETH_MODULE_SFF_8079;\n \t\t\tmodinfo->eeprom_len = ETH_MODULE_SFF_8079_LEN;\n+\t\t} else if (!(sff8472_swap & I40E_MODULE_SFF_DDM_IMPLEMENTED)) {\n+\t\t\t/* Module is SFF-8472 compliant but doesn't implemend Digital Diagnostic\n+\t\t\t * Monitoring (DDM).\n+\t\t\t */\n+\t\t\tmodinfo->type = ETH_MODULE_SFF_8079;\n+\t\t\tmodinfo->eeprom_len = ETH_MODULE_SFF_8079_LEN;\n \t\t} else {\n \t\t\tmodinfo->type = ETH_MODULE_SFF_8472;\n \t\t\tmodinfo->eeprom_len = ETH_MODULE_SFF_8472_LEN;\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_type.h b/drivers/net/ethernet/intel/i40e/i40e_type.h\nindex 8f43aa47c263..2a6219d66771 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_type.h\n+++ b/drivers/net/ethernet/intel/i40e/i40e_type.h\n@@ -443,6 +443,7 @@ struct i40e_nvm_access {\n #define I40E_MODULE_SFF_8472_COMP\t0x5E\n #define I40E_MODULE_SFF_8472_SWAP\t0x5C\n #define I40E_MODULE_SFF_ADDR_MODE\t0x04\n+#define I40E_MODULE_SFF_DDM_IMPLEMENTED 0x40\n #define I40E_MODULE_TYPE_QSFP_PLUS\t0x0D\n #define I40E_MODULE_TYPE_QSFP28\t\t0x11\n #define I40E_MODULE_QSFP_MAX_LEN\t640\n",
    "prefixes": []
}