Need help for making a driver sleep during 1 second

JF Martinez (jfm@sidney.remcomp.fr)
Thu, 24 Oct 1996 22:36:00 +0200


I want to know how to make a CDROM driver sleep for 1 second
until the device is ready. The device does not send an interrupt.

There is a problem with slow CD drives. When initializing they check
if there is a disk in drive. Unfortunately they are too slow and if
you put this in a script

insmod mydrive
mount mycdrom

this will fail with: no disk in drive.

The following will work:

insmod mydrive
sleep 3
mount mydrom

Now there are people who are being bitten by this when installing Linux.

I have reported this several times since well before 2.0 was released
but nobody cared. Now I will try to fix this myself but I need to know
how to make the driver sleep and retry 1 second later.

-- 

Jean Francois Martinez