diff options
author | Tejun Heo <htejun@gmail.com> | 2008-05-19 01:15:05 +0900 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-05-19 17:51:47 -0400 |
commit | 0cbf0711a1ebcc4d3aea8e11def684afc2c07ef8 (patch) | |
tree | 459d346c5e16c4251346544561a4d71f87634975 /drivers | |
parent | 7715a6f9cdb9c1422d2b1f4fea21b1fe86b5b0fe (diff) | |
download | linux-0cbf0711a1ebcc4d3aea8e11def684afc2c07ef8.tar.bz2 |
libata: fix sata_link_hardreset() @online out parameter handling
The @online out parameter is supposed to set to true iff link is
online and reset succeeded as advertised in the function description
and callers are coded expecting that. However, sata_link_reset()
didn't behave this way on device readiness test failure. Fix it.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ata/libata-core.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 927b692d723c..c6c316fc8379 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -3653,9 +3653,13 @@ int sata_link_hardreset(struct ata_link *link, const unsigned long *timing, if (check_ready) rc = ata_wait_ready(link, deadline, check_ready); out: - if (rc && rc != -EAGAIN) + if (rc && rc != -EAGAIN) { + /* online is set iff link is online && reset succeeded */ + if (online) + *online = false; ata_link_printk(link, KERN_ERR, "COMRESET failed (errno=%d)\n", rc); + } DPRINTK("EXIT, rc=%d\n", rc); return rc; } |