diff options
author | Tejun Heo <htejun@gmail.com> | 2007-02-20 11:06:51 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-02-21 04:58:20 -0500 |
commit | 44877b4e22f391d39c6589412106a3668e81a05b (patch) | |
tree | 10bf134c2c8c15e3504d67461b42f53c6de88523 /drivers | |
parent | 5ce0cf6fafd02fb4c43fc1a1bee6069d6c0a36b1 (diff) |
libata: s/ap->id/ap->print_id/g
ata_port has two different id fields - id and port_no. id is
system-wide 1-based unique id for the port while port_no is 0-based
host-wide port number. The former is primarily used to identify the
ATA port to the user in printk messages while the latter is used in
various places in libata core and LLDs to index the port inside the
host.
The two fields feel quite similar and sometimes ap->id is used in
place of ap->port_no, which is very difficult to spot. This patch
renames ap->id to ap->print_id to reduce the possibility of such bugs.
Some printk messages are adjusted such that id string (ata%u[.%u])
isn't printed twice and/or to use ata_*_printk() instead of hardcoded
id format.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ata/libata-core.c | 58 | ||||
-rw-r--r-- | drivers/ata/libata-eh.c | 4 | ||||
-rw-r--r-- | drivers/ata/libata-scsi.c | 8 | ||||
-rw-r--r-- | drivers/ata/libata-sff.c | 2 | ||||
-rw-r--r-- | drivers/ata/pata_sis.c | 4 | ||||
-rw-r--r-- | drivers/ata/pdc_adma.c | 2 | ||||
-rw-r--r-- | drivers/ata/sata_mv.c | 2 | ||||
-rw-r--r-- | drivers/ata/sata_qstor.c | 2 | ||||
-rw-r--r-- | drivers/ata/sata_sx4.c | 14 |
9 files changed, 48 insertions, 48 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 3adc2cf61f14..d3b4e25074c1 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -72,7 +72,7 @@ static unsigned int ata_dev_init_params(struct ata_device *dev, | |||
72 | static unsigned int ata_dev_set_xfermode(struct ata_device *dev); | 72 | static unsigned int ata_dev_set_xfermode(struct ata_device *dev); |
73 | static void ata_dev_xfermask(struct ata_device *dev); | 73 | static void ata_dev_xfermask(struct ata_device *dev); |
74 | 74 | ||
75 | static unsigned int ata_unique_id = 1; | 75 | static unsigned int ata_print_id = 1; |
76 | static struct workqueue_struct *ata_wq; | 76 | static struct workqueue_struct *ata_wq; |
77 | 77 | ||
78 | struct workqueue_struct *ata_aux_wq; | 78 | struct workqueue_struct *ata_aux_wq; |
@@ -891,8 +891,8 @@ void ata_dev_select(struct ata_port *ap, unsigned int device, | |||
891 | unsigned int wait, unsigned int can_sleep) | 891 | unsigned int wait, unsigned int can_sleep) |
892 | { | 892 | { |
893 | if (ata_msg_probe(ap)) | 893 | if (ata_msg_probe(ap)) |
894 | ata_port_printk(ap, KERN_INFO, "ata_dev_select: ENTER, ata%u: " | 894 | ata_port_printk(ap, KERN_INFO, "ata_dev_select: ENTER, " |
895 | "device %u, wait %u\n", ap->id, device, wait); | 895 | "device %u, wait %u\n", device, wait); |
896 | 896 | ||
897 | if (wait) | 897 | if (wait) |
898 | ata_wait_idle(ap); | 898 | ata_wait_idle(ap); |
@@ -1392,8 +1392,7 @@ int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class, | |||
1392 | int rc; | 1392 | int rc; |
1393 | 1393 | ||
1394 | if (ata_msg_ctl(ap)) | 1394 | if (ata_msg_ctl(ap)) |
1395 | ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER, host %u, dev %u\n", | 1395 | ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER\n", __FUNCTION__); |
1396 | __FUNCTION__, ap->id, dev->devno); | ||
1397 | 1396 | ||
1398 | ata_dev_select(ap, dev->devno, 1, 1); /* select device 0/1 */ | 1397 | ata_dev_select(ap, dev->devno, 1, 1); /* select device 0/1 */ |
1399 | 1398 | ||
@@ -1430,7 +1429,7 @@ int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class, | |||
1430 | if (err_mask) { | 1429 | if (err_mask) { |
1431 | if (err_mask & AC_ERR_NODEV_HINT) { | 1430 | if (err_mask & AC_ERR_NODEV_HINT) { |
1432 | DPRINTK("ata%u.%d: NODEV after polling detection\n", | 1431 | DPRINTK("ata%u.%d: NODEV after polling detection\n", |
1433 | ap->id, dev->devno); | 1432 | ap->print_id, dev->devno); |
1434 | return -ENOENT; | 1433 | return -ENOENT; |
1435 | } | 1434 | } |
1436 | 1435 | ||
@@ -1558,15 +1557,13 @@ int ata_dev_configure(struct ata_device *dev) | |||
1558 | int rc; | 1557 | int rc; |
1559 | 1558 | ||
1560 | if (!ata_dev_enabled(dev) && ata_msg_info(ap)) { | 1559 | if (!ata_dev_enabled(dev) && ata_msg_info(ap)) { |
1561 | ata_dev_printk(dev, KERN_INFO, | 1560 | ata_dev_printk(dev, KERN_INFO, "%s: ENTER/EXIT -- nodev\n", |
1562 | "%s: ENTER/EXIT (host %u, dev %u) -- nodev\n", | 1561 | __FUNCTION__); |
1563 | __FUNCTION__, ap->id, dev->devno); | ||
1564 | return 0; | 1562 | return 0; |
1565 | } | 1563 | } |
1566 | 1564 | ||
1567 | if (ata_msg_probe(ap)) | 1565 | if (ata_msg_probe(ap)) |
1568 | ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER, host %u, dev %u\n", | 1566 | ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER\n", __FUNCTION__); |
1569 | __FUNCTION__, ap->id, dev->devno); | ||
1570 | 1567 | ||
1571 | /* set _SDD */ | 1568 | /* set _SDD */ |
1572 | rc = ata_acpi_push_id(ap, dev->devno); | 1569 | rc = ata_acpi_push_id(ap, dev->devno); |
@@ -1610,8 +1607,9 @@ int ata_dev_configure(struct ata_device *dev) | |||
1610 | if (dev->class == ATA_DEV_ATA) { | 1607 | if (dev->class == ATA_DEV_ATA) { |
1611 | if (ata_id_is_cfa(id)) { | 1608 | if (ata_id_is_cfa(id)) { |
1612 | if (id[162] & 1) /* CPRM may make this media unusable */ | 1609 | if (id[162] & 1) /* CPRM may make this media unusable */ |
1613 | ata_dev_printk(dev, KERN_WARNING, "ata%u: device %u supports DRM functions and may not be fully accessable.\n", | 1610 | ata_dev_printk(dev, KERN_WARNING, |
1614 | ap->id, dev->devno); | 1611 | "supports DRM functions and may " |
1612 | "not be fully accessable.\n"); | ||
1615 | snprintf(revbuf, 7, "CFA"); | 1613 | snprintf(revbuf, 7, "CFA"); |
1616 | } | 1614 | } |
1617 | else | 1615 | else |
@@ -2650,7 +2648,7 @@ static unsigned int ata_bus_softreset(struct ata_port *ap, | |||
2650 | { | 2648 | { |
2651 | struct ata_ioports *ioaddr = &ap->ioaddr; | 2649 | struct ata_ioports *ioaddr = &ap->ioaddr; |
2652 | 2650 | ||
2653 | DPRINTK("ata%u: bus reset via SRST\n", ap->id); | 2651 | DPRINTK("ata%u: bus reset via SRST\n", ap->print_id); |
2654 | 2652 | ||
2655 | /* software reset. causes dev0 to be selected */ | 2653 | /* software reset. causes dev0 to be selected */ |
2656 | iowrite8(ap->ctl, ioaddr->ctl_addr); | 2654 | iowrite8(ap->ctl, ioaddr->ctl_addr); |
@@ -2710,7 +2708,7 @@ void ata_bus_reset(struct ata_port *ap) | |||
2710 | u8 err; | 2708 | u8 err; |
2711 | unsigned int dev0, dev1 = 0, devmask = 0; | 2709 | unsigned int dev0, dev1 = 0, devmask = 0; |
2712 | 2710 | ||
2713 | DPRINTK("ENTER, host %u, port %u\n", ap->id, ap->port_no); | 2711 | DPRINTK("ENTER, host %u, port %u\n", ap->print_id, ap->port_no); |
2714 | 2712 | ||
2715 | /* determine if device 0/1 are present */ | 2713 | /* determine if device 0/1 are present */ |
2716 | if (ap->flags & ATA_FLAG_SATA_RESET) | 2714 | if (ap->flags & ATA_FLAG_SATA_RESET) |
@@ -3779,7 +3777,7 @@ static int ata_sg_setup(struct ata_queued_cmd *qc) | |||
3779 | struct scatterlist *lsg = &sg[qc->n_elem - 1]; | 3777 | struct scatterlist *lsg = &sg[qc->n_elem - 1]; |
3780 | int n_elem, pre_n_elem, dir, trim_sg = 0; | 3778 | int n_elem, pre_n_elem, dir, trim_sg = 0; |
3781 | 3779 | ||
3782 | VPRINTK("ENTER, ata%u\n", ap->id); | 3780 | VPRINTK("ENTER, ata%u\n", ap->print_id); |
3783 | WARN_ON(!(qc->flags & ATA_QCFLAG_SG)); | 3781 | WARN_ON(!(qc->flags & ATA_QCFLAG_SG)); |
3784 | 3782 | ||
3785 | /* we must lengthen transfers to end on a 32-bit boundary */ | 3783 | /* we must lengthen transfers to end on a 32-bit boundary */ |
@@ -4180,7 +4178,7 @@ static void atapi_pio_bytes(struct ata_queued_cmd *qc) | |||
4180 | if (do_write != i_write) | 4178 | if (do_write != i_write) |
4181 | goto err_out; | 4179 | goto err_out; |
4182 | 4180 | ||
4183 | VPRINTK("ata%u: xfering %d bytes\n", ap->id, bytes); | 4181 | VPRINTK("ata%u: xfering %d bytes\n", ap->print_id, bytes); |
4184 | 4182 | ||
4185 | __atapi_pio_bytes(qc, bytes); | 4183 | __atapi_pio_bytes(qc, bytes); |
4186 | 4184 | ||
@@ -4297,7 +4295,7 @@ int ata_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc, | |||
4297 | 4295 | ||
4298 | fsm_start: | 4296 | fsm_start: |
4299 | DPRINTK("ata%u: protocol %d task_state %d (dev_stat 0x%X)\n", | 4297 | DPRINTK("ata%u: protocol %d task_state %d (dev_stat 0x%X)\n", |
4300 | ap->id, qc->tf.protocol, ap->hsm_task_state, status); | 4298 | ap->print_id, qc->tf.protocol, ap->hsm_task_state, status); |
4301 | 4299 | ||
4302 | switch (ap->hsm_task_state) { | 4300 | switch (ap->hsm_task_state) { |
4303 | case HSM_ST_FIRST: | 4301 | case HSM_ST_FIRST: |
@@ -4330,8 +4328,8 @@ fsm_start: | |||
4330 | * let the EH abort the command or reset the device. | 4328 | * let the EH abort the command or reset the device. |
4331 | */ | 4329 | */ |
4332 | if (unlikely(status & (ATA_ERR | ATA_DF))) { | 4330 | if (unlikely(status & (ATA_ERR | ATA_DF))) { |
4333 | printk(KERN_WARNING "ata%d: DRQ=1 with device error, dev_stat 0x%X\n", | 4331 | ata_port_printk(ap, KERN_WARNING, "DRQ=1 with device " |
4334 | ap->id, status); | 4332 | "error, dev_stat 0x%X\n", status); |
4335 | qc->err_mask |= AC_ERR_HSM; | 4333 | qc->err_mask |= AC_ERR_HSM; |
4336 | ap->hsm_task_state = HSM_ST_ERR; | 4334 | ap->hsm_task_state = HSM_ST_ERR; |
4337 | goto fsm_start; | 4335 | goto fsm_start; |
@@ -4388,8 +4386,9 @@ fsm_start: | |||
4388 | * let the EH abort the command or reset the device. | 4386 | * let the EH abort the command or reset the device. |
4389 | */ | 4387 | */ |
4390 | if (unlikely(status & (ATA_ERR | ATA_DF))) { | 4388 | if (unlikely(status & (ATA_ERR | ATA_DF))) { |
4391 | printk(KERN_WARNING "ata%d: DRQ=1 with device error, dev_stat 0x%X\n", | 4389 | ata_port_printk(ap, KERN_WARNING, "DRQ=1 with " |
4392 | ap->id, status); | 4390 | "device error, dev_stat 0x%X\n", |
4391 | status); | ||
4393 | qc->err_mask |= AC_ERR_HSM; | 4392 | qc->err_mask |= AC_ERR_HSM; |
4394 | ap->hsm_task_state = HSM_ST_ERR; | 4393 | ap->hsm_task_state = HSM_ST_ERR; |
4395 | goto fsm_start; | 4394 | goto fsm_start; |
@@ -4475,7 +4474,7 @@ fsm_start: | |||
4475 | 4474 | ||
4476 | /* no more data to transfer */ | 4475 | /* no more data to transfer */ |
4477 | DPRINTK("ata%u: dev %u command complete, drv_stat 0x%x\n", | 4476 | DPRINTK("ata%u: dev %u command complete, drv_stat 0x%x\n", |
4478 | ap->id, qc->dev->devno, status); | 4477 | ap->print_id, qc->dev->devno, status); |
4479 | 4478 | ||
4480 | WARN_ON(qc->err_mask); | 4479 | WARN_ON(qc->err_mask); |
4481 | 4480 | ||
@@ -5017,7 +5016,7 @@ inline unsigned int ata_host_intr (struct ata_port *ap, | |||
5017 | u8 status, host_stat = 0; | 5016 | u8 status, host_stat = 0; |
5018 | 5017 | ||
5019 | VPRINTK("ata%u: protocol %d task_state %d\n", | 5018 | VPRINTK("ata%u: protocol %d task_state %d\n", |
5020 | ap->id, qc->tf.protocol, ap->hsm_task_state); | 5019 | ap->print_id, qc->tf.protocol, ap->hsm_task_state); |
5021 | 5020 | ||
5022 | /* Check whether we are expecting interrupt in this state */ | 5021 | /* Check whether we are expecting interrupt in this state */ |
5023 | switch (ap->hsm_task_state) { | 5022 | switch (ap->hsm_task_state) { |
@@ -5038,7 +5037,8 @@ inline unsigned int ata_host_intr (struct ata_port *ap, | |||
5038 | qc->tf.protocol == ATA_PROT_ATAPI_DMA) { | 5037 | qc->tf.protocol == ATA_PROT_ATAPI_DMA) { |
5039 | /* check status of DMA engine */ | 5038 | /* check status of DMA engine */ |
5040 | host_stat = ap->ops->bmdma_status(ap); | 5039 | host_stat = ap->ops->bmdma_status(ap); |
5041 | VPRINTK("ata%u: host_stat 0x%X\n", ap->id, host_stat); | 5040 | VPRINTK("ata%u: host_stat 0x%X\n", |
5041 | ap->print_id, host_stat); | ||
5042 | 5042 | ||
5043 | /* if it's not our irq... */ | 5043 | /* if it's not our irq... */ |
5044 | if (!(host_stat & ATA_DMA_INTR)) | 5044 | if (!(host_stat & ATA_DMA_INTR)) |
@@ -5497,7 +5497,7 @@ void ata_port_init(struct ata_port *ap, struct ata_host *host, | |||
5497 | 5497 | ||
5498 | ap->lock = &host->lock; | 5498 | ap->lock = &host->lock; |
5499 | ap->flags = ATA_FLAG_DISABLED; | 5499 | ap->flags = ATA_FLAG_DISABLED; |
5500 | ap->id = ata_unique_id++; | 5500 | ap->print_id = ata_print_id++; |
5501 | ap->ctl = ATA_DEVCTL_OBS; | 5501 | ap->ctl = ATA_DEVCTL_OBS; |
5502 | ap->host = host; | 5502 | ap->host = host; |
5503 | ap->dev = ent->dev; | 5503 | ap->dev = ent->dev; |
@@ -5568,7 +5568,7 @@ static void ata_port_init_shost(struct ata_port *ap, struct Scsi_Host *shost) | |||
5568 | { | 5568 | { |
5569 | ap->scsi_host = shost; | 5569 | ap->scsi_host = shost; |
5570 | 5570 | ||
5571 | shost->unique_id = ap->id; | 5571 | shost->unique_id = ap->print_id; |
5572 | shost->max_id = 16; | 5572 | shost->max_id = 16; |
5573 | shost->max_lun = 1; | 5573 | shost->max_lun = 1; |
5574 | shost->max_channel = 1; | 5574 | shost->max_channel = 1; |
@@ -5832,9 +5832,9 @@ int ata_device_add(const struct ata_probe_ent *ent) | |||
5832 | /* wait for EH to finish */ | 5832 | /* wait for EH to finish */ |
5833 | ata_port_wait_eh(ap); | 5833 | ata_port_wait_eh(ap); |
5834 | } else { | 5834 | } else { |
5835 | DPRINTK("ata%u: bus probe begin\n", ap->id); | 5835 | DPRINTK("ata%u: bus probe begin\n", ap->print_id); |
5836 | rc = ata_bus_probe(ap); | 5836 | rc = ata_bus_probe(ap); |
5837 | DPRINTK("ata%u: bus probe end\n", ap->id); | 5837 | DPRINTK("ata%u: bus probe end\n", ap->print_id); |
5838 | 5838 | ||
5839 | if (rc) { | 5839 | if (rc) { |
5840 | /* FIXME: do something useful here? | 5840 | /* FIXME: do something useful here? |
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 31738627ec64..cad0d6db6df5 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
@@ -588,7 +588,7 @@ static void __ata_port_freeze(struct ata_port *ap) | |||
588 | 588 | ||
589 | ap->pflags |= ATA_PFLAG_FROZEN; | 589 | ap->pflags |= ATA_PFLAG_FROZEN; |
590 | 590 | ||
591 | DPRINTK("ata%u port frozen\n", ap->id); | 591 | DPRINTK("ata%u port frozen\n", ap->print_id); |
592 | } | 592 | } |
593 | 593 | ||
594 | /** | 594 | /** |
@@ -661,7 +661,7 @@ void ata_eh_thaw_port(struct ata_port *ap) | |||
661 | 661 | ||
662 | spin_unlock_irqrestore(ap->lock, flags); | 662 | spin_unlock_irqrestore(ap->lock, flags); |
663 | 663 | ||
664 | DPRINTK("ata%u port thawed\n", ap->id); | 664 | DPRINTK("ata%u port thawed\n", ap->print_id); |
665 | } | 665 | } |
666 | 666 | ||
667 | static void ata_eh_scsidone(struct scsi_cmnd *scmd) | 667 | static void ata_eh_scsidone(struct scsi_cmnd *scmd) |
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 48e388800f5a..00a9a6c8f83c 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
@@ -782,7 +782,7 @@ static void ata_gen_passthru_sense(struct ata_queued_cmd *qc) | |||
782 | */ | 782 | */ |
783 | if (qc->err_mask || | 783 | if (qc->err_mask || |
784 | tf->command & (ATA_BUSY | ATA_DF | ATA_ERR | ATA_DRQ)) { | 784 | tf->command & (ATA_BUSY | ATA_DF | ATA_ERR | ATA_DRQ)) { |
785 | ata_to_sense_error(qc->ap->id, tf->command, tf->feature, | 785 | ata_to_sense_error(qc->ap->print_id, tf->command, tf->feature, |
786 | &sb[1], &sb[2], &sb[3], verbose); | 786 | &sb[1], &sb[2], &sb[3], verbose); |
787 | sb[1] &= 0x0f; | 787 | sb[1] &= 0x0f; |
788 | } | 788 | } |
@@ -855,7 +855,7 @@ static void ata_gen_ata_sense(struct ata_queued_cmd *qc) | |||
855 | */ | 855 | */ |
856 | if (qc->err_mask || | 856 | if (qc->err_mask || |
857 | tf->command & (ATA_BUSY | ATA_DF | ATA_ERR | ATA_DRQ)) { | 857 | tf->command & (ATA_BUSY | ATA_DF | ATA_ERR | ATA_DRQ)) { |
858 | ata_to_sense_error(qc->ap->id, tf->command, tf->feature, | 858 | ata_to_sense_error(qc->ap->print_id, tf->command, tf->feature, |
859 | &sb[1], &sb[2], &sb[3], verbose); | 859 | &sb[1], &sb[2], &sb[3], verbose); |
860 | sb[1] &= 0x0f; | 860 | sb[1] &= 0x0f; |
861 | } | 861 | } |
@@ -1473,7 +1473,7 @@ static void ata_scsi_qc_complete(struct ata_queued_cmd *qc) | |||
1473 | } | 1473 | } |
1474 | 1474 | ||
1475 | if (need_sense && !ap->ops->error_handler) | 1475 | if (need_sense && !ap->ops->error_handler) |
1476 | ata_dump_status(ap->id, &qc->result_tf); | 1476 | ata_dump_status(ap->print_id, &qc->result_tf); |
1477 | 1477 | ||
1478 | qc->scsidone(cmd); | 1478 | qc->scsidone(cmd); |
1479 | 1479 | ||
@@ -2776,7 +2776,7 @@ static inline void ata_scsi_dump_cdb(struct ata_port *ap, | |||
2776 | u8 *scsicmd = cmd->cmnd; | 2776 | u8 *scsicmd = cmd->cmnd; |
2777 | 2777 | ||
2778 | DPRINTK("CDB (%u:%d,%d,%d) %02x %02x %02x %02x %02x %02x %02x %02x %02x\n", | 2778 | DPRINTK("CDB (%u:%d,%d,%d) %02x %02x %02x %02x %02x %02x %02x %02x %02x\n", |
2779 | ap->id, | 2779 | ap->print_id, |
2780 | scsidev->channel, scsidev->id, scsidev->lun, | 2780 | scsidev->channel, scsidev->id, scsidev->lun, |
2781 | scsicmd[0], scsicmd[1], scsicmd[2], scsicmd[3], | 2781 | scsicmd[0], scsicmd[1], scsicmd[2], scsicmd[3], |
2782 | scsicmd[4], scsicmd[5], scsicmd[6], scsicmd[7], | 2782 | scsicmd[4], scsicmd[5], scsicmd[6], scsicmd[7], |
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c index 16bc3e35bdd4..7fea094e6d3a 100644 --- a/drivers/ata/libata-sff.c +++ b/drivers/ata/libata-sff.c | |||
@@ -175,7 +175,7 @@ void ata_tf_load(struct ata_port *ap, const struct ata_taskfile *tf) | |||
175 | */ | 175 | */ |
176 | void ata_exec_command(struct ata_port *ap, const struct ata_taskfile *tf) | 176 | void ata_exec_command(struct ata_port *ap, const struct ata_taskfile *tf) |
177 | { | 177 | { |
178 | DPRINTK("ata%u: cmd 0x%X\n", ap->id, tf->command); | 178 | DPRINTK("ata%u: cmd 0x%X\n", ap->print_id, tf->command); |
179 | 179 | ||
180 | iowrite8(tf->command, ap->ioaddr.command_addr); | 180 | iowrite8(tf->command, ap->ioaddr.command_addr); |
181 | ata_pause(ap); | 181 | ata_pause(ap); |
diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c index 0a17a95e0504..efa530b43c02 100644 --- a/drivers/ata/pata_sis.c +++ b/drivers/ata/pata_sis.c | |||
@@ -150,7 +150,7 @@ static int sis_66_pre_reset(struct ata_port *ap) | |||
150 | 150 | ||
151 | if (!pci_test_config_bits(pdev, &sis_enable_bits[ap->port_no])) { | 151 | if (!pci_test_config_bits(pdev, &sis_enable_bits[ap->port_no])) { |
152 | ata_port_disable(ap); | 152 | ata_port_disable(ap); |
153 | printk(KERN_INFO "ata%u: port disabled. ignoring.\n", ap->id); | 153 | ata_port_printk(ap, KERN_INFO, "port disabled. ignoring.\n"); |
154 | return 0; | 154 | return 0; |
155 | } | 155 | } |
156 | /* Older chips keep cable detect in bits 4/5 of reg 0x48 */ | 156 | /* Older chips keep cable detect in bits 4/5 of reg 0x48 */ |
@@ -196,7 +196,7 @@ static int sis_old_pre_reset(struct ata_port *ap) | |||
196 | 196 | ||
197 | if (!pci_test_config_bits(pdev, &sis_enable_bits[ap->port_no])) { | 197 | if (!pci_test_config_bits(pdev, &sis_enable_bits[ap->port_no])) { |
198 | ata_port_disable(ap); | 198 | ata_port_disable(ap); |
199 | printk(KERN_INFO "ata%u: port disabled. ignoring.\n", ap->id); | 199 | ata_port_printk(ap, KERN_INFO, "port disabled. ignoring.\n"); |
200 | return 0; | 200 | return 0; |
201 | } | 201 | } |
202 | ap->cbl = ATA_CBL_PATA40; | 202 | ap->cbl = ATA_CBL_PATA40; |
diff --git a/drivers/ata/pdc_adma.c b/drivers/ata/pdc_adma.c index 857ac23217ab..37bab32d74d6 100644 --- a/drivers/ata/pdc_adma.c +++ b/drivers/ata/pdc_adma.c | |||
@@ -498,7 +498,7 @@ static inline unsigned int adma_intr_mmio(struct ata_host *host) | |||
498 | if ((status & ATA_BUSY)) | 498 | if ((status & ATA_BUSY)) |
499 | continue; | 499 | continue; |
500 | DPRINTK("ata%u: protocol %d (dev_stat 0x%X)\n", | 500 | DPRINTK("ata%u: protocol %d (dev_stat 0x%X)\n", |
501 | ap->id, qc->tf.protocol, status); | 501 | ap->print_id, qc->tf.protocol, status); |
502 | 502 | ||
503 | /* complete taskfile transaction */ | 503 | /* complete taskfile transaction */ |
504 | pp->state = adma_state_idle; | 504 | pp->state = adma_state_idle; |
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index c73aa3bbaa3e..06867b92c9c7 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c | |||
@@ -1276,7 +1276,7 @@ static void mv_err_intr(struct ata_port *ap, int reset_allowed) | |||
1276 | pp->pp_flags &= ~MV_PP_FLAG_EDMA_EN; | 1276 | pp->pp_flags &= ~MV_PP_FLAG_EDMA_EN; |
1277 | } | 1277 | } |
1278 | DPRINTK(KERN_ERR "ata%u: port error; EDMA err cause: 0x%08x " | 1278 | DPRINTK(KERN_ERR "ata%u: port error; EDMA err cause: 0x%08x " |
1279 | "SERR: 0x%08x\n", ap->id, edma_err_cause, serr); | 1279 | "SERR: 0x%08x\n", ap->print_id, edma_err_cause, serr); |
1280 | 1280 | ||
1281 | /* Clear EDMA now that SERR cleanup done */ | 1281 | /* Clear EDMA now that SERR cleanup done */ |
1282 | writelfl(0, port_mmio + EDMA_ERR_IRQ_CAUSE_OFS); | 1282 | writelfl(0, port_mmio + EDMA_ERR_IRQ_CAUSE_OFS); |
diff --git a/drivers/ata/sata_qstor.c b/drivers/ata/sata_qstor.c index 6097d8f2a0c0..1558571be0ee 100644 --- a/drivers/ata/sata_qstor.c +++ b/drivers/ata/sata_qstor.c | |||
@@ -446,7 +446,7 @@ static inline unsigned int qs_intr_mmio(struct ata_host *host) | |||
446 | if ((status & ATA_BUSY)) | 446 | if ((status & ATA_BUSY)) |
447 | continue; | 447 | continue; |
448 | DPRINTK("ata%u: protocol %d (dev_stat 0x%X)\n", | 448 | DPRINTK("ata%u: protocol %d (dev_stat 0x%X)\n", |
449 | ap->id, qc->tf.protocol, status); | 449 | ap->print_id, qc->tf.protocol, status); |
450 | 450 | ||
451 | /* complete taskfile transaction */ | 451 | /* complete taskfile transaction */ |
452 | pp->state = qs_state_idle; | 452 | pp->state = qs_state_idle; |
diff --git a/drivers/ata/sata_sx4.c b/drivers/ata/sata_sx4.c index 0ebd77b080d6..4fb8bfcefc0d 100644 --- a/drivers/ata/sata_sx4.c +++ b/drivers/ata/sata_sx4.c | |||
@@ -421,7 +421,7 @@ static void pdc20621_dma_prep(struct ata_queued_cmd *qc) | |||
421 | 421 | ||
422 | WARN_ON(!(qc->flags & ATA_QCFLAG_DMAMAP)); | 422 | WARN_ON(!(qc->flags & ATA_QCFLAG_DMAMAP)); |
423 | 423 | ||
424 | VPRINTK("ata%u: ENTER\n", ap->id); | 424 | VPRINTK("ata%u: ENTER\n", ap->print_id); |
425 | 425 | ||
426 | /* hard-code chip #0 */ | 426 | /* hard-code chip #0 */ |
427 | mmio += PDC_CHIP0_OFS; | 427 | mmio += PDC_CHIP0_OFS; |
@@ -478,7 +478,7 @@ static void pdc20621_nodata_prep(struct ata_queued_cmd *qc) | |||
478 | unsigned int portno = ap->port_no; | 478 | unsigned int portno = ap->port_no; |
479 | unsigned int i; | 479 | unsigned int i; |
480 | 480 | ||
481 | VPRINTK("ata%u: ENTER\n", ap->id); | 481 | VPRINTK("ata%u: ENTER\n", ap->print_id); |
482 | 482 | ||
483 | /* hard-code chip #0 */ | 483 | /* hard-code chip #0 */ |
484 | mmio += PDC_CHIP0_OFS; | 484 | mmio += PDC_CHIP0_OFS; |
@@ -605,7 +605,7 @@ static void pdc20621_packet_start(struct ata_queued_cmd *qc) | |||
605 | /* hard-code chip #0 */ | 605 | /* hard-code chip #0 */ |
606 | mmio += PDC_CHIP0_OFS; | 606 | mmio += PDC_CHIP0_OFS; |
607 | 607 | ||
608 | VPRINTK("ata%u: ENTER\n", ap->id); | 608 | VPRINTK("ata%u: ENTER\n", ap->print_id); |
609 | 609 | ||
610 | wmb(); /* flush PRD, pkt writes */ | 610 | wmb(); /* flush PRD, pkt writes */ |
611 | 611 | ||
@@ -672,7 +672,7 @@ static inline unsigned int pdc20621_host_intr( struct ata_port *ap, | |||
672 | 672 | ||
673 | /* step two - DMA from DIMM to host */ | 673 | /* step two - DMA from DIMM to host */ |
674 | if (doing_hdma) { | 674 | if (doing_hdma) { |
675 | VPRINTK("ata%u: read hdma, 0x%x 0x%x\n", ap->id, | 675 | VPRINTK("ata%u: read hdma, 0x%x 0x%x\n", ap->print_id, |
676 | readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT)); | 676 | readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT)); |
677 | /* get drive status; clear intr; complete txn */ | 677 | /* get drive status; clear intr; complete txn */ |
678 | qc->err_mask |= ac_err_mask(ata_wait_idle(ap)); | 678 | qc->err_mask |= ac_err_mask(ata_wait_idle(ap)); |
@@ -683,7 +683,7 @@ static inline unsigned int pdc20621_host_intr( struct ata_port *ap, | |||
683 | /* step one - exec ATA command */ | 683 | /* step one - exec ATA command */ |
684 | else { | 684 | else { |
685 | u8 seq = (u8) (port_no + 1 + 4); | 685 | u8 seq = (u8) (port_no + 1 + 4); |
686 | VPRINTK("ata%u: read ata, 0x%x 0x%x\n", ap->id, | 686 | VPRINTK("ata%u: read ata, 0x%x 0x%x\n", ap->print_id, |
687 | readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT)); | 687 | readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT)); |
688 | 688 | ||
689 | /* submit hdma pkt */ | 689 | /* submit hdma pkt */ |
@@ -698,7 +698,7 @@ static inline unsigned int pdc20621_host_intr( struct ata_port *ap, | |||
698 | /* step one - DMA from host to DIMM */ | 698 | /* step one - DMA from host to DIMM */ |
699 | if (doing_hdma) { | 699 | if (doing_hdma) { |
700 | u8 seq = (u8) (port_no + 1); | 700 | u8 seq = (u8) (port_no + 1); |
701 | VPRINTK("ata%u: write hdma, 0x%x 0x%x\n", ap->id, | 701 | VPRINTK("ata%u: write hdma, 0x%x 0x%x\n", ap->print_id, |
702 | readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT)); | 702 | readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT)); |
703 | 703 | ||
704 | /* submit ata pkt */ | 704 | /* submit ata pkt */ |
@@ -711,7 +711,7 @@ static inline unsigned int pdc20621_host_intr( struct ata_port *ap, | |||
711 | 711 | ||
712 | /* step two - execute ATA command */ | 712 | /* step two - execute ATA command */ |
713 | else { | 713 | else { |
714 | VPRINTK("ata%u: write ata, 0x%x 0x%x\n", ap->id, | 714 | VPRINTK("ata%u: write ata, 0x%x 0x%x\n", ap->print_id, |
715 | readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT)); | 715 | readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT)); |
716 | /* get drive status; clear intr; complete txn */ | 716 | /* get drive status; clear intr; complete txn */ |
717 | qc->err_mask |= ac_err_mask(ata_wait_idle(ap)); | 717 | qc->err_mask |= ac_err_mask(ata_wait_idle(ap)); |