All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Fremlin <chief@bandits.org>
To: Jens Axboe <axboe@suse.de>
Cc: <Andries.Brouwer@cwi.nl>, <johnsom@orst.edu>,
	<linux-kernel@vger.kernel.org>
Subject: Re: Changes to ide-cd for 2.4.1 are broken?
Date: 22 Feb 2001 16:46:59 +0000	[thread overview]
Message-ID: <m2bsru3bss.fsf@boreas.yi.org.> (raw)
In-Reply-To: <UTC200102182032.VAA132602.aeb@vlet.cwi.nl> <20010218215727.D6593@suse.de>
In-Reply-To: Jens Axboe's message of "Sun, 18 Feb 2001 21:57:27 +0100"

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

  reply	other threads:[~2001-02-22 16:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-18 20:32 Changes to ide-cd for 2.4.1 are broken? Andries.Brouwer
2001-02-18 20:57 ` Jens Axboe
2001-02-22 16:46   ` John Fremlin [this message]
     [not found] <001801c09e3a$4a189270$653b090a@sulaco>
2001-03-01 18:52 ` 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
  -- strict thread matches above, loose matches on Subject: below --
2001-02-17 21:56 John Fremlin
2001-02-18 19:19 ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2bsru3bss.fsf@boreas.yi.org. \
    --to=chief@bandits.org \
    --cc=Andries.Brouwer@cwi.nl \
    --cc=axboe@suse.de \
    --cc=johnsom@orst.edu \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.