Minor fix to ide-cd change_speed command [and call for hardware help]

From: Pavel Machek (pavel@suse.cz)
Date: Thu May 18 2000 - 17:38:32 EST


Hi!

I feel that we should tell userland "operation not supported" in case
when cdrom does not report requested speed after attempt to change
speed, so please apply this patch.

--- clean/drivers/ide/ide-cd.c Sat May 13 13:38:25 2000
+++ linux/drivers/ide/ide-cd.c Fri May 19 00:30:57 2000
@@ -2021,6 +2021,8 @@
                 return stat;
 
         cdi->speed = CDROM_STATE_FLAGS (drive)->current_speed;
+ if (cdi->speed != speed)
+ return -EOPNOTSUPP;
         return 0;
 }
 

Completely unrelated, but anyway: cdrom on my toshiba notebook
suddenly stopped working (it is definitely hardware). If I try to
access cdrom, I get

May 19 00:36:06 bug kernel: hdc: packet command error: status=0x51
{ DriveReady SeekComplete Error }
May 19 00:36:06 bug kernel: hdc: packet command error: error=0x30
May 19 00:36:06 bug kernel: ATAPI device hdc:
May 19 00:36:06 bug kernel: Error: Medium error -- (Sense key=0x03)
May 19 00:36:06 bug kernel: (reserved error code) -- (asc=0x57,
ascq=0x00)
May 19 00:36:06 bug kernel: The failed "Test Unit Ready" packet
command was:
May 19 00:36:06 bug kernel: "00 00 00 00 00 00 00 00 00 00 00 00 "
May 19 00:36:06 bug kernel: cdrom: open failed.
May 19 00:36:06 bug kernel: hdc: packet command error: status=0x51
{ DriveReady SeekComplete Error }
May 19 00:36:06 bug kernel: hdc: packet command error: error=0x30
May 19 00:36:06 bug kernel: ATAPI device hdc:
May 19 00:36:06 bug kernel: Error: Medium error -- (Sense key=0x03)
May 19 00:36:06 bug kernel: (reserved error code) -- (asc=0x57,
ascq=0x00)
May 19 00:36:06 bug kernel: The failed "Test Unit Ready" packet
command was:
May 19 00:36:06 bug kernel: "00 00 00 00 00 00 00 00 00 00 00 00 "

. Cdrom is definitely spinning, and it can move head. I tried cleaning
lens with piece of clothing, but it did not help. Is there any other
trick I should try? (Should I clean it with alcohol?) I tried opening
cdrom "case" (remember, it is notebook) to reach any trimmers inside,
but screws were too small and I just could not open it...

                                                                Pavel

-- 
I'm pavel@ucw.cz. "In my country we have almost anarchy and I don't care."
Panos Katsaloulis describing me w.r.t. patents me at discuss@linmodems.org

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue May 23 2000 - 21:00:18 EST