ata_wait_register(9)

ata_wait_register9

Wait until register value changes

Usage

u32 ata_wait_register(struct ata_port * ap, void __iomem * reg, u32 mask, u32 val, unsigned long interval, unsigned long timeout);

Arguments

ap

ATA port to wait register for, can be NULL

reg

IO-mapped register

mask

Mask to apply to read register value

val

Wait condition

interval

polling interval in milliseconds

timeout

timeout in milliseconds

Overview

Waiting for some bits of register to change is a common operation for ATA controllers. This function reads 32bit LE IO-mapped register reg and tests for the following condition.

(*reg & mask) != val

If the condition is met, it returns; otherwise, the process is repeated after interval_msec until timeout.

LOCKING: Kernel thread context (may sleep)

Return

The final register value.

Releases

6 releases since Debian 4.0 (Etch); the text changed 5 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7
  5. 8
  6. 9

Author

Jeff Garzik

Author.

From linux-manual-4.9 4.9.228-1 in Debian 9 (Stretch). Parsed by carta from the page's man source.