diff options
-rw-r--r-- | drivers/scsi/FlashPoint.c | 677 |
1 files changed, 338 insertions, 339 deletions
diff --git a/drivers/scsi/FlashPoint.c b/drivers/scsi/FlashPoint.c index 1d1e4413c8d1..e98bbef485b8 100644 --- a/drivers/scsi/FlashPoint.c +++ b/drivers/scsi/FlashPoint.c | |||
@@ -40,7 +40,6 @@ | |||
40 | #define FAILURE 0xFFFFFFFFL | 40 | #define FAILURE 0xFFFFFFFFL |
41 | 41 | ||
42 | 42 | ||
43 | typedef unsigned char UCHAR; | ||
44 | typedef unsigned short USHORT; | 43 | typedef unsigned short USHORT; |
45 | typedef unsigned int UINT; | 44 | typedef unsigned int UINT; |
46 | typedef unsigned long ULONG; | 45 | typedef unsigned long ULONG; |
@@ -59,7 +58,7 @@ typedef unsigned short * ushort_ptr; | |||
59 | 58 | ||
60 | 59 | ||
61 | 60 | ||
62 | #define BIT(x) ((UCHAR)(1<<(x))) /* single-bit mask in bit position x */ | 61 | #define BIT(x) ((unsigned char)(1<<(x))) /* single-bit mask in bit position x */ |
63 | #define BITW(x) ((USHORT)(1<<(x))) /* single-bit mask in bit position x */ | 62 | #define BITW(x) ((USHORT)(1<<(x))) /* single-bit mask in bit position x */ |
64 | 63 | ||
65 | 64 | ||
@@ -71,10 +70,10 @@ typedef void (*CALL_BK_FN)(PSCCB); | |||
71 | 70 | ||
72 | typedef struct SCCBMgr_info { | 71 | typedef struct SCCBMgr_info { |
73 | ULONG si_baseaddr; | 72 | ULONG si_baseaddr; |
74 | UCHAR si_present; | 73 | unsigned char si_present; |
75 | UCHAR si_intvect; | 74 | unsigned char si_intvect; |
76 | UCHAR si_id; | 75 | unsigned char si_id; |
77 | UCHAR si_lun; | 76 | unsigned char si_lun; |
78 | USHORT si_fw_revision; | 77 | USHORT si_fw_revision; |
79 | USHORT si_per_targ_init_sync; | 78 | USHORT si_per_targ_init_sync; |
80 | USHORT si_per_targ_fast_nego; | 79 | USHORT si_per_targ_fast_nego; |
@@ -82,13 +81,13 @@ typedef struct SCCBMgr_info { | |||
82 | USHORT si_per_targ_no_disc; | 81 | USHORT si_per_targ_no_disc; |
83 | USHORT si_per_targ_wide_nego; | 82 | USHORT si_per_targ_wide_nego; |
84 | USHORT si_flags; | 83 | USHORT si_flags; |
85 | UCHAR si_card_family; | 84 | unsigned char si_card_family; |
86 | UCHAR si_bustype; | 85 | unsigned char si_bustype; |
87 | UCHAR si_card_model[3]; | 86 | unsigned char si_card_model[3]; |
88 | UCHAR si_relative_cardnum; | 87 | unsigned char si_relative_cardnum; |
89 | UCHAR si_reserved[4]; | 88 | unsigned char si_reserved[4]; |
90 | ULONG si_OS_reserved; | 89 | ULONG si_OS_reserved; |
91 | UCHAR si_XlatInfo[4]; | 90 | unsigned char si_XlatInfo[4]; |
92 | ULONG si_reserved2[5]; | 91 | ULONG si_reserved2[5]; |
93 | ULONG si_secondary_range; | 92 | ULONG si_secondary_range; |
94 | } SCCBMGR_INFO; | 93 | } SCCBMGR_INFO; |
@@ -122,28 +121,28 @@ typedef SCCBMGR_INFO * PSCCBMGR_INFO; | |||
122 | 121 | ||
123 | #pragma pack(1) | 122 | #pragma pack(1) |
124 | typedef struct _SCCB { | 123 | typedef struct _SCCB { |
125 | UCHAR OperationCode; | 124 | unsigned char OperationCode; |
126 | UCHAR ControlByte; | 125 | unsigned char ControlByte; |
127 | UCHAR CdbLength; | 126 | unsigned char CdbLength; |
128 | UCHAR RequestSenseLength; | 127 | unsigned char RequestSenseLength; |
129 | ULONG DataLength; | 128 | ULONG DataLength; |
130 | ULONG DataPointer; | 129 | ULONG DataPointer; |
131 | UCHAR CcbRes[2]; | 130 | unsigned char CcbRes[2]; |
132 | UCHAR HostStatus; | 131 | unsigned char HostStatus; |
133 | UCHAR TargetStatus; | 132 | unsigned char TargetStatus; |
134 | UCHAR TargID; | 133 | unsigned char TargID; |
135 | UCHAR Lun; | 134 | unsigned char Lun; |
136 | UCHAR Cdb[12]; | 135 | unsigned char Cdb[12]; |
137 | UCHAR CcbRes1; | 136 | unsigned char CcbRes1; |
138 | UCHAR Reserved1; | 137 | unsigned char Reserved1; |
139 | ULONG Reserved2; | 138 | ULONG Reserved2; |
140 | ULONG SensePointer; | 139 | ULONG SensePointer; |
141 | 140 | ||
142 | 141 | ||
143 | CALL_BK_FN SccbCallback; /* VOID (*SccbCallback)(); */ | 142 | CALL_BK_FN SccbCallback; /* VOID (*SccbCallback)(); */ |
144 | ULONG SccbIOPort; /* Identifies board base port */ | 143 | ULONG SccbIOPort; /* Identifies board base port */ |
145 | UCHAR SccbStatus; | 144 | unsigned char SccbStatus; |
146 | UCHAR SCCBRes2; | 145 | unsigned char SCCBRes2; |
147 | USHORT SccbOSFlags; | 146 | USHORT SccbOSFlags; |
148 | 147 | ||
149 | 148 | ||
@@ -153,16 +152,16 @@ typedef struct _SCCB { | |||
153 | ULONG Sccb_res1; | 152 | ULONG Sccb_res1; |
154 | USHORT Sccb_MGRFlags; | 153 | USHORT Sccb_MGRFlags; |
155 | USHORT Sccb_sgseg; | 154 | USHORT Sccb_sgseg; |
156 | UCHAR Sccb_scsimsg; /* identify msg for selection */ | 155 | unsigned char Sccb_scsimsg; /* identify msg for selection */ |
157 | UCHAR Sccb_tag; | 156 | unsigned char Sccb_tag; |
158 | UCHAR Sccb_scsistat; | 157 | unsigned char Sccb_scsistat; |
159 | UCHAR Sccb_idmsg; /* image of last msg in */ | 158 | unsigned char Sccb_idmsg; /* image of last msg in */ |
160 | PSCCB Sccb_forwardlink; | 159 | PSCCB Sccb_forwardlink; |
161 | PSCCB Sccb_backlink; | 160 | PSCCB Sccb_backlink; |
162 | ULONG Sccb_savedATC; | 161 | ULONG Sccb_savedATC; |
163 | UCHAR Save_Cdb[6]; | 162 | unsigned char Save_Cdb[6]; |
164 | UCHAR Save_CdbLen; | 163 | unsigned char Save_CdbLen; |
165 | UCHAR Sccb_XferState; | 164 | unsigned char Sccb_XferState; |
166 | ULONG Sccb_SGoffset; | 165 | ULONG Sccb_SGoffset; |
167 | } SCCB; | 166 | } SCCB; |
168 | 167 | ||
@@ -288,27 +287,27 @@ typedef struct SCCBMgr_tar_info { | |||
288 | 287 | ||
289 | PSCCB TarSelQ_Head; | 288 | PSCCB TarSelQ_Head; |
290 | PSCCB TarSelQ_Tail; | 289 | PSCCB TarSelQ_Tail; |
291 | UCHAR TarLUN_CA; /*Contingent Allgiance */ | 290 | unsigned char TarLUN_CA; /*Contingent Allgiance */ |
292 | UCHAR TarTagQ_Cnt; | 291 | unsigned char TarTagQ_Cnt; |
293 | UCHAR TarSelQ_Cnt; | 292 | unsigned char TarSelQ_Cnt; |
294 | UCHAR TarStatus; | 293 | unsigned char TarStatus; |
295 | UCHAR TarEEValue; | 294 | unsigned char TarEEValue; |
296 | UCHAR TarSyncCtrl; | 295 | unsigned char TarSyncCtrl; |
297 | UCHAR TarReserved[2]; /* for alignment */ | 296 | unsigned char TarReserved[2]; /* for alignment */ |
298 | UCHAR LunDiscQ_Idx[MAX_LUN]; | 297 | unsigned char LunDiscQ_Idx[MAX_LUN]; |
299 | UCHAR TarLUNBusy[MAX_LUN]; | 298 | unsigned char TarLUNBusy[MAX_LUN]; |
300 | } SCCBMGR_TAR_INFO; | 299 | } SCCBMGR_TAR_INFO; |
301 | 300 | ||
302 | typedef struct NVRAMInfo { | 301 | typedef struct NVRAMInfo { |
303 | UCHAR niModel; /* Model No. of card */ | 302 | unsigned char niModel; /* Model No. of card */ |
304 | UCHAR niCardNo; /* Card no. */ | 303 | unsigned char niCardNo; /* Card no. */ |
305 | ULONG niBaseAddr; /* Port Address of card */ | 304 | ULONG niBaseAddr; /* Port Address of card */ |
306 | UCHAR niSysConf; /* Adapter Configuration byte - Byte 16 of eeprom map */ | 305 | unsigned char niSysConf; /* Adapter Configuration byte - Byte 16 of eeprom map */ |
307 | UCHAR niScsiConf; /* SCSI Configuration byte - Byte 17 of eeprom map */ | 306 | unsigned char niScsiConf; /* SCSI Configuration byte - Byte 17 of eeprom map */ |
308 | UCHAR niScamConf; /* SCAM Configuration byte - Byte 20 of eeprom map */ | 307 | unsigned char niScamConf; /* SCAM Configuration byte - Byte 20 of eeprom map */ |
309 | UCHAR niAdapId; /* Host Adapter ID - Byte 24 of eerpom map */ | 308 | unsigned char niAdapId; /* Host Adapter ID - Byte 24 of eerpom map */ |
310 | UCHAR niSyncTbl[MAX_SCSI_TAR / 2]; /* Sync/Wide byte of targets */ | 309 | unsigned char niSyncTbl[MAX_SCSI_TAR / 2]; /* Sync/Wide byte of targets */ |
311 | UCHAR niScamTbl[MAX_SCSI_TAR][4]; /* Compressed Scam name string of Targets */ | 310 | unsigned char niScamTbl[MAX_SCSI_TAR][4]; /* Compressed Scam name string of Targets */ |
312 | }NVRAMINFO; | 311 | }NVRAMINFO; |
313 | 312 | ||
314 | typedef NVRAMINFO *PNVRamInfo; | 313 | typedef NVRAMINFO *PNVRamInfo; |
@@ -326,12 +325,12 @@ typedef struct SCCBcard { | |||
326 | ULONG ioPort; | 325 | ULONG ioPort; |
327 | 326 | ||
328 | USHORT cmdCounter; | 327 | USHORT cmdCounter; |
329 | UCHAR discQCount; | 328 | unsigned char discQCount; |
330 | UCHAR tagQ_Lst; | 329 | unsigned char tagQ_Lst; |
331 | UCHAR cardIndex; | 330 | unsigned char cardIndex; |
332 | UCHAR scanIndex; | 331 | unsigned char scanIndex; |
333 | UCHAR globalFlags; | 332 | unsigned char globalFlags; |
334 | UCHAR ourId; | 333 | unsigned char ourId; |
335 | PNVRamInfo pNvRamInfo; | 334 | PNVRamInfo pNvRamInfo; |
336 | PSCCB discQ_Tbl[QUEUE_DEPTH]; | 335 | PSCCB discQ_Tbl[QUEUE_DEPTH]; |
337 | 336 | ||
@@ -379,7 +378,7 @@ enum scam_id_st { ID0,ID1,ID2,ID3,ID4,ID5,ID6,ID7,ID8,ID9,ID10,ID11,ID12, | |||
379 | 378 | ||
380 | typedef struct SCCBscam_info { | 379 | typedef struct SCCBscam_info { |
381 | 380 | ||
382 | UCHAR id_string[ID_STRING_LENGTH]; | 381 | unsigned char id_string[ID_STRING_LENGTH]; |
383 | enum scam_id_st state; | 382 | enum scam_id_st state; |
384 | 383 | ||
385 | } SCCBSCAM_INFO; | 384 | } SCCBSCAM_INFO; |
@@ -981,72 +980,72 @@ typedef struct SCCBscam_info { | |||
981 | 980 | ||
982 | 981 | ||
983 | 982 | ||
984 | static UCHAR FPT_sisyncn(ULONG port, UCHAR p_card, UCHAR syncFlag); | 983 | static unsigned char FPT_sisyncn(ULONG port, unsigned char p_card, unsigned char syncFlag); |
985 | static void FPT_ssel(ULONG port, UCHAR p_card); | 984 | static void FPT_ssel(ULONG port, unsigned char p_card); |
986 | static void FPT_sres(ULONG port, UCHAR p_card, PSCCBcard pCurrCard); | 985 | static void FPT_sres(ULONG port, unsigned char p_card, PSCCBcard pCurrCard); |
987 | static void FPT_shandem(ULONG port, UCHAR p_card,PSCCB pCurrSCCB); | 986 | static void FPT_shandem(ULONG port, unsigned char p_card,PSCCB pCurrSCCB); |
988 | static void FPT_stsyncn(ULONG port, UCHAR p_card); | 987 | static void FPT_stsyncn(ULONG port, unsigned char p_card); |
989 | static void FPT_sisyncr(ULONG port,UCHAR sync_pulse, UCHAR offset); | 988 | static void FPT_sisyncr(ULONG port,unsigned char sync_pulse, unsigned char offset); |
990 | static void FPT_sssyncv(ULONG p_port, UCHAR p_id, UCHAR p_sync_value, | 989 | static void FPT_sssyncv(ULONG p_port, unsigned char p_id, unsigned char p_sync_value, |
991 | PSCCBMgr_tar_info currTar_Info); | 990 | PSCCBMgr_tar_info currTar_Info); |
992 | static void FPT_sresb(ULONG port, UCHAR p_card); | 991 | static void FPT_sresb(ULONG port, unsigned char p_card); |
993 | static void FPT_sxfrp(ULONG p_port, UCHAR p_card); | 992 | static void FPT_sxfrp(ULONG p_port, unsigned char p_card); |
994 | static void FPT_schkdd(ULONG port, UCHAR p_card); | 993 | static void FPT_schkdd(ULONG port, unsigned char p_card); |
995 | static UCHAR FPT_RdStack(ULONG port, UCHAR index); | 994 | static unsigned char FPT_RdStack(ULONG port, unsigned char index); |
996 | static void FPT_WrStack(ULONG portBase, UCHAR index, UCHAR data); | 995 | static void FPT_WrStack(ULONG portBase, unsigned char index, unsigned char data); |
997 | static UCHAR FPT_ChkIfChipInitialized(ULONG ioPort); | 996 | static unsigned char FPT_ChkIfChipInitialized(ULONG ioPort); |
998 | 997 | ||
999 | static void FPT_SendMsg(ULONG port, UCHAR message); | 998 | static void FPT_SendMsg(ULONG port, unsigned char message); |
1000 | static void FPT_queueFlushTargSccb(UCHAR p_card, UCHAR thisTarg, | 999 | static void FPT_queueFlushTargSccb(unsigned char p_card, unsigned char thisTarg, |
1001 | UCHAR error_code); | 1000 | unsigned char error_code); |
1002 | 1001 | ||
1003 | static void FPT_sinits(PSCCB p_sccb, UCHAR p_card); | 1002 | static void FPT_sinits(PSCCB p_sccb, unsigned char p_card); |
1004 | static void FPT_RNVRamData(PNVRamInfo pNvRamInfo); | 1003 | static void FPT_RNVRamData(PNVRamInfo pNvRamInfo); |
1005 | 1004 | ||
1006 | static UCHAR FPT_siwidn(ULONG port, UCHAR p_card); | 1005 | static unsigned char FPT_siwidn(ULONG port, unsigned char p_card); |
1007 | static void FPT_stwidn(ULONG port, UCHAR p_card); | 1006 | static void FPT_stwidn(ULONG port, unsigned char p_card); |
1008 | static void FPT_siwidr(ULONG port, UCHAR width); | 1007 | static void FPT_siwidr(ULONG port, unsigned char width); |
1009 | 1008 | ||
1010 | 1009 | ||
1011 | static void FPT_queueSelectFail(PSCCBcard pCurrCard, UCHAR p_card); | 1010 | static void FPT_queueSelectFail(PSCCBcard pCurrCard, unsigned char p_card); |
1012 | static void FPT_queueDisconnect(PSCCB p_SCCB, UCHAR p_card); | 1011 | static void FPT_queueDisconnect(PSCCB p_SCCB, unsigned char p_card); |
1013 | static void FPT_queueCmdComplete(PSCCBcard pCurrCard, PSCCB p_SCCB, | 1012 | static void FPT_queueCmdComplete(PSCCBcard pCurrCard, PSCCB p_SCCB, |
1014 | UCHAR p_card); | 1013 | unsigned char p_card); |
1015 | static void FPT_queueSearchSelect(PSCCBcard pCurrCard, UCHAR p_card); | 1014 | static void FPT_queueSearchSelect(PSCCBcard pCurrCard, unsigned char p_card); |
1016 | static void FPT_queueFlushSccb(UCHAR p_card, UCHAR error_code); | 1015 | static void FPT_queueFlushSccb(unsigned char p_card, unsigned char error_code); |
1017 | static void FPT_queueAddSccb(PSCCB p_SCCB, UCHAR card); | 1016 | static void FPT_queueAddSccb(PSCCB p_SCCB, unsigned char card); |
1018 | static UCHAR FPT_queueFindSccb(PSCCB p_SCCB, UCHAR p_card); | 1017 | static unsigned char FPT_queueFindSccb(PSCCB p_SCCB, unsigned char p_card); |
1019 | static void FPT_utilUpdateResidual(PSCCB p_SCCB); | 1018 | static void FPT_utilUpdateResidual(PSCCB p_SCCB); |
1020 | static USHORT FPT_CalcCrc16(UCHAR buffer[]); | 1019 | static USHORT FPT_CalcCrc16(unsigned char buffer[]); |
1021 | static UCHAR FPT_CalcLrc(UCHAR buffer[]); | 1020 | static unsigned char FPT_CalcLrc(unsigned char buffer[]); |
1022 | 1021 | ||
1023 | 1022 | ||
1024 | static void FPT_Wait1Second(ULONG p_port); | 1023 | static void FPT_Wait1Second(ULONG p_port); |
1025 | static void FPT_Wait(ULONG p_port, UCHAR p_delay); | 1024 | static void FPT_Wait(ULONG p_port, unsigned char p_delay); |
1026 | static void FPT_utilEEWriteOnOff(ULONG p_port,UCHAR p_mode); | 1025 | static void FPT_utilEEWriteOnOff(ULONG p_port,unsigned char p_mode); |
1027 | static void FPT_utilEEWrite(ULONG p_port, USHORT ee_data, USHORT ee_addr); | 1026 | static void FPT_utilEEWrite(ULONG p_port, USHORT ee_data, USHORT ee_addr); |
1028 | static USHORT FPT_utilEERead(ULONG p_port, USHORT ee_addr); | 1027 | static USHORT FPT_utilEERead(ULONG p_port, USHORT ee_addr); |
1029 | static USHORT FPT_utilEEReadOrg(ULONG p_port, USHORT ee_addr); | 1028 | static USHORT FPT_utilEEReadOrg(ULONG p_port, USHORT ee_addr); |
1030 | static void FPT_utilEESendCmdAddr(ULONG p_port, UCHAR ee_cmd, USHORT ee_addr); | 1029 | static void FPT_utilEESendCmdAddr(ULONG p_port, unsigned char ee_cmd, USHORT ee_addr); |
1031 | 1030 | ||
1032 | 1031 | ||
1033 | 1032 | ||
1034 | static void FPT_phaseDataOut(ULONG port, UCHAR p_card); | 1033 | static void FPT_phaseDataOut(ULONG port, unsigned char p_card); |
1035 | static void FPT_phaseDataIn(ULONG port, UCHAR p_card); | 1034 | static void FPT_phaseDataIn(ULONG port, unsigned char p_card); |
1036 | static void FPT_phaseCommand(ULONG port, UCHAR p_card); | 1035 | static void FPT_phaseCommand(ULONG port, unsigned char p_card); |
1037 | static void FPT_phaseStatus(ULONG port, UCHAR p_card); | 1036 | static void FPT_phaseStatus(ULONG port, unsigned char p_card); |
1038 | static void FPT_phaseMsgOut(ULONG port, UCHAR p_card); | 1037 | static void FPT_phaseMsgOut(ULONG port, unsigned char p_card); |
1039 | static void FPT_phaseMsgIn(ULONG port, UCHAR p_card); | 1038 | static void FPT_phaseMsgIn(ULONG port, unsigned char p_card); |
1040 | static void FPT_phaseIllegal(ULONG port, UCHAR p_card); | 1039 | static void FPT_phaseIllegal(ULONG port, unsigned char p_card); |
1041 | 1040 | ||
1042 | static void FPT_phaseDecode(ULONG port, UCHAR p_card); | 1041 | static void FPT_phaseDecode(ULONG port, unsigned char p_card); |
1043 | static void FPT_phaseChkFifo(ULONG port, UCHAR p_card); | 1042 | static void FPT_phaseChkFifo(ULONG port, unsigned char p_card); |
1044 | static void FPT_phaseBusFree(ULONG p_port, UCHAR p_card); | 1043 | static void FPT_phaseBusFree(ULONG p_port, unsigned char p_card); |
1045 | 1044 | ||
1046 | 1045 | ||
1047 | 1046 | ||
1048 | 1047 | ||
1049 | static void FPT_XbowInit(ULONG port, UCHAR scamFlg); | 1048 | static void FPT_XbowInit(ULONG port, unsigned char scamFlg); |
1050 | static void FPT_BusMasterInit(ULONG p_port); | 1049 | static void FPT_BusMasterInit(ULONG p_port); |
1051 | static void FPT_DiagEEPROM(ULONG p_port); | 1050 | static void FPT_DiagEEPROM(ULONG p_port); |
1052 | 1051 | ||
@@ -1056,39 +1055,39 @@ static void FPT_DiagEEPROM(ULONG p_port); | |||
1056 | static void FPT_dataXferProcessor(ULONG port, PSCCBcard pCurrCard); | 1055 | static void FPT_dataXferProcessor(ULONG port, PSCCBcard pCurrCard); |
1057 | static void FPT_busMstrSGDataXferStart(ULONG port, PSCCB pCurrSCCB); | 1056 | static void FPT_busMstrSGDataXferStart(ULONG port, PSCCB pCurrSCCB); |
1058 | static void FPT_busMstrDataXferStart(ULONG port, PSCCB pCurrSCCB); | 1057 | static void FPT_busMstrDataXferStart(ULONG port, PSCCB pCurrSCCB); |
1059 | static void FPT_hostDataXferAbort(ULONG port, UCHAR p_card, PSCCB pCurrSCCB); | 1058 | static void FPT_hostDataXferAbort(ULONG port, unsigned char p_card, PSCCB pCurrSCCB); |
1060 | static void FPT_hostDataXferRestart(PSCCB currSCCB); | 1059 | static void FPT_hostDataXferRestart(PSCCB currSCCB); |
1061 | 1060 | ||
1062 | 1061 | ||
1063 | static UCHAR FPT_SccbMgr_bad_isr(ULONG p_port, UCHAR p_card, | 1062 | static unsigned char FPT_SccbMgr_bad_isr(ULONG p_port, unsigned char p_card, |
1064 | PSCCBcard pCurrCard, USHORT p_int); | 1063 | PSCCBcard pCurrCard, USHORT p_int); |
1065 | 1064 | ||
1066 | static void FPT_SccbMgrTableInitAll(void); | 1065 | static void FPT_SccbMgrTableInitAll(void); |
1067 | static void FPT_SccbMgrTableInitCard(PSCCBcard pCurrCard, UCHAR p_card); | 1066 | static void FPT_SccbMgrTableInitCard(PSCCBcard pCurrCard, unsigned char p_card); |
1068 | static void FPT_SccbMgrTableInitTarget(UCHAR p_card, UCHAR target); | 1067 | static void FPT_SccbMgrTableInitTarget(unsigned char p_card, unsigned char target); |
1069 | 1068 | ||
1070 | 1069 | ||
1071 | 1070 | ||
1072 | static void FPT_scini(UCHAR p_card, UCHAR p_our_id, UCHAR p_power_up); | 1071 | static void FPT_scini(unsigned char p_card, unsigned char p_our_id, unsigned char p_power_up); |
1073 | 1072 | ||
1074 | static int FPT_scarb(ULONG p_port, UCHAR p_sel_type); | 1073 | static int FPT_scarb(ULONG p_port, unsigned char p_sel_type); |
1075 | static void FPT_scbusf(ULONG p_port); | 1074 | static void FPT_scbusf(ULONG p_port); |
1076 | static void FPT_scsel(ULONG p_port); | 1075 | static void FPT_scsel(ULONG p_port); |
1077 | static void FPT_scasid(UCHAR p_card, ULONG p_port); | 1076 | static void FPT_scasid(unsigned char p_card, ULONG p_port); |
1078 | static UCHAR FPT_scxferc(ULONG p_port, UCHAR p_data); | 1077 | static unsigned char FPT_scxferc(ULONG p_port, unsigned char p_data); |
1079 | static UCHAR FPT_scsendi(ULONG p_port, UCHAR p_id_string[]); | 1078 | static unsigned char FPT_scsendi(ULONG p_port, unsigned char p_id_string[]); |
1080 | static UCHAR FPT_sciso(ULONG p_port, UCHAR p_id_string[]); | 1079 | static unsigned char FPT_sciso(ULONG p_port, unsigned char p_id_string[]); |
1081 | static void FPT_scwirod(ULONG p_port, UCHAR p_data_bit); | 1080 | static void FPT_scwirod(ULONG p_port, unsigned char p_data_bit); |
1082 | static void FPT_scwiros(ULONG p_port, UCHAR p_data_bit); | 1081 | static void FPT_scwiros(ULONG p_port, unsigned char p_data_bit); |
1083 | static UCHAR FPT_scvalq(UCHAR p_quintet); | 1082 | static unsigned char FPT_scvalq(unsigned char p_quintet); |
1084 | static UCHAR FPT_scsell(ULONG p_port, UCHAR targ_id); | 1083 | static unsigned char FPT_scsell(ULONG p_port, unsigned char targ_id); |
1085 | static void FPT_scwtsel(ULONG p_port); | 1084 | static void FPT_scwtsel(ULONG p_port); |
1086 | static void FPT_inisci(UCHAR p_card, ULONG p_port, UCHAR p_our_id); | 1085 | static void FPT_inisci(unsigned char p_card, ULONG p_port, unsigned char p_our_id); |
1087 | static void FPT_scsavdi(UCHAR p_card, ULONG p_port); | 1086 | static void FPT_scsavdi(unsigned char p_card, ULONG p_port); |
1088 | static UCHAR FPT_scmachid(UCHAR p_card, UCHAR p_id_string[]); | 1087 | static unsigned char FPT_scmachid(unsigned char p_card, unsigned char p_id_string[]); |
1089 | 1088 | ||
1090 | 1089 | ||
1091 | static void FPT_autoCmdCmplt(ULONG p_port, UCHAR p_card); | 1090 | static void FPT_autoCmdCmplt(ULONG p_port, unsigned char p_card); |
1092 | static void FPT_autoLoadDefaultMap(ULONG p_port); | 1091 | static void FPT_autoLoadDefaultMap(ULONG p_port); |
1093 | 1092 | ||
1094 | 1093 | ||
@@ -1100,8 +1099,8 @@ static SCCBSCAM_INFO FPT_scamInfo[MAX_SCSI_TAR] = { { { 0 } } }; | |||
1100 | static NVRAMINFO FPT_nvRamInfo[MAX_MB_CARDS] = { { 0 } }; | 1099 | static NVRAMINFO FPT_nvRamInfo[MAX_MB_CARDS] = { { 0 } }; |
1101 | 1100 | ||
1102 | 1101 | ||
1103 | static UCHAR FPT_mbCards = 0; | 1102 | static unsigned char FPT_mbCards = 0; |
1104 | static UCHAR FPT_scamHAString[] = {0x63, 0x07, 'B', 'U', 'S', 'L', 'O', 'G', 'I', 'C', \ | 1103 | static unsigned char FPT_scamHAString[] = {0x63, 0x07, 'B', 'U', 'S', 'L', 'O', 'G', 'I', 'C', \ |
1105 | ' ', 'B', 'T', '-', '9', '3', '0', \ | 1104 | ' ', 'B', 'T', '-', '9', '3', '0', \ |
1106 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, \ | 1105 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, \ |
1107 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20}; | 1106 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20}; |
@@ -1109,7 +1108,7 @@ static UCHAR FPT_scamHAString[] = {0x63, 0x07, 'B', 'U', 'S', 'L', 'O', 'G', 'I' | |||
1109 | static USHORT FPT_default_intena = 0; | 1108 | static USHORT FPT_default_intena = 0; |
1110 | 1109 | ||
1111 | 1110 | ||
1112 | static void (*FPT_s_PhaseTbl[8]) (ULONG, UCHAR)= { 0 }; | 1111 | static void (*FPT_s_PhaseTbl[8]) (ULONG, unsigned char)= { 0 }; |
1113 | 1112 | ||
1114 | 1113 | ||
1115 | /*--------------------------------------------------------------------- | 1114 | /*--------------------------------------------------------------------- |
@@ -1122,9 +1121,9 @@ static void (*FPT_s_PhaseTbl[8]) (ULONG, UCHAR)= { 0 }; | |||
1122 | 1121 | ||
1123 | static int FlashPoint_ProbeHostAdapter(PSCCBMGR_INFO pCardInfo) | 1122 | static int FlashPoint_ProbeHostAdapter(PSCCBMGR_INFO pCardInfo) |
1124 | { | 1123 | { |
1125 | static UCHAR first_time = 1; | 1124 | static unsigned char first_time = 1; |
1126 | 1125 | ||
1127 | UCHAR i,j,id,ScamFlg; | 1126 | unsigned char i,j,id,ScamFlg; |
1128 | USHORT temp,temp2,temp3,temp4,temp5,temp6; | 1127 | USHORT temp,temp2,temp3,temp4,temp5,temp6; |
1129 | ULONG ioport; | 1128 | ULONG ioport; |
1130 | PNVRamInfo pCurrNvRam; | 1129 | PNVRamInfo pCurrNvRam; |
@@ -1190,8 +1189,8 @@ static int FlashPoint_ProbeHostAdapter(PSCCBMGR_INFO pCardInfo) | |||
1190 | if(pCurrNvRam) | 1189 | if(pCurrNvRam) |
1191 | pCardInfo->si_id = pCurrNvRam->niAdapId; | 1190 | pCardInfo->si_id = pCurrNvRam->niAdapId; |
1192 | else | 1191 | else |
1193 | pCardInfo->si_id = (UCHAR)(FPT_utilEERead(ioport, (ADAPTER_SCSI_ID/2)) & | 1192 | pCardInfo->si_id = (unsigned char)(FPT_utilEERead(ioport, (ADAPTER_SCSI_ID/2)) & |
1194 | (UCHAR)0x0FF); | 1193 | (unsigned char)0x0FF); |
1195 | 1194 | ||
1196 | pCardInfo->si_lun = 0x00; | 1195 | pCardInfo->si_lun = 0x00; |
1197 | pCardInfo->si_fw_revision = ORION_FW_REV; | 1196 | pCardInfo->si_fw_revision = ORION_FW_REV; |
@@ -1247,12 +1246,12 @@ static int FlashPoint_ProbeHostAdapter(PSCCBMGR_INFO pCardInfo) | |||
1247 | if(pCurrNvRam) | 1246 | if(pCurrNvRam) |
1248 | i = pCurrNvRam->niSysConf; | 1247 | i = pCurrNvRam->niSysConf; |
1249 | else | 1248 | else |
1250 | i = (UCHAR)(FPT_utilEERead(ioport, (SYSTEM_CONFIG/2))); | 1249 | i = (unsigned char)(FPT_utilEERead(ioport, (SYSTEM_CONFIG/2))); |
1251 | 1250 | ||
1252 | if(pCurrNvRam) | 1251 | if(pCurrNvRam) |
1253 | ScamFlg = pCurrNvRam->niScamConf; | 1252 | ScamFlg = pCurrNvRam->niScamConf; |
1254 | else | 1253 | else |
1255 | ScamFlg = (UCHAR) FPT_utilEERead(ioport, SCAM_CONFIG/2); | 1254 | ScamFlg = (unsigned char) FPT_utilEERead(ioport, SCAM_CONFIG/2); |
1256 | 1255 | ||
1257 | pCardInfo->si_flags = 0x0000; | 1256 | pCardInfo->si_flags = 0x0000; |
1258 | 1257 | ||
@@ -1312,11 +1311,11 @@ static int FlashPoint_ProbeHostAdapter(PSCCBMGR_INFO pCardInfo) | |||
1312 | } | 1311 | } |
1313 | }else{ | 1312 | }else{ |
1314 | temp = FPT_utilEERead(ioport, (MODEL_NUMB_0/2)); | 1313 | temp = FPT_utilEERead(ioport, (MODEL_NUMB_0/2)); |
1315 | pCardInfo->si_card_model[0] = (UCHAR)(temp >> 8); | 1314 | pCardInfo->si_card_model[0] = (unsigned char)(temp >> 8); |
1316 | temp = FPT_utilEERead(ioport, (MODEL_NUMB_2/2)); | 1315 | temp = FPT_utilEERead(ioport, (MODEL_NUMB_2/2)); |
1317 | 1316 | ||
1318 | pCardInfo->si_card_model[1] = (UCHAR)(temp & 0x00FF); | 1317 | pCardInfo->si_card_model[1] = (unsigned char)(temp & 0x00FF); |
1319 | pCardInfo->si_card_model[2] = (UCHAR)(temp >> 8); | 1318 | pCardInfo->si_card_model[2] = (unsigned char)(temp >> 8); |
1320 | } | 1319 | } |
1321 | 1320 | ||
1322 | if (pCardInfo->si_card_model[1] == '3') | 1321 | if (pCardInfo->si_card_model[1] == '3') |
@@ -1371,7 +1370,7 @@ static int FlashPoint_ProbeHostAdapter(PSCCBMGR_INFO pCardInfo) | |||
1371 | logical card number sorted by BIOS (zero-based) */ | 1370 | logical card number sorted by BIOS (zero-based) */ |
1372 | 1371 | ||
1373 | pCardInfo->si_relative_cardnum = | 1372 | pCardInfo->si_relative_cardnum = |
1374 | (UCHAR)(RD_HARPOON(ioport+hp_aramBase+BIOS_RELATIVE_CARD)-1); | 1373 | (unsigned char)(RD_HARPOON(ioport+hp_aramBase+BIOS_RELATIVE_CARD)-1); |
1375 | 1374 | ||
1376 | SGRAM_ACCESS(ioport); | 1375 | SGRAM_ACCESS(ioport); |
1377 | 1376 | ||
@@ -1402,7 +1401,7 @@ static ULONG FlashPoint_HardwareResetHostAdapter(PSCCBMGR_INFO pCardInfo) | |||
1402 | { | 1401 | { |
1403 | PSCCBcard CurrCard = NULL; | 1402 | PSCCBcard CurrCard = NULL; |
1404 | PNVRamInfo pCurrNvRam; | 1403 | PNVRamInfo pCurrNvRam; |
1405 | UCHAR i,j,thisCard, ScamFlg; | 1404 | unsigned char i,j,thisCard, ScamFlg; |
1406 | USHORT temp,sync_bit_map,id; | 1405 | USHORT temp,sync_bit_map,id; |
1407 | ULONG ioport; | 1406 | ULONG ioport; |
1408 | 1407 | ||
@@ -1446,7 +1445,7 @@ static ULONG FlashPoint_HardwareResetHostAdapter(PSCCBMGR_INFO pCardInfo) | |||
1446 | ScamFlg = pCurrNvRam->niScamConf; | 1445 | ScamFlg = pCurrNvRam->niScamConf; |
1447 | } | 1446 | } |
1448 | else{ | 1447 | else{ |
1449 | ScamFlg = (UCHAR) FPT_utilEERead(ioport, SCAM_CONFIG/2); | 1448 | ScamFlg = (unsigned char) FPT_utilEERead(ioport, SCAM_CONFIG/2); |
1450 | } | 1449 | } |
1451 | 1450 | ||
1452 | 1451 | ||
@@ -1463,7 +1462,7 @@ static ULONG FlashPoint_HardwareResetHostAdapter(PSCCBMGR_INFO pCardInfo) | |||
1463 | WR_HARPOON(ioport+hp_arb_id, pCardInfo->si_id); | 1462 | WR_HARPOON(ioport+hp_arb_id, pCardInfo->si_id); |
1464 | CurrCard->ourId = pCardInfo->si_id; | 1463 | CurrCard->ourId = pCardInfo->si_id; |
1465 | 1464 | ||
1466 | i = (UCHAR) pCardInfo->si_flags; | 1465 | i = (unsigned char) pCardInfo->si_flags; |
1467 | if (i & SCSI_PARITY_ENA) | 1466 | if (i & SCSI_PARITY_ENA) |
1468 | WR_HARPOON(ioport+hp_portctrl_1,(HOST_MODE8 | CHK_SCSI_P)); | 1467 | WR_HARPOON(ioport+hp_portctrl_1,(HOST_MODE8 | CHK_SCSI_P)); |
1469 | 1468 | ||
@@ -1543,13 +1542,13 @@ static ULONG FlashPoint_HardwareResetHostAdapter(PSCCBMGR_INFO pCardInfo) | |||
1543 | 1542 | ||
1544 | if (pCardInfo->si_per_targ_init_sync & sync_bit_map) { | 1543 | if (pCardInfo->si_per_targ_init_sync & sync_bit_map) { |
1545 | 1544 | ||
1546 | FPT_sccbMgrTbl[thisCard][id*2+i].TarEEValue = (UCHAR)temp; | 1545 | FPT_sccbMgrTbl[thisCard][id*2+i].TarEEValue = (unsigned char)temp; |
1547 | } | 1546 | } |
1548 | 1547 | ||
1549 | else { | 1548 | else { |
1550 | FPT_sccbMgrTbl[thisCard][id*2+i].TarStatus |= SYNC_SUPPORTED; | 1549 | FPT_sccbMgrTbl[thisCard][id*2+i].TarStatus |= SYNC_SUPPORTED; |
1551 | FPT_sccbMgrTbl[thisCard][id*2+i].TarEEValue = | 1550 | FPT_sccbMgrTbl[thisCard][id*2+i].TarEEValue = |
1552 | (UCHAR)(temp & ~EE_SYNC_MASK); | 1551 | (unsigned char)(temp & ~EE_SYNC_MASK); |
1553 | } | 1552 | } |
1554 | 1553 | ||
1555 | /* if ((pCardInfo->si_per_targ_wide_nego & sync_bit_map) || | 1554 | /* if ((pCardInfo->si_per_targ_wide_nego & sync_bit_map) || |
@@ -1574,14 +1573,14 @@ static ULONG FlashPoint_HardwareResetHostAdapter(PSCCBMGR_INFO pCardInfo) | |||
1574 | } | 1573 | } |
1575 | 1574 | ||
1576 | WR_HARPOON((ioport+hp_semaphore), | 1575 | WR_HARPOON((ioport+hp_semaphore), |
1577 | (UCHAR)(RD_HARPOON((ioport+hp_semaphore)) | SCCB_MGR_PRESENT)); | 1576 | (unsigned char)(RD_HARPOON((ioport+hp_semaphore)) | SCCB_MGR_PRESENT)); |
1578 | 1577 | ||
1579 | return((ULONG)CurrCard); | 1578 | return((ULONG)CurrCard); |
1580 | } | 1579 | } |
1581 | 1580 | ||
1582 | static void FlashPoint_ReleaseHostAdapter(ULONG pCurrCard) | 1581 | static void FlashPoint_ReleaseHostAdapter(ULONG pCurrCard) |
1583 | { | 1582 | { |
1584 | UCHAR i; | 1583 | unsigned char i; |
1585 | ULONG portBase; | 1584 | ULONG portBase; |
1586 | ULONG regOffset; | 1585 | ULONG regOffset; |
1587 | ULONG scamData; | 1586 | ULONG scamData; |
@@ -1598,7 +1597,7 @@ static void FlashPoint_ReleaseHostAdapter(ULONG pCurrCard) | |||
1598 | FPT_WrStack(pCurrNvRam->niBaseAddr, 4, pCurrNvRam->niAdapId); | 1597 | FPT_WrStack(pCurrNvRam->niBaseAddr, 4, pCurrNvRam->niAdapId); |
1599 | 1598 | ||
1600 | for(i = 0; i < MAX_SCSI_TAR / 2; i++) | 1599 | for(i = 0; i < MAX_SCSI_TAR / 2; i++) |
1601 | FPT_WrStack(pCurrNvRam->niBaseAddr, (UCHAR)(i+5), pCurrNvRam->niSyncTbl[i]); | 1600 | FPT_WrStack(pCurrNvRam->niBaseAddr, (unsigned char)(i+5), pCurrNvRam->niSyncTbl[i]); |
1602 | 1601 | ||
1603 | portBase = pCurrNvRam->niBaseAddr; | 1602 | portBase = pCurrNvRam->niBaseAddr; |
1604 | 1603 | ||
@@ -1617,7 +1616,7 @@ static void FlashPoint_ReleaseHostAdapter(ULONG pCurrCard) | |||
1617 | 1616 | ||
1618 | static void FPT_RNVRamData(PNVRamInfo pNvRamInfo) | 1617 | static void FPT_RNVRamData(PNVRamInfo pNvRamInfo) |
1619 | { | 1618 | { |
1620 | UCHAR i; | 1619 | unsigned char i; |
1621 | ULONG portBase; | 1620 | ULONG portBase; |
1622 | ULONG regOffset; | 1621 | ULONG regOffset; |
1623 | ULONG scamData; | 1622 | ULONG scamData; |
@@ -1630,7 +1629,7 @@ static void FPT_RNVRamData(PNVRamInfo pNvRamInfo) | |||
1630 | pNvRamInfo->niAdapId = FPT_RdStack(pNvRamInfo->niBaseAddr, 4); | 1629 | pNvRamInfo->niAdapId = FPT_RdStack(pNvRamInfo->niBaseAddr, 4); |
1631 | 1630 | ||
1632 | for(i = 0; i < MAX_SCSI_TAR / 2; i++) | 1631 | for(i = 0; i < MAX_SCSI_TAR / 2; i++) |
1633 | pNvRamInfo->niSyncTbl[i] = FPT_RdStack(pNvRamInfo->niBaseAddr, (UCHAR)(i+5)); | 1632 | pNvRamInfo->niSyncTbl[i] = FPT_RdStack(pNvRamInfo->niBaseAddr, (unsigned char)(i+5)); |
1634 | 1633 | ||
1635 | portBase = pNvRamInfo->niBaseAddr; | 1634 | portBase = pNvRamInfo->niBaseAddr; |
1636 | 1635 | ||
@@ -1643,20 +1642,20 @@ static void FPT_RNVRamData(PNVRamInfo pNvRamInfo) | |||
1643 | 1642 | ||
1644 | } | 1643 | } |
1645 | 1644 | ||
1646 | static UCHAR FPT_RdStack(ULONG portBase, UCHAR index) | 1645 | static unsigned char FPT_RdStack(ULONG portBase, unsigned char index) |
1647 | { | 1646 | { |
1648 | WR_HARPOON(portBase + hp_stack_addr, index); | 1647 | WR_HARPOON(portBase + hp_stack_addr, index); |
1649 | return(RD_HARPOON(portBase + hp_stack_data)); | 1648 | return(RD_HARPOON(portBase + hp_stack_data)); |
1650 | } | 1649 | } |
1651 | 1650 | ||
1652 | static void FPT_WrStack(ULONG portBase, UCHAR index, UCHAR data) | 1651 | static void FPT_WrStack(ULONG portBase, unsigned char index, unsigned char data) |
1653 | { | 1652 | { |
1654 | WR_HARPOON(portBase + hp_stack_addr, index); | 1653 | WR_HARPOON(portBase + hp_stack_addr, index); |
1655 | WR_HARPOON(portBase + hp_stack_data, data); | 1654 | WR_HARPOON(portBase + hp_stack_data, data); |
1656 | } | 1655 | } |
1657 | 1656 | ||
1658 | 1657 | ||
1659 | static UCHAR FPT_ChkIfChipInitialized(ULONG ioPort) | 1658 | static unsigned char FPT_ChkIfChipInitialized(ULONG ioPort) |
1660 | { | 1659 | { |
1661 | if((RD_HARPOON(ioPort + hp_arb_id) & 0x0f) != FPT_RdStack(ioPort, 4)) | 1660 | if((RD_HARPOON(ioPort + hp_arb_id) & 0x0f) != FPT_RdStack(ioPort, 4)) |
1662 | return(0); | 1661 | return(0); |
@@ -1681,7 +1680,7 @@ static UCHAR FPT_ChkIfChipInitialized(ULONG ioPort) | |||
1681 | static void FlashPoint_StartCCB(ULONG pCurrCard, PSCCB p_Sccb) | 1680 | static void FlashPoint_StartCCB(ULONG pCurrCard, PSCCB p_Sccb) |
1682 | { | 1681 | { |
1683 | ULONG ioport; | 1682 | ULONG ioport; |
1684 | UCHAR thisCard, lun; | 1683 | unsigned char thisCard, lun; |
1685 | PSCCB pSaveSccb; | 1684 | PSCCB pSaveSccb; |
1686 | CALL_BK_FN callback; | 1685 | CALL_BK_FN callback; |
1687 | 1686 | ||
@@ -1802,9 +1801,9 @@ static int FlashPoint_AbortCCB(ULONG pCurrCard, PSCCB p_Sccb) | |||
1802 | { | 1801 | { |
1803 | ULONG ioport; | 1802 | ULONG ioport; |
1804 | 1803 | ||
1805 | UCHAR thisCard; | 1804 | unsigned char thisCard; |
1806 | CALL_BK_FN callback; | 1805 | CALL_BK_FN callback; |
1807 | UCHAR TID; | 1806 | unsigned char TID; |
1808 | PSCCB pSaveSCCB; | 1807 | PSCCB pSaveSCCB; |
1809 | PSCCBMgr_tar_info currTar_Info; | 1808 | PSCCBMgr_tar_info currTar_Info; |
1810 | 1809 | ||
@@ -1823,7 +1822,7 @@ static int FlashPoint_AbortCCB(ULONG pCurrCard, PSCCB p_Sccb) | |||
1823 | 1822 | ||
1824 | if (!((PSCCBcard)pCurrCard)->cmdCounter) | 1823 | if (!((PSCCBcard)pCurrCard)->cmdCounter) |
1825 | WR_HARPOON(ioport+hp_semaphore,(RD_HARPOON(ioport+hp_semaphore) | 1824 | WR_HARPOON(ioport+hp_semaphore,(RD_HARPOON(ioport+hp_semaphore) |
1826 | & (UCHAR)(~(SCCB_MGR_ACTIVE | TICKLE_ME)) )); | 1825 | & (unsigned char)(~(SCCB_MGR_ACTIVE | TICKLE_ME)) )); |
1827 | 1826 | ||
1828 | p_Sccb->SccbStatus = SCCB_ABORT; | 1827 | p_Sccb->SccbStatus = SCCB_ABORT; |
1829 | callback = p_Sccb->SccbCallback; | 1828 | callback = p_Sccb->SccbCallback; |
@@ -1898,7 +1897,7 @@ static int FlashPoint_AbortCCB(ULONG pCurrCard, PSCCB p_Sccb) | |||
1898 | * interrupt for this card and disable the IRQ Pin if so. | 1897 | * interrupt for this card and disable the IRQ Pin if so. |
1899 | * | 1898 | * |
1900 | *---------------------------------------------------------------------*/ | 1899 | *---------------------------------------------------------------------*/ |
1901 | static UCHAR FlashPoint_InterruptPending(ULONG pCurrCard) | 1900 | static unsigned char FlashPoint_InterruptPending(ULONG pCurrCard) |
1902 | { | 1901 | { |
1903 | ULONG ioport; | 1902 | ULONG ioport; |
1904 | 1903 | ||
@@ -1928,9 +1927,9 @@ static UCHAR FlashPoint_InterruptPending(ULONG pCurrCard) | |||
1928 | static int FlashPoint_HandleInterrupt(ULONG pCurrCard) | 1927 | static int FlashPoint_HandleInterrupt(ULONG pCurrCard) |
1929 | { | 1928 | { |
1930 | PSCCB currSCCB; | 1929 | PSCCB currSCCB; |
1931 | UCHAR thisCard,result,bm_status, bm_int_st; | 1930 | unsigned char thisCard,result,bm_status, bm_int_st; |
1932 | USHORT hp_int; | 1931 | USHORT hp_int; |
1933 | UCHAR i, target; | 1932 | unsigned char i, target; |
1934 | ULONG ioport; | 1933 | ULONG ioport; |
1935 | 1934 | ||
1936 | thisCard = ((PSCCBcard)pCurrCard)->cardIndex; | 1935 | thisCard = ((PSCCBcard)pCurrCard)->cardIndex; |
@@ -1939,7 +1938,7 @@ static int FlashPoint_HandleInterrupt(ULONG pCurrCard) | |||
1939 | MDISABLE_INT(ioport); | 1938 | MDISABLE_INT(ioport); |
1940 | 1939 | ||
1941 | if ((bm_int_st=RD_HARPOON(ioport+hp_int_status)) & EXT_STATUS_ON) | 1940 | if ((bm_int_st=RD_HARPOON(ioport+hp_int_status)) & EXT_STATUS_ON) |
1942 | bm_status = RD_HARPOON(ioport+hp_ext_status) & (UCHAR)BAD_EXT_STATUS; | 1941 | bm_status = RD_HARPOON(ioport+hp_ext_status) & (unsigned char)BAD_EXT_STATUS; |
1943 | else | 1942 | else |
1944 | bm_status = 0; | 1943 | bm_status = 0; |
1945 | 1944 | ||
@@ -2080,7 +2079,7 @@ static int FlashPoint_HandleInterrupt(ULONG pCurrCard) | |||
2080 | else if ( (hp_int & IUNKWN) || (hp_int & PROG_HLT) ) | 2079 | else if ( (hp_int & IUNKWN) || (hp_int & PROG_HLT) ) |
2081 | { | 2080 | { |
2082 | WRW_HARPOON((ioport+hp_intstat), (PHASE | IUNKWN | PROG_HLT)); | 2081 | WRW_HARPOON((ioport+hp_intstat), (PHASE | IUNKWN | PROG_HLT)); |
2083 | if ((RD_HARPOON(ioport+hp_prgmcnt_0) & (UCHAR)0x3f)< (UCHAR)SELCHK) | 2082 | if ((RD_HARPOON(ioport+hp_prgmcnt_0) & (unsigned char)0x3f)< (unsigned char)SELCHK) |
2084 | { | 2083 | { |
2085 | FPT_phaseDecode(ioport,thisCard); | 2084 | FPT_phaseDecode(ioport,thisCard); |
2086 | } | 2085 | } |
@@ -2093,11 +2092,11 @@ static int FlashPoint_HandleInterrupt(ULONG pCurrCard) | |||
2093 | reg. (0x53) also increment the FIFO write addr reg (0x6f), thus we | 2092 | reg. (0x53) also increment the FIFO write addr reg (0x6f), thus we |
2094 | need to read this reg first then restore it later. After update to 0x53 */ | 2093 | need to read this reg first then restore it later. After update to 0x53 */ |
2095 | 2094 | ||
2096 | i = (UCHAR)(RD_HARPOON(ioport+hp_fifowrite)); | 2095 | i = (unsigned char)(RD_HARPOON(ioport+hp_fifowrite)); |
2097 | target = (UCHAR)(RD_HARPOON(ioport+hp_gp_reg_3)); | 2096 | target = (unsigned char)(RD_HARPOON(ioport+hp_gp_reg_3)); |
2098 | WR_HARPOON(ioport+hp_xfer_pad, (UCHAR) ID_UNLOCK); | 2097 | WR_HARPOON(ioport+hp_xfer_pad, (unsigned char) ID_UNLOCK); |
2099 | WR_HARPOON(ioport+hp_select_id, (UCHAR)(target | target<<4)); | 2098 | WR_HARPOON(ioport+hp_select_id, (unsigned char)(target | target<<4)); |
2100 | WR_HARPOON(ioport+hp_xfer_pad, (UCHAR) 0x00); | 2099 | WR_HARPOON(ioport+hp_xfer_pad, (unsigned char) 0x00); |
2101 | WR_HARPOON(ioport+hp_fifowrite, i); | 2100 | WR_HARPOON(ioport+hp_fifowrite, i); |
2102 | WR_HARPOON(ioport+hp_autostart_3, (AUTO_IMMED+TAG_STRT)); | 2101 | WR_HARPOON(ioport+hp_autostart_3, (AUTO_IMMED+TAG_STRT)); |
2103 | } | 2102 | } |
@@ -2170,10 +2169,10 @@ static int FlashPoint_HandleInterrupt(ULONG pCurrCard) | |||
2170 | * processing time. | 2169 | * processing time. |
2171 | * | 2170 | * |
2172 | *---------------------------------------------------------------------*/ | 2171 | *---------------------------------------------------------------------*/ |
2173 | static UCHAR FPT_SccbMgr_bad_isr(ULONG p_port, UCHAR p_card, | 2172 | static unsigned char FPT_SccbMgr_bad_isr(ULONG p_port, unsigned char p_card, |
2174 | PSCCBcard pCurrCard, USHORT p_int) | 2173 | PSCCBcard pCurrCard, USHORT p_int) |
2175 | { | 2174 | { |
2176 | UCHAR temp, ScamFlg; | 2175 | unsigned char temp, ScamFlg; |
2177 | PSCCBMgr_tar_info currTar_Info; | 2176 | PSCCBMgr_tar_info currTar_Info; |
2178 | PNVRamInfo pCurrNvRam; | 2177 | PNVRamInfo pCurrNvRam; |
2179 | 2178 | ||
@@ -2206,9 +2205,9 @@ static UCHAR FPT_SccbMgr_bad_isr(ULONG p_port, UCHAR p_card, | |||
2206 | 2205 | ||
2207 | FPT_sxfrp(p_port,p_card); | 2206 | FPT_sxfrp(p_port,p_card); |
2208 | 2207 | ||
2209 | temp = (UCHAR)(RD_HARPOON(p_port+hp_ee_ctrl) & | 2208 | temp = (unsigned char)(RD_HARPOON(p_port+hp_ee_ctrl) & |
2210 | (EXT_ARB_ACK | SCSI_TERM_ENA_H)); | 2209 | (EXT_ARB_ACK | SCSI_TERM_ENA_H)); |
2211 | WR_HARPOON(p_port+hp_ee_ctrl, ((UCHAR)temp | SEE_MS | SEE_CS)); | 2210 | WR_HARPOON(p_port+hp_ee_ctrl, ((unsigned char)temp | SEE_MS | SEE_CS)); |
2212 | WR_HARPOON(p_port+hp_ee_ctrl, temp); | 2211 | WR_HARPOON(p_port+hp_ee_ctrl, temp); |
2213 | 2212 | ||
2214 | if (!(RDW_HARPOON((p_port+hp_intstat)) & (BUS_FREE | RESET))) | 2213 | if (!(RDW_HARPOON((p_port+hp_intstat)) & (BUS_FREE | RESET))) |
@@ -2243,7 +2242,7 @@ static UCHAR FPT_SccbMgr_bad_isr(ULONG p_port, UCHAR p_card, | |||
2243 | ScamFlg = pCurrNvRam->niScamConf; | 2242 | ScamFlg = pCurrNvRam->niScamConf; |
2244 | } | 2243 | } |
2245 | else{ | 2244 | else{ |
2246 | ScamFlg = (UCHAR) FPT_utilEERead(p_port, SCAM_CONFIG/2); | 2245 | ScamFlg = (unsigned char) FPT_utilEERead(p_port, SCAM_CONFIG/2); |
2247 | } | 2246 | } |
2248 | 2247 | ||
2249 | FPT_XbowInit(p_port, ScamFlg); | 2248 | FPT_XbowInit(p_port, ScamFlg); |
@@ -2324,7 +2323,7 @@ static UCHAR FPT_SccbMgr_bad_isr(ULONG p_port, UCHAR p_card, | |||
2324 | 2323 | ||
2325 | static void FPT_SccbMgrTableInitAll() | 2324 | static void FPT_SccbMgrTableInitAll() |
2326 | { | 2325 | { |
2327 | UCHAR thisCard; | 2326 | unsigned char thisCard; |
2328 | 2327 | ||
2329 | for (thisCard = 0; thisCard < MAX_CARDS; thisCard++) | 2328 | for (thisCard = 0; thisCard < MAX_CARDS; thisCard++) |
2330 | { | 2329 | { |
@@ -2347,9 +2346,9 @@ static void FPT_SccbMgrTableInitAll() | |||
2347 | * | 2346 | * |
2348 | *---------------------------------------------------------------------*/ | 2347 | *---------------------------------------------------------------------*/ |
2349 | 2348 | ||
2350 | static void FPT_SccbMgrTableInitCard(PSCCBcard pCurrCard, UCHAR p_card) | 2349 | static void FPT_SccbMgrTableInitCard(PSCCBcard pCurrCard, unsigned char p_card) |
2351 | { | 2350 | { |
2352 | UCHAR scsiID, qtag; | 2351 | unsigned char scsiID, qtag; |
2353 | 2352 | ||
2354 | for (qtag = 0; qtag < QUEUE_DEPTH; qtag++) | 2353 | for (qtag = 0; qtag < QUEUE_DEPTH; qtag++) |
2355 | { | 2354 | { |
@@ -2382,10 +2381,10 @@ static void FPT_SccbMgrTableInitCard(PSCCBcard pCurrCard, UCHAR p_card) | |||
2382 | * | 2381 | * |
2383 | *---------------------------------------------------------------------*/ | 2382 | *---------------------------------------------------------------------*/ |
2384 | 2383 | ||
2385 | static void FPT_SccbMgrTableInitTarget(UCHAR p_card, UCHAR target) | 2384 | static void FPT_SccbMgrTableInitTarget(unsigned char p_card, unsigned char target) |
2386 | { | 2385 | { |
2387 | 2386 | ||
2388 | UCHAR lun, qtag; | 2387 | unsigned char lun, qtag; |
2389 | PSCCBMgr_tar_info currTar_Info; | 2388 | PSCCBMgr_tar_info currTar_Info; |
2390 | 2389 | ||
2391 | currTar_Info = &FPT_sccbMgrTbl[p_card][target]; | 2390 | currTar_Info = &FPT_sccbMgrTbl[p_card][target]; |
@@ -2428,9 +2427,9 @@ static void FPT_SccbMgrTableInitTarget(UCHAR p_card, UCHAR target) | |||
2428 | * | 2427 | * |
2429 | *---------------------------------------------------------------------*/ | 2428 | *---------------------------------------------------------------------*/ |
2430 | 2429 | ||
2431 | static UCHAR FPT_sfm(ULONG port, PSCCB pCurrSCCB) | 2430 | static unsigned char FPT_sfm(ULONG port, PSCCB pCurrSCCB) |
2432 | { | 2431 | { |
2433 | UCHAR message; | 2432 | unsigned char message; |
2434 | USHORT TimeOutLoop; | 2433 | USHORT TimeOutLoop; |
2435 | 2434 | ||
2436 | TimeOutLoop = 0; | 2435 | TimeOutLoop = 0; |
@@ -2501,16 +2500,16 @@ static UCHAR FPT_sfm(ULONG port, PSCCB pCurrSCCB) | |||
2501 | * | 2500 | * |
2502 | *---------------------------------------------------------------------*/ | 2501 | *---------------------------------------------------------------------*/ |
2503 | 2502 | ||
2504 | static void FPT_ssel(ULONG port, UCHAR p_card) | 2503 | static void FPT_ssel(ULONG port, unsigned char p_card) |
2505 | { | 2504 | { |
2506 | 2505 | ||
2507 | UCHAR auto_loaded, i, target, *theCCB; | 2506 | unsigned char auto_loaded, i, target, *theCCB; |
2508 | 2507 | ||
2509 | ULONG cdb_reg; | 2508 | ULONG cdb_reg; |
2510 | PSCCBcard CurrCard; | 2509 | PSCCBcard CurrCard; |
2511 | PSCCB currSCCB; | 2510 | PSCCB currSCCB; |
2512 | PSCCBMgr_tar_info currTar_Info; | 2511 | PSCCBMgr_tar_info currTar_Info; |
2513 | UCHAR lastTag, lun; | 2512 | unsigned char lastTag, lun; |
2514 | 2513 | ||
2515 | CurrCard = &FPT_BL_Card[p_card]; | 2514 | CurrCard = &FPT_BL_Card[p_card]; |
2516 | currSCCB = CurrCard->currentSCCB; | 2515 | currSCCB = CurrCard->currentSCCB; |
@@ -2656,8 +2655,8 @@ static void FPT_ssel(ULONG port, UCHAR p_card) | |||
2656 | WRW_HARPOON((port+ID_MSG_STRT+2),BRH_OP+ALWAYS+CMDPZ); | 2655 | WRW_HARPOON((port+ID_MSG_STRT+2),BRH_OP+ALWAYS+CMDPZ); |
2657 | 2656 | ||
2658 | WRW_HARPOON((port+SYNC_MSGS+0), (MPM_OP+AMSG_OUT+ | 2657 | WRW_HARPOON((port+SYNC_MSGS+0), (MPM_OP+AMSG_OUT+ |
2659 | (((UCHAR)(currSCCB->ControlByte & TAG_TYPE_MASK) | 2658 | (((unsigned char)(currSCCB->ControlByte & TAG_TYPE_MASK) |
2660 | >> 6) | (UCHAR)0x20))); | 2659 | >> 6) | (unsigned char)0x20))); |
2661 | WRW_HARPOON((port+SYNC_MSGS+2), | 2660 | WRW_HARPOON((port+SYNC_MSGS+2), |
2662 | (MPM_OP+AMSG_OUT+currSCCB->Sccb_tag)); | 2661 | (MPM_OP+AMSG_OUT+currSCCB->Sccb_tag)); |
2663 | WRW_HARPOON((port+SYNC_MSGS+4), (BRH_OP+ALWAYS+NP )); | 2662 | WRW_HARPOON((port+SYNC_MSGS+4), (BRH_OP+ALWAYS+NP )); |
@@ -2713,8 +2712,8 @@ static void FPT_ssel(ULONG port, UCHAR p_card) | |||
2713 | WRW_HARPOON((port+ID_MSG_STRT), (MPM_OP+AMSG_OUT+currSCCB->Sccb_idmsg)); | 2712 | WRW_HARPOON((port+ID_MSG_STRT), (MPM_OP+AMSG_OUT+currSCCB->Sccb_idmsg)); |
2714 | 2713 | ||
2715 | WRW_HARPOON((port+ID_MSG_STRT+2), (MPM_OP+AMSG_OUT+ | 2714 | WRW_HARPOON((port+ID_MSG_STRT+2), (MPM_OP+AMSG_OUT+ |
2716 | (((UCHAR)(currSCCB->ControlByte & TAG_TYPE_MASK) | 2715 | (((unsigned char)(currSCCB->ControlByte & TAG_TYPE_MASK) |
2717 | >> 6) | (UCHAR)0x20))); | 2716 | >> 6) | (unsigned char)0x20))); |
2718 | 2717 | ||
2719 | for (i = 1; i < QUEUE_DEPTH; i++) | 2718 | for (i = 1; i < QUEUE_DEPTH; i++) |
2720 | { | 2719 | { |
@@ -2760,7 +2759,7 @@ static void FPT_ssel(ULONG port, UCHAR p_card) | |||
2760 | } | 2759 | } |
2761 | 2760 | ||
2762 | 2761 | ||
2763 | theCCB = (UCHAR *)&currSCCB->Cdb[0]; | 2762 | theCCB = (unsigned char *)&currSCCB->Cdb[0]; |
2764 | 2763 | ||
2765 | cdb_reg = port + CMD_STRT; | 2764 | cdb_reg = port + CMD_STRT; |
2766 | 2765 | ||
@@ -2791,7 +2790,7 @@ static void FPT_ssel(ULONG port, UCHAR p_card) | |||
2791 | else | 2790 | else |
2792 | { | 2791 | { |
2793 | 2792 | ||
2794 | /* auto_loaded = (RD_HARPOON(port+hp_autostart_3) & (UCHAR)0x1F); | 2793 | /* auto_loaded = (RD_HARPOON(port+hp_autostart_3) & (unsigned char)0x1F); |
2795 | auto_loaded |= AUTO_IMMED; */ | 2794 | auto_loaded |= AUTO_IMMED; */ |
2796 | auto_loaded = AUTO_IMMED; | 2795 | auto_loaded = AUTO_IMMED; |
2797 | 2796 | ||
@@ -2812,10 +2811,10 @@ static void FPT_ssel(ULONG port, UCHAR p_card) | |||
2812 | * | 2811 | * |
2813 | *---------------------------------------------------------------------*/ | 2812 | *---------------------------------------------------------------------*/ |
2814 | 2813 | ||
2815 | static void FPT_sres(ULONG port, UCHAR p_card, PSCCBcard pCurrCard) | 2814 | static void FPT_sres(ULONG port, unsigned char p_card, PSCCBcard pCurrCard) |
2816 | { | 2815 | { |
2817 | 2816 | ||
2818 | UCHAR our_target, message, lun = 0, tag, msgRetryCount; | 2817 | unsigned char our_target, message, lun = 0, tag, msgRetryCount; |
2819 | 2818 | ||
2820 | 2819 | ||
2821 | PSCCBMgr_tar_info currTar_Info; | 2820 | PSCCBMgr_tar_info currTar_Info; |
@@ -2881,7 +2880,7 @@ static void FPT_sres(ULONG port, UCHAR p_card, PSCCBcard pCurrCard) | |||
2881 | WRW_HARPOON((port+hp_fiforead), (USHORT) 0x00); | 2880 | WRW_HARPOON((port+hp_fiforead), (USHORT) 0x00); |
2882 | 2881 | ||
2883 | 2882 | ||
2884 | our_target = (UCHAR)(RD_HARPOON(port+hp_select_id) >> 4); | 2883 | our_target = (unsigned char)(RD_HARPOON(port+hp_select_id) >> 4); |
2885 | currTar_Info = &FPT_sccbMgrTbl[p_card][our_target]; | 2884 | currTar_Info = &FPT_sccbMgrTbl[p_card][our_target]; |
2886 | 2885 | ||
2887 | 2886 | ||
@@ -2913,7 +2912,7 @@ static void FPT_sres(ULONG port, UCHAR p_card, PSCCBcard pCurrCard) | |||
2913 | 2912 | ||
2914 | if (message <= (0x80 | LUN_MASK)) | 2913 | if (message <= (0x80 | LUN_MASK)) |
2915 | { | 2914 | { |
2916 | lun = message & (UCHAR)LUN_MASK; | 2915 | lun = message & (unsigned char)LUN_MASK; |
2917 | 2916 | ||
2918 | if ((currTar_Info->TarStatus & TAR_TAG_Q_MASK) == TAG_Q_TRYING) | 2917 | if ((currTar_Info->TarStatus & TAR_TAG_Q_MASK) == TAG_Q_TRYING) |
2919 | { | 2918 | { |
@@ -3073,7 +3072,7 @@ static void FPT_sres(ULONG port, UCHAR p_card, PSCCBcard pCurrCard) | |||
3073 | (RD_HARPOON(port+hp_scsisig) & SCSI_BSY)) ; | 3072 | (RD_HARPOON(port+hp_scsisig) & SCSI_BSY)) ; |
3074 | } | 3073 | } |
3075 | 3074 | ||
3076 | static void FPT_SendMsg(ULONG port, UCHAR message) | 3075 | static void FPT_SendMsg(ULONG port, unsigned char message) |
3077 | { | 3076 | { |
3078 | while(!(RD_HARPOON(port+hp_scsisig) & SCSI_REQ)) | 3077 | while(!(RD_HARPOON(port+hp_scsisig) & SCSI_REQ)) |
3079 | { | 3078 | { |
@@ -3122,7 +3121,7 @@ static void FPT_SendMsg(ULONG port, UCHAR message) | |||
3122 | * target device. | 3121 | * target device. |
3123 | * | 3122 | * |
3124 | *---------------------------------------------------------------------*/ | 3123 | *---------------------------------------------------------------------*/ |
3125 | static void FPT_sdecm(UCHAR message, ULONG port, UCHAR p_card) | 3124 | static void FPT_sdecm(unsigned char message, ULONG port, unsigned char p_card) |
3126 | { | 3125 | { |
3127 | PSCCB currSCCB; | 3126 | PSCCB currSCCB; |
3128 | PSCCBcard CurrCard; | 3127 | PSCCBcard CurrCard; |
@@ -3152,8 +3151,8 @@ static void FPT_sdecm(UCHAR message, ULONG port, UCHAR p_card) | |||
3152 | 3151 | ||
3153 | if (currSCCB->Sccb_scsistat == SELECT_Q_ST) | 3152 | if (currSCCB->Sccb_scsistat == SELECT_Q_ST) |
3154 | { | 3153 | { |
3155 | currTar_Info->TarStatus &= ~(UCHAR)TAR_TAG_Q_MASK; | 3154 | currTar_Info->TarStatus &= ~(unsigned char)TAR_TAG_Q_MASK; |
3156 | currTar_Info->TarStatus |= (UCHAR)TAG_Q_REJECT; | 3155 | currTar_Info->TarStatus |= (unsigned char)TAG_Q_REJECT; |
3157 | } | 3156 | } |
3158 | 3157 | ||
3159 | ACCEPT_MSG(port); | 3158 | ACCEPT_MSG(port); |
@@ -3190,7 +3189,7 @@ static void FPT_sdecm(UCHAR message, ULONG port, UCHAR p_card) | |||
3190 | if ((currSCCB->Sccb_scsistat == SELECT_SN_ST)) | 3189 | if ((currSCCB->Sccb_scsistat == SELECT_SN_ST)) |
3191 | { | 3190 | { |
3192 | 3191 | ||
3193 | currTar_Info->TarStatus |= (UCHAR)SYNC_SUPPORTED; | 3192 | currTar_Info->TarStatus |= (unsigned char)SYNC_SUPPORTED; |
3194 | 3193 | ||
3195 | currTar_Info->TarEEValue &= ~EE_SYNC_MASK; | 3194 | currTar_Info->TarEEValue &= ~EE_SYNC_MASK; |
3196 | } | 3195 | } |
@@ -3209,7 +3208,7 @@ static void FPT_sdecm(UCHAR message, ULONG port, UCHAR p_card) | |||
3209 | else if ((currTar_Info->TarStatus & TAR_TAG_Q_MASK) == TAG_Q_TRYING ) | 3208 | else if ((currTar_Info->TarStatus & TAR_TAG_Q_MASK) == TAG_Q_TRYING ) |
3210 | { | 3209 | { |
3211 | currTar_Info->TarStatus = (currTar_Info->TarStatus & | 3210 | currTar_Info->TarStatus = (currTar_Info->TarStatus & |
3212 | ~(UCHAR)TAR_TAG_Q_MASK) | TAG_Q_REJECT; | 3211 | ~(unsigned char)TAR_TAG_Q_MASK) | TAG_Q_REJECT; |
3213 | 3212 | ||
3214 | 3213 | ||
3215 | currSCCB->ControlByte &= ~F_USE_CMD_Q; | 3214 | currSCCB->ControlByte &= ~F_USE_CMD_Q; |
@@ -3241,7 +3240,7 @@ static void FPT_sdecm(UCHAR message, ULONG port, UCHAR p_card) | |||
3241 | currTar_Info->TarLUNBusy[0] = 1; | 3240 | currTar_Info->TarLUNBusy[0] = 1; |
3242 | 3241 | ||
3243 | 3242 | ||
3244 | currSCCB->ControlByte &= ~(UCHAR)F_USE_CMD_Q; | 3243 | currSCCB->ControlByte &= ~(unsigned char)F_USE_CMD_Q; |
3245 | 3244 | ||
3246 | WR_HARPOON(port+hp_autostart_1, (AUTO_IMMED+DISCONNECT_START)); | 3245 | WR_HARPOON(port+hp_autostart_1, (AUTO_IMMED+DISCONNECT_START)); |
3247 | 3246 | ||
@@ -3301,9 +3300,9 @@ static void FPT_sdecm(UCHAR message, ULONG port, UCHAR p_card) | |||
3301 | * Description: Decide what to do with the extended message. | 3300 | * Description: Decide what to do with the extended message. |
3302 | * | 3301 | * |
3303 | *---------------------------------------------------------------------*/ | 3302 | *---------------------------------------------------------------------*/ |
3304 | static void FPT_shandem(ULONG port, UCHAR p_card, PSCCB pCurrSCCB) | 3303 | static void FPT_shandem(ULONG port, unsigned char p_card, PSCCB pCurrSCCB) |
3305 | { | 3304 | { |
3306 | UCHAR length,message; | 3305 | unsigned char length,message; |
3307 | 3306 | ||
3308 | length = FPT_sfm(port,pCurrSCCB); | 3307 | length = FPT_sfm(port,pCurrSCCB); |
3309 | if (length) | 3308 | if (length) |
@@ -3380,7 +3379,7 @@ static void FPT_shandem(ULONG port, UCHAR p_card, PSCCB pCurrSCCB) | |||
3380 | * | 3379 | * |
3381 | *---------------------------------------------------------------------*/ | 3380 | *---------------------------------------------------------------------*/ |
3382 | 3381 | ||
3383 | static UCHAR FPT_sisyncn(ULONG port, UCHAR p_card, UCHAR syncFlag) | 3382 | static unsigned char FPT_sisyncn(ULONG port, unsigned char p_card, unsigned char syncFlag) |
3384 | { | 3383 | { |
3385 | PSCCB currSCCB; | 3384 | PSCCB currSCCB; |
3386 | PSCCBMgr_tar_info currTar_Info; | 3385 | PSCCBMgr_tar_info currTar_Info; |
@@ -3392,7 +3391,7 @@ static UCHAR FPT_sisyncn(ULONG port, UCHAR p_card, UCHAR syncFlag) | |||
3392 | 3391 | ||
3393 | 3392 | ||
3394 | WRW_HARPOON((port+ID_MSG_STRT), | 3393 | WRW_HARPOON((port+ID_MSG_STRT), |
3395 | (MPM_OP+AMSG_OUT+(currSCCB->Sccb_idmsg & ~(UCHAR)DISC_PRIV))); | 3394 | (MPM_OP+AMSG_OUT+(currSCCB->Sccb_idmsg & ~(unsigned char)DISC_PRIV))); |
3396 | 3395 | ||
3397 | WRW_HARPOON((port+ID_MSG_STRT+2),BRH_OP+ALWAYS+CMDPZ); | 3396 | WRW_HARPOON((port+ID_MSG_STRT+2),BRH_OP+ALWAYS+CMDPZ); |
3398 | 3397 | ||
@@ -3426,7 +3425,7 @@ static UCHAR FPT_sisyncn(ULONG port, UCHAR p_card, UCHAR syncFlag) | |||
3426 | { | 3425 | { |
3427 | WR_HARPOON(port+hp_autostart_3, (SELECT+SELCHK_STRT)); | 3426 | WR_HARPOON(port+hp_autostart_3, (SELECT+SELCHK_STRT)); |
3428 | currTar_Info->TarStatus = ((currTar_Info->TarStatus & | 3427 | currTar_Info->TarStatus = ((currTar_Info->TarStatus & |
3429 | ~(UCHAR)TAR_SYNC_MASK) | (UCHAR)SYNC_TRYING); | 3428 | ~(unsigned char)TAR_SYNC_MASK) | (unsigned char)SYNC_TRYING); |
3430 | } | 3429 | } |
3431 | else | 3430 | else |
3432 | { | 3431 | { |
@@ -3439,7 +3438,7 @@ static UCHAR FPT_sisyncn(ULONG port, UCHAR p_card, UCHAR syncFlag) | |||
3439 | 3438 | ||
3440 | else { | 3439 | else { |
3441 | 3440 | ||
3442 | currTar_Info->TarStatus |= (UCHAR)SYNC_SUPPORTED; | 3441 | currTar_Info->TarStatus |= (unsigned char)SYNC_SUPPORTED; |
3443 | currTar_Info->TarEEValue &= ~EE_SYNC_MASK; | 3442 | currTar_Info->TarEEValue &= ~EE_SYNC_MASK; |
3444 | return(0); | 3443 | return(0); |
3445 | } | 3444 | } |
@@ -3455,9 +3454,9 @@ static UCHAR FPT_sisyncn(ULONG port, UCHAR p_card, UCHAR syncFlag) | |||
3455 | * necessary. | 3454 | * necessary. |
3456 | * | 3455 | * |
3457 | *---------------------------------------------------------------------*/ | 3456 | *---------------------------------------------------------------------*/ |
3458 | static void FPT_stsyncn(ULONG port, UCHAR p_card) | 3457 | static void FPT_stsyncn(ULONG port, unsigned char p_card) |
3459 | { | 3458 | { |
3460 | UCHAR sync_msg,offset,sync_reg,our_sync_msg; | 3459 | unsigned char sync_msg,offset,sync_reg,our_sync_msg; |
3461 | PSCCB currSCCB; | 3460 | PSCCB currSCCB; |
3462 | PSCCBMgr_tar_info currTar_Info; | 3461 | PSCCBMgr_tar_info currTar_Info; |
3463 | 3462 | ||
@@ -3562,7 +3561,7 @@ static void FPT_stsyncn(ULONG port, UCHAR p_card) | |||
3562 | ACCEPT_MSG(port); | 3561 | ACCEPT_MSG(port); |
3563 | 3562 | ||
3564 | currTar_Info->TarStatus = ((currTar_Info->TarStatus & | 3563 | currTar_Info->TarStatus = ((currTar_Info->TarStatus & |
3565 | ~(UCHAR)TAR_SYNC_MASK) | (UCHAR)SYNC_SUPPORTED); | 3564 | ~(unsigned char)TAR_SYNC_MASK) | (unsigned char)SYNC_SUPPORTED); |
3566 | 3565 | ||
3567 | WR_HARPOON(port+hp_autostart_1, (AUTO_IMMED+DISCONNECT_START)); | 3566 | WR_HARPOON(port+hp_autostart_1, (AUTO_IMMED+DISCONNECT_START)); |
3568 | } | 3567 | } |
@@ -3575,7 +3574,7 @@ static void FPT_stsyncn(ULONG port, UCHAR p_card) | |||
3575 | FPT_sisyncr(port,sync_msg,offset); | 3574 | FPT_sisyncr(port,sync_msg,offset); |
3576 | 3575 | ||
3577 | currTar_Info->TarStatus = ((currTar_Info->TarStatus & | 3576 | currTar_Info->TarStatus = ((currTar_Info->TarStatus & |
3578 | ~(UCHAR)TAR_SYNC_MASK) | (UCHAR)SYNC_SUPPORTED); | 3577 | ~(unsigned char)TAR_SYNC_MASK) | (unsigned char)SYNC_SUPPORTED); |
3579 | } | 3578 | } |
3580 | } | 3579 | } |
3581 | 3580 | ||
@@ -3587,7 +3586,7 @@ static void FPT_stsyncn(ULONG port, UCHAR p_card) | |||
3587 | * Description: Answer the targets sync message. | 3586 | * Description: Answer the targets sync message. |
3588 | * | 3587 | * |
3589 | *---------------------------------------------------------------------*/ | 3588 | *---------------------------------------------------------------------*/ |
3590 | static void FPT_sisyncr(ULONG port,UCHAR sync_pulse, UCHAR offset) | 3589 | static void FPT_sisyncr(ULONG port,unsigned char sync_pulse, unsigned char offset) |
3591 | { | 3590 | { |
3592 | ARAM_ACCESS(port); | 3591 | ARAM_ACCESS(port); |
3593 | WRW_HARPOON((port+SYNC_MSGS+0), (MPM_OP+AMSG_OUT+SMEXT )); | 3592 | WRW_HARPOON((port+SYNC_MSGS+0), (MPM_OP+AMSG_OUT+SMEXT )); |
@@ -3618,7 +3617,7 @@ static void FPT_sisyncr(ULONG port,UCHAR sync_pulse, UCHAR offset) | |||
3618 | * | 3617 | * |
3619 | *---------------------------------------------------------------------*/ | 3618 | *---------------------------------------------------------------------*/ |
3620 | 3619 | ||
3621 | static UCHAR FPT_siwidn(ULONG port, UCHAR p_card) | 3620 | static unsigned char FPT_siwidn(ULONG port, unsigned char p_card) |
3622 | { | 3621 | { |
3623 | PSCCB currSCCB; | 3622 | PSCCB currSCCB; |
3624 | PSCCBMgr_tar_info currTar_Info; | 3623 | PSCCBMgr_tar_info currTar_Info; |
@@ -3630,7 +3629,7 @@ static UCHAR FPT_siwidn(ULONG port, UCHAR p_card) | |||
3630 | 3629 | ||
3631 | 3630 | ||
3632 | WRW_HARPOON((port+ID_MSG_STRT), | 3631 | WRW_HARPOON((port+ID_MSG_STRT), |
3633 | (MPM_OP+AMSG_OUT+(currSCCB->Sccb_idmsg & ~(UCHAR)DISC_PRIV))); | 3632 | (MPM_OP+AMSG_OUT+(currSCCB->Sccb_idmsg & ~(unsigned char)DISC_PRIV))); |
3634 | 3633 | ||
3635 | WRW_HARPOON((port+ID_MSG_STRT+2),BRH_OP+ALWAYS+CMDPZ); | 3634 | WRW_HARPOON((port+ID_MSG_STRT+2),BRH_OP+ALWAYS+CMDPZ); |
3636 | 3635 | ||
@@ -3645,7 +3644,7 @@ static UCHAR FPT_siwidn(ULONG port, UCHAR p_card) | |||
3645 | 3644 | ||
3646 | 3645 | ||
3647 | currTar_Info->TarStatus = ((currTar_Info->TarStatus & | 3646 | currTar_Info->TarStatus = ((currTar_Info->TarStatus & |
3648 | ~(UCHAR)TAR_WIDE_MASK) | (UCHAR)WIDE_ENABLED); | 3647 | ~(unsigned char)TAR_WIDE_MASK) | (unsigned char)WIDE_ENABLED); |
3649 | 3648 | ||
3650 | return(1); | 3649 | return(1); |
3651 | } | 3650 | } |
@@ -3653,7 +3652,7 @@ static UCHAR FPT_siwidn(ULONG port, UCHAR p_card) | |||
3653 | else { | 3652 | else { |
3654 | 3653 | ||
3655 | currTar_Info->TarStatus = ((currTar_Info->TarStatus & | 3654 | currTar_Info->TarStatus = ((currTar_Info->TarStatus & |
3656 | ~(UCHAR)TAR_WIDE_MASK) | WIDE_NEGOCIATED); | 3655 | ~(unsigned char)TAR_WIDE_MASK) | WIDE_NEGOCIATED); |
3657 | 3656 | ||
3658 | currTar_Info->TarEEValue &= ~EE_WIDE_SCSI; | 3657 | currTar_Info->TarEEValue &= ~EE_WIDE_SCSI; |
3659 | return(0); | 3658 | return(0); |
@@ -3670,9 +3669,9 @@ static UCHAR FPT_siwidn(ULONG port, UCHAR p_card) | |||
3670 | * necessary. | 3669 | * necessary. |
3671 | * | 3670 | * |
3672 | *---------------------------------------------------------------------*/ | 3671 | *---------------------------------------------------------------------*/ |
3673 | static void FPT_stwidn(ULONG port, UCHAR p_card) | 3672 | static void FPT_stwidn(ULONG port, unsigned char p_card) |
3674 | { | 3673 | { |
3675 | UCHAR width; | 3674 | unsigned char width; |
3676 | PSCCB currSCCB; | 3675 | PSCCB currSCCB; |
3677 | PSCCBMgr_tar_info currTar_Info; | 3676 | PSCCBMgr_tar_info currTar_Info; |
3678 | 3677 | ||
@@ -3750,7 +3749,7 @@ static void FPT_stwidn(ULONG port, UCHAR p_card) | |||
3750 | * Description: Answer the targets Wide nego message. | 3749 | * Description: Answer the targets Wide nego message. |
3751 | * | 3750 | * |
3752 | *---------------------------------------------------------------------*/ | 3751 | *---------------------------------------------------------------------*/ |
3753 | static void FPT_siwidr(ULONG port, UCHAR width) | 3752 | static void FPT_siwidr(ULONG port, unsigned char width) |
3754 | { | 3753 | { |
3755 | ARAM_ACCESS(port); | 3754 | ARAM_ACCESS(port); |
3756 | WRW_HARPOON((port+SYNC_MSGS+0), (MPM_OP+AMSG_OUT+SMEXT )); | 3755 | WRW_HARPOON((port+SYNC_MSGS+0), (MPM_OP+AMSG_OUT+SMEXT )); |
@@ -3779,10 +3778,10 @@ static void FPT_siwidr(ULONG port, UCHAR width) | |||
3779 | * ID specified. | 3778 | * ID specified. |
3780 | * | 3779 | * |
3781 | *---------------------------------------------------------------------*/ | 3780 | *---------------------------------------------------------------------*/ |
3782 | static void FPT_sssyncv(ULONG p_port, UCHAR p_id, UCHAR p_sync_value, | 3781 | static void FPT_sssyncv(ULONG p_port, unsigned char p_id, unsigned char p_sync_value, |
3783 | PSCCBMgr_tar_info currTar_Info) | 3782 | PSCCBMgr_tar_info currTar_Info) |
3784 | { | 3783 | { |
3785 | UCHAR index; | 3784 | unsigned char index; |
3786 | 3785 | ||
3787 | index = p_id; | 3786 | index = p_id; |
3788 | 3787 | ||
@@ -3851,9 +3850,9 @@ static void FPT_sssyncv(ULONG p_port, UCHAR p_id, UCHAR p_sync_value, | |||
3851 | * Description: Reset the desired card's SCSI bus. | 3850 | * Description: Reset the desired card's SCSI bus. |
3852 | * | 3851 | * |
3853 | *---------------------------------------------------------------------*/ | 3852 | *---------------------------------------------------------------------*/ |
3854 | static void FPT_sresb(ULONG port, UCHAR p_card) | 3853 | static void FPT_sresb(ULONG port, unsigned char p_card) |
3855 | { | 3854 | { |
3856 | UCHAR scsiID, i; | 3855 | unsigned char scsiID, i; |
3857 | 3856 | ||
3858 | PSCCBMgr_tar_info currTar_Info; | 3857 | PSCCBMgr_tar_info currTar_Info; |
3859 | 3858 | ||
@@ -3926,7 +3925,7 @@ static void FPT_sresb(ULONG port, UCHAR p_card) | |||
3926 | *---------------------------------------------------------------------*/ | 3925 | *---------------------------------------------------------------------*/ |
3927 | static void FPT_ssenss(PSCCBcard pCurrCard) | 3926 | static void FPT_ssenss(PSCCBcard pCurrCard) |
3928 | { | 3927 | { |
3929 | UCHAR i; | 3928 | unsigned char i; |
3930 | PSCCB currSCCB; | 3929 | PSCCB currSCCB; |
3931 | 3930 | ||
3932 | currSCCB = pCurrCard->currentSCCB; | 3931 | currSCCB = pCurrCard->currentSCCB; |
@@ -3941,7 +3940,7 @@ static void FPT_ssenss(PSCCBcard pCurrCard) | |||
3941 | 3940 | ||
3942 | currSCCB->CdbLength = SIX_BYTE_CMD; | 3941 | currSCCB->CdbLength = SIX_BYTE_CMD; |
3943 | currSCCB->Cdb[0] = SCSI_REQUEST_SENSE; | 3942 | currSCCB->Cdb[0] = SCSI_REQUEST_SENSE; |
3944 | currSCCB->Cdb[1] = currSCCB->Cdb[1] & (UCHAR)0xE0; /*Keep LUN. */ | 3943 | currSCCB->Cdb[1] = currSCCB->Cdb[1] & (unsigned char)0xE0; /*Keep LUN. */ |
3945 | currSCCB->Cdb[2] = 0x00; | 3944 | currSCCB->Cdb[2] = 0x00; |
3946 | currSCCB->Cdb[3] = 0x00; | 3945 | currSCCB->Cdb[3] = 0x00; |
3947 | currSCCB->Cdb[4] = currSCCB->RequestSenseLength; | 3946 | currSCCB->Cdb[4] = currSCCB->RequestSenseLength; |
@@ -3955,7 +3954,7 @@ static void FPT_ssenss(PSCCBcard pCurrCard) | |||
3955 | 3954 | ||
3956 | currSCCB->Sccb_XferState &= ~F_SG_XFER; | 3955 | currSCCB->Sccb_XferState &= ~F_SG_XFER; |
3957 | 3956 | ||
3958 | currSCCB->Sccb_idmsg = currSCCB->Sccb_idmsg & ~(UCHAR)DISC_PRIV; | 3957 | currSCCB->Sccb_idmsg = currSCCB->Sccb_idmsg & ~(unsigned char)DISC_PRIV; |
3959 | 3958 | ||
3960 | currSCCB->ControlByte = 0x00; | 3959 | currSCCB->ControlByte = 0x00; |
3961 | 3960 | ||
@@ -3973,9 +3972,9 @@ static void FPT_ssenss(PSCCBcard pCurrCard) | |||
3973 | * | 3972 | * |
3974 | *---------------------------------------------------------------------*/ | 3973 | *---------------------------------------------------------------------*/ |
3975 | 3974 | ||
3976 | static void FPT_sxfrp(ULONG p_port, UCHAR p_card) | 3975 | static void FPT_sxfrp(ULONG p_port, unsigned char p_card) |
3977 | { | 3976 | { |
3978 | UCHAR curr_phz; | 3977 | unsigned char curr_phz; |
3979 | 3978 | ||
3980 | 3979 | ||
3981 | DISABLE_AUTO(p_port); | 3980 | DISABLE_AUTO(p_port); |
@@ -3994,7 +3993,7 @@ static void FPT_sxfrp(ULONG p_port, UCHAR p_card) | |||
3994 | 3993 | ||
3995 | WR_HARPOON(p_port+hp_xfercnt_0, 0x00); | 3994 | WR_HARPOON(p_port+hp_xfercnt_0, 0x00); |
3996 | 3995 | ||
3997 | curr_phz = RD_HARPOON(p_port+hp_scsisig) & (UCHAR)S_SCSI_PHZ; | 3996 | curr_phz = RD_HARPOON(p_port+hp_scsisig) & (unsigned char)S_SCSI_PHZ; |
3998 | 3997 | ||
3999 | WRW_HARPOON((p_port+hp_intstat), XFER_CNT_0); | 3998 | WRW_HARPOON((p_port+hp_intstat), XFER_CNT_0); |
4000 | 3999 | ||
@@ -4002,9 +4001,9 @@ static void FPT_sxfrp(ULONG p_port, UCHAR p_card) | |||
4002 | WR_HARPOON(p_port+hp_scsisig, curr_phz); | 4001 | WR_HARPOON(p_port+hp_scsisig, curr_phz); |
4003 | 4002 | ||
4004 | while ( !(RDW_HARPOON((p_port+hp_intstat)) & (BUS_FREE | RESET)) && | 4003 | while ( !(RDW_HARPOON((p_port+hp_intstat)) & (BUS_FREE | RESET)) && |
4005 | (curr_phz == (RD_HARPOON(p_port+hp_scsisig) & (UCHAR)S_SCSI_PHZ)) ) | 4004 | (curr_phz == (RD_HARPOON(p_port+hp_scsisig) & (unsigned char)S_SCSI_PHZ)) ) |
4006 | { | 4005 | { |
4007 | if (curr_phz & (UCHAR)SCSI_IOBIT) | 4006 | if (curr_phz & (unsigned char)SCSI_IOBIT) |
4008 | { | 4007 | { |
4009 | WR_HARPOON(p_port+hp_portctrl_0, (SCSI_PORT | HOST_PORT | SCSI_INBIT)); | 4008 | WR_HARPOON(p_port+hp_portctrl_0, (SCSI_PORT | HOST_PORT | SCSI_INBIT)); |
4010 | 4009 | ||
@@ -4055,10 +4054,10 @@ static void FPT_sxfrp(ULONG p_port, UCHAR p_card) | |||
4055 | * | 4054 | * |
4056 | *---------------------------------------------------------------------*/ | 4055 | *---------------------------------------------------------------------*/ |
4057 | 4056 | ||
4058 | static void FPT_schkdd(ULONG port, UCHAR p_card) | 4057 | static void FPT_schkdd(ULONG port, unsigned char p_card) |
4059 | { | 4058 | { |
4060 | USHORT TimeOutLoop; | 4059 | USHORT TimeOutLoop; |
4061 | UCHAR sPhase; | 4060 | unsigned char sPhase; |
4062 | 4061 | ||
4063 | PSCCB currSCCB; | 4062 | PSCCB currSCCB; |
4064 | 4063 | ||
@@ -4112,7 +4111,7 @@ static void FPT_schkdd(ULONG port, UCHAR p_card) | |||
4112 | if (RDW_HARPOON((port+hp_intstat)) & BUS_FREE) { | 4111 | if (RDW_HARPOON((port+hp_intstat)) & BUS_FREE) { |
4113 | return; | 4112 | return; |
4114 | } | 4113 | } |
4115 | if (RD_HARPOON(port+hp_offsetctr) & (UCHAR)0x1F) { | 4114 | if (RD_HARPOON(port+hp_offsetctr) & (unsigned char)0x1F) { |
4116 | break; | 4115 | break; |
4117 | } | 4116 | } |
4118 | if (RDW_HARPOON((port+hp_intstat)) & RESET) { | 4117 | if (RDW_HARPOON((port+hp_intstat)) & RESET) { |
@@ -4124,7 +4123,7 @@ static void FPT_schkdd(ULONG port, UCHAR p_card) | |||
4124 | 4123 | ||
4125 | sPhase = RD_HARPOON(port+hp_scsisig) & (SCSI_BSY | S_SCSI_PHZ); | 4124 | sPhase = RD_HARPOON(port+hp_scsisig) & (SCSI_BSY | S_SCSI_PHZ); |
4126 | if ((!(RD_HARPOON(port+hp_xferstat) & FIFO_EMPTY)) || | 4125 | if ((!(RD_HARPOON(port+hp_xferstat) & FIFO_EMPTY)) || |
4127 | (RD_HARPOON(port+hp_offsetctr) & (UCHAR)0x1F) || | 4126 | (RD_HARPOON(port+hp_offsetctr) & (unsigned char)0x1F) || |
4128 | (sPhase == (SCSI_BSY | S_DATAO_PH)) || | 4127 | (sPhase == (SCSI_BSY | S_DATAO_PH)) || |
4129 | (sPhase == (SCSI_BSY | S_DATAI_PH))) | 4128 | (sPhase == (SCSI_BSY | S_DATAI_PH))) |
4130 | { | 4129 | { |
@@ -4168,7 +4167,7 @@ static void FPT_schkdd(ULONG port, UCHAR p_card) | |||
4168 | * | 4167 | * |
4169 | *---------------------------------------------------------------------*/ | 4168 | *---------------------------------------------------------------------*/ |
4170 | 4169 | ||
4171 | static void FPT_sinits(PSCCB p_sccb, UCHAR p_card) | 4170 | static void FPT_sinits(PSCCB p_sccb, unsigned char p_card) |
4172 | { | 4171 | { |
4173 | PSCCBMgr_tar_info currTar_Info; | 4172 | PSCCBMgr_tar_info currTar_Info; |
4174 | 4173 | ||
@@ -4213,12 +4212,12 @@ static void FPT_sinits(PSCCB p_sccb, UCHAR p_card) | |||
4213 | */ | 4212 | */ |
4214 | if ((currTar_Info->TarStatus & TAR_ALLOW_DISC) || | 4213 | if ((currTar_Info->TarStatus & TAR_ALLOW_DISC) || |
4215 | (currTar_Info->TarStatus & TAG_Q_TRYING)) { | 4214 | (currTar_Info->TarStatus & TAG_Q_TRYING)) { |
4216 | p_sccb->Sccb_idmsg = (UCHAR)(SMIDENT | DISC_PRIV) | p_sccb->Lun; | 4215 | p_sccb->Sccb_idmsg = (unsigned char)(SMIDENT | DISC_PRIV) | p_sccb->Lun; |
4217 | } | 4216 | } |
4218 | 4217 | ||
4219 | else { | 4218 | else { |
4220 | 4219 | ||
4221 | p_sccb->Sccb_idmsg = (UCHAR)SMIDENT | p_sccb->Lun; | 4220 | p_sccb->Sccb_idmsg = (unsigned char)SMIDENT | p_sccb->Lun; |
4222 | } | 4221 | } |
4223 | 4222 | ||
4224 | p_sccb->HostStatus = 0x00; | 4223 | p_sccb->HostStatus = 0x00; |
@@ -4248,15 +4247,15 @@ static void FPT_sinits(PSCCB p_sccb, UCHAR p_card) | |||
4248 | * | 4247 | * |
4249 | *---------------------------------------------------------------------*/ | 4248 | *---------------------------------------------------------------------*/ |
4250 | 4249 | ||
4251 | static void FPT_phaseDecode(ULONG p_port, UCHAR p_card) | 4250 | static void FPT_phaseDecode(ULONG p_port, unsigned char p_card) |
4252 | { | 4251 | { |
4253 | unsigned char phase_ref; | 4252 | unsigned char phase_ref; |
4254 | void (*phase) (ULONG, UCHAR); | 4253 | void (*phase) (ULONG, unsigned char); |
4255 | 4254 | ||
4256 | 4255 | ||
4257 | DISABLE_AUTO(p_port); | 4256 | DISABLE_AUTO(p_port); |
4258 | 4257 | ||
4259 | phase_ref = (UCHAR) (RD_HARPOON(p_port+hp_scsisig) & S_SCSI_PHZ); | 4258 | phase_ref = (unsigned char) (RD_HARPOON(p_port+hp_scsisig) & S_SCSI_PHZ); |
4260 | 4259 | ||
4261 | phase = FPT_s_PhaseTbl[phase_ref]; | 4260 | phase = FPT_s_PhaseTbl[phase_ref]; |
4262 | 4261 | ||
@@ -4273,7 +4272,7 @@ static void FPT_phaseDecode(ULONG p_port, UCHAR p_card) | |||
4273 | * | 4272 | * |
4274 | *---------------------------------------------------------------------*/ | 4273 | *---------------------------------------------------------------------*/ |
4275 | 4274 | ||
4276 | static void FPT_phaseDataOut(ULONG port, UCHAR p_card) | 4275 | static void FPT_phaseDataOut(ULONG port, unsigned char p_card) |
4277 | { | 4276 | { |
4278 | 4277 | ||
4279 | PSCCB currSCCB; | 4278 | PSCCB currSCCB; |
@@ -4317,7 +4316,7 @@ static void FPT_phaseDataOut(ULONG port, UCHAR p_card) | |||
4317 | * | 4316 | * |
4318 | *---------------------------------------------------------------------*/ | 4317 | *---------------------------------------------------------------------*/ |
4319 | 4318 | ||
4320 | static void FPT_phaseDataIn(ULONG port, UCHAR p_card) | 4319 | static void FPT_phaseDataIn(ULONG port, unsigned char p_card) |
4321 | { | 4320 | { |
4322 | 4321 | ||
4323 | PSCCB currSCCB; | 4322 | PSCCB currSCCB; |
@@ -4364,11 +4363,11 @@ static void FPT_phaseDataIn(ULONG port, UCHAR p_card) | |||
4364 | * | 4363 | * |
4365 | *---------------------------------------------------------------------*/ | 4364 | *---------------------------------------------------------------------*/ |
4366 | 4365 | ||
4367 | static void FPT_phaseCommand(ULONG p_port, UCHAR p_card) | 4366 | static void FPT_phaseCommand(ULONG p_port, unsigned char p_card) |
4368 | { | 4367 | { |
4369 | PSCCB currSCCB; | 4368 | PSCCB currSCCB; |
4370 | ULONG cdb_reg; | 4369 | ULONG cdb_reg; |
4371 | UCHAR i; | 4370 | unsigned char i; |
4372 | 4371 | ||
4373 | currSCCB = FPT_BL_Card[p_card].currentSCCB; | 4372 | currSCCB = FPT_BL_Card[p_card].currentSCCB; |
4374 | 4373 | ||
@@ -4416,7 +4415,7 @@ static void FPT_phaseCommand(ULONG p_port, UCHAR p_card) | |||
4416 | * | 4415 | * |
4417 | *---------------------------------------------------------------------*/ | 4416 | *---------------------------------------------------------------------*/ |
4418 | 4417 | ||
4419 | static void FPT_phaseStatus(ULONG port, UCHAR p_card) | 4418 | static void FPT_phaseStatus(ULONG port, unsigned char p_card) |
4420 | { | 4419 | { |
4421 | /* Start-up the automation to finish off this command and let the | 4420 | /* Start-up the automation to finish off this command and let the |
4422 | isr handle the interrupt for command complete when it comes in. | 4421 | isr handle the interrupt for command complete when it comes in. |
@@ -4438,9 +4437,9 @@ static void FPT_phaseStatus(ULONG port, UCHAR p_card) | |||
4438 | * | 4437 | * |
4439 | *---------------------------------------------------------------------*/ | 4438 | *---------------------------------------------------------------------*/ |
4440 | 4439 | ||
4441 | static void FPT_phaseMsgOut(ULONG port, UCHAR p_card) | 4440 | static void FPT_phaseMsgOut(ULONG port, unsigned char p_card) |
4442 | { | 4441 | { |
4443 | UCHAR message,scsiID; | 4442 | unsigned char message,scsiID; |
4444 | PSCCB currSCCB; | 4443 | PSCCB currSCCB; |
4445 | PSCCBMgr_tar_info currTar_Info; | 4444 | PSCCBMgr_tar_info currTar_Info; |
4446 | 4445 | ||
@@ -4586,9 +4585,9 @@ static void FPT_phaseMsgOut(ULONG port, UCHAR p_card) | |||
4586 | * | 4585 | * |
4587 | *---------------------------------------------------------------------*/ | 4586 | *---------------------------------------------------------------------*/ |
4588 | 4587 | ||
4589 | static void FPT_phaseMsgIn(ULONG port, UCHAR p_card) | 4588 | static void FPT_phaseMsgIn(ULONG port, unsigned char p_card) |
4590 | { | 4589 | { |
4591 | UCHAR message; | 4590 | unsigned char message; |
4592 | PSCCB currSCCB; | 4591 | PSCCB currSCCB; |
4593 | 4592 | ||
4594 | currSCCB = FPT_BL_Card[p_card].currentSCCB; | 4593 | currSCCB = FPT_BL_Card[p_card].currentSCCB; |
@@ -4639,7 +4638,7 @@ static void FPT_phaseMsgIn(ULONG port, UCHAR p_card) | |||
4639 | * | 4638 | * |
4640 | *---------------------------------------------------------------------*/ | 4639 | *---------------------------------------------------------------------*/ |
4641 | 4640 | ||
4642 | static void FPT_phaseIllegal(ULONG port, UCHAR p_card) | 4641 | static void FPT_phaseIllegal(ULONG port, unsigned char p_card) |
4643 | { | 4642 | { |
4644 | PSCCB currSCCB; | 4643 | PSCCB currSCCB; |
4645 | 4644 | ||
@@ -4667,7 +4666,7 @@ static void FPT_phaseIllegal(ULONG port, UCHAR p_card) | |||
4667 | * | 4666 | * |
4668 | *---------------------------------------------------------------------*/ | 4667 | *---------------------------------------------------------------------*/ |
4669 | 4668 | ||
4670 | static void FPT_phaseChkFifo(ULONG port, UCHAR p_card) | 4669 | static void FPT_phaseChkFifo(ULONG port, unsigned char p_card) |
4671 | { | 4670 | { |
4672 | ULONG xfercnt; | 4671 | ULONG xfercnt; |
4673 | PSCCB currSCCB; | 4672 | PSCCB currSCCB; |
@@ -4745,7 +4744,7 @@ static void FPT_phaseChkFifo(ULONG port, UCHAR p_card) | |||
4745 | * because of command complete or from a disconnect. | 4744 | * because of command complete or from a disconnect. |
4746 | * | 4745 | * |
4747 | *---------------------------------------------------------------------*/ | 4746 | *---------------------------------------------------------------------*/ |
4748 | static void FPT_phaseBusFree(ULONG port, UCHAR p_card) | 4747 | static void FPT_phaseBusFree(ULONG port, unsigned char p_card) |
4749 | { | 4748 | { |
4750 | PSCCB currSCCB; | 4749 | PSCCB currSCCB; |
4751 | 4750 | ||
@@ -4775,7 +4774,7 @@ static void FPT_phaseBusFree(ULONG port, UCHAR p_card) | |||
4775 | else if(currSCCB->Sccb_scsistat == SELECT_SN_ST) | 4774 | else if(currSCCB->Sccb_scsistat == SELECT_SN_ST) |
4776 | { | 4775 | { |
4777 | FPT_sccbMgrTbl[p_card][currSCCB->TargID].TarStatus |= | 4776 | FPT_sccbMgrTbl[p_card][currSCCB->TargID].TarStatus |= |
4778 | (UCHAR)SYNC_SUPPORTED; | 4777 | (unsigned char)SYNC_SUPPORTED; |
4779 | FPT_sccbMgrTbl[p_card][currSCCB->TargID].TarEEValue &= ~EE_SYNC_MASK; | 4778 | FPT_sccbMgrTbl[p_card][currSCCB->TargID].TarEEValue &= ~EE_SYNC_MASK; |
4780 | } | 4779 | } |
4781 | 4780 | ||
@@ -4951,10 +4950,10 @@ static void FPT_autoLoadDefaultMap(ULONG p_port) | |||
4951 | * | 4950 | * |
4952 | *---------------------------------------------------------------------*/ | 4951 | *---------------------------------------------------------------------*/ |
4953 | 4952 | ||
4954 | static void FPT_autoCmdCmplt(ULONG p_port, UCHAR p_card) | 4953 | static void FPT_autoCmdCmplt(ULONG p_port, unsigned char p_card) |
4955 | { | 4954 | { |
4956 | PSCCB currSCCB; | 4955 | PSCCB currSCCB; |
4957 | UCHAR status_byte; | 4956 | unsigned char status_byte; |
4958 | 4957 | ||
4959 | currSCCB = FPT_BL_Card[p_card].currentSCCB; | 4958 | currSCCB = FPT_BL_Card[p_card].currentSCCB; |
4960 | 4959 | ||
@@ -5001,7 +5000,7 @@ static void FPT_autoCmdCmplt(ULONG p_port, UCHAR p_card) | |||
5001 | if(currSCCB->Sccb_scsistat == SELECT_SN_ST) | 5000 | if(currSCCB->Sccb_scsistat == SELECT_SN_ST) |
5002 | { | 5001 | { |
5003 | FPT_sccbMgrTbl[p_card][currSCCB->TargID].TarStatus |= | 5002 | FPT_sccbMgrTbl[p_card][currSCCB->TargID].TarStatus |= |
5004 | (UCHAR)SYNC_SUPPORTED; | 5003 | (unsigned char)SYNC_SUPPORTED; |
5005 | 5004 | ||
5006 | FPT_sccbMgrTbl[p_card][currSCCB->TargID].TarEEValue &= ~EE_SYNC_MASK; | 5005 | FPT_sccbMgrTbl[p_card][currSCCB->TargID].TarEEValue &= ~EE_SYNC_MASK; |
5007 | FPT_BL_Card[p_card].globalFlags |= F_NEW_SCCB_CMD; | 5006 | FPT_BL_Card[p_card].globalFlags |= F_NEW_SCCB_CMD; |
@@ -5177,7 +5176,7 @@ static void FPT_dataXferProcessor(ULONG port, PSCCBcard pCurrCard) | |||
5177 | if (pCurrCard->globalFlags & F_HOST_XFER_ACT) | 5176 | if (pCurrCard->globalFlags & F_HOST_XFER_ACT) |
5178 | 5177 | ||
5179 | { | 5178 | { |
5180 | currSCCB->Sccb_sgseg += (UCHAR)SG_BUF_CNT; | 5179 | currSCCB->Sccb_sgseg += (unsigned char)SG_BUF_CNT; |
5181 | currSCCB->Sccb_SGoffset = 0x00; | 5180 | currSCCB->Sccb_SGoffset = 0x00; |
5182 | } | 5181 | } |
5183 | pCurrCard->globalFlags |= F_HOST_XFER_ACT; | 5182 | pCurrCard->globalFlags |= F_HOST_XFER_ACT; |
@@ -5208,7 +5207,7 @@ static void FPT_busMstrSGDataXferStart(ULONG p_port, PSCCB pcurrSCCB) | |||
5208 | { | 5207 | { |
5209 | ULONG count,addr,tmpSGCnt; | 5208 | ULONG count,addr,tmpSGCnt; |
5210 | UINT sg_index; | 5209 | UINT sg_index; |
5211 | UCHAR sg_count, i; | 5210 | unsigned char sg_count, i; |
5212 | ULONG reg_offset; | 5211 | ULONG reg_offset; |
5213 | 5212 | ||
5214 | 5213 | ||
@@ -5227,12 +5226,12 @@ static void FPT_busMstrSGDataXferStart(ULONG p_port, PSCCB pcurrSCCB) | |||
5227 | reg_offset = hp_aramBase; | 5226 | reg_offset = hp_aramBase; |
5228 | 5227 | ||
5229 | 5228 | ||
5230 | i = (UCHAR) (RD_HARPOON(p_port+hp_page_ctrl) & ~(SGRAM_ARAM|SCATTER_EN)); | 5229 | i = (unsigned char) (RD_HARPOON(p_port+hp_page_ctrl) & ~(SGRAM_ARAM|SCATTER_EN)); |
5231 | 5230 | ||
5232 | 5231 | ||
5233 | WR_HARPOON(p_port+hp_page_ctrl, i); | 5232 | WR_HARPOON(p_port+hp_page_ctrl, i); |
5234 | 5233 | ||
5235 | while ((sg_count < (UCHAR)SG_BUF_CNT) && | 5234 | while ((sg_count < (unsigned char)SG_BUF_CNT) && |
5236 | ((ULONG)(sg_index * (UINT)SG_ELEMENT_SIZE) < pcurrSCCB->DataLength) ) { | 5235 | ((ULONG)(sg_index * (UINT)SG_ELEMENT_SIZE) < pcurrSCCB->DataLength) ) { |
5237 | 5236 | ||
5238 | tmpSGCnt += *(((ULONG *)pcurrSCCB->DataPointer)+ | 5237 | tmpSGCnt += *(((ULONG *)pcurrSCCB->DataPointer)+ |
@@ -5297,7 +5296,7 @@ static void FPT_busMstrSGDataXferStart(ULONG p_port, PSCCB pcurrSCCB) | |||
5297 | } | 5296 | } |
5298 | 5297 | ||
5299 | 5298 | ||
5300 | WR_HARPOON(p_port+hp_page_ctrl, (UCHAR) (i | SCATTER_EN)); | 5299 | WR_HARPOON(p_port+hp_page_ctrl, (unsigned char) (i | SCATTER_EN)); |
5301 | 5300 | ||
5302 | } | 5301 | } |
5303 | 5302 | ||
@@ -5362,7 +5361,7 @@ static void FPT_busMstrDataXferStart(ULONG p_port, PSCCB pcurrSCCB) | |||
5362 | * command busy is also time out, it'll just give up. | 5361 | * command busy is also time out, it'll just give up. |
5363 | * | 5362 | * |
5364 | *---------------------------------------------------------------------*/ | 5363 | *---------------------------------------------------------------------*/ |
5365 | static UCHAR FPT_busMstrTimeOut(ULONG p_port) | 5364 | static unsigned char FPT_busMstrTimeOut(ULONG p_port) |
5366 | { | 5365 | { |
5367 | ULONG timeout; | 5366 | ULONG timeout; |
5368 | 5367 | ||
@@ -5400,7 +5399,7 @@ static UCHAR FPT_busMstrTimeOut(ULONG p_port) | |||
5400 | * Description: Abort any in progress transfer. | 5399 | * Description: Abort any in progress transfer. |
5401 | * | 5400 | * |
5402 | *---------------------------------------------------------------------*/ | 5401 | *---------------------------------------------------------------------*/ |
5403 | static void FPT_hostDataXferAbort(ULONG port, UCHAR p_card, PSCCB pCurrSCCB) | 5402 | static void FPT_hostDataXferAbort(ULONG port, unsigned char p_card, PSCCB pCurrSCCB) |
5404 | { | 5403 | { |
5405 | 5404 | ||
5406 | ULONG timeout; | 5405 | ULONG timeout; |
@@ -5707,13 +5706,13 @@ static void FPT_hostDataXferRestart(PSCCB currSCCB) | |||
5707 | * | 5706 | * |
5708 | *---------------------------------------------------------------------*/ | 5707 | *---------------------------------------------------------------------*/ |
5709 | 5708 | ||
5710 | static void FPT_scini(UCHAR p_card, UCHAR p_our_id, UCHAR p_power_up) | 5709 | static void FPT_scini(unsigned char p_card, unsigned char p_our_id, unsigned char p_power_up) |
5711 | { | 5710 | { |
5712 | 5711 | ||
5713 | UCHAR loser,assigned_id; | 5712 | unsigned char loser,assigned_id; |
5714 | ULONG p_port; | 5713 | ULONG p_port; |
5715 | 5714 | ||
5716 | UCHAR i,k,ScamFlg ; | 5715 | unsigned char i,k,ScamFlg ; |
5717 | PSCCBcard currCard; | 5716 | PSCCBcard currCard; |
5718 | PNVRamInfo pCurrNvRam; | 5717 | PNVRamInfo pCurrNvRam; |
5719 | 5718 | ||
@@ -5727,8 +5726,8 @@ static void FPT_scini(UCHAR p_card, UCHAR p_our_id, UCHAR p_power_up) | |||
5727 | i = pCurrNvRam->niSysConf; | 5726 | i = pCurrNvRam->niSysConf; |
5728 | } | 5727 | } |
5729 | else{ | 5728 | else{ |
5730 | ScamFlg = (UCHAR) FPT_utilEERead(p_port, SCAM_CONFIG/2); | 5729 | ScamFlg = (unsigned char) FPT_utilEERead(p_port, SCAM_CONFIG/2); |
5731 | i = (UCHAR)(FPT_utilEERead(p_port, (SYSTEM_CONFIG/2))); | 5730 | i = (unsigned char)(FPT_utilEERead(p_port, (SYSTEM_CONFIG/2))); |
5732 | } | 5731 | } |
5733 | if(!(i & 0x02)) /* check if reset bus in AutoSCSI parameter set */ | 5732 | if(!(i & 0x02)) /* check if reset bus in AutoSCSI parameter set */ |
5734 | return; | 5733 | return; |
@@ -5846,7 +5845,7 @@ static void FPT_scini(UCHAR p_card, UCHAR p_our_id, UCHAR p_power_up) | |||
5846 | if (FPT_scvalq(k)) | 5845 | if (FPT_scvalq(k)) |
5847 | { | 5846 | { |
5848 | currCard->ourId = | 5847 | currCard->ourId = |
5849 | ((UCHAR)(i<<3)+(k & (UCHAR)7)) & (UCHAR) 0x3F; | 5848 | ((unsigned char)(i<<3)+(k & (unsigned char)7)) & (unsigned char) 0x3F; |
5850 | FPT_inisci(p_card, p_port, p_our_id); | 5849 | FPT_inisci(p_card, p_port, p_our_id); |
5851 | FPT_scamInfo[currCard->ourId].state = ID_ASSIGNED; | 5850 | FPT_scamInfo[currCard->ourId].state = ID_ASSIGNED; |
5852 | FPT_scamInfo[currCard->ourId].id_string[0] | 5851 | FPT_scamInfo[currCard->ourId].id_string[0] |
@@ -5903,7 +5902,7 @@ static void FPT_scini(UCHAR p_card, UCHAR p_our_id, UCHAR p_power_up) | |||
5903 | * | 5902 | * |
5904 | *---------------------------------------------------------------------*/ | 5903 | *---------------------------------------------------------------------*/ |
5905 | 5904 | ||
5906 | static int FPT_scarb(ULONG p_port, UCHAR p_sel_type) | 5905 | static int FPT_scarb(ULONG p_port, unsigned char p_sel_type) |
5907 | { | 5906 | { |
5908 | if (p_sel_type == INIT_SELTD) | 5907 | if (p_sel_type == INIT_SELTD) |
5909 | { | 5908 | { |
@@ -6000,12 +5999,12 @@ static void FPT_scbusf(ULONG p_port) | |||
6000 | * | 5999 | * |
6001 | *---------------------------------------------------------------------*/ | 6000 | *---------------------------------------------------------------------*/ |
6002 | 6001 | ||
6003 | static void FPT_scasid(UCHAR p_card, ULONG p_port) | 6002 | static void FPT_scasid(unsigned char p_card, ULONG p_port) |
6004 | { | 6003 | { |
6005 | UCHAR temp_id_string[ID_STRING_LENGTH]; | 6004 | unsigned char temp_id_string[ID_STRING_LENGTH]; |
6006 | 6005 | ||
6007 | UCHAR i,k,scam_id; | 6006 | unsigned char i,k,scam_id; |
6008 | UCHAR crcBytes[3]; | 6007 | unsigned char crcBytes[3]; |
6009 | PNVRamInfo pCurrNvRam; | 6008 | PNVRamInfo pCurrNvRam; |
6010 | ushort_ptr pCrcBytes; | 6009 | ushort_ptr pCrcBytes; |
6011 | 6010 | ||
@@ -6018,7 +6017,7 @@ static void FPT_scasid(UCHAR p_card, ULONG p_port) | |||
6018 | 6017 | ||
6019 | for (k=0; k < ID_STRING_LENGTH; k++) | 6018 | for (k=0; k < ID_STRING_LENGTH; k++) |
6020 | { | 6019 | { |
6021 | temp_id_string[k] = (UCHAR) 0x00; | 6020 | temp_id_string[k] = (unsigned char) 0x00; |
6022 | } | 6021 | } |
6023 | 6022 | ||
6024 | FPT_scxferc(p_port,SYNC_PTRN); | 6023 | FPT_scxferc(p_port,SYNC_PTRN); |
@@ -6034,7 +6033,7 @@ static void FPT_scasid(UCHAR p_card, ULONG p_port) | |||
6034 | temp_id_string[2] = crcBytes[0]; | 6033 | temp_id_string[2] = crcBytes[0]; |
6035 | temp_id_string[3] = crcBytes[1]; | 6034 | temp_id_string[3] = crcBytes[1]; |
6036 | for(k = 4; k < ID_STRING_LENGTH; k++) | 6035 | for(k = 4; k < ID_STRING_LENGTH; k++) |
6037 | temp_id_string[k] = (UCHAR) 0x00; | 6036 | temp_id_string[k] = (unsigned char) 0x00; |
6038 | } | 6037 | } |
6039 | i = FPT_scmachid(p_card,temp_id_string); | 6038 | i = FPT_scmachid(p_card,temp_id_string); |
6040 | 6039 | ||
@@ -6052,7 +6051,7 @@ static void FPT_scasid(UCHAR p_card, ULONG p_port) | |||
6052 | else | 6051 | else |
6053 | FPT_scxferc(p_port,ID_8_F); | 6052 | FPT_scxferc(p_port,ID_8_F); |
6054 | 6053 | ||
6055 | scam_id = (i & (UCHAR) 0x07); | 6054 | scam_id = (i & (unsigned char) 0x07); |
6056 | 6055 | ||
6057 | 6056 | ||
6058 | for (k=1; k < 0x08; k <<= 1) | 6057 | for (k=1; k < 0x08; k <<= 1) |
@@ -6098,15 +6097,15 @@ static void FPT_scsel(ULONG p_port) | |||
6098 | 6097 | ||
6099 | 6098 | ||
6100 | WR_HARPOON(p_port+hp_scsisig, (SCSI_SEL | SCSI_BSY | SCSI_IOBIT | SCSI_CD)); | 6099 | WR_HARPOON(p_port+hp_scsisig, (SCSI_SEL | SCSI_BSY | SCSI_IOBIT | SCSI_CD)); |
6101 | WR_HARPOON(p_port+hp_scsidata_0, (UCHAR)(RD_HARPOON(p_port+hp_scsidata_0) | | 6100 | WR_HARPOON(p_port+hp_scsidata_0, (unsigned char)(RD_HARPOON(p_port+hp_scsidata_0) | |
6102 | (UCHAR)(BIT(7)+BIT(6)))); | 6101 | (unsigned char)(BIT(7)+BIT(6)))); |
6103 | 6102 | ||
6104 | 6103 | ||
6105 | WR_HARPOON(p_port+hp_scsisig, (SCSI_BSY | SCSI_IOBIT | SCSI_CD)); | 6104 | WR_HARPOON(p_port+hp_scsisig, (SCSI_BSY | SCSI_IOBIT | SCSI_CD)); |
6106 | FPT_scwiros(p_port, SCSI_SEL); | 6105 | FPT_scwiros(p_port, SCSI_SEL); |
6107 | 6106 | ||
6108 | WR_HARPOON(p_port+hp_scsidata_0, (UCHAR)(RD_HARPOON(p_port+hp_scsidata_0) & | 6107 | WR_HARPOON(p_port+hp_scsidata_0, (unsigned char)(RD_HARPOON(p_port+hp_scsidata_0) & |
6109 | ~(UCHAR)BIT(6))); | 6108 | ~(unsigned char)BIT(6))); |
6110 | FPT_scwirod(p_port, BIT(6)); | 6109 | FPT_scwirod(p_port, BIT(6)); |
6111 | 6110 | ||
6112 | WR_HARPOON(p_port+hp_scsisig, (SCSI_SEL | SCSI_BSY | SCSI_IOBIT | SCSI_CD)); | 6111 | WR_HARPOON(p_port+hp_scsisig, (SCSI_SEL | SCSI_BSY | SCSI_IOBIT | SCSI_CD)); |
@@ -6122,9 +6121,9 @@ static void FPT_scsel(ULONG p_port) | |||
6122 | * | 6121 | * |
6123 | *---------------------------------------------------------------------*/ | 6122 | *---------------------------------------------------------------------*/ |
6124 | 6123 | ||
6125 | static UCHAR FPT_scxferc(ULONG p_port, UCHAR p_data) | 6124 | static unsigned char FPT_scxferc(ULONG p_port, unsigned char p_data) |
6126 | { | 6125 | { |
6127 | UCHAR curr_data, ret_data; | 6126 | unsigned char curr_data, ret_data; |
6128 | 6127 | ||
6129 | curr_data = p_data | BIT(7) | BIT(5); /*Start with DB7 & DB5 asserted. */ | 6128 | curr_data = p_data | BIT(7) | BIT(5); /*Start with DB7 & DB5 asserted. */ |
6130 | 6129 | ||
@@ -6137,7 +6136,7 @@ static UCHAR FPT_scxferc(ULONG p_port, UCHAR p_data) | |||
6137 | FPT_scwirod(p_port,BIT(7)); /*Wait for DB7 to be released. */ | 6136 | FPT_scwirod(p_port,BIT(7)); /*Wait for DB7 to be released. */ |
6138 | while (!(RD_HARPOON(p_port+hp_scsidata_0) & BIT(5))); | 6137 | while (!(RD_HARPOON(p_port+hp_scsidata_0) & BIT(5))); |
6139 | 6138 | ||
6140 | ret_data = (RD_HARPOON(p_port+hp_scsidata_0) & (UCHAR) 0x1F); | 6139 | ret_data = (RD_HARPOON(p_port+hp_scsidata_0) & (unsigned char) 0x1F); |
6141 | 6140 | ||
6142 | curr_data |= BIT(6); | 6141 | curr_data |= BIT(6); |
6143 | 6142 | ||
@@ -6173,9 +6172,9 @@ static UCHAR FPT_scxferc(ULONG p_port, UCHAR p_data) | |||
6173 | * | 6172 | * |
6174 | *---------------------------------------------------------------------*/ | 6173 | *---------------------------------------------------------------------*/ |
6175 | 6174 | ||
6176 | static UCHAR FPT_scsendi(ULONG p_port, UCHAR p_id_string[]) | 6175 | static unsigned char FPT_scsendi(ULONG p_port, unsigned char p_id_string[]) |
6177 | { | 6176 | { |
6178 | UCHAR ret_data,byte_cnt,bit_cnt,defer; | 6177 | unsigned char ret_data,byte_cnt,bit_cnt,defer; |
6179 | 6178 | ||
6180 | defer = 0; | 6179 | defer = 0; |
6181 | 6180 | ||
@@ -6226,9 +6225,9 @@ static UCHAR FPT_scsendi(ULONG p_port, UCHAR p_id_string[]) | |||
6226 | * | 6225 | * |
6227 | *---------------------------------------------------------------------*/ | 6226 | *---------------------------------------------------------------------*/ |
6228 | 6227 | ||
6229 | static UCHAR FPT_sciso(ULONG p_port, UCHAR p_id_string[]) | 6228 | static unsigned char FPT_sciso(ULONG p_port, unsigned char p_id_string[]) |
6230 | { | 6229 | { |
6231 | UCHAR ret_data,the_data,byte_cnt,bit_cnt; | 6230 | unsigned char ret_data,the_data,byte_cnt,bit_cnt; |
6232 | 6231 | ||
6233 | the_data = 0; | 6232 | the_data = 0; |
6234 | 6233 | ||
@@ -6287,9 +6286,9 @@ static UCHAR FPT_sciso(ULONG p_port, UCHAR p_id_string[]) | |||
6287 | * | 6286 | * |
6288 | *---------------------------------------------------------------------*/ | 6287 | *---------------------------------------------------------------------*/ |
6289 | 6288 | ||
6290 | static void FPT_scwirod(ULONG p_port, UCHAR p_data_bit) | 6289 | static void FPT_scwirod(ULONG p_port, unsigned char p_data_bit) |
6291 | { | 6290 | { |
6292 | UCHAR i; | 6291 | unsigned char i; |
6293 | 6292 | ||
6294 | i = 0; | 6293 | i = 0; |
6295 | while ( i < MAX_SCSI_TAR ) { | 6294 | while ( i < MAX_SCSI_TAR ) { |
@@ -6316,9 +6315,9 @@ static void FPT_scwirod(ULONG p_port, UCHAR p_data_bit) | |||
6316 | * | 6315 | * |
6317 | *---------------------------------------------------------------------*/ | 6316 | *---------------------------------------------------------------------*/ |
6318 | 6317 | ||
6319 | static void FPT_scwiros(ULONG p_port, UCHAR p_data_bit) | 6318 | static void FPT_scwiros(ULONG p_port, unsigned char p_data_bit) |
6320 | { | 6319 | { |
6321 | UCHAR i; | 6320 | unsigned char i; |
6322 | 6321 | ||
6323 | i = 0; | 6322 | i = 0; |
6324 | while ( i < MAX_SCSI_TAR ) { | 6323 | while ( i < MAX_SCSI_TAR ) { |
@@ -6343,9 +6342,9 @@ static void FPT_scwiros(ULONG p_port, UCHAR p_data_bit) | |||
6343 | * | 6342 | * |
6344 | *---------------------------------------------------------------------*/ | 6343 | *---------------------------------------------------------------------*/ |
6345 | 6344 | ||
6346 | static UCHAR FPT_scvalq(UCHAR p_quintet) | 6345 | static unsigned char FPT_scvalq(unsigned char p_quintet) |
6347 | { | 6346 | { |
6348 | UCHAR count; | 6347 | unsigned char count; |
6349 | 6348 | ||
6350 | for (count=1; count < 0x08; count<<=1) { | 6349 | for (count=1; count < 0x08; count<<=1) { |
6351 | if (!(p_quintet & count)) | 6350 | if (!(p_quintet & count)) |
@@ -6370,7 +6369,7 @@ static UCHAR FPT_scvalq(UCHAR p_quintet) | |||
6370 | * | 6369 | * |
6371 | *---------------------------------------------------------------------*/ | 6370 | *---------------------------------------------------------------------*/ |
6372 | 6371 | ||
6373 | static UCHAR FPT_scsell(ULONG p_port, UCHAR targ_id) | 6372 | static unsigned char FPT_scsell(ULONG p_port, unsigned char targ_id) |
6374 | { | 6373 | { |
6375 | ULONG i; | 6374 | ULONG i; |
6376 | 6375 | ||
@@ -6463,9 +6462,9 @@ static void FPT_scwtsel(ULONG p_port) | |||
6463 | * | 6462 | * |
6464 | *---------------------------------------------------------------------*/ | 6463 | *---------------------------------------------------------------------*/ |
6465 | 6464 | ||
6466 | static void FPT_inisci(UCHAR p_card, ULONG p_port, UCHAR p_our_id) | 6465 | static void FPT_inisci(unsigned char p_card, ULONG p_port, unsigned char p_our_id) |
6467 | { | 6466 | { |
6468 | UCHAR i,k,max_id; | 6467 | unsigned char i,k,max_id; |
6469 | USHORT ee_data; | 6468 | USHORT ee_data; |
6470 | PNVRamInfo pCurrNvRam; | 6469 | PNVRamInfo pCurrNvRam; |
6471 | 6470 | ||
@@ -6483,7 +6482,7 @@ static void FPT_inisci(UCHAR p_card, ULONG p_port, UCHAR p_our_id) | |||
6483 | for(k = 0; k < 4; k++) | 6482 | for(k = 0; k < 4; k++) |
6484 | FPT_scamInfo[i].id_string[k] = pCurrNvRam->niScamTbl[i][k]; | 6483 | FPT_scamInfo[i].id_string[k] = pCurrNvRam->niScamTbl[i][k]; |
6485 | for(k = 4; k < ID_STRING_LENGTH; k++) | 6484 | for(k = 4; k < ID_STRING_LENGTH; k++) |
6486 | FPT_scamInfo[i].id_string[k] = (UCHAR) 0x00; | 6485 | FPT_scamInfo[i].id_string[k] = (unsigned char) 0x00; |
6487 | 6486 | ||
6488 | if(FPT_scamInfo[i].id_string[0] == 0x00) | 6487 | if(FPT_scamInfo[i].id_string[0] == 0x00) |
6489 | FPT_scamInfo[i].state = ID_UNUSED; /*Default to unused ID. */ | 6488 | FPT_scamInfo[i].state = ID_UNUSED; /*Default to unused ID. */ |
@@ -6498,9 +6497,9 @@ static void FPT_inisci(UCHAR p_card, ULONG p_port, UCHAR p_our_id) | |||
6498 | { | 6497 | { |
6499 | ee_data = FPT_utilEERead(p_port, (USHORT)((EE_SCAMBASE/2) + | 6498 | ee_data = FPT_utilEERead(p_port, (USHORT)((EE_SCAMBASE/2) + |
6500 | (USHORT) (i*((USHORT)ID_STRING_LENGTH/2)) + (USHORT)(k/2))); | 6499 | (USHORT) (i*((USHORT)ID_STRING_LENGTH/2)) + (USHORT)(k/2))); |
6501 | FPT_scamInfo[i].id_string[k] = (UCHAR) ee_data; | 6500 | FPT_scamInfo[i].id_string[k] = (unsigned char) ee_data; |
6502 | ee_data >>= 8; | 6501 | ee_data >>= 8; |
6503 | FPT_scamInfo[i].id_string[k+1] = (UCHAR) ee_data; | 6502 | FPT_scamInfo[i].id_string[k+1] = (unsigned char) ee_data; |
6504 | } | 6503 | } |
6505 | 6504 | ||
6506 | if ((FPT_scamInfo[i].id_string[0] == 0x00) || | 6505 | if ((FPT_scamInfo[i].id_string[0] == 0x00) || |
@@ -6527,10 +6526,10 @@ static void FPT_inisci(UCHAR p_card, ULONG p_port, UCHAR p_our_id) | |||
6527 | * | 6526 | * |
6528 | *---------------------------------------------------------------------*/ | 6527 | *---------------------------------------------------------------------*/ |
6529 | 6528 | ||
6530 | static UCHAR FPT_scmachid(UCHAR p_card, UCHAR p_id_string[]) | 6529 | static unsigned char FPT_scmachid(unsigned char p_card, unsigned char p_id_string[]) |
6531 | { | 6530 | { |
6532 | 6531 | ||
6533 | UCHAR i,k,match; | 6532 | unsigned char i,k,match; |
6534 | 6533 | ||
6535 | 6534 | ||
6536 | for (i=0; i < MAX_SCSI_TAR; i++) { | 6535 | for (i=0; i < MAX_SCSI_TAR; i++) { |
@@ -6559,7 +6558,7 @@ static UCHAR FPT_scmachid(UCHAR p_card, UCHAR p_id_string[]) | |||
6559 | i = MAX_SCSI_TAR; | 6558 | i = MAX_SCSI_TAR; |
6560 | 6559 | ||
6561 | if (((p_id_string[0] & 0x06) == 0x02) || ((p_id_string[0] & 0x06) == 0x04)) | 6560 | if (((p_id_string[0] & 0x06) == 0x02) || ((p_id_string[0] & 0x06) == 0x04)) |
6562 | match = p_id_string[1] & (UCHAR) 0x1F; | 6561 | match = p_id_string[1] & (unsigned char) 0x1F; |
6563 | else | 6562 | else |
6564 | match = 7; | 6563 | match = 7; |
6565 | 6564 | ||
@@ -6608,7 +6607,7 @@ static UCHAR FPT_scmachid(UCHAR p_card, UCHAR p_id_string[]) | |||
6608 | i = MAX_SCSI_TAR; | 6607 | i = MAX_SCSI_TAR; |
6609 | 6608 | ||
6610 | if (((p_id_string[0] & 0x06) == 0x02) || ((p_id_string[0] & 0x06) == 0x04)) | 6609 | if (((p_id_string[0] & 0x06) == 0x02) || ((p_id_string[0] & 0x06) == 0x04)) |
6611 | match = p_id_string[1] & (UCHAR) 0x1F; | 6610 | match = p_id_string[1] & (unsigned char) 0x1F; |
6612 | else | 6611 | else |
6613 | match = 7; | 6612 | match = 7; |
6614 | 6613 | ||
@@ -6656,9 +6655,9 @@ static UCHAR FPT_scmachid(UCHAR p_card, UCHAR p_id_string[]) | |||
6656 | * | 6655 | * |
6657 | *---------------------------------------------------------------------*/ | 6656 | *---------------------------------------------------------------------*/ |
6658 | 6657 | ||
6659 | static void FPT_scsavdi(UCHAR p_card, ULONG p_port) | 6658 | static void FPT_scsavdi(unsigned char p_card, ULONG p_port) |
6660 | { | 6659 | { |
6661 | UCHAR i,k,max_id; | 6660 | unsigned char i,k,max_id; |
6662 | USHORT ee_data,sum_data; | 6661 | USHORT ee_data,sum_data; |
6663 | 6662 | ||
6664 | 6663 | ||
@@ -6705,12 +6704,12 @@ static void FPT_scsavdi(UCHAR p_card, ULONG p_port) | |||
6705 | * | 6704 | * |
6706 | *---------------------------------------------------------------------*/ | 6705 | *---------------------------------------------------------------------*/ |
6707 | 6706 | ||
6708 | static void FPT_XbowInit(ULONG port, UCHAR ScamFlg) | 6707 | static void FPT_XbowInit(ULONG port, unsigned char ScamFlg) |
6709 | { | 6708 | { |
6710 | UCHAR i; | 6709 | unsigned char i; |
6711 | 6710 | ||
6712 | i = RD_HARPOON(port+hp_page_ctrl); | 6711 | i = RD_HARPOON(port+hp_page_ctrl); |
6713 | WR_HARPOON(port+hp_page_ctrl, (UCHAR) (i | G_INT_DISABLE)); | 6712 | WR_HARPOON(port+hp_page_ctrl, (unsigned char) (i | G_INT_DISABLE)); |
6714 | 6713 | ||
6715 | WR_HARPOON(port+hp_scsireset,0x00); | 6714 | WR_HARPOON(port+hp_scsireset,0x00); |
6716 | WR_HARPOON(port+hp_portctrl_1,HOST_MODE8); | 6715 | WR_HARPOON(port+hp_portctrl_1,HOST_MODE8); |
@@ -6812,7 +6811,7 @@ static void FPT_DiagEEPROM(ULONG p_port) | |||
6812 | } | 6811 | } |
6813 | 6812 | ||
6814 | 6813 | ||
6815 | FPT_utilEEWriteOnOff(p_port,(UCHAR)1); | 6814 | FPT_utilEEWriteOnOff(p_port,(unsigned char)1); |
6816 | 6815 | ||
6817 | for (index = 0; index < max_wd_cnt; index++) { | 6816 | for (index = 0; index < max_wd_cnt; index++) { |
6818 | 6817 | ||
@@ -6933,7 +6932,7 @@ static void FPT_DiagEEPROM(ULONG p_port) | |||
6933 | 6932 | ||
6934 | FPT_utilEEWrite(p_port, temp, EEPROM_CHECK_SUM/2); | 6933 | FPT_utilEEWrite(p_port, temp, EEPROM_CHECK_SUM/2); |
6935 | 6934 | ||
6936 | FPT_utilEEWriteOnOff(p_port,(UCHAR)0); | 6935 | FPT_utilEEWriteOnOff(p_port,(unsigned char)0); |
6937 | 6936 | ||
6938 | } | 6937 | } |
6939 | 6938 | ||
@@ -6946,9 +6945,9 @@ static void FPT_DiagEEPROM(ULONG p_port) | |||
6946 | * | 6945 | * |
6947 | *---------------------------------------------------------------------*/ | 6946 | *---------------------------------------------------------------------*/ |
6948 | 6947 | ||
6949 | static void FPT_queueSearchSelect(PSCCBcard pCurrCard, UCHAR p_card) | 6948 | static void FPT_queueSearchSelect(PSCCBcard pCurrCard, unsigned char p_card) |
6950 | { | 6949 | { |
6951 | UCHAR scan_ptr, lun; | 6950 | unsigned char scan_ptr, lun; |
6952 | PSCCBMgr_tar_info currTar_Info; | 6951 | PSCCBMgr_tar_info currTar_Info; |
6953 | PSCCB pOldSccb; | 6952 | PSCCB pOldSccb; |
6954 | 6953 | ||
@@ -7077,14 +7076,14 @@ static void FPT_queueSearchSelect(PSCCBcard pCurrCard, UCHAR p_card) | |||
7077 | * | 7076 | * |
7078 | *---------------------------------------------------------------------*/ | 7077 | *---------------------------------------------------------------------*/ |
7079 | 7078 | ||
7080 | static void FPT_queueSelectFail(PSCCBcard pCurrCard, UCHAR p_card) | 7079 | static void FPT_queueSelectFail(PSCCBcard pCurrCard, unsigned char p_card) |
7081 | { | 7080 | { |
7082 | UCHAR thisTarg; | 7081 | unsigned char thisTarg; |
7083 | PSCCBMgr_tar_info currTar_Info; | 7082 | PSCCBMgr_tar_info currTar_Info; |
7084 | 7083 | ||
7085 | if (pCurrCard->currentSCCB != NULL) | 7084 | if (pCurrCard->currentSCCB != NULL) |
7086 | { | 7085 | { |
7087 | thisTarg = (UCHAR)(((PSCCB)(pCurrCard->currentSCCB))->TargID); | 7086 | thisTarg = (unsigned char)(((PSCCB)(pCurrCard->currentSCCB))->TargID); |
7088 | currTar_Info = &FPT_sccbMgrTbl[p_card][thisTarg]; | 7087 | currTar_Info = &FPT_sccbMgrTbl[p_card][thisTarg]; |
7089 | 7088 | ||
7090 | pCurrCard->currentSCCB->Sccb_backlink = (PSCCB)NULL; | 7089 | pCurrCard->currentSCCB->Sccb_backlink = (PSCCB)NULL; |
@@ -7117,10 +7116,10 @@ static void FPT_queueSelectFail(PSCCBcard pCurrCard, UCHAR p_card) | |||
7117 | *---------------------------------------------------------------------*/ | 7116 | *---------------------------------------------------------------------*/ |
7118 | 7117 | ||
7119 | static void FPT_queueCmdComplete(PSCCBcard pCurrCard, PSCCB p_sccb, | 7118 | static void FPT_queueCmdComplete(PSCCBcard pCurrCard, PSCCB p_sccb, |
7120 | UCHAR p_card) | 7119 | unsigned char p_card) |
7121 | { | 7120 | { |
7122 | 7121 | ||
7123 | UCHAR i, SCSIcmd; | 7122 | unsigned char i, SCSIcmd; |
7124 | CALL_BK_FN callback; | 7123 | CALL_BK_FN callback; |
7125 | PSCCBMgr_tar_info currTar_Info; | 7124 | PSCCBMgr_tar_info currTar_Info; |
7126 | 7125 | ||
@@ -7218,7 +7217,7 @@ static void FPT_queueCmdComplete(PSCCBcard pCurrCard, PSCCB p_sccb, | |||
7218 | * Description: Add SCCB to our disconnect array. | 7217 | * Description: Add SCCB to our disconnect array. |
7219 | * | 7218 | * |
7220 | *---------------------------------------------------------------------*/ | 7219 | *---------------------------------------------------------------------*/ |
7221 | static void FPT_queueDisconnect(PSCCB p_sccb, UCHAR p_card) | 7220 | static void FPT_queueDisconnect(PSCCB p_sccb, unsigned char p_card) |
7222 | { | 7221 | { |
7223 | PSCCBMgr_tar_info currTar_Info; | 7222 | PSCCBMgr_tar_info currTar_Info; |
7224 | 7223 | ||
@@ -7253,16 +7252,16 @@ static void FPT_queueDisconnect(PSCCB p_sccb, UCHAR p_card) | |||
7253 | * | 7252 | * |
7254 | *---------------------------------------------------------------------*/ | 7253 | *---------------------------------------------------------------------*/ |
7255 | 7254 | ||
7256 | static void FPT_queueFlushSccb(UCHAR p_card, UCHAR error_code) | 7255 | static void FPT_queueFlushSccb(unsigned char p_card, unsigned char error_code) |
7257 | { | 7256 | { |
7258 | UCHAR qtag,thisTarg; | 7257 | unsigned char qtag,thisTarg; |
7259 | PSCCB currSCCB; | 7258 | PSCCB currSCCB; |
7260 | PSCCBMgr_tar_info currTar_Info; | 7259 | PSCCBMgr_tar_info currTar_Info; |
7261 | 7260 | ||
7262 | currSCCB = FPT_BL_Card[p_card].currentSCCB; | 7261 | currSCCB = FPT_BL_Card[p_card].currentSCCB; |
7263 | if(currSCCB != NULL) | 7262 | if(currSCCB != NULL) |
7264 | { | 7263 | { |
7265 | thisTarg = (UCHAR)currSCCB->TargID; | 7264 | thisTarg = (unsigned char)currSCCB->TargID; |
7266 | currTar_Info = &FPT_sccbMgrTbl[p_card][thisTarg]; | 7265 | currTar_Info = &FPT_sccbMgrTbl[p_card][thisTarg]; |
7267 | 7266 | ||
7268 | for (qtag=0; qtag<QUEUE_DEPTH; qtag++) { | 7267 | for (qtag=0; qtag<QUEUE_DEPTH; qtag++) { |
@@ -7271,7 +7270,7 @@ static void FPT_queueFlushSccb(UCHAR p_card, UCHAR error_code) | |||
7271 | (FPT_BL_Card[p_card].discQ_Tbl[qtag]->TargID == thisTarg)) | 7270 | (FPT_BL_Card[p_card].discQ_Tbl[qtag]->TargID == thisTarg)) |
7272 | { | 7271 | { |
7273 | 7272 | ||
7274 | FPT_BL_Card[p_card].discQ_Tbl[qtag]->HostStatus = (UCHAR)error_code; | 7273 | FPT_BL_Card[p_card].discQ_Tbl[qtag]->HostStatus = (unsigned char)error_code; |
7275 | 7274 | ||
7276 | FPT_queueCmdComplete(&FPT_BL_Card[p_card],FPT_BL_Card[p_card].discQ_Tbl[qtag], p_card); | 7275 | FPT_queueCmdComplete(&FPT_BL_Card[p_card],FPT_BL_Card[p_card].discQ_Tbl[qtag], p_card); |
7277 | 7276 | ||
@@ -7292,10 +7291,10 @@ static void FPT_queueFlushSccb(UCHAR p_card, UCHAR error_code) | |||
7292 | * | 7291 | * |
7293 | *---------------------------------------------------------------------*/ | 7292 | *---------------------------------------------------------------------*/ |
7294 | 7293 | ||
7295 | static void FPT_queueFlushTargSccb(UCHAR p_card, UCHAR thisTarg, | 7294 | static void FPT_queueFlushTargSccb(unsigned char p_card, unsigned char thisTarg, |
7296 | UCHAR error_code) | 7295 | unsigned char error_code) |
7297 | { | 7296 | { |
7298 | UCHAR qtag; | 7297 | unsigned char qtag; |
7299 | PSCCBMgr_tar_info currTar_Info; | 7298 | PSCCBMgr_tar_info currTar_Info; |
7300 | 7299 | ||
7301 | currTar_Info = &FPT_sccbMgrTbl[p_card][thisTarg]; | 7300 | currTar_Info = &FPT_sccbMgrTbl[p_card][thisTarg]; |
@@ -7306,7 +7305,7 @@ static void FPT_queueFlushTargSccb(UCHAR p_card, UCHAR thisTarg, | |||
7306 | (FPT_BL_Card[p_card].discQ_Tbl[qtag]->TargID == thisTarg)) | 7305 | (FPT_BL_Card[p_card].discQ_Tbl[qtag]->TargID == thisTarg)) |
7307 | { | 7306 | { |
7308 | 7307 | ||
7309 | FPT_BL_Card[p_card].discQ_Tbl[qtag]->HostStatus = (UCHAR)error_code; | 7308 | FPT_BL_Card[p_card].discQ_Tbl[qtag]->HostStatus = (unsigned char)error_code; |
7310 | 7309 | ||
7311 | FPT_queueCmdComplete(&FPT_BL_Card[p_card],FPT_BL_Card[p_card].discQ_Tbl[qtag], p_card); | 7310 | FPT_queueCmdComplete(&FPT_BL_Card[p_card],FPT_BL_Card[p_card].discQ_Tbl[qtag], p_card); |
7312 | 7311 | ||
@@ -7322,7 +7321,7 @@ static void FPT_queueFlushTargSccb(UCHAR p_card, UCHAR thisTarg, | |||
7322 | 7321 | ||
7323 | 7322 | ||
7324 | 7323 | ||
7325 | static void FPT_queueAddSccb(PSCCB p_SCCB, UCHAR p_card) | 7324 | static void FPT_queueAddSccb(PSCCB p_SCCB, unsigned char p_card) |
7326 | { | 7325 | { |
7327 | PSCCBMgr_tar_info currTar_Info; | 7326 | PSCCBMgr_tar_info currTar_Info; |
7328 | currTar_Info = &FPT_sccbMgrTbl[p_card][p_SCCB->TargID]; | 7327 | currTar_Info = &FPT_sccbMgrTbl[p_card][p_SCCB->TargID]; |
@@ -7356,7 +7355,7 @@ static void FPT_queueAddSccb(PSCCB p_SCCB, UCHAR p_card) | |||
7356 | * | 7355 | * |
7357 | *---------------------------------------------------------------------*/ | 7356 | *---------------------------------------------------------------------*/ |
7358 | 7357 | ||
7359 | static UCHAR FPT_queueFindSccb(PSCCB p_SCCB, UCHAR p_card) | 7358 | static unsigned char FPT_queueFindSccb(PSCCB p_SCCB, unsigned char p_card) |
7360 | { | 7359 | { |
7361 | PSCCB q_ptr; | 7360 | PSCCB q_ptr; |
7362 | PSCCBMgr_tar_info currTar_Info; | 7361 | PSCCBMgr_tar_info currTar_Info; |
@@ -7469,7 +7468,7 @@ static void FPT_utilUpdateResidual(PSCCB p_SCCB) | |||
7469 | 7468 | ||
7470 | static void FPT_Wait1Second(ULONG p_port) | 7469 | static void FPT_Wait1Second(ULONG p_port) |
7471 | { | 7470 | { |
7472 | UCHAR i; | 7471 | unsigned char i; |
7473 | 7472 | ||
7474 | for(i=0; i < 4; i++) { | 7473 | for(i=0; i < 4; i++) { |
7475 | 7474 | ||
@@ -7492,10 +7491,10 @@ static void FPT_Wait1Second(ULONG p_port) | |||
7492 | * | 7491 | * |
7493 | *---------------------------------------------------------------------*/ | 7492 | *---------------------------------------------------------------------*/ |
7494 | 7493 | ||
7495 | static void FPT_Wait(ULONG p_port, UCHAR p_delay) | 7494 | static void FPT_Wait(ULONG p_port, unsigned char p_delay) |
7496 | { | 7495 | { |
7497 | UCHAR old_timer; | 7496 | unsigned char old_timer; |
7498 | UCHAR green_flag; | 7497 | unsigned char green_flag; |
7499 | 7498 | ||
7500 | old_timer = RD_HARPOON(p_port+hp_seltimeout); | 7499 | old_timer = RD_HARPOON(p_port+hp_seltimeout); |
7501 | 7500 | ||
@@ -7540,11 +7539,11 @@ static void FPT_Wait(ULONG p_port, UCHAR p_delay) | |||
7540 | * | 7539 | * |
7541 | *---------------------------------------------------------------------*/ | 7540 | *---------------------------------------------------------------------*/ |
7542 | 7541 | ||
7543 | static void FPT_utilEEWriteOnOff(ULONG p_port,UCHAR p_mode) | 7542 | static void FPT_utilEEWriteOnOff(ULONG p_port,unsigned char p_mode) |
7544 | { | 7543 | { |
7545 | UCHAR ee_value; | 7544 | unsigned char ee_value; |
7546 | 7545 | ||
7547 | ee_value = (UCHAR)(RD_HARPOON(p_port+hp_ee_ctrl) & (EXT_ARB_ACK | SCSI_TERM_ENA_H)); | 7546 | ee_value = (unsigned char)(RD_HARPOON(p_port+hp_ee_ctrl) & (EXT_ARB_ACK | SCSI_TERM_ENA_H)); |
7548 | 7547 | ||
7549 | if (p_mode) | 7548 | if (p_mode) |
7550 | 7549 | ||
@@ -7572,10 +7571,10 @@ static void FPT_utilEEWriteOnOff(ULONG p_port,UCHAR p_mode) | |||
7572 | static void FPT_utilEEWrite(ULONG p_port, USHORT ee_data, USHORT ee_addr) | 7571 | static void FPT_utilEEWrite(ULONG p_port, USHORT ee_data, USHORT ee_addr) |
7573 | { | 7572 | { |
7574 | 7573 | ||
7575 | UCHAR ee_value; | 7574 | unsigned char ee_value; |
7576 | USHORT i; | 7575 | USHORT i; |
7577 | 7576 | ||
7578 | ee_value = (UCHAR)((RD_HARPOON(p_port+hp_ee_ctrl) & (EXT_ARB_ACK | SCSI_TERM_ENA_H))| | 7577 | ee_value = (unsigned char)((RD_HARPOON(p_port+hp_ee_ctrl) & (EXT_ARB_ACK | SCSI_TERM_ENA_H))| |
7579 | (SEE_MS | SEE_CS)); | 7578 | (SEE_MS | SEE_CS)); |
7580 | 7579 | ||
7581 | 7580 | ||
@@ -7653,10 +7652,10 @@ static USHORT FPT_utilEERead(ULONG p_port, USHORT ee_addr) | |||
7653 | static USHORT FPT_utilEEReadOrg(ULONG p_port, USHORT ee_addr) | 7652 | static USHORT FPT_utilEEReadOrg(ULONG p_port, USHORT ee_addr) |
7654 | { | 7653 | { |
7655 | 7654 | ||
7656 | UCHAR ee_value; | 7655 | unsigned char ee_value; |
7657 | USHORT i, ee_data; | 7656 | USHORT i, ee_data; |
7658 | 7657 | ||
7659 | ee_value = (UCHAR)((RD_HARPOON(p_port+hp_ee_ctrl) & (EXT_ARB_ACK | SCSI_TERM_ENA_H))| | 7658 | ee_value = (unsigned char)((RD_HARPOON(p_port+hp_ee_ctrl) & (EXT_ARB_ACK | SCSI_TERM_ENA_H))| |
7660 | (SEE_MS | SEE_CS)); | 7659 | (SEE_MS | SEE_CS)); |
7661 | 7660 | ||
7662 | 7661 | ||
@@ -7698,15 +7697,15 @@ static USHORT FPT_utilEEReadOrg(ULONG p_port, USHORT ee_addr) | |||
7698 | * | 7697 | * |
7699 | *---------------------------------------------------------------------*/ | 7698 | *---------------------------------------------------------------------*/ |
7700 | 7699 | ||
7701 | static void FPT_utilEESendCmdAddr(ULONG p_port, UCHAR ee_cmd, USHORT ee_addr) | 7700 | static void FPT_utilEESendCmdAddr(ULONG p_port, unsigned char ee_cmd, USHORT ee_addr) |
7702 | { | 7701 | { |
7703 | UCHAR ee_value; | 7702 | unsigned char ee_value; |
7704 | UCHAR narrow_flg; | 7703 | unsigned char narrow_flg; |
7705 | 7704 | ||
7706 | USHORT i; | 7705 | USHORT i; |
7707 | 7706 | ||
7708 | 7707 | ||
7709 | narrow_flg= (UCHAR)(RD_HARPOON(p_port+hp_page_ctrl) & NARROW_SCSI_CARD); | 7708 | narrow_flg= (unsigned char)(RD_HARPOON(p_port+hp_page_ctrl) & NARROW_SCSI_CARD); |
7710 | 7709 | ||
7711 | 7710 | ||
7712 | ee_value = SEE_MS; | 7711 | ee_value = SEE_MS; |
@@ -7761,7 +7760,7 @@ static void FPT_utilEESendCmdAddr(ULONG p_port, UCHAR ee_cmd, USHORT ee_addr) | |||
7761 | } | 7760 | } |
7762 | } | 7761 | } |
7763 | 7762 | ||
7764 | static USHORT FPT_CalcCrc16(UCHAR buffer[]) | 7763 | static USHORT FPT_CalcCrc16(unsigned char buffer[]) |
7765 | { | 7764 | { |
7766 | USHORT crc=0; | 7765 | USHORT crc=0; |
7767 | int i,j; | 7766 | int i,j; |
@@ -7781,10 +7780,10 @@ static USHORT FPT_CalcCrc16(UCHAR buffer[]) | |||
7781 | return(crc); | 7780 | return(crc); |
7782 | } | 7781 | } |
7783 | 7782 | ||
7784 | static UCHAR FPT_CalcLrc(UCHAR buffer[]) | 7783 | static unsigned char FPT_CalcLrc(unsigned char buffer[]) |
7785 | { | 7784 | { |
7786 | int i; | 7785 | int i; |
7787 | UCHAR lrc; | 7786 | unsigned char lrc; |
7788 | lrc = 0; | 7787 | lrc = 0; |
7789 | for(i = 0; i < ID_STRING_LENGTH; i++) | 7788 | for(i = 0; i < ID_STRING_LENGTH; i++) |
7790 | lrc ^= buffer[i]; | 7789 | lrc ^= buffer[i]; |