---
name: "ata_wait_ready"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/ata_wait_ready"
---

# ata\_wait\_ready(9)

wait for link to become ready

## NAME

ata\_wait\_ready - wait for link to become ready

## SYNOPSIS

**int ata\_wait\_ready(struct ata\_link \*** *link***, unsigned long** *deadline***, int (\****check\_ready***) (struct ata\_link \*link));**

## ARGUMENTS

*link*

link to be waited on

*deadline*

deadline jiffies for the operation

*check\_ready*

callback to check link readiness

## DESCRIPTION

Wait for *link* to become ready. *check\_ready* should return positive number if *link* is ready, 0 if it isn't, -ENODEV if link doesn't seem to be occupied, other errno for other error conditions.

Transient -ENODEV conditions are allowed for ATA\_TMOUT\_FF\_WAIT.

LOCKING: EH context.

## RETURN

0 if *link* is ready before *deadline*; otherwise, -errno.

## AUTHOR

**Jeff Garzik**

Author.

## COPYRIGHT
