Skip to content

Commit

Permalink
sata_nv: make hardreset return -EAGAIN on success
Browse files Browse the repository at this point in the history
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] 305d2a1

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>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Apr 25, 2008
1 parent 15fe982 commit a0b9f4b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions drivers/ata/sata_nv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a0b9f4b

Please sign in to comment.