get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 484604,
    "url": "http://patchwork.ozlabs.org/api/patches/484604/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1434405656-10465-4-git-send-email-jacob.e.keller@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": "<1434405656-10465-4-git-send-email-jacob.e.keller@intel.com>",
    "list_archive_url": null,
    "date": "2015-06-15T22:00:54",
    "name": "[4/6] fm10k: reset Tx FIFO head and tail pointers as part of reset_work",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "f07952514470e7544d16d3fd744f7c8a87ecc415",
    "submitter": {
        "id": 9784,
        "url": "http://patchwork.ozlabs.org/api/people/9784/?format=api",
        "name": "Jacob Keller",
        "email": "jacob.e.keller@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/1434405656-10465-4-git-send-email-jacob.e.keller@intel.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/484604/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/484604/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 fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ozlabs.org (Postfix) with ESMTP id 78CD914029E\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 16 Jun 2015 08:01:08 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 86E77A3F5C;\n\tMon, 15 Jun 2015 22:01:07 +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 mLZdvW0Jf1ec; Mon, 15 Jun 2015 22:01:06 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id B7D1AA3BB6;\n\tMon, 15 Jun 2015 22:01:06 +0000 (UTC)",
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 74EE31C0E70\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 15 Jun 2015 22:01:05 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 6F6818F0A2\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 15 Jun 2015 22:01:05 +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 YTUnOlKSbHSI for <intel-wired-lan@lists.osuosl.org>;\n\tMon, 15 Jun 2015 22:01:04 +0000 (UTC)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id CAA738C9D9\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 15 Jun 2015 22:01:04 +0000 (UTC)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga103.fm.intel.com with ESMTP; 15 Jun 2015 15:01:04 -0700",
            "from jekeller-desk.amr.corp.intel.com ([134.134.3.85])\n\tby FMSMGA003.fm.intel.com with ESMTP; 15 Jun 2015 15:01:04 -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.13,621,1427785200\"; d=\"scan'208\";a=\"508766650\"",
        "From": "Jacob Keller <jacob.e.keller@intel.com>",
        "To": "Intel Wired LAN <intel-wired-lan@lists.osuosl.org>",
        "Date": "Mon, 15 Jun 2015 15:00:54 -0700",
        "Message-Id": "<1434405656-10465-4-git-send-email-jacob.e.keller@intel.com>",
        "X-Mailer": "git-send-email 2.4.2",
        "In-Reply-To": "<1434405656-10465-1-git-send-email-jacob.e.keller@intel.com>",
        "References": "<1434405656-10465-1-git-send-email-jacob.e.keller@intel.com>",
        "Subject": "[Intel-wired-lan] [PATCH 4/6] fm10k: reset Tx FIFO head and tail\n\tpointers as part of reset_work",
        "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": "This patch fixes a corner case issue with the PF/VF mailbox code.\nCurrently, fm10k_mbx_reset_work clears various state about the\nmailbox. However, it did not clear the Tx FIFO head/tail pointers. Thus,\nwhen the PF finally re-connects (say due to VF reset), it in-advertently\nmight send some previous data in the Tx FIFO again. This was discovered\nby attempting to perform a static VF MAC address assignment on the PF\ndevice. The VF would receive the message and then initiate a reset.\nDuring this process it disconnects and reconnects to the mailbox. If the\nPF doesn't respond fast enough, it may not see the disconnect message,\nand only sees a new connect message. In this flow, it does not properly\nclear the Tx FIFO pointers. Thus, it will re-transmit the last message\nin the Tx FIFO. However, it does not increment the mailbox Tx messages\nbecause it has already reset mbx->pulled and thus does not think it is\nactually sending any data. The fix is to simply reset the Tx FIFO\npointers whenever we call fm10k_mbx_reset_work.\n\nAs a consequence, we no longer need both fm10k_mbx_fifo_drop_all and calls\nto fm10k_mbx_update_max_size with a size of 0.\n\nSigned-off-by: Jacob Keller <jacob.e.keller@intel.com>\n---\n drivers/net/ethernet/intel/fm10k/fm10k_mbx.c | 16 ++--------------\n 1 file changed, 2 insertions(+), 14 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_mbx.c b/drivers/net/ethernet/intel/fm10k/fm10k_mbx.c\nindex 1a4b52637de9..f9016bf8b5b1 100644\n--- a/drivers/net/ethernet/intel/fm10k/fm10k_mbx.c\n+++ b/drivers/net/ethernet/intel/fm10k/fm10k_mbx.c\n@@ -126,18 +126,6 @@ static u16 fm10k_fifo_head_drop(struct fm10k_mbx_fifo *fifo)\n }\n \n /**\n- *  fm10k_fifo_drop_all - Drop all messages in FIFO\n- *  @fifo: pointer to FIFO\n- *\n- *  This function resets the head pointer to drop all messages in the FIFO,\n- *  and ensure the FIFO is empty.\n- **/\n-static void fm10k_fifo_drop_all(struct fm10k_mbx_fifo *fifo)\n-{\n-\tfifo->head = fifo->tail;\n-}\n-\n-/**\n  *  fm10k_mbx_index_len - Convert a head/tail index into a length value\n  *  @mbx: pointer to mailbox\n  *  @head: head index\n@@ -1054,6 +1042,8 @@ static void fm10k_mbx_reset_work(struct fm10k_mbx_info *mbx)\n \tmbx->pulled = 0;\n \tmbx->tail_len = 0;\n \tmbx->head_len = 0;\n+\tmbx->tx.tail = 0;\n+\tmbx->tx.head = 0;\n \tmbx->rx.tail = 0;\n \tmbx->rx.head = 0;\n }\n@@ -1384,7 +1374,6 @@ static void fm10k_mbx_disconnect(struct fm10k_hw *hw,\n \t * drop all left over messages in the FIFO.\n \t */\n \tfm10k_mbx_connect_reset(mbx);\n-\tfm10k_fifo_drop_all(&mbx->tx);\n \n \tfm10k_write_reg(hw, mbx->mbmem_reg, 0);\n }\n@@ -1725,7 +1714,6 @@ static void fm10k_sm_mbx_disconnect(struct fm10k_hw *hw,\n \tmbx->state = FM10K_STATE_CLOSED;\n \tmbx->remote = 0;\n \tfm10k_mbx_reset_work(mbx);\n-\tfm10k_mbx_update_max_size(mbx, 0);\n \n \tfm10k_write_reg(hw, mbx->mbmem_reg, 0);\n }\n",
    "prefixes": [
        "4/6"
    ]
}