Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 21795
b: refs/heads/master
c: 9506437
h: refs/heads/master
i:
  21793: 9324f02
  21791: 9deb583
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Jan 27, 2006
1 parent 59a6ed0 commit d81a6a4
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 7 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: a72ec4ce6d3ae92e76baf5b2c65cc26e5e775e83
refs/heads/master: 9506437921504df18c6601f7d09bb23d72d2f6ba
30 changes: 24 additions & 6 deletions trunk/drivers/scsi/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1072,6 +1072,24 @@ static unsigned int ata_pio_modes(const struct ata_device *adev)
timing API will get this right anyway */
}

static inline void
ata_queue_packet_task(struct ata_port *ap)
{
queue_work(ata_wq, &ap->packet_task);
}

static inline void
ata_queue_pio_task(struct ata_port *ap)
{
queue_work(ata_wq, &ap->pio_task);
}

static inline void
ata_queue_delayed_pio_task(struct ata_port *ap, unsigned long delay)
{
queue_delayed_work(ata_wq, &ap->pio_task, delay);
}

void ata_qc_complete_internal(struct ata_queued_cmd *qc)
{
struct completion *waiting = qc->private_data;
Expand Down Expand Up @@ -3414,7 +3432,7 @@ static void ata_pio_task(void *_data)
}

if (timeout)
queue_delayed_work(ata_wq, &ap->pio_task, timeout);
ata_queue_delayed_pio_task(ap, timeout);
else if (!qc_completed)
goto fsm_start;
}
Expand Down Expand Up @@ -3737,26 +3755,26 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc)
ata_qc_set_polling(qc);
ata_tf_to_host(ap, &qc->tf);
ap->hsm_task_state = HSM_ST;
queue_work(ata_wq, &ap->pio_task);
ata_queue_pio_task(ap);
break;

case ATA_PROT_ATAPI:
ata_qc_set_polling(qc);
ata_tf_to_host(ap, &qc->tf);
queue_work(ata_wq, &ap->packet_task);
ata_queue_packet_task(ap);
break;

case ATA_PROT_ATAPI_NODATA:
ap->flags |= ATA_FLAG_NOINTR;
ata_tf_to_host(ap, &qc->tf);
queue_work(ata_wq, &ap->packet_task);
ata_queue_packet_task(ap);
break;

case ATA_PROT_ATAPI_DMA:
ap->flags |= ATA_FLAG_NOINTR;
ap->ops->tf_load(ap, &qc->tf); /* load tf registers */
ap->ops->bmdma_setup(qc); /* set up bmdma */
queue_work(ata_wq, &ap->packet_task);
ata_queue_packet_task(ap);
break;

default:
Expand Down Expand Up @@ -4187,7 +4205,7 @@ static void atapi_packet_task(void *_data)

/* PIO commands are handled by polling */
ap->hsm_task_state = HSM_ST;
queue_work(ata_wq, &ap->pio_task);
ata_queue_pio_task(ap);
}

return;
Expand Down

0 comments on commit d81a6a4

Please sign in to comment.