Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Khalid Aziz and committed by
James Bottomley
391e2f25 839cb99e

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