android_kernel_xiaomi_sm8350/drivers
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
..
acorn
acpi [PATCH] fix typo in acpi video brightness changes. 2006-06-23 21:37:34 -07:00
amba
atm
base Enable minimal per-device resume tracing 2006-06-24 14:47:59 -07:00
block [PATCH] nbd: kill obsolete changelog, add GPL 2006-06-25 10:01:06 -07:00
bluetooth
cdrom Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2006-06-22 22:11:30 -07:00
char [PATCH] kernel/sys.c: cleanups 2006-06-25 10:01:06 -07:00
connector [PATCH] connector-exports 2006-06-23 07:43:06 -07:00
cpufreq [PATCH] cpufreq build fix 2006-06-23 08:47:27 -07:00
crypto
dio
dma
edac
eisa
fc4
firmware
hwmon [PATCH] hwmon-vid: Add support for Intel Core and Conroe 2006-06-22 11:10:36 -07:00
i2c Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2006-06-22 22:11:30 -07:00
ide [PATCH] IDE CD end-of media error fix 2006-06-25 10:01:06 -07:00
ieee1394 [PATCH] ieee1394: nodemgr: do not peek into struct semaphore 2006-06-25 10:00:54 -07:00
infiniband [PATCH] VFS: Permit filesystem to override root dentry on mount 2006-06-23 07:42:45 -07:00
input [PATCH] random: remove redundant SA_SAMPLE_RANDOM from touchscreen drivers 2006-06-25 10:01:00 -07:00
isdn [PATCH] ISDN: correctly handle isdn_writebuf_stub() errors 2006-06-23 07:43:04 -07:00
leds [PATCH] leds: Amstrad Delta LED support 2006-06-23 07:43:05 -07:00
macintosh [PATCH] Rewritten backlight infrastructure for portable Apple computers 2006-06-25 10:00:59 -07:00
mca
md [PATCH] drivers/md/raid6algos.c: fix a NULL dereference 2006-06-23 07:43:08 -07:00
media
message
mfd
misc [PATCH] VFS: Permit filesystem to override root dentry on mount 2006-06-23 07:42:45 -07:00
mmc
mtd
net [PATCH] m68k: cleanup generic irq names 2006-06-25 10:00:57 -07:00
nubus
oprofile [PATCH] oprofile: convert from semaphores to mutexes 2006-06-25 10:01:04 -07:00
parisc
parport [PARPORT] sunbpp: Convert to new SBUS device framework. 2006-06-23 23:16:19 -07:00
pci
pcmcia
pnp [PATCH] pnp: card_probe(): fix memory leak 2006-06-25 10:01:01 -07:00
rapidio
rtc [PATCH] Add driver for ARM AMBA PL031 RTC 2006-06-25 10:01:05 -07:00
s390 [PATCH] kernel/sys.c: cleanups 2006-06-25 10:01:06 -07:00
sbus [PATCH] mm: remove VM_LOCKED before remap_pfn_range and drop VM_SHM 2006-06-25 10:00:55 -07:00
scsi [PATCH] m68k: convert mac irq code 2006-06-25 10:00:58 -07:00
serial Merge master.kernel.org:/home/rmk/linux-2.6-arm 2006-06-24 17:48:14 -07:00
sh
sn [PATCH] SGI IOC4: Detect IO card variant 2006-06-23 07:43:07 -07:00
spi
tc
telephony
usb Revert "[PATCH] usb: drivers/usb/core/devio.c dereferences a userspace pointer" 2006-06-24 17:47:09 -07:00
video [PATCH] Rewritten backlight infrastructure for portable Apple computers 2006-06-25 10:00:59 -07:00
w1 [PATCH] connector-exports 2006-06-23 07:43:06 -07:00
zorro
Kconfig
Makefile