patch-2.0.30 linux/drivers/net/3c59x.c

Next file: linux/drivers/net/Config.in
Previous file: linux/drivers/char/serial.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.29/linux/drivers/net/3c59x.c linux/drivers/net/3c59x.c
@@ -775,15 +775,21 @@
 			/* Issue TX_RESET and TX_START commands. */
 			outw(TxReset, ioaddr + EL3_CMD);
 			for (i = 20; i >= 0 ; i--)
-				if ( ! inw(ioaddr + EL3_STATUS) & CmdInProgress)                                        break;
+				if ( ! inw(ioaddr + EL3_STATUS) & CmdInProgress)
+						break;
 			outw(TxEnable, ioaddr + EL3_CMD);
 			dev->trans_start = jiffies;
 			dev->tbusy = 0;
 			vp->stats.tx_errors++;
 			vp->stats.tx_dropped++;
+			dev_kfree_skb(skb, FREE_WRITE);
 			return 0;			/* Yes, silently *drop* the packet! */
 		}
-		dev->tbusy = 0;
+	}
+
+	if(skb == NULL) {
+		dev_tint(dev);
+		return NULL;
 	}
 
 	/* Block a timer-based transmit from overlapping.  This could better be

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov