Skip to content

Commit

Permalink
libata-core: auditting chk_status v check_status
Browse files Browse the repository at this point in the history
Did a complete audit of these and found we have another error case.

ata_bus_softreset calls ata_check_status which means that it tries to do
an ioread8 on the port blindly and check versus 0xFF for an error.

It should of course be using the ap->ops method for this via chk_status,
and this bug causes a wrog status call on the NS87415 at least.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Alan Cox authored and Jeff Garzik committed Oct 24, 2007
1 parent 2dcb407 commit 150981b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -3267,7 +3267,7 @@ static int ata_bus_softreset(struct ata_port *ap, unsigned int devmask,
* the bus shows 0xFF because the odd clown forgets the D7
* pulldown resistor.
*/
if (ata_check_status(ap) == 0xFF)
if (ata_chk_status(ap) == 0xFF)
return -ENODEV;

return ata_bus_post_reset(ap, devmask, deadline);
Expand Down

0 comments on commit 150981b

Please sign in to comment.