diff options
| author | Jeff Garzik <jgarzik@pobox.com> | 2005-11-07 22:51:47 -0500 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@pobox.com> | 2005-11-07 22:51:47 -0500 |
| commit | 6b995751c2e851d2bc9c277b5884d0adb519e31d (patch) | |
| tree | 7a15b41b5d8ce612915584a0773c670d5c0ab5b8 /drivers/message/fusion/mptlan.c | |
| parent | 6c2f4267833f453156f8f439cc32eb4c92f357b4 (diff) | |
| parent | d27ba47e7e8c466c18983a1779d611f82d6a354f (diff) | |
Merge branch 'master'
Diffstat (limited to 'drivers/message/fusion/mptlan.c')
| -rw-r--r-- | drivers/message/fusion/mptlan.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/message/fusion/mptlan.c b/drivers/message/fusion/mptlan.c index ed3c891e388..014085d8ec8 100644 --- a/drivers/message/fusion/mptlan.c +++ b/drivers/message/fusion/mptlan.c @@ -511,7 +511,7 @@ mpt_lan_close(struct net_device *dev) { struct mpt_lan_priv *priv = netdev_priv(dev); MPT_ADAPTER *mpt_dev = priv->mpt_dev; - unsigned int timeout; + unsigned long timeout; int i; dlprintk((KERN_INFO MYNAM ": mpt_lan_close called\n")); @@ -526,11 +526,9 @@ mpt_lan_close(struct net_device *dev) mpt_lan_reset(dev); - timeout = 2 * HZ; - while (atomic_read(&priv->buckets_out) && --timeout) { - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(1); - } + timeout = jiffies + 2 * HZ; + while (atomic_read(&priv->buckets_out) && time_before(jiffies, timeout)) + schedule_timeout_interruptible(1); for (i = 0; i < priv->max_buckets_out; i++) { if (priv->RcvCtl[i].skb != NULL) { |
