lkml.org 
[lkml]   [1996]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From

Newsgroups: linux.dev.kernel
Path: kraxel
From: kraxel@cs.tu-berlin.de (Gerd Knorr)
Subject: Re: your mail
X-Newsreader: NN version 6.5.0 (NOV)
Organization: my small flat somewhere in berlin
Message-ID: <E1HKvI.2LH@cs.tu-berlin.de>
References: <199611222155.WAA26807@felix.intern> <Pine.A41.3.95.961125124730.28716B-100000@pprz02.HRZ.Uni-Marburg.DE>
Date: Tue, 26 Nov 1996 16:38:06 GMT
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.

\
 
 \ /
  Last update: 2005-03-22 13:37    [from the cache]
©2003-2011 Jasper Spaans