patch-2.3.44 linux/drivers/net/irda/toshoboe.c
Next file: linux/drivers/net/irda/w83977af_ir.c
Previous file: linux/drivers/net/irda/nsc-ircc.c
Back to the patch index
Back to the overall index
- Lines: 81
- Date:
Thu Feb 10 17:07:18 2000
- Orig file:
v2.3.43/linux/drivers/net/irda/toshoboe.c
- Orig date:
Thu Feb 10 17:11:10 2000
diff -u --recursive --new-file v2.3.43/linux/drivers/net/irda/toshoboe.c linux/drivers/net/irda/toshoboe.c
@@ -275,6 +275,8 @@
if ((speed = irda_get_speed(skb)) != self->io.speed)
self->new_speed = speed;
+ netif_stop_queue(dev);
+
if (self->stopped) {
dev_kfree_skb(skb);
return 0;
@@ -318,17 +320,14 @@
self->txpending++;
- /*FIXME: ask about tbusy,media_busy stuff, for the moment */
- /*tbusy means can't queue any more */
+ /*FIXME: ask about busy,media_busy stuff, for the moment */
+ /*busy means can't queue any more */
#ifndef ONETASK
- if (self->txpending == TX_SLOTS)
- {
-#else
+ if (self->txpending != TX_SLOTS)
{
-#endif
- if (irda_lock ((void *) &dev->tbusy) == FALSE)
- return -EBUSY;
+ netif_wake_queue(dev);
}
+#endif
outb_p (0x80, OBOE_RST);
outb_p (1, OBOE_REG_9);
@@ -379,10 +378,8 @@
self->new_speed = 0;
}
- self->netdev->tbusy = 0; /* Unlock */
-
/* Tell network layer that we want more frames */
- mark_bh(NET_BH);
+ netif_wake_queue(self->netdev);
}
if (irqstat & OBOE_ISR_RXDONE)
@@ -529,10 +526,7 @@
toshoboe_initptrs (self);
/* Ready to play! */
- dev->tbusy = 0;
- dev->interrupt = 0;
- dev->start = 1;
-
+ netif_start_queue(dev);
/*
* Open new IrLAP layer instance, now that everything should be
* initialized properly
@@ -559,9 +553,8 @@
self = (struct toshoboe_cb *) dev->priv;
/* Stop device */
- dev->tbusy = 1;
- dev->start = 0;
-
+ netif_stop_queue(dev);
+
/* Stop and remove instance of IrLAP */
if (self->irlap)
irlap_close(self->irlap);
@@ -926,11 +919,7 @@
toshoboe_initptrs (self);
- dev->tbusy = 0;
- dev->interrupt = 0;
- dev->start = 1;
- self->stopped = 0;
-
+ netif_wake_queue(self->netdev);
restore_flags (flags);
printk (KERN_WARNING "ToshOboe: waking up\n");
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)