Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 6050
b: refs/heads/master
c: 40e8c82
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Aug 23, 2005
1 parent 7a9873d commit 93158fc
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c1389503710ef4b4e5d21bea284afde19e9619cf
refs/heads/master: 40e8c82c74b9be793601e098fd1313bc2632c5dc
34 changes: 24 additions & 10 deletions trunk/drivers/scsi/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2401,6 +2401,26 @@ static int ata_sg_setup(struct ata_queued_cmd *qc)
return 0;
}

/**
* ata_poll_qc_complete - turn irq back on and finish qc
* @qc: Command to complete
* @drv_stat: ATA status register content
*
* LOCKING:
* None. (grabs host lock)
*/

void ata_poll_qc_complete(struct ata_queued_cmd *qc, u8 drv_stat)
{
struct ata_port *ap = qc->ap;

spin_lock_irq(&ap->host_set->lock);
ap->flags &= ~ATA_FLAG_NOINTR;
ata_irq_on(ap);
ata_qc_complete(qc, drv_stat);
spin_unlock_irq(&ap->host_set->lock);
}

/**
* ata_pio_poll -
* @ap:
Expand Down Expand Up @@ -2492,9 +2512,7 @@ static void ata_pio_complete (struct ata_port *ap)

ap->pio_task_state = PIO_ST_IDLE;

ata_irq_on(ap);

ata_qc_complete(qc, drv_stat);
ata_poll_qc_complete(qc, drv_stat);
}


Expand Down Expand Up @@ -2844,9 +2862,7 @@ static void ata_pio_block(struct ata_port *ap)
if ((status & ATA_DRQ) == 0) {
ap->pio_task_state = PIO_ST_IDLE;

ata_irq_on(ap);

ata_qc_complete(qc, status);
ata_poll_qc_complete(qc, status);
return;
}

Expand Down Expand Up @@ -2876,9 +2892,7 @@ static void ata_pio_error(struct ata_port *ap)

ap->pio_task_state = PIO_ST_IDLE;

ata_irq_on(ap);

ata_qc_complete(qc, drv_stat | ATA_ERR);
ata_poll_qc_complete(qc, drv_stat | ATA_ERR);
}

static void ata_pio_task(void *_data)
Expand Down Expand Up @@ -3791,7 +3805,7 @@ static void atapi_packet_task(void *_data)
return;

err_out:
ata_qc_complete(qc, ATA_ERR);
ata_poll_qc_complete(qc, ATA_ERR);
}


Expand Down

0 comments on commit 93158fc

Please sign in to comment.