Loading drivers/scsi/aha1542.c +25 −25 Original line number Original line Diff line number Diff line Loading @@ -168,7 +168,7 @@ static void aha1542_stat(void) routine does not send something out while we are in the middle of this. routine does not send something out while we are in the middle of this. Fortunately, it is only at boot time that multi-byte messages Fortunately, it is only at boot time that multi-byte messages are ever sent. */ are ever sent. */ static int aha1542_out(unsigned int base, unchar * cmdp, int len) static int aha1542_out(unsigned int base, u8 *cmdp, int len) { { unsigned long flags = 0; unsigned long flags = 0; int got_lock; int got_lock; Loading Loading @@ -207,7 +207,7 @@ static int aha1542_out(unsigned int base, unchar * cmdp, int len) /* Only used at boot time, so we do not need to worry about latency as much /* Only used at boot time, so we do not need to worry about latency as much here */ here */ static int aha1542_in(unsigned int base, unchar *cmdp, int len) static int aha1542_in(unsigned int base, u8 *cmdp, int len) { { unsigned long flags; unsigned long flags; Loading @@ -228,7 +228,7 @@ static int aha1542_in(unsigned int base, unchar *cmdp, int len) /* Similar to aha1542_in, except that we wait a very short period of time. /* Similar to aha1542_in, except that we wait a very short period of time. We use this if we know the board is alive and awake, but we are not sure We use this if we know the board is alive and awake, but we are not sure if the board will respond to the command we are about to send or not */ if the board will respond to the command we are about to send or not */ static int aha1542_in1(unsigned int base, unchar *cmdp, int len) static int aha1542_in1(unsigned int base, u8 *cmdp, int len) { { unsigned long flags; unsigned long flags; Loading Loading @@ -302,9 +302,9 @@ static int makecode(unsigned hosterr, unsigned scsierr) static int aha1542_test_port(int bse, struct Scsi_Host *shpnt) static int aha1542_test_port(int bse, struct Scsi_Host *shpnt) { { unchar inquiry_cmd[] = {CMD_INQUIRY}; u8 inquiry_cmd[] = {CMD_INQUIRY}; unchar inquiry_result[4]; u8 inquiry_result[4]; unchar *cmdp; u8 *cmdp; int len; int len; volatile int debug = 0; volatile int debug = 0; Loading Loading @@ -542,11 +542,11 @@ static void aha1542_intr_handle(struct Scsi_Host *shost) static int aha1542_queuecommand_lck(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *)) static int aha1542_queuecommand_lck(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *)) { { struct aha1542_hostdata *aha1542 = shost_priv(SCpnt->device->host); struct aha1542_hostdata *aha1542 = shost_priv(SCpnt->device->host); unchar ahacmd = CMD_START_SCSI; u8 ahacmd = CMD_START_SCSI; unchar direction; u8 direction; unchar *cmd = (unchar *) SCpnt->cmnd; u8 *cmd = (u8 *) SCpnt->cmnd; unchar target = SCpnt->device->id; u8 target = SCpnt->device->id; unchar lun = SCpnt->device->lun; u8 lun = SCpnt->device->lun; unsigned long flags; unsigned long flags; int bufflen = scsi_bufflen(SCpnt); int bufflen = scsi_bufflen(SCpnt); int mbo; int mbo; Loading Loading @@ -674,7 +674,7 @@ static int aha1542_queuecommand_lck(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd * int i; int i; printk(KERN_DEBUG "aha1542_command: sending.. "); printk(KERN_DEBUG "aha1542_command: sending.. "); for (i = 0; i < sizeof(ccb[mbo]) - 10; i++) for (i = 0; i < sizeof(ccb[mbo]) - 10; i++) printk("%02x ", ((unchar *) & ccb[mbo])[i]); printk("%02x ", ((u8 *) &ccb[mbo])[i]); }; }; #endif #endif Loading @@ -701,7 +701,7 @@ static void setup_mailboxes(int bse, struct Scsi_Host *shpnt) struct mailbox *mb = aha1542->mb; struct mailbox *mb = aha1542->mb; struct ccb *ccb = aha1542->ccb; struct ccb *ccb = aha1542->ccb; unchar cmd[5] = { CMD_MBINIT, AHA1542_MAILBOXES, 0, 0, 0}; u8 cmd[5] = { CMD_MBINIT, AHA1542_MAILBOXES, 0, 0, 0}; for (i = 0; i < AHA1542_MAILBOXES; i++) { for (i = 0; i < AHA1542_MAILBOXES; i++) { mb[i].status = mb[AHA1542_MAILBOXES + i].status = 0; mb[i].status = mb[AHA1542_MAILBOXES + i].status = 0; Loading @@ -720,8 +720,8 @@ static void setup_mailboxes(int bse, struct Scsi_Host *shpnt) static int aha1542_getconfig(int base_io, unsigned char *irq_level, unsigned char *dma_chan, unsigned char *scsi_id) static int aha1542_getconfig(int base_io, unsigned char *irq_level, unsigned char *dma_chan, unsigned char *scsi_id) { { unchar inquiry_cmd[] = {CMD_RETCONF}; u8 inquiry_cmd[] = {CMD_RETCONF}; unchar inquiry_result[3]; u8 inquiry_result[3]; int i; int i; i = inb(STATUS(base_io)); i = inb(STATUS(base_io)); if (i & DF) { if (i & DF) { Loading Loading @@ -789,8 +789,8 @@ static int aha1542_getconfig(int base_io, unsigned char *irq_level, unsigned cha static int aha1542_mbenable(int base) static int aha1542_mbenable(int base) { { static unchar mbenable_cmd[3]; static u8 mbenable_cmd[3]; static unchar mbenable_result[2]; static u8 mbenable_result[2]; int retval; int retval; retval = BIOS_TRANSLATION_6432; retval = BIOS_TRANSLATION_6432; Loading Loading @@ -824,8 +824,8 @@ static int aha1542_mbenable(int base) /* Query the board to find out if it is a 1542 or a 1740, or whatever. */ /* Query the board to find out if it is a 1542 or a 1740, or whatever. */ static int aha1542_query(int base_io, int *transl) static int aha1542_query(int base_io, int *transl) { { unchar inquiry_cmd[] = {CMD_INQUIRY}; u8 inquiry_cmd[] = {CMD_INQUIRY}; unchar inquiry_result[4]; u8 inquiry_result[4]; int i; int i; i = inb(STATUS(base_io)); i = inb(STATUS(base_io)); if (i & DF) { if (i & DF) { Loading Loading @@ -968,8 +968,8 @@ static struct Scsi_Host *aha1542_hw_init(struct scsi_host_template *tpnt, struct /* Set the Bus on/off-times as not to ruin floppy performance */ /* Set the Bus on/off-times as not to ruin floppy performance */ { { unchar oncmd[] = {CMD_BUSON_TIME, 7}; u8 oncmd[] = {CMD_BUSON_TIME, 7}; unchar offcmd[] = {CMD_BUSOFF_TIME, 5}; u8 offcmd[] = {CMD_BUSOFF_TIME, 5}; if (setup_called[indx]) { if (setup_called[indx]) { oncmd[1] = setup_buson[indx]; oncmd[1] = setup_buson[indx]; Loading @@ -982,7 +982,7 @@ static struct Scsi_Host *aha1542_hw_init(struct scsi_host_template *tpnt, struct aha1542_out(base_io, offcmd, 2); aha1542_out(base_io, offcmd, 2); WAIT(INTRFLAGS(base_io), INTRMASK, HACC, 0); WAIT(INTRFLAGS(base_io), INTRMASK, HACC, 0); if (setup_dmaspeed[indx] >= 0) { if (setup_dmaspeed[indx] >= 0) { unchar dmacmd[] = {CMD_DMASPEED, 0}; u8 dmacmd[] = {CMD_DMASPEED, 0}; dmacmd[1] = setup_dmaspeed[indx]; dmacmd[1] = setup_dmaspeed[indx]; aha1542_intr_reset(base_io); aha1542_intr_reset(base_io); aha1542_out(base_io, dmacmd, 2); aha1542_out(base_io, dmacmd, 2); Loading Loading @@ -1103,11 +1103,11 @@ static int aha1542_dev_reset(Scsi_Cmnd * SCpnt) struct aha1542_hostdata *aha1542 = shost_priv(SCpnt->device->host); struct aha1542_hostdata *aha1542 = shost_priv(SCpnt->device->host); unsigned long flags; unsigned long flags; struct mailbox *mb = aha1542->mb; struct mailbox *mb = aha1542->mb; unchar target = SCpnt->device->id; u8 target = SCpnt->device->id; unchar lun = SCpnt->device->lun; u8 lun = SCpnt->device->lun; int mbo; int mbo; struct ccb *ccb = aha1542->ccb; struct ccb *ccb = aha1542->ccb; unchar ahacmd = CMD_START_SCSI; u8 ahacmd = CMD_START_SCSI; spin_lock_irqsave(&aha1542_lock, flags); spin_lock_irqsave(&aha1542_lock, flags); mbo = aha1542->aha1542_last_mbo_used + 1; mbo = aha1542->aha1542_last_mbo_used + 1; Loading drivers/scsi/aha1542.h +21 −21 Original line number Original line Diff line number Diff line Loading @@ -80,14 +80,14 @@ /* Mailbox Definition 5.2.1 and 5.2.2 */ /* Mailbox Definition 5.2.1 and 5.2.2 */ struct mailbox { struct mailbox { unchar status; /* Command/Status */ u8 status; /* Command/Status */ unchar ccbptr[3]; /* msb, .., lsb */ u8 ccbptr[3]; /* msb, .., lsb */ }; }; /* This is used with scatter-gather */ /* This is used with scatter-gather */ struct chain { struct chain { unchar datalen[3]; /* Size of this part of chain */ u8 datalen[3]; /* Size of this part of chain */ unchar dataptr[3]; /* Location of data */ u8 dataptr[3]; /* Location of data */ }; }; /* These belong in scsi.h also */ /* These belong in scsi.h also */ Loading @@ -107,21 +107,21 @@ static inline void any2scsi(u8 *p, u32 v) #define MAX_SENSE 14 #define MAX_SENSE 14 struct ccb { /* Command Control Block 5.3 */ struct ccb { /* Command Control Block 5.3 */ unchar op; /* Command Control Block Operation Code */ u8 op; /* Command Control Block Operation Code */ unchar idlun; /* op=0,2:Target Id, op=1:Initiator Id */ u8 idlun; /* op=0,2:Target Id, op=1:Initiator Id */ /* Outbound data transfer, length is checked*/ /* Outbound data transfer, length is checked*/ /* Inbound data transfer, length is checked */ /* Inbound data transfer, length is checked */ /* Logical Unit Number */ /* Logical Unit Number */ unchar cdblen; /* SCSI Command Length */ u8 cdblen; /* SCSI Command Length */ unchar rsalen; /* Request Sense Allocation Length/Disable */ u8 rsalen; /* Request Sense Allocation Length/Disable */ unchar datalen[3]; /* Data Length (msb, .., lsb) */ u8 datalen[3]; /* Data Length (msb, .., lsb) */ unchar dataptr[3]; /* Data Pointer */ u8 dataptr[3]; /* Data Pointer */ unchar linkptr[3]; /* Link Pointer */ u8 linkptr[3]; /* Link Pointer */ unchar commlinkid; /* Command Linking Identifier */ u8 commlinkid; /* Command Linking Identifier */ unchar hastat; /* Host Adapter Status (HASTAT) */ u8 hastat; /* Host Adapter Status (HASTAT) */ unchar tarstat; /* Target Device Status */ u8 tarstat; /* Target Device Status */ unchar reserved[2]; u8 reserved[2]; unchar cdb[MAX_CDB+MAX_SENSE];/* SCSI Command Descriptor Block */ u8 cdb[MAX_CDB+MAX_SENSE]; /* SCSI Command Descriptor Block */ /* REQUEST SENSE */ /* REQUEST SENSE */ }; }; Loading Loading
drivers/scsi/aha1542.c +25 −25 Original line number Original line Diff line number Diff line Loading @@ -168,7 +168,7 @@ static void aha1542_stat(void) routine does not send something out while we are in the middle of this. routine does not send something out while we are in the middle of this. Fortunately, it is only at boot time that multi-byte messages Fortunately, it is only at boot time that multi-byte messages are ever sent. */ are ever sent. */ static int aha1542_out(unsigned int base, unchar * cmdp, int len) static int aha1542_out(unsigned int base, u8 *cmdp, int len) { { unsigned long flags = 0; unsigned long flags = 0; int got_lock; int got_lock; Loading Loading @@ -207,7 +207,7 @@ static int aha1542_out(unsigned int base, unchar * cmdp, int len) /* Only used at boot time, so we do not need to worry about latency as much /* Only used at boot time, so we do not need to worry about latency as much here */ here */ static int aha1542_in(unsigned int base, unchar *cmdp, int len) static int aha1542_in(unsigned int base, u8 *cmdp, int len) { { unsigned long flags; unsigned long flags; Loading @@ -228,7 +228,7 @@ static int aha1542_in(unsigned int base, unchar *cmdp, int len) /* Similar to aha1542_in, except that we wait a very short period of time. /* Similar to aha1542_in, except that we wait a very short period of time. We use this if we know the board is alive and awake, but we are not sure We use this if we know the board is alive and awake, but we are not sure if the board will respond to the command we are about to send or not */ if the board will respond to the command we are about to send or not */ static int aha1542_in1(unsigned int base, unchar *cmdp, int len) static int aha1542_in1(unsigned int base, u8 *cmdp, int len) { { unsigned long flags; unsigned long flags; Loading Loading @@ -302,9 +302,9 @@ static int makecode(unsigned hosterr, unsigned scsierr) static int aha1542_test_port(int bse, struct Scsi_Host *shpnt) static int aha1542_test_port(int bse, struct Scsi_Host *shpnt) { { unchar inquiry_cmd[] = {CMD_INQUIRY}; u8 inquiry_cmd[] = {CMD_INQUIRY}; unchar inquiry_result[4]; u8 inquiry_result[4]; unchar *cmdp; u8 *cmdp; int len; int len; volatile int debug = 0; volatile int debug = 0; Loading Loading @@ -542,11 +542,11 @@ static void aha1542_intr_handle(struct Scsi_Host *shost) static int aha1542_queuecommand_lck(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *)) static int aha1542_queuecommand_lck(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *)) { { struct aha1542_hostdata *aha1542 = shost_priv(SCpnt->device->host); struct aha1542_hostdata *aha1542 = shost_priv(SCpnt->device->host); unchar ahacmd = CMD_START_SCSI; u8 ahacmd = CMD_START_SCSI; unchar direction; u8 direction; unchar *cmd = (unchar *) SCpnt->cmnd; u8 *cmd = (u8 *) SCpnt->cmnd; unchar target = SCpnt->device->id; u8 target = SCpnt->device->id; unchar lun = SCpnt->device->lun; u8 lun = SCpnt->device->lun; unsigned long flags; unsigned long flags; int bufflen = scsi_bufflen(SCpnt); int bufflen = scsi_bufflen(SCpnt); int mbo; int mbo; Loading Loading @@ -674,7 +674,7 @@ static int aha1542_queuecommand_lck(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd * int i; int i; printk(KERN_DEBUG "aha1542_command: sending.. "); printk(KERN_DEBUG "aha1542_command: sending.. "); for (i = 0; i < sizeof(ccb[mbo]) - 10; i++) for (i = 0; i < sizeof(ccb[mbo]) - 10; i++) printk("%02x ", ((unchar *) & ccb[mbo])[i]); printk("%02x ", ((u8 *) &ccb[mbo])[i]); }; }; #endif #endif Loading @@ -701,7 +701,7 @@ static void setup_mailboxes(int bse, struct Scsi_Host *shpnt) struct mailbox *mb = aha1542->mb; struct mailbox *mb = aha1542->mb; struct ccb *ccb = aha1542->ccb; struct ccb *ccb = aha1542->ccb; unchar cmd[5] = { CMD_MBINIT, AHA1542_MAILBOXES, 0, 0, 0}; u8 cmd[5] = { CMD_MBINIT, AHA1542_MAILBOXES, 0, 0, 0}; for (i = 0; i < AHA1542_MAILBOXES; i++) { for (i = 0; i < AHA1542_MAILBOXES; i++) { mb[i].status = mb[AHA1542_MAILBOXES + i].status = 0; mb[i].status = mb[AHA1542_MAILBOXES + i].status = 0; Loading @@ -720,8 +720,8 @@ static void setup_mailboxes(int bse, struct Scsi_Host *shpnt) static int aha1542_getconfig(int base_io, unsigned char *irq_level, unsigned char *dma_chan, unsigned char *scsi_id) static int aha1542_getconfig(int base_io, unsigned char *irq_level, unsigned char *dma_chan, unsigned char *scsi_id) { { unchar inquiry_cmd[] = {CMD_RETCONF}; u8 inquiry_cmd[] = {CMD_RETCONF}; unchar inquiry_result[3]; u8 inquiry_result[3]; int i; int i; i = inb(STATUS(base_io)); i = inb(STATUS(base_io)); if (i & DF) { if (i & DF) { Loading Loading @@ -789,8 +789,8 @@ static int aha1542_getconfig(int base_io, unsigned char *irq_level, unsigned cha static int aha1542_mbenable(int base) static int aha1542_mbenable(int base) { { static unchar mbenable_cmd[3]; static u8 mbenable_cmd[3]; static unchar mbenable_result[2]; static u8 mbenable_result[2]; int retval; int retval; retval = BIOS_TRANSLATION_6432; retval = BIOS_TRANSLATION_6432; Loading Loading @@ -824,8 +824,8 @@ static int aha1542_mbenable(int base) /* Query the board to find out if it is a 1542 or a 1740, or whatever. */ /* Query the board to find out if it is a 1542 or a 1740, or whatever. */ static int aha1542_query(int base_io, int *transl) static int aha1542_query(int base_io, int *transl) { { unchar inquiry_cmd[] = {CMD_INQUIRY}; u8 inquiry_cmd[] = {CMD_INQUIRY}; unchar inquiry_result[4]; u8 inquiry_result[4]; int i; int i; i = inb(STATUS(base_io)); i = inb(STATUS(base_io)); if (i & DF) { if (i & DF) { Loading Loading @@ -968,8 +968,8 @@ static struct Scsi_Host *aha1542_hw_init(struct scsi_host_template *tpnt, struct /* Set the Bus on/off-times as not to ruin floppy performance */ /* Set the Bus on/off-times as not to ruin floppy performance */ { { unchar oncmd[] = {CMD_BUSON_TIME, 7}; u8 oncmd[] = {CMD_BUSON_TIME, 7}; unchar offcmd[] = {CMD_BUSOFF_TIME, 5}; u8 offcmd[] = {CMD_BUSOFF_TIME, 5}; if (setup_called[indx]) { if (setup_called[indx]) { oncmd[1] = setup_buson[indx]; oncmd[1] = setup_buson[indx]; Loading @@ -982,7 +982,7 @@ static struct Scsi_Host *aha1542_hw_init(struct scsi_host_template *tpnt, struct aha1542_out(base_io, offcmd, 2); aha1542_out(base_io, offcmd, 2); WAIT(INTRFLAGS(base_io), INTRMASK, HACC, 0); WAIT(INTRFLAGS(base_io), INTRMASK, HACC, 0); if (setup_dmaspeed[indx] >= 0) { if (setup_dmaspeed[indx] >= 0) { unchar dmacmd[] = {CMD_DMASPEED, 0}; u8 dmacmd[] = {CMD_DMASPEED, 0}; dmacmd[1] = setup_dmaspeed[indx]; dmacmd[1] = setup_dmaspeed[indx]; aha1542_intr_reset(base_io); aha1542_intr_reset(base_io); aha1542_out(base_io, dmacmd, 2); aha1542_out(base_io, dmacmd, 2); Loading Loading @@ -1103,11 +1103,11 @@ static int aha1542_dev_reset(Scsi_Cmnd * SCpnt) struct aha1542_hostdata *aha1542 = shost_priv(SCpnt->device->host); struct aha1542_hostdata *aha1542 = shost_priv(SCpnt->device->host); unsigned long flags; unsigned long flags; struct mailbox *mb = aha1542->mb; struct mailbox *mb = aha1542->mb; unchar target = SCpnt->device->id; u8 target = SCpnt->device->id; unchar lun = SCpnt->device->lun; u8 lun = SCpnt->device->lun; int mbo; int mbo; struct ccb *ccb = aha1542->ccb; struct ccb *ccb = aha1542->ccb; unchar ahacmd = CMD_START_SCSI; u8 ahacmd = CMD_START_SCSI; spin_lock_irqsave(&aha1542_lock, flags); spin_lock_irqsave(&aha1542_lock, flags); mbo = aha1542->aha1542_last_mbo_used + 1; mbo = aha1542->aha1542_last_mbo_used + 1; Loading
drivers/scsi/aha1542.h +21 −21 Original line number Original line Diff line number Diff line Loading @@ -80,14 +80,14 @@ /* Mailbox Definition 5.2.1 and 5.2.2 */ /* Mailbox Definition 5.2.1 and 5.2.2 */ struct mailbox { struct mailbox { unchar status; /* Command/Status */ u8 status; /* Command/Status */ unchar ccbptr[3]; /* msb, .., lsb */ u8 ccbptr[3]; /* msb, .., lsb */ }; }; /* This is used with scatter-gather */ /* This is used with scatter-gather */ struct chain { struct chain { unchar datalen[3]; /* Size of this part of chain */ u8 datalen[3]; /* Size of this part of chain */ unchar dataptr[3]; /* Location of data */ u8 dataptr[3]; /* Location of data */ }; }; /* These belong in scsi.h also */ /* These belong in scsi.h also */ Loading @@ -107,21 +107,21 @@ static inline void any2scsi(u8 *p, u32 v) #define MAX_SENSE 14 #define MAX_SENSE 14 struct ccb { /* Command Control Block 5.3 */ struct ccb { /* Command Control Block 5.3 */ unchar op; /* Command Control Block Operation Code */ u8 op; /* Command Control Block Operation Code */ unchar idlun; /* op=0,2:Target Id, op=1:Initiator Id */ u8 idlun; /* op=0,2:Target Id, op=1:Initiator Id */ /* Outbound data transfer, length is checked*/ /* Outbound data transfer, length is checked*/ /* Inbound data transfer, length is checked */ /* Inbound data transfer, length is checked */ /* Logical Unit Number */ /* Logical Unit Number */ unchar cdblen; /* SCSI Command Length */ u8 cdblen; /* SCSI Command Length */ unchar rsalen; /* Request Sense Allocation Length/Disable */ u8 rsalen; /* Request Sense Allocation Length/Disable */ unchar datalen[3]; /* Data Length (msb, .., lsb) */ u8 datalen[3]; /* Data Length (msb, .., lsb) */ unchar dataptr[3]; /* Data Pointer */ u8 dataptr[3]; /* Data Pointer */ unchar linkptr[3]; /* Link Pointer */ u8 linkptr[3]; /* Link Pointer */ unchar commlinkid; /* Command Linking Identifier */ u8 commlinkid; /* Command Linking Identifier */ unchar hastat; /* Host Adapter Status (HASTAT) */ u8 hastat; /* Host Adapter Status (HASTAT) */ unchar tarstat; /* Target Device Status */ u8 tarstat; /* Target Device Status */ unchar reserved[2]; u8 reserved[2]; unchar cdb[MAX_CDB+MAX_SENSE];/* SCSI Command Descriptor Block */ u8 cdb[MAX_CDB+MAX_SENSE]; /* SCSI Command Descriptor Block */ /* REQUEST SENSE */ /* REQUEST SENSE */ }; }; Loading