diff options
author | Nobuhiro Iwamatsu <iwamatsu@nigauri.org> | 2008-03-08 09:25:49 +0900 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-03-08 10:59:27 +0100 |
commit | d75469d48c05795144f4b8ba76addbb4920a7bba (patch) | |
tree | c0b158a978cdea74d118f2b0c376130062451b08 /drivers/net | |
parent | 377151c8173ee64cfc3fdfb545b366c36d8ce3b2 (diff) | |
download | u-boot-d75469d48c05795144f4b8ba76addbb4920a7bba.zip u-boot-d75469d48c05795144f4b8ba76addbb4920a7bba.tar.gz u-boot-d75469d48c05795144f4b8ba76addbb4920a7bba.tar.bz2 |
net: rtl8169: Add processing when OWNbit did't enable in rtl_recv()
When rtl_recv() of rtl8169 is called, OWNbit of status register
is not enable occasionally.
rtl_recv() doesn't work normally when the driver doesn't do
appropriate processing.
This patch fix this problem.
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/rtl8169.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c index d71323f..d39ac7c 100644 --- a/drivers/net/rtl8169.c +++ b/drivers/net/rtl8169.c @@ -247,6 +247,15 @@ static struct { } rtl_chip_info[] = { {"RTL-8169", 0x00, 0xff7e1880,}, {"RTL-8169", 0x04, 0xff7e1880,}, + {"RTL-8169", 0x00, 0xff7e1880,}, + {"RTL-8169s/8110s", 0x02, 0xff7e1880,}, + {"RTL-8169s/8110s", 0x04, 0xff7e1880,}, + {"RTL-8169sb/8110sb", 0x10, 0xff7e1880,}, + {"RTL-8169sc/8110sc", 0x18, 0xff7e1880,}, + {"RTL-8168b/8111sb", 0x30, 0xff7e1880,}, + {"RTL-8168b/8111sb", 0x38, 0xff7e1880,}, + {"RTL-8101e", 0x34, 0xff7e1880,}, + {"RTL-8100e", 0x32, 0xff7e1880,}, }; enum _DescStatusBit { @@ -312,6 +321,7 @@ static const unsigned int rtl8169_rx_config = (RX_FIFO_THRESH << RxCfgFIFOShift) | (RX_DMA_BURST << RxCfgDMAShift); static struct pci_device_id supported[] = { + {PCI_VENDOR_ID_REALTEK, 0x8167}, {PCI_VENDOR_ID_REALTEK, 0x8169}, {} }; @@ -433,6 +443,10 @@ static int rtl_recv(struct eth_device *dev) tpc->cur_rx = cur_rx; return 1; + } else { + ushort sts = RTL_R8(IntrStatus); + RTL_W8(IntrStatus, sts & ~(TxErr | RxErr | SYSErr)); + udelay(100); /* wait */ } tpc->cur_rx = cur_rx; return (0); /* initially as this is called to flush the input */ |