Lines Matching refs:ushort
266 ushort vm_id;
282 ushort x_req_count;
283 ushort x_reconnect_rtn;
306 ushort entry_cnt;
307 ushort queue_cnt;
308 ushort entry_to_copy;
309 ushort res;
318 ushort remain_sg_entry_cnt;
319 ushort next_sg_index;
459 ushort mcode_date;
460 ushort mcode_version;
489 ushort err_code;
490 ushort dvc_cntl;
491 ushort bug_fix_cntl;
492 ushort bus_type;
508 ushort init_state;
517 ushort res2;
541 #define ASC_MCNTL_NO_SEL_TIMEOUT (ushort)0x0001
542 #define ASC_MCNTL_NULL_TARGET (ushort)0x0002
543 #define ASC_CNTL_INITIATOR (ushort)0x0001
544 #define ASC_CNTL_BIOS_GT_1GB (ushort)0x0002
545 #define ASC_CNTL_BIOS_GT_2_DISK (ushort)0x0004
546 #define ASC_CNTL_BIOS_REMOVABLE (ushort)0x0008
547 #define ASC_CNTL_NO_SCAM (ushort)0x0010
548 #define ASC_CNTL_INT_MULTI_Q (ushort)0x0080
549 #define ASC_CNTL_NO_LUN_SUPPORT (ushort)0x0040
550 #define ASC_CNTL_NO_VERIFY_COPY (ushort)0x0100
551 #define ASC_CNTL_RESET_SCSI (ushort)0x0200
552 #define ASC_CNTL_INIT_INQUIRY (ushort)0x0400
553 #define ASC_CNTL_INIT_VERBOSE (ushort)0x0800
554 #define ASC_CNTL_SCSI_PARITY (ushort)0x1000
555 #define ASC_CNTL_BURST_MODE (ushort)0x2000
556 #define ASC_CNTL_SDTR_ENABLE_ULTRA (ushort)0x4000
576 ushort cfg_lsw;
577 ushort cfg_msw;
591 ushort cntl;
592 ushort chksum;
602 #define ASCV_BREAK_SAVED_CODE (ushort)0x0006
608 #define ASCV_MAX_DVC_QNG_BEG (ushort)0x0020
609 #define ASCV_BREAK_ADDR (ushort)0x0028
610 #define ASCV_BREAK_NOTIFY_COUNT (ushort)0x002A
611 #define ASCV_BREAK_CONTROL (ushort)0x002C
612 #define ASCV_BREAK_HIT_COUNT (ushort)0x002E
614 #define ASCV_ASCDVC_ERR_CODE_W (ushort)0x0030
615 #define ASCV_MCODE_CHKSUM_W (ushort)0x0032
616 #define ASCV_MCODE_SIZE_W (ushort)0x0034
617 #define ASCV_STOP_CODE_B (ushort)0x0036
618 #define ASCV_DVC_ERR_CODE_B (ushort)0x0037
619 #define ASCV_OVERRUN_PADDR_D (ushort)0x0038
620 #define ASCV_OVERRUN_BSIZE_D (ushort)0x003C
621 #define ASCV_HALTCODE_W (ushort)0x0040
622 #define ASCV_CHKSUM_W (ushort)0x0042
623 #define ASCV_MC_DATE_W (ushort)0x0044
624 #define ASCV_MC_VER_W (ushort)0x0046
625 #define ASCV_NEXTRDY_B (ushort)0x0048
626 #define ASCV_DONENEXT_B (ushort)0x0049
627 #define ASCV_USE_TAGGED_QNG_B (ushort)0x004A
628 #define ASCV_SCSIBUSY_B (ushort)0x004B
629 #define ASCV_Q_DONE_IN_PROGRESS_B (ushort)0x004C
630 #define ASCV_CURCDB_B (ushort)0x004D
631 #define ASCV_RCLUN_B (ushort)0x004E
632 #define ASCV_BUSY_QHEAD_B (ushort)0x004F
633 #define ASCV_DISC1_QHEAD_B (ushort)0x0050
634 #define ASCV_DISC_ENABLE_B (ushort)0x0052
635 #define ASCV_CAN_TAGGED_QNG_B (ushort)0x0053
636 #define ASCV_HOSTSCSI_ID_B (ushort)0x0055
637 #define ASCV_MCODE_CNTL_B (ushort)0x0056
638 #define ASCV_NULL_TARGET_B (ushort)0x0057
639 #define ASCV_FREE_Q_HEAD_W (ushort)0x0058
640 #define ASCV_DONE_Q_TAIL_W (ushort)0x005A
641 #define ASCV_FREE_Q_HEAD_B (ushort)(ASCV_FREE_Q_HEAD_W+1)
642 #define ASCV_DONE_Q_TAIL_B (ushort)(ASCV_DONE_Q_TAIL_W+1)
643 #define ASCV_HOST_FLAG_B (ushort)0x005D
644 #define ASCV_TOTAL_READY_Q_B (ushort)0x0064
645 #define ASCV_VER_SERIAL_B (ushort)0x0065
646 #define ASCV_HALTCODE_SAVED_W (ushort)0x0066
647 #define ASCV_WTM_FLAG_B (ushort)0x0068
648 #define ASCV_RISC_FLAG_B (ushort)0x006A
649 #define ASCV_REQ_SG_LIST_QP (ushort)0x006B
705 #define ASC_HALT_EXTMSG_IN (ushort)0x8000
706 #define ASC_HALT_CHK_CONDITION (ushort)0x8100
707 #define ASC_HALT_SS_QUEUE_FULL (ushort)0x8200
708 #define ASC_HALT_DISABLE_ASYN_USE_SYN_FIX (ushort)0x8300
709 #define ASC_HALT_ENABLE_ASYN_USE_SYN_FIX (ushort)0x8400
710 #define ASC_HALT_SDTR_REJECTED (ushort)0x4000
711 #define ASC_HALT_HOST_COPY_SG_LIST_TO_RISC ( ushort )0x2000
713 #define ASC_DATA_SEC_BEG (ushort)0x0080
714 #define ASC_DATA_SEC_END (ushort)0x0080
715 #define ASC_CODE_SEC_BEG (ushort)0x0080
716 #define ASC_CODE_SEC_END (ushort)0x0080
718 #define ASC_QADR_USED (ushort)(ASC_MAX_QNO * 64)
719 #define ASC_QADR_END (ushort)0x7FFF
720 #define ASC_QLAST_ADR (ushort)0x7FC0
778 #define INS_HALTINT (ushort)0x6281
779 #define INS_HALT (ushort)0x6280
780 #define INS_SINT (ushort)0x6200
781 #define INS_RFLAG_WTM (ushort)0x7380
786 ushort data[ASC_MC_SAVE_DATA_WSIZE];
787 ushort code[ASC_MC_SAVE_CODE_WSIZE];
800 …DTRDoneAtID(port, id, data) AscWriteLramByte((port), (ushort)((ushort)ASCV_SDTR_DONE_BEG+(ushort)…
801 …SDTRDoneAtID(port, id) AscReadLramByte((port), (ushort)((ushort)ASCV_SDTR_DONE_BEG+(ushort)…
802 …nitSDTRAtID(port, id, data) AscWriteLramByte((port), (ushort)((ushort)ASCV_SDTR_DATA_BEG+(ushort)…
803 …InitSDTRAtID(port, id) AscReadLramByte((port), (ushort)((ushort)ASCV_SDTR_DATA_BEG+(ushort)…
805 #define AscGetChipSignatureWord(port) (ushort)inpw((port)+IOP_SIG_WORD)
807 #define AscGetChipCfgLsw(port) (ushort)inpw((port)+IOP_CONFIG_LOW)
808 #define AscGetChipCfgMsw(port) (ushort)inpw((port)+IOP_CONFIG_HIGH)
813 #define AscGetChipEEPData(port) (ushort)inpw((port)+IOP_EEP_DATA)
815 #define AscGetChipLramAddr(port) (ushort)inpw((PortAddr)((port)+IOP_RAM_ADDR))
817 #define AscGetChipLramData(port) (ushort)inpw((port)+IOP_RAM_DATA)
828 #define AscGetPCAddr(port) (ushort)inpw((port)+IOP_REG_PC)
833 #define AscReadChipAX(port) (ushort)inpw((port)+IOP_REG_AX)
837 #define AscReadChipIH(port) (ushort)inpw((port)+IOP_REG_IH)
841 #define AscReadChipFIFO_L(port) (ushort)inpw((port)+IOP_REG_FIFO_L)
843 #define AscReadChipFIFO_H(port) (ushort)inpw((port)+IOP_REG_FIFO_H)
847 #define AscReadChipDA0(port) (ushort)inpw((port)+IOP_REG_DA0)
849 #define AscReadChipDA1(port) (ushort)inpw((port)+IOP_REG_DA1)
851 #define AscReadChipDC0(port) (ushort)inpw((port)+IOP_REG_DC0)
853 #define AscReadChipDC1(port) (ushort)inpw((port)+IOP_REG_DC1)
918 ushort cfg_lsw; /* 00 power up initialization */
922 ushort cfg_msw; /* 01 unused */
923 ushort disc_enable; /* 02 disconnect enable */
924 ushort wdtr_able; /* 03 Wide DTR able */
925 ushort sdtr_able; /* 04 Synchronous DTR able */
926 ushort start_motor; /* 05 send start up motor */
927 ushort tagqng_able; /* 06 tag queuing able */
928 ushort bios_scan; /* 07 BIOS device control */
929 ushort scam_tolerant; /* 08 no scam */
947 ushort bios_ctrl; /* 12 BIOS control bits */
964 ushort ultra_able; /* 13 ULTRA speed able */
965 ushort reserved2; /* 14 reserved */
968 ushort dvc_cntl; /* 16 control bit for driver */
969 ushort bug_fix; /* 17 control bit for bug fix */
970 ushort serial_number_word1; /* 18 Board serial number word 1 */
971 ushort serial_number_word2; /* 19 Board serial number word 2 */
972 ushort serial_number_word3; /* 20 Board serial number word 3 */
973 ushort check_sum; /* 21 EEP check sum */
975 ushort dvc_err_code; /* 30 last device driver error code */
976 ushort adv_err_code; /* 31 last uc and Adv Lib error code */
977 ushort adv_err_addr; /* 32 last uc error address */
978 ushort saved_dvc_err_code; /* 33 saved last dev. driver error code */
979 ushort saved_adv_err_code; /* 34 saved last uc and Adv Lib error code */
980 ushort saved_adv_err_addr; /* 35 saved last uc error address */
981 ushort num_of_err; /* 36 number of error */
987 ushort cfg_lsw; /* 00 power up initialization */
991 ushort cfg_msw; /* 01 unused */
992 ushort disc_enable; /* 02 disconnect enable */
993 ushort wdtr_able; /* 03 Wide DTR able */
994 ushort sdtr_speed1; /* 04 SDTR Speed TID 0-3 */
995 ushort start_motor; /* 05 send start up motor */
996 ushort tagqng_able; /* 06 tag queuing able */
997 ushort bios_scan; /* 07 BIOS device control */
998 ushort scam_tolerant; /* 08 no scam */
1020 ushort bios_ctrl; /* 12 BIOS control bits */
1037 ushort sdtr_speed2; /* 13 SDTR speed TID 4-7 */
1038 ushort sdtr_speed3; /* 14 SDTR speed TID 8-11 */
1041 ushort dvc_cntl; /* 16 control bit for driver */
1042 ushort sdtr_speed4; /* 17 SDTR speed 4 TID 12-15 */
1043 ushort serial_number_word1; /* 18 Board serial number word 1 */
1044 ushort serial_number_word2; /* 19 Board serial number word 2 */
1045 ushort serial_number_word3; /* 20 Board serial number word 3 */
1046 ushort check_sum; /* 21 EEP check sum */
1048 ushort dvc_err_code; /* 30 last device driver error code */
1049 ushort adv_err_code; /* 31 last uc and Adv Lib error code */
1050 ushort adv_err_addr; /* 32 last uc error address */
1051 ushort saved_dvc_err_code; /* 33 saved last dev. driver error code */
1052 ushort saved_adv_err_code; /* 34 saved last uc and Adv Lib error code */
1053 ushort saved_adv_err_addr; /* 35 saved last uc error address */
1054 ushort reserved36; /* 36 reserved */
1055 ushort reserved37; /* 37 reserved */
1056 ushort reserved38; /* 38 reserved */
1057 ushort reserved39; /* 39 reserved */
1058 ushort reserved40; /* 40 reserved */
1059 ushort reserved41; /* 41 reserved */
1060 ushort reserved42; /* 42 reserved */
1061 ushort reserved43; /* 43 reserved */
1062 ushort reserved44; /* 44 reserved */
1063 ushort reserved45; /* 45 reserved */
1064 ushort reserved46; /* 46 reserved */
1065 ushort reserved47; /* 47 reserved */
1066 ushort reserved48; /* 48 reserved */
1067 ushort reserved49; /* 49 reserved */
1068 ushort reserved50; /* 50 reserved */
1069 ushort reserved51; /* 51 reserved */
1070 ushort reserved52; /* 52 reserved */
1071 ushort reserved53; /* 53 reserved */
1072 ushort reserved54; /* 54 reserved */
1073 ushort reserved55; /* 55 reserved */
1074 ushort cisptr_lsw; /* 56 CIS PTR LSW */
1075 ushort cisprt_msw; /* 57 CIS PTR MSW */
1076 ushort subsysvid; /* 58 SubSystem Vendor ID */
1077 ushort subsysid; /* 59 SubSystem ID */
1078 ushort reserved60; /* 60 reserved */
1079 ushort reserved61; /* 61 reserved */
1080 ushort reserved62; /* 62 reserved */
1081 ushort reserved63; /* 63 reserved */
1087 ushort cfg_lsw; /* 00 power up initialization */
1093 ushort cfg_msw; /* 01 unused */
1094 ushort disc_enable; /* 02 disconnect enable */
1095 ushort wdtr_able; /* 03 Wide DTR able */
1096 ushort sdtr_speed1; /* 04 SDTR Speed TID 0-3 */
1097 ushort start_motor; /* 05 send start up motor */
1098 ushort tagqng_able; /* 06 tag queuing able */
1099 ushort bios_scan; /* 07 BIOS device control */
1100 ushort scam_tolerant; /* 08 no scam */
1122 ushort bios_ctrl; /* 12 BIOS control bits */
1139 ushort sdtr_speed2; /* 13 SDTR speed TID 4-7 */
1140 ushort sdtr_speed3; /* 14 SDTR speed TID 8-11 */
1143 ushort dvc_cntl; /* 16 control bit for driver */
1144 ushort sdtr_speed4; /* 17 SDTR speed 4 TID 12-15 */
1145 ushort serial_number_word1; /* 18 Board serial number word 1 */
1146 ushort serial_number_word2; /* 19 Board serial number word 2 */
1147 ushort serial_number_word3; /* 20 Board serial number word 3 */
1148 ushort check_sum; /* 21 EEP check sum */
1150 ushort dvc_err_code; /* 30 last device driver error code */
1151 ushort adv_err_code; /* 31 last uc and Adv Lib error code */
1152 ushort adv_err_addr; /* 32 last uc error address */
1153 ushort saved_dvc_err_code; /* 33 saved last dev. driver error code */
1154 ushort saved_adv_err_code; /* 34 saved last uc and Adv Lib error code */
1155 ushort saved_adv_err_addr; /* 35 saved last uc error address */
1156 ushort reserved36; /* 36 reserved */
1157 ushort reserved37; /* 37 reserved */
1158 ushort reserved38; /* 38 reserved */
1159 ushort reserved39; /* 39 reserved */
1160 ushort reserved40; /* 40 reserved */
1161 ushort reserved41; /* 41 reserved */
1162 ushort reserved42; /* 42 reserved */
1163 ushort reserved43; /* 43 reserved */
1164 ushort reserved44; /* 44 reserved */
1165 ushort reserved45; /* 45 reserved */
1166 ushort reserved46; /* 46 reserved */
1167 ushort reserved47; /* 47 reserved */
1168 ushort reserved48; /* 48 reserved */
1169 ushort reserved49; /* 49 reserved */
1170 ushort reserved50; /* 50 reserved */
1171 ushort reserved51; /* 51 reserved */
1172 ushort reserved52; /* 52 reserved */
1173 ushort reserved53; /* 53 reserved */
1174 ushort reserved54; /* 54 reserved */
1175 ushort reserved55; /* 55 reserved */
1176 ushort cisptr_lsw; /* 56 CIS PTR LSW */
1177 ushort cisprt_msw; /* 57 CIS PTR MSW */
1178 ushort subsysvid; /* 58 SubSystem Vendor ID */
1179 ushort subsysid; /* 59 SubSystem ID */
1180 ushort reserved60; /* 60 reserved */
1181 ushort reserved61; /* 61 reserved */
1182 ushort reserved62; /* 62 reserved */
1183 ushort reserved63; /* 63 reserved */
1697 ushort disc_enable; /* enable disconnection */
1700 ushort control_flag; /* Microcode Control Flag */
1701 ushort mcode_date; /* Microcode date */
1702 ushort mcode_version; /* Microcode version */
1703 ushort serial1; /* EEPROM serial number word 1 */
1704 ushort serial2; /* EEPROM serial number word 2 */
1705 ushort serial3; /* EEPROM serial number word 3 */
1808 ushort err_code; /* fatal error code */
1809 ushort bios_ctrl; /* BIOS control word, EEPROM word 12 */
1810 ushort wdtr_able; /* try WDTR for a device */
1811 ushort sdtr_able; /* try SDTR for a device */
1812 ushort ultra_able; /* try SDTR Ultra speed for a device */
1813 ushort sdtr_speed1; /* EEPROM SDTR Speed for TID 0-3 */
1814 ushort sdtr_speed2; /* EEPROM SDTR Speed for TID 4-7 */
1815 ushort sdtr_speed3; /* EEPROM SDTR Speed for TID 8-11 */
1816 ushort sdtr_speed4; /* EEPROM SDTR Speed for TID 12-15 */
1817 ushort tagqng_able; /* try tagged queuing with a device */
1818 ushort ppr_able; /* PPR message capable per TID bitmask. */
1820 ushort start_motor; /* start motor command allowed */
1824 ushort no_scam; /* scam_tolerant of EEPROM */
1834 ushort carr_pending_cnt; /* Count of pending carriers. */
1926 cpu_to_le16((ushort) ((dword) & 0xFFFF)))), \
1929 cpu_to_le16((ushort) ((dword >> 16) & 0xFFFF)))))
1972 AdvSendIdleCmd((asc_dvc), (ushort) IDLE_CMD_ABORT, \
1987 AdvSendIdleCmd((asc_dvc), (ushort) IDLE_CMD_DEVICE_RESET, \
1993 #define ADV_SCSI_BIT_ID_TYPE ushort
2240 ushort asc_n_io_port; /* Number I/O ports. */
2242 ushort reqcnt[ADV_MAX_TID + 1]; /* Starvation request count */
2244 ushort queue_full_cnt[ADV_MAX_TID + 1]; /* Queue full count */
2263 ushort ioport; /* I/O Port address. */
2268 ushort bios_signature; /* BIOS Signature. */
2269 ushort bios_version; /* BIOS Version. */
2270 ushort bios_codeseg; /* BIOS Code Segment. */
2271 ushort bios_codelen; /* BIOS Code Segment Length. */
2715 ushort major, minor, letter; in asc_prt_adv_bios()
2771 static int asc_get_eeprom_string(ushort *serialnum, uchar *cp) in asc_get_eeprom_string()
2773 ushort w, num; in asc_get_eeprom_string()
2775 if ((serialnum[1] & 0xFE00) != ((ushort)0xAA << 8)) { in asc_get_eeprom_string()
2864 if (asc_get_eeprom_string((ushort *)&ep->adapter_info[0], serialstr) in asc_prt_asc_board_eeprom()
2922 ushort word; in asc_prt_adv_board_eeprom()
2923 ushort *wordp; in asc_prt_adv_board_eeprom()
2924 ushort sdtr_speed = 0; in asc_prt_adv_board_eeprom()
3301 ushort chip_scsi_id; in asc_prt_adv_board_info()
3302 ushort lramword; in asc_prt_adv_board_info()
3304 ushort tagqng_able; in asc_prt_adv_board_info()
3305 ushort sdtr_able, wdtr_able; in asc_prt_adv_board_info()
3306 ushort wdtr_done, sdtr_done; in asc_prt_adv_board_info()
3307 ushort period = 0; in asc_prt_adv_board_info()
3625 static void AscSetChipIH(PortAddr iop_base, ushort ins_code) in AscSetChipIH()
3692 ushort sig_word; in AscFindSignature()
3700 if ((sig_word == (ushort)ASC_1000_ID0W) || in AscFindSignature()
3701 (sig_word == (ushort)ASC_1000_ID0W_FIX)) { in AscFindSignature()
3710 ushort cfg; in AscEnableInterrupt()
3718 ushort cfg; in AscDisableInterrupt()
3724 static uchar AscReadLramByte(PortAddr iop_base, ushort addr) in AscReadLramByte()
3741 static ushort AscReadLramWord(PortAddr iop_base, ushort addr) in AscReadLramWord()
3743 ushort word_data; in AscReadLramWord()
3751 AscMemWordSetLram(PortAddr iop_base, ushort s_addr, ushort set_wval, int words) in AscMemWordSetLram()
3761 static void AscWriteLramWord(PortAddr iop_base, ushort addr, ushort word_val) in AscWriteLramWord()
3767 static void AscWriteLramByte(PortAddr iop_base, ushort addr, uchar byte_val) in AscWriteLramByte()
3769 ushort word_data; in AscWriteLramByte()
3775 word_data |= (((ushort)byte_val << 8) & 0xFF00); in AscWriteLramByte()
3779 word_data |= ((ushort)byte_val & 0x00FF); in AscWriteLramByte()
3791 AscMemWordCopyPtrToLram(PortAddr iop_base, ushort s_addr, in AscMemWordCopyPtrToLram()
3807 ((ushort)s_buffer[i + 1] << 8) | s_buffer[i]); in AscMemWordCopyPtrToLram()
3819 ushort s_addr, uchar *s_buffer, int dwords) in AscMemDWordCopyPtrToLram()
3825 outpw(iop_base + IOP_RAM_DATA, ((ushort)s_buffer[i + 1] << 8) | s_buffer[i]); /* LSW */ in AscMemDWordCopyPtrToLram()
3826 outpw(iop_base + IOP_RAM_DATA, ((ushort)s_buffer[i + 3] << 8) | s_buffer[i + 2]); /* MSW */ in AscMemDWordCopyPtrToLram()
3838 ushort s_addr, uchar *d_buffer, int words) in AscMemWordCopyPtrFromLram()
3841 ushort word; in AscMemWordCopyPtrFromLram()
3851 static u32 AscMemSumLramWord(PortAddr iop_base, ushort s_addr, int words) in AscMemSumLramWord()
3865 ushort s_addr; in AscInitLram()
3870 (ushort)(((int)(asc_dvc->max_total_qng + 2 + 1) * in AscInitLram()
3874 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_FWD), in AscInitLram()
3876 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_BWD), in AscInitLram()
3878 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_QNO), in AscInitLram()
3883 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_FWD), in AscInitLram()
3885 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_BWD), in AscInitLram()
3887 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_QNO), in AscInitLram()
3890 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_FWD), in AscInitLram()
3892 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_BWD), in AscInitLram()
3894 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_QNO), in AscInitLram()
3901 (ushort)(s_addr + (ushort)ASC_SCSIQ_B_FWD), i); in AscInitLram()
3903 (ushort)(s_addr + (ushort)ASC_SCSIQ_B_BWD), i); in AscInitLram()
3905 (ushort)(s_addr + (ushort)ASC_SCSIQ_B_QNO), i); in AscInitLram()
3910 AscLoadMicroCode(PortAddr iop_base, ushort s_addr, in AscLoadMicroCode()
3911 const uchar *mcode_buf, ushort mcode_size) in AscLoadMicroCode()
3914 ushort mcode_word_size; in AscLoadMicroCode()
3915 ushort mcode_chksum; in AscLoadMicroCode()
3918 mcode_word_size = (ushort)(mcode_size >> 1); in AscLoadMicroCode()
3924 mcode_chksum = (ushort)AscMemSumLramWord(iop_base, in AscLoadMicroCode()
3925 (ushort)ASC_CODE_SEC_BEG, in AscLoadMicroCode()
3926 (ushort)((mcode_size - in AscLoadMicroCode()
3927 s_addr - (ushort) in AscLoadMicroCode()
3940 ushort lram_addr; in AscInitQLinkVar()
3951 AscWriteLramByte(iop_base, (ushort)ASCV_TOTAL_READY_Q_B, in AscInitQLinkVar()
4003 AscReadLramWord(iop_base, (ushort)ASCV_MC_DATE_W); in AscInitMicroCodeVar()
4005 AscReadLramWord(iop_base, (ushort)ASCV_MC_VER_W); in AscInitMicroCodeVar()
4243 ushort idle_cmd, u32 idle_cmd_parameter) in AdvSendIdleCmd()
4255 AdvWriteWordLram(iop_base, ASC_MC_IDLE_CMD_STATUS, (ushort)0); in AdvSendIdleCmd()
4313 status = AdvSendIdleCmd(asc_dvc, (ushort)IDLE_CMD_SCSI_RESET_START, 0L); in AdvResetSB()
4330 status = AdvSendIdleCmd(asc_dvc, (ushort)IDLE_CMD_SCSI_RESET_END, 0L); in AdvResetSB()
4355 ushort warn_code; in AdvInitAsc3550Driver()
4358 ushort code_sum; in AdvInitAsc3550Driver()
4363 ushort scsi_cfg1; in AdvInitAsc3550Driver()
4365 ushort bios_mem[ASC_MC_BIOSLEN / 2]; /* BIOS RISC Memory 0x40-0x8F. */ in AdvInitAsc3550Driver()
4366 ushort wdtr_able = 0, sdtr_able, tagqng_able; in AdvInitAsc3550Driver()
4401 ushort bios_version, major, minor; in AdvInitAsc3550Driver()
4798 ushort warn_code; in AdvInitAsc38C0800Driver()
4801 ushort code_sum; in AdvInitAsc38C0800Driver()
4806 ushort scsi_cfg1; in AdvInitAsc38C0800Driver()
4809 ushort bios_mem[ASC_MC_BIOSLEN / 2]; /* BIOS RISC Memory 0x40-0x8F. */ in AdvInitAsc38C0800Driver()
4810 ushort wdtr_able, sdtr_able, tagqng_able; in AdvInitAsc38C0800Driver()
5284 ushort warn_code; in AdvInitAsc38C1600Driver()
5287 ushort code_sum; in AdvInitAsc38C1600Driver()
5292 ushort scsi_cfg1; in AdvInitAsc38C1600Driver()
5295 ushort bios_mem[ASC_MC_BIOSLEN / 2]; /* BIOS RISC Memory 0x40-0x8F. */ in AdvInitAsc38C1600Driver()
5296 ushort wdtr_able, sdtr_able, ppr_able, tagqng_able; in AdvInitAsc38C1600Driver()
5773 ushort wdtr_able, sdtr_able, tagqng_able; in AdvResetChipAndSB()
5774 ushort ppr_able = 0; in AdvResetChipAndSB()
5777 ushort bios_sig; in AdvResetChipAndSB()
6157 static int AscSetLibErrorCode(ASC_DVC_VAR *asc_dvc, ushort err_code) in AscSetLibErrorCode()
6171 ushort loop; in AscAckInterrupt()
6298 ushort halt_q_addr; in AscIsrChipHalted()
6300 ushort int_halt_code; in AscIsrChipHalted()
6324 (ushort)(halt_q_addr + in AscIsrChipHalted()
6325 (ushort)ASC_SCSIQ_B_TARGET_IX)); in AscIsrChipHalted()
6327 (ushort)(halt_q_addr + (ushort)ASC_SCSIQ_B_CNTL)); in AscIsrChipHalted()
6430 (ushort)(halt_q_addr + in AscIsrChipHalted()
6431 (ushort)ASC_SCSIQ_B_CNTL), in AscIsrChipHalted()
6446 (ushort)(halt_q_addr + in AscIsrChipHalted()
6447 (ushort)ASC_SCSIQ_B_CNTL), in AscIsrChipHalted()
6460 (ushort)(halt_q_addr + in AscIsrChipHalted()
6461 (ushort)ASC_SCSIQ_B_CNTL), in AscIsrChipHalted()
6487 (ushort)(halt_q_addr + in AscIsrChipHalted()
6488 (ushort)ASC_SCSIQ_B_CNTL), q_cntl); in AscIsrChipHalted()
6491 (ushort)(halt_q_addr + (ushort) in AscIsrChipHalted()
6503 (ushort)(halt_q_addr + in AscIsrChipHalted()
6504 (ushort)ASC_SCSIQ_B_TAG_CODE), in AscIsrChipHalted()
6508 (ushort)(halt_q_addr + (ushort) in AscIsrChipHalted()
6512 (ushort)(halt_q_addr + in AscIsrChipHalted()
6513 (ushort)ASC_SCSIQ_B_STATUS), in AscIsrChipHalted()
6516 scsi_busy = AscReadLramByte(iop_base, (ushort)ASCV_SCSIBUSY_B); in AscIsrChipHalted()
6518 AscWriteLramByte(iop_base, (ushort)ASCV_SCSIBUSY_B, scsi_busy); in AscIsrChipHalted()
6540 (ushort)(halt_q_addr + in AscIsrChipHalted()
6541 (ushort)ASC_SCSIQ_B_CNTL), q_cntl); in AscIsrChipHalted()
6547 (ushort)((ushort)halt_q_addr + in AscIsrChipHalted()
6548 (ushort) in AscIsrChipHalted()
6552 (ushort)((ushort)ASC_QADR_BEG + in AscIsrChipHalted()
6553 (ushort)target_ix)); in AscIsrChipHalted()
6557 (ushort)ASCV_SCSIBUSY_B); in AscIsrChipHalted()
6560 (ushort)ASCV_SCSIBUSY_B, scsi_busy); in AscIsrChipHalted()
6570 (ushort)((ushort) in AscIsrChipHalted()
6572 + (ushort) in AscIsrChipHalted()
6604 DvcGetQinfo(PortAddr iop_base, ushort s_addr, uchar *inbuf, int words) in DvcGetQinfo()
6607 ushort word; in DvcGetQinfo()
6623 ushort q_addr, in _AscCopyLramScsiDoneQ()
6626 ushort _val; in _AscCopyLramScsiDoneQ()
6635 (ushort)(q_addr + (ushort)ASC_SCSIQ_B_STATUS)); in _AscCopyLramScsiDoneQ()
6639 (ushort)(q_addr + (ushort)ASC_SCSIQ_B_CNTL)); in _AscCopyLramScsiDoneQ()
6643 (ushort)(q_addr + in _AscCopyLramScsiDoneQ()
6644 (ushort)ASC_SCSIQ_B_SENSE_LEN)); in _AscCopyLramScsiDoneQ()
6652 (ushort)(q_addr + in _AscCopyLramScsiDoneQ()
6653 (ushort) in _AscCopyLramScsiDoneQ()
6660 (ushort)(q_addr + (ushort) in _AscCopyLramScsiDoneQ()
6776 ushort q_addr; in AscIsrQDone()
6777 ushort sg_q_addr; in AscIsrQDone()
6789 (ushort)(q_addr + (ushort)ASC_SCSIQ_B_FWD)); in AscIsrQDone()
6796 (ushort)(q_addr + in AscIsrQDone()
6797 (ushort)ASC_SCSIQ_B_STATUS), in AscIsrQDone()
6808 (ushort)(sg_q_addr in AscIsrQDone()
6809 + (ushort) in AscIsrQDone()
6821 (ushort)(sg_q_addr + (ushort) in AscIsrQDone()
6830 (ushort)((ushort) in AscIsrQDone()
6832 + (ushort) in AscIsrQDone()
6836 scsi_busy = AscReadLramByte(iop_base, (ushort) in AscIsrQDone()
6840 (ushort)ASCV_SCSIBUSY_B, in AscIsrQDone()
6901 (ushort)(q_addr + (ushort) in AscIsrQDone()
6928 ushort saved_ram_addr; in AscISR()
7267 (ushort)(ASCV_MAX_DVC_QNG_BEG + sdev->id), in advansys_narrow_slave_configure()
7818 ushort q_addr; in AscAllocFreeQueue()
7824 (ushort)(q_addr + in AscAllocFreeQueue()
7826 next_qp = AscReadLramByte(iop_base, (ushort)(q_addr + ASC_SCSIQ_B_FWD)); in AscAllocFreeQueue()
7856 DvcPutScsiQ(PortAddr iop_base, ushort s_addr, uchar *outbuf, int words) in DvcPutScsiQ()
7867 ((ushort)outbuf[i + 1] << 8) | outbuf[i]); in DvcPutScsiQ()
7873 ushort q_addr; in AscPutReadyQueue()
7907 (ushort)(q_addr + (ushort)ASC_SCSIQ_B_STATUS), in AscPutReadyQueue()
7908 (ushort)(((ushort)scsiq->q1. in AscPutReadyQueue()
7909 q_no << 8) | (ushort)QS_READY)); in AscPutReadyQueue()
7923 ushort sg_list_dwords; in AscPutReadySgListQueue()
7924 ushort sg_index; in AscPutReadySgListQueue()
7925 ushort sg_entry_cnt; in AscPutReadySgListQueue()
7926 ushort q_addr; in AscPutReadySgListQueue()
7981 (ushort)(q_addr + in AscPutReadySgListQueue()
8074 ushort sg_entry_cnt = 0; in AscExeScsiQueue()
8075 ushort sg_entry_cnt_minus_one = 0; in AscExeScsiQueue()
8187 (uchar)((ushort)addr & 0x0003); in AscExeScsiQueue()
8234 (uchar)((ushort)addr & 0x0003); in AscExeScsiQueue()
8244 if (((ushort)data_cnt & 0x01FF) in AscExeScsiQueue()
8491 static ushort AscGetEisaChipCfg(PortAddr iop_base) in DEF_SCSI_QCMD()
8530 ushort cfg_lsw; in AscSetChipScsiID()
8537 cfg_lsw |= (ushort)((new_host_id & ASC_MAX_TID) << 8); in AscSetChipScsiID()
8584 static unsigned int AscGetMaxDmaCount(ushort bus_type) in AscGetMaxDmaCount()
8684 static ushort AscReadEEPWord(PortAddr iop_base, uchar addr) in AscReadEEPWord()
8686 ushort read_wval; in AscReadEEPWord()
8699 static ushort AscGetEEPConfig(PortAddr iop_base, ASCEEP_CONFIG *cfg_buf, in AscGetEEPConfig()
8700 ushort bus_type) in AscGetEEPConfig()
8702 ushort wval; in AscGetEEPConfig()
8703 ushort sum; in AscGetEEPConfig()
8704 ushort *wbuf; in AscGetEEPConfig()
8710 wbuf = (ushort *)cfg_buf; in AscGetEEPConfig()
8749 ushort q_addr; in AscTestExternalLram()
8750 ushort saved_word; in AscTestExternalLram()
8773 static int AscWriteEEPDataReg(PortAddr iop_base, ushort data_reg) in AscWriteEEPDataReg()
8775 ushort read_back; in AscWriteEEPDataReg()
8792 static ushort AscWriteEEPWord(PortAddr iop_base, uchar addr, ushort word_val) in AscWriteEEPWord()
8794 ushort read_wval; in AscWriteEEPWord()
8813 ushort bus_type) in AscSetEEPConfigOnce()
8816 ushort *wbuf; in AscSetEEPConfigOnce()
8817 ushort word; in AscSetEEPConfigOnce()
8818 ushort sum; in AscSetEEPConfigOnce()
8824 wbuf = (ushort *)cfg_buf; in AscSetEEPConfigOnce()
8868 wbuf = (ushort *)cfg_buf; in AscSetEEPConfigOnce()
8909 ushort bus_type) in AscSetEEPConfig()
8932 ushort chksum; in AscInitFromEEP()
8933 ushort warn_code; in AscInitFromEEP()
8934 ushort cfg_msw, cfg_lsw; in AscInitFromEEP()
9606 static ushort AdvReadEEPWord(AdvPortAddr iop_base, int eep_word_addr) in AdvReadEEPWord()
9620 ushort *wbuf; in AdvSet3550EEPConfig()
9621 ushort addr, chksum; in AdvSet3550EEPConfig()
9622 ushort *charfields; in AdvSet3550EEPConfig()
9624 wbuf = (ushort *)cfg_buf; in AdvSet3550EEPConfig()
9625 charfields = (ushort *)&ADVEEP_3550_Config_Field_IsChar; in AdvSet3550EEPConfig()
9636 ushort word; in AdvSet3550EEPConfig()
9665 ushort word; in AdvSet3550EEPConfig()
9687 ushort *wbuf; in AdvSet38C0800EEPConfig()
9688 ushort *charfields; in AdvSet38C0800EEPConfig()
9689 ushort addr, chksum; in AdvSet38C0800EEPConfig()
9691 wbuf = (ushort *)cfg_buf; in AdvSet38C0800EEPConfig()
9692 charfields = (ushort *)&ADVEEP_38C0800_Config_Field_IsChar; in AdvSet38C0800EEPConfig()
9703 ushort word; in AdvSet38C0800EEPConfig()
9732 ushort word; in AdvSet38C0800EEPConfig()
9754 ushort *wbuf; in AdvSet38C1600EEPConfig()
9755 ushort *charfields; in AdvSet38C1600EEPConfig()
9756 ushort addr, chksum; in AdvSet38C1600EEPConfig()
9758 wbuf = (ushort *)cfg_buf; in AdvSet38C1600EEPConfig()
9759 charfields = (ushort *)&ADVEEP_38C1600_Config_Field_IsChar; in AdvSet38C1600EEPConfig()
9770 ushort word; in AdvSet38C1600EEPConfig()
9799 ushort word; in AdvSet38C1600EEPConfig()
9820 static ushort AdvGet3550EEPConfig(AdvPortAddr iop_base, in AdvGet3550EEPConfig()
9823 ushort wval, chksum; in AdvGet3550EEPConfig()
9824 ushort *wbuf; in AdvGet3550EEPConfig()
9826 ushort *charfields; in AdvGet3550EEPConfig()
9828 charfields = (ushort *)&ADVEEP_3550_Config_Field_IsChar; in AdvGet3550EEPConfig()
9829 wbuf = (ushort *)cfg_buf; in AdvGet3550EEPConfig()
9863 static ushort AdvGet38C0800EEPConfig(AdvPortAddr iop_base, in AdvGet38C0800EEPConfig()
9866 ushort wval, chksum; in AdvGet38C0800EEPConfig()
9867 ushort *wbuf; in AdvGet38C0800EEPConfig()
9869 ushort *charfields; in AdvGet38C0800EEPConfig()
9871 charfields = (ushort *)&ADVEEP_38C0800_Config_Field_IsChar; in AdvGet38C0800EEPConfig()
9872 wbuf = (ushort *)cfg_buf; in AdvGet38C0800EEPConfig()
9906 static ushort AdvGet38C1600EEPConfig(AdvPortAddr iop_base, in AdvGet38C1600EEPConfig()
9909 ushort wval, chksum; in AdvGet38C1600EEPConfig()
9910 ushort *wbuf; in AdvGet38C1600EEPConfig()
9912 ushort *charfields; in AdvGet38C1600EEPConfig()
9914 charfields = (ushort *)&ADVEEP_38C1600_Config_Field_IsChar; in AdvGet38C1600EEPConfig()
9915 wbuf = (ushort *)cfg_buf; in AdvGet38C1600EEPConfig()
9959 ushort warn_code; in AdvInitFrom3550EEP()
10109 ushort warn_code; in AdvInitFrom38C0800EEP()
10112 ushort sdtr_speed = 0; in AdvInitFrom38C0800EEP()
10308 ushort warn_code; in AdvInitFrom38C1600EEP()
10311 ushort sdtr_speed = 0; in AdvInitFrom38C1600EEP()
10551 (ushort)AdvReadByteRegister(iop_base, IOPB_CHIP_ID_1), in AdvInitGetConfig()
10552 (ushort)ADV_CHIP_ID_BYTE); in AdvInitGetConfig()
10555 (ushort)AdvReadWordRegister(iop_base, IOPW_CHIP_ID_0), in AdvInitGetConfig()
10556 (ushort)ADV_CHIP_ID_WORD); in AdvInitGetConfig()
10771 (ushort)inp(iop + 1), (ushort)inpw(iop)); in advansys_board_found()