From 015d47edba4f94b68383df1144f0614bc18c27df Mon Sep 17 00:00:00 2001 From: Florian Pose Date: Wed, 1 Apr 2009 08:03:08 +0000 Subject: [PATCH] Fixed r8169 frame reception if NAPI is enabled. --- devices/r8169-2.6.24-ethercat.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/devices/r8169-2.6.24-ethercat.c b/devices/r8169-2.6.24-ethercat.c index 8ea9a894..e78eff24 100644 --- a/devices/r8169-2.6.24-ethercat.c +++ b/devices/r8169-2.6.24-ethercat.c @@ -2991,7 +2991,16 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance) 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;