diff options
Diffstat (limited to 'drivers/atm/nicstar.c')
-rw-r--r-- | drivers/atm/nicstar.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c index 9587e959ce1..9988ac98b6d 100644 --- a/drivers/atm/nicstar.c +++ b/drivers/atm/nicstar.c @@ -639,9 +639,9 @@ static int ns_init_card(int i, struct pci_dev *pcidev) card->hbnr.init = NUM_HB; card->hbnr.max = MAX_HB; - card->sm_handle = 0x00000000; + card->sm_handle = NULL; card->sm_addr = 0x00000000; - card->lg_handle = 0x00000000; + card->lg_handle = NULL; card->lg_addr = 0x00000000; card->efbie = 1; /* To prevent push_rxbufs from enabling the interrupt */ @@ -979,7 +979,7 @@ static void push_rxbufs(ns_dev * card, struct sk_buff *skb) addr2 = card->sm_addr; handle2 = card->sm_handle; card->sm_addr = 0x00000000; - card->sm_handle = 0x00000000; + card->sm_handle = NULL; } else { /* (!sm_addr) */ card->sm_addr = addr1; @@ -993,7 +993,7 @@ static void push_rxbufs(ns_dev * card, struct sk_buff *skb) addr2 = card->lg_addr; handle2 = card->lg_handle; card->lg_addr = 0x00000000; - card->lg_handle = 0x00000000; + card->lg_handle = NULL; } else { /* (!lg_addr) */ card->lg_addr = addr1; @@ -1739,10 +1739,10 @@ static int push_scqe(ns_dev * card, vc_map * vc, scq_info * scq, ns_scqe * tbd, } scq->full = 1; - spin_unlock_irqrestore(&scq->lock, flags); - interruptible_sleep_on_timeout(&scq->scqfull_waitq, - SCQFULL_TIMEOUT); - spin_lock_irqsave(&scq->lock, flags); + wait_event_interruptible_lock_irq_timeout(scq->scqfull_waitq, + scq->tail != scq->next, + scq->lock, + SCQFULL_TIMEOUT); if (scq->full) { spin_unlock_irqrestore(&scq->lock, flags); @@ -1789,10 +1789,10 @@ static int push_scqe(ns_dev * card, vc_map * vc, scq_info * scq, ns_scqe * tbd, scq->full = 1; if (has_run++) break; - spin_unlock_irqrestore(&scq->lock, flags); - interruptible_sleep_on_timeout(&scq->scqfull_waitq, - SCQFULL_TIMEOUT); - spin_lock_irqsave(&scq->lock, flags); + wait_event_interruptible_lock_irq_timeout(scq->scqfull_waitq, + scq->tail != scq->next, + scq->lock, + SCQFULL_TIMEOUT); } if (!scq->full) { |