get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 951447,
    "url": "http://patchwork.ozlabs.org/api/patches/951447/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180731161600.75051-1-sebastianx.basierski@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": "<20180731161600.75051-1-sebastianx.basierski@intel.com>",
    "list_archive_url": null,
    "date": "2018-07-31T16:16:00",
    "name": "ixgbe: fix driver behaviour after issuing VFLR",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "7bc5bfe9dd9c6841e10ee44b54d63a296fe336f2",
    "submitter": {
        "id": 74580,
        "url": "http://patchwork.ozlabs.org/api/people/74580/?format=api",
        "name": "Sebastian Basierski",
        "email": "sebastianx.basierski@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/20180731161600.75051-1-sebastianx.basierski@intel.com/mbox/",
    "series": [
        {
            "id": 58462,
            "url": "http://patchwork.ozlabs.org/api/series/58462/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=58462",
            "date": "2018-07-31T16:16:00",
            "name": "ixgbe: fix driver behaviour after issuing VFLR",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/58462/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/951447/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/951447/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;\n\tdmarc=fail (p=none dis=none) header.from=intel.com"
        ],
        "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 41fnvH6xc8z9s2g\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 31 Jul 2018 17:22:19 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 20B0687C81;\n\tTue, 31 Jul 2018 07:22:18 +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 iR1IaR2JH4PY; Tue, 31 Jul 2018 07:22:17 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 797A887C66;\n\tTue, 31 Jul 2018 07:22:17 +0000 (UTC)",
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 9F9B51C0521\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 31 Jul 2018 07:22:16 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 9BDA186C0C\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 31 Jul 2018 07:22:16 +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 VoXxCH2B54wQ for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 31 Jul 2018 07:22:16 +0000 (UTC)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id 22E6F86940\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 31 Jul 2018 07:22:16 +0000 (UTC)",
            "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t31 Jul 2018 00:22:15 -0700",
            "from ubuntu.imu.intel.com ([10.217.246.11])\n\tby orsmga005.jf.intel.com with ESMTP; 31 Jul 2018 00:22:13 -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-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,426,1526367600\"; d=\"scan'208\";a=\"244728923\"",
        "From": "Sebastian Basierski <sebastianx.basierski@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Tue, 31 Jul 2018 18:16:00 +0200",
        "Message-Id": "<20180731161600.75051-1-sebastianx.basierski@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "Subject": "[Intel-wired-lan] [PATCH] ixgbe: fix driver behaviour after issuing\n\tVFLR",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.24",
        "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>",
        "MIME-Version": "1.0",
        "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": "Since VFLR doesn't clear VFMBMEM (VF Mailbox Memory)\nand is not re-enabling queues correctly we should fix\nthis behavior.\n\nSigned-off-by: Sebastian Basierski <sebastianx.basierski@intel.com>\n---\n .../net/ethernet/intel/ixgbe/ixgbe_sriov.c    | 26 +++++++++++++++++++\n drivers/net/ethernet/intel/ixgbe/ixgbe_type.h |  1 +\n 2 files changed, 27 insertions(+)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c\nindex 6f59933cdff7..2bc4fe475f28 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c\n@@ -688,8 +688,13 @@ static int ixgbe_set_vf_macvlan(struct ixgbe_adapter *adapter,\n static inline void ixgbe_vf_reset_event(struct ixgbe_adapter *adapter, u32 vf)\n {\n \tstruct ixgbe_hw *hw = &adapter->hw;\n+\tstruct ixgbe_ring_feature *vmdq = &adapter->ring_feature[RING_F_VMDQ];\n \tstruct vf_data_storage *vfinfo = &adapter->vfinfo[vf];\n+\tu32 q_per_pool = __ALIGN_MASK(1, ~vmdq->mask);\n \tu8 num_tcs = adapter->hw_tcs;\n+\tu32 reg_val;\n+\tu32 queue;\n+\tu32 word;\n \n \t/* remove VLAN filters beloning to this VF */\n \tixgbe_clear_vf_vlans(adapter, vf);\n@@ -726,6 +731,27 @@ static inline void ixgbe_vf_reset_event(struct ixgbe_adapter *adapter, u32 vf)\n \n \t/* reset VF api back to unknown */\n \tadapter->vfinfo[vf].vf_api = ixgbe_mbox_api_10;\n+\n+\t/* Restart each queue for given VF */\n+\tfor (queue = 0; queue < q_per_pool; queue++) {\n+\t\tunsigned int reg_idx = (vf * q_per_pool) + queue;\n+\n+\t\treg_val = IXGBE_READ_REG(hw, IXGBE_PVFTXDCTL(reg_idx));\n+\n+\t\t/* Re-enabling only configured queues */\n+\t\tif (reg_val) {\n+\t\t\treg_val |= IXGBE_TXDCTL_ENABLE;\n+\t\t\tIXGBE_WRITE_REG(hw, IXGBE_PVFTXDCTL(reg_idx), reg_val);\n+\t\t\treg_val &= ~IXGBE_TXDCTL_ENABLE;\n+\t\t\tIXGBE_WRITE_REG(hw, IXGBE_PVFTXDCTL(reg_idx), reg_val);\n+\t\t}\n+\t}\n+\n+\t/* Clear VF's mailbox memory */\n+\tfor (word = 0; word < IXGBE_VFMAILBOX_SIZE; word++)\n+\t\tIXGBE_WRITE_REG_ARRAY(hw, IXGBE_PFMBMEM(vf), word, 0);\n+\n+\tIXGBE_WRITE_FLUSH(hw);\n }\n \n static int ixgbe_set_vf_mac(struct ixgbe_adapter *adapter,\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h\nindex 44cfb2021145..41bcbb337e83 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h\n@@ -2518,6 +2518,7 @@ enum {\n /* Translated register #defines */\n #define IXGBE_PVFTDH(P)\t\t(0x06010 + (0x40 * (P)))\n #define IXGBE_PVFTDT(P)\t\t(0x06018 + (0x40 * (P)))\n+#define IXGBE_PVFTXDCTL(P)\t(0x06028 + (0x40 * (P)))\n #define IXGBE_PVFTDWBAL(P)\t(0x06038 + (0x40 * (P)))\n #define IXGBE_PVFTDWBAH(P)\t(0x0603C + (0x40 * (P)))\n \n",
    "prefixes": []
}