Changes to ide-cd for 2.4.1 are broken?

Changes to ide-cd for 2.4.1 are broken?

Post by Michael Johnso » Tue, 12 Jun 2001 09:50:06



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 -----




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.



> [...]

> > > >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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

Changes to ide-cd for 2.4.1 are broken?

Post by John Fremli » Tue, 12 Jun 2001 19:10:05



> 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).

Quote:> 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 -----




> 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.



> > [...]

> > > > >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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. Changes to ide-cd for 2.4.1 are broken?

[...]

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

                    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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. REPOST: profiling/solaris2.2

3. NIS/YPBIND/redhat5.2 kernel 2.2.3

4. broken 2.2 IDE CD-RW (was Re: plain 2.2.X: no ide CD-RW?)

5. MO Disk Geometry needed

6. Kernel 1.2.3 IDE-CD Broken

7. Overcoming (social) geekdom thru (computer) geekdom-HOWTO

8. New IDE-CD/extended IDE driver supports Sony 55E ATAPI CD-ROM!

9. PATCH: update ide-cd to new changes, add abort() handlers

10. vcdxrip , CDROM_SEND_PACKET, and 2.5.42->2.5.43 ide-cd changes

11. Boot disk does not detect IDE Toshiba CD-ROM or am I stupid?

12. 2.5.69-70 ide-cd to guarantee fault-free CD/DVD burning experience?