Commit d78ad8cb authored by Karsten Wiese's avatar Karsten Wiese Committed by David S. Miller

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=460747Signed-off-by: default avatarKarsten Wiese <fzu@wemgehoertderstaat.de>
Signed-off-by: default avatarFrancois Romieu <romieu@fr.zoreil.com>
Tested-by: default avatarJosep <josep.puigdemont@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f9ed8854
...@@ -2075,8 +2075,7 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -2075,8 +2075,7 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
if (!tp->pcie_cap && netif_msg_probe(tp)) if (!tp->pcie_cap && netif_msg_probe(tp))
dev_info(&pdev->dev, "no PCI Express capability\n"); dev_info(&pdev->dev, "no PCI Express capability\n");
/* Unneeded ? Don't mess with Mrs. Murphy. */ RTL_W16(IntrMask, 0x0000);
rtl8169_irq_mask_and_ack(ioaddr);
/* Soft reset the chip. */ /* Soft reset the chip. */
RTL_W8(ChipCmd, CmdReset); RTL_W8(ChipCmd, CmdReset);
...@@ -2088,6 +2087,8 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -2088,6 +2087,8 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
msleep_interruptible(1); msleep_interruptible(1);
} }
RTL_W16(IntrStatus, 0xffff);
/* Identify chip attached to board */ /* Identify chip attached to board */
rtl8169_get_mac_version(tp, ioaddr); rtl8169_get_mac_version(tp, ioaddr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment