diff options
| -rw-r--r-- | drivers/net/natsemi.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c index 5f88200724e6..349b96a3ec4c 100644 --- a/drivers/net/natsemi.c +++ b/drivers/net/natsemi.c | |||
| @@ -2169,6 +2169,14 @@ static int natsemi_poll(struct net_device *dev, int *budget) | |||
| 2169 | dev->name, np->intr_status, | 2169 | dev->name, np->intr_status, |
| 2170 | readl(ioaddr + IntrMask)); | 2170 | readl(ioaddr + IntrMask)); |
| 2171 | 2171 | ||
| 2172 | /* netdev_rx() may read IntrStatus again if the RX state | ||
| 2173 | * machine falls over so do it first. */ | ||
| 2174 | if (np->intr_status & | ||
| 2175 | (IntrRxDone | IntrRxIntr | RxStatusFIFOOver | | ||
| 2176 | IntrRxErr | IntrRxOverrun)) { | ||
| 2177 | netdev_rx(dev, &work_done, work_to_do); | ||
| 2178 | } | ||
| 2179 | |||
| 2172 | if (np->intr_status & | 2180 | if (np->intr_status & |
| 2173 | (IntrTxDone | IntrTxIntr | IntrTxIdle | IntrTxErr)) { | 2181 | (IntrTxDone | IntrTxIntr | IntrTxIdle | IntrTxErr)) { |
| 2174 | spin_lock(&np->lock); | 2182 | spin_lock(&np->lock); |
| @@ -2180,12 +2188,6 @@ static int natsemi_poll(struct net_device *dev, int *budget) | |||
| 2180 | if (np->intr_status & IntrAbnormalSummary) | 2188 | if (np->intr_status & IntrAbnormalSummary) |
| 2181 | netdev_error(dev, np->intr_status); | 2189 | netdev_error(dev, np->intr_status); |
| 2182 | 2190 | ||
| 2183 | if (np->intr_status & | ||
| 2184 | (IntrRxDone | IntrRxIntr | RxStatusFIFOOver | | ||
| 2185 | IntrRxErr | IntrRxOverrun)) { | ||
| 2186 | netdev_rx(dev, &work_done, work_to_do); | ||
| 2187 | } | ||
| 2188 | |||
| 2189 | *budget -= work_done; | 2191 | *budget -= work_done; |
| 2190 | dev->quota -= work_done; | 2192 | dev->quota -= work_done; |
| 2191 | 2193 | ||
