Sebastian Benoit <Benoit@stud-mailer.uni-marburg.de> writes:
>> > With 2.1.11 ejecting the cd via software does not work anymore.
>>
>> Hmm, neither the generic cdrom driver nor the scsi cdrom driver have
>> changed from 2.1.10 to 2.1.11. Maybe this is due the module trouble
>> in 2.1.11? What about 2.1.12? Does it work when compiled into the
>> kernel?
> cdrom support as module is _not_ the cause. This happens in all cases
> (I have everything in the kernel now until the module problems are gone
> :) I will move to 2.1.13 today.
Seems drives are different in how they handle doorlock: Some lock the
eject button only, and some lock both button and software eject. The
later require an extra unlock call, below comes the fix.
Gerd
diff -ur kernel/2.1.13/drivers/cdrom/cdrom.c linux/drivers/cdrom/cdrom.c
--- kernel/2.1.13/drivers/cdrom/cdrom.c Tue Nov 26 15:59:12 1996
+++ linux/drivers/cdrom/cdrom.c Tue Nov 26 14:53:33 1996
@@ -350,9 +350,11 @@
case CDROMEJECT:
if (cdo->capability & ~cdi->mask & CDC_OPEN_TRAY) {
- if (cdi->use_count == 1)
+ if (cdi->use_count == 1) {
+ if (cdo->capability & ~cdi->mask & CDC_LOCK)
+ cdo->lock_door(cdi, 0);
return cdo->tray_move(cdi, 1);
- else
+ } else
return -EBUSY;
} else
return -EINVAL;
---- Gerd Knorr <kraxel@cs.tu-berlin.de> | http://wwwwbs.cs.tu-berlin.de/~kraxel/Linux hackers are funny people: They count the time in patchlevels.