netdev
[Top] [All Lists]

Re: [PATCH 2.6.9-rc2 17/38] net/islpci_dev: replace schedule_timeout() w

To: Nishanth Aravamudan <nacc@xxxxxxxxxx>
Subject: Re: [PATCH 2.6.9-rc2 17/38] net/islpci_dev: replace schedule_timeout() with msleep()
From: mcgrof@xxxxxxxxxxxxxxxxxxxx (Luis R. Rodriguez)
Date: Thu, 23 Sep 2004 18:55:07 -0400
Cc: hvr@xxxxxxx, mcgrof@xxxxxxxxxxxxxxxxxxxx, kernel-janitors@xxxxxxxxxxxxxx, margitsw@xxxxxxxxxxx, prism54-devel@xxxxxxxxxxx, Netdev <netdev@xxxxxxxxxxx>
In-reply-to: <20040923221303.GB13244@xxxxxxxxxx>
Mail-followup-to: Nishanth Aravamudan <nacc@xxxxxxxxxx>, hvr@xxxxxxx, mcgrof@xxxxxxxxxxxxxxxxxxxx, kernel-janitors@xxxxxxxxxxxxxx, margitsw@xxxxxxxxxxx, prism54-devel@xxxxxxxxxxx, Netdev <netdev@xxxxxxxxxxx>
Organization: Rutgers University Student Linux Users Group
References: <20040923221303.GB13244@xxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.3.28i
On Thu, Sep 23, 2004 at 03:13:03PM -0700, Nishanth Aravamudan wrote:
> Any comments would be appreciated.
> 
> Description: Use msleep() instead of schedule_timeout()
> to guarantee the task delays as expected. Also set_current_state() is
> inserted before schedule_timeout(). If the for-loop were to execute
> twice, the second time would not set the state before sleeping in the
> current code; this causes schedule_timeout() to return immediately.
> 
> Signed-off-by: Nishanth Aravamudan <nacc@xxxxxxxxxx>
> 
> --- 2.6.9-rc2-vanilla/drivers/net/wireless/prism54/islpci_dev.c       
> 2004-09-13 17:15:41.000000000 -0700
> +++ 2.6.9-rc2/drivers/net/wireless/prism54/islpci_dev.c       2004-09-23 
> 13:58:42.000000000 -0700
> @@ -436,8 +436,7 @@ prism54_bring_down(islpci_private *priv)
>       wmb();
>  
>       /* wait a while for the device to reset */
> -     set_current_state(TASK_UNINTERRUPTIBLE);
> -     schedule_timeout(50*HZ/1000);
> +     msleep(50);
>  
>       return 0;
>  }
> @@ -489,6 +488,7 @@ islpci_reset_if(islpci_private *priv)
>               /* The software reset acknowledge needs about 220 msec here.
>                * Be conservative and wait for up to one second. */
>       
> +             set_current_state(TASK_UNINTERRUPTIBLE);
>               remaining = schedule_timeout(HZ);
>  
>               if(remaining > 0) {


Looks good to me. IIRC Margit had something to say about this last time
this popped around -- CC'ing her to see if there are any outstanding
comments.

PS. For future prism54 patches please feel free to CC prism54-devel and
netdev.

        Luis

-- 
GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84  A34A 6ADD 4937 E20A 525E

Attachment: pgpaUU5s5ZWin.pgp
Description: PGP signature

<Prev in Thread] Current Thread [Next in Thread>