diff options
author | Tejun Heo <htejun@gmail.com> | 2006-04-02 20:55:02 +0900 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-04-02 10:02:57 -0400 |
commit | edbabd8679a39faef67def4438c9cbccb5c05c5d (patch) | |
tree | dec165edf531bba3adf7c95239f14ded5d48c9f3 /drivers/scsi/libata-core.c | |
parent | 90dac02c08dabd471927f151b8393eb51e3e020e (diff) | |
download | lwn-edbabd8679a39faef67def4438c9cbccb5c05c5d.tar.gz lwn-edbabd8679a39faef67def4438c9cbccb5c05c5d.zip |
[PATCH] libata: add 5s sleep between resets
Some devices react badly if resets are performed back-to-back. Give
devices some time to breath and tell user that we're taking a nap.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/scsi/libata-core.c')
-rw-r--r-- | drivers/scsi/libata-core.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 4fd24075afd2..3ddfbe1b86c6 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -2582,6 +2582,9 @@ int ata_drive_probe_reset(struct ata_port *ap, ata_probeinit_fn_t probeinit, rc = ata_do_reset(ap, softreset, postreset, 0, classes); if (rc == 0 && classes[0] != ATA_DEV_UNKNOWN) goto done; + printk(KERN_INFO "ata%u: softreset failed, will try " + "hardreset in 5 secs\n", ap->id); + ssleep(5); } if (!hardreset) @@ -2597,10 +2600,20 @@ int ata_drive_probe_reset(struct ata_port *ap, ata_probeinit_fn_t probeinit, if (ata_down_sata_spd_limit(ap)) goto done; + + printk(KERN_INFO "ata%u: hardreset failed, will retry " + "in 5 secs\n", ap->id); + ssleep(5); } - if (softreset) + if (softreset) { + printk(KERN_INFO "ata%u: hardreset succeeded without " + "classification, will retry softreset in 5 secs\n", + ap->id); + ssleep(5); + rc = ata_do_reset(ap, softreset, postreset, 0, classes); + } done: if (rc == 0 && classes[0] == ATA_DEV_UNKNOWN) |