aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/mptlan.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/message/fusion/mptlan.c')
-rw-r--r--drivers/message/fusion/mptlan.c10
1 files changed, 4 insertions, 6 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) {