diff options
author | Ondrej Zary <linux@rainbow-software.org> | 2015-02-06 17:11:27 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Odin.com> | 2015-04-09 21:06:40 -0400 |
commit | cb5b570ce3cc7e91f47339e60efba75a4bbc347c (patch) | |
tree | 2c00c0ddc4c1bf0fc8e5795116399307928ef73b | |
parent | f1bbef63442f36f5a0fc91f73da104aa8a39a873 (diff) |
aha1542: Use u8 instead of unchar
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
-rw-r--r-- | drivers/scsi/aha1542.c | 50 | ||||
-rw-r--r-- | drivers/scsi/aha1542.h | 42 |
2 files changed, 46 insertions, 46 deletions
diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c index 2a6308f28d9f..8851719d8d0e 100644 --- a/drivers/scsi/aha1542.c +++ b/drivers/scsi/aha1542.c | |||
@@ -168,7 +168,7 @@ static void aha1542_stat(void) | |||
168 | routine does not send something out while we are in the middle of this. | 168 | routine does not send something out while we are in the middle of this. |
169 | Fortunately, it is only at boot time that multi-byte messages | 169 | Fortunately, it is only at boot time that multi-byte messages |
170 | are ever sent. */ | 170 | are ever sent. */ |
171 | static int aha1542_out(unsigned int base, unchar * cmdp, int len) | 171 | static int aha1542_out(unsigned int base, u8 *cmdp, int len) |
172 | { | 172 | { |
173 | unsigned long flags = 0; | 173 | unsigned long flags = 0; |
174 | int got_lock; | 174 | int got_lock; |
@@ -207,7 +207,7 @@ fail: | |||
207 | /* Only used at boot time, so we do not need to worry about latency as much | 207 | /* Only used at boot time, so we do not need to worry about latency as much |
208 | here */ | 208 | here */ |
209 | 209 | ||
210 | static int aha1542_in(unsigned int base, unchar *cmdp, int len) | 210 | static int aha1542_in(unsigned int base, u8 *cmdp, int len) |
211 | { | 211 | { |
212 | unsigned long flags; | 212 | unsigned long flags; |
213 | 213 | ||
@@ -228,7 +228,7 @@ fail: | |||
228 | /* Similar to aha1542_in, except that we wait a very short period of time. | 228 | /* Similar to aha1542_in, except that we wait a very short period of time. |
229 | We use this if we know the board is alive and awake, but we are not sure | 229 | We use this if we know the board is alive and awake, but we are not sure |
230 | if the board will respond to the command we are about to send or not */ | 230 | if the board will respond to the command we are about to send or not */ |
231 | static int aha1542_in1(unsigned int base, unchar *cmdp, int len) | 231 | static int aha1542_in1(unsigned int base, u8 *cmdp, int len) |
232 | { | 232 | { |
233 | unsigned long flags; | 233 | unsigned long flags; |
234 | 234 | ||
@@ -302,9 +302,9 @@ static int makecode(unsigned hosterr, unsigned scsierr) | |||
302 | 302 | ||
303 | static int aha1542_test_port(int bse, struct Scsi_Host *shpnt) | 303 | static int aha1542_test_port(int bse, struct Scsi_Host *shpnt) |
304 | { | 304 | { |
305 | unchar inquiry_cmd[] = {CMD_INQUIRY}; | 305 | u8 inquiry_cmd[] = {CMD_INQUIRY}; |
306 | unchar inquiry_result[4]; | 306 | u8 inquiry_result[4]; |
307 | unchar *cmdp; | 307 | u8 *cmdp; |
308 | int len; | 308 | int len; |
309 | volatile int debug = 0; | 309 | volatile int debug = 0; |
310 | 310 | ||
@@ -542,11 +542,11 @@ static void aha1542_intr_handle(struct Scsi_Host *shost) | |||
542 | static int aha1542_queuecommand_lck(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *)) | 542 | static int aha1542_queuecommand_lck(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *)) |
543 | { | 543 | { |
544 | struct aha1542_hostdata *aha1542 = shost_priv(SCpnt->device->host); | 544 | struct aha1542_hostdata *aha1542 = shost_priv(SCpnt->device->host); |
545 | unchar ahacmd = CMD_START_SCSI; | 545 | u8 ahacmd = CMD_START_SCSI; |
546 | unchar direction; | 546 | u8 direction; |
547 | unchar *cmd = (unchar *) SCpnt->cmnd; | 547 | u8 *cmd = (u8 *) SCpnt->cmnd; |
548 | unchar target = SCpnt->device->id; | 548 | u8 target = SCpnt->device->id; |
549 | unchar lun = SCpnt->device->lun; | 549 | u8 lun = SCpnt->device->lun; |
550 | unsigned long flags; | 550 | unsigned long flags; |
551 | int bufflen = scsi_bufflen(SCpnt); | 551 | int bufflen = scsi_bufflen(SCpnt); |
552 | int mbo; | 552 | int mbo; |
@@ -674,7 +674,7 @@ static int aha1542_queuecommand_lck(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd * | |||
674 | int i; | 674 | int i; |
675 | printk(KERN_DEBUG "aha1542_command: sending.. "); | 675 | printk(KERN_DEBUG "aha1542_command: sending.. "); |
676 | for (i = 0; i < sizeof(ccb[mbo]) - 10; i++) | 676 | for (i = 0; i < sizeof(ccb[mbo]) - 10; i++) |
677 | printk("%02x ", ((unchar *) & ccb[mbo])[i]); | 677 | printk("%02x ", ((u8 *) &ccb[mbo])[i]); |
678 | }; | 678 | }; |
679 | #endif | 679 | #endif |
680 | 680 | ||
@@ -701,7 +701,7 @@ static void setup_mailboxes(int bse, struct Scsi_Host *shpnt) | |||
701 | struct mailbox *mb = aha1542->mb; | 701 | struct mailbox *mb = aha1542->mb; |
702 | struct ccb *ccb = aha1542->ccb; | 702 | struct ccb *ccb = aha1542->ccb; |
703 | 703 | ||
704 | unchar cmd[5] = { CMD_MBINIT, AHA1542_MAILBOXES, 0, 0, 0}; | 704 | u8 cmd[5] = { CMD_MBINIT, AHA1542_MAILBOXES, 0, 0, 0}; |
705 | 705 | ||
706 | for (i = 0; i < AHA1542_MAILBOXES; i++) { | 706 | for (i = 0; i < AHA1542_MAILBOXES; i++) { |
707 | mb[i].status = mb[AHA1542_MAILBOXES + i].status = 0; | 707 | mb[i].status = mb[AHA1542_MAILBOXES + i].status = 0; |
@@ -720,8 +720,8 @@ fail: | |||
720 | 720 | ||
721 | static int aha1542_getconfig(int base_io, unsigned char *irq_level, unsigned char *dma_chan, unsigned char *scsi_id) | 721 | static int aha1542_getconfig(int base_io, unsigned char *irq_level, unsigned char *dma_chan, unsigned char *scsi_id) |
722 | { | 722 | { |
723 | unchar inquiry_cmd[] = {CMD_RETCONF}; | 723 | u8 inquiry_cmd[] = {CMD_RETCONF}; |
724 | unchar inquiry_result[3]; | 724 | u8 inquiry_result[3]; |
725 | int i; | 725 | int i; |
726 | i = inb(STATUS(base_io)); | 726 | i = inb(STATUS(base_io)); |
727 | if (i & DF) { | 727 | if (i & DF) { |
@@ -789,8 +789,8 @@ fail: | |||
789 | 789 | ||
790 | static int aha1542_mbenable(int base) | 790 | static int aha1542_mbenable(int base) |
791 | { | 791 | { |
792 | static unchar mbenable_cmd[3]; | 792 | static u8 mbenable_cmd[3]; |
793 | static unchar mbenable_result[2]; | 793 | static u8 mbenable_result[2]; |
794 | int retval; | 794 | int retval; |
795 | 795 | ||
796 | retval = BIOS_TRANSLATION_6432; | 796 | retval = BIOS_TRANSLATION_6432; |
@@ -824,8 +824,8 @@ fail: | |||
824 | /* Query the board to find out if it is a 1542 or a 1740, or whatever. */ | 824 | /* Query the board to find out if it is a 1542 or a 1740, or whatever. */ |
825 | static int aha1542_query(int base_io, int *transl) | 825 | static int aha1542_query(int base_io, int *transl) |
826 | { | 826 | { |
827 | unchar inquiry_cmd[] = {CMD_INQUIRY}; | 827 | u8 inquiry_cmd[] = {CMD_INQUIRY}; |
828 | unchar inquiry_result[4]; | 828 | u8 inquiry_result[4]; |
829 | int i; | 829 | int i; |
830 | i = inb(STATUS(base_io)); | 830 | i = inb(STATUS(base_io)); |
831 | if (i & DF) { | 831 | if (i & DF) { |
@@ -968,8 +968,8 @@ static struct Scsi_Host *aha1542_hw_init(struct scsi_host_template *tpnt, struct | |||
968 | 968 | ||
969 | /* Set the Bus on/off-times as not to ruin floppy performance */ | 969 | /* Set the Bus on/off-times as not to ruin floppy performance */ |
970 | { | 970 | { |
971 | unchar oncmd[] = {CMD_BUSON_TIME, 7}; | 971 | u8 oncmd[] = {CMD_BUSON_TIME, 7}; |
972 | unchar offcmd[] = {CMD_BUSOFF_TIME, 5}; | 972 | u8 offcmd[] = {CMD_BUSOFF_TIME, 5}; |
973 | 973 | ||
974 | if (setup_called[indx]) { | 974 | if (setup_called[indx]) { |
975 | oncmd[1] = setup_buson[indx]; | 975 | oncmd[1] = setup_buson[indx]; |
@@ -982,7 +982,7 @@ static struct Scsi_Host *aha1542_hw_init(struct scsi_host_template *tpnt, struct | |||
982 | aha1542_out(base_io, offcmd, 2); | 982 | aha1542_out(base_io, offcmd, 2); |
983 | WAIT(INTRFLAGS(base_io), INTRMASK, HACC, 0); | 983 | WAIT(INTRFLAGS(base_io), INTRMASK, HACC, 0); |
984 | if (setup_dmaspeed[indx] >= 0) { | 984 | if (setup_dmaspeed[indx] >= 0) { |
985 | unchar dmacmd[] = {CMD_DMASPEED, 0}; | 985 | u8 dmacmd[] = {CMD_DMASPEED, 0}; |
986 | dmacmd[1] = setup_dmaspeed[indx]; | 986 | dmacmd[1] = setup_dmaspeed[indx]; |
987 | aha1542_intr_reset(base_io); | 987 | aha1542_intr_reset(base_io); |
988 | aha1542_out(base_io, dmacmd, 2); | 988 | aha1542_out(base_io, dmacmd, 2); |
@@ -1103,11 +1103,11 @@ static int aha1542_dev_reset(Scsi_Cmnd * SCpnt) | |||
1103 | struct aha1542_hostdata *aha1542 = shost_priv(SCpnt->device->host); | 1103 | struct aha1542_hostdata *aha1542 = shost_priv(SCpnt->device->host); |
1104 | unsigned long flags; | 1104 | unsigned long flags; |
1105 | struct mailbox *mb = aha1542->mb; | 1105 | struct mailbox *mb = aha1542->mb; |
1106 | unchar target = SCpnt->device->id; | 1106 | u8 target = SCpnt->device->id; |
1107 | unchar lun = SCpnt->device->lun; | 1107 | u8 lun = SCpnt->device->lun; |
1108 | int mbo; | 1108 | int mbo; |
1109 | struct ccb *ccb = aha1542->ccb; | 1109 | struct ccb *ccb = aha1542->ccb; |
1110 | unchar ahacmd = CMD_START_SCSI; | 1110 | u8 ahacmd = CMD_START_SCSI; |
1111 | 1111 | ||
1112 | spin_lock_irqsave(&aha1542_lock, flags); | 1112 | spin_lock_irqsave(&aha1542_lock, flags); |
1113 | mbo = aha1542->aha1542_last_mbo_used + 1; | 1113 | mbo = aha1542->aha1542_last_mbo_used + 1; |
diff --git a/drivers/scsi/aha1542.h b/drivers/scsi/aha1542.h index 812a40670973..6b418bbdc9f9 100644 --- a/drivers/scsi/aha1542.h +++ b/drivers/scsi/aha1542.h | |||
@@ -80,14 +80,14 @@ | |||
80 | 80 | ||
81 | /* Mailbox Definition 5.2.1 and 5.2.2 */ | 81 | /* Mailbox Definition 5.2.1 and 5.2.2 */ |
82 | struct mailbox { | 82 | struct mailbox { |
83 | unchar status; /* Command/Status */ | 83 | u8 status; /* Command/Status */ |
84 | unchar ccbptr[3]; /* msb, .., lsb */ | 84 | u8 ccbptr[3]; /* msb, .., lsb */ |
85 | }; | 85 | }; |
86 | 86 | ||
87 | /* This is used with scatter-gather */ | 87 | /* This is used with scatter-gather */ |
88 | struct chain { | 88 | struct chain { |
89 | unchar datalen[3]; /* Size of this part of chain */ | 89 | u8 datalen[3]; /* Size of this part of chain */ |
90 | unchar dataptr[3]; /* Location of data */ | 90 | u8 dataptr[3]; /* Location of data */ |
91 | }; | 91 | }; |
92 | 92 | ||
93 | /* These belong in scsi.h also */ | 93 | /* These belong in scsi.h also */ |
@@ -106,23 +106,23 @@ static inline void any2scsi(u8 *p, u32 v) | |||
106 | #define MAX_CDB 12 | 106 | #define MAX_CDB 12 |
107 | #define MAX_SENSE 14 | 107 | #define MAX_SENSE 14 |
108 | 108 | ||
109 | struct ccb { /* Command Control Block 5.3 */ | 109 | struct ccb { /* Command Control Block 5.3 */ |
110 | unchar op; /* Command Control Block Operation Code */ | 110 | u8 op; /* Command Control Block Operation Code */ |
111 | unchar idlun; /* op=0,2:Target Id, op=1:Initiator Id */ | 111 | u8 idlun; /* op=0,2:Target Id, op=1:Initiator Id */ |
112 | /* Outbound data transfer, length is checked*/ | 112 | /* Outbound data transfer, length is checked*/ |
113 | /* Inbound data transfer, length is checked */ | 113 | /* Inbound data transfer, length is checked */ |
114 | /* Logical Unit Number */ | 114 | /* Logical Unit Number */ |
115 | unchar cdblen; /* SCSI Command Length */ | 115 | u8 cdblen; /* SCSI Command Length */ |
116 | unchar rsalen; /* Request Sense Allocation Length/Disable */ | 116 | u8 rsalen; /* Request Sense Allocation Length/Disable */ |
117 | unchar datalen[3]; /* Data Length (msb, .., lsb) */ | 117 | u8 datalen[3]; /* Data Length (msb, .., lsb) */ |
118 | unchar dataptr[3]; /* Data Pointer */ | 118 | u8 dataptr[3]; /* Data Pointer */ |
119 | unchar linkptr[3]; /* Link Pointer */ | 119 | u8 linkptr[3]; /* Link Pointer */ |
120 | unchar commlinkid; /* Command Linking Identifier */ | 120 | u8 commlinkid; /* Command Linking Identifier */ |
121 | unchar hastat; /* Host Adapter Status (HASTAT) */ | 121 | u8 hastat; /* Host Adapter Status (HASTAT) */ |
122 | unchar tarstat; /* Target Device Status */ | 122 | u8 tarstat; /* Target Device Status */ |
123 | unchar reserved[2]; | 123 | u8 reserved[2]; |
124 | unchar cdb[MAX_CDB+MAX_SENSE];/* SCSI Command Descriptor Block */ | 124 | u8 cdb[MAX_CDB+MAX_SENSE]; /* SCSI Command Descriptor Block */ |
125 | /* REQUEST SENSE */ | 125 | /* REQUEST SENSE */ |
126 | }; | 126 | }; |
127 | 127 | ||
128 | static struct Scsi_Host *aha1542_hw_init(struct scsi_host_template *tpnt, struct device *pdev, int indx); | 128 | static struct Scsi_Host *aha1542_hw_init(struct scsi_host_template *tpnt, struct device *pdev, int indx); |