---
name: "ata_build_rw_tf"
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_build_rw_tf"
---

# ata\_build\_rw\_tf(9)

Build ATA taskfile for given read/write request

## 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***);**

## ARGUMENTS

*tf*

Target ATA taskfile

*dev*

ATA device *tf* belongs to

*block*

Block address

*n\_block*

Number of blocks

*tf\_flags*

RW/FUA etc...

*tag*

tag

## 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.

## AUTHOR

**Jeff Garzik**

Author.

## COPYRIGHT
