aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-scsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/libata-scsi.c')
-rw-r--r--drivers/scsi/libata-scsi.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
index 9944adbe5a1d..a68c0341dc82 100644
--- a/drivers/scsi/libata-scsi.c
+++ b/drivers/scsi/libata-scsi.c
@@ -44,9 +44,9 @@
44 44
45#include "libata.h" 45#include "libata.h"
46 46
47typedef unsigned int (*ata_xlat_func_t)(struct ata_queued_cmd *qc, u8 *scsicmd); 47typedef unsigned int (*ata_xlat_func_t)(struct ata_queued_cmd *qc, const u8 *scsicmd);
48static struct ata_device * 48static struct ata_device *
49ata_scsi_find_dev(struct ata_port *ap, struct scsi_device *scsidev); 49ata_scsi_find_dev(struct ata_port *ap, const struct scsi_device *scsidev);
50 50
51 51
52static void ata_scsi_invalid_field(struct scsi_cmnd *cmd, 52static void ata_scsi_invalid_field(struct scsi_cmnd *cmd,
@@ -428,7 +428,7 @@ int ata_scsi_error(struct Scsi_Host *host)
428 */ 428 */
429 429
430static unsigned int ata_scsi_start_stop_xlat(struct ata_queued_cmd *qc, 430static unsigned int ata_scsi_start_stop_xlat(struct ata_queued_cmd *qc,
431 u8 *scsicmd) 431 const u8 *scsicmd)
432{ 432{
433 struct ata_taskfile *tf = &qc->tf; 433 struct ata_taskfile *tf = &qc->tf;
434 434
@@ -495,7 +495,7 @@ invalid_fld:
495 * Zero on success, non-zero on error. 495 * Zero on success, non-zero on error.
496 */ 496 */
497 497
498static unsigned int ata_scsi_flush_xlat(struct ata_queued_cmd *qc, u8 *scsicmd) 498static unsigned int ata_scsi_flush_xlat(struct ata_queued_cmd *qc, const u8 *scsicmd)
499{ 499{
500 struct ata_taskfile *tf = &qc->tf; 500 struct ata_taskfile *tf = &qc->tf;
501 501
@@ -522,7 +522,7 @@ static unsigned int ata_scsi_flush_xlat(struct ata_queued_cmd *qc, u8 *scsicmd)
522 * @plen: the transfer length 522 * @plen: the transfer length
523 */ 523 */
524 524
525static void scsi_6_lba_len(u8 *scsicmd, u64 *plba, u32 *plen) 525static void scsi_6_lba_len(const u8 *scsicmd, u64 *plba, u32 *plen)
526{ 526{
527 u64 lba = 0; 527 u64 lba = 0;
528 u32 len = 0; 528 u32 len = 0;
@@ -549,7 +549,7 @@ static void scsi_6_lba_len(u8 *scsicmd, u64 *plba, u32 *plen)
549 * @plen: the transfer length 549 * @plen: the transfer length
550 */ 550 */
551 551
552static void scsi_10_lba_len(u8 *scsicmd, u64 *plba, u32 *plen) 552static void scsi_10_lba_len(const u8 *scsicmd, u64 *plba, u32 *plen)
553{ 553{
554 u64 lba = 0; 554 u64 lba = 0;
555 u32 len = 0; 555 u32 len = 0;
@@ -579,7 +579,7 @@ static void scsi_10_lba_len(u8 *scsicmd, u64 *plba, u32 *plen)
579 * @plen: the transfer length 579 * @plen: the transfer length
580 */ 580 */
581 581
582static void scsi_16_lba_len(u8 *scsicmd, u64 *plba, u32 *plen) 582static void scsi_16_lba_len(const u8 *scsicmd, u64 *plba, u32 *plen)
583{ 583{
584 u64 lba = 0; 584 u64 lba = 0;
585 u32 len = 0; 585 u32 len = 0;
@@ -618,7 +618,7 @@ static void scsi_16_lba_len(u8 *scsicmd, u64 *plba, u32 *plen)
618 * Zero on success, non-zero on error. 618 * Zero on success, non-zero on error.
619 */ 619 */
620 620
621static unsigned int ata_scsi_verify_xlat(struct ata_queued_cmd *qc, u8 *scsicmd) 621static unsigned int ata_scsi_verify_xlat(struct ata_queued_cmd *qc, const u8 *scsicmd)
622{ 622{
623 struct ata_taskfile *tf = &qc->tf; 623 struct ata_taskfile *tf = &qc->tf;
624 struct ata_device *dev = qc->dev; 624 struct ata_device *dev = qc->dev;
@@ -744,7 +744,7 @@ nothing_to_do:
744 * Zero on success, non-zero on error. 744 * Zero on success, non-zero on error.
745 */ 745 */
746 746
747static unsigned int ata_scsi_rw_xlat(struct ata_queued_cmd *qc, u8 *scsicmd) 747static unsigned int ata_scsi_rw_xlat(struct ata_queued_cmd *qc, const u8 *scsicmd)
748{ 748{
749 struct ata_taskfile *tf = &qc->tf; 749 struct ata_taskfile *tf = &qc->tf;
750 struct ata_device *dev = qc->dev; 750 struct ata_device *dev = qc->dev;
@@ -1698,7 +1698,7 @@ static int atapi_qc_complete(struct ata_queued_cmd *qc, u8 drv_stat)
1698 * Zero on success, non-zero on failure. 1698 * Zero on success, non-zero on failure.
1699 */ 1699 */
1700 1700
1701static unsigned int atapi_xlat(struct ata_queued_cmd *qc, u8 *scsicmd) 1701static unsigned int atapi_xlat(struct ata_queued_cmd *qc, const u8 *scsicmd)
1702{ 1702{
1703 struct scsi_cmnd *cmd = qc->scsicmd; 1703 struct scsi_cmnd *cmd = qc->scsicmd;
1704 struct ata_device *dev = qc->dev; 1704 struct ata_device *dev = qc->dev;
@@ -1767,7 +1767,7 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc, u8 *scsicmd)
1767 */ 1767 */
1768 1768
1769static struct ata_device * 1769static struct ata_device *
1770ata_scsi_find_dev(struct ata_port *ap, struct scsi_device *scsidev) 1770ata_scsi_find_dev(struct ata_port *ap, const struct scsi_device *scsidev)
1771{ 1771{
1772 struct ata_device *dev; 1772 struct ata_device *dev;
1773 1773
@@ -1924,7 +1924,7 @@ void ata_scsi_simulate(u16 *id,
1924 void (*done)(struct scsi_cmnd *)) 1924 void (*done)(struct scsi_cmnd *))
1925{ 1925{
1926 struct ata_scsi_args args; 1926 struct ata_scsi_args args;
1927 u8 *scsicmd = cmd->cmnd; 1927 const u8 *scsicmd = cmd->cmnd;
1928 1928
1929 args.id = id; 1929 args.id = id;
1930 args.cmd = cmd; 1930 args.cmd = cmd;