aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/FlashPoint.c
diff options
context:
space:
mode:
authorKhalid Aziz <khalid.aziz@oracle.com>2013-05-16 21:44:14 -0400
committerJames Bottomley <JBottomley@Parallels.com>2013-06-26 21:32:47 -0400
commit391e2f25601e34a7d7e5dc155e487bc58dffd8c6 (patch)
tree11960063d6d30dfb69344a9aa955842542f59b8b /drivers/scsi/FlashPoint.c
parent839cb99e8f748391059d10388c8aea48a88c142c (diff)
[SCSI] BusLogic: Port driver to 64-bit.
[jejb: fix up pointer to int cast warning] Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/FlashPoint.c')
-rw-r--r--drivers/scsi/FlashPoint.c619
1 files changed, 282 insertions, 337 deletions
diff --git a/drivers/scsi/FlashPoint.c b/drivers/scsi/FlashPoint.c
index 902972050063..5c74e4c52fe4 100644
--- a/drivers/scsi/FlashPoint.c
+++ b/drivers/scsi/FlashPoint.c
@@ -29,27 +29,27 @@ struct sccb;
29typedef void (*CALL_BK_FN) (struct sccb *); 29typedef void (*CALL_BK_FN) (struct sccb *);
30 30
31struct sccb_mgr_info { 31struct sccb_mgr_info {
32 unsigned long si_baseaddr; 32 u32 si_baseaddr;
33 unsigned char si_present; 33 unsigned char si_present;
34 unsigned char si_intvect; 34 unsigned char si_intvect;
35 unsigned char si_id; 35 unsigned char si_id;
36 unsigned char si_lun; 36 unsigned char si_lun;
37 unsigned short si_fw_revision; 37 u16 si_fw_revision;
38 unsigned short si_per_targ_init_sync; 38 u16 si_per_targ_init_sync;
39 unsigned short si_per_targ_fast_nego; 39 u16 si_per_targ_fast_nego;
40 unsigned short si_per_targ_ultra_nego; 40 u16 si_per_targ_ultra_nego;
41 unsigned short si_per_targ_no_disc; 41 u16 si_per_targ_no_disc;
42 unsigned short si_per_targ_wide_nego; 42 u16 si_per_targ_wide_nego;
43 unsigned short si_flags; 43 u16 si_flags;
44 unsigned char si_card_family; 44 unsigned char si_card_family;
45 unsigned char si_bustype; 45 unsigned char si_bustype;
46 unsigned char si_card_model[3]; 46 unsigned char si_card_model[3];
47 unsigned char si_relative_cardnum; 47 unsigned char si_relative_cardnum;
48 unsigned char si_reserved[4]; 48 unsigned char si_reserved[4];
49 unsigned long si_OS_reserved; 49 u32 si_OS_reserved;
50 unsigned char si_XlatInfo[4]; 50 unsigned char si_XlatInfo[4];
51 unsigned long si_reserved2[5]; 51 u32 si_reserved2[5];
52 unsigned long si_secondary_range; 52 u32 si_secondary_range;
53}; 53};
54 54
55#define SCSI_PARITY_ENA 0x0001 55#define SCSI_PARITY_ENA 0x0001
@@ -70,14 +70,14 @@ struct sccb_mgr_info {
70 * The UCB Manager treats the SCCB as it's 'native hardware structure' 70 * The UCB Manager treats the SCCB as it's 'native hardware structure'
71 */ 71 */
72 72
73#pragma pack(1) 73/*#pragma pack(1)*/
74struct sccb { 74struct sccb {
75 unsigned char OperationCode; 75 unsigned char OperationCode;
76 unsigned char ControlByte; 76 unsigned char ControlByte;
77 unsigned char CdbLength; 77 unsigned char CdbLength;
78 unsigned char RequestSenseLength; 78 unsigned char RequestSenseLength;
79 unsigned long DataLength; 79 u32 DataLength;
80 unsigned long DataPointer; 80 void *DataPointer;
81 unsigned char CcbRes[2]; 81 unsigned char CcbRes[2];
82 unsigned char HostStatus; 82 unsigned char HostStatus;
83 unsigned char TargetStatus; 83 unsigned char TargetStatus;
@@ -86,32 +86,32 @@ struct sccb {
86 unsigned char Cdb[12]; 86 unsigned char Cdb[12];
87 unsigned char CcbRes1; 87 unsigned char CcbRes1;
88 unsigned char Reserved1; 88 unsigned char Reserved1;
89 unsigned long Reserved2; 89 u32 Reserved2;
90 unsigned long SensePointer; 90 u32 SensePointer;
91 91
92 CALL_BK_FN SccbCallback; /* VOID (*SccbCallback)(); */ 92 CALL_BK_FN SccbCallback; /* VOID (*SccbCallback)(); */
93 unsigned long SccbIOPort; /* Identifies board base port */ 93 u32 SccbIOPort; /* Identifies board base port */
94 unsigned char SccbStatus; 94 unsigned char SccbStatus;
95 unsigned char SCCBRes2; 95 unsigned char SCCBRes2;
96 unsigned short SccbOSFlags; 96 u16 SccbOSFlags;
97 97
98 unsigned long Sccb_XferCnt; /* actual transfer count */ 98 u32 Sccb_XferCnt; /* actual transfer count */
99 unsigned long Sccb_ATC; 99 u32 Sccb_ATC;
100 unsigned long SccbVirtDataPtr; /* virtual addr for OS/2 */ 100 u32 SccbVirtDataPtr; /* virtual addr for OS/2 */
101 unsigned long Sccb_res1; 101 u32 Sccb_res1;
102 unsigned short Sccb_MGRFlags; 102 u16 Sccb_MGRFlags;
103 unsigned short Sccb_sgseg; 103 u16 Sccb_sgseg;
104 unsigned char Sccb_scsimsg; /* identify msg for selection */ 104 unsigned char Sccb_scsimsg; /* identify msg for selection */
105 unsigned char Sccb_tag; 105 unsigned char Sccb_tag;
106 unsigned char Sccb_scsistat; 106 unsigned char Sccb_scsistat;
107 unsigned char Sccb_idmsg; /* image of last msg in */ 107 unsigned char Sccb_idmsg; /* image of last msg in */
108 struct sccb *Sccb_forwardlink; 108 struct sccb *Sccb_forwardlink;
109 struct sccb *Sccb_backlink; 109 struct sccb *Sccb_backlink;
110 unsigned long Sccb_savedATC; 110 u32 Sccb_savedATC;
111 unsigned char Save_Cdb[6]; 111 unsigned char Save_Cdb[6];
112 unsigned char Save_CdbLen; 112 unsigned char Save_CdbLen;
113 unsigned char Sccb_XferState; 113 unsigned char Sccb_XferState;
114 unsigned long Sccb_SGoffset; 114 u32 Sccb_SGoffset;
115}; 115};
116 116
117#pragma pack() 117#pragma pack()
@@ -223,15 +223,21 @@ struct sccb_mgr_tar_info {
223}; 223};
224 224
225struct nvram_info { 225struct nvram_info {
226 unsigned char niModel; /* Model No. of card */ 226 unsigned char niModel; /* Model No. of card */
227 unsigned char niCardNo; /* Card no. */ 227 unsigned char niCardNo; /* Card no. */
228 unsigned long niBaseAddr; /* Port Address of card */ 228 u32 niBaseAddr; /* Port Address of card */
229 unsigned char niSysConf; /* Adapter Configuration byte - Byte 16 of eeprom map */ 229 unsigned char niSysConf; /* Adapter Configuration byte -
230 unsigned char niScsiConf; /* SCSI Configuration byte - Byte 17 of eeprom map */ 230 Byte 16 of eeprom map */
231 unsigned char niScamConf; /* SCAM Configuration byte - Byte 20 of eeprom map */ 231 unsigned char niScsiConf; /* SCSI Configuration byte -
232 unsigned char niAdapId; /* Host Adapter ID - Byte 24 of eerpom map */ 232 Byte 17 of eeprom map */
233 unsigned char niSyncTbl[MAX_SCSI_TAR / 2]; /* Sync/Wide byte of targets */ 233 unsigned char niScamConf; /* SCAM Configuration byte -
234 unsigned char niScamTbl[MAX_SCSI_TAR][4]; /* Compressed Scam name string of Targets */ 234 Byte 20 of eeprom map */
235 unsigned char niAdapId; /* Host Adapter ID -
236 Byte 24 of eerpom map */
237 unsigned char niSyncTbl[MAX_SCSI_TAR / 2]; /* Sync/Wide byte
238 of targets */
239 unsigned char niScamTbl[MAX_SCSI_TAR][4]; /* Compressed Scam name
240 string of Targets */
235}; 241};
236 242
237#define MODEL_LT 1 243#define MODEL_LT 1
@@ -243,7 +249,7 @@ struct sccb_card {
243 struct sccb *currentSCCB; 249 struct sccb *currentSCCB;
244 struct sccb_mgr_info *cardInfo; 250 struct sccb_mgr_info *cardInfo;
245 251
246 unsigned long ioPort; 252 u32 ioPort;
247 253
248 unsigned short cmdCounter; 254 unsigned short cmdCounter;
249 unsigned char discQCount; 255 unsigned char discQCount;
@@ -780,37 +786,37 @@ typedef struct SCCBscam_info {
780#define MENABLE_INT(p_port) (WR_HARPOON(p_port+hp_page_ctrl, \ 786#define MENABLE_INT(p_port) (WR_HARPOON(p_port+hp_page_ctrl, \
781 (RD_HARPOON(p_port+hp_page_ctrl) & ~G_INT_DISABLE))) 787 (RD_HARPOON(p_port+hp_page_ctrl) & ~G_INT_DISABLE)))
782 788
783static unsigned char FPT_sisyncn(unsigned long port, unsigned char p_card, 789static unsigned char FPT_sisyncn(u32 port, unsigned char p_card,
784 unsigned char syncFlag); 790 unsigned char syncFlag);
785static void FPT_ssel(unsigned long port, unsigned char p_card); 791static void FPT_ssel(u32 port, unsigned char p_card);
786static void FPT_sres(unsigned long port, unsigned char p_card, 792static void FPT_sres(u32 port, unsigned char p_card,
787 struct sccb_card *pCurrCard); 793 struct sccb_card *pCurrCard);
788static void FPT_shandem(unsigned long port, unsigned char p_card, 794static void FPT_shandem(u32 port, unsigned char p_card,
789 struct sccb *pCurrSCCB); 795 struct sccb *pCurrSCCB);
790static void FPT_stsyncn(unsigned long port, unsigned char p_card); 796static void FPT_stsyncn(u32 port, unsigned char p_card);
791static void FPT_sisyncr(unsigned long port, unsigned char sync_pulse, 797static void FPT_sisyncr(u32 port, unsigned char sync_pulse,
792 unsigned char offset); 798 unsigned char offset);
793static void FPT_sssyncv(unsigned long p_port, unsigned char p_id, 799static void FPT_sssyncv(u32 p_port, unsigned char p_id,
794 unsigned char p_sync_value, 800 unsigned char p_sync_value,
795 struct sccb_mgr_tar_info *currTar_Info); 801 struct sccb_mgr_tar_info *currTar_Info);
796static void FPT_sresb(unsigned long port, unsigned char p_card); 802static void FPT_sresb(u32 port, unsigned char p_card);
797static void FPT_sxfrp(unsigned long p_port, unsigned char p_card); 803static void FPT_sxfrp(u32 p_port, unsigned char p_card);
798static void FPT_schkdd(unsigned long port, unsigned char p_card); 804static void FPT_schkdd(u32 port, unsigned char p_card);
799static unsigned char FPT_RdStack(unsigned long port, unsigned char index); 805static unsigned char FPT_RdStack(u32 port, unsigned char index);
800static void FPT_WrStack(unsigned long portBase, unsigned char index, 806static void FPT_WrStack(u32 portBase, unsigned char index,
801 unsigned char data); 807 unsigned char data);
802static unsigned char FPT_ChkIfChipInitialized(unsigned long ioPort); 808static unsigned char FPT_ChkIfChipInitialized(u32 ioPort);
803 809
804static void FPT_SendMsg(unsigned long port, unsigned char message); 810static void FPT_SendMsg(u32 port, unsigned char message);
805static void FPT_queueFlushTargSccb(unsigned char p_card, unsigned char thisTarg, 811static void FPT_queueFlushTargSccb(unsigned char p_card, unsigned char thisTarg,
806 unsigned char error_code); 812 unsigned char error_code);
807 813
808static void FPT_sinits(struct sccb *p_sccb, unsigned char p_card); 814static void FPT_sinits(struct sccb *p_sccb, unsigned char p_card);
809static void FPT_RNVRamData(struct nvram_info *pNvRamInfo); 815static void FPT_RNVRamData(struct nvram_info *pNvRamInfo);
810 816
811static unsigned char FPT_siwidn(unsigned long port, unsigned char p_card); 817static unsigned char FPT_siwidn(u32 port, unsigned char p_card);
812static void FPT_stwidn(unsigned long port, unsigned char p_card); 818static void FPT_stwidn(u32 port, unsigned char p_card);
813static void FPT_siwidr(unsigned long port, unsigned char width); 819static void FPT_siwidr(u32 port, unsigned char width);
814 820
815static void FPT_queueSelectFail(struct sccb_card *pCurrCard, 821static void FPT_queueSelectFail(struct sccb_card *pCurrCard,
816 unsigned char p_card); 822 unsigned char p_card);
@@ -827,45 +833,45 @@ static void FPT_utilUpdateResidual(struct sccb *p_SCCB);
827static unsigned short FPT_CalcCrc16(unsigned char buffer[]); 833static unsigned short FPT_CalcCrc16(unsigned char buffer[]);
828static unsigned char FPT_CalcLrc(unsigned char buffer[]); 834static unsigned char FPT_CalcLrc(unsigned char buffer[]);
829 835
830static void FPT_Wait1Second(unsigned long p_port); 836static void FPT_Wait1Second(u32 p_port);
831static void FPT_Wait(unsigned long p_port, unsigned char p_delay); 837static void FPT_Wait(u32 p_port, unsigned char p_delay);
832static void FPT_utilEEWriteOnOff(unsigned long p_port, unsigned char p_mode); 838static void FPT_utilEEWriteOnOff(u32 p_port, unsigned char p_mode);
833static void FPT_utilEEWrite(unsigned long p_port, unsigned short ee_data, 839static void FPT_utilEEWrite(u32 p_port, unsigned short ee_data,
834 unsigned short ee_addr); 840 unsigned short ee_addr);
835static unsigned short FPT_utilEERead(unsigned long p_port, 841static unsigned short FPT_utilEERead(u32 p_port,
836 unsigned short ee_addr); 842 unsigned short ee_addr);
837static unsigned short FPT_utilEEReadOrg(unsigned long p_port, 843static unsigned short FPT_utilEEReadOrg(u32 p_port,
838 unsigned short ee_addr); 844 unsigned short ee_addr);
839static void FPT_utilEESendCmdAddr(unsigned long p_port, unsigned char ee_cmd, 845static void FPT_utilEESendCmdAddr(u32 p_port, unsigned char ee_cmd,
840 unsigned short ee_addr); 846 unsigned short ee_addr);
841 847
842static void FPT_phaseDataOut(unsigned long port, unsigned char p_card); 848static void FPT_phaseDataOut(u32 port, unsigned char p_card);
843static void FPT_phaseDataIn(unsigned long port, unsigned char p_card); 849static void FPT_phaseDataIn(u32 port, unsigned char p_card);
844static void FPT_phaseCommand(unsigned long port, unsigned char p_card); 850static void FPT_phaseCommand(u32 port, unsigned char p_card);
845static void FPT_phaseStatus(unsigned long port, unsigned char p_card); 851static void FPT_phaseStatus(u32 port, unsigned char p_card);
846static void FPT_phaseMsgOut(unsigned long port, unsigned char p_card); 852static void FPT_phaseMsgOut(u32 port, unsigned char p_card);
847static void FPT_phaseMsgIn(unsigned long port, unsigned char p_card); 853static void FPT_phaseMsgIn(u32 port, unsigned char p_card);
848static void FPT_phaseIllegal(unsigned long port, unsigned char p_card); 854static void FPT_phaseIllegal(u32 port, unsigned char p_card);
849 855
850static void FPT_phaseDecode(unsigned long port, unsigned char p_card); 856static void FPT_phaseDecode(u32 port, unsigned char p_card);
851static void FPT_phaseChkFifo(unsigned long port, unsigned char p_card); 857static void FPT_phaseChkFifo(u32 port, unsigned char p_card);
852static void FPT_phaseBusFree(unsigned long p_port, unsigned char p_card); 858static void FPT_phaseBusFree(u32 p_port, unsigned char p_card);
853 859
854static void FPT_XbowInit(unsigned long port, unsigned char scamFlg); 860static void FPT_XbowInit(u32 port, unsigned char scamFlg);
855static void FPT_BusMasterInit(unsigned long p_port); 861static void FPT_BusMasterInit(u32 p_port);
856static void FPT_DiagEEPROM(unsigned long p_port); 862static void FPT_DiagEEPROM(u32 p_port);
857 863
858static void FPT_dataXferProcessor(unsigned long port, 864static void FPT_dataXferProcessor(u32 port,
859 struct sccb_card *pCurrCard); 865 struct sccb_card *pCurrCard);
860static void FPT_busMstrSGDataXferStart(unsigned long port, 866static void FPT_busMstrSGDataXferStart(u32 port,
861 struct sccb *pCurrSCCB); 867 struct sccb *pCurrSCCB);
862static void FPT_busMstrDataXferStart(unsigned long port, 868static void FPT_busMstrDataXferStart(u32 port,
863 struct sccb *pCurrSCCB); 869 struct sccb *pCurrSCCB);
864static void FPT_hostDataXferAbort(unsigned long port, unsigned char p_card, 870static void FPT_hostDataXferAbort(u32 port, unsigned char p_card,
865 struct sccb *pCurrSCCB); 871 struct sccb *pCurrSCCB);
866static void FPT_hostDataXferRestart(struct sccb *currSCCB); 872static void FPT_hostDataXferRestart(struct sccb *currSCCB);
867 873
868static unsigned char FPT_SccbMgr_bad_isr(unsigned long p_port, 874static unsigned char FPT_SccbMgr_bad_isr(u32 p_port,
869 unsigned char p_card, 875 unsigned char p_card,
870 struct sccb_card *pCurrCard, 876 struct sccb_card *pCurrCard,
871 unsigned short p_int); 877 unsigned short p_int);
@@ -879,28 +885,28 @@ static void FPT_SccbMgrTableInitTarget(unsigned char p_card,
879static void FPT_scini(unsigned char p_card, unsigned char p_our_id, 885static void FPT_scini(unsigned char p_card, unsigned char p_our_id,
880 unsigned char p_power_up); 886 unsigned char p_power_up);
881 887
882static int FPT_scarb(unsigned long p_port, unsigned char p_sel_type); 888static int FPT_scarb(u32 p_port, unsigned char p_sel_type);
883static void FPT_scbusf(unsigned long p_port); 889static void FPT_scbusf(u32 p_port);
884static void FPT_scsel(unsigned long p_port); 890static void FPT_scsel(u32 p_port);
885static void FPT_scasid(unsigned char p_card, unsigned long p_port); 891static void FPT_scasid(unsigned char p_card, u32 p_port);
886static unsigned char FPT_scxferc(unsigned long p_port, unsigned char p_data); 892static unsigned char FPT_scxferc(u32 p_port, unsigned char p_data);
887static unsigned char FPT_scsendi(unsigned long p_port, 893static unsigned char FPT_scsendi(u32 p_port,
888 unsigned char p_id_string[]); 894 unsigned char p_id_string[]);
889static unsigned char FPT_sciso(unsigned long p_port, 895static unsigned char FPT_sciso(u32 p_port,
890 unsigned char p_id_string[]); 896 unsigned char p_id_string[]);
891static void FPT_scwirod(unsigned long p_port, unsigned char p_data_bit); 897static void FPT_scwirod(u32 p_port, unsigned char p_data_bit);
892static void FPT_scwiros(unsigned long p_port, unsigned char p_data_bit); 898static void FPT_scwiros(u32 p_port, unsigned char p_data_bit);
893static unsigned char FPT_scvalq(unsigned char p_quintet); 899static unsigned char FPT_scvalq(unsigned char p_quintet);
894static unsigned char FPT_scsell(unsigned long p_port, unsigned char targ_id); 900static unsigned char FPT_scsell(u32 p_port, unsigned char targ_id);
895static void FPT_scwtsel(unsigned long p_port); 901static void FPT_scwtsel(u32 p_port);
896static void FPT_inisci(unsigned char p_card, unsigned long p_port, 902static void FPT_inisci(unsigned char p_card, u32 p_port,
897 unsigned char p_our_id); 903 unsigned char p_our_id);
898static void FPT_scsavdi(unsigned char p_card, unsigned long p_port); 904static void FPT_scsavdi(unsigned char p_card, u32 p_port);
899static unsigned char FPT_scmachid(unsigned char p_card, 905static unsigned char FPT_scmachid(unsigned char p_card,
900 unsigned char p_id_string[]); 906 unsigned char p_id_string[]);
901 907
902static void FPT_autoCmdCmplt(unsigned long p_port, unsigned char p_card); 908static void FPT_autoCmdCmplt(u32 p_port, unsigned char p_card);
903static void FPT_autoLoadDefaultMap(unsigned long p_port); 909static void FPT_autoLoadDefaultMap(u32 p_port);
904 910
905static struct sccb_mgr_tar_info FPT_sccbMgrTbl[MAX_CARDS][MAX_SCSI_TAR] = 911static struct sccb_mgr_tar_info FPT_sccbMgrTbl[MAX_CARDS][MAX_SCSI_TAR] =
906 { {{0}} }; 912 { {{0}} };
@@ -918,7 +924,7 @@ static unsigned char FPT_scamHAString[] =
918 924
919static unsigned short FPT_default_intena = 0; 925static unsigned short FPT_default_intena = 0;
920 926
921static void (*FPT_s_PhaseTbl[8]) (unsigned long, unsigned char) = { 927static void (*FPT_s_PhaseTbl[8]) (u32, unsigned char) = {
9220}; 9280};
923 929
924/*--------------------------------------------------------------------- 930/*---------------------------------------------------------------------
@@ -935,7 +941,7 @@ static int FlashPoint_ProbeHostAdapter(struct sccb_mgr_info *pCardInfo)
935 941
936 unsigned char i, j, id, ScamFlg; 942 unsigned char i, j, id, ScamFlg;
937 unsigned short temp, temp2, temp3, temp4, temp5, temp6; 943 unsigned short temp, temp2, temp3, temp4, temp5, temp6;
938 unsigned long ioport; 944 u32 ioport;
939 struct nvram_info *pCurrNvRam; 945 struct nvram_info *pCurrNvRam;
940 946
941 ioport = pCardInfo->si_baseaddr; 947 ioport = pCardInfo->si_baseaddr;
@@ -1201,23 +1207,21 @@ static int FlashPoint_ProbeHostAdapter(struct sccb_mgr_info *pCardInfo)
1201 * 1207 *
1202 *---------------------------------------------------------------------*/ 1208 *---------------------------------------------------------------------*/
1203 1209
1204static unsigned long FlashPoint_HardwareResetHostAdapter(struct sccb_mgr_info 1210static void *FlashPoint_HardwareResetHostAdapter(struct sccb_mgr_info
1205 *pCardInfo) 1211 *pCardInfo)
1206{ 1212{
1207 struct sccb_card *CurrCard = NULL; 1213 struct sccb_card *CurrCard = NULL;
1208 struct nvram_info *pCurrNvRam; 1214 struct nvram_info *pCurrNvRam;
1209 unsigned char i, j, thisCard, ScamFlg; 1215 unsigned char i, j, thisCard, ScamFlg;
1210 unsigned short temp, sync_bit_map, id; 1216 unsigned short temp, sync_bit_map, id;
1211 unsigned long ioport; 1217 u32 ioport;
1212 1218
1213 ioport = pCardInfo->si_baseaddr; 1219 ioport = pCardInfo->si_baseaddr;
1214 1220
1215 for (thisCard = 0; thisCard <= MAX_CARDS; thisCard++) { 1221 for (thisCard = 0; thisCard <= MAX_CARDS; thisCard++) {
1216 1222
1217 if (thisCard == MAX_CARDS) { 1223 if (thisCard == MAX_CARDS)
1218 1224 return (void *)FAILURE;
1219 return FAILURE;
1220 }
1221 1225
1222 if (FPT_BL_Card[thisCard].ioPort == ioport) { 1226 if (FPT_BL_Card[thisCard].ioPort == ioport) {
1223 1227
@@ -1384,16 +1388,16 @@ static unsigned long FlashPoint_HardwareResetHostAdapter(struct sccb_mgr_info
1384 (unsigned char)(RD_HARPOON((ioport + hp_semaphore)) | 1388 (unsigned char)(RD_HARPOON((ioport + hp_semaphore)) |
1385 SCCB_MGR_PRESENT)); 1389 SCCB_MGR_PRESENT));
1386 1390
1387 return (unsigned long)CurrCard; 1391 return (void *)CurrCard;
1388} 1392}
1389 1393
1390static void FlashPoint_ReleaseHostAdapter(unsigned long pCurrCard) 1394static void FlashPoint_ReleaseHostAdapter(void *pCurrCard)
1391{ 1395{
1392 unsigned char i; 1396 unsigned char i;
1393 unsigned long portBase; 1397 u32 portBase;
1394 unsigned long regOffset; 1398 u32 regOffset;
1395 unsigned long scamData; 1399 u32 scamData;
1396 unsigned long *pScamTbl; 1400 u32 *pScamTbl;
1397 struct nvram_info *pCurrNvRam; 1401 struct nvram_info *pCurrNvRam;
1398 1402
1399 pCurrNvRam = ((struct sccb_card *)pCurrCard)->pNvRamInfo; 1403 pCurrNvRam = ((struct sccb_card *)pCurrCard)->pNvRamInfo;
@@ -1414,7 +1418,7 @@ static void FlashPoint_ReleaseHostAdapter(unsigned long pCurrCard)
1414 1418
1415 for (i = 0; i < MAX_SCSI_TAR; i++) { 1419 for (i = 0; i < MAX_SCSI_TAR; i++) {
1416 regOffset = hp_aramBase + 64 + i * 4; 1420 regOffset = hp_aramBase + 64 + i * 4;
1417 pScamTbl = (unsigned long *)&pCurrNvRam->niScamTbl[i]; 1421 pScamTbl = (u32 *)&pCurrNvRam->niScamTbl[i];
1418 scamData = *pScamTbl; 1422 scamData = *pScamTbl;
1419 WR_HARP32(portBase, regOffset, scamData); 1423 WR_HARP32(portBase, regOffset, scamData);
1420 } 1424 }
@@ -1427,10 +1431,10 @@ static void FlashPoint_ReleaseHostAdapter(unsigned long pCurrCard)
1427static void FPT_RNVRamData(struct nvram_info *pNvRamInfo) 1431static void FPT_RNVRamData(struct nvram_info *pNvRamInfo)
1428{ 1432{
1429 unsigned char i; 1433 unsigned char i;
1430 unsigned long portBase; 1434 u32 portBase;
1431 unsigned long regOffset; 1435 u32 regOffset;
1432 unsigned long scamData; 1436 u32 scamData;
1433 unsigned long *pScamTbl; 1437 u32 *pScamTbl;
1434 1438
1435 pNvRamInfo->niModel = FPT_RdStack(pNvRamInfo->niBaseAddr, 0); 1439 pNvRamInfo->niModel = FPT_RdStack(pNvRamInfo->niBaseAddr, 0);
1436 pNvRamInfo->niSysConf = FPT_RdStack(pNvRamInfo->niBaseAddr, 1); 1440 pNvRamInfo->niSysConf = FPT_RdStack(pNvRamInfo->niBaseAddr, 1);
@@ -1447,26 +1451,25 @@ static void FPT_RNVRamData(struct nvram_info *pNvRamInfo)
1447 for (i = 0; i < MAX_SCSI_TAR; i++) { 1451 for (i = 0; i < MAX_SCSI_TAR; i++) {
1448 regOffset = hp_aramBase + 64 + i * 4; 1452 regOffset = hp_aramBase + 64 + i * 4;
1449 RD_HARP32(portBase, regOffset, scamData); 1453 RD_HARP32(portBase, regOffset, scamData);
1450 pScamTbl = (unsigned long *)&pNvRamInfo->niScamTbl[i]; 1454 pScamTbl = (u32 *)&pNvRamInfo->niScamTbl[i];
1451 *pScamTbl = scamData; 1455 *pScamTbl = scamData;
1452 } 1456 }
1453 1457
1454} 1458}
1455 1459
1456static unsigned char FPT_RdStack(unsigned long portBase, unsigned char index) 1460static unsigned char FPT_RdStack(u32 portBase, unsigned char index)
1457{ 1461{
1458 WR_HARPOON(portBase + hp_stack_addr, index); 1462 WR_HARPOON(portBase + hp_stack_addr, index);
1459 return RD_HARPOON(portBase + hp_stack_data); 1463 return RD_HARPOON(portBase + hp_stack_data);
1460} 1464}
1461 1465
1462static void FPT_WrStack(unsigned long portBase, unsigned char index, 1466static void FPT_WrStack(u32 portBase, unsigned char index, unsigned char data)
1463 unsigned char data)
1464{ 1467{
1465 WR_HARPOON(portBase + hp_stack_addr, index); 1468 WR_HARPOON(portBase + hp_stack_addr, index);
1466 WR_HARPOON(portBase + hp_stack_data, data); 1469 WR_HARPOON(portBase + hp_stack_data, data);
1467} 1470}
1468 1471
1469static unsigned char FPT_ChkIfChipInitialized(unsigned long ioPort) 1472static unsigned char FPT_ChkIfChipInitialized(u32 ioPort)
1470{ 1473{
1471 if ((RD_HARPOON(ioPort + hp_arb_id) & 0x0f) != FPT_RdStack(ioPort, 4)) 1474 if ((RD_HARPOON(ioPort + hp_arb_id) & 0x0f) != FPT_RdStack(ioPort, 4))
1472 return 0; 1475 return 0;
@@ -1489,15 +1492,16 @@ static unsigned char FPT_ChkIfChipInitialized(unsigned long ioPort)
1489 * callback function. 1492 * callback function.
1490 * 1493 *
1491 *---------------------------------------------------------------------*/ 1494 *---------------------------------------------------------------------*/
1492static void FlashPoint_StartCCB(unsigned long pCurrCard, struct sccb *p_Sccb) 1495static void FlashPoint_StartCCB(void *curr_card, struct sccb *p_Sccb)
1493{ 1496{
1494 unsigned long ioport; 1497 u32 ioport;
1495 unsigned char thisCard, lun; 1498 unsigned char thisCard, lun;
1496 struct sccb *pSaveSccb; 1499 struct sccb *pSaveSccb;
1497 CALL_BK_FN callback; 1500 CALL_BK_FN callback;
1501 struct sccb_card *pCurrCard = curr_card;
1498 1502
1499 thisCard = ((struct sccb_card *)pCurrCard)->cardIndex; 1503 thisCard = pCurrCard->cardIndex;
1500 ioport = ((struct sccb_card *)pCurrCard)->ioPort; 1504 ioport = pCurrCard->ioPort;
1501 1505
1502 if ((p_Sccb->TargID >= MAX_SCSI_TAR) || (p_Sccb->Lun >= MAX_LUN)) { 1506 if ((p_Sccb->TargID >= MAX_SCSI_TAR) || (p_Sccb->Lun >= MAX_LUN)) {
1503 1507
@@ -1512,18 +1516,18 @@ static void FlashPoint_StartCCB(unsigned long pCurrCard, struct sccb *p_Sccb)
1512 1516
1513 FPT_sinits(p_Sccb, thisCard); 1517 FPT_sinits(p_Sccb, thisCard);
1514 1518
1515 if (!((struct sccb_card *)pCurrCard)->cmdCounter) { 1519 if (!pCurrCard->cmdCounter) {
1516 WR_HARPOON(ioport + hp_semaphore, 1520 WR_HARPOON(ioport + hp_semaphore,
1517 (RD_HARPOON(ioport + hp_semaphore) 1521 (RD_HARPOON(ioport + hp_semaphore)
1518 | SCCB_MGR_ACTIVE)); 1522 | SCCB_MGR_ACTIVE));
1519 1523
1520 if (((struct sccb_card *)pCurrCard)->globalFlags & F_GREEN_PC) { 1524 if (pCurrCard->globalFlags & F_GREEN_PC) {
1521 WR_HARPOON(ioport + hp_clkctrl_0, CLKCTRL_DEFAULT); 1525 WR_HARPOON(ioport + hp_clkctrl_0, CLKCTRL_DEFAULT);
1522 WR_HARPOON(ioport + hp_sys_ctrl, 0x00); 1526 WR_HARPOON(ioport + hp_sys_ctrl, 0x00);
1523 } 1527 }
1524 } 1528 }
1525 1529
1526 ((struct sccb_card *)pCurrCard)->cmdCounter++; 1530 pCurrCard->cmdCounter++;
1527 1531
1528 if (RD_HARPOON(ioport + hp_semaphore) & BIOS_IN_USE) { 1532 if (RD_HARPOON(ioport + hp_semaphore) & BIOS_IN_USE) {
1529 1533
@@ -1532,10 +1536,10 @@ static void FlashPoint_StartCCB(unsigned long pCurrCard, struct sccb *p_Sccb)
1532 | TICKLE_ME)); 1536 | TICKLE_ME));
1533 if (p_Sccb->OperationCode == RESET_COMMAND) { 1537 if (p_Sccb->OperationCode == RESET_COMMAND) {
1534 pSaveSccb = 1538 pSaveSccb =
1535 ((struct sccb_card *)pCurrCard)->currentSCCB; 1539 pCurrCard->currentSCCB;
1536 ((struct sccb_card *)pCurrCard)->currentSCCB = p_Sccb; 1540 pCurrCard->currentSCCB = p_Sccb;
1537 FPT_queueSelectFail(&FPT_BL_Card[thisCard], thisCard); 1541 FPT_queueSelectFail(&FPT_BL_Card[thisCard], thisCard);
1538 ((struct sccb_card *)pCurrCard)->currentSCCB = 1542 pCurrCard->currentSCCB =
1539 pSaveSccb; 1543 pSaveSccb;
1540 } else { 1544 } else {
1541 FPT_queueAddSccb(p_Sccb, thisCard); 1545 FPT_queueAddSccb(p_Sccb, thisCard);
@@ -1546,10 +1550,10 @@ static void FlashPoint_StartCCB(unsigned long pCurrCard, struct sccb *p_Sccb)
1546 1550
1547 if (p_Sccb->OperationCode == RESET_COMMAND) { 1551 if (p_Sccb->OperationCode == RESET_COMMAND) {
1548 pSaveSccb = 1552 pSaveSccb =
1549 ((struct sccb_card *)pCurrCard)->currentSCCB; 1553 pCurrCard->currentSCCB;
1550 ((struct sccb_card *)pCurrCard)->currentSCCB = p_Sccb; 1554 pCurrCard->currentSCCB = p_Sccb;
1551 FPT_queueSelectFail(&FPT_BL_Card[thisCard], thisCard); 1555 FPT_queueSelectFail(&FPT_BL_Card[thisCard], thisCard);
1552 ((struct sccb_card *)pCurrCard)->currentSCCB = 1556 pCurrCard->currentSCCB =
1553 pSaveSccb; 1557 pSaveSccb;
1554 } else { 1558 } else {
1555 FPT_queueAddSccb(p_Sccb, thisCard); 1559 FPT_queueAddSccb(p_Sccb, thisCard);
@@ -1560,34 +1564,29 @@ static void FlashPoint_StartCCB(unsigned long pCurrCard, struct sccb *p_Sccb)
1560 1564
1561 MDISABLE_INT(ioport); 1565 MDISABLE_INT(ioport);
1562 1566
1563 if ((((struct sccb_card *)pCurrCard)->globalFlags & F_CONLUN_IO) 1567 if ((pCurrCard->globalFlags & F_CONLUN_IO) &&
1564 &&
1565 ((FPT_sccbMgrTbl[thisCard][p_Sccb->TargID]. 1568 ((FPT_sccbMgrTbl[thisCard][p_Sccb->TargID].
1566 TarStatus & TAR_TAG_Q_MASK) != TAG_Q_TRYING)) 1569 TarStatus & TAR_TAG_Q_MASK) != TAG_Q_TRYING))
1567 lun = p_Sccb->Lun; 1570 lun = p_Sccb->Lun;
1568 else 1571 else
1569 lun = 0; 1572 lun = 0;
1570 if ((((struct sccb_card *)pCurrCard)->currentSCCB == NULL) && 1573 if ((pCurrCard->currentSCCB == NULL) &&
1571 (FPT_sccbMgrTbl[thisCard][p_Sccb->TargID].TarSelQ_Cnt == 0) 1574 (FPT_sccbMgrTbl[thisCard][p_Sccb->TargID].TarSelQ_Cnt == 0)
1572 && (FPT_sccbMgrTbl[thisCard][p_Sccb->TargID].TarLUNBusy[lun] 1575 && (FPT_sccbMgrTbl[thisCard][p_Sccb->TargID].TarLUNBusy[lun]
1573 == 0)) { 1576 == 0)) {
1574 1577
1575 ((struct sccb_card *)pCurrCard)->currentSCCB = p_Sccb; 1578 pCurrCard->currentSCCB = p_Sccb;
1576 FPT_ssel(p_Sccb->SccbIOPort, thisCard); 1579 FPT_ssel(p_Sccb->SccbIOPort, thisCard);
1577 } 1580 }
1578 1581
1579 else { 1582 else {
1580 1583
1581 if (p_Sccb->OperationCode == RESET_COMMAND) { 1584 if (p_Sccb->OperationCode == RESET_COMMAND) {
1582 pSaveSccb = 1585 pSaveSccb = pCurrCard->currentSCCB;
1583 ((struct sccb_card *)pCurrCard)-> 1586 pCurrCard->currentSCCB = p_Sccb;
1584 currentSCCB;
1585 ((struct sccb_card *)pCurrCard)->currentSCCB =
1586 p_Sccb;
1587 FPT_queueSelectFail(&FPT_BL_Card[thisCard], 1587 FPT_queueSelectFail(&FPT_BL_Card[thisCard],
1588 thisCard); 1588 thisCard);
1589 ((struct sccb_card *)pCurrCard)->currentSCCB = 1589 pCurrCard->currentSCCB = pSaveSccb;
1590 pSaveSccb;
1591 } else { 1590 } else {
1592 FPT_queueAddSccb(p_Sccb, thisCard); 1591 FPT_queueAddSccb(p_Sccb, thisCard);
1593 } 1592 }
@@ -1607,9 +1606,9 @@ static void FlashPoint_StartCCB(unsigned long pCurrCard, struct sccb *p_Sccb)
1607 * callback function. 1606 * callback function.
1608 * 1607 *
1609 *---------------------------------------------------------------------*/ 1608 *---------------------------------------------------------------------*/
1610static int FlashPoint_AbortCCB(unsigned long pCurrCard, struct sccb *p_Sccb) 1609static int FlashPoint_AbortCCB(void *pCurrCard, struct sccb *p_Sccb)
1611{ 1610{
1612 unsigned long ioport; 1611 u32 ioport;
1613 1612
1614 unsigned char thisCard; 1613 unsigned char thisCard;
1615 CALL_BK_FN callback; 1614 CALL_BK_FN callback;
@@ -1715,9 +1714,9 @@ static int FlashPoint_AbortCCB(unsigned long pCurrCard, struct sccb *p_Sccb)
1715 * interrupt for this card and disable the IRQ Pin if so. 1714 * interrupt for this card and disable the IRQ Pin if so.
1716 * 1715 *
1717 *---------------------------------------------------------------------*/ 1716 *---------------------------------------------------------------------*/
1718static unsigned char FlashPoint_InterruptPending(unsigned long pCurrCard) 1717static unsigned char FlashPoint_InterruptPending(void *pCurrCard)
1719{ 1718{
1720 unsigned long ioport; 1719 u32 ioport;
1721 1720
1722 ioport = ((struct sccb_card *)pCurrCard)->ioPort; 1721 ioport = ((struct sccb_card *)pCurrCard)->ioPort;
1723 1722
@@ -1739,38 +1738,36 @@ static unsigned char FlashPoint_InterruptPending(unsigned long pCurrCard)
1739 * us. 1738 * us.
1740 * 1739 *
1741 *---------------------------------------------------------------------*/ 1740 *---------------------------------------------------------------------*/
1742static int FlashPoint_HandleInterrupt(unsigned long pCurrCard) 1741static int FlashPoint_HandleInterrupt(void *pcard)
1743{ 1742{
1744 struct sccb *currSCCB; 1743 struct sccb *currSCCB;
1745 unsigned char thisCard, result, bm_status, bm_int_st; 1744 unsigned char thisCard, result, bm_status, bm_int_st;
1746 unsigned short hp_int; 1745 unsigned short hp_int;
1747 unsigned char i, target; 1746 unsigned char i, target;
1748 unsigned long ioport; 1747 struct sccb_card *pCurrCard = pcard;
1748 u32 ioport;
1749 1749
1750 thisCard = ((struct sccb_card *)pCurrCard)->cardIndex; 1750 thisCard = pCurrCard->cardIndex;
1751 ioport = ((struct sccb_card *)pCurrCard)->ioPort; 1751 ioport = pCurrCard->ioPort;
1752 1752
1753 MDISABLE_INT(ioport); 1753 MDISABLE_INT(ioport);
1754 1754
1755 if ((bm_int_st = RD_HARPOON(ioport + hp_int_status)) & EXT_STATUS_ON) 1755 if ((bm_int_st = RD_HARPOON(ioport + hp_int_status)) & EXT_STATUS_ON)
1756 bm_status = 1756 bm_status = RD_HARPOON(ioport + hp_ext_status) &
1757 RD_HARPOON(ioport + 1757 (unsigned char)BAD_EXT_STATUS;
1758 hp_ext_status) & (unsigned char)BAD_EXT_STATUS;
1759 else 1758 else
1760 bm_status = 0; 1759 bm_status = 0;
1761 1760
1762 WR_HARPOON(ioport + hp_int_mask, (INT_CMD_COMPL | SCSI_INTERRUPT)); 1761 WR_HARPOON(ioport + hp_int_mask, (INT_CMD_COMPL | SCSI_INTERRUPT));
1763 1762
1764 while ((hp_int = 1763 while ((hp_int = RDW_HARPOON((ioport + hp_intstat)) &
1765 RDW_HARPOON((ioport + 1764 FPT_default_intena) | bm_status) {
1766 hp_intstat)) & FPT_default_intena) | bm_status) {
1767 1765
1768 currSCCB = ((struct sccb_card *)pCurrCard)->currentSCCB; 1766 currSCCB = pCurrCard->currentSCCB;
1769 1767
1770 if (hp_int & (FIFO | TIMEOUT | RESET | SCAM_SEL) || bm_status) { 1768 if (hp_int & (FIFO | TIMEOUT | RESET | SCAM_SEL) || bm_status) {
1771 result = 1769 result =
1772 FPT_SccbMgr_bad_isr(ioport, thisCard, 1770 FPT_SccbMgr_bad_isr(ioport, thisCard, pCurrCard,
1773 ((struct sccb_card *)pCurrCard),
1774 hp_int); 1771 hp_int);
1775 WRW_HARPOON((ioport + hp_intstat), 1772 WRW_HARPOON((ioport + hp_intstat),
1776 (FIFO | TIMEOUT | RESET | SCAM_SEL)); 1773 (FIFO | TIMEOUT | RESET | SCAM_SEL));
@@ -1796,8 +1793,7 @@ static int FlashPoint_HandleInterrupt(unsigned long pCurrCard)
1796 (BUS_FREE | RSEL))) ; 1793 (BUS_FREE | RSEL))) ;
1797 } 1794 }
1798 1795
1799 if (((struct sccb_card *)pCurrCard)-> 1796 if (pCurrCard->globalFlags & F_HOST_XFER_ACT)
1800 globalFlags & F_HOST_XFER_ACT)
1801 1797
1802 FPT_phaseChkFifo(ioport, thisCard); 1798 FPT_phaseChkFifo(ioport, thisCard);
1803 1799
@@ -1813,14 +1809,11 @@ static int FlashPoint_HandleInterrupt(unsigned long pCurrCard)
1813 1809
1814 else if (hp_int & ITAR_DISC) { 1810 else if (hp_int & ITAR_DISC) {
1815 1811
1816 if (((struct sccb_card *)pCurrCard)-> 1812 if (pCurrCard->globalFlags & F_HOST_XFER_ACT)
1817 globalFlags & F_HOST_XFER_ACT) {
1818
1819 FPT_phaseChkFifo(ioport, thisCard); 1813 FPT_phaseChkFifo(ioport, thisCard);
1820 1814
1821 } 1815 if (RD_HARPOON(ioport + hp_gp_reg_1) ==
1822 1816 SMSAVE_DATA_PTR) {
1823 if (RD_HARPOON(ioport + hp_gp_reg_1) == SMSAVE_DATA_PTR) {
1824 1817
1825 WR_HARPOON(ioport + hp_gp_reg_1, 0x00); 1818 WR_HARPOON(ioport + hp_gp_reg_1, 0x00);
1826 currSCCB->Sccb_XferState |= F_NO_DATA_YET; 1819 currSCCB->Sccb_XferState |= F_NO_DATA_YET;
@@ -1859,8 +1852,7 @@ static int FlashPoint_HandleInterrupt(unsigned long pCurrCard)
1859 WRW_HARPOON((ioport + hp_intstat), 1852 WRW_HARPOON((ioport + hp_intstat),
1860 (BUS_FREE | ITAR_DISC)); 1853 (BUS_FREE | ITAR_DISC));
1861 1854
1862 ((struct sccb_card *)pCurrCard)->globalFlags |= 1855 pCurrCard->globalFlags |= F_NEW_SCCB_CMD;
1863 F_NEW_SCCB_CMD;
1864 1856
1865 } 1857 }
1866 1858
@@ -1870,10 +1862,8 @@ static int FlashPoint_HandleInterrupt(unsigned long pCurrCard)
1870 (PROG_HLT | RSEL | PHASE | BUS_FREE)); 1862 (PROG_HLT | RSEL | PHASE | BUS_FREE));
1871 1863
1872 if (RDW_HARPOON((ioport + hp_intstat)) & ITAR_DISC) { 1864 if (RDW_HARPOON((ioport + hp_intstat)) & ITAR_DISC) {
1873 if (((struct sccb_card *)pCurrCard)-> 1865 if (pCurrCard->globalFlags & F_HOST_XFER_ACT)
1874 globalFlags & F_HOST_XFER_ACT) {
1875 FPT_phaseChkFifo(ioport, thisCard); 1866 FPT_phaseChkFifo(ioport, thisCard);
1876 }
1877 1867
1878 if (RD_HARPOON(ioport + hp_gp_reg_1) == 1868 if (RD_HARPOON(ioport + hp_gp_reg_1) ==
1879 SMSAVE_DATA_PTR) { 1869 SMSAVE_DATA_PTR) {
@@ -1890,8 +1880,7 @@ static int FlashPoint_HandleInterrupt(unsigned long pCurrCard)
1890 FPT_queueDisconnect(currSCCB, thisCard); 1880 FPT_queueDisconnect(currSCCB, thisCard);
1891 } 1881 }
1892 1882
1893 FPT_sres(ioport, thisCard, 1883 FPT_sres(ioport, thisCard, pCurrCard);
1894 ((struct sccb_card *)pCurrCard));
1895 FPT_phaseDecode(ioport, thisCard); 1884 FPT_phaseDecode(ioport, thisCard);
1896 1885
1897 } 1886 }
@@ -1948,8 +1937,7 @@ static int FlashPoint_HandleInterrupt(unsigned long pCurrCard)
1948 1937
1949 WRW_HARPOON((ioport + hp_intstat), BUS_FREE); 1938 WRW_HARPOON((ioport + hp_intstat), BUS_FREE);
1950 1939
1951 if (((struct sccb_card *)pCurrCard)-> 1940 if (pCurrCard->globalFlags & F_HOST_XFER_ACT) {
1952 globalFlags & F_HOST_XFER_ACT) {
1953 1941
1954 FPT_hostDataXferAbort(ioport, thisCard, 1942 FPT_hostDataXferAbort(ioport, thisCard,
1955 currSCCB); 1943 currSCCB);
@@ -1961,27 +1949,19 @@ static int FlashPoint_HandleInterrupt(unsigned long pCurrCard)
1961 else if (hp_int & ITICKLE) { 1949 else if (hp_int & ITICKLE) {
1962 1950
1963 WRW_HARPOON((ioport + hp_intstat), ITICKLE); 1951 WRW_HARPOON((ioport + hp_intstat), ITICKLE);
1964 ((struct sccb_card *)pCurrCard)->globalFlags |= 1952 pCurrCard->globalFlags |= F_NEW_SCCB_CMD;
1965 F_NEW_SCCB_CMD;
1966 } 1953 }
1967 1954
1968 if (((struct sccb_card *)pCurrCard)-> 1955 if (((struct sccb_card *)pCurrCard)->
1969 globalFlags & F_NEW_SCCB_CMD) { 1956 globalFlags & F_NEW_SCCB_CMD) {
1970 1957
1971 ((struct sccb_card *)pCurrCard)->globalFlags &= 1958 pCurrCard->globalFlags &= ~F_NEW_SCCB_CMD;
1972 ~F_NEW_SCCB_CMD;
1973 1959
1974 if (((struct sccb_card *)pCurrCard)->currentSCCB == 1960 if (pCurrCard->currentSCCB == NULL)
1975 NULL) { 1961 FPT_queueSearchSelect(pCurrCard, thisCard);
1976
1977 FPT_queueSearchSelect(((struct sccb_card *)
1978 pCurrCard), thisCard);
1979 }
1980 1962
1981 if (((struct sccb_card *)pCurrCard)->currentSCCB != 1963 if (pCurrCard->currentSCCB != NULL) {
1982 NULL) { 1964 pCurrCard->globalFlags &= ~F_NEW_SCCB_CMD;
1983 ((struct sccb_card *)pCurrCard)->globalFlags &=
1984 ~F_NEW_SCCB_CMD;
1985 FPT_ssel(ioport, thisCard); 1965 FPT_ssel(ioport, thisCard);
1986 } 1966 }
1987 1967
@@ -2006,8 +1986,7 @@ static int FlashPoint_HandleInterrupt(unsigned long pCurrCard)
2006 * processing time. 1986 * processing time.
2007 * 1987 *
2008 *---------------------------------------------------------------------*/ 1988 *---------------------------------------------------------------------*/
2009static unsigned char FPT_SccbMgr_bad_isr(unsigned long p_port, 1989static unsigned char FPT_SccbMgr_bad_isr(u32 p_port, unsigned char p_card,
2010 unsigned char p_card,
2011 struct sccb_card *pCurrCard, 1990 struct sccb_card *pCurrCard,
2012 unsigned short p_int) 1991 unsigned short p_int)
2013{ 1992{
@@ -2254,7 +2233,7 @@ static void FPT_SccbMgrTableInitTarget(unsigned char p_card,
2254 * 2233 *
2255 *---------------------------------------------------------------------*/ 2234 *---------------------------------------------------------------------*/
2256 2235
2257static unsigned char FPT_sfm(unsigned long port, struct sccb *pCurrSCCB) 2236static unsigned char FPT_sfm(u32 port, struct sccb *pCurrSCCB)
2258{ 2237{
2259 unsigned char message; 2238 unsigned char message;
2260 unsigned short TimeOutLoop; 2239 unsigned short TimeOutLoop;
@@ -2322,12 +2301,12 @@ static unsigned char FPT_sfm(unsigned long port, struct sccb *pCurrSCCB)
2322 * 2301 *
2323 *---------------------------------------------------------------------*/ 2302 *---------------------------------------------------------------------*/
2324 2303
2325static void FPT_ssel(unsigned long port, unsigned char p_card) 2304static void FPT_ssel(u32 port, unsigned char p_card)
2326{ 2305{
2327 2306
2328 unsigned char auto_loaded, i, target, *theCCB; 2307 unsigned char auto_loaded, i, target, *theCCB;
2329 2308
2330 unsigned long cdb_reg; 2309 u32 cdb_reg;
2331 struct sccb_card *CurrCard; 2310 struct sccb_card *CurrCard;
2332 struct sccb *currSCCB; 2311 struct sccb *currSCCB;
2333 struct sccb_mgr_tar_info *currTar_Info; 2312 struct sccb_mgr_tar_info *currTar_Info;
@@ -2621,7 +2600,7 @@ static void FPT_ssel(unsigned long port, unsigned char p_card)
2621 * 2600 *
2622 *---------------------------------------------------------------------*/ 2601 *---------------------------------------------------------------------*/
2623 2602
2624static void FPT_sres(unsigned long port, unsigned char p_card, 2603static void FPT_sres(u32 port, unsigned char p_card,
2625 struct sccb_card *pCurrCard) 2604 struct sccb_card *pCurrCard)
2626{ 2605{
2627 2606
@@ -2857,7 +2836,7 @@ static void FPT_sres(unsigned long port, unsigned char p_card,
2857 (RD_HARPOON(port + hp_scsisig) & SCSI_BSY)) ; 2836 (RD_HARPOON(port + hp_scsisig) & SCSI_BSY)) ;
2858} 2837}
2859 2838
2860static void FPT_SendMsg(unsigned long port, unsigned char message) 2839static void FPT_SendMsg(u32 port, unsigned char message)
2861{ 2840{
2862 while (!(RD_HARPOON(port + hp_scsisig) & SCSI_REQ)) { 2841 while (!(RD_HARPOON(port + hp_scsisig) & SCSI_REQ)) {
2863 if (!(RD_HARPOON(port + hp_scsisig) & SCSI_BSY)) { 2842 if (!(RD_HARPOON(port + hp_scsisig) & SCSI_BSY)) {
@@ -2904,8 +2883,7 @@ static void FPT_SendMsg(unsigned long port, unsigned char message)
2904 * target device. 2883 * target device.
2905 * 2884 *
2906 *---------------------------------------------------------------------*/ 2885 *---------------------------------------------------------------------*/
2907static void FPT_sdecm(unsigned char message, unsigned long port, 2886static void FPT_sdecm(unsigned char message, u32 port, unsigned char p_card)
2908 unsigned char p_card)
2909{ 2887{
2910 struct sccb *currSCCB; 2888 struct sccb *currSCCB;
2911 struct sccb_card *CurrCard; 2889 struct sccb_card *CurrCard;
@@ -3085,8 +3063,7 @@ static void FPT_sdecm(unsigned char message, unsigned long port,
3085 * Description: Decide what to do with the extended message. 3063 * Description: Decide what to do with the extended message.
3086 * 3064 *
3087 *---------------------------------------------------------------------*/ 3065 *---------------------------------------------------------------------*/
3088static void FPT_shandem(unsigned long port, unsigned char p_card, 3066static void FPT_shandem(u32 port, unsigned char p_card, struct sccb *pCurrSCCB)
3089 struct sccb *pCurrSCCB)
3090{ 3067{
3091 unsigned char length, message; 3068 unsigned char length, message;
3092 3069
@@ -3153,7 +3130,7 @@ static void FPT_shandem(unsigned long port, unsigned char p_card,
3153 * 3130 *
3154 *---------------------------------------------------------------------*/ 3131 *---------------------------------------------------------------------*/
3155 3132
3156static unsigned char FPT_sisyncn(unsigned long port, unsigned char p_card, 3133static unsigned char FPT_sisyncn(u32 port, unsigned char p_card,
3157 unsigned char syncFlag) 3134 unsigned char syncFlag)
3158{ 3135{
3159 struct sccb *currSCCB; 3136 struct sccb *currSCCB;
@@ -3234,7 +3211,7 @@ static unsigned char FPT_sisyncn(unsigned long port, unsigned char p_card,
3234 * necessary. 3211 * necessary.
3235 * 3212 *
3236 *---------------------------------------------------------------------*/ 3213 *---------------------------------------------------------------------*/
3237static void FPT_stsyncn(unsigned long port, unsigned char p_card) 3214static void FPT_stsyncn(u32 port, unsigned char p_card)
3238{ 3215{
3239 unsigned char sync_msg, offset, sync_reg, our_sync_msg; 3216 unsigned char sync_msg, offset, sync_reg, our_sync_msg;
3240 struct sccb *currSCCB; 3217 struct sccb *currSCCB;
@@ -3363,7 +3340,7 @@ static void FPT_stsyncn(unsigned long port, unsigned char p_card)
3363 * Description: Answer the targets sync message. 3340 * Description: Answer the targets sync message.
3364 * 3341 *
3365 *---------------------------------------------------------------------*/ 3342 *---------------------------------------------------------------------*/
3366static void FPT_sisyncr(unsigned long port, unsigned char sync_pulse, 3343static void FPT_sisyncr(u32 port, unsigned char sync_pulse,
3367 unsigned char offset) 3344 unsigned char offset)
3368{ 3345{
3369 ARAM_ACCESS(port); 3346 ARAM_ACCESS(port);
@@ -3394,7 +3371,7 @@ static void FPT_sisyncr(unsigned long port, unsigned char sync_pulse,
3394 * 3371 *
3395 *---------------------------------------------------------------------*/ 3372 *---------------------------------------------------------------------*/
3396 3373
3397static unsigned char FPT_siwidn(unsigned long port, unsigned char p_card) 3374static unsigned char FPT_siwidn(u32 port, unsigned char p_card)
3398{ 3375{
3399 struct sccb *currSCCB; 3376 struct sccb *currSCCB;
3400 struct sccb_mgr_tar_info *currTar_Info; 3377 struct sccb_mgr_tar_info *currTar_Info;
@@ -3449,7 +3426,7 @@ static unsigned char FPT_siwidn(unsigned long port, unsigned char p_card)
3449 * necessary. 3426 * necessary.
3450 * 3427 *
3451 *---------------------------------------------------------------------*/ 3428 *---------------------------------------------------------------------*/
3452static void FPT_stwidn(unsigned long port, unsigned char p_card) 3429static void FPT_stwidn(u32 port, unsigned char p_card)
3453{ 3430{
3454 unsigned char width; 3431 unsigned char width;
3455 struct sccb *currSCCB; 3432 struct sccb *currSCCB;
@@ -3520,7 +3497,7 @@ static void FPT_stwidn(unsigned long port, unsigned char p_card)
3520 * Description: Answer the targets Wide nego message. 3497 * Description: Answer the targets Wide nego message.
3521 * 3498 *
3522 *---------------------------------------------------------------------*/ 3499 *---------------------------------------------------------------------*/
3523static void FPT_siwidr(unsigned long port, unsigned char width) 3500static void FPT_siwidr(u32 port, unsigned char width)
3524{ 3501{
3525 ARAM_ACCESS(port); 3502 ARAM_ACCESS(port);
3526 WRW_HARPOON((port + SYNC_MSGS + 0), (MPM_OP + AMSG_OUT + SMEXT)); 3503 WRW_HARPOON((port + SYNC_MSGS + 0), (MPM_OP + AMSG_OUT + SMEXT));
@@ -3548,7 +3525,7 @@ static void FPT_siwidr(unsigned long port, unsigned char width)
3548 * ID specified. 3525 * ID specified.
3549 * 3526 *
3550 *---------------------------------------------------------------------*/ 3527 *---------------------------------------------------------------------*/
3551static void FPT_sssyncv(unsigned long p_port, unsigned char p_id, 3528static void FPT_sssyncv(u32 p_port, unsigned char p_id,
3552 unsigned char p_sync_value, 3529 unsigned char p_sync_value,
3553 struct sccb_mgr_tar_info *currTar_Info) 3530 struct sccb_mgr_tar_info *currTar_Info)
3554{ 3531{
@@ -3620,7 +3597,7 @@ static void FPT_sssyncv(unsigned long p_port, unsigned char p_id,
3620 * Description: Reset the desired card's SCSI bus. 3597 * Description: Reset the desired card's SCSI bus.
3621 * 3598 *
3622 *---------------------------------------------------------------------*/ 3599 *---------------------------------------------------------------------*/
3623static void FPT_sresb(unsigned long port, unsigned char p_card) 3600static void FPT_sresb(u32 port, unsigned char p_card)
3624{ 3601{
3625 unsigned char scsiID, i; 3602 unsigned char scsiID, i;
3626 3603
@@ -3713,7 +3690,7 @@ static void FPT_ssenss(struct sccb_card *pCurrCard)
3713 currSCCB->Cdb[4] = currSCCB->RequestSenseLength; 3690 currSCCB->Cdb[4] = currSCCB->RequestSenseLength;
3714 currSCCB->Cdb[5] = 0x00; 3691 currSCCB->Cdb[5] = 0x00;
3715 3692
3716 currSCCB->Sccb_XferCnt = (unsigned long)currSCCB->RequestSenseLength; 3693 currSCCB->Sccb_XferCnt = (u32)currSCCB->RequestSenseLength;
3717 3694
3718 currSCCB->Sccb_ATC = 0x00; 3695 currSCCB->Sccb_ATC = 0x00;
3719 3696
@@ -3737,7 +3714,7 @@ static void FPT_ssenss(struct sccb_card *pCurrCard)
3737 * 3714 *
3738 *---------------------------------------------------------------------*/ 3715 *---------------------------------------------------------------------*/
3739 3716
3740static void FPT_sxfrp(unsigned long p_port, unsigned char p_card) 3717static void FPT_sxfrp(u32 p_port, unsigned char p_card)
3741{ 3718{
3742 unsigned char curr_phz; 3719 unsigned char curr_phz;
3743 3720
@@ -3819,7 +3796,7 @@ static void FPT_sxfrp(unsigned long p_port, unsigned char p_card)
3819 * 3796 *
3820 *---------------------------------------------------------------------*/ 3797 *---------------------------------------------------------------------*/
3821 3798
3822static void FPT_schkdd(unsigned long port, unsigned char p_card) 3799static void FPT_schkdd(u32 port, unsigned char p_card)
3823{ 3800{
3824 unsigned short TimeOutLoop; 3801 unsigned short TimeOutLoop;
3825 unsigned char sPhase; 3802 unsigned char sPhase;
@@ -3998,10 +3975,10 @@ static void FPT_sinits(struct sccb *p_sccb, unsigned char p_card)
3998 * 3975 *
3999 *---------------------------------------------------------------------*/ 3976 *---------------------------------------------------------------------*/
4000 3977
4001static void FPT_phaseDecode(unsigned long p_port, unsigned char p_card) 3978static void FPT_phaseDecode(u32 p_port, unsigned char p_card)
4002{ 3979{
4003 unsigned char phase_ref; 3980 unsigned char phase_ref;
4004 void (*phase) (unsigned long, unsigned char); 3981 void (*phase) (u32, unsigned char);
4005 3982
4006 DISABLE_AUTO(p_port); 3983 DISABLE_AUTO(p_port);
4007 3984
@@ -4021,7 +3998,7 @@ static void FPT_phaseDecode(unsigned long p_port, unsigned char p_card)
4021 * 3998 *
4022 *---------------------------------------------------------------------*/ 3999 *---------------------------------------------------------------------*/
4023 4000
4024static void FPT_phaseDataOut(unsigned long port, unsigned char p_card) 4001static void FPT_phaseDataOut(u32 port, unsigned char p_card)
4025{ 4002{
4026 4003
4027 struct sccb *currSCCB; 4004 struct sccb *currSCCB;
@@ -4062,7 +4039,7 @@ static void FPT_phaseDataOut(unsigned long port, unsigned char p_card)
4062 * 4039 *
4063 *---------------------------------------------------------------------*/ 4040 *---------------------------------------------------------------------*/
4064 4041
4065static void FPT_phaseDataIn(unsigned long port, unsigned char p_card) 4042static void FPT_phaseDataIn(u32 port, unsigned char p_card)
4066{ 4043{
4067 4044
4068 struct sccb *currSCCB; 4045 struct sccb *currSCCB;
@@ -4106,10 +4083,10 @@ static void FPT_phaseDataIn(unsigned long port, unsigned char p_card)
4106 * 4083 *
4107 *---------------------------------------------------------------------*/ 4084 *---------------------------------------------------------------------*/
4108 4085
4109static void FPT_phaseCommand(unsigned long p_port, unsigned char p_card) 4086static void FPT_phaseCommand(u32 p_port, unsigned char p_card)
4110{ 4087{
4111 struct sccb *currSCCB; 4088 struct sccb *currSCCB;
4112 unsigned long cdb_reg; 4089 u32 cdb_reg;
4113 unsigned char i; 4090 unsigned char i;
4114 4091
4115 currSCCB = FPT_BL_Card[p_card].currentSCCB; 4092 currSCCB = FPT_BL_Card[p_card].currentSCCB;
@@ -4157,7 +4134,7 @@ static void FPT_phaseCommand(unsigned long p_port, unsigned char p_card)
4157 * 4134 *
4158 *---------------------------------------------------------------------*/ 4135 *---------------------------------------------------------------------*/
4159 4136
4160static void FPT_phaseStatus(unsigned long port, unsigned char p_card) 4137static void FPT_phaseStatus(u32 port, unsigned char p_card)
4161{ 4138{
4162 /* Start-up the automation to finish off this command and let the 4139 /* Start-up the automation to finish off this command and let the
4163 isr handle the interrupt for command complete when it comes in. 4140 isr handle the interrupt for command complete when it comes in.
@@ -4178,7 +4155,7 @@ static void FPT_phaseStatus(unsigned long port, unsigned char p_card)
4178 * 4155 *
4179 *---------------------------------------------------------------------*/ 4156 *---------------------------------------------------------------------*/
4180 4157
4181static void FPT_phaseMsgOut(unsigned long port, unsigned char p_card) 4158static void FPT_phaseMsgOut(u32 port, unsigned char p_card)
4182{ 4159{
4183 unsigned char message, scsiID; 4160 unsigned char message, scsiID;
4184 struct sccb *currSCCB; 4161 struct sccb *currSCCB;
@@ -4317,7 +4294,7 @@ static void FPT_phaseMsgOut(unsigned long port, unsigned char p_card)
4317 * 4294 *
4318 *---------------------------------------------------------------------*/ 4295 *---------------------------------------------------------------------*/
4319 4296
4320static void FPT_phaseMsgIn(unsigned long port, unsigned char p_card) 4297static void FPT_phaseMsgIn(u32 port, unsigned char p_card)
4321{ 4298{
4322 unsigned char message; 4299 unsigned char message;
4323 struct sccb *currSCCB; 4300 struct sccb *currSCCB;
@@ -4364,7 +4341,7 @@ static void FPT_phaseMsgIn(unsigned long port, unsigned char p_card)
4364 * 4341 *
4365 *---------------------------------------------------------------------*/ 4342 *---------------------------------------------------------------------*/
4366 4343
4367static void FPT_phaseIllegal(unsigned long port, unsigned char p_card) 4344static void FPT_phaseIllegal(u32 port, unsigned char p_card)
4368{ 4345{
4369 struct sccb *currSCCB; 4346 struct sccb *currSCCB;
4370 4347
@@ -4390,9 +4367,9 @@ static void FPT_phaseIllegal(unsigned long port, unsigned char p_card)
4390 * 4367 *
4391 *---------------------------------------------------------------------*/ 4368 *---------------------------------------------------------------------*/
4392 4369
4393static void FPT_phaseChkFifo(unsigned long port, unsigned char p_card) 4370static void FPT_phaseChkFifo(u32 port, unsigned char p_card)
4394{ 4371{
4395 unsigned long xfercnt; 4372 u32 xfercnt;
4396 struct sccb *currSCCB; 4373 struct sccb *currSCCB;
4397 4374
4398 currSCCB = FPT_BL_Card[p_card].currentSCCB; 4375 currSCCB = FPT_BL_Card[p_card].currentSCCB;
@@ -4461,7 +4438,7 @@ static void FPT_phaseChkFifo(unsigned long port, unsigned char p_card)
4461 * because of command complete or from a disconnect. 4438 * because of command complete or from a disconnect.
4462 * 4439 *
4463 *---------------------------------------------------------------------*/ 4440 *---------------------------------------------------------------------*/
4464static void FPT_phaseBusFree(unsigned long port, unsigned char p_card) 4441static void FPT_phaseBusFree(u32 port, unsigned char p_card)
4465{ 4442{
4466 struct sccb *currSCCB; 4443 struct sccb *currSCCB;
4467 4444
@@ -4557,9 +4534,9 @@ static void FPT_phaseBusFree(unsigned long port, unsigned char p_card)
4557 * Description: Load the Automation RAM with the defualt map values. 4534 * Description: Load the Automation RAM with the defualt map values.
4558 * 4535 *
4559 *---------------------------------------------------------------------*/ 4536 *---------------------------------------------------------------------*/
4560static void FPT_autoLoadDefaultMap(unsigned long p_port) 4537static void FPT_autoLoadDefaultMap(u32 p_port)
4561{ 4538{
4562 unsigned long map_addr; 4539 u32 map_addr;
4563 4540
4564 ARAM_ACCESS(p_port); 4541 ARAM_ACCESS(p_port);
4565 map_addr = p_port + hp_aramBase; 4542 map_addr = p_port + hp_aramBase;
@@ -4663,7 +4640,7 @@ static void FPT_autoLoadDefaultMap(unsigned long p_port)
4663 * 4640 *
4664 *---------------------------------------------------------------------*/ 4641 *---------------------------------------------------------------------*/
4665 4642
4666static void FPT_autoCmdCmplt(unsigned long p_port, unsigned char p_card) 4643static void FPT_autoCmdCmplt(u32 p_port, unsigned char p_card)
4667{ 4644{
4668 struct sccb *currSCCB; 4645 struct sccb *currSCCB;
4669 unsigned char status_byte; 4646 unsigned char status_byte;
@@ -4936,8 +4913,7 @@ static void FPT_autoCmdCmplt(unsigned long p_port, unsigned char p_card)
4936 * 4913 *
4937 *---------------------------------------------------------------------*/ 4914 *---------------------------------------------------------------------*/
4938 4915
4939static void FPT_dataXferProcessor(unsigned long port, 4916static void FPT_dataXferProcessor(u32 port, struct sccb_card *pCurrCard)
4940 struct sccb_card *pCurrCard)
4941{ 4917{
4942 struct sccb *currSCCB; 4918 struct sccb *currSCCB;
4943 4919
@@ -4970,22 +4946,18 @@ static void FPT_dataXferProcessor(unsigned long port,
4970 * Description: 4946 * Description:
4971 * 4947 *
4972 *---------------------------------------------------------------------*/ 4948 *---------------------------------------------------------------------*/
4973static void FPT_busMstrSGDataXferStart(unsigned long p_port, 4949static void FPT_busMstrSGDataXferStart(u32 p_port, struct sccb *pcurrSCCB)
4974 struct sccb *pcurrSCCB)
4975{ 4950{
4976 unsigned long count, addr, tmpSGCnt; 4951 u32 count, addr, tmpSGCnt;
4977 unsigned int sg_index; 4952 unsigned int sg_index;
4978 unsigned char sg_count, i; 4953 unsigned char sg_count, i;
4979 unsigned long reg_offset; 4954 u32 reg_offset;
4980 4955 struct blogic_sg_seg *segp;
4981 if (pcurrSCCB->Sccb_XferState & F_HOST_XFER_DIR) {
4982 4956
4983 count = ((unsigned long)HOST_RD_CMD) << 24; 4957 if (pcurrSCCB->Sccb_XferState & F_HOST_XFER_DIR)
4984 } 4958 count = ((u32)HOST_RD_CMD) << 24;
4985 4959 else
4986 else { 4960 count = ((u32)HOST_WRT_CMD) << 24;
4987 count = ((unsigned long)HOST_WRT_CMD) << 24;
4988 }
4989 4961
4990 sg_count = 0; 4962 sg_count = 0;
4991 tmpSGCnt = 0; 4963 tmpSGCnt = 0;
@@ -4998,25 +4970,20 @@ static void FPT_busMstrSGDataXferStart(unsigned long p_port,
4998 WR_HARPOON(p_port + hp_page_ctrl, i); 4970 WR_HARPOON(p_port + hp_page_ctrl, i);
4999 4971
5000 while ((sg_count < (unsigned char)SG_BUF_CNT) && 4972 while ((sg_count < (unsigned char)SG_BUF_CNT) &&
5001 ((unsigned long)(sg_index * (unsigned int)SG_ELEMENT_SIZE) < 4973 ((sg_index * (unsigned int)SG_ELEMENT_SIZE) <
5002 pcurrSCCB->DataLength)) { 4974 pcurrSCCB->DataLength)) {
5003
5004 tmpSGCnt += *(((unsigned long *)pcurrSCCB->DataPointer) +
5005 (sg_index * 2));
5006
5007 count |= *(((unsigned long *)pcurrSCCB->DataPointer) +
5008 (sg_index * 2));
5009 4975
5010 addr = *(((unsigned long *)pcurrSCCB->DataPointer) + 4976 segp = (struct blogic_sg_seg *)(pcurrSCCB->DataPointer) +
5011 ((sg_index * 2) + 1)); 4977 sg_index;
4978 tmpSGCnt += segp->segbytes;
4979 count |= segp->segbytes;
4980 addr = segp->segdata;
5012 4981
5013 if ((!sg_count) && (pcurrSCCB->Sccb_SGoffset)) { 4982 if ((!sg_count) && (pcurrSCCB->Sccb_SGoffset)) {
5014
5015 addr += 4983 addr +=
5016 ((count & 0x00FFFFFFL) - pcurrSCCB->Sccb_SGoffset); 4984 ((count & 0x00FFFFFFL) - pcurrSCCB->Sccb_SGoffset);
5017 count = 4985 count =
5018 (count & 0xFF000000L) | pcurrSCCB->Sccb_SGoffset; 4986 (count & 0xFF000000L) | pcurrSCCB->Sccb_SGoffset;
5019
5020 tmpSGCnt = count & 0x00FFFFFFL; 4987 tmpSGCnt = count & 0x00FFFFFFL;
5021 } 4988 }
5022 4989
@@ -5072,17 +5039,15 @@ static void FPT_busMstrSGDataXferStart(unsigned long p_port,
5072 * Description: 5039 * Description:
5073 * 5040 *
5074 *---------------------------------------------------------------------*/ 5041 *---------------------------------------------------------------------*/
5075static void FPT_busMstrDataXferStart(unsigned long p_port, 5042static void FPT_busMstrDataXferStart(u32 p_port, struct sccb *pcurrSCCB)
5076 struct sccb *pcurrSCCB)
5077{ 5043{
5078 unsigned long addr, count; 5044 u32 addr, count;
5079 5045
5080 if (!(pcurrSCCB->Sccb_XferState & F_AUTO_SENSE)) { 5046 if (!(pcurrSCCB->Sccb_XferState & F_AUTO_SENSE)) {
5081 5047
5082 count = pcurrSCCB->Sccb_XferCnt; 5048 count = pcurrSCCB->Sccb_XferCnt;
5083 5049
5084 addr = 5050 addr = (u32)(unsigned long)pcurrSCCB->DataPointer + pcurrSCCB->Sccb_ATC;
5085 (unsigned long)pcurrSCCB->DataPointer + pcurrSCCB->Sccb_ATC;
5086 } 5051 }
5087 5052
5088 else { 5053 else {
@@ -5127,7 +5092,7 @@ static void FPT_busMstrDataXferStart(unsigned long p_port,
5127 * command busy is also time out, it'll just give up. 5092 * command busy is also time out, it'll just give up.
5128 * 5093 *
5129 *---------------------------------------------------------------------*/ 5094 *---------------------------------------------------------------------*/
5130static unsigned char FPT_busMstrTimeOut(unsigned long p_port) 5095static unsigned char FPT_busMstrTimeOut(u32 p_port)
5131{ 5096{
5132 unsigned long timeout; 5097 unsigned long timeout;
5133 5098
@@ -5166,13 +5131,14 @@ static unsigned char FPT_busMstrTimeOut(unsigned long p_port)
5166 * Description: Abort any in progress transfer. 5131 * Description: Abort any in progress transfer.
5167 * 5132 *
5168 *---------------------------------------------------------------------*/ 5133 *---------------------------------------------------------------------*/
5169static void FPT_hostDataXferAbort(unsigned long port, unsigned char p_card, 5134static void FPT_hostDataXferAbort(u32 port, unsigned char p_card,
5170 struct sccb *pCurrSCCB) 5135 struct sccb *pCurrSCCB)
5171{ 5136{
5172 5137
5173 unsigned long timeout; 5138 unsigned long timeout;
5174 unsigned long remain_cnt; 5139 unsigned long remain_cnt;
5175 unsigned int sg_ptr; 5140 u32 sg_ptr;
5141 struct blogic_sg_seg *segp;
5176 5142
5177 FPT_BL_Card[p_card].globalFlags &= ~F_HOST_XFER_ACT; 5143 FPT_BL_Card[p_card].globalFlags &= ~F_HOST_XFER_ACT;
5178 5144
@@ -5236,9 +5202,8 @@ static void FPT_hostDataXferAbort(unsigned long port, unsigned char p_card,
5236 (unsigned int)(pCurrSCCB->DataLength / 5202 (unsigned int)(pCurrSCCB->DataLength /
5237 SG_ELEMENT_SIZE)) { 5203 SG_ELEMENT_SIZE)) {
5238 5204
5239 sg_ptr = 5205 sg_ptr = (u32)(pCurrSCCB->DataLength /
5240 (unsigned int)(pCurrSCCB->DataLength / 5206 SG_ELEMENT_SIZE);
5241 SG_ELEMENT_SIZE);
5242 } 5207 }
5243 5208
5244 remain_cnt = pCurrSCCB->Sccb_XferCnt; 5209 remain_cnt = pCurrSCCB->Sccb_XferCnt;
@@ -5246,23 +5211,13 @@ static void FPT_hostDataXferAbort(unsigned long port, unsigned char p_card,
5246 while (remain_cnt < 0x01000000L) { 5211 while (remain_cnt < 0x01000000L) {
5247 5212
5248 sg_ptr--; 5213 sg_ptr--;
5249 5214 segp = (struct blogic_sg_seg *)(pCurrSCCB->
5250 if (remain_cnt > 5215 DataPointer) + (sg_ptr * 2);
5251 (unsigned 5216 if (remain_cnt > (unsigned long)segp->segbytes)
5252 long)(*(((unsigned long *)pCurrSCCB->
5253 DataPointer) + (sg_ptr * 2)))) {
5254
5255 remain_cnt -= 5217 remain_cnt -=
5256 (unsigned 5218 (unsigned long)segp->segbytes;
5257 long)(*(((unsigned long *) 5219 else
5258 pCurrSCCB->DataPointer) +
5259 (sg_ptr * 2)));
5260 }
5261
5262 else {
5263
5264 break; 5220 break;
5265 }
5266 } 5221 }
5267 5222
5268 if (remain_cnt < 0x01000000L) { 5223 if (remain_cnt < 0x01000000L) {
@@ -5418,23 +5373,18 @@ static void FPT_hostDataXferAbort(unsigned long port, unsigned char p_card,
5418 5373
5419 pCurrSCCB->Sccb_SGoffset = 0x00; 5374 pCurrSCCB->Sccb_SGoffset = 0x00;
5420 5375
5421 if ((unsigned long)(pCurrSCCB->Sccb_sgseg * 5376 if ((u32)(pCurrSCCB->Sccb_sgseg * SG_ELEMENT_SIZE) >=
5422 SG_ELEMENT_SIZE) >= 5377 pCurrSCCB->DataLength) {
5423 pCurrSCCB->DataLength) {
5424 5378
5425 pCurrSCCB->Sccb_XferState |= F_ALL_XFERRED; 5379 pCurrSCCB->Sccb_XferState |= F_ALL_XFERRED;
5426
5427 pCurrSCCB->Sccb_sgseg = 5380 pCurrSCCB->Sccb_sgseg =
5428 (unsigned short)(pCurrSCCB->DataLength / 5381 (unsigned short)(pCurrSCCB->DataLength /
5429 SG_ELEMENT_SIZE); 5382 SG_ELEMENT_SIZE);
5430
5431 } 5383 }
5432 } 5384 }
5433 5385
5434 else { 5386 else {
5435
5436 if (!(pCurrSCCB->Sccb_XferState & F_AUTO_SENSE)) 5387 if (!(pCurrSCCB->Sccb_XferState & F_AUTO_SENSE))
5437
5438 pCurrSCCB->Sccb_XferState |= F_ALL_XFERRED; 5388 pCurrSCCB->Sccb_XferState |= F_ALL_XFERRED;
5439 } 5389 }
5440 } 5390 }
@@ -5454,21 +5404,22 @@ static void FPT_hostDataXferRestart(struct sccb *currSCCB)
5454{ 5404{
5455 unsigned long data_count; 5405 unsigned long data_count;
5456 unsigned int sg_index; 5406 unsigned int sg_index;
5457 unsigned long *sg_ptr; 5407 struct blogic_sg_seg *segp;
5458 5408
5459 if (currSCCB->Sccb_XferState & F_SG_XFER) { 5409 if (currSCCB->Sccb_XferState & F_SG_XFER) {
5460 5410
5461 currSCCB->Sccb_XferCnt = 0; 5411 currSCCB->Sccb_XferCnt = 0;
5462 5412
5463 sg_index = 0xffff; /*Index by long words into sg list. */ 5413 sg_index = 0xffff; /*Index by long words into sg list. */
5464 data_count = 0; /*Running count of SG xfer counts. */ 5414 data_count = 0; /*Running count of SG xfer counts. */
5465 5415
5466 sg_ptr = (unsigned long *)currSCCB->DataPointer;
5467 5416
5468 while (data_count < currSCCB->Sccb_ATC) { 5417 while (data_count < currSCCB->Sccb_ATC) {
5469 5418
5470 sg_index++; 5419 sg_index++;
5471 data_count += *(sg_ptr + (sg_index * 2)); 5420 segp = (struct blogic_sg_seg *)(currSCCB->DataPointer) +
5421 (sg_index * 2);
5422 data_count += segp->segbytes;
5472 } 5423 }
5473 5424
5474 if (data_count == currSCCB->Sccb_ATC) { 5425 if (data_count == currSCCB->Sccb_ATC) {
@@ -5504,7 +5455,7 @@ static void FPT_scini(unsigned char p_card, unsigned char p_our_id,
5504{ 5455{
5505 5456
5506 unsigned char loser, assigned_id; 5457 unsigned char loser, assigned_id;
5507 unsigned long p_port; 5458 u32 p_port;
5508 5459
5509 unsigned char i, k, ScamFlg; 5460 unsigned char i, k, ScamFlg;
5510 struct sccb_card *currCard; 5461 struct sccb_card *currCard;
@@ -5709,7 +5660,7 @@ static void FPT_scini(unsigned char p_card, unsigned char p_our_id,
5709 * 5660 *
5710 *---------------------------------------------------------------------*/ 5661 *---------------------------------------------------------------------*/
5711 5662
5712static int FPT_scarb(unsigned long p_port, unsigned char p_sel_type) 5663static int FPT_scarb(u32 p_port, unsigned char p_sel_type)
5713{ 5664{
5714 if (p_sel_type == INIT_SELTD) { 5665 if (p_sel_type == INIT_SELTD) {
5715 5666
@@ -5771,7 +5722,7 @@ static int FPT_scarb(unsigned long p_port, unsigned char p_sel_type)
5771 * 5722 *
5772 *---------------------------------------------------------------------*/ 5723 *---------------------------------------------------------------------*/
5773 5724
5774static void FPT_scbusf(unsigned long p_port) 5725static void FPT_scbusf(u32 p_port)
5775{ 5726{
5776 WR_HARPOON(p_port + hp_page_ctrl, 5727 WR_HARPOON(p_port + hp_page_ctrl,
5777 (RD_HARPOON(p_port + hp_page_ctrl) | G_INT_DISABLE)); 5728 (RD_HARPOON(p_port + hp_page_ctrl) | G_INT_DISABLE));
@@ -5803,7 +5754,7 @@ static void FPT_scbusf(unsigned long p_port)
5803 * 5754 *
5804 *---------------------------------------------------------------------*/ 5755 *---------------------------------------------------------------------*/
5805 5756
5806static void FPT_scasid(unsigned char p_card, unsigned long p_port) 5757static void FPT_scasid(unsigned char p_card, u32 p_port)
5807{ 5758{
5808 unsigned char temp_id_string[ID_STRING_LENGTH]; 5759 unsigned char temp_id_string[ID_STRING_LENGTH];
5809 5760
@@ -5880,7 +5831,7 @@ static void FPT_scasid(unsigned char p_card, unsigned long p_port)
5880 * 5831 *
5881 *---------------------------------------------------------------------*/ 5832 *---------------------------------------------------------------------*/
5882 5833
5883static void FPT_scsel(unsigned long p_port) 5834static void FPT_scsel(u32 p_port)
5884{ 5835{
5885 5836
5886 WR_HARPOON(p_port + hp_scsisig, SCSI_SEL); 5837 WR_HARPOON(p_port + hp_scsisig, SCSI_SEL);
@@ -5914,7 +5865,7 @@ static void FPT_scsel(unsigned long p_port)
5914 * 5865 *
5915 *---------------------------------------------------------------------*/ 5866 *---------------------------------------------------------------------*/
5916 5867
5917static unsigned char FPT_scxferc(unsigned long p_port, unsigned char p_data) 5868static unsigned char FPT_scxferc(u32 p_port, unsigned char p_data)
5918{ 5869{
5919 unsigned char curr_data, ret_data; 5870 unsigned char curr_data, ret_data;
5920 5871
@@ -5964,8 +5915,7 @@ static unsigned char FPT_scxferc(unsigned long p_port, unsigned char p_data)
5964 * 5915 *
5965 *---------------------------------------------------------------------*/ 5916 *---------------------------------------------------------------------*/
5966 5917
5967static unsigned char FPT_scsendi(unsigned long p_port, 5918static unsigned char FPT_scsendi(u32 p_port, unsigned char p_id_string[])
5968 unsigned char p_id_string[])
5969{ 5919{
5970 unsigned char ret_data, byte_cnt, bit_cnt, defer; 5920 unsigned char ret_data, byte_cnt, bit_cnt, defer;
5971 5921
@@ -6016,8 +5966,7 @@ static unsigned char FPT_scsendi(unsigned long p_port,
6016 * 5966 *
6017 *---------------------------------------------------------------------*/ 5967 *---------------------------------------------------------------------*/
6018 5968
6019static unsigned char FPT_sciso(unsigned long p_port, 5969static unsigned char FPT_sciso(u32 p_port, unsigned char p_id_string[])
6020 unsigned char p_id_string[])
6021{ 5970{
6022 unsigned char ret_data, the_data, byte_cnt, bit_cnt; 5971 unsigned char ret_data, the_data, byte_cnt, bit_cnt;
6023 5972
@@ -6075,7 +6024,7 @@ static unsigned char FPT_sciso(unsigned long p_port,
6075 * 6024 *
6076 *---------------------------------------------------------------------*/ 6025 *---------------------------------------------------------------------*/
6077 6026
6078static void FPT_scwirod(unsigned long p_port, unsigned char p_data_bit) 6027static void FPT_scwirod(u32 p_port, unsigned char p_data_bit)
6079{ 6028{
6080 unsigned char i; 6029 unsigned char i;
6081 6030
@@ -6102,7 +6051,7 @@ static void FPT_scwirod(unsigned long p_port, unsigned char p_data_bit)
6102 * 6051 *
6103 *---------------------------------------------------------------------*/ 6052 *---------------------------------------------------------------------*/
6104 6053
6105static void FPT_scwiros(unsigned long p_port, unsigned char p_data_bit) 6054static void FPT_scwiros(u32 p_port, unsigned char p_data_bit)
6106{ 6055{
6107 unsigned char i; 6056 unsigned char i;
6108 6057
@@ -6154,7 +6103,7 @@ static unsigned char FPT_scvalq(unsigned char p_quintet)
6154 * 6103 *
6155 *---------------------------------------------------------------------*/ 6104 *---------------------------------------------------------------------*/
6156 6105
6157static unsigned char FPT_scsell(unsigned long p_port, unsigned char targ_id) 6106static unsigned char FPT_scsell(u32 p_port, unsigned char targ_id)
6158{ 6107{
6159 unsigned long i; 6108 unsigned long i;
6160 6109
@@ -6236,7 +6185,7 @@ static unsigned char FPT_scsell(unsigned long p_port, unsigned char targ_id)
6236 * 6185 *
6237 *---------------------------------------------------------------------*/ 6186 *---------------------------------------------------------------------*/
6238 6187
6239static void FPT_scwtsel(unsigned long p_port) 6188static void FPT_scwtsel(u32 p_port)
6240{ 6189{
6241 while (!(RDW_HARPOON((p_port + hp_intstat)) & SCAM_SEL)) { 6190 while (!(RDW_HARPOON((p_port + hp_intstat)) & SCAM_SEL)) {
6242 } 6191 }
@@ -6250,8 +6199,7 @@ static void FPT_scwtsel(unsigned long p_port)
6250 * 6199 *
6251 *---------------------------------------------------------------------*/ 6200 *---------------------------------------------------------------------*/
6252 6201
6253static void FPT_inisci(unsigned char p_card, unsigned long p_port, 6202static void FPT_inisci(unsigned char p_card, u32 p_port, unsigned char p_our_id)
6254 unsigned char p_our_id)
6255{ 6203{
6256 unsigned char i, k, max_id; 6204 unsigned char i, k, max_id;
6257 unsigned short ee_data; 6205 unsigned short ee_data;
@@ -6437,7 +6385,7 @@ static unsigned char FPT_scmachid(unsigned char p_card,
6437 * 6385 *
6438 *---------------------------------------------------------------------*/ 6386 *---------------------------------------------------------------------*/
6439 6387
6440static void FPT_scsavdi(unsigned char p_card, unsigned long p_port) 6388static void FPT_scsavdi(unsigned char p_card, u32 p_port)
6441{ 6389{
6442 unsigned char i, k, max_id; 6390 unsigned char i, k, max_id;
6443 unsigned short ee_data, sum_data; 6391 unsigned short ee_data, sum_data;
@@ -6482,7 +6430,7 @@ static void FPT_scsavdi(unsigned char p_card, unsigned long p_port)
6482 * 6430 *
6483 *---------------------------------------------------------------------*/ 6431 *---------------------------------------------------------------------*/
6484 6432
6485static void FPT_XbowInit(unsigned long port, unsigned char ScamFlg) 6433static void FPT_XbowInit(u32 port, unsigned char ScamFlg)
6486{ 6434{
6487 unsigned char i; 6435 unsigned char i;
6488 6436
@@ -6531,7 +6479,7 @@ static void FPT_XbowInit(unsigned long port, unsigned char ScamFlg)
6531 * 6479 *
6532 *---------------------------------------------------------------------*/ 6480 *---------------------------------------------------------------------*/
6533 6481
6534static void FPT_BusMasterInit(unsigned long p_port) 6482static void FPT_BusMasterInit(u32 p_port)
6535{ 6483{
6536 6484
6537 WR_HARPOON(p_port + hp_sys_ctrl, DRVR_RST); 6485 WR_HARPOON(p_port + hp_sys_ctrl, DRVR_RST);
@@ -6558,7 +6506,7 @@ static void FPT_BusMasterInit(unsigned long p_port)
6558 * 6506 *
6559 *---------------------------------------------------------------------*/ 6507 *---------------------------------------------------------------------*/
6560 6508
6561static void FPT_DiagEEPROM(unsigned long p_port) 6509static void FPT_DiagEEPROM(u32 p_port)
6562{ 6510{
6563 unsigned short index, temp, max_wd_cnt; 6511 unsigned short index, temp, max_wd_cnt;
6564 6512
@@ -7206,7 +7154,7 @@ static void FPT_utilUpdateResidual(struct sccb *p_SCCB)
7206{ 7154{
7207 unsigned long partial_cnt; 7155 unsigned long partial_cnt;
7208 unsigned int sg_index; 7156 unsigned int sg_index;
7209 unsigned long *sg_ptr; 7157 struct blogic_sg_seg *segp;
7210 7158
7211 if (p_SCCB->Sccb_XferState & F_ALL_XFERRED) { 7159 if (p_SCCB->Sccb_XferState & F_ALL_XFERRED) {
7212 7160
@@ -7219,7 +7167,6 @@ static void FPT_utilUpdateResidual(struct sccb *p_SCCB)
7219 7167
7220 sg_index = p_SCCB->Sccb_sgseg; 7168 sg_index = p_SCCB->Sccb_sgseg;
7221 7169
7222 sg_ptr = (unsigned long *)p_SCCB->DataPointer;
7223 7170
7224 if (p_SCCB->Sccb_SGoffset) { 7171 if (p_SCCB->Sccb_SGoffset) {
7225 7172
@@ -7229,8 +7176,9 @@ static void FPT_utilUpdateResidual(struct sccb *p_SCCB)
7229 7176
7230 while (((unsigned long)sg_index * 7177 while (((unsigned long)sg_index *
7231 (unsigned long)SG_ELEMENT_SIZE) < p_SCCB->DataLength) { 7178 (unsigned long)SG_ELEMENT_SIZE) < p_SCCB->DataLength) {
7232 7179 segp = (struct blogic_sg_seg *)(p_SCCB->DataPointer) +
7233 partial_cnt += *(sg_ptr + (sg_index * 2)); 7180 (sg_index * 2);
7181 partial_cnt += segp->segbytes;
7234 sg_index++; 7182 sg_index++;
7235 } 7183 }
7236 7184
@@ -7251,7 +7199,7 @@ static void FPT_utilUpdateResidual(struct sccb *p_SCCB)
7251 * 7199 *
7252 *---------------------------------------------------------------------*/ 7200 *---------------------------------------------------------------------*/
7253 7201
7254static void FPT_Wait1Second(unsigned long p_port) 7202static void FPT_Wait1Second(u32 p_port)
7255{ 7203{
7256 unsigned char i; 7204 unsigned char i;
7257 7205
@@ -7275,7 +7223,7 @@ static void FPT_Wait1Second(unsigned long p_port)
7275 * 7223 *
7276 *---------------------------------------------------------------------*/ 7224 *---------------------------------------------------------------------*/
7277 7225
7278static void FPT_Wait(unsigned long p_port, unsigned char p_delay) 7226static void FPT_Wait(u32 p_port, unsigned char p_delay)
7279{ 7227{
7280 unsigned char old_timer; 7228 unsigned char old_timer;
7281 unsigned char green_flag; 7229 unsigned char green_flag;
@@ -7321,7 +7269,7 @@ static void FPT_Wait(unsigned long p_port, unsigned char p_delay)
7321 * 7269 *
7322 *---------------------------------------------------------------------*/ 7270 *---------------------------------------------------------------------*/
7323 7271
7324static void FPT_utilEEWriteOnOff(unsigned long p_port, unsigned char p_mode) 7272static void FPT_utilEEWriteOnOff(u32 p_port, unsigned char p_mode)
7325{ 7273{
7326 unsigned char ee_value; 7274 unsigned char ee_value;
7327 7275
@@ -7350,7 +7298,7 @@ static void FPT_utilEEWriteOnOff(unsigned long p_port, unsigned char p_mode)
7350 * 7298 *
7351 *---------------------------------------------------------------------*/ 7299 *---------------------------------------------------------------------*/
7352 7300
7353static void FPT_utilEEWrite(unsigned long p_port, unsigned short ee_data, 7301static void FPT_utilEEWrite(u32 p_port, unsigned short ee_data,
7354 unsigned short ee_addr) 7302 unsigned short ee_addr)
7355{ 7303{
7356 7304
@@ -7401,7 +7349,7 @@ static void FPT_utilEEWrite(unsigned long p_port, unsigned short ee_data,
7401 * 7349 *
7402 *---------------------------------------------------------------------*/ 7350 *---------------------------------------------------------------------*/
7403 7351
7404static unsigned short FPT_utilEERead(unsigned long p_port, 7352static unsigned short FPT_utilEERead(u32 p_port,
7405 unsigned short ee_addr) 7353 unsigned short ee_addr)
7406{ 7354{
7407 unsigned short i, ee_data1, ee_data2; 7355 unsigned short i, ee_data1, ee_data2;
@@ -7431,8 +7379,7 @@ static unsigned short FPT_utilEERead(unsigned long p_port,
7431 * 7379 *
7432 *---------------------------------------------------------------------*/ 7380 *---------------------------------------------------------------------*/
7433 7381
7434static unsigned short FPT_utilEEReadOrg(unsigned long p_port, 7382static unsigned short FPT_utilEEReadOrg(u32 p_port, unsigned short ee_addr)
7435 unsigned short ee_addr)
7436{ 7383{
7437 7384
7438 unsigned char ee_value; 7385 unsigned char ee_value;
@@ -7479,7 +7426,7 @@ static unsigned short FPT_utilEEReadOrg(unsigned long p_port,
7479 * 7426 *
7480 *---------------------------------------------------------------------*/ 7427 *---------------------------------------------------------------------*/
7481 7428
7482static void FPT_utilEESendCmdAddr(unsigned long p_port, unsigned char ee_cmd, 7429static void FPT_utilEESendCmdAddr(u32 p_port, unsigned char ee_cmd,
7483 unsigned short ee_addr) 7430 unsigned short ee_addr)
7484{ 7431{
7485 unsigned char ee_value; 7432 unsigned char ee_value;
@@ -7579,7 +7526,7 @@ FlashPoint__ProbeHostAdapter(struct fpoint_info *FlashPointInfo)
7579 FlashPointInfo); 7526 FlashPointInfo);
7580} 7527}
7581 7528
7582static inline unsigned int 7529static inline void *
7583FlashPoint__HardwareResetHostAdapter(struct fpoint_info *FlashPointInfo) 7530FlashPoint__HardwareResetHostAdapter(struct fpoint_info *FlashPointInfo)
7584{ 7531{
7585 return FlashPoint_HardwareResetHostAdapter((struct sccb_mgr_info *) 7532 return FlashPoint_HardwareResetHostAdapter((struct sccb_mgr_info *)
@@ -7587,33 +7534,31 @@ FlashPoint__HardwareResetHostAdapter(struct fpoint_info *FlashPointInfo)
7587} 7534}
7588 7535
7589static inline void 7536static inline void
7590FlashPoint__ReleaseHostAdapter(unsigned int CardHandle) 7537FlashPoint__ReleaseHostAdapter(void *CardHandle)
7591{ 7538{
7592 FlashPoint_ReleaseHostAdapter(CardHandle); 7539 FlashPoint_ReleaseHostAdapter(CardHandle);
7593} 7540}
7594 7541
7595static inline void 7542static inline void
7596FlashPoint__StartCCB(unsigned int CardHandle, 7543FlashPoint__StartCCB(void *CardHandle, struct blogic_ccb *CCB)
7597 struct blogic_ccb *CCB)
7598{ 7544{
7599 FlashPoint_StartCCB(CardHandle, (struct sccb *)CCB); 7545 FlashPoint_StartCCB(CardHandle, (struct sccb *)CCB);
7600} 7546}
7601 7547
7602static inline void 7548static inline void
7603FlashPoint__AbortCCB(unsigned int CardHandle, 7549FlashPoint__AbortCCB(void *CardHandle, struct blogic_ccb *CCB)
7604 struct blogic_ccb *CCB)
7605{ 7550{
7606 FlashPoint_AbortCCB(CardHandle, (struct sccb *)CCB); 7551 FlashPoint_AbortCCB(CardHandle, (struct sccb *)CCB);
7607} 7552}
7608 7553
7609static inline bool 7554static inline bool
7610FlashPoint__InterruptPending(unsigned int CardHandle) 7555FlashPoint__InterruptPending(void *CardHandle)
7611{ 7556{
7612 return FlashPoint_InterruptPending(CardHandle); 7557 return FlashPoint_InterruptPending(CardHandle);
7613} 7558}
7614 7559
7615static inline int 7560static inline int
7616FlashPoint__HandleInterrupt(unsigned int CardHandle) 7561FlashPoint__HandleInterrupt(void *CardHandle)
7617{ 7562{
7618 return FlashPoint_HandleInterrupt(CardHandle); 7563 return FlashPoint_HandleInterrupt(CardHandle);
7619} 7564}
@@ -7633,11 +7578,11 @@ FlashPoint__HandleInterrupt(unsigned int CardHandle)
7633*/ 7578*/
7634 7579
7635extern unsigned char FlashPoint_ProbeHostAdapter(struct fpoint_info *); 7580extern unsigned char FlashPoint_ProbeHostAdapter(struct fpoint_info *);
7636extern unsigned int FlashPoint_HardwareResetHostAdapter(struct fpoint_info *); 7581extern void *FlashPoint_HardwareResetHostAdapter(struct fpoint_info *);
7637extern void FlashPoint_StartCCB(unsigned int, struct blogic_ccb *); 7582extern void FlashPoint_StartCCB(void *, struct blogic_ccb *);
7638extern int FlashPoint_AbortCCB(unsigned int, struct blogic_ccb *); 7583extern int FlashPoint_AbortCCB(void *, struct blogic_ccb *);
7639extern bool FlashPoint_InterruptPending(unsigned int); 7584extern bool FlashPoint_InterruptPending(void *);
7640extern int FlashPoint_HandleInterrupt(unsigned int); 7585extern int FlashPoint_HandleInterrupt(void *);
7641extern void FlashPoint_ReleaseHostAdapter(unsigned int); 7586extern void FlashPoint_ReleaseHostAdapter(void *);
7642 7587
7643#endif /* CONFIG_SCSI_FLASHPOINT */ 7588#endif /* CONFIG_SCSI_FLASHPOINT */