]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/atm/firestream.c
Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[karo-tx-linux.git] / drivers / atm / firestream.c
index b41c9481b67b94bf8331c9401b18123eb47ffaef..82f2ae0d7cc488a337772aaf8d7a19b3373bcd94 100644 (file)
@@ -736,8 +736,8 @@ static void process_txdone_queue (struct fs_dev *dev, struct queue *q)
       
                        skb = td->skb;
                        if (skb == FS_VCC (ATM_SKB(skb)->vcc)->last_skb) {
-                               wake_up_interruptible (& FS_VCC (ATM_SKB(skb)->vcc)->close_wait);
                                FS_VCC (ATM_SKB(skb)->vcc)->last_skb = NULL;
+                               wake_up_interruptible (& FS_VCC (ATM_SKB(skb)->vcc)->close_wait);
                        }
                        td->dev->ntxpckts--;
 
@@ -1123,7 +1123,7 @@ static void fs_close(struct atm_vcc *atm_vcc)
                   this sleep_on, we'll lose any reference to these packets. Memory leak!
                   On the other hand, it's awfully convenient that we can abort a "close" that
                   is taking too long. Maybe just use non-interruptible sleep on? -- REW */
-               interruptible_sleep_on (& vcc->close_wait);
+               wait_event_interruptible(vcc->close_wait, !vcc->last_skb);
        }
 
        txtp = &atm_vcc->qos.txtp;
@@ -2000,7 +2000,7 @@ static void firestream_remove_one(struct pci_dev *pdev)
 
                fs_dprintk (FS_DEBUG_CLEANUP, "Freeing irq%d.\n", dev->irq);
                free_irq (dev->irq, dev);
-               del_timer (&dev->timer);
+               del_timer_sync (&dev->timer);
 
                atm_dev_deregister(dev->atm_dev);
                free_queue (dev, &dev->hp_txq);