Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/689592/?format=api
{ "id": 689592, "url": "http://patchwork.ozlabs.org/api/patches/689592/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1477944749-22822-1-git-send-email-gpiccoli@linux.vnet.ibm.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": "<1477944749-22822-1-git-send-email-gpiccoli@linux.vnet.ibm.com>", "list_archive_url": null, "date": "2016-10-31T20:12:29", "name": "[net] igb: re-assign hw address pointer on reset after PCI error", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "5882f30e12108d3c7c90dee82349daec7f88654e", "submitter": { "id": 67066, "url": "http://patchwork.ozlabs.org/api/people/67066/?format=api", "name": "Guilherme G. Piccoli", "email": "gpiccoli@linux.vnet.ibm.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/1477944749-22822-1-git-send-email-gpiccoli@linux.vnet.ibm.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/689592/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/689592/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 3t75Bf71Gbz9sxS\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 1 Nov 2016 07:12:42 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 420B9C112E;\n\tMon, 31 Oct 2016 20:12:41 +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 wYunCF95sJC4; Mon, 31 Oct 2016 20:12:40 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 9CB4CC1124;\n\tMon, 31 Oct 2016 20:12:40 +0000 (UTC)", "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id BA0001CE773\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 31 Oct 2016 20:12:39 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id B6FC28C453\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 31 Oct 2016 20:12:39 +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 t7Po0kHRyXqz for <intel-wired-lan@lists.osuosl.org>;\n\tMon, 31 Oct 2016 20:12:38 +0000 (UTC)", "from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com\n\t[148.163.156.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id 78A838C410\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 31 Oct 2016 20:12:38 +0000 (UTC)", "from pps.filterd (m0098393.ppops.net [127.0.0.1])\n\tby mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id\n\tu9VK8c0n037919 for <intel-wired-lan@lists.osuosl.org>;\n\tMon, 31 Oct 2016 16:12:37 -0400", "from e24smtp04.br.ibm.com (e24smtp04.br.ibm.com [32.104.18.25])\n\tby mx0a-001b2d01.pphosted.com with ESMTP id 26e91agshh-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 31 Oct 2016 16:12:37 -0400", "from localhost\n\tby e24smtp04.br.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <intel-wired-lan@lists.osuosl.org> from\n\t<gpiccoli@linux.vnet.ibm.com>; Mon, 31 Oct 2016 18:12:35 -0200", "from d24dlp01.br.ibm.com (9.18.248.204)\n\tby e24smtp04.br.ibm.com (10.172.0.140) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tMon, 31 Oct 2016 18:12:32 -0200", "from d24relay01.br.ibm.com (d24relay01.br.ibm.com [9.8.31.16])\n\tby d24dlp01.br.ibm.com (Postfix) with ESMTP id E9371352005C\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 31 Oct 2016 16:12:04 -0400 (EDT)", "from d24av04.br.ibm.com (d24av04.br.ibm.com [9.8.31.97])\n\tby d24relay01.br.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id\n\tu9VKCWk74345946 for <intel-wired-lan@lists.osuosl.org>;\n\tMon, 31 Oct 2016 18:12:32 -0200", "from d24av04.br.ibm.com (localhost [127.0.0.1])\n\tby d24av04.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id\n\tu9VKCVYX026481 for <intel-wired-lan@lists.osuosl.org>;\n\tMon, 31 Oct 2016 18:12:32 -0200", "from localhost ([9.80.226.11])\n\tby d24av04.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id\n\tu9VKCUt5026448; Mon, 31 Oct 2016 18:12:31 -0200" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "From": "\"Guilherme G. Piccoli\" <gpiccoli@linux.vnet.ibm.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Mon, 31 Oct 2016 18:12:29 -0200", "X-Mailer": "git-send-email 2.1.0", "X-TM-AS-MML": "disable", "X-Content-Scanned": "Fidelis XPS MAILER", "x-cbid": "16103120-0028-0000-0000-000001602690", "X-IBM-AV-DETECTION": "SAVI=unused REMOTE=unused XFE=unused", "x-cbparentid": "16103120-0029-0000-0000-000014566D18", "Message-Id": "<1477944749-22822-1-git-send-email-gpiccoli@linux.vnet.ibm.com>", "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2016-10-31_07:, , signatures=0", "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=1\n\tmalwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000\n\tdefinitions=main-1610310354", "Cc": "netdev@vger.kernel.org, gpiccoli@linux.vnet.ibm.com", "Subject": "[Intel-wired-lan] [PATCH net] igb: re-assign hw address pointer on\n\treset after PCI error", "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": "Whenever the igb driver detects the result of a read operation returns\na value composed only by F's (like 0xFFFFFFFF), it will detach the\nnet_device, clear the hw_addr pointer and warn to the user that adapter's\nlink is lost - those steps happen on igb_rd32().\n\nIn case a PCI error happens on Power architecture, there's a recovery\nmechanism called EEH, that will reset the PCI slot and call driver's\nhandlers to reset the adapter and network functionality as well.\n\nWe observed that once hw_addr is NULL after the error is detected on\nigb_rd32(), it's never assigned back, so in the process of resetting\nthe network functionality we got a NULL pointer dereference in both\nigb_configure_tx_ring() and igb_configure_rx_ring(). In order to avoid\nsuch bug, we re-assign the hw_addr value in the beginning of the\nfunction igb_reset(), in case the hw_addr is NULL when we reach that\npath.\n\nReported-by: Anthony H. Thai <ahthai@us.ibm.com>\nReported-by: Harsha Thyagaraja <hathyaga@in.ibm.com>\nSigned-off-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>\n---\n drivers/net/ethernet/intel/igb/igb_main.c | 7 +++++++\n 1 file changed, 7 insertions(+)", "diff": "diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c\nindex edc9a6a..c19119c 100644\n--- a/drivers/net/ethernet/intel/igb/igb_main.c\n+++ b/drivers/net/ethernet/intel/igb/igb_main.c\n@@ -1873,6 +1873,13 @@ void igb_reset(struct igb_adapter *adapter)\n \tstruct e1000_fc_info *fc = &hw->fc;\n \tu32 pba, hwm;\n \n+\t/* In case of PCI error, adapter might have lost its HW\n+\t * address; if we reached this point after an error scenario,\n+\t * we should re-assign the hw_addr based on the saved io_addr.\n+\t */\n+\tif (!hw->hw_addr)\n+\t\thw->hw_addr = adapter->io_addr;\n+\n \t/* Repartition Pba for greater than 9k mtu\n \t * To take effect CTRL.RST is required.\n \t */\n", "prefixes": [ "net" ] }