Google luky.org euqset.org

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [UPDATE PATCH] ide/ide-cd: use ssleep() instead of schedule_timeout()


On Fri, Jan 07 2005, Nishanth Aravamudan wrote:
> On Sat, Dec 25, 2004 at 01:48:46AM +0100, Domen Puncer wrote:
> > Hi.
> > 
> > Santa brought another present :-)
> > 
> > I'll start mailing new patches these days, and after external trees get
> > merged, I'll be bugging you with the old ones.
> > 
> > 
> > Patchset is at http://coderock.org/kj/2.6.10-kj/
> 
> <snip>
> 
> > msleep-drivers_ide_ide-cd.patch
> 
> Please consider updating to the following patch:
> 
> Description: Uses ssleep() in place of cdrom_sleep() to guarantee the task
> delays as expected. Remove cdrom_sleep() definition, as this is the only place
> where it is called.
> 
> Signed-off-by: Nishanth Aravamudan

Looks fine.

Acked-by: Jens Axboe <axboe@xxxxxxx>

> --- 2.6.10-v/drivers/ide/ide-cd.c	2004-12-24 13:34:33.000000000 -0800
> +++ 2.6.10/drivers/ide/ide-cd.c	2005-01-05 14:23:05.000000000 -0800
> @@ -1520,19 +1520,6 @@ static ide_startstop_t cdrom_do_packet_c
>  }
>  
>  
> -/* Sleep for TIME jiffies.
> -   Not to be called from an interrupt handler. */
> -static
> -void cdrom_sleep (int time)
> -{
> -	int sleep = time;
> -
> -	do {
> -		set_current_state(TASK_INTERRUPTIBLE);
> -		sleep = schedule_timeout(sleep);
> -	} while (sleep);
> -}
> -
>  static
>  int cdrom_queue_packet_command(ide_drive_t *drive, struct request *rq)
>  {
> @@ -1567,7 +1554,7 @@ int cdrom_queue_packet_command(ide_drive
>  				/* The drive is in the process of loading
>  				   a disk.  Retry, but wait a little to give
>  				   the drive time to complete the load. */
> -				cdrom_sleep(2 * HZ);
> +				ssleep(2);
>  			} else {
>  				/* Otherwise, don't retry. */
>  				retries = 0;
> 

-- 
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


$B$3$N>pJs$,$"$J$?$NC5$7$F$$?$b$N$+$I$&$+A*Br$7$F$/$@$5$!#(B
yes/$B$^$5$K$3$l$@!*(B   no/$B0c$&$J$!(B   part/$B0lIt8+$D$+$C$?(B   try/$B$3$l$G;n$7$F$_$k(B

$B$"$J$?$,C5$7$F$$?>pJs$O$I$N$h$&$J$3$H$+!"$4<+M3$K5-F~2<$5$!#FC$K!V$^$5$K$3$l$@!*!W$H8@$&>l9g$O5-F~$r$*4j$$7$^$9!#(B
$BNc(B:$B!VJ#?t$N%^%7%s$+$i(BCATV$B7PM3$G(Bipmasquerade$B$rMxMQ$7$F(BWeb$B$r;2>H$7$?$>l9g$N@_Dj$K$D$$F!W(B
Follow-Ups: References: