patch-2.3.44 linux/drivers/net/irda/nsc-ircc.c
Next file: linux/drivers/net/irda/toshoboe.c
Previous file: linux/drivers/net/irda/irtty.c
Back to the patch index
Back to the overall index
- Lines: 120
- Date:
Thu Feb 10 17:07:18 2000
- Orig file:
v2.3.43/linux/drivers/net/irda/nsc-ircc.c
- Orig date:
Thu Feb 10 17:11:10 2000
diff -u --recursive --new-file v2.3.43/linux/drivers/net/irda/nsc-ircc.c linux/drivers/net/irda/nsc-ircc.c
@@ -1033,8 +1033,6 @@
switch_bank(iobase, BANK2);
outb(EXCR2_RFSIZ|EXCR2_TFSIZ, iobase+EXCR2);
- self->netdev->tbusy = 0;
-
/* Enable some interrupts so we can receive frames */
switch_bank(iobase, BANK0);
if (speed > 115200) {
@@ -1050,6 +1048,8 @@
/* Restore BSR */
outb(bank, iobase+BSR);
+ netif_wake_queue(dev);
+
}
/*
@@ -1072,10 +1072,8 @@
iobase = self->io.fir_base;
- /* Lock transmit buffer */
- if (irda_lock((void *) &dev->tbusy) == FALSE)
- return -EBUSY;
-
+ netif_stop_queue(dev);
+
/* Check if we need to change the speed */
if ((speed = irda_get_speed(skb)) != self->io.speed)
self->new_speed = speed;
@@ -1118,10 +1116,8 @@
self = (struct nsc_ircc_cb *) dev->priv;
iobase = self->io.fir_base;
- /* Lock transmit buffer */
- if (irda_lock((void *) &dev->tbusy) == FALSE)
- return -EBUSY;
-
+ netif_stop_queue(dev);
+
/* Check if we need to change the speed */
if ((speed = irda_get_speed(skb)) != self->io.speed)
self->new_speed = speed;
@@ -1199,7 +1195,7 @@
out:
/* Not busy transmitting anymore if window is not full */
if (self->tx_fifo.free < MAX_TX_WINDOW)
- dev->tbusy = 0;
+ netif_wake_queue(self->netdev);
/* Restore bank register */
outb(bank, iobase+BSR);
@@ -1347,10 +1343,8 @@
/* Make sure we have room for more frames */
if (self->tx_fifo.free < MAX_TX_WINDOW) {
/* Not busy transmitting anymore */
- self->netdev->tbusy = 0;
-
/* Tell the network layer, that we can accept more frames */
- mark_bh(NET_BH);
+ netif_wake_queue(self->netdev);
}
/* Restore bank */
@@ -1601,11 +1595,9 @@
if (self->tx_buff.len > 0)
self->ier = IER_TXLDL_IE;
else {
- self->netdev->tbusy = 0; /* Unlock */
- self->stats.tx_packets++;
-
- mark_bh(NET_BH);
+ self->stats.tx_packets++;
+ netif_wakeup_queue(self->netdev);
self->ier = IER_TXEMP_IE;
}
@@ -1731,7 +1723,6 @@
self = (struct nsc_ircc_cb *) dev->priv;
spin_lock(&self->lock);
- dev->interrupt = 1;
iobase = self->io.fir_base;
@@ -1754,7 +1745,6 @@
outb(self->ier, iobase+IER); /* Restore interrupts */
outb(bsr, iobase+BSR); /* Restore bank register */
- dev->interrupt = 0;
spin_unlock(&self->lock);
}
@@ -1860,10 +1850,9 @@
outb(bank, iobase+BSR);
/* 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
@@ -1895,9 +1884,8 @@
ASSERT(self != NULL, return 0;);
/* 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);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)