diff options
author | Tejun Heo <htejun@gmail.com> | 2008-04-07 09:47:19 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-04-17 15:44:22 -0400 |
commit | 9dadd45b24145d6aee2fabb28d7aef972301892b (patch) | |
tree | c97c323e2edd400bc94eaceddf20f84e9a6da005 /include/linux | |
parent | a89611e8489ac24f371c9fd6fef6605b170b16ba (diff) |
libata: move generic hardreset code from sata_sff_hardreset() to sata_link_hardreset()
sata_sff_hardreset() contains link readiness wait logic which isn't
SFF specific. Move that part into sata_link_hardreset(), which now
takes two more parameters - @online and @check_ready. Both are
optional. The former is out parameter for link onlineness after
reset. The latter is used to wait for link readiness after hardreset.
Users of sata_link_hardreset() is updated to use new funtionality and
ahci_hardreset() is updated to use sata_link_hardreset() instead of
sata_sff_hardreset(). This doesn't really cause any behavior change.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/libata.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 4bbf2524e473..d9ebce2bf5e7 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -261,6 +261,13 @@ enum { | |||
261 | */ | 261 | */ |
262 | ATA_WAIT_AFTER_RESET_MSECS = 150, | 262 | ATA_WAIT_AFTER_RESET_MSECS = 150, |
263 | 263 | ||
264 | /* If PMP is supported, we have to do follow-up SRST. As some | ||
265 | * PMPs don't send D2H Reg FIS after hardreset, LLDs are | ||
266 | * advised to wait only for the following duration before | ||
267 | * doing SRST. | ||
268 | */ | ||
269 | ATA_TMOUT_PMP_SRST_WAIT = 1 * HZ, | ||
270 | |||
264 | /* ATA bus states */ | 271 | /* ATA bus states */ |
265 | BUS_UNKNOWN = 0, | 272 | BUS_UNKNOWN = 0, |
266 | BUS_DMA = 1, | 273 | BUS_DMA = 1, |
@@ -844,7 +851,8 @@ extern int sata_link_debounce(struct ata_link *link, | |||
844 | extern int sata_link_resume(struct ata_link *link, const unsigned long *params, | 851 | extern int sata_link_resume(struct ata_link *link, const unsigned long *params, |
845 | unsigned long deadline); | 852 | unsigned long deadline); |
846 | extern int sata_link_hardreset(struct ata_link *link, | 853 | extern int sata_link_hardreset(struct ata_link *link, |
847 | const unsigned long *timing, unsigned long deadline); | 854 | const unsigned long *timing, unsigned long deadline, |
855 | bool *online, int (*check_ready)(struct ata_link *)); | ||
848 | extern void ata_std_postreset(struct ata_link *link, unsigned int *classes); | 856 | extern void ata_std_postreset(struct ata_link *link, unsigned int *classes); |
849 | extern void ata_port_disable(struct ata_port *); | 857 | extern void ata_port_disable(struct ata_port *); |
850 | 858 | ||