1. NAME

ata_qc_complete_multiple - Complete multiple qcs successfully

2. SYNOPSIS

int ata_qc_complete_multiple(struct ata_port *  ap , u32  qc_active );

3. ARGUMENTS

ap
    port in question

qc_active
    new qc_active mask

4. DESCRIPTION

Complete in-flight commands. This functions is meant to be called from low-level driverAqs 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.

5. LOCKING

spin_lock_irqsave(host lock)

6. RETURNS

Number of completed commands on success, -errno otherwise.

7. AUTHOR

Jeff Garzik
    Author.

8. COPYRIGHT