Name

ata_build_rw_tf — Build ATA taskfile for given read/write request

Synopsis

int ata_build_rw_tf (struct ata_taskfile * tf,
 struct ata_device * dev,
 u64 block,
 u32 n_block,
 unsigned int tf_flags,
 unsigned int tag,
 int class);
 

Arguments

struct ata_taskfile * tf

Target ATA taskfile

struct ata_device * dev

ATA device tf belongs to

u64 block

Block address

u32 n_block

Number of blocks

unsigned int tf_flags

RW/FUA etc...

unsigned int tag

tag

int class

IO priority class

Description

LOCKING: None.

Build ATA taskfile tf for read/write request described by block, n_block, tf_flags and tag on dev.

Return

0 on success, -ERANGE if the request is too large for dev, -EINVAL if the request is invalid.