Lines Matching refs:ushort
275 ushort vm_id;
291 ushort x_req_count;
292 ushort x_reconnect_rtn;
315 ushort entry_cnt;
316 ushort queue_cnt;
317 ushort entry_to_copy;
318 ushort res;
327 ushort remain_sg_entry_cnt;
328 ushort next_sg_index;
470 ushort mcode_date;
471 ushort mcode_version;
500 ushort err_code;
501 ushort dvc_cntl;
502 ushort bug_fix_cntl;
503 ushort bus_type;
519 ushort init_state;
528 ushort res2;
552 #define ASC_MCNTL_NO_SEL_TIMEOUT (ushort)0x0001
553 #define ASC_MCNTL_NULL_TARGET (ushort)0x0002
554 #define ASC_CNTL_INITIATOR (ushort)0x0001
555 #define ASC_CNTL_BIOS_GT_1GB (ushort)0x0002
556 #define ASC_CNTL_BIOS_GT_2_DISK (ushort)0x0004
557 #define ASC_CNTL_BIOS_REMOVABLE (ushort)0x0008
558 #define ASC_CNTL_NO_SCAM (ushort)0x0010
559 #define ASC_CNTL_INT_MULTI_Q (ushort)0x0080
560 #define ASC_CNTL_NO_LUN_SUPPORT (ushort)0x0040
561 #define ASC_CNTL_NO_VERIFY_COPY (ushort)0x0100
562 #define ASC_CNTL_RESET_SCSI (ushort)0x0200
563 #define ASC_CNTL_INIT_INQUIRY (ushort)0x0400
564 #define ASC_CNTL_INIT_VERBOSE (ushort)0x0800
565 #define ASC_CNTL_SCSI_PARITY (ushort)0x1000
566 #define ASC_CNTL_BURST_MODE (ushort)0x2000
567 #define ASC_CNTL_SDTR_ENABLE_ULTRA (ushort)0x4000
589 ushort cfg_lsw;
590 ushort cfg_msw;
604 ushort cntl;
605 ushort chksum;
615 #define ASCV_BREAK_SAVED_CODE (ushort)0x0006
621 #define ASCV_MAX_DVC_QNG_BEG (ushort)0x0020
622 #define ASCV_BREAK_ADDR (ushort)0x0028
623 #define ASCV_BREAK_NOTIFY_COUNT (ushort)0x002A
624 #define ASCV_BREAK_CONTROL (ushort)0x002C
625 #define ASCV_BREAK_HIT_COUNT (ushort)0x002E
627 #define ASCV_ASCDVC_ERR_CODE_W (ushort)0x0030
628 #define ASCV_MCODE_CHKSUM_W (ushort)0x0032
629 #define ASCV_MCODE_SIZE_W (ushort)0x0034
630 #define ASCV_STOP_CODE_B (ushort)0x0036
631 #define ASCV_DVC_ERR_CODE_B (ushort)0x0037
632 #define ASCV_OVERRUN_PADDR_D (ushort)0x0038
633 #define ASCV_OVERRUN_BSIZE_D (ushort)0x003C
634 #define ASCV_HALTCODE_W (ushort)0x0040
635 #define ASCV_CHKSUM_W (ushort)0x0042
636 #define ASCV_MC_DATE_W (ushort)0x0044
637 #define ASCV_MC_VER_W (ushort)0x0046
638 #define ASCV_NEXTRDY_B (ushort)0x0048
639 #define ASCV_DONENEXT_B (ushort)0x0049
640 #define ASCV_USE_TAGGED_QNG_B (ushort)0x004A
641 #define ASCV_SCSIBUSY_B (ushort)0x004B
642 #define ASCV_Q_DONE_IN_PROGRESS_B (ushort)0x004C
643 #define ASCV_CURCDB_B (ushort)0x004D
644 #define ASCV_RCLUN_B (ushort)0x004E
645 #define ASCV_BUSY_QHEAD_B (ushort)0x004F
646 #define ASCV_DISC1_QHEAD_B (ushort)0x0050
647 #define ASCV_DISC_ENABLE_B (ushort)0x0052
648 #define ASCV_CAN_TAGGED_QNG_B (ushort)0x0053
649 #define ASCV_HOSTSCSI_ID_B (ushort)0x0055
650 #define ASCV_MCODE_CNTL_B (ushort)0x0056
651 #define ASCV_NULL_TARGET_B (ushort)0x0057
652 #define ASCV_FREE_Q_HEAD_W (ushort)0x0058
653 #define ASCV_DONE_Q_TAIL_W (ushort)0x005A
654 #define ASCV_FREE_Q_HEAD_B (ushort)(ASCV_FREE_Q_HEAD_W+1)
655 #define ASCV_DONE_Q_TAIL_B (ushort)(ASCV_DONE_Q_TAIL_W+1)
656 #define ASCV_HOST_FLAG_B (ushort)0x005D
657 #define ASCV_TOTAL_READY_Q_B (ushort)0x0064
658 #define ASCV_VER_SERIAL_B (ushort)0x0065
659 #define ASCV_HALTCODE_SAVED_W (ushort)0x0066
660 #define ASCV_WTM_FLAG_B (ushort)0x0068
661 #define ASCV_RISC_FLAG_B (ushort)0x006A
662 #define ASCV_REQ_SG_LIST_QP (ushort)0x006B
718 #define ASC_HALT_EXTMSG_IN (ushort)0x8000
719 #define ASC_HALT_CHK_CONDITION (ushort)0x8100
720 #define ASC_HALT_SS_QUEUE_FULL (ushort)0x8200
721 #define ASC_HALT_DISABLE_ASYN_USE_SYN_FIX (ushort)0x8300
722 #define ASC_HALT_ENABLE_ASYN_USE_SYN_FIX (ushort)0x8400
723 #define ASC_HALT_SDTR_REJECTED (ushort)0x4000
724 #define ASC_HALT_HOST_COPY_SG_LIST_TO_RISC ( ushort )0x2000
726 #define ASC_DATA_SEC_BEG (ushort)0x0080
727 #define ASC_DATA_SEC_END (ushort)0x0080
728 #define ASC_CODE_SEC_BEG (ushort)0x0080
729 #define ASC_CODE_SEC_END (ushort)0x0080
731 #define ASC_QADR_USED (ushort)(ASC_MAX_QNO * 64)
732 #define ASC_QADR_END (ushort)0x7FFF
733 #define ASC_QLAST_ADR (ushort)0x7FC0
791 #define INS_HALTINT (ushort)0x6281
792 #define INS_HALT (ushort)0x6280
793 #define INS_SINT (ushort)0x6200
794 #define INS_RFLAG_WTM (ushort)0x7380
799 ushort data[ASC_MC_SAVE_DATA_WSIZE];
800 ushort code[ASC_MC_SAVE_CODE_WSIZE];
813 …DTRDoneAtID(port, id, data) AscWriteLramByte((port), (ushort)((ushort)ASCV_SDTR_DONE_BEG+(ushort)…
814 …SDTRDoneAtID(port, id) AscReadLramByte((port), (ushort)((ushort)ASCV_SDTR_DONE_BEG+(ushort)…
815 …nitSDTRAtID(port, id, data) AscWriteLramByte((port), (ushort)((ushort)ASCV_SDTR_DATA_BEG+(ushort)…
816 …InitSDTRAtID(port, id) AscReadLramByte((port), (ushort)((ushort)ASCV_SDTR_DATA_BEG+(ushort)…
818 #define AscGetChipSignatureWord(port) (ushort)inpw((port)+IOP_SIG_WORD)
820 #define AscGetChipCfgLsw(port) (ushort)inpw((port)+IOP_CONFIG_LOW)
821 #define AscGetChipCfgMsw(port) (ushort)inpw((port)+IOP_CONFIG_HIGH)
826 #define AscGetChipEEPData(port) (ushort)inpw((port)+IOP_EEP_DATA)
828 #define AscGetChipLramAddr(port) (ushort)inpw((PortAddr)((port)+IOP_RAM_ADDR))
830 #define AscGetChipLramData(port) (ushort)inpw((port)+IOP_RAM_DATA)
841 #define AscGetPCAddr(port) (ushort)inpw((port)+IOP_REG_PC)
846 #define AscReadChipAX(port) (ushort)inpw((port)+IOP_REG_AX)
850 #define AscReadChipIH(port) (ushort)inpw((port)+IOP_REG_IH)
854 #define AscReadChipFIFO_L(port) (ushort)inpw((port)+IOP_REG_FIFO_L)
856 #define AscReadChipFIFO_H(port) (ushort)inpw((port)+IOP_REG_FIFO_H)
860 #define AscReadChipDA0(port) (ushort)inpw((port)+IOP_REG_DA0)
862 #define AscReadChipDA1(port) (ushort)inpw((port)+IOP_REG_DA1)
864 #define AscReadChipDC0(port) (ushort)inpw((port)+IOP_REG_DC0)
866 #define AscReadChipDC1(port) (ushort)inpw((port)+IOP_REG_DC1)
931 ushort cfg_lsw; /* 00 power up initialization */
935 ushort cfg_msw; /* 01 unused */
936 ushort disc_enable; /* 02 disconnect enable */
937 ushort wdtr_able; /* 03 Wide DTR able */
938 ushort sdtr_able; /* 04 Synchronous DTR able */
939 ushort start_motor; /* 05 send start up motor */
940 ushort tagqng_able; /* 06 tag queuing able */
941 ushort bios_scan; /* 07 BIOS device control */
942 ushort scam_tolerant; /* 08 no scam */
960 ushort bios_ctrl; /* 12 BIOS control bits */
977 ushort ultra_able; /* 13 ULTRA speed able */
978 ushort reserved2; /* 14 reserved */
981 ushort dvc_cntl; /* 16 control bit for driver */
982 ushort bug_fix; /* 17 control bit for bug fix */
983 ushort serial_number_word1; /* 18 Board serial number word 1 */
984 ushort serial_number_word2; /* 19 Board serial number word 2 */
985 ushort serial_number_word3; /* 20 Board serial number word 3 */
986 ushort check_sum; /* 21 EEP check sum */
988 ushort dvc_err_code; /* 30 last device driver error code */
989 ushort adv_err_code; /* 31 last uc and Adv Lib error code */
990 ushort adv_err_addr; /* 32 last uc error address */
991 ushort saved_dvc_err_code; /* 33 saved last dev. driver error code */
992 ushort saved_adv_err_code; /* 34 saved last uc and Adv Lib error code */
993 ushort saved_adv_err_addr; /* 35 saved last uc error address */
994 ushort num_of_err; /* 36 number of error */
1000 ushort cfg_lsw; /* 00 power up initialization */
1004 ushort cfg_msw; /* 01 unused */
1005 ushort disc_enable; /* 02 disconnect enable */
1006 ushort wdtr_able; /* 03 Wide DTR able */
1007 ushort sdtr_speed1; /* 04 SDTR Speed TID 0-3 */
1008 ushort start_motor; /* 05 send start up motor */
1009 ushort tagqng_able; /* 06 tag queuing able */
1010 ushort bios_scan; /* 07 BIOS device control */
1011 ushort scam_tolerant; /* 08 no scam */
1033 ushort bios_ctrl; /* 12 BIOS control bits */
1050 ushort sdtr_speed2; /* 13 SDTR speed TID 4-7 */
1051 ushort sdtr_speed3; /* 14 SDTR speed TID 8-11 */
1054 ushort dvc_cntl; /* 16 control bit for driver */
1055 ushort sdtr_speed4; /* 17 SDTR speed 4 TID 12-15 */
1056 ushort serial_number_word1; /* 18 Board serial number word 1 */
1057 ushort serial_number_word2; /* 19 Board serial number word 2 */
1058 ushort serial_number_word3; /* 20 Board serial number word 3 */
1059 ushort check_sum; /* 21 EEP check sum */
1061 ushort dvc_err_code; /* 30 last device driver error code */
1062 ushort adv_err_code; /* 31 last uc and Adv Lib error code */
1063 ushort adv_err_addr; /* 32 last uc error address */
1064 ushort saved_dvc_err_code; /* 33 saved last dev. driver error code */
1065 ushort saved_adv_err_code; /* 34 saved last uc and Adv Lib error code */
1066 ushort saved_adv_err_addr; /* 35 saved last uc error address */
1067 ushort reserved36; /* 36 reserved */
1068 ushort reserved37; /* 37 reserved */
1069 ushort reserved38; /* 38 reserved */
1070 ushort reserved39; /* 39 reserved */
1071 ushort reserved40; /* 40 reserved */
1072 ushort reserved41; /* 41 reserved */
1073 ushort reserved42; /* 42 reserved */
1074 ushort reserved43; /* 43 reserved */
1075 ushort reserved44; /* 44 reserved */
1076 ushort reserved45; /* 45 reserved */
1077 ushort reserved46; /* 46 reserved */
1078 ushort reserved47; /* 47 reserved */
1079 ushort reserved48; /* 48 reserved */
1080 ushort reserved49; /* 49 reserved */
1081 ushort reserved50; /* 50 reserved */
1082 ushort reserved51; /* 51 reserved */
1083 ushort reserved52; /* 52 reserved */
1084 ushort reserved53; /* 53 reserved */
1085 ushort reserved54; /* 54 reserved */
1086 ushort reserved55; /* 55 reserved */
1087 ushort cisptr_lsw; /* 56 CIS PTR LSW */
1088 ushort cisprt_msw; /* 57 CIS PTR MSW */
1089 ushort subsysvid; /* 58 SubSystem Vendor ID */
1090 ushort subsysid; /* 59 SubSystem ID */
1091 ushort reserved60; /* 60 reserved */
1092 ushort reserved61; /* 61 reserved */
1093 ushort reserved62; /* 62 reserved */
1094 ushort reserved63; /* 63 reserved */
1100 ushort cfg_lsw; /* 00 power up initialization */
1106 ushort cfg_msw; /* 01 unused */
1107 ushort disc_enable; /* 02 disconnect enable */
1108 ushort wdtr_able; /* 03 Wide DTR able */
1109 ushort sdtr_speed1; /* 04 SDTR Speed TID 0-3 */
1110 ushort start_motor; /* 05 send start up motor */
1111 ushort tagqng_able; /* 06 tag queuing able */
1112 ushort bios_scan; /* 07 BIOS device control */
1113 ushort scam_tolerant; /* 08 no scam */
1135 ushort bios_ctrl; /* 12 BIOS control bits */
1152 ushort sdtr_speed2; /* 13 SDTR speed TID 4-7 */
1153 ushort sdtr_speed3; /* 14 SDTR speed TID 8-11 */
1156 ushort dvc_cntl; /* 16 control bit for driver */
1157 ushort sdtr_speed4; /* 17 SDTR speed 4 TID 12-15 */
1158 ushort serial_number_word1; /* 18 Board serial number word 1 */
1159 ushort serial_number_word2; /* 19 Board serial number word 2 */
1160 ushort serial_number_word3; /* 20 Board serial number word 3 */
1161 ushort check_sum; /* 21 EEP check sum */
1163 ushort dvc_err_code; /* 30 last device driver error code */
1164 ushort adv_err_code; /* 31 last uc and Adv Lib error code */
1165 ushort adv_err_addr; /* 32 last uc error address */
1166 ushort saved_dvc_err_code; /* 33 saved last dev. driver error code */
1167 ushort saved_adv_err_code; /* 34 saved last uc and Adv Lib error code */
1168 ushort saved_adv_err_addr; /* 35 saved last uc error address */
1169 ushort reserved36; /* 36 reserved */
1170 ushort reserved37; /* 37 reserved */
1171 ushort reserved38; /* 38 reserved */
1172 ushort reserved39; /* 39 reserved */
1173 ushort reserved40; /* 40 reserved */
1174 ushort reserved41; /* 41 reserved */
1175 ushort reserved42; /* 42 reserved */
1176 ushort reserved43; /* 43 reserved */
1177 ushort reserved44; /* 44 reserved */
1178 ushort reserved45; /* 45 reserved */
1179 ushort reserved46; /* 46 reserved */
1180 ushort reserved47; /* 47 reserved */
1181 ushort reserved48; /* 48 reserved */
1182 ushort reserved49; /* 49 reserved */
1183 ushort reserved50; /* 50 reserved */
1184 ushort reserved51; /* 51 reserved */
1185 ushort reserved52; /* 52 reserved */
1186 ushort reserved53; /* 53 reserved */
1187 ushort reserved54; /* 54 reserved */
1188 ushort reserved55; /* 55 reserved */
1189 ushort cisptr_lsw; /* 56 CIS PTR LSW */
1190 ushort cisprt_msw; /* 57 CIS PTR MSW */
1191 ushort subsysvid; /* 58 SubSystem Vendor ID */
1192 ushort subsysid; /* 59 SubSystem ID */
1193 ushort reserved60; /* 60 reserved */
1194 ushort reserved61; /* 61 reserved */
1195 ushort reserved62; /* 62 reserved */
1196 ushort reserved63; /* 63 reserved */
1710 ushort disc_enable; /* enable disconnection */
1713 ushort control_flag; /* Microcode Control Flag */
1714 ushort mcode_date; /* Microcode date */
1715 ushort mcode_version; /* Microcode version */
1716 ushort serial1; /* EEPROM serial number word 1 */
1717 ushort serial2; /* EEPROM serial number word 2 */
1718 ushort serial3; /* EEPROM serial number word 3 */
1821 ushort err_code; /* fatal error code */
1822 ushort bios_ctrl; /* BIOS control word, EEPROM word 12 */
1823 ushort wdtr_able; /* try WDTR for a device */
1824 ushort sdtr_able; /* try SDTR for a device */
1825 ushort ultra_able; /* try SDTR Ultra speed for a device */
1826 ushort sdtr_speed1; /* EEPROM SDTR Speed for TID 0-3 */
1827 ushort sdtr_speed2; /* EEPROM SDTR Speed for TID 4-7 */
1828 ushort sdtr_speed3; /* EEPROM SDTR Speed for TID 8-11 */
1829 ushort sdtr_speed4; /* EEPROM SDTR Speed for TID 12-15 */
1830 ushort tagqng_able; /* try tagged queuing with a device */
1831 ushort ppr_able; /* PPR message capable per TID bitmask. */
1833 ushort start_motor; /* start motor command allowed */
1837 ushort no_scam; /* scam_tolerant of EEPROM */
1847 ushort carr_pending_cnt; /* Count of pending carriers. */
1939 cpu_to_le16((ushort) ((dword) & 0xFFFF)))), \
1942 cpu_to_le16((ushort) ((dword >> 16) & 0xFFFF)))))
1985 AdvSendIdleCmd((asc_dvc), (ushort) IDLE_CMD_ABORT, \
2000 AdvSendIdleCmd((asc_dvc), (ushort) IDLE_CMD_DEVICE_RESET, \
2006 #define ADV_SCSI_BIT_ID_TYPE ushort
2259 ushort asc_n_io_port; /* Number I/O ports. */
2261 ushort reqcnt[ADV_MAX_TID + 1]; /* Starvation request count */
2263 ushort queue_full_cnt[ADV_MAX_TID + 1]; /* Queue full count */
2282 ushort ioport; /* I/O Port address. */
2287 ushort bios_signature; /* BIOS Signature. */
2288 ushort bios_version; /* BIOS Version. */
2289 ushort bios_codeseg; /* BIOS Code Segment. */
2290 ushort bios_codelen; /* BIOS Code Segment Length. */
2740 ushort major, minor, letter; in asc_prt_adv_bios()
2796 static int asc_get_eeprom_string(ushort *serialnum, uchar *cp) in asc_get_eeprom_string()
2798 ushort w, num; in asc_get_eeprom_string()
2800 if ((serialnum[1] & 0xFE00) != ((ushort)0xAA << 8)) { in asc_get_eeprom_string()
2894 if (asc_get_eeprom_string((ushort *)&ep->adapter_info[0], serialstr) in asc_prt_asc_board_eeprom()
2960 ushort word; in asc_prt_adv_board_eeprom()
2961 ushort *wordp; in asc_prt_adv_board_eeprom()
2962 ushort sdtr_speed = 0; in asc_prt_adv_board_eeprom()
3350 ushort chip_scsi_id; in asc_prt_adv_board_info()
3351 ushort lramword; in asc_prt_adv_board_info()
3353 ushort tagqng_able; in asc_prt_adv_board_info()
3354 ushort sdtr_able, wdtr_able; in asc_prt_adv_board_info()
3355 ushort wdtr_done, sdtr_done; in asc_prt_adv_board_info()
3356 ushort period = 0; in asc_prt_adv_board_info()
3674 static void AscSetChipIH(PortAddr iop_base, ushort ins_code) in AscSetChipIH()
3741 ushort sig_word; in AscFindSignature()
3749 if ((sig_word == (ushort)ASC_1000_ID0W) || in AscFindSignature()
3750 (sig_word == (ushort)ASC_1000_ID0W_FIX)) { in AscFindSignature()
3759 ushort cfg; in AscEnableInterrupt()
3767 ushort cfg; in AscDisableInterrupt()
3773 static uchar AscReadLramByte(PortAddr iop_base, ushort addr) in AscReadLramByte()
3790 static ushort AscReadLramWord(PortAddr iop_base, ushort addr) in AscReadLramWord()
3792 ushort word_data; in AscReadLramWord()
3800 AscMemWordSetLram(PortAddr iop_base, ushort s_addr, ushort set_wval, int words) in AscMemWordSetLram()
3810 static void AscWriteLramWord(PortAddr iop_base, ushort addr, ushort word_val) in AscWriteLramWord()
3816 static void AscWriteLramByte(PortAddr iop_base, ushort addr, uchar byte_val) in AscWriteLramByte()
3818 ushort word_data; in AscWriteLramByte()
3824 word_data |= (((ushort)byte_val << 8) & 0xFF00); in AscWriteLramByte()
3828 word_data |= ((ushort)byte_val & 0x00FF); in AscWriteLramByte()
3840 AscMemWordCopyPtrToLram(PortAddr iop_base, ushort s_addr, in AscMemWordCopyPtrToLram()
3856 ((ushort)s_buffer[i + 1] << 8) | s_buffer[i]); in AscMemWordCopyPtrToLram()
3868 ushort s_addr, uchar *s_buffer, int dwords) in AscMemDWordCopyPtrToLram()
3874 outpw(iop_base + IOP_RAM_DATA, ((ushort)s_buffer[i + 1] << 8) | s_buffer[i]); /* LSW */ in AscMemDWordCopyPtrToLram()
3875 outpw(iop_base + IOP_RAM_DATA, ((ushort)s_buffer[i + 3] << 8) | s_buffer[i + 2]); /* MSW */ in AscMemDWordCopyPtrToLram()
3887 ushort s_addr, uchar *d_buffer, int words) in AscMemWordCopyPtrFromLram()
3890 ushort word; in AscMemWordCopyPtrFromLram()
3900 static u32 AscMemSumLramWord(PortAddr iop_base, ushort s_addr, int words) in AscMemSumLramWord()
3914 ushort s_addr; in AscInitLram()
3919 (ushort)(((int)(asc_dvc->max_total_qng + 2 + 1) * in AscInitLram()
3923 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_FWD), in AscInitLram()
3925 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_BWD), in AscInitLram()
3927 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_QNO), in AscInitLram()
3932 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_FWD), in AscInitLram()
3934 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_BWD), in AscInitLram()
3936 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_QNO), in AscInitLram()
3939 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_FWD), in AscInitLram()
3941 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_BWD), in AscInitLram()
3943 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_QNO), in AscInitLram()
3950 (ushort)(s_addr + (ushort)ASC_SCSIQ_B_FWD), i); in AscInitLram()
3952 (ushort)(s_addr + (ushort)ASC_SCSIQ_B_BWD), i); in AscInitLram()
3954 (ushort)(s_addr + (ushort)ASC_SCSIQ_B_QNO), i); in AscInitLram()
3959 AscLoadMicroCode(PortAddr iop_base, ushort s_addr, in AscLoadMicroCode()
3960 const uchar *mcode_buf, ushort mcode_size) in AscLoadMicroCode()
3963 ushort mcode_word_size; in AscLoadMicroCode()
3964 ushort mcode_chksum; in AscLoadMicroCode()
3967 mcode_word_size = (ushort)(mcode_size >> 1); in AscLoadMicroCode()
3973 mcode_chksum = (ushort)AscMemSumLramWord(iop_base, in AscLoadMicroCode()
3974 (ushort)ASC_CODE_SEC_BEG, in AscLoadMicroCode()
3975 (ushort)((mcode_size - in AscLoadMicroCode()
3976 s_addr - (ushort) in AscLoadMicroCode()
3989 ushort lram_addr; in AscInitQLinkVar()
4000 AscWriteLramByte(iop_base, (ushort)ASCV_TOTAL_READY_Q_B, in AscInitQLinkVar()
4052 AscReadLramWord(iop_base, (ushort)ASCV_MC_DATE_W); in AscInitMicroCodeVar()
4054 AscReadLramWord(iop_base, (ushort)ASCV_MC_VER_W); in AscInitMicroCodeVar()
4292 ushort idle_cmd, u32 idle_cmd_parameter) in AdvSendIdleCmd()
4304 AdvWriteWordLram(iop_base, ASC_MC_IDLE_CMD_STATUS, (ushort)0); in AdvSendIdleCmd()
4362 status = AdvSendIdleCmd(asc_dvc, (ushort)IDLE_CMD_SCSI_RESET_START, 0L); in AdvResetSB()
4379 status = AdvSendIdleCmd(asc_dvc, (ushort)IDLE_CMD_SCSI_RESET_END, 0L); in AdvResetSB()
4404 ushort warn_code; in AdvInitAsc3550Driver()
4407 ushort code_sum; in AdvInitAsc3550Driver()
4412 ushort scsi_cfg1; in AdvInitAsc3550Driver()
4414 ushort bios_mem[ASC_MC_BIOSLEN / 2]; /* BIOS RISC Memory 0x40-0x8F. */ in AdvInitAsc3550Driver()
4415 ushort wdtr_able = 0, sdtr_able, tagqng_able; in AdvInitAsc3550Driver()
4450 ushort bios_version, major, minor; in AdvInitAsc3550Driver()
4847 ushort warn_code; in AdvInitAsc38C0800Driver()
4850 ushort code_sum; in AdvInitAsc38C0800Driver()
4855 ushort scsi_cfg1; in AdvInitAsc38C0800Driver()
4858 ushort bios_mem[ASC_MC_BIOSLEN / 2]; /* BIOS RISC Memory 0x40-0x8F. */ in AdvInitAsc38C0800Driver()
4859 ushort wdtr_able, sdtr_able, tagqng_able; in AdvInitAsc38C0800Driver()
5333 ushort warn_code; in AdvInitAsc38C1600Driver()
5336 ushort code_sum; in AdvInitAsc38C1600Driver()
5341 ushort scsi_cfg1; in AdvInitAsc38C1600Driver()
5344 ushort bios_mem[ASC_MC_BIOSLEN / 2]; /* BIOS RISC Memory 0x40-0x8F. */ in AdvInitAsc38C1600Driver()
5345 ushort wdtr_able, sdtr_able, ppr_able, tagqng_able; in AdvInitAsc38C1600Driver()
5822 ushort wdtr_able, sdtr_able, tagqng_able; in AdvResetChipAndSB()
5823 ushort ppr_able = 0; in AdvResetChipAndSB()
5826 ushort bios_sig; in AdvResetChipAndSB()
6114 ushort target_bit; in AdvISR()
6224 static int AscSetLibErrorCode(ASC_DVC_VAR *asc_dvc, ushort err_code) in AscSetLibErrorCode()
6238 ushort loop; in AscAckInterrupt()
6365 ushort halt_q_addr; in AscIsrChipHalted()
6367 ushort int_halt_code; in AscIsrChipHalted()
6391 (ushort)(halt_q_addr + in AscIsrChipHalted()
6392 (ushort)ASC_SCSIQ_B_TARGET_IX)); in AscIsrChipHalted()
6394 (ushort)(halt_q_addr + (ushort)ASC_SCSIQ_B_CNTL)); in AscIsrChipHalted()
6497 (ushort)(halt_q_addr + in AscIsrChipHalted()
6498 (ushort)ASC_SCSIQ_B_CNTL), in AscIsrChipHalted()
6513 (ushort)(halt_q_addr + in AscIsrChipHalted()
6514 (ushort)ASC_SCSIQ_B_CNTL), in AscIsrChipHalted()
6527 (ushort)(halt_q_addr + in AscIsrChipHalted()
6528 (ushort)ASC_SCSIQ_B_CNTL), in AscIsrChipHalted()
6554 (ushort)(halt_q_addr + in AscIsrChipHalted()
6555 (ushort)ASC_SCSIQ_B_CNTL), q_cntl); in AscIsrChipHalted()
6558 (ushort)(halt_q_addr + (ushort) in AscIsrChipHalted()
6570 (ushort)(halt_q_addr + in AscIsrChipHalted()
6571 (ushort)ASC_SCSIQ_B_TAG_CODE), in AscIsrChipHalted()
6575 (ushort)(halt_q_addr + (ushort) in AscIsrChipHalted()
6579 (ushort)(halt_q_addr + in AscIsrChipHalted()
6580 (ushort)ASC_SCSIQ_B_STATUS), in AscIsrChipHalted()
6583 scsi_busy = AscReadLramByte(iop_base, (ushort)ASCV_SCSIBUSY_B); in AscIsrChipHalted()
6585 AscWriteLramByte(iop_base, (ushort)ASCV_SCSIBUSY_B, scsi_busy); in AscIsrChipHalted()
6607 (ushort)(halt_q_addr + in AscIsrChipHalted()
6608 (ushort)ASC_SCSIQ_B_CNTL), q_cntl); in AscIsrChipHalted()
6614 (ushort)((ushort)halt_q_addr + in AscIsrChipHalted()
6615 (ushort) in AscIsrChipHalted()
6619 (ushort)((ushort)ASC_QADR_BEG + in AscIsrChipHalted()
6620 (ushort)target_ix)); in AscIsrChipHalted()
6624 (ushort)ASCV_SCSIBUSY_B); in AscIsrChipHalted()
6627 (ushort)ASCV_SCSIBUSY_B, scsi_busy); in AscIsrChipHalted()
6637 (ushort)((ushort) in AscIsrChipHalted()
6639 + (ushort) in AscIsrChipHalted()
6671 DvcGetQinfo(PortAddr iop_base, ushort s_addr, uchar *inbuf, int words) in DvcGetQinfo()
6674 ushort word; in DvcGetQinfo()
6690 ushort q_addr, in _AscCopyLramScsiDoneQ()
6693 ushort _val; in _AscCopyLramScsiDoneQ()
6702 (ushort)(q_addr + (ushort)ASC_SCSIQ_B_STATUS)); in _AscCopyLramScsiDoneQ()
6706 (ushort)(q_addr + (ushort)ASC_SCSIQ_B_CNTL)); in _AscCopyLramScsiDoneQ()
6710 (ushort)(q_addr + in _AscCopyLramScsiDoneQ()
6711 (ushort)ASC_SCSIQ_B_SENSE_LEN)); in _AscCopyLramScsiDoneQ()
6719 (ushort)(q_addr + in _AscCopyLramScsiDoneQ()
6720 (ushort) in _AscCopyLramScsiDoneQ()
6727 (ushort)(q_addr + (ushort) in _AscCopyLramScsiDoneQ()
6862 ushort q_addr; in AscIsrQDone()
6863 ushort sg_q_addr; in AscIsrQDone()
6875 (ushort)(q_addr + (ushort)ASC_SCSIQ_B_FWD)); in AscIsrQDone()
6882 (ushort)(q_addr + in AscIsrQDone()
6883 (ushort)ASC_SCSIQ_B_STATUS), in AscIsrQDone()
6894 (ushort)(sg_q_addr in AscIsrQDone()
6895 + (ushort) in AscIsrQDone()
6907 (ushort)(sg_q_addr + (ushort) in AscIsrQDone()
6916 (ushort)((ushort) in AscIsrQDone()
6918 + (ushort) in AscIsrQDone()
6922 scsi_busy = AscReadLramByte(iop_base, (ushort) in AscIsrQDone()
6926 (ushort)ASCV_SCSIBUSY_B, in AscIsrQDone()
6987 (ushort)(q_addr + (ushort) in AscIsrQDone()
7014 ushort saved_ram_addr; in AscISR()
7353 (ushort)(ASCV_MAX_DVC_QNG_BEG + sdev->id), in advansys_narrow_slave_configure()
7904 ushort q_addr; in AscAllocFreeQueue()
7910 (ushort)(q_addr + in AscAllocFreeQueue()
7912 next_qp = AscReadLramByte(iop_base, (ushort)(q_addr + ASC_SCSIQ_B_FWD)); in AscAllocFreeQueue()
7942 DvcPutScsiQ(PortAddr iop_base, ushort s_addr, uchar *outbuf, int words) in DvcPutScsiQ()
7953 ((ushort)outbuf[i + 1] << 8) | outbuf[i]); in DvcPutScsiQ()
7959 ushort q_addr; in AscPutReadyQueue()
7993 (ushort)(q_addr + (ushort)ASC_SCSIQ_B_STATUS), in AscPutReadyQueue()
7994 (ushort)(((ushort)scsiq->q1. in AscPutReadyQueue()
7995 q_no << 8) | (ushort)QS_READY)); in AscPutReadyQueue()
8009 ushort sg_list_dwords; in AscPutReadySgListQueue()
8010 ushort sg_index; in AscPutReadySgListQueue()
8011 ushort sg_entry_cnt; in AscPutReadySgListQueue()
8012 ushort q_addr; in AscPutReadySgListQueue()
8067 (ushort)(q_addr + in AscPutReadySgListQueue()
8160 ushort sg_entry_cnt = 0; in AscExeScsiQueue()
8161 ushort sg_entry_cnt_minus_one = 0; in AscExeScsiQueue()
8273 (uchar)((ushort)addr & 0x0003); in AscExeScsiQueue()
8320 (uchar)((ushort)addr & 0x0003); in AscExeScsiQueue()
8330 if (((ushort)data_cnt & 0x01FF) in AscExeScsiQueue()
8579 static ushort AscGetEisaChipCfg(PortAddr iop_base) in DEF_SCSI_QCMD()
8624 ushort cfg_lsw; in AscSetChipScsiID()
8631 cfg_lsw |= (ushort)((new_host_id & ASC_MAX_TID) << 8); in AscSetChipScsiID()
8664 outp(0x000B, (ushort)(0xC0 | dma_channel)); in AscEnableIsaDma()
8667 outp(0x00D6, (ushort)(0xC0 | (dma_channel - 4))); in AscEnableIsaDma()
8668 outp(0x00D4, (ushort)(dma_channel - 4)); in AscEnableIsaDma()
8691 static unsigned int AscGetMaxDmaCount(ushort bus_type) in AscGetMaxDmaCount()
8701 static ushort AscGetIsaDmaChannel(PortAddr iop_base) in AscGetIsaDmaChannel()
8703 ushort channel; in AscGetIsaDmaChannel()
8713 static ushort AscSetIsaDmaChannel(PortAddr iop_base, ushort dma_channel) in AscSetIsaDmaChannel()
8715 ushort cfg_lsw; in AscSetIsaDmaChannel()
8856 static ushort AscReadEEPWord(PortAddr iop_base, uchar addr) in AscReadEEPWord()
8858 ushort read_wval; in AscReadEEPWord()
8871 static ushort AscGetEEPConfig(PortAddr iop_base, ASCEEP_CONFIG *cfg_buf, in AscGetEEPConfig()
8872 ushort bus_type) in AscGetEEPConfig()
8874 ushort wval; in AscGetEEPConfig()
8875 ushort sum; in AscGetEEPConfig()
8876 ushort *wbuf; in AscGetEEPConfig()
8882 wbuf = (ushort *)cfg_buf; in AscGetEEPConfig()
8921 ushort q_addr; in AscTestExternalLram()
8922 ushort saved_word; in AscTestExternalLram()
8945 static int AscWriteEEPDataReg(PortAddr iop_base, ushort data_reg) in AscWriteEEPDataReg()
8947 ushort read_back; in AscWriteEEPDataReg()
8964 static ushort AscWriteEEPWord(PortAddr iop_base, uchar addr, ushort word_val) in AscWriteEEPWord()
8966 ushort read_wval; in AscWriteEEPWord()
8985 ushort bus_type) in AscSetEEPConfigOnce()
8988 ushort *wbuf; in AscSetEEPConfigOnce()
8989 ushort word; in AscSetEEPConfigOnce()
8990 ushort sum; in AscSetEEPConfigOnce()
8996 wbuf = (ushort *)cfg_buf; in AscSetEEPConfigOnce()
9040 wbuf = (ushort *)cfg_buf; in AscSetEEPConfigOnce()
9081 ushort bus_type) in AscSetEEPConfig()
9104 ushort chksum; in AscInitFromEEP()
9105 ushort warn_code; in AscInitFromEEP()
9106 ushort cfg_msw, cfg_lsw; in AscInitFromEEP()
9791 static ushort AdvReadEEPWord(AdvPortAddr iop_base, int eep_word_addr) in AdvReadEEPWord()
9805 ushort *wbuf; in AdvSet3550EEPConfig()
9806 ushort addr, chksum; in AdvSet3550EEPConfig()
9807 ushort *charfields; in AdvSet3550EEPConfig()
9809 wbuf = (ushort *)cfg_buf; in AdvSet3550EEPConfig()
9810 charfields = (ushort *)&ADVEEP_3550_Config_Field_IsChar; in AdvSet3550EEPConfig()
9821 ushort word; in AdvSet3550EEPConfig()
9850 ushort word; in AdvSet3550EEPConfig()
9872 ushort *wbuf; in AdvSet38C0800EEPConfig()
9873 ushort *charfields; in AdvSet38C0800EEPConfig()
9874 ushort addr, chksum; in AdvSet38C0800EEPConfig()
9876 wbuf = (ushort *)cfg_buf; in AdvSet38C0800EEPConfig()
9877 charfields = (ushort *)&ADVEEP_38C0800_Config_Field_IsChar; in AdvSet38C0800EEPConfig()
9888 ushort word; in AdvSet38C0800EEPConfig()
9917 ushort word; in AdvSet38C0800EEPConfig()
9939 ushort *wbuf; in AdvSet38C1600EEPConfig()
9940 ushort *charfields; in AdvSet38C1600EEPConfig()
9941 ushort addr, chksum; in AdvSet38C1600EEPConfig()
9943 wbuf = (ushort *)cfg_buf; in AdvSet38C1600EEPConfig()
9944 charfields = (ushort *)&ADVEEP_38C1600_Config_Field_IsChar; in AdvSet38C1600EEPConfig()
9955 ushort word; in AdvSet38C1600EEPConfig()
9984 ushort word; in AdvSet38C1600EEPConfig()
10005 static ushort AdvGet3550EEPConfig(AdvPortAddr iop_base, in AdvGet3550EEPConfig()
10008 ushort wval, chksum; in AdvGet3550EEPConfig()
10009 ushort *wbuf; in AdvGet3550EEPConfig()
10011 ushort *charfields; in AdvGet3550EEPConfig()
10013 charfields = (ushort *)&ADVEEP_3550_Config_Field_IsChar; in AdvGet3550EEPConfig()
10014 wbuf = (ushort *)cfg_buf; in AdvGet3550EEPConfig()
10048 static ushort AdvGet38C0800EEPConfig(AdvPortAddr iop_base, in AdvGet38C0800EEPConfig()
10051 ushort wval, chksum; in AdvGet38C0800EEPConfig()
10052 ushort *wbuf; in AdvGet38C0800EEPConfig()
10054 ushort *charfields; in AdvGet38C0800EEPConfig()
10056 charfields = (ushort *)&ADVEEP_38C0800_Config_Field_IsChar; in AdvGet38C0800EEPConfig()
10057 wbuf = (ushort *)cfg_buf; in AdvGet38C0800EEPConfig()
10091 static ushort AdvGet38C1600EEPConfig(AdvPortAddr iop_base, in AdvGet38C1600EEPConfig()
10094 ushort wval, chksum; in AdvGet38C1600EEPConfig()
10095 ushort *wbuf; in AdvGet38C1600EEPConfig()
10097 ushort *charfields; in AdvGet38C1600EEPConfig()
10099 charfields = (ushort *)&ADVEEP_38C1600_Config_Field_IsChar; in AdvGet38C1600EEPConfig()
10100 wbuf = (ushort *)cfg_buf; in AdvGet38C1600EEPConfig()
10144 ushort warn_code; in AdvInitFrom3550EEP()
10294 ushort warn_code; in AdvInitFrom38C0800EEP()
10297 ushort sdtr_speed = 0; in AdvInitFrom38C0800EEP()
10493 ushort warn_code; in AdvInitFrom38C1600EEP()
10496 ushort sdtr_speed = 0; in AdvInitFrom38C1600EEP()
10736 (ushort)AdvReadByteRegister(iop_base, IOPB_CHIP_ID_1), in AdvInitGetConfig()
10737 (ushort)ADV_CHIP_ID_BYTE); in AdvInitGetConfig()
10740 (ushort)AdvReadWordRegister(iop_base, IOPW_CHIP_ID_0), in AdvInitGetConfig()
10741 (ushort)ADV_CHIP_ID_WORD); in AdvInitGetConfig()
10961 (ushort)inp(iop + 1), (ushort)inpw(iop)); in advansys_board_found()