aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_promise.c
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/sata_promise.c
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/sata_promise.c')
-rw-r--r--drivers/ata/sata_promise.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/drivers/ata/sata_promise.c b/drivers/ata/sata_promise.c
index 9638faaa8111..01738d736d44 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