Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/949/?format=api
{ "id": 949, "url": "http://patchwork.ozlabs.org/api/patches/949/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/200809222110.m8MLAMDB029897@imap1.linux-foundation.org/", "project": { "id": 7, "url": "http://patchwork.ozlabs.org/api/projects/7/?format=api", "name": "Linux network development", "link_name": "netdev", "list_id": "netdev.vger.kernel.org", "list_email": "netdev@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<200809222110.m8MLAMDB029897@imap1.linux-foundation.org>", "list_archive_url": null, "date": "2008-09-22T21:10:22", "name": "[for,2.6.27?,08/10] r8169: fix RxMissed register access", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "8e049682f939f7f2b123588c7f140df80f9ceda0", "submitter": { "id": 107, "url": "http://patchwork.ozlabs.org/api/people/107/?format=api", "name": "Andrew Morton", "email": "akpm@linux-foundation.org" }, "delegate": { "id": 36, "url": "http://patchwork.ozlabs.org/api/users/36/?format=api", "username": "jgarzik", "first_name": "Jeff", "last_name": "Garzik", "email": "jgarzik@pobox.com" }, "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/200809222110.m8MLAMDB029897@imap1.linux-foundation.org/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/949/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/949/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<netdev-owner@vger.kernel.org>", "X-Original-To": "patchwork-incoming@ozlabs.org", "Delivered-To": "patchwork-incoming@ozlabs.org", "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.176.167])\n\tby ozlabs.org (Postfix) with ESMTP id 98FEDDDEFF\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 23 Sep 2008 07:16:55 +1000 (EST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1754390AbYIVVQn (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 22 Sep 2008 17:16:43 -0400", "(majordomo@vger.kernel.org) by vger.kernel.org id S1754381AbYIVVQn\n\t(ORCPT <rfc822; netdev-outgoing>); Mon, 22 Sep 2008 17:16:43 -0400", "from smtp1.linux-foundation.org ([140.211.169.13]:52309 \"EHLO\n\tsmtp1.linux-foundation.org\" rhost-flags-OK-OK-OK-OK)\n\tby vger.kernel.org with ESMTP id S1754359AbYIVVQm (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Mon, 22 Sep 2008 17:16:42 -0400", "from imap1.linux-foundation.org (imap1.linux-foundation.org\n\t[140.211.169.55])\n\tby smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with\n\tESMTP id m8MLDDuL014806\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);\n\tMon, 22 Sep 2008 14:15:24 -0700", "from localhost.localdomain (localhost [127.0.0.1])\n\tby imap1.linux-foundation.org\n\t(8.13.5.20060308/8.13.5/Debian-3ubuntu1.1) with ESMTP id\n\tm8MLAMDB029897; Mon, 22 Sep 2008 14:10:22 -0700" ], "Message-Id": "<200809222110.m8MLAMDB029897@imap1.linux-foundation.org>", "Subject": "[patch for 2.6.27? 08/10] r8169: fix RxMissed register access", "To": "jeff@garzik.org", "Cc": "netdev@vger.kernel.org, akpm@linux-foundation.org,\n\tromieu@fr.zoreil.com, edward_hsu@realtek.com.tw,\n\tivecera@redhat.com, stable@kernel.org", "From": "akpm@linux-foundation.org", "Date": "Mon, 22 Sep 2008 14:10:22 -0700", "X-Spam-Status": "No, hits=-3.358 required=5 tests=AWL, BAYES_00,\n\tOSDL_HEADER_SUBJECT_BRACKETED", "X-Spam-Checker-Version": "SpamAssassin 3.2.4-osdl_revision__1.47__", "X-MIMEDefang-Filter": "lf$Revision: 1.188 $", "X-Scanned-By": "MIMEDefang 2.63 on 140.211.169.13", "Sender": "netdev-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<netdev.vger.kernel.org>", "X-Mailing-List": "netdev@vger.kernel.org" }, "content": "From: Francois Romieu <romieu@fr.zoreil.com>\n\n- the register is defined for the 8169 chipset only and there is\n no 8169 beyond RTL_GIGA_MAC_VER_06.\n- only the lower 3 bytes of the register are valid\n\nFixes:\n1. http://bugzilla.kernel.org/show_bug.cgi?id=10180\n2. http://bugzilla.kernel.org/show_bug.cgi?id=11062 (bits of)\n\nTested by Hermann Gausterer and Adam Huffman.\n\nSigned-off-by: Francois Romieu <romieu@fr.zoreil.com>\nCc: Edward Hsu <edward_hsu@realtek.com.tw>\nCc: Jeff Garzik <jeff@garzik.org>\nTested-by: Ivan Vecera <ivecera@redhat.com>\nCc: <stable@kernel.org>\t\t[2.6.25.x, 2.6.26.x]\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\n---\n\n drivers/net/r8169.c | 25 ++++++++++++++-----------\n 1 file changed, 14 insertions(+), 11 deletions(-)", "diff": "diff -puN drivers/net/r8169.c~r8169-fix-rxmissed-register-access drivers/net/r8169.c\n--- a/drivers/net/r8169.c~r8169-fix-rxmissed-register-access\n+++ a/drivers/net/r8169.c\n@@ -2286,8 +2286,6 @@ static void rtl_hw_start_8168(struct net\n \n \tRTL_R8(IntrMask);\n \n-\tRTL_W32(RxMissed, 0);\n-\n \trtl_set_rx_mode(dev);\n \n \tRTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb);\n@@ -2412,8 +2410,6 @@ static void rtl_hw_start_8101(struct net\n \n \tRTL_R8(IntrMask);\n \n-\tRTL_W32(RxMissed, 0);\n-\n \trtl_set_rx_mode(dev);\n \n \tRTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb);\n@@ -3191,6 +3187,17 @@ static int rtl8169_poll(struct napi_stru\n \treturn work_done;\n }\n \n+static void rtl8169_rx_missed(struct net_device *dev, void __iomem *ioaddr)\n+{\n+\tstruct rtl8169_private *tp = netdev_priv(dev);\n+\n+\tif (tp->mac_version > RTL_GIGA_MAC_VER_06)\n+\t\treturn;\n+\n+\tdev->stats.rx_missed_errors += (RTL_R32(RxMissed) & 0xffffff);\n+\tRTL_W32(RxMissed, 0);\n+}\n+\n static void rtl8169_down(struct net_device *dev)\n {\n \tstruct rtl8169_private *tp = netdev_priv(dev);\n@@ -3208,9 +3215,7 @@ core_down:\n \n \trtl8169_asic_down(ioaddr);\n \n-\t/* Update the error counts. */\n-\tdev->stats.rx_missed_errors += RTL_R32(RxMissed);\n-\tRTL_W32(RxMissed, 0);\n+\trtl8169_rx_missed(dev, ioaddr);\n \n \tspin_unlock_irq(&tp->lock);\n \n@@ -3332,8 +3337,7 @@ static struct net_device_stats *rtl8169_\n \n \tif (netif_running(dev)) {\n \t\tspin_lock_irqsave(&tp->lock, flags);\n-\t\tdev->stats.rx_missed_errors += RTL_R32(RxMissed);\n-\t\tRTL_W32(RxMissed, 0);\n+\t\trtl8169_rx_missed(dev, ioaddr);\n \t\tspin_unlock_irqrestore(&tp->lock, flags);\n \t}\n \n@@ -3358,8 +3362,7 @@ static int rtl8169_suspend(struct pci_de\n \n \trtl8169_asic_down(ioaddr);\n \n-\tdev->stats.rx_missed_errors += RTL_R32(RxMissed);\n-\tRTL_W32(RxMissed, 0);\n+\trtl8169_rx_missed(dev, ioaddr);\n \n \tspin_unlock_irq(&tp->lock);\n \n", "prefixes": [ "for", "2.6.27?", "08/10" ] }