Commit 4801224e authored by Jeff Garzik's avatar Jeff Garzik

[libata] use new ->bmdma_{start,setup} method to properly support ATAPI

parent 8fdb45f5
...@@ -2445,7 +2445,7 @@ static int ata_qc_issue_prot(struct ata_queued_cmd *qc) ...@@ -2445,7 +2445,7 @@ static int ata_qc_issue_prot(struct ata_queued_cmd *qc)
case ATA_PROT_DMA: case ATA_PROT_DMA:
ap->ops->tf_load(ap, &qc->tf); /* load tf registers */ ap->ops->tf_load(ap, &qc->tf); /* load tf registers */
ap->ops->bmdma_setup(qc); /* initiate bmdma */ ap->ops->bmdma_setup(qc); /* set up bmdma */
ap->ops->bmdma_start(qc); /* initiate bmdma */ ap->ops->bmdma_start(qc); /* initiate bmdma */
break; break;
...@@ -2457,6 +2457,13 @@ static int ata_qc_issue_prot(struct ata_queued_cmd *qc) ...@@ -2457,6 +2457,13 @@ static int ata_qc_issue_prot(struct ata_queued_cmd *qc)
queue_work(ata_wq, &ap->pio_task); queue_work(ata_wq, &ap->pio_task);
break; break;
case ATA_PROT_ATAPI:
case ATA_PROT_ATAPI_DMA:
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);
break;
default: default:
WARN_ON(1); WARN_ON(1);
return -1; return -1;
...@@ -2843,7 +2850,7 @@ static void atapi_packet_task(void *_data) ...@@ -2843,7 +2850,7 @@ static void atapi_packet_task(void *_data)
/* if we are DMA'ing, irq handler takes over from here */ /* if we are DMA'ing, irq handler takes over from here */
if (qc->tf.protocol == ATA_PROT_ATAPI_DMA) { if (qc->tf.protocol == ATA_PROT_ATAPI_DMA) {
/* FIXME: start DMA here */ ap->ops->bmdma_start(qc); /* initiate bmdma */
} else { } else {
ap->pio_task_state = PIO_ST; ap->pio_task_state = PIO_ST;
queue_work(ata_wq, &ap->pio_task); queue_work(ata_wq, &ap->pio_task);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment