---
name: "ata_scsi_set_sense"
section: "9"
platform: "linux"
package: "linux-manual-2.6.18"
version: "2.6.18.dfsg.1-26etch2"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/ata_scsi_set_sense"
---

# ata\_scsi\_set\_sense(9)

Set SCSI sense data and status

## NAME

ata\_scsi\_set\_sense - Set SCSI sense data and status

## SYNOPSIS

**void ata\_scsi\_set\_sense(struct scsi\_cmnd \*** *cmd***, u8** *sk***, u8** *asc***, u8** *ascq***);**

## ARGUMENTS

*cmd*

SCSI request to be handled

*sk*

SCSI-defined sense key

*asc*

SCSI-defined additional sense code

*ascq*

SCSI-defined additional sense code qualifier

## DESCRIPTION

Helper function that builds a valid fixed format, current response code and the given sense key (sk), additional sense code (asc) and additional sense code qualifier (ascq) with a SCSI command status of **SAM\_STAT\_CHECK\_CONDITION** and

## DRIVER\_SENSE SET IN THE UPPER BITS OF SCSI\_CMND

:result .

## LOCKING

Not required

## AUTHOR

**Jeff Garzik**

-

  Author.

## COPYRIGHT
