diff options
author | Tejun Heo <htejun@gmail.com> | 2006-04-02 04:54:46 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-04-02 10:02:57 -0400 |
commit | 14d2bac1877ed4e2cc940d1680db1a4f29225811 (patch) | |
tree | 60b478485e7453dd5a41aea34699a305dd3c8d2c /include/linux/libata.h | |
parent | cf176e1aa92eb2a3faea8409e841396a66413937 (diff) |
[PATCH] libata: improve ata_bus_probe()
Improve ata_bus_probe() such that configuration failures are handled
better. Each device is given ATA_PROBE_MAX_TRIES chances, but any
non-transient error (revalidation failure with -ENODEV, configuration
failure with -EINVAL...) disables the device directly. Any IO error
results in SATA PHY speed down and ata_set_mode() failure lowers
transfer mode. The last try always puts a device into PIO-0.
After each failure, the whole port is reset to make sure that the
controller and all the devices are in a known and stable state. The
reset also applies SATA SPD configuration if necessary.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r-- | include/linux/libata.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index a5207e66ca52..a4a1e6304e78 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -211,6 +211,9 @@ enum { | |||
211 | /* Masks for port functions */ | 211 | /* Masks for port functions */ |
212 | ATA_PORT_PRIMARY = (1 << 0), | 212 | ATA_PORT_PRIMARY = (1 << 0), |
213 | ATA_PORT_SECONDARY = (1 << 1), | 213 | ATA_PORT_SECONDARY = (1 << 1), |
214 | |||
215 | /* how hard are we gonna try to probe/recover devices */ | ||
216 | ATA_PROBE_MAX_TRIES = 3, | ||
214 | }; | 217 | }; |
215 | 218 | ||
216 | enum hsm_task_states { | 219 | enum hsm_task_states { |