linux/include
Damien Le Moal 68dbbe7d5b libata: fix read log timeout value
Some ATA drives are very slow to respond to READ_LOG_EXT and
READ_LOG_DMA_EXT commands issued from ata_dev_configure() when the
device is revalidated right after resuming a system or inserting the
ATA adapter driver (e.g. ahci). The default 5s timeout
(ATA_EH_CMD_DFL_TIMEOUT) used for these commands is too short, causing
errors during the device configuration. Ex:

...
ata9: SATA max UDMA/133 abar m524288@0x9d200000 port 0x9d200400 irq 209
ata9: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
ata9.00: ATA-9: XXX  XXXXXXXXXXXXXXX, XXXXXXXX, max UDMA/133
ata9.00: qc timeout (cmd 0x2f)
ata9.00: Read log page 0x00 failed, Emask 0x4
ata9.00: Read log page 0x00 failed, Emask 0x40
ata9.00: NCQ Send/Recv Log not supported
ata9.00: Read log page 0x08 failed, Emask 0x40
ata9.00: 27344764928 sectors, multi 16: LBA48 NCQ (depth 32), AA
ata9.00: Read log page 0x00 failed, Emask 0x40
ata9.00: ATA Identify Device Log not supported
ata9.00: failed to set xfermode (err_mask=0x40)
ata9: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
ata9.00: configured for UDMA/133
...

The timeout error causes a soft reset of the drive link, followed in
most cases by a successful revalidation as that give enough time to the
drive to become fully ready to quickly process the read log commands.
However, in some cases, this also fails resulting in the device being
dropped.

Fix this by using adding the ata_eh_revalidate_timeouts entries for the
READ_LOG_EXT and READ_LOG_DMA_EXT commands. This defines a timeout
increased to 15s, retriable one time.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: stable@vger.kernel.org
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
2021-11-11 10:55:32 +09:00
..
acpi Merge branches 'acpica', 'acpi-ec', 'acpi-pmic' and 'acpi-video' 2021-11-10 14:03:14 +01:00
asm-generic asm-generic: asm/syscall.h cleanup 2021-11-10 11:22:03 -08:00
clocksource ARM: 2021-11-02 11:24:14 -07:00
crypto crypto: ecc - Export additional helper functions 2021-10-29 21:04:03 +08:00
drm drm: Update MST First Link Slot Information Based on Encoding Format 2021-10-25 21:21:07 -04:00
dt-bindings - Remove Drivers 2021-11-08 12:07:52 -08:00
keys
kunit include/kunit/test.h: replace kernel.h with the necessary inclusions 2021-11-09 10:02:49 -08:00
kvm
linux libata: fix read log timeout value 2021-11-11 10:55:32 +09:00
math-emu
media Merge branch 'akpm' (patches from Andrew) 2021-11-09 10:11:53 -08:00
memory
misc
net 9p-for-5.16-rc1: fixes, netfs read support and checkpatch rewrite 2021-11-09 10:30:13 -08:00
pcmcia
ras
rdma RDMA/hns: Use the core code to manage the fixed mmap entries 2021-10-29 14:07:31 -03:00
scsi for-5.16/block-2021-11-09 2021-11-09 11:20:07 -08:00
soc ARM: SoC drivers for 5.16 2021-11-03 17:00:52 -07:00
sound ASoC: Updates for v5.16 2021-11-01 16:58:27 +01:00
target scsi: target: Replace lun_tg_pt_gp_lock with rcu in I/O path 2021-10-18 22:38:36 -04:00
trace A slow cycle for nfsd: mainly cleanup, including Neil's patch dropping 2021-11-10 16:45:54 -08:00
uapi A slow cycle for nfsd: mainly cleanup, including Neil's patch dropping 2021-11-10 16:45:54 -08:00
vdso
video
xen xen/balloon: rename alloc/free_xenballooned_pages 2021-11-04 12:59:44 -05:00