---
name: "ata_dev_read_id"
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_dev_read_id"
---

# ata\_dev\_read\_id(9)

Read ID data from the specified device

## NAME

ata\_dev\_read\_id - Read ID data from the specified device

## SYNOPSIS

**int ata\_dev\_read\_id(struct ata\_device \*** *dev***, unsigned int \*** *p\_class***, unsigned int** *flags***, u16 \*** *id***);**

## ARGUMENTS

*dev*

target device

*p\_class*

pointer to class of the target device (may be changed)

*flags*

ATA\_READID\_\* flags

*id*

buffer to read IDENTIFY data into

## DESCRIPTION

Read ID data from the specified device. ATA\_CMD\_ID\_ATA is performed on ATA devices and ATA\_CMD\_ID\_ATAPI on ATAPI devices. This function also issues ATA\_CMD\_INIT\_DEV\_PARAMS for pre-ATA4 drives.

FIXME: ATA\_CMD\_ID\_ATA is optional for early drives and right now we abort if we hit that case.

LOCKING: Kernel thread context (may sleep)

## RETURN

0 on success, -errno otherwise.

## AUTHOR

**Jeff Garzik**

Author.

## COPYRIGHT
