linux/drivers/ide
Alan Cox dbe217af3b [PATCH] IDE CD end-of media error fix
This is a patch from Alan that fixes a real ide-cd.c regression causing
bogus "Media Check" failures for perfectly valid Fedora install ISOs, on
certain CD-ROM drives.

This is a forward port to 2.6.16 (from RHEL) of the minimal changes for the
end of media problem.  It may not be sufficient for some controllers
(promise notably) and it does not touch the locking so the error path
locking is as horked as in mainstream.

From: Ingo Molnar <mingo@elte.hu>

I have ported the patch to 2.6.17-rc4 and tested it by provoking
end-of-media IO errors with an unaligned ISO image.  Unlike the vanilla
kernel, the patched kernel interpreted the error condition correctly with
512 byte granularity:

 hdc: command error: status=0x51 { DriveReady SeekComplete Error }
 hdc: command error: error=0x54 { AbortedCommand LastFailedSense=0x05 }
 ide: failed opcode was: unknown
 ATAPI device hdc:
   Error: Illegal request -- (Sense key=0x05)
   Illegal mode for this track or incompatible medium -- (asc=0x64, ascq=0x00)
   The failed "Read 10" packet command was:
   "28 00 00 04 fb 78 00 00 06 00 00 00 00 00 00 00 "
 end_request: I/O error, dev hdc, sector 1306080
 Buffer I/O error on device hdc, logical block 163260
 Buffer I/O error on device hdc, logical block 163261
 Buffer I/O error on device hdc, logical block 163262

the unpatched kernel produces an incorrect error dump:

 hdc: command error: status=0x51 { DriveReady SeekComplete Error }
 hdc: command error: error=0x54 { AbortedCommand LastFailedSense=0x05 }
 ide: failed opcode was: unknown
 end_request: I/O error, dev hdc, sector 1306080
 Buffer I/O error on device hdc, logical block 163260
 hdc: command error: status=0x51 { DriveReady SeekComplete Error }
 hdc: command error: error=0x54 { AbortedCommand LastFailedSense=0x05 }
 ide: failed opcode was: unknown
 end_request: I/O error, dev hdc, sector 1306088
 Buffer I/O error on device hdc, logical block 163261
 hdc: command error: status=0x51 { DriveReady SeekComplete Error }
 hdc: command error: error=0x54 { AbortedCommand LastFailedSense=0x05 }
 ide: failed opcode was: unknown
 end_request: I/O error, dev hdc, sector 1306096
 Buffer I/O error on device hdc, logical block 163262

I do not have the right type of CD-ROM drive to reproduce the end-of-media
data corruption bug myself, but this same patch in RHEL solved it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Cc: Jens Axboe <axboe@suse.de>
Cc: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-25 10:01:06 -07:00
..
arm Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
cris [PATCH] CRIS IDE driver 2005-07-27 16:26:02 -07:00
h8300 Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
legacy [PATCH] m68k: completely initialize hw_regs_t in ide_setup_ports 2006-06-23 07:43:00 -07:00
mips [PATCH] handle errors returned by platform_get_irq*() 2006-03-20 13:42:57 -08:00
pci Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev 2006-06-23 15:58:44 -07:00
ppc [PATCH] powerpc: Fix ide-pmac sysfs entry 2006-05-21 12:59:16 -07:00
ide-cd.c [PATCH] IDE CD end-of media error fix 2006-06-25 10:01:06 -07:00
ide-cd.h [PATCH] ide-cd: remove write-only cmd field from struct cdrom_info 2005-12-15 02:20:49 +01:00
ide-disk.c [PATCH] LED: Add IDE disk activity LED trigger 2006-03-31 12:18:57 -08:00
ide-dma.c [PATCH] More BUG_ON conversion 2006-06-23 07:43:08 -07:00
ide-floppy.c [PATCH] More BUG_ON conversion 2006-06-23 07:43:08 -07:00
ide-generic.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ide-io.c [PATCH] IDE CD end-of media error fix 2006-06-25 10:01:06 -07:00
ide-iops.c [PATCH] More BUG_ON conversion 2006-06-23 07:43:08 -07:00
ide-lib.c [PATCH] More BUG_ON conversion 2006-06-23 07:43:08 -07:00
ide-pnp.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ide-probe.c [SPARC]: Kill __irq_itoa(). 2006-06-20 01:21:29 -07:00
ide-proc.c Cleaned up AMD Au1200 IDE driver: 2005-10-29 19:32:20 +01:00
ide-tape.c [PATCH] idetape gcc 4.1 warning fix 2006-06-25 10:01:05 -07:00
ide-taskfile.c [PATCH] More BUG_ON conversion 2006-06-23 07:43:08 -07:00
ide-timing.h [PATCH] janitor: ide: min/max macros in ide-timing.h 2005-09-10 10:06:31 -07:00
ide.c [PATCH] Get rid of struct request request_pm_state member 2006-06-23 17:10:39 +02:00
Kconfig [PATCH] IDE: always enable CONFIG_PDC202XX_FORCE 2006-02-03 08:32:13 -08:00
Makefile [IDE] Add driver for Sibyte Swarm evaluation board 2005-11-17 16:23:50 +00:00
setup-pci.c [SPARC]: Kill __irq_itoa(). 2006-06-20 01:21:29 -07:00