linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Changes to ide-cd for 2.4.1 are broken?
       [not found] <001801c09e3a$4a189270$653b090a@sulaco>
@ 2001-03-01 18:52 ` John Fremlin
  2001-06-10 17:37   ` John Fremlin
  0 siblings, 1 reply; 11+ messages in thread
From: John Fremlin @ 2001-03-01 18:52 UTC (permalink / raw)
  To: Michael Johnson; +Cc: Jens Axboe, Andries.Brouwer, linux-kernel

"Michael Johnson" <johnsom@home.com> writes:

> >> You know all about this stuff, so probably I am mistaken.
> >> However, my copy of SFF8020-r2.6 everywhere has
> >> "Sense 02 ASC 3A: Medium not present" without giving
> >> subcodes to distinguish Tray Open from No Disc.
> >> So, it seems to me that drives built to this spec will not have
> >> nonzero ASCQ.
> >
> >Right, old ATAPI has 3a/02 as the only possible condition, so we
> >can't really tell between no disc and tray open. I guess the safest
> >is to just keep the old behaviour for !ascq and report open.

> I don't understand why the current(2.4.1) behavior is a problem...

It isn't a problem, it just changed in the middle of a stable release.

[...]

-- 

	http://www.penguinpowered.com/~vii

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Changes to ide-cd for 2.4.1 are broken?
  2001-03-01 18:52 ` Changes to ide-cd for 2.4.1 are broken? John Fremlin
@ 2001-06-10 17:37   ` John Fremlin
  2001-06-11  0:41     ` Michael Johnson
  0 siblings, 1 reply; 11+ messages in thread
From: John Fremlin @ 2001-06-10 17:37 UTC (permalink / raw)
  To: Michael Johnson; +Cc: Jens Axboe, Andries.Brouwer, Alan Cox, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1095 bytes --]


Hi all, this is an old thread. It was started because the return value
from cd info was changed in 2.4.1 in the case when the tray might be
open or there simply be no disc in the drive for an IDE
CD-ROM. 

John Fremlin <chief@bandits.org> writes:

> "Michael Johnson" <johnsom@home.com> writes:

[...]

> > >Right, old ATAPI has 3a/02 as the only possible condition, so we
> > >can't really tell between no disc and tray open. I guess the safest
> > >is to just keep the old behaviour for !ascq and report open.
> 
> > I don't understand why the current(2.4.1) behavior is a problem...

Unfortunately changing the return code means that the generic cdrom.c
code is broekn, in particular wrt to having the cdrom drive open
automatically when umounted, and to close when attempted to be
mounted. 

(You can set this mode with "cdd auto" if you have my asm-toys installed
        http://ape.n3.net/programs/linux/asm-toys 
)

The following patch fixes that. I also attempted to fix up similar
problems (where checking CDS_TRAY_OPEN is used to see if the tray is
open, which is obviously broekn).


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: linux-2.4.4-cd-ret-fixup.patch --]
[-- Type: text/x-patch, Size: 1001 bytes --]

--- linux-2.4.4-orig/drivers/cdrom/cdrom.c	Tue May  1 14:32:05 2001
+++ linux-2.4.4/drivers/cdrom/cdrom.c	Sun Jun 10 15:32:48 2001
@@ -515,8 +515,8 @@ int open_for_data(struct cdrom_device_in
 	if (cdo->drive_status != NULL) {
 		ret = cdo->drive_status(cdi, CDSL_CURRENT);
 		cdinfo(CD_OPEN, "drive_status=%d\n", ret); 
-		if (ret == CDS_TRAY_OPEN) {
-			cdinfo(CD_OPEN, "the tray is open...\n"); 
+		if (ret == CDS_TRAY_OPEN || ret == CDS_NO_DISC) {
+			cdinfo(CD_OPEN, "the tray might be open...\n"); 
 			/* can/may i close it? */
 			if (CDROM_CAN(CDC_CLOSE_TRAY) &&
 			    cdi->options & CDO_AUTO_CLOSE) {
@@ -622,7 +622,7 @@ int check_for_audio_disc(struct cdrom_de
 	if (cdo->drive_status != NULL) {
 		ret = cdo->drive_status(cdi, CDSL_CURRENT);
 		cdinfo(CD_OPEN, "drive_status=%d\n", ret); 
-		if (ret == CDS_TRAY_OPEN) {
+		if (ret == CDS_TRAY_OPEN || ret == CDS_NO_DISC) {
 			cdinfo(CD_OPEN, "the tray is open...\n"); 
 			/* can/may i close it? */
 			if (CDROM_CAN(CDC_CLOSE_TRAY) &&

[-- Attachment #3: Type: text/plain, Size: 25 bytes --]


-- 

	http://ape.n3.net

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Changes to ide-cd for 2.4.1 are broken?
  2001-06-10 17:37   ` John Fremlin
@ 2001-06-11  0:41     ` Michael Johnson
  2001-06-11 10:01       ` John Fremlin
  2001-10-10 21:03       ` Enrico Scholz
  0 siblings, 2 replies; 11+ messages in thread
From: Michael Johnson @ 2001-06-11  0:41 UTC (permalink / raw)
  To: John Fremlin; +Cc: Jens Axboe, Andries.Brouwer, Alan Cox, linux-kernel

So, the patch you are proposing will always consider the tray open, even if
it is closed.  Why do you need this behavior?

Why is checking CDS_TRAY_OPEN, to see if the tray is open, broken?

The code in cdrom.c looks fine to me.

Michael

----- Original Message -----
From: "John Fremlin" <vii@users.sourceforge.net>
To: "Michael Johnson" <johnsom@home.com>
Cc: "Jens Axboe" <axboe@suse.de>; <Andries.Brouwer@cwi.nl>; "Alan Cox"
<alan@lxorguk.ukuu.org.uk>; <linux-kernel@vger.kernel.org>
Sent: Sunday, June 10, 2001 10:37 AM
Subject: Re: Changes to ide-cd for 2.4.1 are broken?


>
> Hi all, this is an old thread. It was started because the return value
> from cd info was changed in 2.4.1 in the case when the tray might be
> open or there simply be no disc in the drive for an IDE
> CD-ROM.
>
> John Fremlin <chief@bandits.org> writes:
>
> > "Michael Johnson" <johnsom@home.com> writes:
>
> [...]
>
> > > >Right, old ATAPI has 3a/02 as the only possible condition, so we
> > > >can't really tell between no disc and tray open. I guess the safest
> > > >is to just keep the old behaviour for !ascq and report open.
> >
> > > I don't understand why the current(2.4.1) behavior is a problem...
>
> Unfortunately changing the return code means that the generic cdrom.c
> code is broekn, in particular wrt to having the cdrom drive open
> automatically when umounted, and to close when attempted to be
> mounted.
>
> (You can set this mode with "cdd auto" if you have my asm-toys installed
>         http://ape.n3.net/programs/linux/asm-toys
> )
>
> The following patch fixes that. I also attempted to fix up similar
> problems (where checking CDS_TRAY_OPEN is used to see if the tray is
> open, which is obviously broekn).
>
>


----------------------------------------------------------------------------
----


>
> --
>
> http://ape.n3.net
>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Changes to ide-cd for 2.4.1 are broken?
  2001-06-11  0:41     ` Michael Johnson
@ 2001-06-11 10:01       ` John Fremlin
  2001-10-10 21:03       ` Enrico Scholz
  1 sibling, 0 replies; 11+ messages in thread
From: John Fremlin @ 2001-06-11 10:01 UTC (permalink / raw)
  To: Michael Johnson
  Cc: John Fremlin, Jens Axboe, Andries.Brouwer, Alan Cox, linux-kernel

"Michael Johnson" <johnsom@home.com> writes:

> So, the patch you are proposing will always consider the tray open, even if
> it is closed.  Why do you need this behavior?
> 
> Why is checking CDS_TRAY_OPEN, to see if the tray is open, broken?

You broke it (I think it was you).

> The code in cdrom.c looks fine to me.

Yes but you changed ide-cd.c to report CDS_NO_DISC if the tray might
be open or there is no disc. I complained about this at the time, you
may recall.

> ----- Original Message -----
> From: "John Fremlin" <vii@users.sourceforge.net>
> To: "Michael Johnson" <johnsom@home.com>
> Cc: "Jens Axboe" <axboe@suse.de>; <Andries.Brouwer@cwi.nl>; "Alan Cox"
> <alan@lxorguk.ukuu.org.uk>; <linux-kernel@vger.kernel.org>
> Sent: Sunday, June 10, 2001 10:37 AM
> Subject: Re: Changes to ide-cd for 2.4.1 are broken?
> 
> 
> >
> > Hi all, this is an old thread. It was started because the return value
> > from cd info was changed in 2.4.1 in the case when the tray might be
> > open or there simply be no disc in the drive for an IDE
> > CD-ROM.
> >
> > John Fremlin <chief@bandits.org> writes:
> >
> > > "Michael Johnson" <johnsom@home.com> writes:
> >
> > [...]
> >
> > > > >Right, old ATAPI has 3a/02 as the only possible condition, so we
> > > > >can't really tell between no disc and tray open. I guess the safest
> > > > >is to just keep the old behaviour for !ascq and report open.
> > >
> > > > I don't understand why the current(2.4.1) behavior is a problem...
> >
> > Unfortunately changing the return code means that the generic cdrom.c
> > code is broekn, in particular wrt to having the cdrom drive open
> > automatically when umounted, and to close when attempted to be
> > mounted.
> >
> > (You can set this mode with "cdd auto" if you have my asm-toys installed
> >         http://ape.n3.net/programs/linux/asm-toys
> > )
> >
> > The following patch fixes that. I also attempted to fix up similar
> > problems (where checking CDS_TRAY_OPEN is used to see if the tray is
> > open, which is obviously broekn).
> >
> >
> 
> 
> ----------------------------------------------------------------------------
> ----
> 
> 
> >
> > --
> >
> > http://ape.n3.net
> >
> 

-- 

	http://ape.n3.net

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Changes to ide-cd for 2.4.1 are broken?
  2001-06-11  0:41     ` Michael Johnson
  2001-06-11 10:01       ` John Fremlin
@ 2001-10-10 21:03       ` Enrico Scholz
  2001-10-10 21:16         ` Enrico Scholz
  1 sibling, 1 reply; 11+ messages in thread
From: Enrico Scholz @ 2001-10-10 21:03 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2745 bytes --]

[ This is a very old thread; please see [1] for a complete list and [2] for
  technical details ]

johnsom@home.com ("Michael Johnson") writes:

> So, the patch you are proposing will always consider the tray open,
> even if it is closed.  Why do you need this behavior?

I need the behavior to close the tray when it is open. Currently it will
never by closed.


> Why is checking CDS_TRAY_OPEN, to see if the tray is open, broken?

CDS_TRAY_OPEN will never be returned; only CDS_NO_DISC.


> The code in cdrom.c looks fine to me.

The code there is fine. The code in ide-cd.c is broken:

|       if (sense.asc == 0x3a && (!sense.ascq||sense.ascq == 1))
|               return CDS_NO_DISC;
|       else
|               return CDS_TRAY_OPEN;

Assuming the tray is open. Then ATAPI IDE-CD drives will have an
unspecified ASCQ -- which is mostly zero (see ATAPI specification).
Therefore, it will be returned CDS_NO_DISC. This is wrong; the
correct result should be CDS_TRAY_OPEN because it is a more special
description of the state than CDS_NO_DISC and the layers above are
trusting in this value.

CDS_NO_DISC would lead to an immediate error in the open_for_data()
function in cdrom.c, but CDS_TRAY_OPEN makes it possible to close the
tray automatically.

This can be demonstrated by:

| [kernel <2.4.1; open tray]
| $ rmmod cdrom
| $ modprobe cdrom autoclose=1
| $ mount /cdrom
| ... tray will be closed and the CD mounted ...
| $
| 
| [kernel >=2.4.1; open tray]
| $ rmmod cdrom
| $ modprobe cdrom autoclose=0
| $ mount /cdrom
| mount: No medium found
| $

As you can see, the current behavior makes the 'autoclose' option
effectless on "normal" IDE-CDROMs. Only special CDROMs following the
Mt Fuji standard can profit from the ASCQ test.

I suggest the patch already given in [3] and will append it again.


> > Hi all, this is an old thread. It was started because the return
> > value from cd info was changed in 2.4.1 in the case when the tray
> > might be open or there simply be no disc in the drive for an IDE
> > CD-ROM.
> > [...]
> > > > >Right, old ATAPI has 3a/02 as the only possible condition, so
> > > > >we can't really tell between no disc and tray open. I guess the
> > > > >safest is to just keep the old behaviour for !ascq and report
> > > > >open.
> > >
> > > > I don't understand why the current(2.4.1) behavior is a problem...
> >
> > Unfortunately changing the return code means that the generic cdrom.c
> > code is broekn, in particular [...] to close when attempted to be
> > mounted.



Enrico

Footnotes: 
[1]  http://marc.theaimsgroup.com/?t=98244733600003&w=2&r=1 

[2]  http://marc.theaimsgroup.com/?l=linux-kernel&m=98252992732626&w=2

[3]  http://marc.theaimsgroup.com/?l=linux-kernel&m=98244720319144&w=2


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch-cdrom.diff --]
[-- Type: text/x-patch, Size: 433 bytes --]

--- linux/drivers/ide/ide-cd.c.orig	Tue May 29 11:24:24 2001
+++ linux/drivers/ide/ide-cd.c	Tue May 29 11:25:44 2001
@@ -2319,10 +2319,7 @@
 		 * any other way to detect this...
 		 */
 		if (sense.sense_key == NOT_READY) {
-			if (sense.asc == 0x3a && (!sense.ascq||sense.ascq == 1))
-				return CDS_NO_DISC;
-			else
-				return CDS_TRAY_OPEN;
+			if (sense.asc == 0x3a) return CDS_TRAY_OPEN;
 		}
 
 		return CDS_DRIVE_NOT_READY;

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Changes to ide-cd for 2.4.1 are broken?
  2001-10-10 21:03       ` Enrico Scholz
@ 2001-10-10 21:16         ` Enrico Scholz
  0 siblings, 0 replies; 11+ messages in thread
From: Enrico Scholz @ 2001-10-10 21:16 UTC (permalink / raw)
  To: linux-kernel

enrico.scholz@informatik.tu-chemnitz.de (Enrico Scholz) writes:

> | [kernel >=2.4.1; open tray]
> | $ rmmod cdrom
> | $ modprobe cdrom autoclose=0
                               ^ oops, should be a '1' obviously


Enrico


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Changes to ide-cd for 2.4.1 are broken?
  2001-02-18 20:57 ` Jens Axboe
@ 2001-02-22 16:46   ` John Fremlin
  0 siblings, 0 replies; 11+ messages in thread
From: John Fremlin @ 2001-02-22 16:46 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Andries.Brouwer, johnsom, linux-kernel

Jens Axboe <axboe@suse.de> writes:

[...]

> > You know all about this stuff, so probably I am mistaken.
> > However, my copy of SFF8020-r2.6 everywhere has
> > "Sense 02 ASC 3A: Medium not present" without giving
> > subcodes to distinguish Tray Open from No Disc.
> > So, it seems to me that drives built to this spec will not have
> > nonzero ASCQ.
> 
> Right, old ATAPI has 3a/02 as the only possible condition, so we
> can't really tell between no disc and tray open. I guess the safest
> is to just keep the old behaviour for !ascq and report open.

Jens, you are maintainer? Could you ask Linus or Alan to revert the
change below?

diff -u --recursive --new-file v2.4.0/linux/drivers/ide/ide-cd.c linux/drivers/ide/ide-cd.c
--- v2.4.0/linux/drivers/ide/ide-cd.c   Tue Jan  2 16:59:17 2001
+++ linux/drivers/ide/ide-cd.c  Sun Jan 28 13:37:50 2001
@@ -2324,11 +2309,17 @@
                    sense.ascq == 0x04)
                        return CDS_DISC_OK;

+
+               /*
+                * If not using Mt Fuji extended media tray reports,
+                * just return TRAY_OPEN since ATAPI doesn't provide
+                * any other way to detect this...
+                */
                if (sense.sense_key == NOT_READY) {
-                       /* ATAPI doesn't have anything that can help
-                          us decide whether the drive is really
-                          emtpy or the tray is just open. irk. */
-                       return CDS_TRAY_OPEN;
+                       if (sense.asc == 0x3a && (!sense.ascq||sense.ascq == 1))+                               return CDS_NO_DISC;
+                       else
+                               return CDS_TRAY_OPEN;
                }


-- 

	http://www.penguinpowered.com/~vii

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Changes to ide-cd for 2.4.1 are broken?
  2001-02-18 20:32 Andries.Brouwer
@ 2001-02-18 20:57 ` Jens Axboe
  2001-02-22 16:46   ` John Fremlin
  0 siblings, 1 reply; 11+ messages in thread
From: Jens Axboe @ 2001-02-18 20:57 UTC (permalink / raw)
  To: Andries.Brouwer; +Cc: chief, johnsom, linux-kernel

On Sun, Feb 18 2001, Andries.Brouwer@cwi.nl wrote:
>     > +               /*
>     > +                * If not using Mt Fuji extended media tray reports,
>     > +                * just return TRAY_OPEN since ATAPI doesn't provide
>     > +                * any other way to detect this...
>     > +                */
>     >                 if (sense.sense_key == NOT_READY) {
>     > -                       /* ATAPI doesn't have anything that can help
>     > -                          us decide whether the drive is really
>     > -                          emtpy or the tray is just open. irk. */
>     > -                       return CDS_TRAY_OPEN;
>     > +                       if (sense.asc == 0x3a && (!sense.ascq||sense.ascq == 1))
>     > +                               return CDS_NO_DISC;
>     > +                       else
>     > +                               return CDS_TRAY_OPEN;
>     >                 }
>     > 
>     > My tray is open as I type, and it is misreported as CDS_NO_DISC. In
>     > 2.4.0 it worked fine.
> 
>     Your drive is broken, the only other valid combination is 0x3a/0x02
>     which means no media and tray open. You could try and dump the asc
>     and ascq to see what your drive reports for the different states.
> 
> Ha Jens - must we disagree twice on one evening?

:-)

> You know all about this stuff, so probably I am mistaken.
> However, my copy of SFF8020-r2.6 everywhere has
> "Sense 02 ASC 3A: Medium not present" without giving
> subcodes to distinguish Tray Open from No Disc.
> So, it seems to me that drives built to this spec will not have
> nonzero ASCQ.

Right, old ATAPI has 3a/02 as the only possible condition, so we
can't really tell between no disc and tray open. I guess the safest
is to just keep the old behaviour for !ascq and report open.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Changes to ide-cd for 2.4.1 are broken?
@ 2001-02-18 20:32 Andries.Brouwer
  2001-02-18 20:57 ` Jens Axboe
  0 siblings, 1 reply; 11+ messages in thread
From: Andries.Brouwer @ 2001-02-18 20:32 UTC (permalink / raw)
  To: axboe, chief; +Cc: johnsom, linux-kernel

    From: Jens Axboe <axboe@suse.de>

    On Sat, Feb 17 2001, John Fremlin wrote:
    > Specifically, this part:
    > 
    > @@ -2324,11 +2309,17 @@
    >                     sense.ascq == 0x04)
    >                         return CDS_DISC_OK;
    >  
    > +
    > +               /*
    > +                * If not using Mt Fuji extended media tray reports,
    > +                * just return TRAY_OPEN since ATAPI doesn't provide
    > +                * any other way to detect this...
    > +                */
    >                 if (sense.sense_key == NOT_READY) {
    > -                       /* ATAPI doesn't have anything that can help
    > -                          us decide whether the drive is really
    > -                          emtpy or the tray is just open. irk. */
    > -                       return CDS_TRAY_OPEN;
    > +                       if (sense.asc == 0x3a && (!sense.ascq||sense.ascq == 1))
    > +                               return CDS_NO_DISC;
    > +                       else
    > +                               return CDS_TRAY_OPEN;
    >                 }
    > 
    > My tray is open as I type, and it is misreported as CDS_NO_DISC. In
    > 2.4.0 it worked fine.

    Your drive is broken, the only other valid combination is 0x3a/0x02
    which means no media and tray open. You could try and dump the asc
    and ascq to see what your drive reports for the different states.

Ha Jens - must we disagree twice on one evening?
You know all about this stuff, so probably I am mistaken.
However, my copy of SFF8020-r2.6 everywhere has
"Sense 02 ASC 3A: Medium not present" without giving
subcodes to distinguish Tray Open from No Disc.
So, it seems to me that drives built to this spec will not have
nonzero ASCQ.

Andries

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Changes to ide-cd for 2.4.1 are broken?
  2001-02-17 21:56 John Fremlin
@ 2001-02-18 19:19 ` Jens Axboe
  0 siblings, 0 replies; 11+ messages in thread
From: Jens Axboe @ 2001-02-18 19:19 UTC (permalink / raw)
  To: John Fremlin; +Cc: johnsom, linux-kernel

On Sat, Feb 17 2001, John Fremlin wrote:
> Specifically, this part:
> 
> @@ -2324,11 +2309,17 @@
>                     sense.ascq == 0x04)
>                         return CDS_DISC_OK;
>  
> +
> +               /*
> +                * If not using Mt Fuji extended media tray reports,
> +                * just return TRAY_OPEN since ATAPI doesn't provide
> +                * any other way to detect this...
> +                */
>                 if (sense.sense_key == NOT_READY) {
> -                       /* ATAPI doesn't have anything that can help
> -                          us decide whether the drive is really
> -                          emtpy or the tray is just open. irk. */
> -                       return CDS_TRAY_OPEN;
> +                       if (sense.asc == 0x3a && (!sense.ascq||sense.ascq == 1))
> +                               return CDS_NO_DISC;
> +                       else
> +                               return CDS_TRAY_OPEN;
>                 }
> 
> My tray is open as I type, and it is misreported as CDS_NO_DISC. In
> 2.4.0 it worked fine.

Your drive is broken, the only other valid combination is 0x3a/0x02 which means
no media and tray open. You could try and dump the asc and ascq to see what
your drive reports for the different states.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Changes to ide-cd for 2.4.1 are broken?
@ 2001-02-17 21:56 John Fremlin
  2001-02-18 19:19 ` Jens Axboe
  0 siblings, 1 reply; 11+ messages in thread
From: John Fremlin @ 2001-02-17 21:56 UTC (permalink / raw)
  To: johnsom; +Cc: linux-kernel


Specifically, this part:

@@ -2324,11 +2309,17 @@
                    sense.ascq == 0x04)
                        return CDS_DISC_OK;
 
+
+               /*
+                * If not using Mt Fuji extended media tray reports,
+                * just return TRAY_OPEN since ATAPI doesn't provide
+                * any other way to detect this...
+                */
                if (sense.sense_key == NOT_READY) {
-                       /* ATAPI doesn't have anything that can help
-                          us decide whether the drive is really
-                          emtpy or the tray is just open. irk. */
-                       return CDS_TRAY_OPEN;
+                       if (sense.asc == 0x3a && (!sense.ascq||sense.ascq == 1))
+                               return CDS_NO_DISC;
+                       else
+                               return CDS_TRAY_OPEN;
                }

My tray is open as I type, and it is misreported as CDS_NO_DISC. In
2.4.0 it worked fine.

# strace cdd
execve("/trusted/bin/cdd", ["cdd"], [/* 35 vars */]) = 0
open("/dev/cdrom", O_RDONLY|O_NONBLOCK) = 5
ioctl(5, CDROM_DRIVE_STATUS, 0)         = 1
write(1, "No disc in drive\n", 17No disc in drive
)      = 17
_exit(0)                                = ?

>From linux/include/linux/cdrom.h:

#define CDS_NO_INFO		0	/* if not implemented */
#define CDS_NO_DISC		1
#define CDS_TRAY_OPEN		2
#define CDS_DRIVE_NOT_READY	3
#define CDS_DISC_OK		4

(The usual plug: download my beautifully minimalistic but featureful
hand coded assembly cd player from
http://john.snoop.dk/programs/linux/asm-toys).

Some miscellaneous hardware details from dmesg:

Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ALI15X3: IDE controller on PCI bus 00 dev 78
PCI: Hardcoded IRQ 14 for device 00:0f.0
ALI15X3: chipset revision 32
ALI15X3: not 100% native mode: will probe irqs later
    ide0: BM-DMA at 0xffa0-0xffa7, BIOS settings: hda:DMA, hdb:pio
    ide1: BM-DMA at 0xffa8-0xffaf, BIOS settings: hdc:DMA, hdd:pio
hda: SAMSUNG VG36483A (6.48GB), ATA DISK drive
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
hdc: IBM-DTLA-305020, ATA DISK drive
hdd: TOSHIBA DVD-ROM SD-M1102, ATAPI CD/DVD-ROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hda: 12685680 sectors (6495 MB) w/494KiB Cache, CHS=789/255/63, (U)DMA
hdc: 40188960 sectors (20577 MB) w/380KiB Cache, CHS=39870/16/63, (U)DMA
hdd: ATAPI 24X DVD-ROM drive, 256kB Cache
Uniform CD-ROM driver Revision: 3.12

-- 

	http://www.penguinpowered.com/~vii

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2001-10-10 21:16 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <001801c09e3a$4a189270$653b090a@sulaco>
2001-03-01 18:52 ` Changes to ide-cd for 2.4.1 are broken? John Fremlin
2001-06-10 17:37   ` John Fremlin
2001-06-11  0:41     ` Michael Johnson
2001-06-11 10:01       ` John Fremlin
2001-10-10 21:03       ` Enrico Scholz
2001-10-10 21:16         ` Enrico Scholz
2001-02-18 20:32 Andries.Brouwer
2001-02-18 20:57 ` Jens Axboe
2001-02-22 16:46   ` John Fremlin
  -- strict thread matches above, loose matches on Subject: below --
2001-02-17 21:56 John Fremlin
2001-02-18 19:19 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).