* [PATCH] libata-core: auditting chk_status v check_status
@ 2007-10-23 15:50 Alan Cox
2007-10-24 1:25 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Alan Cox @ 2007-10-23 15:50 UTC (permalink / raw)
To: akpm, jeff, linux-ide
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>
diff -u --exclude-from /usr/src/exclude --new-file --recursive linux.vanilla-2.6.23-mm1/drivers/ata/libata-core.c linux-2.6.23-mm1/drivers/ata/libata-core.c
--- linux.vanilla-2.6.23-mm1/drivers/ata/libata-core.c 2007-10-15 15:03:26.000000000 +0100
+++ linux-2.6.23-mm1/drivers/ata/libata-core.c 2007-10-23 13:39:25.861931504 +0100
@@ -3305,7 +3323,7 @@
* 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);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] libata-core: auditting chk_status v check_status
2007-10-23 15:50 [PATCH] libata-core: auditting chk_status v check_status Alan Cox
@ 2007-10-24 1:25 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2007-10-24 1:25 UTC (permalink / raw)
To: Alan Cox; +Cc: akpm, linux-ide
Alan Cox wrote:
> 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>
>
> diff -u --exclude-from /usr/src/exclude --new-file --recursive linux.vanilla-2.6.23-mm1/drivers/ata/libata-core.c linux-2.6.23-mm1/drivers/ata/libata-core.c
> --- linux.vanilla-2.6.23-mm1/drivers/ata/libata-core.c 2007-10-15 15:03:26.000000000 +0100
> +++ linux-2.6.23-mm1/drivers/ata/libata-core.c 2007-10-23 13:39:25.861931504 +0100
> @@ -3305,7 +3323,7 @@
> * 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;
applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-10-24 1:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-23 15:50 [PATCH] libata-core: auditting chk_status v check_status Alan Cox
2007-10-24 1:25 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).