diff options
Diffstat (limited to 'drivers/message/fusion')
-rw-r--r-- | drivers/message/fusion/mptlan.c | 10 | ||||
-rw-r--r-- | drivers/message/fusion/mptscsih.c | 6 |
2 files changed, 6 insertions, 10 deletions
diff --git a/drivers/message/fusion/mptlan.c b/drivers/message/fusion/mptlan.c index ed3c891e388f..014085d8ec85 100644 --- a/drivers/message/fusion/mptlan.c +++ b/drivers/message/fusion/mptlan.c | |||
@@ -511,7 +511,7 @@ mpt_lan_close(struct net_device *dev) | |||
511 | { | 511 | { |
512 | struct mpt_lan_priv *priv = netdev_priv(dev); | 512 | struct mpt_lan_priv *priv = netdev_priv(dev); |
513 | MPT_ADAPTER *mpt_dev = priv->mpt_dev; | 513 | MPT_ADAPTER *mpt_dev = priv->mpt_dev; |
514 | unsigned int timeout; | 514 | unsigned long timeout; |
515 | int i; | 515 | int i; |
516 | 516 | ||
517 | dlprintk((KERN_INFO MYNAM ": mpt_lan_close called\n")); | 517 | dlprintk((KERN_INFO MYNAM ": mpt_lan_close called\n")); |
@@ -526,11 +526,9 @@ mpt_lan_close(struct net_device *dev) | |||
526 | 526 | ||
527 | mpt_lan_reset(dev); | 527 | mpt_lan_reset(dev); |
528 | 528 | ||
529 | timeout = 2 * HZ; | 529 | timeout = jiffies + 2 * HZ; |
530 | while (atomic_read(&priv->buckets_out) && --timeout) { | 530 | while (atomic_read(&priv->buckets_out) && time_before(jiffies, timeout)) |
531 | set_current_state(TASK_INTERRUPTIBLE); | 531 | schedule_timeout_interruptible(1); |
532 | schedule_timeout(1); | ||
533 | } | ||
534 | 532 | ||
535 | for (i = 0; i < priv->max_buckets_out; i++) { | 533 | for (i = 0; i < priv->max_buckets_out; i++) { |
536 | if (priv->RcvCtl[i].skb != NULL) { | 534 | if (priv->RcvCtl[i].skb != NULL) { |
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c index 5cb07eb224d7..4330ed0cedaa 100644 --- a/drivers/message/fusion/mptscsih.c +++ b/drivers/message/fusion/mptscsih.c | |||
@@ -1013,10 +1013,8 @@ mptscsih_remove(struct pci_dev *pdev) | |||
1013 | spin_lock_irqsave(&dvtaskQ_lock, flags); | 1013 | spin_lock_irqsave(&dvtaskQ_lock, flags); |
1014 | if (dvtaskQ_active) { | 1014 | if (dvtaskQ_active) { |
1015 | spin_unlock_irqrestore(&dvtaskQ_lock, flags); | 1015 | spin_unlock_irqrestore(&dvtaskQ_lock, flags); |
1016 | while(dvtaskQ_active && --count) { | 1016 | while(dvtaskQ_active && --count) |
1017 | set_current_state(TASK_INTERRUPTIBLE); | 1017 | schedule_timeout_interruptible(1); |
1018 | schedule_timeout(1); | ||
1019 | } | ||
1020 | } else { | 1018 | } else { |
1021 | spin_unlock_irqrestore(&dvtaskQ_lock, flags); | 1019 | spin_unlock_irqrestore(&dvtaskQ_lock, flags); |
1022 | } | 1020 | } |