]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
libata-core: auditting chk_status v check_status
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Tue, 23 Oct 2007 15:50:02 +0000 (16:50 +0100)
committerJeff Garzik <jeff@garzik.org>
Wed, 24 Oct 2007 01:20:02 +0000 (21:20 -0400)
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>
drivers/ata/libata-core.c

index b458639b4735f69cd959884aa8d0b4e4dc31d36c..0978b2feef99b65c2bdcd703ce978ec18f6ba774 100644 (file)
@@ -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);