patch-2.4.3 linux/drivers/net/tokenring/smctr.c
Next file: linux/drivers/net/tokenring/tms380tr.c
Previous file: linux/drivers/net/tokenring/olympic.h
Back to the patch index
Back to the overall index
- Lines: 46
- Date:
Tue Mar 20 12:05:00 2001
- Orig file:
v2.4.2/linux/drivers/net/tokenring/smctr.c
- Orig date:
Wed Feb 21 18:20:29 2001
diff -u --recursive --new-file v2.4.2/linux/drivers/net/tokenring/smctr.c linux/drivers/net/tokenring/smctr.c
@@ -4383,7 +4383,7 @@
smctr_clear_trc_reset(ioaddr);
mdelay(200); /* ~2 ms */
- /* Remove any latched interrupts that occured prior to reseting the
+ /* Remove any latched interrupts that occurred prior to reseting the
* adapter or possibily caused by line glitches due to the reset.
*/
outb(tp->trc_mask | CSR_CLRTINT | CSR_CLRCBUSY, ioaddr + CSR);
@@ -4546,20 +4546,24 @@
struct sk_buff *skb;
skb = dev_alloc_skb(rx_size);
- skb_put(skb, rx_size);
+ if (skb) {
+ skb_put(skb, rx_size);
- memcpy(skb->data, pbuff, rx_size);
- sti();
+ memcpy(skb->data, pbuff, rx_size);
+ sti();
- /* Update Counters */
- tp->MacStat.rx_packets++;
- tp->MacStat.rx_bytes += skb->len;
-
- /* Kick the packet on up. */
- skb->dev = dev;
- skb->protocol = tr_type_trans(skb, dev);
- netif_rx(skb);
- dev->last_rx = jiffies;
+ /* Update Counters */
+ tp->MacStat.rx_packets++;
+ tp->MacStat.rx_bytes += skb->len;
+
+ /* Kick the packet on up. */
+ skb->dev = dev;
+ skb->protocol = tr_type_trans(skb, dev);
+ netif_rx(skb);
+ dev->last_rx = jiffies;
+ } else {
+ sti();
+ }
}
else
smctr_process_rx_packet((MAC_HEADER *)pbuff,
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)