Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/667262/?format=api
{ "id": 667262, "url": "http://patchwork.ozlabs.org/api/patches/667262/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1473316048-7598-1-git-send-email-sasha.neftin@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": "<1473316048-7598-1-git-send-email-sasha.neftin@intel.com>", "list_archive_url": null, "date": "2016-09-08T06:27:28", "name": "PCI: disable FLR for 82579 device", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "48d40b9d6680581073e5fe1adb16a50c11fd2c20", "submitter": { "id": 69860, "url": "http://patchwork.ozlabs.org/api/people/69860/?format=api", "name": "Sasha Neftin", "email": "sasha.neftin@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/1473316048-7598-1-git-send-email-sasha.neftin@intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/667262/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/667262/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\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 3sV9P625qPz9ryT\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 8 Sep 2016 16:27:37 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id DB35F89EFE;\n\tThu, 8 Sep 2016 06:27:35 +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 Lt9mn2xoZS4s; Thu, 8 Sep 2016 06:27:34 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 6ABD289EA7;\n\tThu, 8 Sep 2016 06:27:34 +0000 (UTC)", "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 568161C15E1\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 8 Sep 2016 06:27:32 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 4F78B8C943\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 8 Sep 2016 06:27:32 +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 pLaTDLpxX-9V for <intel-wired-lan@lists.osuosl.org>;\n\tThu, 8 Sep 2016 06:27:31 +0000 (UTC)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id 0C1B38C941\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 8 Sep 2016 06:27:30 +0000 (UTC)", "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby fmsmga101.fm.intel.com with ESMTP; 07 Sep 2016 23:27:30 -0700", "from hostname.iil.intel.com (HELO ccdlinuxdev01.iil.intel.com)\n\t([143.185.162.145])\n\tby orsmga002.jf.intel.com with ESMTP; 07 Sep 2016 23:27:30 -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.30,298,1470726000\"; d=\"scan'208\";\n\ta=\"1047165015\"", "From": "Sasha Neftin <sasha.neftin@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Thu, 8 Sep 2016 09:27:28 +0300", "Message-Id": "<1473316048-7598-1-git-send-email-sasha.neftin@intel.com>", "X-Mailer": "git-send-email 1.8.3.1", "Subject": "[Intel-wired-lan] [PATCH] PCI: disable FLR for 82579 device", "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": "82579 has a problem reattaching itself after the device is detached.\nThe bug was reported by Redhat. The suggested fix is to disable\nFLR capability in PCIe configuration space.\n\nReproduction:\nAttach the device to a VM, then detach and try to attach again.\n\nFix:\nDisable FLR capability to prevent the 82579 from hanging.\n\nSigned-off-by: Sasha Neftin <sasha.neftin@intel.com>\n---\n drivers/pci/quirks.c | 21 +++++++++++++++++++++\n 1 file changed, 21 insertions(+)", "diff": "diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c\nindex 37ff015..729ca69 100644\n--- a/drivers/pci/quirks.c\n+++ b/drivers/pci/quirks.c\n@@ -4428,3 +4428,24 @@ static void quirk_intel_qat_vf_cap(struct pci_dev *pdev)\n \t}\n }\n DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x443, quirk_intel_qat_vf_cap);\n+/*\n+ * Workaround FLR issues for 82579\n+ * This code disables the FLR (Function Level Reset) via PCIe, in order\n+ * to workaround a bug found while using device passthrough, where the\n+ * interface would become non-responsive.\n+ * NOTE: the FLR bit is Read/Write Once (RWO) in config space, so if\n+ * the BIOS or kernel writes this register * then this workaround will\n+ * not work.\n+ */\n+static void quirk_intel_flr_cap_dis(struct pci_dev *dev)\n+{\n+\tint pos = pci_find_capability(dev, PCI_CAP_ID_AF);\n+\tif (pos) {\n+\t\tu8 cap;\n+\t\tpci_read_config_byte(dev, pos + PCI_AF_CAP, &cap);\n+\t\tcap = cap & (~PCI_AF_CAP_FLR);\n+\t\tpci_write_config_byte(dev, pos + PCI_AF_CAP, cap);\n+\t}\n+}\n+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1502, quirk_intel_flr_cap_dis);\n+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1503, quirk_intel_flr_cap_dis);\n", "prefixes": [] }