patch-2.4.23 linux-2.4.23/net/atm/clip.c
Next file: linux-2.4.23/net/atm/common.c
Previous file: linux-2.4.23/net/atm/br2684.c
Back to the patch index
Back to the overall index
- Lines: 52
- Date:
2003-11-28 10:26:21.000000000 -0800
- Orig file:
linux-2.4.22/net/atm/clip.c
- Orig date:
2003-08-25 04:44:44.000000000 -0700
diff -urN linux-2.4.22/net/atm/clip.c linux-2.4.23/net/atm/clip.c
@@ -93,6 +93,7 @@
printk(KERN_CRIT "!clip_vcc->entry (clip_vcc %p)\n",clip_vcc);
return;
}
+ spin_lock_bh(&entry->neigh->dev->xmit_lock); /* block clip_start_xmit() */
entry->neigh->used = jiffies;
for (walk = &entry->vccs; *walk; walk = &(*walk)->next)
if (*walk == clip_vcc) {
@@ -102,17 +103,20 @@
clip_vcc->entry = NULL;
if (clip_vcc->xoff)
netif_wake_queue(entry->neigh->dev);
- if (entry->vccs) return;
+ if (entry->vccs)
+ goto out;
entry->expires = jiffies-1;
/* force resolution or expiration */
error = neigh_update(entry->neigh,NULL,NUD_NONE,0,0);
if (error)
printk(KERN_CRIT "unlink_clip_vcc: "
"neigh_update failed with %d\n",error);
- return;
+ goto out;
}
printk(KERN_CRIT "ATMARP: unlink_clip_vcc failed (entry %p, vcc "
"0x%p)\n",entry,clip_vcc);
+out:
+ spin_unlock_bh(&entry->neigh->dev->xmit_lock);
}
@@ -140,8 +144,8 @@
DPRINTK("releasing vcc %p->%p of "
"entry %p\n",clip_vcc,clip_vcc->vcc,
entry);
- atm_async_release_vcc(clip_vcc->vcc,
- -ETIMEDOUT);
+ vcc_release_async(clip_vcc->vcc,
+ -ETIMEDOUT);
}
if (entry->vccs ||
time_before(jiffies, entry->expires)) {
@@ -736,7 +740,8 @@
set_bit(ATM_VF_META,&vcc->flags);
set_bit(ATM_VF_READY,&vcc->flags);
/* allow replies and avoid getting closed if signaling dies */
- bind_vcc(vcc,&atmarpd_dev);
+ vcc->dev = &atmarpd_dev;
+ vcc_insert_socket(vcc->sk);
vcc->push = NULL;
vcc->pop = NULL; /* crash */
vcc->push_oam = NULL; /* crash */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)