aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-12-18 16:34:43 -0500
committerJeff Garzik <jeff@garzik.org>2008-01-23 05:24:14 -0500
commit0dc36888d4422140f9eaf50f24953ec109f750a3 (patch)
tree80253b1831849e4063b73c31c15011c5e4c48404 /drivers/ata
parent537b53c1692960b8b3b0324e886fbe48cb9e5c00 (diff)
libata: rename ATA_PROT_ATAPI_* to ATAPI_PROT_*
ATA_PROT_ATAPI_* are ugly and naming schemes between ATA_PROT_* and ATA_PROT_ATAPI_* are inconsistent causing confusion. Rename them to ATAPI_PROT_* and make them consistent with ATA counterpart. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/libata-core.c28
-rw-r--r--drivers/ata/libata-eh.c8
-rw-r--r--drivers/ata/libata-scsi.c10
-rw-r--r--drivers/ata/libata-sff.c2
-rw-r--r--drivers/ata/pata_pdc202xx_old.c5
-rw-r--r--drivers/ata/pdc_adma.c2
-rw-r--r--drivers/ata/sata_inic162x.c2
-rw-r--r--drivers/ata/sata_promise.c26
-rw-r--r--drivers/ata/sata_qstor.c2
-rw-r--r--drivers/ata/sata_sx4.c2
10 files changed, 42 insertions, 45 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index c9e6bd4d068..2c9745a74d5 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -4678,8 +4678,8 @@ int ata_check_atapi_dma(struct ata_queued_cmd *qc)
4678 */ 4678 */
4679static int atapi_qc_may_overflow(struct ata_queued_cmd *qc) 4679static int atapi_qc_may_overflow(struct ata_queued_cmd *qc)
4680{ 4680{
4681 if (qc->tf.protocol != ATA_PROT_ATAPI && 4681 if (qc->tf.protocol != ATAPI_PROT_PIO &&
4682 qc->tf.protocol != ATA_PROT_ATAPI_DMA) 4682 qc->tf.protocol != ATAPI_PROT_DMA)
4683 return 0; 4683 return 0;
4684 4684
4685 if (qc->tf.flags & ATA_TFLAG_WRITE) 4685 if (qc->tf.flags & ATA_TFLAG_WRITE)
@@ -5161,13 +5161,13 @@ static void atapi_send_cdb(struct ata_port *ap, struct ata_queued_cmd *qc)
5161 ata_altstatus(ap); /* flush */ 5161 ata_altstatus(ap); /* flush */
5162 5162
5163 switch (qc->tf.protocol) { 5163 switch (qc->tf.protocol) {
5164 case ATA_PROT_ATAPI: 5164 case ATAPI_PROT_PIO:
5165 ap->hsm_task_state = HSM_ST; 5165 ap->hsm_task_state = HSM_ST;
5166 break; 5166 break;
5167 case ATA_PROT_ATAPI_NODATA: 5167 case ATAPI_PROT_NODATA:
5168 ap->hsm_task_state = HSM_ST_LAST; 5168 ap->hsm_task_state = HSM_ST_LAST;
5169 break; 5169 break;
5170 case ATA_PROT_ATAPI_DMA: 5170 case ATAPI_PROT_DMA:
5171 ap->hsm_task_state = HSM_ST_LAST; 5171 ap->hsm_task_state = HSM_ST_LAST;
5172 /* initiate bmdma */ 5172 /* initiate bmdma */
5173 ap->ops->bmdma_start(qc); 5173 ap->ops->bmdma_start(qc);
@@ -5518,7 +5518,7 @@ fsm_start:
5518 5518
5519 case HSM_ST: 5519 case HSM_ST:
5520 /* complete command or read/write the data register */ 5520 /* complete command or read/write the data register */
5521 if (qc->tf.protocol == ATA_PROT_ATAPI) { 5521 if (qc->tf.protocol == ATAPI_PROT_PIO) {
5522 /* ATAPI PIO protocol */ 5522 /* ATAPI PIO protocol */
5523 if ((status & ATA_DRQ) == 0) { 5523 if ((status & ATA_DRQ) == 0) {
5524 /* No more data to transfer or device error. 5524 /* No more data to transfer or device error.
@@ -6073,11 +6073,11 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc)
6073 switch (qc->tf.protocol) { 6073 switch (qc->tf.protocol) {
6074 case ATA_PROT_PIO: 6074 case ATA_PROT_PIO:
6075 case ATA_PROT_NODATA: 6075 case ATA_PROT_NODATA:
6076 case ATA_PROT_ATAPI: 6076 case ATAPI_PROT_PIO:
6077 case ATA_PROT_ATAPI_NODATA: 6077 case ATAPI_PROT_NODATA:
6078 qc->tf.flags |= ATA_TFLAG_POLLING; 6078 qc->tf.flags |= ATA_TFLAG_POLLING;
6079 break; 6079 break;
6080 case ATA_PROT_ATAPI_DMA: 6080 case ATAPI_PROT_DMA:
6081 if (qc->dev->flags & ATA_DFLAG_CDB_INTR) 6081 if (qc->dev->flags & ATA_DFLAG_CDB_INTR)
6082 /* see ata_dma_blacklisted() */ 6082 /* see ata_dma_blacklisted() */
6083 BUG(); 6083 BUG();
@@ -6141,8 +6141,8 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc)
6141 6141
6142 break; 6142 break;
6143 6143
6144 case ATA_PROT_ATAPI: 6144 case ATAPI_PROT_PIO:
6145 case ATA_PROT_ATAPI_NODATA: 6145 case ATAPI_PROT_NODATA:
6146 if (qc->tf.flags & ATA_TFLAG_POLLING) 6146 if (qc->tf.flags & ATA_TFLAG_POLLING)
6147 ata_qc_set_polling(qc); 6147 ata_qc_set_polling(qc);
6148 6148
@@ -6156,7 +6156,7 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc)
6156 ata_port_queue_task(ap, ata_pio_task, qc, 0); 6156 ata_port_queue_task(ap, ata_pio_task, qc, 0);
6157 break; 6157 break;
6158 6158
6159 case ATA_PROT_ATAPI_DMA: 6159 case ATAPI_PROT_DMA:
6160 WARN_ON(qc->tf.flags & ATA_TFLAG_POLLING); 6160 WARN_ON(qc->tf.flags & ATA_TFLAG_POLLING);
6161 6161
6162 ap->ops->tf_load(ap, &qc->tf); /* load tf registers */ 6162 ap->ops->tf_load(ap, &qc->tf); /* load tf registers */
@@ -6217,7 +6217,7 @@ inline unsigned int ata_host_intr(struct ata_port *ap,
6217 break; 6217 break;
6218 case HSM_ST_LAST: 6218 case HSM_ST_LAST:
6219 if (qc->tf.protocol == ATA_PROT_DMA || 6219 if (qc->tf.protocol == ATA_PROT_DMA ||
6220 qc->tf.protocol == ATA_PROT_ATAPI_DMA) { 6220 qc->tf.protocol == ATAPI_PROT_DMA) {
6221 /* check status of DMA engine */ 6221 /* check status of DMA engine */
6222 host_stat = ap->ops->bmdma_status(ap); 6222 host_stat = ap->ops->bmdma_status(ap);
6223 VPRINTK("ata%u: host_stat 0x%X\n", 6223 VPRINTK("ata%u: host_stat 0x%X\n",
@@ -6259,7 +6259,7 @@ inline unsigned int ata_host_intr(struct ata_port *ap,
6259 ata_hsm_move(ap, qc, status, 0); 6259 ata_hsm_move(ap, qc, status, 0);
6260 6260
6261 if (unlikely(qc->err_mask) && (qc->tf.protocol == ATA_PROT_DMA || 6261 if (unlikely(qc->err_mask) && (qc->tf.protocol == ATA_PROT_DMA ||
6262 qc->tf.protocol == ATA_PROT_ATAPI_DMA)) 6262 qc->tf.protocol == ATAPI_PROT_DMA))
6263 ata_ehi_push_desc(ehi, "BMDMA stat 0x%x", host_stat); 6263 ata_ehi_push_desc(ehi, "BMDMA stat 0x%x", host_stat);
6264 6264
6265 return 1; /* irq handled */ 6265 return 1; /* irq handled */
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 1bc1acf3bbb..419552603a1 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -1299,10 +1299,10 @@ static unsigned int atapi_eh_request_sense(struct ata_queued_cmd *qc)
1299 1299
1300 /* is it pointless to prefer PIO for "safety reasons"? */ 1300 /* is it pointless to prefer PIO for "safety reasons"? */
1301 if (ap->flags & ATA_FLAG_PIO_DMA) { 1301 if (ap->flags & ATA_FLAG_PIO_DMA) {
1302 tf.protocol = ATA_PROT_ATAPI_DMA; 1302 tf.protocol = ATAPI_PROT_DMA;
1303 tf.feature |= ATAPI_PKT_DMA; 1303 tf.feature |= ATAPI_PKT_DMA;
1304 } else { 1304 } else {
1305 tf.protocol = ATA_PROT_ATAPI; 1305 tf.protocol = ATAPI_PROT_PIO;
1306 tf.lbam = SCSI_SENSE_BUFFERSIZE; 1306 tf.lbam = SCSI_SENSE_BUFFERSIZE;
1307 tf.lbah = 0; 1307 tf.lbah = 0;
1308 } 1308 }
@@ -1979,8 +1979,8 @@ static void ata_eh_link_report(struct ata_link *link)
1979 [ATA_PROT_PIO] = "pio", 1979 [ATA_PROT_PIO] = "pio",
1980 [ATA_PROT_DMA] = "dma", 1980 [ATA_PROT_DMA] = "dma",
1981 [ATA_PROT_NCQ] = "ncq", 1981 [ATA_PROT_NCQ] = "ncq",
1982 [ATA_PROT_ATAPI] = "pio", 1982 [ATAPI_PROT_PIO] = "pio",
1983 [ATA_PROT_ATAPI_DMA] = "dma", 1983 [ATAPI_PROT_DMA] = "dma",
1984 }; 1984 };
1985 1985
1986 snprintf(data_buf, sizeof(data_buf), " %s %u %s", 1986 snprintf(data_buf, sizeof(data_buf), " %s %u %s",
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 021cdc4cc26..5fd780e509d 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -2354,10 +2354,10 @@ static void atapi_request_sense(struct ata_queued_cmd *qc)
2354 qc->tf.command = ATA_CMD_PACKET; 2354 qc->tf.command = ATA_CMD_PACKET;
2355 2355
2356 if (ata_pio_use_silly(ap)) { 2356 if (ata_pio_use_silly(ap)) {
2357 qc->tf.protocol = ATA_PROT_ATAPI_DMA; 2357 qc->tf.protocol = ATAPI_PROT_DMA;
2358 qc->tf.feature |= ATAPI_PKT_DMA; 2358 qc->tf.feature |= ATAPI_PKT_DMA;
2359 } else { 2359 } else {
2360 qc->tf.protocol = ATA_PROT_ATAPI; 2360 qc->tf.protocol = ATAPI_PROT_PIO;
2361 qc->tf.lbam = SCSI_SENSE_BUFFERSIZE; 2361 qc->tf.lbam = SCSI_SENSE_BUFFERSIZE;
2362 qc->tf.lbah = 0; 2362 qc->tf.lbah = 0;
2363 } 2363 }
@@ -2528,12 +2528,12 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc)
2528 if (using_pio || nodata) { 2528 if (using_pio || nodata) {
2529 /* no data, or PIO data xfer */ 2529 /* no data, or PIO data xfer */
2530 if (nodata) 2530 if (nodata)
2531 qc->tf.protocol = ATA_PROT_ATAPI_NODATA; 2531 qc->tf.protocol = ATAPI_PROT_NODATA;
2532 else 2532 else
2533 qc->tf.protocol = ATA_PROT_ATAPI; 2533 qc->tf.protocol = ATAPI_PROT_PIO;
2534 } else { 2534 } else {
2535 /* DMA data xfer */ 2535 /* DMA data xfer */
2536 qc->tf.protocol = ATA_PROT_ATAPI_DMA; 2536 qc->tf.protocol = ATAPI_PROT_DMA;
2537 qc->tf.feature |= ATAPI_PKT_DMA; 2537 qc->tf.feature |= ATAPI_PKT_DMA;
2538 2538
2539 if (atapi_dmadir && (scmd->sc_data_direction != DMA_TO_DEVICE)) 2539 if (atapi_dmadir && (scmd->sc_data_direction != DMA_TO_DEVICE))
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index fd5fe4e7e75..edeb4bea586 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -417,7 +417,7 @@ void ata_bmdma_drive_eh(struct ata_port *ap, ata_prereset_fn_t prereset,
417 ap->hsm_task_state = HSM_ST_IDLE; 417 ap->hsm_task_state = HSM_ST_IDLE;
418 418
419 if (qc && (qc->tf.protocol == ATA_PROT_DMA || 419 if (qc && (qc->tf.protocol == ATA_PROT_DMA ||
420 qc->tf.protocol == ATA_PROT_ATAPI_DMA)) { 420 qc->tf.protocol == ATAPI_PROT_DMA)) {
421 u8 host_stat; 421 u8 host_stat;
422 422
423 host_stat = ap->ops->bmdma_status(ap); 423 host_stat = ap->ops->bmdma_status(ap);
diff --git a/drivers/ata/pata_pdc202xx_old.c b/drivers/ata/pata_pdc202xx_old.c
index 6c9689b59b0..3ed866723e0 100644
--- a/drivers/ata/pata_pdc202xx_old.c
+++ b/drivers/ata/pata_pdc202xx_old.c
@@ -168,8 +168,7 @@ static void pdc2026x_bmdma_start(struct ata_queued_cmd *qc)
168 pdc202xx_set_dmamode(ap, qc->dev); 168 pdc202xx_set_dmamode(ap, qc->dev);
169 169
170 /* Cases the state machine will not complete correctly without help */ 170 /* Cases the state machine will not complete correctly without help */
171 if ((tf->flags & ATA_TFLAG_LBA48) || tf->protocol == ATA_PROT_ATAPI_DMA) 171 if ((tf->flags & ATA_TFLAG_LBA48) || tf->protocol == ATAPI_PROT_DMA) {
172 {
173 len = qc->nbytes / 2; 172 len = qc->nbytes / 2;
174 173
175 if (tf->flags & ATA_TFLAG_WRITE) 174 if (tf->flags & ATA_TFLAG_WRITE)
@@ -208,7 +207,7 @@ static void pdc2026x_bmdma_stop(struct ata_queued_cmd *qc)
208 void __iomem *atapi_reg = master + 0x20 + (4 * ap->port_no); 207 void __iomem *atapi_reg = master + 0x20 + (4 * ap->port_no);
209 208
210 /* Cases the state machine will not complete correctly */ 209 /* Cases the state machine will not complete correctly */
211 if (tf->protocol == ATA_PROT_ATAPI_DMA || ( tf->flags & ATA_TFLAG_LBA48)) { 210 if (tf->protocol == ATAPI_PROT_DMA || (tf->flags & ATA_TFLAG_LBA48)) {
212 iowrite32(0, atapi_reg); 211 iowrite32(0, atapi_reg);
213 iowrite8(ioread8(clock) & ~sel66, clock); 212 iowrite8(ioread8(clock) & ~sel66, clock);
214 } 213 }
diff --git a/drivers/ata/pdc_adma.c b/drivers/ata/pdc_adma.c
index bd4c2a3c88d..459cb7bb7d7 100644
--- a/drivers/ata/pdc_adma.c
+++ b/drivers/ata/pdc_adma.c
@@ -455,7 +455,7 @@ static unsigned int adma_qc_issue(struct ata_queued_cmd *qc)
455 adma_packet_start(qc); 455 adma_packet_start(qc);
456 return 0; 456 return 0;
457 457
458 case ATA_PROT_ATAPI_DMA: 458 case ATAPI_PROT_DMA:
459 BUG(); 459 BUG();
460 break; 460 break;
461 461
diff --git a/drivers/ata/sata_inic162x.c b/drivers/ata/sata_inic162x.c
index 323c087e8cc..96e614a1c16 100644
--- a/drivers/ata/sata_inic162x.c
+++ b/drivers/ata/sata_inic162x.c
@@ -585,7 +585,7 @@ static struct ata_port_operations inic_port_ops = {
585}; 585};
586 586
587static struct ata_port_info inic_port_info = { 587static struct ata_port_info inic_port_info = {
588 /* For some reason, ATA_PROT_ATAPI is broken on this 588 /* For some reason, ATAPI_PROT_PIO is broken on this
589 * controller, and no, PIO_POLLING does't fix it. It somehow 589 * controller, and no, PIO_POLLING does't fix it. It somehow
590 * manages to report the wrong ireason and ignoring ireason 590 * manages to report the wrong ireason and ignoring ireason
591 * results in machine lock up. Tell libata to always prefer 591 * results in machine lock up. Tell libata to always prefer
diff --git a/drivers/ata/sata_promise.c b/drivers/ata/sata_promise.c
index 9638faaa811..01738d736d4 100644
--- a/drivers/ata/sata_promise.c
+++ b/drivers/ata/sata_promise.c
@@ -456,13 +456,13 @@ static void pdc_atapi_pkt(struct ata_queued_cmd *qc)
456 * and seq id (byte 2) 456 * and seq id (byte 2)
457 */ 457 */
458 switch (qc->tf.protocol) { 458 switch (qc->tf.protocol) {
459 case ATA_PROT_ATAPI_DMA: 459 case ATAPI_PROT_DMA:
460 if (!(qc->tf.flags & ATA_TFLAG_WRITE)) 460 if (!(qc->tf.flags & ATA_TFLAG_WRITE))
461 buf32[0] = cpu_to_le32(PDC_PKT_READ); 461 buf32[0] = cpu_to_le32(PDC_PKT_READ);
462 else 462 else
463 buf32[0] = 0; 463 buf32[0] = 0;
464 break; 464 break;
465 case ATA_PROT_ATAPI_NODATA: 465 case ATAPI_PROT_NODATA:
466 buf32[0] = cpu_to_le32(PDC_PKT_NODATA); 466 buf32[0] = cpu_to_le32(PDC_PKT_NODATA);
467 break; 467 break;
468 default: 468 default:
@@ -489,7 +489,7 @@ static void pdc_atapi_pkt(struct ata_queued_cmd *qc)
489 buf[19] = qc->tf.lbal; 489 buf[19] = qc->tf.lbal;
490 490
491 /* set feature and byte counter registers */ 491 /* set feature and byte counter registers */
492 if (qc->tf.protocol != ATA_PROT_ATAPI_DMA) 492 if (qc->tf.protocol != ATAPI_PROT_DMA)
493 feature = PDC_FEATURE_ATAPI_PIO; 493 feature = PDC_FEATURE_ATAPI_PIO;
494 else 494 else
495 feature = PDC_FEATURE_ATAPI_DMA; 495 feature = PDC_FEATURE_ATAPI_DMA;
@@ -619,14 +619,14 @@ static void pdc_qc_prep(struct ata_queued_cmd *qc)
619 pdc_pkt_footer(&qc->tf, pp->pkt, i); 619 pdc_pkt_footer(&qc->tf, pp->pkt, i);
620 break; 620 break;
621 621
622 case ATA_PROT_ATAPI: 622 case ATAPI_PROT_PIO:
623 pdc_fill_sg(qc); 623 pdc_fill_sg(qc);
624 break; 624 break;
625 625
626 case ATA_PROT_ATAPI_DMA: 626 case ATAPI_PROT_DMA:
627 pdc_fill_sg(qc); 627 pdc_fill_sg(qc);
628 /*FALLTHROUGH*/ 628 /*FALLTHROUGH*/
629 case ATA_PROT_ATAPI_NODATA: 629 case ATAPI_PROT_NODATA:
630 pdc_atapi_pkt(qc); 630 pdc_atapi_pkt(qc);
631 break; 631 break;
632 632
@@ -746,8 +746,8 @@ static inline unsigned int pdc_host_intr(struct ata_port *ap,
746 switch (qc->tf.protocol) { 746 switch (qc->tf.protocol) {
747 case ATA_PROT_DMA: 747 case ATA_PROT_DMA:
748 case ATA_PROT_NODATA: 748 case ATA_PROT_NODATA:
749 case ATA_PROT_ATAPI_DMA: 749 case ATAPI_PROT_DMA:
750 case ATA_PROT_ATAPI_NODATA: 750 case ATAPI_PROT_NODATA:
751 qc->err_mask |= ac_err_mask(ata_wait_idle(ap)); 751 qc->err_mask |= ac_err_mask(ata_wait_idle(ap));
752 ata_qc_complete(qc); 752 ata_qc_complete(qc);
753 handled = 1; 753 handled = 1;
@@ -892,7 +892,7 @@ static inline void pdc_packet_start(struct ata_queued_cmd *qc)
892static unsigned int pdc_qc_issue_prot(struct ata_queued_cmd *qc) 892static unsigned int pdc_qc_issue_prot(struct ata_queued_cmd *qc)
893{ 893{
894 switch (qc->tf.protocol) { 894 switch (qc->tf.protocol) {
895 case ATA_PROT_ATAPI_NODATA: 895 case ATAPI_PROT_NODATA:
896 if (qc->dev->flags & ATA_DFLAG_CDB_INTR) 896 if (qc->dev->flags & ATA_DFLAG_CDB_INTR)
897 break; 897 break;
898 /*FALLTHROUGH*/ 898 /*FALLTHROUGH*/
@@ -900,7 +900,7 @@ static unsigned int pdc_qc_issue_prot(struct ata_queued_cmd *qc)
900 if (qc->tf.flags & ATA_TFLAG_POLLING) 900 if (qc->tf.flags & ATA_TFLAG_POLLING)
901 break; 901 break;
902 /*FALLTHROUGH*/ 902 /*FALLTHROUGH*/
903 case ATA_PROT_ATAPI_DMA: 903 case ATAPI_PROT_DMA:
904 case ATA_PROT_DMA: 904 case ATA_PROT_DMA:
905 pdc_packet_start(qc); 905 pdc_packet_start(qc);
906 return 0; 906 return 0;
@@ -914,16 +914,14 @@ static unsigned int pdc_qc_issue_prot(struct ata_queued_cmd *qc)
914 914
915static void pdc_tf_load_mmio(struct ata_port *ap, const struct ata_taskfile *tf) 915static void pdc_tf_load_mmio(struct ata_port *ap, const struct ata_taskfile *tf)
916{ 916{
917 WARN_ON(tf->protocol == ATA_PROT_DMA || 917 WARN_ON(tf->protocol == ATA_PROT_DMA || tf->protocol == ATAPI_PROT_DMA);
918 tf->protocol == ATA_PROT_ATAPI_DMA);
919 ata_tf_load(ap, tf); 918 ata_tf_load(ap, tf);
920} 919}
921 920
922static void pdc_exec_command_mmio(struct ata_port *ap, 921static void pdc_exec_command_mmio(struct ata_port *ap,
923 const struct ata_taskfile *tf) 922 const struct ata_taskfile *tf)
924{ 923{
925 WARN_ON(tf->protocol == ATA_PROT_DMA || 924 WARN_ON(tf->protocol == ATA_PROT_DMA || tf->protocol == ATAPI_PROT_DMA);
926 tf->protocol == ATA_PROT_ATAPI_DMA);
927 ata_exec_command(ap, tf); 925 ata_exec_command(ap, tf);
928} 926}
929 927
diff --git a/drivers/ata/sata_qstor.c b/drivers/ata/sata_qstor.c
index c68b241805f..4e5f07bdd06 100644
--- a/drivers/ata/sata_qstor.c
+++ b/drivers/ata/sata_qstor.c
@@ -376,7 +376,7 @@ static unsigned int qs_qc_issue(struct ata_queued_cmd *qc)
376 qs_packet_start(qc); 376 qs_packet_start(qc);
377 return 0; 377 return 0;
378 378
379 case ATA_PROT_ATAPI_DMA: 379 case ATAPI_PROT_DMA:
380 BUG(); 380 BUG();
381 break; 381 break;
382 382
diff --git a/drivers/ata/sata_sx4.c b/drivers/ata/sata_sx4.c
index 4d857185f33..3de0c27caf5 100644
--- a/drivers/ata/sata_sx4.c
+++ b/drivers/ata/sata_sx4.c
@@ -700,7 +700,7 @@ static unsigned int pdc20621_qc_issue_prot(struct ata_queued_cmd *qc)
700 pdc20621_packet_start(qc); 700 pdc20621_packet_start(qc);
701 return 0; 701 return 0;
702 702
703 case ATA_PROT_ATAPI_DMA: 703 case ATAPI_PROT_DMA:
704 BUG(); 704 BUG();
705 break; 705 break;
706 706