linux_dsm_epyc7002/drivers/ide
Bartlomiej Zolnierkiewicz b0244a0045 ide-disk: workaround for buggy HPA support on ST340823A (take 3)
This disk reports total number of sectors instead of maximum sector address
in response to READ_NATIVE_MAX_ADDRESS command and also happily accepts
SET_MAX_ADDRESS command with the bogus value.  This results in +1 sector
capacity being used and errors on attempts to use the last sector.

...
hdd: Host Protected Area detected.
        current capacity is 78165360 sectors (40020 MB)
        native  capacity is 78165361 sectors (40020 MB)
hdd: Host Protected Area disabled.
...
hdd: reading: block=78165360, sectors=1, buffer=0xc1e63000
hdd: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hdd: dma_intr: error=0x10 { SectorIdNotFound }, LBAsect=78165360, sector=78165360
...

Add hpa_list[] table and workaround the issue in idedisk_check_hpa().

v2:
* Add missing export and improve patch description a bit.

v3:
* Add list termination.  (From Mikko)

Fixes kernel bugzilla bug #8816.

Thanks to Mikko for investigating the issue and helping with this patch.

Cc: Mikko Rapeli <mikko.rapeli@iki.fi>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-08-20 22:42:57 +02:00
..
arm drivers/ide/arm/icside.c: kmalloc + memset conversion to kzalloc 2007-08-01 23:46:44 +02:00
cris ide-cris: fix ->set_pio_mode method to set transfer mode on the device 2007-08-20 22:42:54 +02:00
h8300 ide: add "initializing" argument to ide_register_hw() 2007-05-10 00:01:10 +02:00
legacy [BLOCK] Get rid of request_queue_t typedef 2007-07-24 09:28:11 +02:00
mips ide: add PIO masks 2007-07-20 01:11:59 +02:00
pci hpt34x: fix CONFIG_HPT34X_AUTODMA=n handling 2007-08-20 22:42:57 +02:00
ppc ide-pmac: fix drive->init_speed reporting 2007-08-20 22:42:55 +02:00
ide-acpi.c ide-acpi support warning fix 2007-02-07 18:19:42 +01:00
ide-cd.c [BLOCK] Get rid of request_queue_t typedef 2007-07-24 09:28:11 +02:00
ide-cd.h ide-cd: replace C code with call to ARRAY_SIZE() macro 2007-07-09 23:17:57 +02:00
ide-disk.c ide-disk: workaround for buggy HPA support on ST340823A (take 3) 2007-08-20 22:42:57 +02:00
ide-dma.c ide: add cable detection for early UDMA66 devices (take 3) 2007-08-20 22:42:56 +02:00
ide-floppy.c ide: add support for SCSI ioctls to ide-floppy 2007-07-20 01:11:59 +02:00
ide-generic.c ide: add ide_proc_register_port() 2007-05-10 00:01:11 +02:00
ide-io.c [BLOCK] Get rid of request_queue_t typedef 2007-07-24 09:28:11 +02:00
ide-iops.c ide-disk: workaround for buggy HPA support on ST340823A (take 3) 2007-08-20 22:42:57 +02:00
ide-lib.c ide: remove ide_find_best_pio_mode() 2007-07-20 01:11:58 +02:00
ide-pnp.c ide: add "initializing" argument to ide_register_hw() 2007-05-10 00:01:10 +02:00
ide-probe.c [BLOCK] Get rid of request_queue_t typedef 2007-07-24 09:28:11 +02:00
ide-proc.c ide: use mutex instead of ide_setting_sem semaphore in IDE driver 2007-07-09 23:17:56 +02:00
ide-tape.c ide: eliminate warnings in ide-tape.c 2007-08-01 23:46:44 +02:00
ide-taskfile.c ide: never called printk statement in ide-taskfile.c::wait_drive_not_busy 2007-07-03 22:28:34 +02:00
ide-timing.h ide: remove ide_find_best_pio_mode() 2007-07-20 01:11:58 +02:00
ide.c ide: add support for SCSI ioctls to ide-floppy 2007-07-20 01:11:59 +02:00
Kconfig ide: fix hidden dependencies on CONFIG_IDE_GENERIC 2007-08-20 22:42:54 +02:00
Makefile ide: make /proc/ide/ optional 2007-05-10 00:01:09 +02:00
setup-pci.c ide: remove stale changelog from setup-pci.c 2007-07-20 01:11:59 +02:00