---
name: "ata_qc_complete_multiple"
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_qc_complete_multiple"
---

# ata\_qc\_complete\_multiple(9)

Complete multiple qcs successfully

## NAME

ata\_qc\_complete\_multiple - Complete multiple qcs successfully

## SYNOPSIS

**int ata\_qc\_complete\_multiple(struct ata\_port \*** *ap***, u32** *qc\_active***);**

## ARGUMENTS

*ap*

port in question

*qc\_active*

new qc\_active mask

## DESCRIPTION

Complete in-flight commands. This functions is meant to be called from low-level driver's interrupt routine to complete requests normally. ap-\>qc\_active and *qc\_active* is compared and commands are completed accordingly.

Always use this function when completing multiple NCQ commands from IRQ handlers instead of calling **ata\_qc\_complete** multiple times to keep IRQ expect status properly in sync.

LOCKING: spin\_lock\_irqsave(host lock)

## RETURN

Number of completed commands on success, -errno otherwise.

## AUTHOR

**Jeff Garzik**

Author.

## COPYRIGHT
