* [PATCH #upstream-fixes] sata_nv: make hardreset return -EAGAIN on success
@ 2008-04-23 3:14 Tejun Heo
2008-04-23 3:24 ` Roland Dreier
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Tejun Heo @ 2008-04-23 3:14 UTC (permalink / raw)
To: marc.c.dionne, Petr Vandrovec, Roland Dreier,
IDE/ATA development list, Jeff Garzik
sata_nv hardreset can't classify but was left out while unifying
follow-up SRST request mechanism[1]. This caused detection failures
on those controllers. Fix it.
Reported and bisected by Roland Dreier, Petr Vandrovec and Marc
Dionne. Thanks guys.
[1] 305d2a1ab137d11d573319c315748a87060fe82d
Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Roland Dreier <rdreier@cisco.com>
Cc: Petr Vandrovec <vandrove@vc.cvut.cz>
Cc: Marc Dionne <marc.c.dionne@gmail.com>
---
It actually was a single fall out I missed. This is the proper fix
and verfied on ck804.
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
index 109b074..858f706 100644
--- a/drivers/ata/sata_nv.c
+++ b/drivers/ata/sata_nv.c
@@ -1591,13 +1591,16 @@ static void nv_mcp55_thaw(struct ata_port *ap)
static int nv_hardreset(struct ata_link *link, unsigned int *class,
unsigned long deadline)
{
- unsigned int dummy;
+ int rc;
/* SATA hardreset fails to retrieve proper device signature on
- * some controllers. Don't classify on hardreset. For more
- * info, see http://bugzilla.kernel.org/show_bug.cgi?id=3352
+ * some controllers. Request follow up SRST. For more info,
+ * see http://bugzilla.kernel.org/show_bug.cgi?id=3352
*/
- return sata_sff_hardreset(link, &dummy, deadline);
+ rc = sata_sff_hardreset(link, class, deadline);
+ if (rc)
+ return rc;
+ return -EAGAIN;
}
static void nv_adma_error_handler(struct ata_port *ap)
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH #upstream-fixes] sata_nv: make hardreset return -EAGAIN on success
2008-04-23 3:14 [PATCH #upstream-fixes] sata_nv: make hardreset return -EAGAIN on success Tejun Heo
@ 2008-04-23 3:24 ` Roland Dreier
2008-04-23 10:44 ` Marc Dionne
2008-04-25 4:48 ` Jeff Garzik
2 siblings, 0 replies; 4+ messages in thread
From: Roland Dreier @ 2008-04-23 3:24 UTC (permalink / raw)
To: Tejun Heo
Cc: marc.c.dionne, Petr Vandrovec, IDE/ATA development list,
Jeff Garzik
> sata_nv hardreset can't classify but was left out while unifying
> follow-up SRST request mechanism[1]. This caused detection failures
> on those controllers. Fix it.
Yep, fixes my system too.
Tested-by: Roland Dreier <rolandd@cisco.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH #upstream-fixes] sata_nv: make hardreset return -EAGAIN on success
2008-04-23 3:14 [PATCH #upstream-fixes] sata_nv: make hardreset return -EAGAIN on success Tejun Heo
2008-04-23 3:24 ` Roland Dreier
@ 2008-04-23 10:44 ` Marc Dionne
2008-04-25 4:48 ` Jeff Garzik
2 siblings, 0 replies; 4+ messages in thread
From: Marc Dionne @ 2008-04-23 10:44 UTC (permalink / raw)
To: Tejun Heo
Cc: Petr Vandrovec, Roland Dreier, IDE/ATA development list,
Jeff Garzik
Tejun Heo wrote:
> sata_nv hardreset can't classify but was left out while unifying
> follow-up SRST request mechanism[1]. This caused detection failures
> on those controllers. Fix it.
This works fine for me on CK804.
Thanks,
Marc
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH #upstream-fixes] sata_nv: make hardreset return -EAGAIN on success
2008-04-23 3:14 [PATCH #upstream-fixes] sata_nv: make hardreset return -EAGAIN on success Tejun Heo
2008-04-23 3:24 ` Roland Dreier
2008-04-23 10:44 ` Marc Dionne
@ 2008-04-25 4:48 ` Jeff Garzik
2 siblings, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2008-04-25 4:48 UTC (permalink / raw)
To: Tejun Heo
Cc: marc.c.dionne, Petr Vandrovec, Roland Dreier,
IDE/ATA development list
Tejun Heo wrote:
> sata_nv hardreset can't classify but was left out while unifying
> follow-up SRST request mechanism[1]. This caused detection failures
> on those controllers. Fix it.
>
> Reported and bisected by Roland Dreier, Petr Vandrovec and Marc
> Dionne. Thanks guys.
>
> [1] 305d2a1ab137d11d573319c315748a87060fe82d
>
> Signed-off-by: Tejun Heo <htejun@gmail.com>
> Cc: Roland Dreier <rdreier@cisco.com>
> Cc: Petr Vandrovec <vandrove@vc.cvut.cz>
> Cc: Marc Dionne <marc.c.dionne@gmail.com>
> ---
> It actually was a single fall out I missed. This is the proper fix
> and verfied on ck804.
>
> diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
> index 109b074..858f706 100644
> --- a/drivers/ata/sata_nv.c
> +++ b/drivers/ata/sata_nv.c
> @@ -1591,13 +1591,16 @@ static void nv_mcp55_thaw(struct ata_port *ap)
> static int nv_hardreset(struct ata_link *link, unsigned int *class,
> unsigned long deadline)
> {
> - unsigned int dummy;
> + int rc;
>
> /* SATA hardreset fails to retrieve proper device signature on
> - * some controllers. Don't classify on hardreset. For more
> - * info, see http://bugzilla.kernel.org/show_bug.cgi?id=3352
> + * some controllers. Request follow up SRST. For more info,
> + * see http://bugzilla.kernel.org/show_bug.cgi?id=3352
> */
> - return sata_sff_hardreset(link, &dummy, deadline);
> + rc = sata_sff_hardreset(link, class, deadline);
> + if (rc)
> + return rc;
> + return -EAGAIN;
> }
applied
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-04-25 4:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-23 3:14 [PATCH #upstream-fixes] sata_nv: make hardreset return -EAGAIN on success Tejun Heo
2008-04-23 3:24 ` Roland Dreier
2008-04-23 10:44 ` Marc Dionne
2008-04-25 4:48 ` 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).