---
name: "ata_scmd_need_defer"
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_scmd_need_defer"
---

# ata\_scmd\_need\_defer(9)

Check whether we need to defer scmd

## NAME

ata\_scmd\_need\_defer - Check whether we need to defer scmd

## SYNOPSIS

**int ata\_scmd\_need\_defer(struct ata\_device \*** *dev***, int** *is\_io***);**

## ARGUMENTS

*dev*

ATA device to which the command is addressed

*is\_io*

Is the command IO (and thus possibly NCQ)?

## DESCRIPTION

NCQ and non-NCQ commands cannot run together. As upper layer only knows the queue depth, we are responsible for maintaining exclusion. This function checks whether a new command can be issued to *dev*.

## LOCKING

spin\_lock\_irqsave(host\_set lock)

## RETURNS

1 if deferring is needed, 0 otherwise.

## AUTHOR

**Jeff Garzik**

-

  Author.

## COPYRIGHT
