[Prism54-devel] Re: [PATCH 2.6.9-rc2 17/38] net/islpci_dev: replace schedule_timeout() with msleep()

Luis R. Rodriguez mcgrof at ruslug.rutgers.edu
Thu Sep 23 22:55:07 UTC 2004


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 at us.ibm.com>
> 
> --- 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://prism54.org/pipermail/prism54-devel/attachments/20040923/3323c5bf/attachment.pgp


More information about the Prism54-devel mailing list