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

## Name

ata_scsi_qc_new — acquire new ata_queued_cmd reference

## Synopsis

`struct ata_queued_cmd * ata_scsi_qc_new (` | struct ata_device * | dev,
| struct scsi_cmnd * | cmd,
| void (* | done`(`struct scsi_cmnd *`)``)`;

## Arguments

`dev`

  ATA device to which the new command is attached

`cmd`

  SCSI command that originated this ATA command

`done`

  SCSI command completion function

## Description

Obtain a reference to an unused ata_queued_cmd structure, which is the basic libata structure representing a single ATA command sent to the hardware.

If a command was available, fill in the SCSI-specific portions of the structure with information on the current command.

## LOCKING

spin_lock_irqsave(host lock)

## RETURNS

Command allocated, or `NULL` if none available.

Prev | Up | Next
ata_task_ioctl | Home | ata_dump_status