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)
committerDamien Le Moal <dlemoal@kernel.org>
Tue, 10 Oct 2023 05:42:22 +0000 (14:42 +0900)
commitf343e578fef99a69b3322aca38b94a6d8ded2ce7
tree07edeb96f226516ea0cb2053683c8a3edde6d49c
parentd2302427c12277929c9f390adeda19fbf403c0bb
ata: pata_parport: add custom version of wait_after_reset

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>
drivers/ata/pata_parport/pata_parport.c