---
name: "ata_to_sense_error"
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_to_sense_error"
---

# ata\_to\_sense\_error(9)

convert ATA error to SCSI error

## NAME

ata\_to\_sense\_error - convert ATA error to SCSI error

## SYNOPSIS

**void ata\_to\_sense\_error(unsigned** *id***, u8** *drv\_stat***, u8** *drv\_err***, u8 \*** *sk***, u8 \*** *asc***, u8 \*** *ascq***, int** *verbose***);**

## ARGUMENTS

*id*

ATA device number

*drv\_stat*

value contained in ATA status register

*drv\_err*

value contained in ATA error register

*sk*

the sense key we'll fill out

*asc*

the additional sense code we'll fill out

*ascq*

the additional sense code qualifier we'll fill out

*verbose*

be verbose

## DESCRIPTION

Converts an ATA error into a SCSI error. Fill out pointers to SK, ASC, and ASCQ bytes for later use in fixed or descriptor format sense blocks.

LOCKING: spin\_lock\_irqsave(host lock)

## AUTHOR

**Jeff Garzik**

Author.

## COPYRIGHT
