+ natsemi-avoid-intrstatus-lossage-if-rx-state-machine-resets.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     natsemi: avoid IntrStatus lossage if RX state machine resets
has been added to the -mm tree.  Its filename is
     natsemi-avoid-intrstatus-lossage-if-rx-state-machine-resets.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: natsemi: avoid IntrStatus lossage if RX state machine resets
From: Mark Brown <broonie@xxxxxxxxxxxxx>

This patch fixes the poll routine for the natsemi driver so that if the driver
detects an RX state machine lockup then no interrupts will be lost while the
driver recovers from that.

Signed-off-by: Mark Brown <broonie@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/net/natsemi.c |   14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff -puN drivers/net/natsemi.c~natsemi-avoid-intrstatus-lossage-if-rx-state-machine-resets drivers/net/natsemi.c
--- a/drivers/net/natsemi.c~natsemi-avoid-intrstatus-lossage-if-rx-state-machine-resets
+++ a/drivers/net/natsemi.c
@@ -2169,6 +2169,14 @@ static int natsemi_poll(struct net_devic
 			       dev->name, np->intr_status,
 			       readl(ioaddr + IntrMask));
 
+		/* netdev_rx() may read IntrStatus again if the RX state
+		 * machine falls over so do it first. */
+		if (np->intr_status &
+		    (IntrRxDone | IntrRxIntr | RxStatusFIFOOver |
+		     IntrRxErr | IntrRxOverrun)) {
+			netdev_rx(dev, &work_done, work_to_do);
+		}
+
 		if (np->intr_status &
 		    (IntrTxDone | IntrTxIntr | IntrTxIdle | IntrTxErr)) {
 			spin_lock(&np->lock);
@@ -2180,12 +2188,6 @@ static int natsemi_poll(struct net_devic
 		if (np->intr_status & IntrAbnormalSummary)
 			netdev_error(dev, np->intr_status);
 
-		if (np->intr_status &
-		    (IntrRxDone | IntrRxIntr | RxStatusFIFOOver |
-		     IntrRxErr | IntrRxOverrun)) {
-			netdev_rx(dev, &work_done, work_to_do);
-		}
-
 		*budget -= work_done;
 		dev->quota -= work_done;
 
_

Patches currently in -mm which might be from broonie@xxxxxxxxxxxxx are

natsemi-consistently-use-interrupt-enable-disable-functions.patch
natsemi-fix-napi-for-interrupt-sharing.patch
natsemi-avoid-intrstatus-lossage-if-rx-state-machine-resets.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux