patch-2.4.22 linux-2.4.22/drivers/atm/idt77252.c
Next file: linux-2.4.22/drivers/atm/iphase.c
Previous file: linux-2.4.22/drivers/atm/horizon.c
Back to the patch index
Back to the overall index
- Lines: 38
- Date:
2003-08-25 04:44:41.000000000 -0700
- Orig file:
linux-2.4.21/drivers/atm/idt77252.c
- Orig date:
2003-06-13 07:51:32.000000000 -0700
diff -urN linux-2.4.21/drivers/atm/idt77252.c linux-2.4.22/drivers/atm/idt77252.c
@@ -1988,7 +1988,7 @@
return -EINVAL;
}
- if (ATM_SKB(skb)->iovcnt != 0) {
+ if (skb_shinfo(skb)->nr_frags != 0) {
printk("%s: No scatter-gather yet.\n", card->name);
atomic_inc(&vcc->stats->tx_err);
dev_kfree_skb(skb);
@@ -2025,8 +2025,7 @@
atomic_inc(&vcc->stats->tx_err);
return -ENOMEM;
}
- atomic_add(skb->truesize + ATM_PDU_OVHD, &vcc->sk->wmem_alloc);
- ATM_SKB(skb)->iovcnt = 0;
+ atomic_add(skb->truesize, &vcc->sk->wmem_alloc);
memcpy(skb_put(skb, 52), cell, 52);
@@ -2405,8 +2404,10 @@
static int
idt77252_find_vcc(struct atm_vcc *vcc, short *vpi, int *vci)
{
+ unsigned long flags;
struct atm_vcc *walk;
+ spin_lock_irqsave(&vcc->dev->lock, flags);
if (*vpi == ATM_VPI_ANY) {
*vpi = 0;
walk = vcc->dev->vccs;
@@ -2433,6 +2434,7 @@
}
}
+ spin_unlock_irqrestore(&vcc->dev->lock, flags);
return 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)