Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 27922b4260f65d317aabda37e42bbbff > files > 3042

kernel-2.6.18-238.el5.src.rpm

From: Ivan Vecera <ivecera@redhat.com>
Date: Thu, 7 May 2009 13:39:58 +0200
Subject: [net] r8169: reset IntrStatus after chip reset
Message-id: 1241696398-15595-1-git-send-email-ivecera@redhat.com
O-Subject: Re: [RHEL5.4 PATCH] r8169: Don't update statistics counters when interface is down
Bugzilla: 500740

Don Zickus wrote:
> On Tue, Apr 28, 2009 at 01:34:39PM -0400, Chuck Ebbert wrote:
>> We probably want this one from 2.6.29-stable too. It fixed a long-standing bug
>> in r8169:
Yes, that's true. While this patch has nothing to do with the topic, but
I see no reason why not attach this small fix.

Ivan

diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index e541aed..a6020dd 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -2052,8 +2052,7 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 	if (!tp->pcie_cap && netif_msg_probe(tp))
 		dev_info(&pdev->dev, "no PCI Express capability\n");
 
-	/* Unneeded ? Don't mess with Mrs. Murphy. */
-	rtl8169_irq_mask_and_ack(ioaddr);
+	RTL_W16(IntrMask, 0x0000);
 
 	/* Soft reset the chip. */
 	RTL_W8(ChipCmd, CmdReset);
@@ -2065,6 +2064,8 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 		msleep_interruptible(1);
 	}
 
+	RTL_W16(IntrStatus, 0xffff);
+
 	/* Identify chip attached to board */
 	rtl8169_get_mac_version(tp, ioaddr);