aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-11-14 08:37:35 -0500
committerJeff Garzik <jeff@garzik.org>2006-12-01 22:46:00 -0500
commit750426aa1ad1ddd1fa8bb4ed531a7956f3b9a27c (patch)
tree40772a293ad5249a678cbbc862ea10734d956b32
parentf38621b3109068adc8430bc2d170ccea59df4261 (diff)
[PATCH] libata: cosmetic changes to sense generation functions
* s/ata_gen_ata_desc_sense/ata_gen_passthru_sense/ * s/ata_gen_fixed_sense/ata_gen_ata_sense/ * make both functions static * neither function has locking requirement, change it to None. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r--drivers/ata/libata-scsi.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 87f82827c1bf..6626ee1d57dc 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -671,7 +671,7 @@ void ata_to_sense_error(unsigned id, u8 drv_stat, u8 drv_err, u8 *sk, u8 *asc,
671} 671}
672 672
673/* 673/*
674 * ata_gen_ata_desc_sense - Generate check condition sense block. 674 * ata_gen_passthru_sense - Generate check condition sense block.
675 * @qc: Command that completed. 675 * @qc: Command that completed.
676 * 676 *
677 * This function is specific to the ATA descriptor format sense 677 * This function is specific to the ATA descriptor format sense
@@ -681,9 +681,9 @@ void ata_to_sense_error(unsigned id, u8 drv_stat, u8 drv_err, u8 *sk, u8 *asc,
681 * block. Clear sense key, ASC & ASCQ if there is no error. 681 * block. Clear sense key, ASC & ASCQ if there is no error.
682 * 682 *
683 * LOCKING: 683 * LOCKING:
684 * spin_lock_irqsave(host lock) 684 * None.
685 */ 685 */
686void ata_gen_ata_desc_sense(struct ata_queued_cmd *qc) 686static void ata_gen_passthru_sense(struct ata_queued_cmd *qc)
687{ 687{
688 struct scsi_cmnd *cmd = qc->scsicmd; 688 struct scsi_cmnd *cmd = qc->scsicmd;
689 struct ata_taskfile *tf = &qc->result_tf; 689 struct ata_taskfile *tf = &qc->result_tf;
@@ -743,16 +743,16 @@ void ata_gen_ata_desc_sense(struct ata_queued_cmd *qc)
743} 743}
744 744
745/** 745/**
746 * ata_gen_fixed_sense - generate a SCSI fixed sense block 746 * ata_gen_ata_sense - generate a SCSI fixed sense block
747 * @qc: Command that we are erroring out 747 * @qc: Command that we are erroring out
748 * 748 *
749 * Leverage ata_to_sense_error() to give us the codes. Fit our 749 * Leverage ata_to_sense_error() to give us the codes. Fit our
750 * LBA in here if there's room. 750 * LBA in here if there's room.
751 * 751 *
752 * LOCKING: 752 * LOCKING:
753 * inherited from caller 753 * None.
754 */ 754 */
755void ata_gen_fixed_sense(struct ata_queued_cmd *qc) 755static void ata_gen_ata_sense(struct ata_queued_cmd *qc)
756{ 756{
757 struct scsi_cmnd *cmd = qc->scsicmd; 757 struct scsi_cmnd *cmd = qc->scsicmd;
758 struct ata_taskfile *tf = &qc->result_tf; 758 struct ata_taskfile *tf = &qc->result_tf;
@@ -1460,7 +1460,7 @@ static void ata_scsi_qc_complete(struct ata_queued_cmd *qc)
1460 */ 1460 */
1461 if (((cdb[0] == ATA_16) || (cdb[0] == ATA_12)) && 1461 if (((cdb[0] == ATA_16) || (cdb[0] == ATA_12)) &&
1462 ((cdb[2] & 0x20) || need_sense)) { 1462 ((cdb[2] & 0x20) || need_sense)) {
1463 ata_gen_ata_desc_sense(qc); 1463 ata_gen_passthru_sense(qc);
1464 } else { 1464 } else {
1465 if (!need_sense) { 1465 if (!need_sense) {
1466 cmd->result = SAM_STAT_GOOD; 1466 cmd->result = SAM_STAT_GOOD;
@@ -1471,7 +1471,7 @@ static void ata_scsi_qc_complete(struct ata_queued_cmd *qc)
1471 * good for smaller LBA (and maybe CHS?) 1471 * good for smaller LBA (and maybe CHS?)
1472 * devices. 1472 * devices.
1473 */ 1473 */
1474 ata_gen_fixed_sense(qc); 1474 ata_gen_ata_sense(qc);
1475 } 1475 }
1476 } 1476 }
1477 1477
@@ -2302,7 +2302,7 @@ static void atapi_sense_complete(struct ata_queued_cmd *qc)
2302 * a sense descriptors, since that's only 2302 * a sense descriptors, since that's only
2303 * correct for ATA, not ATAPI 2303 * correct for ATA, not ATAPI
2304 */ 2304 */
2305 ata_gen_ata_desc_sense(qc); 2305 ata_gen_passthru_sense(qc);
2306 } 2306 }
2307 2307
2308 qc->scsidone(qc->scsicmd); 2308 qc->scsidone(qc->scsicmd);
@@ -2377,7 +2377,7 @@ static void atapi_qc_complete(struct ata_queued_cmd *qc)
2377 * sense descriptors, since that's only 2377 * sense descriptors, since that's only
2378 * correct for ATA, not ATAPI 2378 * correct for ATA, not ATAPI
2379 */ 2379 */
2380 ata_gen_ata_desc_sense(qc); 2380 ata_gen_passthru_sense(qc);
2381 } 2381 }
2382 2382
2383 /* SCSI EH automatically locks door if sdev->locked is 2383 /* SCSI EH automatically locks door if sdev->locked is
@@ -2410,7 +2410,7 @@ static void atapi_qc_complete(struct ata_queued_cmd *qc)
2410 * a sense descriptors, since that's only 2410 * a sense descriptors, since that's only
2411 * correct for ATA, not ATAPI 2411 * correct for ATA, not ATAPI
2412 */ 2412 */
2413 ata_gen_ata_desc_sense(qc); 2413 ata_gen_passthru_sense(qc);
2414 } else { 2414 } else {
2415 u8 *scsicmd = cmd->cmnd; 2415 u8 *scsicmd = cmd->cmnd;
2416 2416