aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-scsi.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-02-20 11:06:51 -0500
committerJeff Garzik <jeff@garzik.org>2007-02-21 04:58:20 -0500
commit44877b4e22f391d39c6589412106a3668e81a05b (patch)
tree10bf134c2c8c15e3504d67461b42f53c6de88523 /drivers/ata/libata-scsi.c
parent5ce0cf6fafd02fb4c43fc1a1bee6069d6c0a36b1 (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/ata/libata-scsi.c')
-rw-r--r--drivers/ata/libata-scsi.c8
1 files changed, 4 insertions, 4 deletions
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],