Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/619424/?format=api
{ "id": 619424, "url": "http://patchwork.ozlabs.org/api/patches/619424/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1462563711-30350-1-git-send-email-dvlasenk@redhat.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": "<1462563711-30350-1-git-send-email-dvlasenk@redhat.com>", "list_archive_url": null, "date": "2016-05-06T19:41:51", "name": "e1000e: prevent division by zero if TIMINCA is zero", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "25e7c8c1d89e83c300dbeca042ad07c7e7555468", "submitter": { "id": 11718, "url": "http://patchwork.ozlabs.org/api/people/11718/?format=api", "name": "Denys Vlasenko", "email": "dvlasenk@redhat.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/1462563711-30350-1-git-send-email-dvlasenk@redhat.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/619424/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/619424/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 3r1hxS3Qxzz9snm\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 7 May 2016 05:42:03 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 5A893C0450;\n\tFri, 6 May 2016 19:42:02 +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 p3I-I23nsLcs; Fri, 6 May 2016 19:42:01 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id B3885C046B;\n\tFri, 6 May 2016 19:42:01 +0000 (UTC)", "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 4705A1C11A9\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 6 May 2016 19:42:01 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 3E8243178E\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 6 May 2016 19:42:01 +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 CnwdPYqFsCeL for <intel-wired-lan@lists.osuosl.org>;\n\tFri, 6 May 2016 19:42:00 +0000 (UTC)", "from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\n\tby silver.osuosl.org (Postfix) with ESMTPS id EC5DE2013C\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 6 May 2016 19:41:59 +0000 (UTC)", "from int-mx09.intmail.prod.int.phx2.redhat.com\n\t(int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 2021281105;\n\tFri, 6 May 2016 19:41:59 +0000 (UTC)", "from localhost.localdomain (dhcp-1-129.brq.redhat.com\n\t[10.34.1.129])\n\tby int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with\n\tESMTP id u46JfvDu017311; Fri, 6 May 2016 15:41:57 -0400" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "From": "Denys Vlasenko <dvlasenk@redhat.com>", "To": "Jeff Kirsher <jeffrey.t.kirsher@intel.com>", "Date": "Fri, 6 May 2016 21:41:51 +0200", "Message-Id": "<1462563711-30350-1-git-send-email-dvlasenk@redhat.com>", "X-Scanned-By": "MIMEDefang 2.68 on 10.5.11.22", "Cc": "intel-wired-lan@lists.osuosl.org, Denys Vlasenko <dvlasenk@redhat.com>, \n\tLKML <linux-kernel@vger.kernel.org>, netdev@vger.kernel.org", "Subject": "[Intel-wired-lan] [PATCH] e1000e: prevent division by zero if\n\tTIMINCA is zero", "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": "Users report that under VMWare, er32(TIMINCA) returns zero.\nThis causes division by zero at init time as follows:\n\n ==> incvalue = er32(TIMINCA) & E1000_TIMINCA_INCVALUE_MASK;\n for (i = 0; i < E1000_MAX_82574_SYSTIM_REREADS; i++) {\n /* latch SYSTIMH on read of SYSTIML */\n systim_next = (cycle_t)er32(SYSTIML);\n systim_next |= (cycle_t)er32(SYSTIMH) << 32;\n\n time_delta = systim_next - systim;\n temp = time_delta;\n ====> rem = do_div(temp, incvalue);\n\nThis change makes kernel survive this, and users report that\nNIC does work after this change.\n\nSince on real hardware incvalue is never zero, this should not affect\nreal hardware use case.\n\nSigned-off-by: Denys Vlasenko <dvlasenk@redhat.com>\nCC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>\nCC: \"Ruinskiy, Dima\" <dima.ruinskiy@intel.com>\nCC: intel-wired-lan@lists.osuosl.org\nCC: netdev@vger.kernel.org\nCC: LKML <linux-kernel@vger.kernel.org>\n---\n drivers/net/ethernet/intel/e1000e/netdev.c | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)", "diff": "diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c\nindex 269087c..0626935 100644\n--- a/drivers/net/ethernet/intel/e1000e/netdev.c\n+++ b/drivers/net/ethernet/intel/e1000e/netdev.c\n@@ -4315,7 +4315,8 @@ static cycle_t e1000e_cyclecounter_read(const struct cyclecounter *cc)\n \n \t\t\ttime_delta = systim_next - systim;\n \t\t\ttemp = time_delta;\n-\t\t\trem = do_div(temp, incvalue);\n+\t\t\t/* VMWare users have seen incvalue of zero, don't div / 0 */\n+\t\t\trem = incvalue ? do_div(temp, incvalue) : (time_delta != 0);\n \n \t\t\tsystim = systim_next;\n \n", "prefixes": [] }