[Prism54-devel] sleep_on() considered harmful.
Luis R. Rodriguez
mcgrof@ruslug.rutgers.edu
Thu, 22 Jan 2004 22:02:28 -0500 (EST)
Commited, thanks
Luis
On Thu, 22 Jan 2004, David Woodhouse wrote:
> Index: islpci_dev.c
> ===================================================================
> RCS file: /var/lib/cvs/prism54-ng/ksrc/islpci_dev.c,v
> retrieving revision 1.49
> diff -u -p -r1.49 islpci_dev.c
> --- islpci_dev.c 17 Jan 2004 14:13:13 -0000 1.49
> +++ islpci_dev.c 22 Jan 2004 23:25:00 -0000
> @@ -335,6 +335,11 @@ static int
> islpci_reset_if(islpci_private *priv)
> {
> long remaining;
> + DECLARE_WAITQUEUE(wait, current);
> +
> + set_current_state(TASK_UNINTERRUPTIBLE);
> + add_wait_queue(&priv->reset_done, &wait);
> +
> /* now the last step is to reset the interface */
> isl38xx_interface_reset(priv->device_base, priv->device_host_address);
>
> @@ -342,7 +347,12 @@ islpci_reset_if(islpci_private *priv)
>
> /* The software reset acknowledge needs about 220 msec here.
> * Be conservative and wait for up to one second. */
> - remaining = sleep_on_timeout(&priv->reset_done, HZ);
> +
> + remaining = schedule_timeout(HZ);
> +
> + remove_wait_queue(&priv->reset_done, &wait);
> + set_current_state(TASK_RUNNING);
> +
> if (remaining == 0) {
> printk(KERN_ERR "%s: device soft reset timed out\n",
> priv->ndev->name);
>
> --
> dwmw2
>
>
> _______________________________________________
> Prism54-devel mailing list
> Prism54-devel@prism54.org
> http://prism54.org/mailman/listinfo/prism54-devel
>