diff options
author | Karsten Wiese <fzu@wemgehoertderstaat.de> | 2009-04-02 04:06:01 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-02 04:06:01 -0400 |
commit | d78ad8cbfe73ad568de38814a75e9c92ad0a907c (patch) | |
tree | 510031f2bcfc8f9f3617dde6a25f2780b0e9c618 /drivers/net/r8169.c | |
parent | f9ed88549e2ec73922b788e3865282d221233662 (diff) |
r8169: reset IntrStatus after chip reset
Original comment (Karsten):
On a MSI MS-6702E mainboard, when in rtl8169_init_one() for the first time
after BIOS has run, IntrStatus reads 5 after chip has been reset.
IntrStatus should equal 0 there, so patch changes IntrStatus reset to happen
after chip reset instead of before.
Remark (Francois):
Assuming that the loglevel of the driver is increased above NETIF_MSG_INTR,
the bug reveals itself with a typical "interrupt 0025 in poll" message
at startup. In retrospect, the message should had been read as an hint of
an unexpected hardware state several months ago :o(
Fixes (at least part of) https://bugzilla.redhat.com/show_bug.cgi?id=460747
Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Tested-by: Josep <josep.puigdemont@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/r8169.c')
-rw-r--r-- | drivers/net/r8169.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 06c535222666..e1a638a05f86 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -2075,8 +2075,7 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2075 | if (!tp->pcie_cap && netif_msg_probe(tp)) | 2075 | if (!tp->pcie_cap && netif_msg_probe(tp)) |
2076 | dev_info(&pdev->dev, "no PCI Express capability\n"); | 2076 | dev_info(&pdev->dev, "no PCI Express capability\n"); |
2077 | 2077 | ||
2078 | /* Unneeded ? Don't mess with Mrs. Murphy. */ | 2078 | RTL_W16(IntrMask, 0x0000); |
2079 | rtl8169_irq_mask_and_ack(ioaddr); | ||
2080 | 2079 | ||
2081 | /* Soft reset the chip. */ | 2080 | /* Soft reset the chip. */ |
2082 | RTL_W8(ChipCmd, CmdReset); | 2081 | RTL_W8(ChipCmd, CmdReset); |
@@ -2088,6 +2087,8 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2088 | msleep_interruptible(1); | 2087 | msleep_interruptible(1); |
2089 | } | 2088 | } |
2090 | 2089 | ||
2090 | RTL_W16(IntrStatus, 0xffff); | ||
2091 | |||
2091 | /* Identify chip attached to board */ | 2092 | /* Identify chip attached to board */ |
2092 | rtl8169_get_mac_version(tp, ioaddr); | 2093 | rtl8169_get_mac_version(tp, ioaddr); |
2093 | 2094 | ||