get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 589298,
    "url": "http://patchwork.ozlabs.org/api/patches/589298/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20160226215708.15005.5114.stgit@htfujina-fc.jf.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": "<20160226215708.15005.5114.stgit@htfujina-fc.jf.intel.com>",
    "list_archive_url": null,
    "date": "2016-02-26T21:57:08",
    "name": "igb: simplify check for all F for surprise removal",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": false,
    "hash": "3bfd6e953604d8251676b1a1d8afd3bb644c9b97",
    "submitter": {
        "id": 29211,
        "url": "http://patchwork.ozlabs.org/api/people/29211/?format=api",
        "name": "Fujinaka, Todd",
        "email": "todd.fujinaka@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/20160226215708.15005.5114.stgit@htfujina-fc.jf.intel.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/589298/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/589298/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 silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ozlabs.org (Postfix) with ESMTP id 9D09914030F\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 27 Feb 2016 08:57:56 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 74DA431E8B;\n\tFri, 26 Feb 2016 21:57:55 +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 tKbhLrKP150c; Fri, 26 Feb 2016 21:57:54 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 41B772DFFE;\n\tFri, 26 Feb 2016 21:57:54 +0000 (UTC)",
            "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 9B0901C0CB7\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 26 Feb 2016 21:57:53 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 9399831C50\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 26 Feb 2016 21:57:53 +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 3udMsgIwR6a0 for <intel-wired-lan@lists.osuosl.org>;\n\tFri, 26 Feb 2016 21:57:53 +0000 (UTC)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby silver.osuosl.org (Postfix) with ESMTP id 0B0CC2DFFE\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 26 Feb 2016 21:57:53 +0000 (UTC)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby orsmga101.jf.intel.com with ESMTP; 26 Feb 2016 13:57:54 -0800",
            "from htfujina-fc.jf.intel.com ([134.134.145.124])\n\tby fmsmga001.fm.intel.com with ESMTP; 26 Feb 2016 13:57:52 -0800"
        ],
        "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.22,505,1449561600\"; d=\"scan'208\";a=\"912118239\"",
        "From": "Todd Fujinaka <todd.fujinaka@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Fri, 26 Feb 2016 13:57:08 -0800",
        "Message-ID": "<20160226215708.15005.5114.stgit@htfujina-fc.jf.intel.com>",
        "User-Agent": "StGit/0.17.1-dirty",
        "MIME-Version": "1.0",
        "Subject": "[Intel-wired-lan] [PATCH] igb: simplify check for all F for\n\tsurprise removal",
        "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": "The previous check appears to be delaying problems by doing multiple\nreads. Also, we've found that having igbvf in the host and vm and using\ndirect-assign returns all F's on the STATUS register and we can't use\nthat as an error condition. Since the VLAN Ether Type register\n(E1000_VET) has a hard-coded return value of 0x8100, check that register\nfor all Fs instead.\n\nSigned-off-by: Todd Fujinaka <todd.fujinaka@intel.com>\n---\n drivers/net/ethernet/intel/igb/igb_main.c |   23 ++++++++++++++++-------\n 1 file changed, 16 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c\nindex a1d9b05..e932763 100644\n--- a/drivers/net/ethernet/intel/igb/igb_main.c\n+++ b/drivers/net/ethernet/intel/igb/igb_main.c\n@@ -763,9 +763,22 @@ static void igb_cache_ring_register(struct igb_adapter *adapter)\n \t}\n }\n \n-u32 igb_rd32(struct e1000_hw *hw, u32 reg)\n+static void igb_check_remove(struct e1000_hw *hw, u32 reg, u8 __iomem *hw_addr)\n {\n \tstruct igb_adapter *igb = container_of(hw, struct igb_adapter, hw);\n+\n+\t/* E1000_VET is always 0x8100 and can't be all F's */\n+\tif ((reg == E1000_VET) || (!(~readl(&hw_addr[E1000_VET])))) {\n+\t\tstruct net_device *netdev = igb->netdev;\n+\n+\t\thw->hw_addr = NULL;\n+\t\tnetif_device_detach(netdev);\n+\t\tnetdev_err(netdev, \"PCIe link lost, device now detached\\n\");\n+\t}\n+}\n+\n+u32 igb_rd32(struct e1000_hw *hw, u32 reg)\n+{\n \tu8 __iomem *hw_addr = ACCESS_ONCE(hw->hw_addr);\n \tu32 value = 0;\n \n@@ -775,12 +788,8 @@ u32 igb_rd32(struct e1000_hw *hw, u32 reg)\n \tvalue = readl(&hw_addr[reg]);\n \n \t/* reads should not return all F's */\n-\tif (!(~value) && (!reg || !(~readl(hw_addr)))) {\n-\t\tstruct net_device *netdev = igb->netdev;\n-\t\thw->hw_addr = NULL;\n-\t\tnetif_device_detach(netdev);\n-\t\tnetdev_err(netdev, \"PCIe link lost, device now detached\\n\");\n-\t}\n+\tif (unlikely(!(~value)))\n+\t\tigb_check_remove(hw, reg, hw_addr);\n \n \treturn value;\n }\n",
    "prefixes": []
}