]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ata: pata_parport: add custom version of wait_after_reset
authorOndrej Zary <linux@zary.sk>
Thu, 5 Oct 2023 20:55:58 +0000 (22:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Nov 2023 13:08:57 +0000 (14:08 +0100)
commite2fa6f732a73a8f3104072505e1b3ce0ccf17631
treef33a7c7e92615d3fa91a9354ec841fc9f9aaf0de
parent142ac0fda55348dc16ddb3e63220d61676b2621d
ata: pata_parport: add custom version of wait_after_reset

[ Upstream commit f343e578fef99a69b3322aca38b94a6d8ded2ce7 ]

Some parallel adapters (e.g. EXP Computer MC-1285B EPP Cable) return
bogus values when there's no master device present. This can cause
reset to fail, preventing the lone slave device (such as EXP Computer
CD-865) from working.

Add custom version of wait_after_reset that ignores master failure when
a slave device is present. The custom version is also needed because
the generic ata_sff_wait_after_reset uses direct port I/O for slave
device detection.

Signed-off-by: Ondrej Zary <linux@zary.sk>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/ata/pata_parport/pata_parport.c