Commit d75469d48c05795144f4b8ba76addbb4920a7bba
Committed by
Wolfgang Denk
1 parent
377151c817
Exists in
master
and in
54 other branches
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>
Showing 1 changed file with 14 additions and 0 deletions Side-by-side Diff
drivers/net/rtl8169.c
... | ... | @@ -247,6 +247,15 @@ |
247 | 247 | } rtl_chip_info[] = { |
248 | 248 | {"RTL-8169", 0x00, 0xff7e1880,}, |
249 | 249 | {"RTL-8169", 0x04, 0xff7e1880,}, |
250 | + {"RTL-8169", 0x00, 0xff7e1880,}, | |
251 | + {"RTL-8169s/8110s", 0x02, 0xff7e1880,}, | |
252 | + {"RTL-8169s/8110s", 0x04, 0xff7e1880,}, | |
253 | + {"RTL-8169sb/8110sb", 0x10, 0xff7e1880,}, | |
254 | + {"RTL-8169sc/8110sc", 0x18, 0xff7e1880,}, | |
255 | + {"RTL-8168b/8111sb", 0x30, 0xff7e1880,}, | |
256 | + {"RTL-8168b/8111sb", 0x38, 0xff7e1880,}, | |
257 | + {"RTL-8101e", 0x34, 0xff7e1880,}, | |
258 | + {"RTL-8100e", 0x32, 0xff7e1880,}, | |
250 | 259 | }; |
251 | 260 | |
252 | 261 | enum _DescStatusBit { |
... | ... | @@ -312,6 +321,7 @@ |
312 | 321 | (RX_FIFO_THRESH << RxCfgFIFOShift) | (RX_DMA_BURST << RxCfgDMAShift); |
313 | 322 | |
314 | 323 | static struct pci_device_id supported[] = { |
324 | + {PCI_VENDOR_ID_REALTEK, 0x8167}, | |
315 | 325 | {PCI_VENDOR_ID_REALTEK, 0x8169}, |
316 | 326 | {} |
317 | 327 | }; |
... | ... | @@ -433,6 +443,10 @@ |
433 | 443 | tpc->cur_rx = cur_rx; |
434 | 444 | return 1; |
435 | 445 | |
446 | + } else { | |
447 | + ushort sts = RTL_R8(IntrStatus); | |
448 | + RTL_W8(IntrStatus, sts & ~(TxErr | RxErr | SYSErr)); | |
449 | + udelay(100); /* wait */ | |
436 | 450 | } |
437 | 451 | tpc->cur_rx = cur_rx; |
438 | 452 | return (0); /* initially as this is called to flush the input */ |