Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/864860/?format=api
{ "id": 864860, "url": "http://patchwork.ozlabs.org/api/patches/864860/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180123102841.9350-1-mika.westerberg@linux.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": "<20180123102841.9350-1-mika.westerberg@linux.intel.com>", "list_archive_url": null, "date": "2018-01-23T10:28:41", "name": "igb: Do not call netif_device_detach() when PCIe link goes missing", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "04b0f3e48e247b94b3a4ebd06f5568502d53d0a6", "submitter": { "id": 14534, "url": "http://patchwork.ozlabs.org/api/people/14534/?format=api", "name": "Mika Westerberg", "email": "mika.westerberg@linux.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/20180123102841.9350-1-mika.westerberg@linux.intel.com/mbox/", "series": [ { "id": 24942, "url": "http://patchwork.ozlabs.org/api/series/24942/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=24942", "date": "2018-01-23T10:28:41", "name": "igb: Do not call netif_device_detach() when PCIe link goes missing", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/24942/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/864860/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/864860/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.136; helo=silver.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "Received": [ "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\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 3zQsZK2jVvz9sBd\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 24 Jan 2018 02:25:44 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 11C572E6FF;\n\tTue, 23 Jan 2018 15:25:43 +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 NKq0KqGmm2WR; Tue, 23 Jan 2018 15:25:42 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 175202E4AF;\n\tTue, 23 Jan 2018 15:25:42 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 5D4691C26A5\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 23 Jan 2018 10:28:48 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 580BA88132\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 23 Jan 2018 10:28:48 +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 UPTS0FpRHBs7 for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 23 Jan 2018 10:28:47 +0000 (UTC)", "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 9A327877A8\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 23 Jan 2018 10:28:47 +0000 (UTC)", "from fmsmga005.fm.intel.com ([10.253.24.32])\n\tby orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t23 Jan 2018 02:28:44 -0800", "from black.fi.intel.com ([10.237.72.28])\n\tby fmsmga005.fm.intel.com with ESMTP; 23 Jan 2018 02:28:43 -0800", "by black.fi.intel.com (Postfix, from userid 1001)\n\tid 3D39E15D; Tue, 23 Jan 2018 12:28:41 +0200 (EET)" ], "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.46,400,1511856000\"; d=\"scan'208\";a=\"197896010\"", "From": "Mika Westerberg <mika.westerberg@linux.intel.com>", "To": "Jeff Kirsher <jeffrey.t.kirsher@intel.com>", "Date": "Tue, 23 Jan 2018 13:28:41 +0300", "Message-Id": "<20180123102841.9350-1-mika.westerberg@linux.intel.com>", "X-Mailer": "git-send-email 2.15.1", "X-Mailman-Approved-At": "Tue, 23 Jan 2018 15:25:41 +0000", "Subject": "[Intel-wired-lan] [PATCH] igb: Do not call netif_device_detach()\n\twhen PCIe link goes missing", "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>", "Cc": "Nikolay Bogoychev <nheart@gmail.com>, intel-wired-lan@lists.osuosl.org, \n\tMika Westerberg <mika.westerberg@linux.intel.com>,\n\tFerenc Boldog <ferenc.boldog@gmail.com>, netdev@vger.kernel.org", "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": "When the driver notices that PCIe link is gone by reading 0xffffffff\nfrom a register it clears hw->hw_addr and then calls netif_device_detach().\nThis happens when the PCIe device is physically unplugged for example\nthe user disconnected the Thunderbolt cable.\n\nHowever, netif_device_detach() prevents netif_unregister() from bringing\nthe device down properly including tearing down MSI-X vectors. This\ntriggers following crash during the driver removal:\n\n igb 0000:0b:00.0 enp11s0f0: PCIe link lost, device now detached\n ------------[ cut here ]------------\n kernel BUG at drivers/pci/msi.c:352!\n invalid opcode: 0000 [#1] PREEMPT SMP PTI\n ...\n Call Trace:\n pci_disable_msix+0xc9/0xf0\n igb_reset_interrupt_capability+0x58/0x60 [igb]\n igb_remove+0x90/0x100 [igb]\n pci_device_remove+0x31/0xa0\n device_release_driver_internal+0x152/0x210\n pci_stop_bus_device+0x78/0xa0\n pci_stop_bus_device+0x38/0xa0\n pci_stop_bus_device+0x38/0xa0\n pci_stop_bus_device+0x26/0xa0\n pci_stop_bus_device+0x38/0xa0\n pci_stop_and_remove_bus_device+0x9/0x20\n trim_stale_devices+0xee/0x130\n ? _raw_spin_unlock_irqrestore+0xf/0x30\n trim_stale_devices+0x8f/0x130\n ? _raw_spin_unlock_irqrestore+0xf/0x30\n trim_stale_devices+0xa1/0x130\n ? get_slot_status+0x8b/0xc0\n acpiphp_check_bridge.part.7+0xf9/0x140\n acpiphp_hotplug_notify+0x170/0x1f0\n ...\n\nTo prevent the crash do not call netif_device_detach() in igb_rd32().\nThis should be fine because hw->hw_addr is set to NULL preventing future\nhardware access of the now missing device.\n\nLink: https://bugzilla.kernel.org/show_bug.cgi?id=198181\nReported-by: Ferenc Boldog <ferenc.boldog@gmail.com>\nReported-by: Nikolay Bogoychev <nheart@gmail.com>\nSigned-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>\n---\n drivers/net/ethernet/intel/igb/igb_main.c | 3 +--\n 1 file changed, 1 insertion(+), 2 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c\nindex c208753ff5b7..b1de866e70b2 100644\n--- a/drivers/net/ethernet/intel/igb/igb_main.c\n+++ b/drivers/net/ethernet/intel/igb/igb_main.c\n@@ -774,8 +774,7 @@ u32 igb_rd32(struct e1000_hw *hw, u32 reg)\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\tnetdev_err(netdev, \"PCIe link lost\\n\");\n \t}\n \n \treturn value;\n", "prefixes": [] }