aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/atm
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2014-02-27 13:51:54 -0500
committerDavid S. Miller <davem@davemloft.net>2014-02-27 15:22:46 -0500
commit118ce7ab9785846e1c673f6130bee526c127206c (patch)
tree075607f8255daa22d47ab966b61c44881ad78d79 /drivers/atm
parent740b0f1841f6e39085b711d41db9ffb07198682b (diff)
atm: nicstar: remove interruptible_sleep_on_timeout
We are trying to finally kill off interruptible_sleep_on_timeout. the two uses in the nicstar driver can be trivially replaced with wait_event_interruptible_lock_irq_timeout, which prevents the wake-up race and is able to check the buffer state with scq->lock held. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Chas Williams <chas@cmf.nrl.navy.mil> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/atm')
-rw-r--r--drivers/atm/nicstar.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c
index 13ed54cf2c31..9988ac98b6d8 100644
--- a/drivers/atm/nicstar.c
+++ b/drivers/atm/nicstar.c
@@ -1739,10 +1739,10 @@ static int push_scqe(ns_dev * card, vc_map * vc, scq_info * scq, ns_scqe * tbd,
1739 } 1739 }
1740 1740
1741 scq->full = 1; 1741 scq->full = 1;
1742 spin_unlock_irqrestore(&scq->lock, flags); 1742 wait_event_interruptible_lock_irq_timeout(scq->scqfull_waitq,
1743 interruptible_sleep_on_timeout(&scq->scqfull_waitq, 1743 scq->tail != scq->next,
1744 SCQFULL_TIMEOUT); 1744 scq->lock,
1745 spin_lock_irqsave(&scq->lock, flags); 1745 SCQFULL_TIMEOUT);
1746 1746
1747 if (scq->full) { 1747 if (scq->full) {
1748 spin_unlock_irqrestore(&scq->lock, flags); 1748 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,
1789 scq->full = 1; 1789 scq->full = 1;
1790 if (has_run++) 1790 if (has_run++)
1791 break; 1791 break;
1792 spin_unlock_irqrestore(&scq->lock, flags); 1792 wait_event_interruptible_lock_irq_timeout(scq->scqfull_waitq,
1793 interruptible_sleep_on_timeout(&scq->scqfull_waitq, 1793 scq->tail != scq->next,
1794 SCQFULL_TIMEOUT); 1794 scq->lock,
1795 spin_lock_irqsave(&scq->lock, flags); 1795 SCQFULL_TIMEOUT);
1796 } 1796 }
1797 1797
1798 if (!scq->full) { 1798 if (!scq->full) {