* [PATCH] ugly messages trying to open CD drive with no media present
@ 2007-04-02 19:51 Stuart_Hayes
2007-04-06 21:05 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 2+ messages in thread
From: Stuart_Hayes @ 2007-04-02 19:51 UTC (permalink / raw)
To: alan; +Cc: linux-ide
[-- Attachment #1: Type: text/plain, Size: 977 bytes --]
I get the following error messages when trying to open a CD device
(specifically, the Teac CD-ROM CD-224E) that has no media present:
hda: packet command error: status=0x51 { DriveReady SeekComplete Error }
hda: packet command error: error=0x54 { AbortedCommand
LastFailedSense=0x05 }
ide: failed opcode was: unknown
This happens when a "start stop unit" command (0x1b 0 0 0 3 0 0 0 0 0)
is sent to the drive to try to close the CD-ROM tray, but this drive
doesn't have that capability (it's a slim portable-type CD-ROM), so it
reports sense key 5 (illegal request) with asc/ascq 24/0. This is
exactly how SFF8090i says it should respond.
But ide-cd.c (in cdrom_decode_status() ) just sees sense key 5 and spews
out an error. It then goes on to request sense data, and
cdrom_log_sense() understands this error and doesn't log it.
The patch, for kernel 2.6.20.4, suppresses this error message.
Signed-off-by: Stuart Hayes <stuart_hayes@dell.com>
[-- Attachment #2: idecd_suppress_startstop_error_msg_2.6.20.4.patch --]
[-- Type: application/octet-stream, Size: 823 bytes --]
--- linux-2.6.20.4/drivers/ide/ide-cd.c.orig 2007-03-23 14:52:51.000000000 -0500
+++ linux-2.6.20.4/drivers/ide/ide-cd.c 2007-04-02 08:28:24.000000000 -0500
@@ -742,6 +742,15 @@ static int cdrom_decode_status(ide_drive
cdrom_saw_media_change (drive);
/*printk("%s: media changed\n",drive->name);*/
return 0;
+ } else if ((sense_key == ILLEGAL_REQUEST) &&
+ (rq->cmd[0] == GPCMD_START_STOP_UNIT)) {
+ /*
+ * Don't print error message for this condition--
+ * SFF8090i indicates that 5/24/00 is the correct
+ * response to a request to close the tray if the
+ * drive doesn't have that capability.
+ * cdrom_log_sense() knows this!
+ */
} else if (!(rq->cmd_flags & REQ_QUIET)) {
/* Otherwise, print an error. */
ide_dump_status(drive, "packet command error", stat);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ugly messages trying to open CD drive with no media present
2007-04-02 19:51 [PATCH] ugly messages trying to open CD drive with no media present Stuart_Hayes
@ 2007-04-06 21:05 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-04-06 21:05 UTC (permalink / raw)
To: Stuart_Hayes; +Cc: alan, linux-ide
On Monday 02 April 2007, Stuart_Hayes@dell.com wrote:
>
> I get the following error messages when trying to open a CD device
> (specifically, the Teac CD-ROM CD-224E) that has no media present:
>
> hda: packet command error: status=0x51 { DriveReady SeekComplete Error }
> hda: packet command error: error=0x54 { AbortedCommand
> LastFailedSense=0x05 }
> ide: failed opcode was: unknown
>
> This happens when a "start stop unit" command (0x1b 0 0 0 3 0 0 0 0 0)
> is sent to the drive to try to close the CD-ROM tray, but this drive
> doesn't have that capability (it's a slim portable-type CD-ROM), so it
> reports sense key 5 (illegal request) with asc/ascq 24/0. This is
> exactly how SFF8090i says it should respond.
>
> But ide-cd.c (in cdrom_decode_status() ) just sees sense key 5 and spews
> out an error. It then goes on to request sense data, and
> cdrom_log_sense() understands this error and doesn't log it.
>
> The patch, for kernel 2.6.20.4, suppresses this error message.
>
> Signed-off-by: Stuart Hayes <stuart_hayes@dell.com>
Alan, any opinions on this one (this is ide-cd specific patch)?
I applied it to my tree for now and would like to send it to Linus
soon so the patch still makes it into 2.6.21...
Bart
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-04-06 21:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-02 19:51 [PATCH] ugly messages trying to open CD drive with no media present Stuart_Hayes
2007-04-06 21:05 ` Bartlomiej Zolnierkiewicz
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).