Lines Matching refs:ushort

323 	ushort vm_id;
339 ushort x_req_count;
340 ushort x_reconnect_rtn;
363 ushort entry_cnt;
364 ushort queue_cnt;
365 ushort entry_to_copy;
366 ushort res;
375 ushort remain_sg_entry_cnt;
376 ushort next_sg_index;
529 ushort mcode_date;
530 ushort mcode_version;
559 ushort err_code;
560 ushort dvc_cntl;
561 ushort bug_fix_cntl;
562 ushort bus_type;
578 ushort init_state;
587 ushort res2;
613 #define ASC_MCNTL_NO_SEL_TIMEOUT (ushort)0x0001
614 #define ASC_MCNTL_NULL_TARGET (ushort)0x0002
615 #define ASC_CNTL_INITIATOR (ushort)0x0001
616 #define ASC_CNTL_BIOS_GT_1GB (ushort)0x0002
617 #define ASC_CNTL_BIOS_GT_2_DISK (ushort)0x0004
618 #define ASC_CNTL_BIOS_REMOVABLE (ushort)0x0008
619 #define ASC_CNTL_NO_SCAM (ushort)0x0010
620 #define ASC_CNTL_INT_MULTI_Q (ushort)0x0080
621 #define ASC_CNTL_NO_LUN_SUPPORT (ushort)0x0040
622 #define ASC_CNTL_NO_VERIFY_COPY (ushort)0x0100
623 #define ASC_CNTL_RESET_SCSI (ushort)0x0200
624 #define ASC_CNTL_INIT_INQUIRY (ushort)0x0400
625 #define ASC_CNTL_INIT_VERBOSE (ushort)0x0800
626 #define ASC_CNTL_SCSI_PARITY (ushort)0x1000
627 #define ASC_CNTL_BURST_MODE (ushort)0x2000
628 #define ASC_CNTL_SDTR_ENABLE_ULTRA (ushort)0x4000
650 ushort cfg_lsw;
651 ushort cfg_msw;
665 ushort cntl;
666 ushort chksum;
676 #define ASCV_BREAK_SAVED_CODE (ushort)0x0006
682 #define ASCV_MAX_DVC_QNG_BEG (ushort)0x0020
683 #define ASCV_BREAK_ADDR (ushort)0x0028
684 #define ASCV_BREAK_NOTIFY_COUNT (ushort)0x002A
685 #define ASCV_BREAK_CONTROL (ushort)0x002C
686 #define ASCV_BREAK_HIT_COUNT (ushort)0x002E
688 #define ASCV_ASCDVC_ERR_CODE_W (ushort)0x0030
689 #define ASCV_MCODE_CHKSUM_W (ushort)0x0032
690 #define ASCV_MCODE_SIZE_W (ushort)0x0034
691 #define ASCV_STOP_CODE_B (ushort)0x0036
692 #define ASCV_DVC_ERR_CODE_B (ushort)0x0037
693 #define ASCV_OVERRUN_PADDR_D (ushort)0x0038
694 #define ASCV_OVERRUN_BSIZE_D (ushort)0x003C
695 #define ASCV_HALTCODE_W (ushort)0x0040
696 #define ASCV_CHKSUM_W (ushort)0x0042
697 #define ASCV_MC_DATE_W (ushort)0x0044
698 #define ASCV_MC_VER_W (ushort)0x0046
699 #define ASCV_NEXTRDY_B (ushort)0x0048
700 #define ASCV_DONENEXT_B (ushort)0x0049
701 #define ASCV_USE_TAGGED_QNG_B (ushort)0x004A
702 #define ASCV_SCSIBUSY_B (ushort)0x004B
703 #define ASCV_Q_DONE_IN_PROGRESS_B (ushort)0x004C
704 #define ASCV_CURCDB_B (ushort)0x004D
705 #define ASCV_RCLUN_B (ushort)0x004E
706 #define ASCV_BUSY_QHEAD_B (ushort)0x004F
707 #define ASCV_DISC1_QHEAD_B (ushort)0x0050
708 #define ASCV_DISC_ENABLE_B (ushort)0x0052
709 #define ASCV_CAN_TAGGED_QNG_B (ushort)0x0053
710 #define ASCV_HOSTSCSI_ID_B (ushort)0x0055
711 #define ASCV_MCODE_CNTL_B (ushort)0x0056
712 #define ASCV_NULL_TARGET_B (ushort)0x0057
713 #define ASCV_FREE_Q_HEAD_W (ushort)0x0058
714 #define ASCV_DONE_Q_TAIL_W (ushort)0x005A
715 #define ASCV_FREE_Q_HEAD_B (ushort)(ASCV_FREE_Q_HEAD_W+1)
716 #define ASCV_DONE_Q_TAIL_B (ushort)(ASCV_DONE_Q_TAIL_W+1)
717 #define ASCV_HOST_FLAG_B (ushort)0x005D
718 #define ASCV_TOTAL_READY_Q_B (ushort)0x0064
719 #define ASCV_VER_SERIAL_B (ushort)0x0065
720 #define ASCV_HALTCODE_SAVED_W (ushort)0x0066
721 #define ASCV_WTM_FLAG_B (ushort)0x0068
722 #define ASCV_RISC_FLAG_B (ushort)0x006A
723 #define ASCV_REQ_SG_LIST_QP (ushort)0x006B
779 #define ASC_HALT_EXTMSG_IN (ushort)0x8000
780 #define ASC_HALT_CHK_CONDITION (ushort)0x8100
781 #define ASC_HALT_SS_QUEUE_FULL (ushort)0x8200
782 #define ASC_HALT_DISABLE_ASYN_USE_SYN_FIX (ushort)0x8300
783 #define ASC_HALT_ENABLE_ASYN_USE_SYN_FIX (ushort)0x8400
784 #define ASC_HALT_SDTR_REJECTED (ushort)0x4000
785 #define ASC_HALT_HOST_COPY_SG_LIST_TO_RISC ( ushort )0x2000
787 #define ASC_DATA_SEC_BEG (ushort)0x0080
788 #define ASC_DATA_SEC_END (ushort)0x0080
789 #define ASC_CODE_SEC_BEG (ushort)0x0080
790 #define ASC_CODE_SEC_END (ushort)0x0080
792 #define ASC_QADR_USED (ushort)(ASC_MAX_QNO * 64)
793 #define ASC_QADR_END (ushort)0x7FFF
794 #define ASC_QLAST_ADR (ushort)0x7FC0
852 #define INS_HALTINT (ushort)0x6281
853 #define INS_HALT (ushort)0x6280
854 #define INS_SINT (ushort)0x6200
855 #define INS_RFLAG_WTM (ushort)0x7380
860 ushort data[ASC_MC_SAVE_DATA_WSIZE];
861 ushort code[ASC_MC_SAVE_CODE_WSIZE];
874 …DTRDoneAtID(port, id, data) AscWriteLramByte((port), (ushort)((ushort)ASCV_SDTR_DONE_BEG+(ushort)…
875 …SDTRDoneAtID(port, id) AscReadLramByte((port), (ushort)((ushort)ASCV_SDTR_DONE_BEG+(ushort)…
876 …nitSDTRAtID(port, id, data) AscWriteLramByte((port), (ushort)((ushort)ASCV_SDTR_DATA_BEG+(ushort)…
877 …InitSDTRAtID(port, id) AscReadLramByte((port), (ushort)((ushort)ASCV_SDTR_DATA_BEG+(ushort)…
879 #define AscGetChipSignatureWord(port) (ushort)inpw((port)+IOP_SIG_WORD)
881 #define AscGetChipCfgLsw(port) (ushort)inpw((port)+IOP_CONFIG_LOW)
882 #define AscGetChipCfgMsw(port) (ushort)inpw((port)+IOP_CONFIG_HIGH)
887 #define AscGetChipEEPData(port) (ushort)inpw((port)+IOP_EEP_DATA)
889 #define AscGetChipLramAddr(port) (ushort)inpw((PortAddr)((port)+IOP_RAM_ADDR))
891 #define AscGetChipLramData(port) (ushort)inpw((port)+IOP_RAM_DATA)
902 #define AscGetPCAddr(port) (ushort)inpw((port)+IOP_REG_PC)
907 #define AscReadChipAX(port) (ushort)inpw((port)+IOP_REG_AX)
911 #define AscReadChipIH(port) (ushort)inpw((port)+IOP_REG_IH)
915 #define AscReadChipFIFO_L(port) (ushort)inpw((port)+IOP_REG_FIFO_L)
917 #define AscReadChipFIFO_H(port) (ushort)inpw((port)+IOP_REG_FIFO_H)
921 #define AscReadChipDA0(port) (ushort)inpw((port)+IOP_REG_DA0)
923 #define AscReadChipDA1(port) (ushort)inpw((port)+IOP_REG_DA1)
925 #define AscReadChipDC0(port) (ushort)inpw((port)+IOP_REG_DC0)
927 #define AscReadChipDC1(port) (ushort)inpw((port)+IOP_REG_DC1)
1019 ushort cfg_lsw; /* 00 power up initialization */
1023 ushort cfg_msw; /* 01 unused */
1024 ushort disc_enable; /* 02 disconnect enable */
1025 ushort wdtr_able; /* 03 Wide DTR able */
1026 ushort sdtr_able; /* 04 Synchronous DTR able */
1027 ushort start_motor; /* 05 send start up motor */
1028 ushort tagqng_able; /* 06 tag queuing able */
1029 ushort bios_scan; /* 07 BIOS device control */
1030 ushort scam_tolerant; /* 08 no scam */
1048 ushort bios_ctrl; /* 12 BIOS control bits */
1065 ushort ultra_able; /* 13 ULTRA speed able */
1066 ushort reserved2; /* 14 reserved */
1069 ushort dvc_cntl; /* 16 control bit for driver */
1070 ushort bug_fix; /* 17 control bit for bug fix */
1071 ushort serial_number_word1; /* 18 Board serial number word 1 */
1072 ushort serial_number_word2; /* 19 Board serial number word 2 */
1073 ushort serial_number_word3; /* 20 Board serial number word 3 */
1074 ushort check_sum; /* 21 EEP check sum */
1076 ushort dvc_err_code; /* 30 last device driver error code */
1077 ushort adv_err_code; /* 31 last uc and Adv Lib error code */
1078 ushort adv_err_addr; /* 32 last uc error address */
1079 ushort saved_dvc_err_code; /* 33 saved last dev. driver error code */
1080 ushort saved_adv_err_code; /* 34 saved last uc and Adv Lib error code */
1081 ushort saved_adv_err_addr; /* 35 saved last uc error address */
1082 ushort num_of_err; /* 36 number of error */
1088 ushort cfg_lsw; /* 00 power up initialization */
1092 ushort cfg_msw; /* 01 unused */
1093 ushort disc_enable; /* 02 disconnect enable */
1094 ushort wdtr_able; /* 03 Wide DTR able */
1095 ushort sdtr_speed1; /* 04 SDTR Speed TID 0-3 */
1096 ushort start_motor; /* 05 send start up motor */
1097 ushort tagqng_able; /* 06 tag queuing able */
1098 ushort bios_scan; /* 07 BIOS device control */
1099 ushort scam_tolerant; /* 08 no scam */
1121 ushort bios_ctrl; /* 12 BIOS control bits */
1138 ushort sdtr_speed2; /* 13 SDTR speed TID 4-7 */
1139 ushort sdtr_speed3; /* 14 SDTR speed TID 8-11 */
1142 ushort dvc_cntl; /* 16 control bit for driver */
1143 ushort sdtr_speed4; /* 17 SDTR speed 4 TID 12-15 */
1144 ushort serial_number_word1; /* 18 Board serial number word 1 */
1145 ushort serial_number_word2; /* 19 Board serial number word 2 */
1146 ushort serial_number_word3; /* 20 Board serial number word 3 */
1147 ushort check_sum; /* 21 EEP check sum */
1149 ushort dvc_err_code; /* 30 last device driver error code */
1150 ushort adv_err_code; /* 31 last uc and Adv Lib error code */
1151 ushort adv_err_addr; /* 32 last uc error address */
1152 ushort saved_dvc_err_code; /* 33 saved last dev. driver error code */
1153 ushort saved_adv_err_code; /* 34 saved last uc and Adv Lib error code */
1154 ushort saved_adv_err_addr; /* 35 saved last uc error address */
1155 ushort reserved36; /* 36 reserved */
1156 ushort reserved37; /* 37 reserved */
1157 ushort reserved38; /* 38 reserved */
1158 ushort reserved39; /* 39 reserved */
1159 ushort reserved40; /* 40 reserved */
1160 ushort reserved41; /* 41 reserved */
1161 ushort reserved42; /* 42 reserved */
1162 ushort reserved43; /* 43 reserved */
1163 ushort reserved44; /* 44 reserved */
1164 ushort reserved45; /* 45 reserved */
1165 ushort reserved46; /* 46 reserved */
1166 ushort reserved47; /* 47 reserved */
1167 ushort reserved48; /* 48 reserved */
1168 ushort reserved49; /* 49 reserved */
1169 ushort reserved50; /* 50 reserved */
1170 ushort reserved51; /* 51 reserved */
1171 ushort reserved52; /* 52 reserved */
1172 ushort reserved53; /* 53 reserved */
1173 ushort reserved54; /* 54 reserved */
1174 ushort reserved55; /* 55 reserved */
1175 ushort cisptr_lsw; /* 56 CIS PTR LSW */
1176 ushort cisprt_msw; /* 57 CIS PTR MSW */
1177 ushort subsysvid; /* 58 SubSystem Vendor ID */
1178 ushort subsysid; /* 59 SubSystem ID */
1179 ushort reserved60; /* 60 reserved */
1180 ushort reserved61; /* 61 reserved */
1181 ushort reserved62; /* 62 reserved */
1182 ushort reserved63; /* 63 reserved */
1188 ushort cfg_lsw; /* 00 power up initialization */
1194 ushort cfg_msw; /* 01 unused */
1195 ushort disc_enable; /* 02 disconnect enable */
1196 ushort wdtr_able; /* 03 Wide DTR able */
1197 ushort sdtr_speed1; /* 04 SDTR Speed TID 0-3 */
1198 ushort start_motor; /* 05 send start up motor */
1199 ushort tagqng_able; /* 06 tag queuing able */
1200 ushort bios_scan; /* 07 BIOS device control */
1201 ushort scam_tolerant; /* 08 no scam */
1223 ushort bios_ctrl; /* 12 BIOS control bits */
1240 ushort sdtr_speed2; /* 13 SDTR speed TID 4-7 */
1241 ushort sdtr_speed3; /* 14 SDTR speed TID 8-11 */
1244 ushort dvc_cntl; /* 16 control bit for driver */
1245 ushort sdtr_speed4; /* 17 SDTR speed 4 TID 12-15 */
1246 ushort serial_number_word1; /* 18 Board serial number word 1 */
1247 ushort serial_number_word2; /* 19 Board serial number word 2 */
1248 ushort serial_number_word3; /* 20 Board serial number word 3 */
1249 ushort check_sum; /* 21 EEP check sum */
1251 ushort dvc_err_code; /* 30 last device driver error code */
1252 ushort adv_err_code; /* 31 last uc and Adv Lib error code */
1253 ushort adv_err_addr; /* 32 last uc error address */
1254 ushort saved_dvc_err_code; /* 33 saved last dev. driver error code */
1255 ushort saved_adv_err_code; /* 34 saved last uc and Adv Lib error code */
1256 ushort saved_adv_err_addr; /* 35 saved last uc error address */
1257 ushort reserved36; /* 36 reserved */
1258 ushort reserved37; /* 37 reserved */
1259 ushort reserved38; /* 38 reserved */
1260 ushort reserved39; /* 39 reserved */
1261 ushort reserved40; /* 40 reserved */
1262 ushort reserved41; /* 41 reserved */
1263 ushort reserved42; /* 42 reserved */
1264 ushort reserved43; /* 43 reserved */
1265 ushort reserved44; /* 44 reserved */
1266 ushort reserved45; /* 45 reserved */
1267 ushort reserved46; /* 46 reserved */
1268 ushort reserved47; /* 47 reserved */
1269 ushort reserved48; /* 48 reserved */
1270 ushort reserved49; /* 49 reserved */
1271 ushort reserved50; /* 50 reserved */
1272 ushort reserved51; /* 51 reserved */
1273 ushort reserved52; /* 52 reserved */
1274 ushort reserved53; /* 53 reserved */
1275 ushort reserved54; /* 54 reserved */
1276 ushort reserved55; /* 55 reserved */
1277 ushort cisptr_lsw; /* 56 CIS PTR LSW */
1278 ushort cisprt_msw; /* 57 CIS PTR MSW */
1279 ushort subsysvid; /* 58 SubSystem Vendor ID */
1280 ushort subsysid; /* 59 SubSystem ID */
1281 ushort reserved60; /* 60 reserved */
1282 ushort reserved61; /* 61 reserved */
1283 ushort reserved62; /* 62 reserved */
1284 ushort reserved63; /* 63 reserved */
1805 ushort disc_enable; /* enable disconnection */
1808 ushort control_flag; /* Microcode Control Flag */
1809 ushort mcode_date; /* Microcode date */
1810 ushort mcode_version; /* Microcode version */
1811 ushort serial1; /* EEPROM serial number word 1 */
1812 ushort serial2; /* EEPROM serial number word 2 */
1813 ushort serial3; /* EEPROM serial number word 3 */
1919 ushort err_code; /* fatal error code */
1920 ushort bios_ctrl; /* BIOS control word, EEPROM word 12 */
1921 ushort wdtr_able; /* try WDTR for a device */
1922 ushort sdtr_able; /* try SDTR for a device */
1923 ushort ultra_able; /* try SDTR Ultra speed for a device */
1924 ushort sdtr_speed1; /* EEPROM SDTR Speed for TID 0-3 */
1925 ushort sdtr_speed2; /* EEPROM SDTR Speed for TID 4-7 */
1926 ushort sdtr_speed3; /* EEPROM SDTR Speed for TID 8-11 */
1927 ushort sdtr_speed4; /* EEPROM SDTR Speed for TID 12-15 */
1928 ushort tagqng_able; /* try tagged queuing with a device */
1929 ushort ppr_able; /* PPR message capable per TID bitmask. */
1931 ushort start_motor; /* start motor command allowed */
1935 ushort no_scam; /* scam_tolerant of EEPROM */
1944 ushort carr_pending_cnt; /* Count of pending carriers. */
2037 cpu_to_le16((ushort) ((dword) & 0xFFFF)))), \
2040 cpu_to_le16((ushort) ((dword >> 16) & 0xFFFF)))))
2083 AdvSendIdleCmd((asc_dvc), (ushort) IDLE_CMD_ABORT, \
2098 AdvSendIdleCmd((asc_dvc), (ushort) IDLE_CMD_DEVICE_RESET, \
2104 #define ADV_SCSI_BIT_ID_TYPE ushort
2358 ushort asc_n_io_port; /* Number I/O ports. */
2360 ushort reqcnt[ADV_MAX_TID + 1]; /* Starvation request count */
2362 ushort queue_full_cnt[ADV_MAX_TID + 1]; /* Queue full count */
2382 ushort ioport; /* I/O Port address. */
2385 ushort bios_signature; /* BIOS Signature. */
2386 ushort bios_version; /* BIOS Version. */
2387 ushort bios_codeseg; /* BIOS Code Segment. */
2388 ushort bios_codelen; /* BIOS Code Segment Length. */
2897 ushort major, minor, letter; in asc_prt_adv_bios()
2953 static int asc_get_eeprom_string(ushort *serialnum, uchar *cp) in asc_get_eeprom_string()
2955 ushort w, num; in asc_get_eeprom_string()
2957 if ((serialnum[1] & 0xFE00) != ((ushort)0xAA << 8)) { in asc_get_eeprom_string()
3051 if (asc_get_eeprom_string((ushort *)&ep->adapter_info[0], serialstr) in asc_prt_asc_board_eeprom()
3117 ushort word; in asc_prt_adv_board_eeprom()
3118 ushort *wordp; in asc_prt_adv_board_eeprom()
3119 ushort sdtr_speed = 0; in asc_prt_adv_board_eeprom()
3507 ushort chip_scsi_id; in asc_prt_adv_board_info()
3508 ushort lramword; in asc_prt_adv_board_info()
3510 ushort tagqng_able; in asc_prt_adv_board_info()
3511 ushort sdtr_able, wdtr_able; in asc_prt_adv_board_info()
3512 ushort wdtr_done, sdtr_done; in asc_prt_adv_board_info()
3513 ushort period = 0; in asc_prt_adv_board_info()
3831 static void AscSetChipIH(PortAddr iop_base, ushort ins_code) in AscSetChipIH()
3898 ushort sig_word; in AscFindSignature()
3906 if ((sig_word == (ushort)ASC_1000_ID0W) || in AscFindSignature()
3907 (sig_word == (ushort)ASC_1000_ID0W_FIX)) { in AscFindSignature()
3916 ushort cfg; in AscEnableInterrupt()
3924 ushort cfg; in AscDisableInterrupt()
3930 static uchar AscReadLramByte(PortAddr iop_base, ushort addr) in AscReadLramByte()
3947 static ushort AscReadLramWord(PortAddr iop_base, ushort addr) in AscReadLramWord()
3949 ushort word_data; in AscReadLramWord()
3957 static ASC_DCNT AscReadLramDWord(PortAddr iop_base, ushort addr) in AscReadLramDWord()
3959 ushort val_low, val_high; in AscReadLramDWord()
3971 AscMemWordSetLram(PortAddr iop_base, ushort s_addr, ushort set_wval, int words) in AscMemWordSetLram()
3981 static void AscWriteLramWord(PortAddr iop_base, ushort addr, ushort word_val) in AscWriteLramWord()
3987 static void AscWriteLramByte(PortAddr iop_base, ushort addr, uchar byte_val) in AscWriteLramByte()
3989 ushort word_data; in AscWriteLramByte()
3995 word_data |= (((ushort)byte_val << 8) & 0xFF00); in AscWriteLramByte()
3999 word_data |= ((ushort)byte_val & 0x00FF); in AscWriteLramByte()
4011 AscMemWordCopyPtrToLram(PortAddr iop_base, ushort s_addr, in AscMemWordCopyPtrToLram()
4027 ((ushort)s_buffer[i + 1] << 8) | s_buffer[i]); in AscMemWordCopyPtrToLram()
4039 ushort s_addr, uchar *s_buffer, int dwords) in AscMemDWordCopyPtrToLram()
4045 outpw(iop_base + IOP_RAM_DATA, ((ushort)s_buffer[i + 1] << 8) | s_buffer[i]); /* LSW */ in AscMemDWordCopyPtrToLram()
4046 outpw(iop_base + IOP_RAM_DATA, ((ushort)s_buffer[i + 3] << 8) | s_buffer[i + 2]); /* MSW */ in AscMemDWordCopyPtrToLram()
4058 ushort s_addr, uchar *d_buffer, int words) in AscMemWordCopyPtrFromLram()
4061 ushort word; in AscMemWordCopyPtrFromLram()
4071 static ASC_DCNT AscMemSumLramWord(PortAddr iop_base, ushort s_addr, int words) in AscMemSumLramWord()
4083 static ushort AscInitLram(ASC_DVC_VAR *asc_dvc) in AscInitLram()
4086 ushort s_addr; in AscInitLram()
4088 ushort warn_code; in AscInitLram()
4093 (ushort)(((int)(asc_dvc->max_total_qng + 2 + 1) * in AscInitLram()
4097 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_FWD), in AscInitLram()
4099 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_BWD), in AscInitLram()
4101 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_QNO), in AscInitLram()
4106 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_FWD), in AscInitLram()
4108 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_BWD), in AscInitLram()
4110 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_QNO), in AscInitLram()
4113 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_FWD), in AscInitLram()
4115 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_BWD), in AscInitLram()
4117 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_QNO), in AscInitLram()
4124 (ushort)(s_addr + (ushort)ASC_SCSIQ_B_FWD), i); in AscInitLram()
4126 (ushort)(s_addr + (ushort)ASC_SCSIQ_B_BWD), i); in AscInitLram()
4128 (ushort)(s_addr + (ushort)ASC_SCSIQ_B_QNO), i); in AscInitLram()
4134 AscLoadMicroCode(PortAddr iop_base, ushort s_addr, in AscLoadMicroCode()
4135 const uchar *mcode_buf, ushort mcode_size) in AscLoadMicroCode()
4138 ushort mcode_word_size; in AscLoadMicroCode()
4139 ushort mcode_chksum; in AscLoadMicroCode()
4142 mcode_word_size = (ushort)(mcode_size >> 1); in AscLoadMicroCode()
4148 mcode_chksum = (ushort)AscMemSumLramWord(iop_base, in AscLoadMicroCode()
4149 (ushort)ASC_CODE_SEC_BEG, in AscLoadMicroCode()
4150 (ushort)((mcode_size - in AscLoadMicroCode()
4151 s_addr - (ushort) in AscLoadMicroCode()
4164 ushort lram_addr; in AscInitQLinkVar()
4175 AscWriteLramByte(iop_base, (ushort)ASCV_TOTAL_READY_Q_B, in AscInitQLinkVar()
4189 static ushort AscInitMicroCodeVar(ASC_DVC_VAR *asc_dvc) in AscInitMicroCodeVar()
4192 ushort warn_code; in AscInitMicroCodeVar()
4227 AscReadLramWord(iop_base, (ushort)ASCV_MC_DATE_W); in AscInitMicroCodeVar()
4229 AscReadLramWord(iop_base, (ushort)ASCV_MC_VER_W); in AscInitMicroCodeVar()
4253 static ushort AscInitAsc1000Driver(ASC_DVC_VAR *asc_dvc) in AscInitAsc1000Driver()
4259 ushort warn_code; in AscInitAsc1000Driver()
4435 ushort idle_cmd, ADV_DCNT idle_cmd_parameter) in AdvSendIdleCmd()
4448 AdvWriteWordLram(iop_base, ASC_MC_IDLE_CMD_STATUS, (ushort)0); in AdvSendIdleCmd()
4506 status = AdvSendIdleCmd(asc_dvc, (ushort)IDLE_CMD_SCSI_RESET_START, 0L); in AdvResetSB()
4523 status = AdvSendIdleCmd(asc_dvc, (ushort)IDLE_CMD_SCSI_RESET_END, 0L); in AdvResetSB()
4548 ushort warn_code; in AdvInitAsc3550Driver()
4551 ushort code_sum; in AdvInitAsc3550Driver()
4556 ushort scsi_cfg1; in AdvInitAsc3550Driver()
4558 ushort bios_mem[ASC_MC_BIOSLEN / 2]; /* BIOS RISC Memory 0x40-0x8F. */ in AdvInitAsc3550Driver()
4559 ushort wdtr_able = 0, sdtr_able, tagqng_able; in AdvInitAsc3550Driver()
4594 ushort bios_version, major, minor; in AdvInitAsc3550Driver()
5007 ushort warn_code; in AdvInitAsc38C0800Driver()
5010 ushort code_sum; in AdvInitAsc38C0800Driver()
5015 ushort scsi_cfg1; in AdvInitAsc38C0800Driver()
5018 ushort bios_mem[ASC_MC_BIOSLEN / 2]; /* BIOS RISC Memory 0x40-0x8F. */ in AdvInitAsc38C0800Driver()
5019 ushort wdtr_able, sdtr_able, tagqng_able; in AdvInitAsc38C0800Driver()
5507 ushort warn_code; in AdvInitAsc38C1600Driver()
5510 ushort code_sum; in AdvInitAsc38C1600Driver()
5515 ushort scsi_cfg1; in AdvInitAsc38C1600Driver()
5518 ushort bios_mem[ASC_MC_BIOSLEN / 2]; /* BIOS RISC Memory 0x40-0x8F. */ in AdvInitAsc38C1600Driver()
5519 ushort wdtr_able, sdtr_able, ppr_able, tagqng_able; in AdvInitAsc38C1600Driver()
6012 ushort wdtr_able, sdtr_able, tagqng_able; in AdvResetChipAndSB()
6013 ushort ppr_able = 0; in AdvResetChipAndSB()
6016 ushort bios_sig; in AdvResetChipAndSB()
6313 ushort target_bit; in AdvISR()
6421 static int AscSetLibErrorCode(ASC_DVC_VAR *asc_dvc, ushort err_code) in AscSetLibErrorCode()
6435 ushort loop; in AscAckInterrupt()
6563 ushort halt_q_addr; in AscIsrChipHalted()
6565 ushort int_halt_code; in AscIsrChipHalted()
6589 (ushort)(halt_q_addr + in AscIsrChipHalted()
6590 (ushort)ASC_SCSIQ_B_TARGET_IX)); in AscIsrChipHalted()
6592 (ushort)(halt_q_addr + (ushort)ASC_SCSIQ_B_CNTL)); in AscIsrChipHalted()
6695 (ushort)(halt_q_addr + in AscIsrChipHalted()
6696 (ushort)ASC_SCSIQ_B_CNTL), in AscIsrChipHalted()
6711 (ushort)(halt_q_addr + in AscIsrChipHalted()
6712 (ushort)ASC_SCSIQ_B_CNTL), in AscIsrChipHalted()
6725 (ushort)(halt_q_addr + in AscIsrChipHalted()
6726 (ushort)ASC_SCSIQ_B_CNTL), in AscIsrChipHalted()
6752 (ushort)(halt_q_addr + in AscIsrChipHalted()
6753 (ushort)ASC_SCSIQ_B_CNTL), q_cntl); in AscIsrChipHalted()
6756 (ushort)(halt_q_addr + (ushort) in AscIsrChipHalted()
6768 (ushort)(halt_q_addr + in AscIsrChipHalted()
6769 (ushort)ASC_SCSIQ_B_TAG_CODE), in AscIsrChipHalted()
6773 (ushort)(halt_q_addr + (ushort) in AscIsrChipHalted()
6777 (ushort)(halt_q_addr + in AscIsrChipHalted()
6778 (ushort)ASC_SCSIQ_B_STATUS), in AscIsrChipHalted()
6781 scsi_busy = AscReadLramByte(iop_base, (ushort)ASCV_SCSIBUSY_B); in AscIsrChipHalted()
6783 AscWriteLramByte(iop_base, (ushort)ASCV_SCSIBUSY_B, scsi_busy); in AscIsrChipHalted()
6805 (ushort)(halt_q_addr + in AscIsrChipHalted()
6806 (ushort)ASC_SCSIQ_B_CNTL), q_cntl); in AscIsrChipHalted()
6812 (ushort)((ushort)halt_q_addr + in AscIsrChipHalted()
6813 (ushort) in AscIsrChipHalted()
6817 (ushort)((ushort)ASC_QADR_BEG + in AscIsrChipHalted()
6818 (ushort)target_ix)); in AscIsrChipHalted()
6822 (ushort)ASCV_SCSIBUSY_B); in AscIsrChipHalted()
6825 (ushort)ASCV_SCSIBUSY_B, scsi_busy); in AscIsrChipHalted()
6835 (ushort)((ushort) in AscIsrChipHalted()
6837 + (ushort) in AscIsrChipHalted()
6858 ushort q_addr; in AscIsrChipHalted()
6864 ushort sg_list_dwords; in AscIsrChipHalted()
6865 ushort sg_entry_cnt; in AscIsrChipHalted()
6869 q_no = AscReadLramByte(iop_base, (ushort)ASCV_REQ_SG_LIST_QP); in AscIsrChipHalted()
6884 (ushort) in AscIsrChipHalted()
6892 (ushort)(q_addr + in AscIsrChipHalted()
6896 (ushort)(q_addr + in AscIsrChipHalted()
6904 (ushort)(q_addr + in AscIsrChipHalted()
6905 (ushort)ASC_SCSIQ_B_SG_WK_QP), in AscIsrChipHalted()
6999 (ushort)(q_addr + in AscIsrChipHalted()
7026 DvcGetQinfo(PortAddr iop_base, ushort s_addr, uchar *inbuf, int words) in DvcGetQinfo()
7029 ushort word; in DvcGetQinfo()
7045 ushort q_addr, in _AscCopyLramScsiDoneQ()
7048 ushort _val; in _AscCopyLramScsiDoneQ()
7057 (ushort)(q_addr + (ushort)ASC_SCSIQ_B_STATUS)); in _AscCopyLramScsiDoneQ()
7061 (ushort)(q_addr + (ushort)ASC_SCSIQ_B_CNTL)); in _AscCopyLramScsiDoneQ()
7065 (ushort)(q_addr + in _AscCopyLramScsiDoneQ()
7066 (ushort)ASC_SCSIQ_B_SENSE_LEN)); in _AscCopyLramScsiDoneQ()
7074 (ushort)(q_addr + in _AscCopyLramScsiDoneQ()
7075 (ushort) in _AscCopyLramScsiDoneQ()
7082 (ushort)(q_addr + (ushort) in _AscCopyLramScsiDoneQ()
7218 ushort q_addr; in AscIsrQDone()
7219 ushort sg_q_addr; in AscIsrQDone()
7231 (ushort)(q_addr + (ushort)ASC_SCSIQ_B_FWD)); in AscIsrQDone()
7238 (ushort)(q_addr + in AscIsrQDone()
7239 (ushort)ASC_SCSIQ_B_STATUS), in AscIsrQDone()
7250 (ushort)(sg_q_addr in AscIsrQDone()
7251 + (ushort) in AscIsrQDone()
7263 (ushort)(sg_q_addr + (ushort) in AscIsrQDone()
7272 (ushort)((ushort) in AscIsrQDone()
7274 + (ushort) in AscIsrQDone()
7278 scsi_busy = AscReadLramByte(iop_base, (ushort) in AscIsrQDone()
7282 (ushort)ASCV_SCSIBUSY_B, in AscIsrQDone()
7340 (ushort)(q_addr + (ushort) in AscIsrQDone()
7367 ushort saved_ram_addr; in AscISR()
7713 (ushort)(ASCV_MAX_DVC_QNG_BEG + sdev->id), in advansys_narrow_slave_configure()
8259 ushort q_addr; in AscAllocFreeQueue()
8265 (ushort)(q_addr + in AscAllocFreeQueue()
8267 next_qp = AscReadLramByte(iop_base, (ushort)(q_addr + ASC_SCSIQ_B_FWD)); in AscAllocFreeQueue()
8297 DvcPutScsiQ(PortAddr iop_base, ushort s_addr, uchar *outbuf, int words) in DvcPutScsiQ()
8308 ((ushort)outbuf[i + 1] << 8) | outbuf[i]); in DvcPutScsiQ()
8314 ushort q_addr; in AscPutReadyQueue()
8348 (ushort)(q_addr + (ushort)ASC_SCSIQ_B_STATUS), in AscPutReadyQueue()
8349 (ushort)(((ushort)scsiq->q1. in AscPutReadyQueue()
8350 q_no << 8) | (ushort)QS_READY)); in AscPutReadyQueue()
8364 ushort sg_list_dwords; in AscPutReadySgListQueue()
8365 ushort sg_index; in AscPutReadySgListQueue()
8366 ushort sg_entry_cnt; in AscPutReadySgListQueue()
8367 ushort q_addr; in AscPutReadySgListQueue()
8463 (ushort)(q_addr + in AscPutReadySgListQueue()
8556 ushort sg_entry_cnt = 0; in AscExeScsiQueue()
8557 ushort sg_entry_cnt_minus_one = 0; in AscExeScsiQueue()
8675 (uchar)((ushort)addr & 0x0003); in AscExeScsiQueue()
8733 (uchar)((ushort)addr & 0x0003); in AscExeScsiQueue()
8743 if (((ushort)data_cnt & 0x01FF) in AscExeScsiQueue()
9013 static ushort AscGetEisaChipCfg(PortAddr iop_base) in DEF_SCSI_QCMD()
9058 ushort cfg_lsw; in AscSetChipScsiID()
9065 cfg_lsw |= (ushort)((new_host_id & ASC_MAX_TID) << 8); in AscSetChipScsiID()
9098 outp(0x000B, (ushort)(0xC0 | dma_channel)); in AscEnableIsaDma()
9101 outp(0x00D6, (ushort)(0xC0 | (dma_channel - 4))); in AscEnableIsaDma()
9102 outp(0x00D4, (ushort)(dma_channel - 4)); in AscEnableIsaDma()
9125 static ASC_DCNT AscGetMaxDmaCount(ushort bus_type) in AscGetMaxDmaCount()
9135 static ushort AscGetIsaDmaChannel(PortAddr iop_base) in AscGetIsaDmaChannel()
9137 ushort channel; in AscGetIsaDmaChannel()
9147 static ushort AscSetIsaDmaChannel(PortAddr iop_base, ushort dma_channel) in AscSetIsaDmaChannel()
9149 ushort cfg_lsw; in AscSetIsaDmaChannel()
9186 static ushort AscInitAscDvcVar(ASC_DVC_VAR *asc_dvc) in AscInitAscDvcVar()
9190 ushort warn_code; in AscInitAscDvcVar()
9293 static ushort AscReadEEPWord(PortAddr iop_base, uchar addr) in AscReadEEPWord()
9295 ushort read_wval; in AscReadEEPWord()
9308 static ushort AscGetEEPConfig(PortAddr iop_base, ASCEEP_CONFIG *cfg_buf, in AscGetEEPConfig()
9309 ushort bus_type) in AscGetEEPConfig()
9311 ushort wval; in AscGetEEPConfig()
9312 ushort sum; in AscGetEEPConfig()
9313 ushort *wbuf; in AscGetEEPConfig()
9319 wbuf = (ushort *)cfg_buf; in AscGetEEPConfig()
9358 ushort q_addr; in AscTestExternalLram()
9359 ushort saved_word; in AscTestExternalLram()
9382 static int AscWriteEEPDataReg(PortAddr iop_base, ushort data_reg) in AscWriteEEPDataReg()
9384 ushort read_back; in AscWriteEEPDataReg()
9401 static ushort AscWriteEEPWord(PortAddr iop_base, uchar addr, ushort word_val) in AscWriteEEPWord()
9403 ushort read_wval; in AscWriteEEPWord()
9422 ushort bus_type) in AscSetEEPConfigOnce()
9425 ushort *wbuf; in AscSetEEPConfigOnce()
9426 ushort word; in AscSetEEPConfigOnce()
9427 ushort sum; in AscSetEEPConfigOnce()
9433 wbuf = (ushort *)cfg_buf; in AscSetEEPConfigOnce()
9477 wbuf = (ushort *)cfg_buf; in AscSetEEPConfigOnce()
9518 ushort bus_type) in AscSetEEPConfig()
9536 static ushort AscInitFromEEP(ASC_DVC_VAR *asc_dvc) in AscInitFromEEP()
9541 ushort chksum; in AscInitFromEEP()
9542 ushort warn_code; in AscInitFromEEP()
9543 ushort cfg_msw, cfg_lsw; in AscInitFromEEP()
10228 static ushort AdvReadEEPWord(AdvPortAddr iop_base, int eep_word_addr) in AdvReadEEPWord()
10242 ushort *wbuf; in AdvSet3550EEPConfig()
10243 ushort addr, chksum; in AdvSet3550EEPConfig()
10244 ushort *charfields; in AdvSet3550EEPConfig()
10246 wbuf = (ushort *)cfg_buf; in AdvSet3550EEPConfig()
10247 charfields = (ushort *)&ADVEEP_3550_Config_Field_IsChar; in AdvSet3550EEPConfig()
10258 ushort word; in AdvSet3550EEPConfig()
10287 ushort word; in AdvSet3550EEPConfig()
10309 ushort *wbuf; in AdvSet38C0800EEPConfig()
10310 ushort *charfields; in AdvSet38C0800EEPConfig()
10311 ushort addr, chksum; in AdvSet38C0800EEPConfig()
10313 wbuf = (ushort *)cfg_buf; in AdvSet38C0800EEPConfig()
10314 charfields = (ushort *)&ADVEEP_38C0800_Config_Field_IsChar; in AdvSet38C0800EEPConfig()
10325 ushort word; in AdvSet38C0800EEPConfig()
10354 ushort word; in AdvSet38C0800EEPConfig()
10376 ushort *wbuf; in AdvSet38C1600EEPConfig()
10377 ushort *charfields; in AdvSet38C1600EEPConfig()
10378 ushort addr, chksum; in AdvSet38C1600EEPConfig()
10380 wbuf = (ushort *)cfg_buf; in AdvSet38C1600EEPConfig()
10381 charfields = (ushort *)&ADVEEP_38C1600_Config_Field_IsChar; in AdvSet38C1600EEPConfig()
10392 ushort word; in AdvSet38C1600EEPConfig()
10421 ushort word; in AdvSet38C1600EEPConfig()
10442 static ushort AdvGet3550EEPConfig(AdvPortAddr iop_base, in AdvGet3550EEPConfig()
10445 ushort wval, chksum; in AdvGet3550EEPConfig()
10446 ushort *wbuf; in AdvGet3550EEPConfig()
10448 ushort *charfields; in AdvGet3550EEPConfig()
10450 charfields = (ushort *)&ADVEEP_3550_Config_Field_IsChar; in AdvGet3550EEPConfig()
10451 wbuf = (ushort *)cfg_buf; in AdvGet3550EEPConfig()
10485 static ushort AdvGet38C0800EEPConfig(AdvPortAddr iop_base, in AdvGet38C0800EEPConfig()
10488 ushort wval, chksum; in AdvGet38C0800EEPConfig()
10489 ushort *wbuf; in AdvGet38C0800EEPConfig()
10491 ushort *charfields; in AdvGet38C0800EEPConfig()
10493 charfields = (ushort *)&ADVEEP_38C0800_Config_Field_IsChar; in AdvGet38C0800EEPConfig()
10494 wbuf = (ushort *)cfg_buf; in AdvGet38C0800EEPConfig()
10528 static ushort AdvGet38C1600EEPConfig(AdvPortAddr iop_base, in AdvGet38C1600EEPConfig()
10531 ushort wval, chksum; in AdvGet38C1600EEPConfig()
10532 ushort *wbuf; in AdvGet38C1600EEPConfig()
10534 ushort *charfields; in AdvGet38C1600EEPConfig()
10536 charfields = (ushort *)&ADVEEP_38C1600_Config_Field_IsChar; in AdvGet38C1600EEPConfig()
10537 wbuf = (ushort *)cfg_buf; in AdvGet38C1600EEPConfig()
10581 ushort warn_code; in AdvInitFrom3550EEP()
10731 ushort warn_code; in AdvInitFrom38C0800EEP()
10734 ushort sdtr_speed = 0; in AdvInitFrom38C0800EEP()
10930 ushort warn_code; in AdvInitFrom38C1600EEP()
10933 ushort sdtr_speed = 0; in AdvInitFrom38C1600EEP()
11173 (ushort)AdvReadByteRegister(iop_base, IOPB_CHIP_ID_1), in AdvInitGetConfig()
11174 (ushort)ADV_CHIP_ID_BYTE); in AdvInitGetConfig()
11177 (ushort)AdvReadWordRegister(iop_base, IOPW_CHIP_ID_0), in AdvInitGetConfig()
11178 (ushort)ADV_CHIP_ID_WORD); in AdvInitGetConfig()
11422 (ushort)inp(iop + 1), (ushort)inpw(iop)); in advansys_board_found()