ata_dev_try_classify
Prev | Chapter 4. libata Library | Next

## Name

ata_dev_try_classify — Parse returned ATA device signature

## Synopsis

`unsigned int ata_dev_try_classify (` | struct ata_device * | dev,
| int | present,
| u8 * | r_err`)`;

## Arguments

`dev`

  ATA device to classify (starting at zero)

`present`

  device seems present

`r_err`

  Value of error register on completion

## Description

After an event -- SRST, E.D.D., or SATA COMRESET -- occurs, an ATA/ATAPI-defined set of values is placed in the ATA shadow registers, indicating the results of device detection and diagnostics.

Select the ATA device, and read the values from the ATA shadow registers. Then parse according to the Error register value, and the spec-defined values examined by `ata_dev_classify`.

## LOCKING

caller.

## RETURNS

Device type - `ATA_DEV_ATA`, `ATA_DEV_ATAPI` or `ATA_DEV_NONE`.

Prev | Up | Next
ata_dev_classify | Home | ata_id_string