ata_scsi_badcmd
Prev | Chapter 6. libata SCSI translation/emulation | Next

## Name

ata_scsi_badcmd — End a SCSI request with an error

## Synopsis

`void ata_scsi_badcmd (` | struct scsi_cmnd * | cmd,
| void (* | done`(`struct scsi_cmnd *`)`,
| u8 | asc,
| u8 | ascq`)`;

## Arguments

`cmd`

  SCSI request to be handled

`done`

  SCSI command completion function

`asc`

  SCSI-defined additional sense code

`ascq`

  SCSI-defined additional sense code qualifier

## Description

Helper function that completes a SCSI command with `SAM_STAT_CHECK_CONDITION`, with a sense key `ILLEGAL_REQUEST` and the specified additional sense codes.

## LOCKING

spin_lock_irqsave(host lock)

Prev | Up | Next
ata_scsi_set_sense | Home | atapi_xlat