diff options
author | Tejun Heo <htejun@gmail.com> | 2008-05-18 18:15:05 +0200 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-05-19 23:51:47 +0200 |
commit | 0cbf0711a1ebcc4d3aea8e11def684afc2c07ef8 (patch) | |
tree | 459d346c5e16c4251346544561a4d71f87634975 /drivers/ata | |
parent | sata_promise: other cleanups (diff) | |
download | linux-0cbf0711a1ebcc4d3aea8e11def684afc2c07ef8.tar.xz linux-0cbf0711a1ebcc4d3aea8e11def684afc2c07ef8.zip |
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/ata')
-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; } |