diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2006-03-08 03:14:25 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-03-12 10:13:20 -0500 |
commit | c823feeb33161c09e83ee4e68c822d6b9ececbc4 (patch) | |
tree | 3d1524c0825b2d34a3d8930c26ab694ca5f891c8 /drivers/scsi/FlashPoint.c | |
parent | db038cf86fc63d336fc9d8e57712dee1d726e2e9 (diff) |
[SCSI] drivers/scsi/FlashPoint.c: remove USHORT
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/FlashPoint.c')
-rw-r--r-- | drivers/scsi/FlashPoint.c | 117 |
1 files changed, 58 insertions, 59 deletions
diff --git a/drivers/scsi/FlashPoint.c b/drivers/scsi/FlashPoint.c index e98bbef485b..02af5fb7314 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 short USHORT; | ||
44 | typedef unsigned int UINT; | 43 | typedef unsigned int UINT; |
45 | typedef unsigned long ULONG; | 44 | typedef unsigned long ULONG; |
46 | 45 | ||
@@ -59,7 +58,7 @@ typedef unsigned short * ushort_ptr; | |||
59 | 58 | ||
60 | 59 | ||
61 | #define BIT(x) ((unsigned char)(1<<(x))) /* single-bit mask in bit position x */ | 60 | #define BIT(x) ((unsigned char)(1<<(x))) /* single-bit mask in bit position x */ |
62 | #define BITW(x) ((USHORT)(1<<(x))) /* single-bit mask in bit position x */ | 61 | #define BITW(x) ((unsigned short)(1<<(x))) /* single-bit mask in bit position x */ |
63 | 62 | ||
64 | 63 | ||
65 | 64 | ||
@@ -74,13 +73,13 @@ typedef struct SCCBMgr_info { | |||
74 | unsigned char si_intvect; | 73 | unsigned char si_intvect; |
75 | unsigned char si_id; | 74 | unsigned char si_id; |
76 | unsigned char si_lun; | 75 | unsigned char si_lun; |
77 | USHORT si_fw_revision; | 76 | unsigned short si_fw_revision; |
78 | USHORT si_per_targ_init_sync; | 77 | unsigned short si_per_targ_init_sync; |
79 | USHORT si_per_targ_fast_nego; | 78 | unsigned short si_per_targ_fast_nego; |
80 | USHORT si_per_targ_ultra_nego; | 79 | unsigned short si_per_targ_ultra_nego; |
81 | USHORT si_per_targ_no_disc; | 80 | unsigned short si_per_targ_no_disc; |
82 | USHORT si_per_targ_wide_nego; | 81 | unsigned short si_per_targ_wide_nego; |
83 | USHORT si_flags; | 82 | unsigned short si_flags; |
84 | unsigned char si_card_family; | 83 | unsigned char si_card_family; |
85 | unsigned char si_bustype; | 84 | unsigned char si_bustype; |
86 | unsigned char si_card_model[3]; | 85 | unsigned char si_card_model[3]; |
@@ -143,15 +142,15 @@ typedef struct _SCCB { | |||
143 | ULONG SccbIOPort; /* Identifies board base port */ | 142 | ULONG SccbIOPort; /* Identifies board base port */ |
144 | unsigned char SccbStatus; | 143 | unsigned char SccbStatus; |
145 | unsigned char SCCBRes2; | 144 | unsigned char SCCBRes2; |
146 | USHORT SccbOSFlags; | 145 | unsigned short SccbOSFlags; |
147 | 146 | ||
148 | 147 | ||
149 | ULONG Sccb_XferCnt; /* actual transfer count */ | 148 | ULONG Sccb_XferCnt; /* actual transfer count */ |
150 | ULONG Sccb_ATC; | 149 | ULONG Sccb_ATC; |
151 | ULONG SccbVirtDataPtr; /* virtual addr for OS/2 */ | 150 | ULONG SccbVirtDataPtr; /* virtual addr for OS/2 */ |
152 | ULONG Sccb_res1; | 151 | ULONG Sccb_res1; |
153 | USHORT Sccb_MGRFlags; | 152 | unsigned short Sccb_MGRFlags; |
154 | USHORT Sccb_sgseg; | 153 | unsigned short Sccb_sgseg; |
155 | unsigned char Sccb_scsimsg; /* identify msg for selection */ | 154 | unsigned char Sccb_scsimsg; /* identify msg for selection */ |
156 | unsigned char Sccb_tag; | 155 | unsigned char Sccb_tag; |
157 | unsigned char Sccb_scsistat; | 156 | unsigned char Sccb_scsistat; |
@@ -324,7 +323,7 @@ typedef struct SCCBcard { | |||
324 | 323 | ||
325 | ULONG ioPort; | 324 | ULONG ioPort; |
326 | 325 | ||
327 | USHORT cmdCounter; | 326 | unsigned short cmdCounter; |
328 | unsigned char discQCount; | 327 | unsigned char discQCount; |
329 | unsigned char tagQ_Lst; | 328 | unsigned char tagQ_Lst; |
330 | unsigned char cardIndex; | 329 | unsigned char cardIndex; |
@@ -943,13 +942,13 @@ typedef struct SCCBscam_info { | |||
943 | #define GET_XFER_CNT(port, xfercnt) {RD_HARP32(port,hp_xfercnt_0,xfercnt); xfercnt &= 0xFFFFFF;} | 942 | #define GET_XFER_CNT(port, xfercnt) {RD_HARP32(port,hp_xfercnt_0,xfercnt); xfercnt &= 0xFFFFFF;} |
944 | /* #define GET_XFER_CNT(port, xfercnt) (xfercnt = RD_HARPOON(port+hp_xfercnt_2), \ | 943 | /* #define GET_XFER_CNT(port, xfercnt) (xfercnt = RD_HARPOON(port+hp_xfercnt_2), \ |
945 | xfercnt <<= 16,\ | 944 | xfercnt <<= 16,\ |
946 | xfercnt |= RDW_HARPOON((USHORT)(port+hp_xfercnt_0))) | 945 | xfercnt |= RDW_HARPOON((unsigned short)(port+hp_xfercnt_0))) |
947 | */ | 946 | */ |
948 | #define HP_SETUP_ADDR_CNT(port,addr,count) (WRW_HARPOON((port+hp_host_addr_lo), (USHORT)(addr & 0x0000FFFFL)),\ | 947 | #define HP_SETUP_ADDR_CNT(port,addr,count) (WRW_HARPOON((port+hp_host_addr_lo), (unsigned short)(addr & 0x0000FFFFL)),\ |
949 | addr >>= 16,\ | 948 | addr >>= 16,\ |
950 | WRW_HARPOON((port+hp_host_addr_hmi), (USHORT)(addr & 0x0000FFFFL)),\ | 949 | WRW_HARPOON((port+hp_host_addr_hmi), (unsigned short)(addr & 0x0000FFFFL)),\ |
951 | WR_HARP32(port,hp_xfercnt_0,count),\ | 950 | WR_HARP32(port,hp_xfercnt_0,count),\ |
952 | WRW_HARPOON((port+hp_xfer_cnt_lo), (USHORT)(count & 0x0000FFFFL)),\ | 951 | WRW_HARPOON((port+hp_xfer_cnt_lo), (unsigned short)(count & 0x0000FFFFL)),\ |
953 | count >>= 16,\ | 952 | count >>= 16,\ |
954 | WR_HARPOON(port+hp_xfer_cnt_hi, (count & 0xFF))) | 953 | WR_HARPOON(port+hp_xfer_cnt_hi, (count & 0xFF))) |
955 | 954 | ||
@@ -1016,17 +1015,17 @@ static void FPT_queueFlushSccb(unsigned char p_card, unsigned char error_code); | |||
1016 | static void FPT_queueAddSccb(PSCCB p_SCCB, unsigned char card); | 1015 | static void FPT_queueAddSccb(PSCCB p_SCCB, unsigned char card); |
1017 | static unsigned char FPT_queueFindSccb(PSCCB p_SCCB, unsigned char p_card); | 1016 | static unsigned char FPT_queueFindSccb(PSCCB p_SCCB, unsigned char p_card); |
1018 | static void FPT_utilUpdateResidual(PSCCB p_SCCB); | 1017 | static void FPT_utilUpdateResidual(PSCCB p_SCCB); |
1019 | static USHORT FPT_CalcCrc16(unsigned char buffer[]); | 1018 | static unsigned short FPT_CalcCrc16(unsigned char buffer[]); |
1020 | static unsigned char FPT_CalcLrc(unsigned char buffer[]); | 1019 | static unsigned char FPT_CalcLrc(unsigned char buffer[]); |
1021 | 1020 | ||
1022 | 1021 | ||
1023 | static void FPT_Wait1Second(ULONG p_port); | 1022 | static void FPT_Wait1Second(ULONG p_port); |
1024 | static void FPT_Wait(ULONG p_port, unsigned char p_delay); | 1023 | static void FPT_Wait(ULONG p_port, unsigned char p_delay); |
1025 | static void FPT_utilEEWriteOnOff(ULONG p_port,unsigned char p_mode); | 1024 | static void FPT_utilEEWriteOnOff(ULONG p_port,unsigned char p_mode); |
1026 | static void FPT_utilEEWrite(ULONG p_port, USHORT ee_data, USHORT ee_addr); | 1025 | static void FPT_utilEEWrite(ULONG p_port, unsigned short ee_data, unsigned short ee_addr); |
1027 | static USHORT FPT_utilEERead(ULONG p_port, USHORT ee_addr); | 1026 | static unsigned short FPT_utilEERead(ULONG p_port, unsigned short ee_addr); |
1028 | static USHORT FPT_utilEEReadOrg(ULONG p_port, USHORT ee_addr); | 1027 | static unsigned short FPT_utilEEReadOrg(ULONG p_port, unsigned short ee_addr); |
1029 | static void FPT_utilEESendCmdAddr(ULONG p_port, unsigned char ee_cmd, USHORT ee_addr); | 1028 | static void FPT_utilEESendCmdAddr(ULONG p_port, unsigned char ee_cmd, unsigned short ee_addr); |
1030 | 1029 | ||
1031 | 1030 | ||
1032 | 1031 | ||
@@ -1060,7 +1059,7 @@ static void FPT_hostDataXferRestart(PSCCB currSCCB); | |||
1060 | 1059 | ||
1061 | 1060 | ||
1062 | static unsigned char FPT_SccbMgr_bad_isr(ULONG p_port, unsigned char p_card, | 1061 | static unsigned char FPT_SccbMgr_bad_isr(ULONG p_port, unsigned char p_card, |
1063 | PSCCBcard pCurrCard, USHORT p_int); | 1062 | PSCCBcard pCurrCard, unsigned short p_int); |
1064 | 1063 | ||
1065 | static void FPT_SccbMgrTableInitAll(void); | 1064 | static void FPT_SccbMgrTableInitAll(void); |
1066 | static void FPT_SccbMgrTableInitCard(PSCCBcard pCurrCard, unsigned char p_card); | 1065 | static void FPT_SccbMgrTableInitCard(PSCCBcard pCurrCard, unsigned char p_card); |
@@ -1105,7 +1104,7 @@ static unsigned char FPT_scamHAString[] = {0x63, 0x07, 'B', 'U', 'S', 'L', 'O', | |||
1105 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, \ | 1104 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, \ |
1106 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20}; | 1105 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20}; |
1107 | 1106 | ||
1108 | static USHORT FPT_default_intena = 0; | 1107 | static unsigned short FPT_default_intena = 0; |
1109 | 1108 | ||
1110 | 1109 | ||
1111 | static void (*FPT_s_PhaseTbl[8]) (ULONG, unsigned char)= { 0 }; | 1110 | static void (*FPT_s_PhaseTbl[8]) (ULONG, unsigned char)= { 0 }; |
@@ -1124,7 +1123,7 @@ static int FlashPoint_ProbeHostAdapter(PSCCBMGR_INFO pCardInfo) | |||
1124 | static unsigned char first_time = 1; | 1123 | static unsigned char first_time = 1; |
1125 | 1124 | ||
1126 | unsigned char i,j,id,ScamFlg; | 1125 | unsigned char i,j,id,ScamFlg; |
1127 | USHORT temp,temp2,temp3,temp4,temp5,temp6; | 1126 | unsigned short temp,temp2,temp3,temp4,temp5,temp6; |
1128 | ULONG ioport; | 1127 | ULONG ioport; |
1129 | PNVRamInfo pCurrNvRam; | 1128 | PNVRamInfo pCurrNvRam; |
1130 | 1129 | ||
@@ -1203,11 +1202,11 @@ static int FlashPoint_ProbeHostAdapter(PSCCBMGR_INFO pCardInfo) | |||
1203 | for (id = 0; id < (16/2); id++) { | 1202 | for (id = 0; id < (16/2); id++) { |
1204 | 1203 | ||
1205 | if(pCurrNvRam){ | 1204 | if(pCurrNvRam){ |
1206 | temp = (USHORT) pCurrNvRam->niSyncTbl[id]; | 1205 | temp = (unsigned short) pCurrNvRam->niSyncTbl[id]; |
1207 | temp = ((temp & 0x03) + ((temp << 4) & 0xc0)) + | 1206 | temp = ((temp & 0x03) + ((temp << 4) & 0xc0)) + |
1208 | (((temp << 4) & 0x0300) + ((temp << 8) & 0xc000)); | 1207 | (((temp << 4) & 0x0300) + ((temp << 8) & 0xc000)); |
1209 | }else | 1208 | }else |
1210 | temp = FPT_utilEERead(ioport, (USHORT)((SYNC_RATE_TBL/2)+id)); | 1209 | temp = FPT_utilEERead(ioport, (unsigned short)((SYNC_RATE_TBL/2)+id)); |
1211 | 1210 | ||
1212 | for (i = 0; i < 2; temp >>=8,i++) { | 1211 | for (i = 0; i < 2; temp >>=8,i++) { |
1213 | 1212 | ||
@@ -1402,7 +1401,7 @@ static ULONG FlashPoint_HardwareResetHostAdapter(PSCCBMGR_INFO pCardInfo) | |||
1402 | PSCCBcard CurrCard = NULL; | 1401 | PSCCBcard CurrCard = NULL; |
1403 | PNVRamInfo pCurrNvRam; | 1402 | PNVRamInfo pCurrNvRam; |
1404 | unsigned char i,j,thisCard, ScamFlg; | 1403 | unsigned char i,j,thisCard, ScamFlg; |
1405 | USHORT temp,sync_bit_map,id; | 1404 | unsigned short temp,sync_bit_map,id; |
1406 | ULONG ioport; | 1405 | ULONG ioport; |
1407 | 1406 | ||
1408 | ioport = pCardInfo->si_baseaddr; | 1407 | ioport = pCardInfo->si_baseaddr; |
@@ -1532,11 +1531,11 @@ static ULONG FlashPoint_HardwareResetHostAdapter(PSCCBMGR_INFO pCardInfo) | |||
1532 | for (id = 0; id < (MAX_SCSI_TAR/2); id++) { | 1531 | for (id = 0; id < (MAX_SCSI_TAR/2); id++) { |
1533 | 1532 | ||
1534 | if(pCurrNvRam){ | 1533 | if(pCurrNvRam){ |
1535 | temp = (USHORT) pCurrNvRam->niSyncTbl[id]; | 1534 | temp = (unsigned short) pCurrNvRam->niSyncTbl[id]; |
1536 | temp = ((temp & 0x03) + ((temp << 4) & 0xc0)) + | 1535 | temp = ((temp & 0x03) + ((temp << 4) & 0xc0)) + |
1537 | (((temp << 4) & 0x0300) + ((temp << 8) & 0xc000)); | 1536 | (((temp << 4) & 0x0300) + ((temp << 8) & 0xc000)); |
1538 | }else | 1537 | }else |
1539 | temp = FPT_utilEERead(ioport, (USHORT)((SYNC_RATE_TBL/2)+id)); | 1538 | temp = FPT_utilEERead(ioport, (unsigned short)((SYNC_RATE_TBL/2)+id)); |
1540 | 1539 | ||
1541 | for (i = 0; i < 2; temp >>=8,i++) { | 1540 | for (i = 0; i < 2; temp >>=8,i++) { |
1542 | 1541 | ||
@@ -1928,7 +1927,7 @@ static int FlashPoint_HandleInterrupt(ULONG pCurrCard) | |||
1928 | { | 1927 | { |
1929 | PSCCB currSCCB; | 1928 | PSCCB currSCCB; |
1930 | unsigned char thisCard,result,bm_status, bm_int_st; | 1929 | unsigned char thisCard,result,bm_status, bm_int_st; |
1931 | USHORT hp_int; | 1930 | unsigned short hp_int; |
1932 | unsigned char i, target; | 1931 | unsigned char i, target; |
1933 | ULONG ioport; | 1932 | ULONG ioport; |
1934 | 1933 | ||
@@ -2170,7 +2169,7 @@ static int FlashPoint_HandleInterrupt(ULONG pCurrCard) | |||
2170 | * | 2169 | * |
2171 | *---------------------------------------------------------------------*/ | 2170 | *---------------------------------------------------------------------*/ |
2172 | static unsigned char FPT_SccbMgr_bad_isr(ULONG p_port, unsigned char p_card, | 2171 | static unsigned char FPT_SccbMgr_bad_isr(ULONG p_port, unsigned char p_card, |
2173 | PSCCBcard pCurrCard, USHORT p_int) | 2172 | PSCCBcard pCurrCard, unsigned short p_int) |
2174 | { | 2173 | { |
2175 | unsigned char temp, ScamFlg; | 2174 | unsigned char temp, ScamFlg; |
2176 | PSCCBMgr_tar_info currTar_Info; | 2175 | PSCCBMgr_tar_info currTar_Info; |
@@ -2430,7 +2429,7 @@ static void FPT_SccbMgrTableInitTarget(unsigned char p_card, unsigned char targe | |||
2430 | static unsigned char FPT_sfm(ULONG port, PSCCB pCurrSCCB) | 2429 | static unsigned char FPT_sfm(ULONG port, PSCCB pCurrSCCB) |
2431 | { | 2430 | { |
2432 | unsigned char message; | 2431 | unsigned char message; |
2433 | USHORT TimeOutLoop; | 2432 | unsigned short TimeOutLoop; |
2434 | 2433 | ||
2435 | TimeOutLoop = 0; | 2434 | TimeOutLoop = 0; |
2436 | while( (!(RD_HARPOON(port+hp_scsisig) & SCSI_REQ)) && | 2435 | while( (!(RD_HARPOON(port+hp_scsisig) & SCSI_REQ)) && |
@@ -2775,7 +2774,7 @@ static void FPT_ssel(ULONG port, unsigned char p_card) | |||
2775 | 2774 | ||
2776 | } /* auto_loaded */ | 2775 | } /* auto_loaded */ |
2777 | 2776 | ||
2778 | WRW_HARPOON((port+hp_fiforead), (USHORT) 0x00); | 2777 | WRW_HARPOON((port+hp_fiforead), (unsigned short) 0x00); |
2779 | WR_HARPOON(port+hp_xferstat, 0x00); | 2778 | WR_HARPOON(port+hp_xferstat, 0x00); |
2780 | 2779 | ||
2781 | WRW_HARPOON((port+hp_intstat), (PROG_HLT | TIMEOUT | SEL | BUS_FREE)); | 2780 | WRW_HARPOON((port+hp_intstat), (PROG_HLT | TIMEOUT | SEL | BUS_FREE)); |
@@ -2877,7 +2876,7 @@ static void FPT_sres(ULONG port, unsigned char p_card, PSCCBcard pCurrCard) | |||
2877 | FPT_queueSelectFail(&FPT_BL_Card[p_card],p_card); | 2876 | FPT_queueSelectFail(&FPT_BL_Card[p_card],p_card); |
2878 | } | 2877 | } |
2879 | 2878 | ||
2880 | WRW_HARPOON((port+hp_fiforead), (USHORT) 0x00); | 2879 | WRW_HARPOON((port+hp_fiforead), (unsigned short) 0x00); |
2881 | 2880 | ||
2882 | 2881 | ||
2883 | our_target = (unsigned char)(RD_HARPOON(port+hp_select_id) >> 4); | 2882 | our_target = (unsigned char)(RD_HARPOON(port+hp_select_id) >> 4); |
@@ -4056,7 +4055,7 @@ static void FPT_sxfrp(ULONG p_port, unsigned char p_card) | |||
4056 | 4055 | ||
4057 | static void FPT_schkdd(ULONG port, unsigned char p_card) | 4056 | static void FPT_schkdd(ULONG port, unsigned char p_card) |
4058 | { | 4057 | { |
4059 | USHORT TimeOutLoop; | 4058 | unsigned short TimeOutLoop; |
4060 | unsigned char sPhase; | 4059 | unsigned char sPhase; |
4061 | 4060 | ||
4062 | PSCCB currSCCB; | 4061 | PSCCB currSCCB; |
@@ -4079,7 +4078,7 @@ static void FPT_schkdd(ULONG port, unsigned char p_card) | |||
4079 | currSCCB->Sccb_XferCnt = 1; | 4078 | currSCCB->Sccb_XferCnt = 1; |
4080 | 4079 | ||
4081 | currSCCB->Sccb_XferState &= ~F_ODD_BALL_CNT; | 4080 | currSCCB->Sccb_XferState &= ~F_ODD_BALL_CNT; |
4082 | WRW_HARPOON((port+hp_fiforead), (USHORT) 0x00); | 4081 | WRW_HARPOON((port+hp_fiforead), (unsigned short) 0x00); |
4083 | WR_HARPOON(port+hp_xferstat, 0x00); | 4082 | WR_HARPOON(port+hp_xferstat, 0x00); |
4084 | } | 4083 | } |
4085 | 4084 | ||
@@ -5486,7 +5485,7 @@ static void FPT_hostDataXferAbort(ULONG port, unsigned char p_card, PSCCB pCurrS | |||
5486 | 5485 | ||
5487 | pCurrSCCB->Sccb_SGoffset = remain_cnt; | 5486 | pCurrSCCB->Sccb_SGoffset = remain_cnt; |
5488 | 5487 | ||
5489 | pCurrSCCB->Sccb_sgseg = (USHORT)sg_ptr; | 5488 | pCurrSCCB->Sccb_sgseg = (unsigned short)sg_ptr; |
5490 | 5489 | ||
5491 | 5490 | ||
5492 | if ((ULONG)(sg_ptr * SG_ELEMENT_SIZE) == pCurrSCCB->DataLength | 5491 | if ((ULONG)(sg_ptr * SG_ELEMENT_SIZE) == pCurrSCCB->DataLength |
@@ -5631,7 +5630,7 @@ static void FPT_hostDataXferAbort(ULONG port, unsigned char p_card, PSCCB pCurrS | |||
5631 | 5630 | ||
5632 | pCurrSCCB->Sccb_XferState |= F_ALL_XFERRED; | 5631 | pCurrSCCB->Sccb_XferState |= F_ALL_XFERRED; |
5633 | 5632 | ||
5634 | pCurrSCCB->Sccb_sgseg = (USHORT)(pCurrSCCB->DataLength / SG_ELEMENT_SIZE); | 5633 | pCurrSCCB->Sccb_sgseg = (unsigned short)(pCurrSCCB->DataLength / SG_ELEMENT_SIZE); |
5635 | 5634 | ||
5636 | } | 5635 | } |
5637 | } | 5636 | } |
@@ -5688,7 +5687,7 @@ static void FPT_hostDataXferRestart(PSCCB currSCCB) | |||
5688 | currSCCB->Sccb_SGoffset = data_count - currSCCB->Sccb_ATC; | 5687 | currSCCB->Sccb_SGoffset = data_count - currSCCB->Sccb_ATC; |
5689 | } | 5688 | } |
5690 | 5689 | ||
5691 | currSCCB->Sccb_sgseg = (USHORT)sg_index; | 5690 | currSCCB->Sccb_sgseg = (unsigned short)sg_index; |
5692 | } | 5691 | } |
5693 | 5692 | ||
5694 | else { | 5693 | else { |
@@ -6465,7 +6464,7 @@ static void FPT_scwtsel(ULONG p_port) | |||
6465 | static void FPT_inisci(unsigned char p_card, ULONG p_port, unsigned char p_our_id) | 6464 | static void FPT_inisci(unsigned char p_card, ULONG p_port, unsigned char p_our_id) |
6466 | { | 6465 | { |
6467 | unsigned char i,k,max_id; | 6466 | unsigned char i,k,max_id; |
6468 | USHORT ee_data; | 6467 | unsigned short ee_data; |
6469 | PNVRamInfo pCurrNvRam; | 6468 | PNVRamInfo pCurrNvRam; |
6470 | 6469 | ||
6471 | pCurrNvRam = FPT_BL_Card[p_card].pNvRamInfo; | 6470 | pCurrNvRam = FPT_BL_Card[p_card].pNvRamInfo; |
@@ -6495,8 +6494,8 @@ static void FPT_inisci(unsigned char p_card, ULONG p_port, unsigned char p_our_i | |||
6495 | { | 6494 | { |
6496 | for (k=0; k < ID_STRING_LENGTH; k+=2) | 6495 | for (k=0; k < ID_STRING_LENGTH; k+=2) |
6497 | { | 6496 | { |
6498 | ee_data = FPT_utilEERead(p_port, (USHORT)((EE_SCAMBASE/2) + | 6497 | ee_data = FPT_utilEERead(p_port, (unsigned short)((EE_SCAMBASE/2) + |
6499 | (USHORT) (i*((USHORT)ID_STRING_LENGTH/2)) + (USHORT)(k/2))); | 6498 | (unsigned short) (i*((unsigned short)ID_STRING_LENGTH/2)) + (unsigned short)(k/2))); |
6500 | FPT_scamInfo[i].id_string[k] = (unsigned char) ee_data; | 6499 | FPT_scamInfo[i].id_string[k] = (unsigned char) ee_data; |
6501 | ee_data >>= 8; | 6500 | ee_data >>= 8; |
6502 | FPT_scamInfo[i].id_string[k+1] = (unsigned char) ee_data; | 6501 | FPT_scamInfo[i].id_string[k+1] = (unsigned char) ee_data; |
@@ -6658,7 +6657,7 @@ static unsigned char FPT_scmachid(unsigned char p_card, unsigned char p_id_strin | |||
6658 | static void FPT_scsavdi(unsigned char p_card, ULONG p_port) | 6657 | static void FPT_scsavdi(unsigned char p_card, ULONG p_port) |
6659 | { | 6658 | { |
6660 | unsigned char i,k,max_id; | 6659 | unsigned char i,k,max_id; |
6661 | USHORT ee_data,sum_data; | 6660 | unsigned short ee_data,sum_data; |
6662 | 6661 | ||
6663 | 6662 | ||
6664 | sum_data = 0x0000; | 6663 | sum_data = 0x0000; |
@@ -6686,8 +6685,8 @@ static void FPT_scsavdi(unsigned char p_card, ULONG p_port) | |||
6686 | ee_data <<= 8; | 6685 | ee_data <<= 8; |
6687 | ee_data |= FPT_scamInfo[i].id_string[k]; | 6686 | ee_data |= FPT_scamInfo[i].id_string[k]; |
6688 | sum_data += ee_data; | 6687 | sum_data += ee_data; |
6689 | FPT_utilEEWrite(p_port, ee_data, (USHORT)((EE_SCAMBASE/2) + | 6688 | FPT_utilEEWrite(p_port, ee_data, (unsigned short)((EE_SCAMBASE/2) + |
6690 | (USHORT)(i*((USHORT)ID_STRING_LENGTH/2)) + (USHORT)(k/2))); | 6689 | (unsigned short)(i*((unsigned short)ID_STRING_LENGTH/2)) + (unsigned short)(k/2))); |
6691 | } | 6690 | } |
6692 | } | 6691 | } |
6693 | 6692 | ||
@@ -6787,7 +6786,7 @@ static void FPT_BusMasterInit(ULONG p_port) | |||
6787 | 6786 | ||
6788 | static void FPT_DiagEEPROM(ULONG p_port) | 6787 | static void FPT_DiagEEPROM(ULONG p_port) |
6789 | { | 6788 | { |
6790 | USHORT index,temp,max_wd_cnt; | 6789 | unsigned short index,temp,max_wd_cnt; |
6791 | 6790 | ||
6792 | if (RD_HARPOON(p_port+hp_page_ctrl) & NARROW_SCSI_CARD) | 6791 | if (RD_HARPOON(p_port+hp_page_ctrl) & NARROW_SCSI_CARD) |
6793 | max_wd_cnt = EEPROM_WD_CNT; | 6792 | max_wd_cnt = EEPROM_WD_CNT; |
@@ -7568,11 +7567,11 @@ static void FPT_utilEEWriteOnOff(ULONG p_port,unsigned char p_mode) | |||
7568 | * | 7567 | * |
7569 | *---------------------------------------------------------------------*/ | 7568 | *---------------------------------------------------------------------*/ |
7570 | 7569 | ||
7571 | static void FPT_utilEEWrite(ULONG p_port, USHORT ee_data, USHORT ee_addr) | 7570 | static void FPT_utilEEWrite(ULONG p_port, unsigned short ee_data, unsigned short ee_addr) |
7572 | { | 7571 | { |
7573 | 7572 | ||
7574 | unsigned char ee_value; | 7573 | unsigned char ee_value; |
7575 | USHORT i; | 7574 | unsigned short i; |
7576 | 7575 | ||
7577 | ee_value = (unsigned char)((RD_HARPOON(p_port+hp_ee_ctrl) & (EXT_ARB_ACK | SCSI_TERM_ENA_H))| | 7576 | ee_value = (unsigned char)((RD_HARPOON(p_port+hp_ee_ctrl) & (EXT_ARB_ACK | SCSI_TERM_ENA_H))| |
7578 | (SEE_MS | SEE_CS)); | 7577 | (SEE_MS | SEE_CS)); |
@@ -7619,9 +7618,9 @@ static void FPT_utilEEWrite(ULONG p_port, USHORT ee_data, USHORT ee_addr) | |||
7619 | * | 7618 | * |
7620 | *---------------------------------------------------------------------*/ | 7619 | *---------------------------------------------------------------------*/ |
7621 | 7620 | ||
7622 | static USHORT FPT_utilEERead(ULONG p_port, USHORT ee_addr) | 7621 | static unsigned short FPT_utilEERead(ULONG p_port, unsigned short ee_addr) |
7623 | { | 7622 | { |
7624 | USHORT i, ee_data1, ee_data2; | 7623 | unsigned short i, ee_data1, ee_data2; |
7625 | 7624 | ||
7626 | i = 0; | 7625 | i = 0; |
7627 | ee_data1 = FPT_utilEEReadOrg(p_port, ee_addr); | 7626 | ee_data1 = FPT_utilEEReadOrg(p_port, ee_addr); |
@@ -7649,11 +7648,11 @@ static USHORT FPT_utilEERead(ULONG p_port, USHORT ee_addr) | |||
7649 | * | 7648 | * |
7650 | *---------------------------------------------------------------------*/ | 7649 | *---------------------------------------------------------------------*/ |
7651 | 7650 | ||
7652 | static USHORT FPT_utilEEReadOrg(ULONG p_port, USHORT ee_addr) | 7651 | static unsigned short FPT_utilEEReadOrg(ULONG p_port, unsigned short ee_addr) |
7653 | { | 7652 | { |
7654 | 7653 | ||
7655 | unsigned char ee_value; | 7654 | unsigned char ee_value; |
7656 | USHORT i, ee_data; | 7655 | unsigned short i, ee_data; |
7657 | 7656 | ||
7658 | ee_value = (unsigned char)((RD_HARPOON(p_port+hp_ee_ctrl) & (EXT_ARB_ACK | SCSI_TERM_ENA_H))| | 7657 | ee_value = (unsigned char)((RD_HARPOON(p_port+hp_ee_ctrl) & (EXT_ARB_ACK | SCSI_TERM_ENA_H))| |
7659 | (SEE_MS | SEE_CS)); | 7658 | (SEE_MS | SEE_CS)); |
@@ -7697,12 +7696,12 @@ static USHORT FPT_utilEEReadOrg(ULONG p_port, USHORT ee_addr) | |||
7697 | * | 7696 | * |
7698 | *---------------------------------------------------------------------*/ | 7697 | *---------------------------------------------------------------------*/ |
7699 | 7698 | ||
7700 | static void FPT_utilEESendCmdAddr(ULONG p_port, unsigned char ee_cmd, USHORT ee_addr) | 7699 | static void FPT_utilEESendCmdAddr(ULONG p_port, unsigned char ee_cmd, unsigned short ee_addr) |
7701 | { | 7700 | { |
7702 | unsigned char ee_value; | 7701 | unsigned char ee_value; |
7703 | unsigned char narrow_flg; | 7702 | unsigned char narrow_flg; |
7704 | 7703 | ||
7705 | USHORT i; | 7704 | unsigned short i; |
7706 | 7705 | ||
7707 | 7706 | ||
7708 | narrow_flg= (unsigned char)(RD_HARPOON(p_port+hp_page_ctrl) & NARROW_SCSI_CARD); | 7707 | narrow_flg= (unsigned char)(RD_HARPOON(p_port+hp_page_ctrl) & NARROW_SCSI_CARD); |
@@ -7760,14 +7759,14 @@ static void FPT_utilEESendCmdAddr(ULONG p_port, unsigned char ee_cmd, USHORT ee_ | |||
7760 | } | 7759 | } |
7761 | } | 7760 | } |
7762 | 7761 | ||
7763 | static USHORT FPT_CalcCrc16(unsigned char buffer[]) | 7762 | static unsigned short FPT_CalcCrc16(unsigned char buffer[]) |
7764 | { | 7763 | { |
7765 | USHORT crc=0; | 7764 | unsigned short crc=0; |
7766 | int i,j; | 7765 | int i,j; |
7767 | USHORT ch; | 7766 | unsigned short ch; |
7768 | for (i=0; i < ID_STRING_LENGTH; i++) | 7767 | for (i=0; i < ID_STRING_LENGTH; i++) |
7769 | { | 7768 | { |
7770 | ch = (USHORT) buffer[i]; | 7769 | ch = (unsigned short) buffer[i]; |
7771 | for(j=0; j < 8; j++) | 7770 | for(j=0; j < 8; j++) |
7772 | { | 7771 | { |
7773 | if ((crc ^ ch) & 1) | 7772 | if ((crc ^ ch) & 1) |