diff options
author | Tejun Heo <htejun@gmail.com> | 2008-05-18 12:15:05 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-05-19 17:51:47 -0400 |
commit | 0cbf0711a1ebcc4d3aea8e11def684afc2c07ef8 (patch) | |
tree | 459d346c5e16c4251346544561a4d71f87634975 | |
parent | 7715a6f9cdb9c1422d2b1f4fea21b1fe86b5b0fe (diff) |
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>
-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, | |||
3653 | if (check_ready) | 3653 | if (check_ready) |
3654 | rc = ata_wait_ready(link, deadline, check_ready); | 3654 | rc = ata_wait_ready(link, deadline, check_ready); |
3655 | out: | 3655 | out: |
3656 | if (rc && rc != -EAGAIN) | 3656 | if (rc && rc != -EAGAIN) { |
3657 | /* online is set iff link is online && reset succeeded */ | ||
3658 | if (online) | ||
3659 | *online = false; | ||
3657 | ata_link_printk(link, KERN_ERR, | 3660 | ata_link_printk(link, KERN_ERR, |
3658 | "COMRESET failed (errno=%d)\n", rc); | 3661 | "COMRESET failed (errno=%d)\n", rc); |
3662 | } | ||
3659 | DPRINTK("EXIT, rc=%d\n", rc); | 3663 | DPRINTK("EXIT, rc=%d\n", rc); |
3660 | return rc; | 3664 | return rc; |
3661 | } | 3665 | } |