summaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-inline.c
diff options
context:
space:
mode:
authorDamien Le Moal <dlemoal@kernel.org>2025-08-13 18:08:53 +0900
committerDamien Le Moal <dlemoal@kernel.org>2025-08-14 18:42:16 +0900
commit35f6bedccf4c4280f02d48e4f7d194e64e9a62d8 (patch)
tree6e285117afdb7867f62d52ff3efa3a4c87f5b8ce /lib/mpi/mpi-inline.c
parentdfc0f6373094dd88e1eaf76c44f2ff01b65db851 (diff)
ata: libata-eh: Fix link state check for IDE/PATA ports
Commit 4371fe1ba400 ("ata: libata-eh: Avoid unnecessary resets when revalidating devices") replaced the call to ata_phys_link_offline() in ata_eh_revalidate_and_attach() with the new function ata_eh_link_established() which relaxes the checks on a device link state to account for low power mode transitions. However, this change assumed that the device port has a valid scr_read method to obtain the SStatus register for the port. This is not always the case, especially with older IDE/PATA adapters (e.g. PATA/IDE devices emulated with QEMU). For such adapter, ata_eh_link_established() will always return false, causing ata_eh_revalidate_and_attach() to go into its error path and ultimately to the device being disabled. Avoid this by restoring the previous behavior, which is to assume that the link is online if reading the port SStatus register fails. While at it, also fix the spelling of SStatus in the comment describing the function ata_eh_link_established(). Reported-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com> Fixes: 4371fe1ba400 ("ata: libata-eh: Avoid unnecessary resets when revalidating devices") Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Tested-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com> Reviewed-by: Niklas Cassel <cassel@kernel.org>
Diffstat (limited to 'lib/mpi/mpi-inline.c')
0 files changed, 0 insertions, 0 deletions