mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-20 22:01:56 +00:00
libata: separate out ata_wait_ready() and implement ata_wait_after_reset()
Factor out waiting logic (which is common to all ATA controllers) from ata_sff_wait_ready() into ata_wait_ready(). ata_wait_ready() takes @check_ready function pointer and uses it to poll for readiness. This allows non-SFF controllers to use ata_wait_ready() to wait for link readiness. This patch also implements ata_wait_after_reset() - generic version of ata_sff_wait_after_reset() - using ata_wait_ready(). ata_sff_wait_ready() is reimplemented using ata_wait_ready() and ata_sff_check_ready(). Functionality remains the same. Signed-off-by: Tejun Heo <htejun@gmail.com>
This commit is contained in:
parent
705e76beb9
commit
aa2731ad9a
4 changed files with 114 additions and 50 deletions
|
@ -837,6 +837,8 @@ extern void sata_print_link_status(struct ata_link *link);
|
|||
extern void ata_port_probe(struct ata_port *);
|
||||
extern int sata_set_spd(struct ata_link *link);
|
||||
extern int ata_std_prereset(struct ata_link *link, unsigned long deadline);
|
||||
extern int ata_wait_after_reset(struct ata_link *link, unsigned long deadline,
|
||||
int (*check_ready)(struct ata_link *link));
|
||||
extern int sata_link_debounce(struct ata_link *link,
|
||||
const unsigned long *params, unsigned long deadline);
|
||||
extern int sata_link_resume(struct ata_link *link, const unsigned long *params,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue