Fixed r8169 frame reception if NAPI is enabled.
authorFlorian Pose <fp@igh-essen.com>
Wed, 01 Apr 2009 08:03:08 +0000
changeset 1376 6b51a2201d41
parent 1375 6cf0f0c9e3da
child 1377 79a28afc2bfa
Fixed r8169 frame reception if NAPI is enabled.
devices/r8169-2.6.24-ethercat.c
--- a/devices/r8169-2.6.24-ethercat.c	Thu Mar 19 08:46:45 2009 +0000
+++ b/devices/r8169-2.6.24-ethercat.c	Wed Apr 01 08:03:08 2009 +0000
@@ -2991,7 +2991,16 @@
 			rtl8169_check_link_status(dev, tp, ioaddr);
 
 #ifdef CONFIG_R8169_NAPI
-		if (!tp->ecdev && (status & tp->napi_event)) {
+		if (tp->ecdev) {
+			/* Rx interrupt */
+			if (status & (RxOK | RxOverflow | RxFIFOOver))
+				rtl8169_rx_interrupt(dev, tp, ioaddr, ~(u32)0);
+
+			/* Tx interrupt */
+			if (status & (TxOK | TxErr))
+				rtl8169_tx_interrupt(dev, tp, ioaddr);
+			
+		} else if (status & tp->napi_event) {
 			RTL_W16(IntrMask, tp->intr_event & ~tp->napi_event);
 			tp->intr_mask = ~tp->napi_event;