Lines Matching refs:ushort
279 ushort vm_id;
295 ushort x_req_count;
296 ushort x_reconnect_rtn;
319 ushort entry_cnt;
320 ushort queue_cnt;
321 ushort entry_to_copy;
322 ushort res;
331 ushort remain_sg_entry_cnt;
332 ushort next_sg_index;
474 ushort mcode_date;
475 ushort mcode_version;
504 ushort err_code;
505 ushort dvc_cntl;
506 ushort bug_fix_cntl;
507 ushort bus_type;
523 ushort init_state;
532 ushort res2;
556 #define ASC_MCNTL_NO_SEL_TIMEOUT (ushort)0x0001
557 #define ASC_MCNTL_NULL_TARGET (ushort)0x0002
558 #define ASC_CNTL_INITIATOR (ushort)0x0001
559 #define ASC_CNTL_BIOS_GT_1GB (ushort)0x0002
560 #define ASC_CNTL_BIOS_GT_2_DISK (ushort)0x0004
561 #define ASC_CNTL_BIOS_REMOVABLE (ushort)0x0008
562 #define ASC_CNTL_NO_SCAM (ushort)0x0010
563 #define ASC_CNTL_INT_MULTI_Q (ushort)0x0080
564 #define ASC_CNTL_NO_LUN_SUPPORT (ushort)0x0040
565 #define ASC_CNTL_NO_VERIFY_COPY (ushort)0x0100
566 #define ASC_CNTL_RESET_SCSI (ushort)0x0200
567 #define ASC_CNTL_INIT_INQUIRY (ushort)0x0400
568 #define ASC_CNTL_INIT_VERBOSE (ushort)0x0800
569 #define ASC_CNTL_SCSI_PARITY (ushort)0x1000
570 #define ASC_CNTL_BURST_MODE (ushort)0x2000
571 #define ASC_CNTL_SDTR_ENABLE_ULTRA (ushort)0x4000
593 ushort cfg_lsw;
594 ushort cfg_msw;
608 ushort cntl;
609 ushort chksum;
619 #define ASCV_BREAK_SAVED_CODE (ushort)0x0006
625 #define ASCV_MAX_DVC_QNG_BEG (ushort)0x0020
626 #define ASCV_BREAK_ADDR (ushort)0x0028
627 #define ASCV_BREAK_NOTIFY_COUNT (ushort)0x002A
628 #define ASCV_BREAK_CONTROL (ushort)0x002C
629 #define ASCV_BREAK_HIT_COUNT (ushort)0x002E
631 #define ASCV_ASCDVC_ERR_CODE_W (ushort)0x0030
632 #define ASCV_MCODE_CHKSUM_W (ushort)0x0032
633 #define ASCV_MCODE_SIZE_W (ushort)0x0034
634 #define ASCV_STOP_CODE_B (ushort)0x0036
635 #define ASCV_DVC_ERR_CODE_B (ushort)0x0037
636 #define ASCV_OVERRUN_PADDR_D (ushort)0x0038
637 #define ASCV_OVERRUN_BSIZE_D (ushort)0x003C
638 #define ASCV_HALTCODE_W (ushort)0x0040
639 #define ASCV_CHKSUM_W (ushort)0x0042
640 #define ASCV_MC_DATE_W (ushort)0x0044
641 #define ASCV_MC_VER_W (ushort)0x0046
642 #define ASCV_NEXTRDY_B (ushort)0x0048
643 #define ASCV_DONENEXT_B (ushort)0x0049
644 #define ASCV_USE_TAGGED_QNG_B (ushort)0x004A
645 #define ASCV_SCSIBUSY_B (ushort)0x004B
646 #define ASCV_Q_DONE_IN_PROGRESS_B (ushort)0x004C
647 #define ASCV_CURCDB_B (ushort)0x004D
648 #define ASCV_RCLUN_B (ushort)0x004E
649 #define ASCV_BUSY_QHEAD_B (ushort)0x004F
650 #define ASCV_DISC1_QHEAD_B (ushort)0x0050
651 #define ASCV_DISC_ENABLE_B (ushort)0x0052
652 #define ASCV_CAN_TAGGED_QNG_B (ushort)0x0053
653 #define ASCV_HOSTSCSI_ID_B (ushort)0x0055
654 #define ASCV_MCODE_CNTL_B (ushort)0x0056
655 #define ASCV_NULL_TARGET_B (ushort)0x0057
656 #define ASCV_FREE_Q_HEAD_W (ushort)0x0058
657 #define ASCV_DONE_Q_TAIL_W (ushort)0x005A
658 #define ASCV_FREE_Q_HEAD_B (ushort)(ASCV_FREE_Q_HEAD_W+1)
659 #define ASCV_DONE_Q_TAIL_B (ushort)(ASCV_DONE_Q_TAIL_W+1)
660 #define ASCV_HOST_FLAG_B (ushort)0x005D
661 #define ASCV_TOTAL_READY_Q_B (ushort)0x0064
662 #define ASCV_VER_SERIAL_B (ushort)0x0065
663 #define ASCV_HALTCODE_SAVED_W (ushort)0x0066
664 #define ASCV_WTM_FLAG_B (ushort)0x0068
665 #define ASCV_RISC_FLAG_B (ushort)0x006A
666 #define ASCV_REQ_SG_LIST_QP (ushort)0x006B
722 #define ASC_HALT_EXTMSG_IN (ushort)0x8000
723 #define ASC_HALT_CHK_CONDITION (ushort)0x8100
724 #define ASC_HALT_SS_QUEUE_FULL (ushort)0x8200
725 #define ASC_HALT_DISABLE_ASYN_USE_SYN_FIX (ushort)0x8300
726 #define ASC_HALT_ENABLE_ASYN_USE_SYN_FIX (ushort)0x8400
727 #define ASC_HALT_SDTR_REJECTED (ushort)0x4000
728 #define ASC_HALT_HOST_COPY_SG_LIST_TO_RISC ( ushort )0x2000
730 #define ASC_DATA_SEC_BEG (ushort)0x0080
731 #define ASC_DATA_SEC_END (ushort)0x0080
732 #define ASC_CODE_SEC_BEG (ushort)0x0080
733 #define ASC_CODE_SEC_END (ushort)0x0080
735 #define ASC_QADR_USED (ushort)(ASC_MAX_QNO * 64)
736 #define ASC_QADR_END (ushort)0x7FFF
737 #define ASC_QLAST_ADR (ushort)0x7FC0
795 #define INS_HALTINT (ushort)0x6281
796 #define INS_HALT (ushort)0x6280
797 #define INS_SINT (ushort)0x6200
798 #define INS_RFLAG_WTM (ushort)0x7380
803 ushort data[ASC_MC_SAVE_DATA_WSIZE];
804 ushort code[ASC_MC_SAVE_CODE_WSIZE];
817 …DTRDoneAtID(port, id, data) AscWriteLramByte((port), (ushort)((ushort)ASCV_SDTR_DONE_BEG+(ushort)…
818 …SDTRDoneAtID(port, id) AscReadLramByte((port), (ushort)((ushort)ASCV_SDTR_DONE_BEG+(ushort)…
819 …nitSDTRAtID(port, id, data) AscWriteLramByte((port), (ushort)((ushort)ASCV_SDTR_DATA_BEG+(ushort)…
820 …InitSDTRAtID(port, id) AscReadLramByte((port), (ushort)((ushort)ASCV_SDTR_DATA_BEG+(ushort)…
822 #define AscGetChipSignatureWord(port) (ushort)inpw((port)+IOP_SIG_WORD)
824 #define AscGetChipCfgLsw(port) (ushort)inpw((port)+IOP_CONFIG_LOW)
825 #define AscGetChipCfgMsw(port) (ushort)inpw((port)+IOP_CONFIG_HIGH)
830 #define AscGetChipEEPData(port) (ushort)inpw((port)+IOP_EEP_DATA)
832 #define AscGetChipLramAddr(port) (ushort)inpw((PortAddr)((port)+IOP_RAM_ADDR))
834 #define AscGetChipLramData(port) (ushort)inpw((port)+IOP_RAM_DATA)
845 #define AscGetPCAddr(port) (ushort)inpw((port)+IOP_REG_PC)
850 #define AscReadChipAX(port) (ushort)inpw((port)+IOP_REG_AX)
854 #define AscReadChipIH(port) (ushort)inpw((port)+IOP_REG_IH)
858 #define AscReadChipFIFO_L(port) (ushort)inpw((port)+IOP_REG_FIFO_L)
860 #define AscReadChipFIFO_H(port) (ushort)inpw((port)+IOP_REG_FIFO_H)
864 #define AscReadChipDA0(port) (ushort)inpw((port)+IOP_REG_DA0)
866 #define AscReadChipDA1(port) (ushort)inpw((port)+IOP_REG_DA1)
868 #define AscReadChipDC0(port) (ushort)inpw((port)+IOP_REG_DC0)
870 #define AscReadChipDC1(port) (ushort)inpw((port)+IOP_REG_DC1)
935 ushort cfg_lsw; /* 00 power up initialization */
939 ushort cfg_msw; /* 01 unused */
940 ushort disc_enable; /* 02 disconnect enable */
941 ushort wdtr_able; /* 03 Wide DTR able */
942 ushort sdtr_able; /* 04 Synchronous DTR able */
943 ushort start_motor; /* 05 send start up motor */
944 ushort tagqng_able; /* 06 tag queuing able */
945 ushort bios_scan; /* 07 BIOS device control */
946 ushort scam_tolerant; /* 08 no scam */
964 ushort bios_ctrl; /* 12 BIOS control bits */
981 ushort ultra_able; /* 13 ULTRA speed able */
982 ushort reserved2; /* 14 reserved */
985 ushort dvc_cntl; /* 16 control bit for driver */
986 ushort bug_fix; /* 17 control bit for bug fix */
987 ushort serial_number_word1; /* 18 Board serial number word 1 */
988 ushort serial_number_word2; /* 19 Board serial number word 2 */
989 ushort serial_number_word3; /* 20 Board serial number word 3 */
990 ushort check_sum; /* 21 EEP check sum */
992 ushort dvc_err_code; /* 30 last device driver error code */
993 ushort adv_err_code; /* 31 last uc and Adv Lib error code */
994 ushort adv_err_addr; /* 32 last uc error address */
995 ushort saved_dvc_err_code; /* 33 saved last dev. driver error code */
996 ushort saved_adv_err_code; /* 34 saved last uc and Adv Lib error code */
997 ushort saved_adv_err_addr; /* 35 saved last uc error address */
998 ushort num_of_err; /* 36 number of error */
1004 ushort cfg_lsw; /* 00 power up initialization */
1008 ushort cfg_msw; /* 01 unused */
1009 ushort disc_enable; /* 02 disconnect enable */
1010 ushort wdtr_able; /* 03 Wide DTR able */
1011 ushort sdtr_speed1; /* 04 SDTR Speed TID 0-3 */
1012 ushort start_motor; /* 05 send start up motor */
1013 ushort tagqng_able; /* 06 tag queuing able */
1014 ushort bios_scan; /* 07 BIOS device control */
1015 ushort scam_tolerant; /* 08 no scam */
1037 ushort bios_ctrl; /* 12 BIOS control bits */
1054 ushort sdtr_speed2; /* 13 SDTR speed TID 4-7 */
1055 ushort sdtr_speed3; /* 14 SDTR speed TID 8-11 */
1058 ushort dvc_cntl; /* 16 control bit for driver */
1059 ushort sdtr_speed4; /* 17 SDTR speed 4 TID 12-15 */
1060 ushort serial_number_word1; /* 18 Board serial number word 1 */
1061 ushort serial_number_word2; /* 19 Board serial number word 2 */
1062 ushort serial_number_word3; /* 20 Board serial number word 3 */
1063 ushort check_sum; /* 21 EEP check sum */
1065 ushort dvc_err_code; /* 30 last device driver error code */
1066 ushort adv_err_code; /* 31 last uc and Adv Lib error code */
1067 ushort adv_err_addr; /* 32 last uc error address */
1068 ushort saved_dvc_err_code; /* 33 saved last dev. driver error code */
1069 ushort saved_adv_err_code; /* 34 saved last uc and Adv Lib error code */
1070 ushort saved_adv_err_addr; /* 35 saved last uc error address */
1071 ushort reserved36; /* 36 reserved */
1072 ushort reserved37; /* 37 reserved */
1073 ushort reserved38; /* 38 reserved */
1074 ushort reserved39; /* 39 reserved */
1075 ushort reserved40; /* 40 reserved */
1076 ushort reserved41; /* 41 reserved */
1077 ushort reserved42; /* 42 reserved */
1078 ushort reserved43; /* 43 reserved */
1079 ushort reserved44; /* 44 reserved */
1080 ushort reserved45; /* 45 reserved */
1081 ushort reserved46; /* 46 reserved */
1082 ushort reserved47; /* 47 reserved */
1083 ushort reserved48; /* 48 reserved */
1084 ushort reserved49; /* 49 reserved */
1085 ushort reserved50; /* 50 reserved */
1086 ushort reserved51; /* 51 reserved */
1087 ushort reserved52; /* 52 reserved */
1088 ushort reserved53; /* 53 reserved */
1089 ushort reserved54; /* 54 reserved */
1090 ushort reserved55; /* 55 reserved */
1091 ushort cisptr_lsw; /* 56 CIS PTR LSW */
1092 ushort cisprt_msw; /* 57 CIS PTR MSW */
1093 ushort subsysvid; /* 58 SubSystem Vendor ID */
1094 ushort subsysid; /* 59 SubSystem ID */
1095 ushort reserved60; /* 60 reserved */
1096 ushort reserved61; /* 61 reserved */
1097 ushort reserved62; /* 62 reserved */
1098 ushort reserved63; /* 63 reserved */
1104 ushort cfg_lsw; /* 00 power up initialization */
1110 ushort cfg_msw; /* 01 unused */
1111 ushort disc_enable; /* 02 disconnect enable */
1112 ushort wdtr_able; /* 03 Wide DTR able */
1113 ushort sdtr_speed1; /* 04 SDTR Speed TID 0-3 */
1114 ushort start_motor; /* 05 send start up motor */
1115 ushort tagqng_able; /* 06 tag queuing able */
1116 ushort bios_scan; /* 07 BIOS device control */
1117 ushort scam_tolerant; /* 08 no scam */
1139 ushort bios_ctrl; /* 12 BIOS control bits */
1156 ushort sdtr_speed2; /* 13 SDTR speed TID 4-7 */
1157 ushort sdtr_speed3; /* 14 SDTR speed TID 8-11 */
1160 ushort dvc_cntl; /* 16 control bit for driver */
1161 ushort sdtr_speed4; /* 17 SDTR speed 4 TID 12-15 */
1162 ushort serial_number_word1; /* 18 Board serial number word 1 */
1163 ushort serial_number_word2; /* 19 Board serial number word 2 */
1164 ushort serial_number_word3; /* 20 Board serial number word 3 */
1165 ushort check_sum; /* 21 EEP check sum */
1167 ushort dvc_err_code; /* 30 last device driver error code */
1168 ushort adv_err_code; /* 31 last uc and Adv Lib error code */
1169 ushort adv_err_addr; /* 32 last uc error address */
1170 ushort saved_dvc_err_code; /* 33 saved last dev. driver error code */
1171 ushort saved_adv_err_code; /* 34 saved last uc and Adv Lib error code */
1172 ushort saved_adv_err_addr; /* 35 saved last uc error address */
1173 ushort reserved36; /* 36 reserved */
1174 ushort reserved37; /* 37 reserved */
1175 ushort reserved38; /* 38 reserved */
1176 ushort reserved39; /* 39 reserved */
1177 ushort reserved40; /* 40 reserved */
1178 ushort reserved41; /* 41 reserved */
1179 ushort reserved42; /* 42 reserved */
1180 ushort reserved43; /* 43 reserved */
1181 ushort reserved44; /* 44 reserved */
1182 ushort reserved45; /* 45 reserved */
1183 ushort reserved46; /* 46 reserved */
1184 ushort reserved47; /* 47 reserved */
1185 ushort reserved48; /* 48 reserved */
1186 ushort reserved49; /* 49 reserved */
1187 ushort reserved50; /* 50 reserved */
1188 ushort reserved51; /* 51 reserved */
1189 ushort reserved52; /* 52 reserved */
1190 ushort reserved53; /* 53 reserved */
1191 ushort reserved54; /* 54 reserved */
1192 ushort reserved55; /* 55 reserved */
1193 ushort cisptr_lsw; /* 56 CIS PTR LSW */
1194 ushort cisprt_msw; /* 57 CIS PTR MSW */
1195 ushort subsysvid; /* 58 SubSystem Vendor ID */
1196 ushort subsysid; /* 59 SubSystem ID */
1197 ushort reserved60; /* 60 reserved */
1198 ushort reserved61; /* 61 reserved */
1199 ushort reserved62; /* 62 reserved */
1200 ushort reserved63; /* 63 reserved */
1714 ushort disc_enable; /* enable disconnection */
1717 ushort control_flag; /* Microcode Control Flag */
1718 ushort mcode_date; /* Microcode date */
1719 ushort mcode_version; /* Microcode version */
1720 ushort serial1; /* EEPROM serial number word 1 */
1721 ushort serial2; /* EEPROM serial number word 2 */
1722 ushort serial3; /* EEPROM serial number word 3 */
1825 ushort err_code; /* fatal error code */
1826 ushort bios_ctrl; /* BIOS control word, EEPROM word 12 */
1827 ushort wdtr_able; /* try WDTR for a device */
1828 ushort sdtr_able; /* try SDTR for a device */
1829 ushort ultra_able; /* try SDTR Ultra speed for a device */
1830 ushort sdtr_speed1; /* EEPROM SDTR Speed for TID 0-3 */
1831 ushort sdtr_speed2; /* EEPROM SDTR Speed for TID 4-7 */
1832 ushort sdtr_speed3; /* EEPROM SDTR Speed for TID 8-11 */
1833 ushort sdtr_speed4; /* EEPROM SDTR Speed for TID 12-15 */
1834 ushort tagqng_able; /* try tagged queuing with a device */
1835 ushort ppr_able; /* PPR message capable per TID bitmask. */
1837 ushort start_motor; /* start motor command allowed */
1841 ushort no_scam; /* scam_tolerant of EEPROM */
1851 ushort carr_pending_cnt; /* Count of pending carriers. */
1943 cpu_to_le16((ushort) ((dword) & 0xFFFF)))), \
1946 cpu_to_le16((ushort) ((dword >> 16) & 0xFFFF)))))
1989 AdvSendIdleCmd((asc_dvc), (ushort) IDLE_CMD_ABORT, \
2004 AdvSendIdleCmd((asc_dvc), (ushort) IDLE_CMD_DEVICE_RESET, \
2010 #define ADV_SCSI_BIT_ID_TYPE ushort
2263 ushort asc_n_io_port; /* Number I/O ports. */
2265 ushort reqcnt[ADV_MAX_TID + 1]; /* Starvation request count */
2267 ushort queue_full_cnt[ADV_MAX_TID + 1]; /* Queue full count */
2286 ushort ioport; /* I/O Port address. */
2291 ushort bios_signature; /* BIOS Signature. */
2292 ushort bios_version; /* BIOS Version. */
2293 ushort bios_codeseg; /* BIOS Code Segment. */
2294 ushort bios_codelen; /* BIOS Code Segment Length. */
2744 ushort major, minor, letter; in asc_prt_adv_bios()
2800 static int asc_get_eeprom_string(ushort *serialnum, uchar *cp) in asc_get_eeprom_string()
2802 ushort w, num; in asc_get_eeprom_string()
2804 if ((serialnum[1] & 0xFE00) != ((ushort)0xAA << 8)) { in asc_get_eeprom_string()
2898 if (asc_get_eeprom_string((ushort *)&ep->adapter_info[0], serialstr) in asc_prt_asc_board_eeprom()
2964 ushort word; in asc_prt_adv_board_eeprom()
2965 ushort *wordp; in asc_prt_adv_board_eeprom()
2966 ushort sdtr_speed = 0; in asc_prt_adv_board_eeprom()
3354 ushort chip_scsi_id; in asc_prt_adv_board_info()
3355 ushort lramword; in asc_prt_adv_board_info()
3357 ushort tagqng_able; in asc_prt_adv_board_info()
3358 ushort sdtr_able, wdtr_able; in asc_prt_adv_board_info()
3359 ushort wdtr_done, sdtr_done; in asc_prt_adv_board_info()
3360 ushort period = 0; in asc_prt_adv_board_info()
3678 static void AscSetChipIH(PortAddr iop_base, ushort ins_code) in AscSetChipIH()
3745 ushort sig_word; in AscFindSignature()
3753 if ((sig_word == (ushort)ASC_1000_ID0W) || in AscFindSignature()
3754 (sig_word == (ushort)ASC_1000_ID0W_FIX)) { in AscFindSignature()
3763 ushort cfg; in AscEnableInterrupt()
3771 ushort cfg; in AscDisableInterrupt()
3777 static uchar AscReadLramByte(PortAddr iop_base, ushort addr) in AscReadLramByte()
3794 static ushort AscReadLramWord(PortAddr iop_base, ushort addr) in AscReadLramWord()
3796 ushort word_data; in AscReadLramWord()
3804 AscMemWordSetLram(PortAddr iop_base, ushort s_addr, ushort set_wval, int words) in AscMemWordSetLram()
3814 static void AscWriteLramWord(PortAddr iop_base, ushort addr, ushort word_val) in AscWriteLramWord()
3820 static void AscWriteLramByte(PortAddr iop_base, ushort addr, uchar byte_val) in AscWriteLramByte()
3822 ushort word_data; in AscWriteLramByte()
3828 word_data |= (((ushort)byte_val << 8) & 0xFF00); in AscWriteLramByte()
3832 word_data |= ((ushort)byte_val & 0x00FF); in AscWriteLramByte()
3844 AscMemWordCopyPtrToLram(PortAddr iop_base, ushort s_addr, in AscMemWordCopyPtrToLram()
3860 ((ushort)s_buffer[i + 1] << 8) | s_buffer[i]); in AscMemWordCopyPtrToLram()
3872 ushort s_addr, uchar *s_buffer, int dwords) in AscMemDWordCopyPtrToLram()
3878 outpw(iop_base + IOP_RAM_DATA, ((ushort)s_buffer[i + 1] << 8) | s_buffer[i]); /* LSW */ in AscMemDWordCopyPtrToLram()
3879 outpw(iop_base + IOP_RAM_DATA, ((ushort)s_buffer[i + 3] << 8) | s_buffer[i + 2]); /* MSW */ in AscMemDWordCopyPtrToLram()
3891 ushort s_addr, uchar *d_buffer, int words) in AscMemWordCopyPtrFromLram()
3894 ushort word; in AscMemWordCopyPtrFromLram()
3904 static u32 AscMemSumLramWord(PortAddr iop_base, ushort s_addr, int words) in AscMemSumLramWord()
3918 ushort s_addr; in AscInitLram()
3923 (ushort)(((int)(asc_dvc->max_total_qng + 2 + 1) * in AscInitLram()
3927 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_FWD), in AscInitLram()
3929 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_BWD), in AscInitLram()
3931 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_QNO), in AscInitLram()
3936 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_FWD), in AscInitLram()
3938 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_BWD), in AscInitLram()
3940 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_QNO), in AscInitLram()
3943 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_FWD), in AscInitLram()
3945 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_BWD), in AscInitLram()
3947 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_QNO), in AscInitLram()
3954 (ushort)(s_addr + (ushort)ASC_SCSIQ_B_FWD), i); in AscInitLram()
3956 (ushort)(s_addr + (ushort)ASC_SCSIQ_B_BWD), i); in AscInitLram()
3958 (ushort)(s_addr + (ushort)ASC_SCSIQ_B_QNO), i); in AscInitLram()
3963 AscLoadMicroCode(PortAddr iop_base, ushort s_addr, in AscLoadMicroCode()
3964 const uchar *mcode_buf, ushort mcode_size) in AscLoadMicroCode()
3967 ushort mcode_word_size; in AscLoadMicroCode()
3968 ushort mcode_chksum; in AscLoadMicroCode()
3971 mcode_word_size = (ushort)(mcode_size >> 1); in AscLoadMicroCode()
3977 mcode_chksum = (ushort)AscMemSumLramWord(iop_base, in AscLoadMicroCode()
3978 (ushort)ASC_CODE_SEC_BEG, in AscLoadMicroCode()
3979 (ushort)((mcode_size - in AscLoadMicroCode()
3980 s_addr - (ushort) in AscLoadMicroCode()
3993 ushort lram_addr; in AscInitQLinkVar()
4004 AscWriteLramByte(iop_base, (ushort)ASCV_TOTAL_READY_Q_B, in AscInitQLinkVar()
4056 AscReadLramWord(iop_base, (ushort)ASCV_MC_DATE_W); in AscInitMicroCodeVar()
4058 AscReadLramWord(iop_base, (ushort)ASCV_MC_VER_W); in AscInitMicroCodeVar()
4296 ushort idle_cmd, u32 idle_cmd_parameter) in AdvSendIdleCmd()
4308 AdvWriteWordLram(iop_base, ASC_MC_IDLE_CMD_STATUS, (ushort)0); in AdvSendIdleCmd()
4366 status = AdvSendIdleCmd(asc_dvc, (ushort)IDLE_CMD_SCSI_RESET_START, 0L); in AdvResetSB()
4383 status = AdvSendIdleCmd(asc_dvc, (ushort)IDLE_CMD_SCSI_RESET_END, 0L); in AdvResetSB()
4408 ushort warn_code; in AdvInitAsc3550Driver()
4411 ushort code_sum; in AdvInitAsc3550Driver()
4416 ushort scsi_cfg1; in AdvInitAsc3550Driver()
4418 ushort bios_mem[ASC_MC_BIOSLEN / 2]; /* BIOS RISC Memory 0x40-0x8F. */ in AdvInitAsc3550Driver()
4419 ushort wdtr_able = 0, sdtr_able, tagqng_able; in AdvInitAsc3550Driver()
4454 ushort bios_version, major, minor; in AdvInitAsc3550Driver()
4851 ushort warn_code; in AdvInitAsc38C0800Driver()
4854 ushort code_sum; in AdvInitAsc38C0800Driver()
4859 ushort scsi_cfg1; in AdvInitAsc38C0800Driver()
4862 ushort bios_mem[ASC_MC_BIOSLEN / 2]; /* BIOS RISC Memory 0x40-0x8F. */ in AdvInitAsc38C0800Driver()
4863 ushort wdtr_able, sdtr_able, tagqng_able; in AdvInitAsc38C0800Driver()
5337 ushort warn_code; in AdvInitAsc38C1600Driver()
5340 ushort code_sum; in AdvInitAsc38C1600Driver()
5345 ushort scsi_cfg1; in AdvInitAsc38C1600Driver()
5348 ushort bios_mem[ASC_MC_BIOSLEN / 2]; /* BIOS RISC Memory 0x40-0x8F. */ in AdvInitAsc38C1600Driver()
5349 ushort wdtr_able, sdtr_able, ppr_able, tagqng_able; in AdvInitAsc38C1600Driver()
5826 ushort wdtr_able, sdtr_able, tagqng_able; in AdvResetChipAndSB()
5827 ushort ppr_able = 0; in AdvResetChipAndSB()
5830 ushort bios_sig; in AdvResetChipAndSB()
6120 ushort target_bit; in AdvISR()
6230 static int AscSetLibErrorCode(ASC_DVC_VAR *asc_dvc, ushort err_code) in AscSetLibErrorCode()
6244 ushort loop; in AscAckInterrupt()
6372 ushort halt_q_addr; in AscIsrChipHalted()
6374 ushort int_halt_code; in AscIsrChipHalted()
6398 (ushort)(halt_q_addr + in AscIsrChipHalted()
6399 (ushort)ASC_SCSIQ_B_TARGET_IX)); in AscIsrChipHalted()
6401 (ushort)(halt_q_addr + (ushort)ASC_SCSIQ_B_CNTL)); in AscIsrChipHalted()
6504 (ushort)(halt_q_addr + in AscIsrChipHalted()
6505 (ushort)ASC_SCSIQ_B_CNTL), in AscIsrChipHalted()
6520 (ushort)(halt_q_addr + in AscIsrChipHalted()
6521 (ushort)ASC_SCSIQ_B_CNTL), in AscIsrChipHalted()
6534 (ushort)(halt_q_addr + in AscIsrChipHalted()
6535 (ushort)ASC_SCSIQ_B_CNTL), in AscIsrChipHalted()
6561 (ushort)(halt_q_addr + in AscIsrChipHalted()
6562 (ushort)ASC_SCSIQ_B_CNTL), q_cntl); in AscIsrChipHalted()
6565 (ushort)(halt_q_addr + (ushort) in AscIsrChipHalted()
6577 (ushort)(halt_q_addr + in AscIsrChipHalted()
6578 (ushort)ASC_SCSIQ_B_TAG_CODE), in AscIsrChipHalted()
6582 (ushort)(halt_q_addr + (ushort) in AscIsrChipHalted()
6586 (ushort)(halt_q_addr + in AscIsrChipHalted()
6587 (ushort)ASC_SCSIQ_B_STATUS), in AscIsrChipHalted()
6590 scsi_busy = AscReadLramByte(iop_base, (ushort)ASCV_SCSIBUSY_B); in AscIsrChipHalted()
6592 AscWriteLramByte(iop_base, (ushort)ASCV_SCSIBUSY_B, scsi_busy); in AscIsrChipHalted()
6614 (ushort)(halt_q_addr + in AscIsrChipHalted()
6615 (ushort)ASC_SCSIQ_B_CNTL), q_cntl); in AscIsrChipHalted()
6621 (ushort)((ushort)halt_q_addr + in AscIsrChipHalted()
6622 (ushort) in AscIsrChipHalted()
6626 (ushort)((ushort)ASC_QADR_BEG + in AscIsrChipHalted()
6627 (ushort)target_ix)); in AscIsrChipHalted()
6631 (ushort)ASCV_SCSIBUSY_B); in AscIsrChipHalted()
6634 (ushort)ASCV_SCSIBUSY_B, scsi_busy); in AscIsrChipHalted()
6644 (ushort)((ushort) in AscIsrChipHalted()
6646 + (ushort) in AscIsrChipHalted()
6678 DvcGetQinfo(PortAddr iop_base, ushort s_addr, uchar *inbuf, int words) in DvcGetQinfo()
6681 ushort word; in DvcGetQinfo()
6697 ushort q_addr, in _AscCopyLramScsiDoneQ()
6700 ushort _val; in _AscCopyLramScsiDoneQ()
6709 (ushort)(q_addr + (ushort)ASC_SCSIQ_B_STATUS)); in _AscCopyLramScsiDoneQ()
6713 (ushort)(q_addr + (ushort)ASC_SCSIQ_B_CNTL)); in _AscCopyLramScsiDoneQ()
6717 (ushort)(q_addr + in _AscCopyLramScsiDoneQ()
6718 (ushort)ASC_SCSIQ_B_SENSE_LEN)); in _AscCopyLramScsiDoneQ()
6726 (ushort)(q_addr + in _AscCopyLramScsiDoneQ()
6727 (ushort) in _AscCopyLramScsiDoneQ()
6734 (ushort)(q_addr + (ushort) in _AscCopyLramScsiDoneQ()
6869 ushort q_addr; in AscIsrQDone()
6870 ushort sg_q_addr; in AscIsrQDone()
6882 (ushort)(q_addr + (ushort)ASC_SCSIQ_B_FWD)); in AscIsrQDone()
6889 (ushort)(q_addr + in AscIsrQDone()
6890 (ushort)ASC_SCSIQ_B_STATUS), in AscIsrQDone()
6901 (ushort)(sg_q_addr in AscIsrQDone()
6902 + (ushort) in AscIsrQDone()
6914 (ushort)(sg_q_addr + (ushort) in AscIsrQDone()
6923 (ushort)((ushort) in AscIsrQDone()
6925 + (ushort) in AscIsrQDone()
6929 scsi_busy = AscReadLramByte(iop_base, (ushort) in AscIsrQDone()
6933 (ushort)ASCV_SCSIBUSY_B, in AscIsrQDone()
6994 (ushort)(q_addr + (ushort) in AscIsrQDone()
7021 ushort saved_ram_addr; in AscISR()
7360 (ushort)(ASCV_MAX_DVC_QNG_BEG + sdev->id), in advansys_narrow_slave_configure()
7911 ushort q_addr; in AscAllocFreeQueue()
7917 (ushort)(q_addr + in AscAllocFreeQueue()
7919 next_qp = AscReadLramByte(iop_base, (ushort)(q_addr + ASC_SCSIQ_B_FWD)); in AscAllocFreeQueue()
7949 DvcPutScsiQ(PortAddr iop_base, ushort s_addr, uchar *outbuf, int words) in DvcPutScsiQ()
7960 ((ushort)outbuf[i + 1] << 8) | outbuf[i]); in DvcPutScsiQ()
7966 ushort q_addr; in AscPutReadyQueue()
8000 (ushort)(q_addr + (ushort)ASC_SCSIQ_B_STATUS), in AscPutReadyQueue()
8001 (ushort)(((ushort)scsiq->q1. in AscPutReadyQueue()
8002 q_no << 8) | (ushort)QS_READY)); in AscPutReadyQueue()
8016 ushort sg_list_dwords; in AscPutReadySgListQueue()
8017 ushort sg_index; in AscPutReadySgListQueue()
8018 ushort sg_entry_cnt; in AscPutReadySgListQueue()
8019 ushort q_addr; in AscPutReadySgListQueue()
8074 (ushort)(q_addr + in AscPutReadySgListQueue()
8167 ushort sg_entry_cnt = 0; in AscExeScsiQueue()
8168 ushort sg_entry_cnt_minus_one = 0; in AscExeScsiQueue()
8280 (uchar)((ushort)addr & 0x0003); in AscExeScsiQueue()
8327 (uchar)((ushort)addr & 0x0003); in AscExeScsiQueue()
8337 if (((ushort)data_cnt & 0x01FF) in AscExeScsiQueue()
8586 static ushort AscGetEisaChipCfg(PortAddr iop_base) in DEF_SCSI_QCMD()
8631 ushort cfg_lsw; in AscSetChipScsiID()
8638 cfg_lsw |= (ushort)((new_host_id & ASC_MAX_TID) << 8); in AscSetChipScsiID()
8671 outp(0x000B, (ushort)(0xC0 | dma_channel)); in AscEnableIsaDma()
8674 outp(0x00D6, (ushort)(0xC0 | (dma_channel - 4))); in AscEnableIsaDma()
8675 outp(0x00D4, (ushort)(dma_channel - 4)); in AscEnableIsaDma()
8698 static unsigned int AscGetMaxDmaCount(ushort bus_type) in AscGetMaxDmaCount()
8708 static ushort AscGetIsaDmaChannel(PortAddr iop_base) in AscGetIsaDmaChannel()
8710 ushort channel; in AscGetIsaDmaChannel()
8720 static ushort AscSetIsaDmaChannel(PortAddr iop_base, ushort dma_channel) in AscSetIsaDmaChannel()
8722 ushort cfg_lsw; in AscSetIsaDmaChannel()
8863 static ushort AscReadEEPWord(PortAddr iop_base, uchar addr) in AscReadEEPWord()
8865 ushort read_wval; in AscReadEEPWord()
8878 static ushort AscGetEEPConfig(PortAddr iop_base, ASCEEP_CONFIG *cfg_buf, in AscGetEEPConfig()
8879 ushort bus_type) in AscGetEEPConfig()
8881 ushort wval; in AscGetEEPConfig()
8882 ushort sum; in AscGetEEPConfig()
8883 ushort *wbuf; in AscGetEEPConfig()
8889 wbuf = (ushort *)cfg_buf; in AscGetEEPConfig()
8928 ushort q_addr; in AscTestExternalLram()
8929 ushort saved_word; in AscTestExternalLram()
8952 static int AscWriteEEPDataReg(PortAddr iop_base, ushort data_reg) in AscWriteEEPDataReg()
8954 ushort read_back; in AscWriteEEPDataReg()
8971 static ushort AscWriteEEPWord(PortAddr iop_base, uchar addr, ushort word_val) in AscWriteEEPWord()
8973 ushort read_wval; in AscWriteEEPWord()
8992 ushort bus_type) in AscSetEEPConfigOnce()
8995 ushort *wbuf; in AscSetEEPConfigOnce()
8996 ushort word; in AscSetEEPConfigOnce()
8997 ushort sum; in AscSetEEPConfigOnce()
9003 wbuf = (ushort *)cfg_buf; in AscSetEEPConfigOnce()
9047 wbuf = (ushort *)cfg_buf; in AscSetEEPConfigOnce()
9088 ushort bus_type) in AscSetEEPConfig()
9111 ushort chksum; in AscInitFromEEP()
9112 ushort warn_code; in AscInitFromEEP()
9113 ushort cfg_msw, cfg_lsw; in AscInitFromEEP()
9798 static ushort AdvReadEEPWord(AdvPortAddr iop_base, int eep_word_addr) in AdvReadEEPWord()
9812 ushort *wbuf; in AdvSet3550EEPConfig()
9813 ushort addr, chksum; in AdvSet3550EEPConfig()
9814 ushort *charfields; in AdvSet3550EEPConfig()
9816 wbuf = (ushort *)cfg_buf; in AdvSet3550EEPConfig()
9817 charfields = (ushort *)&ADVEEP_3550_Config_Field_IsChar; in AdvSet3550EEPConfig()
9828 ushort word; in AdvSet3550EEPConfig()
9857 ushort word; in AdvSet3550EEPConfig()
9879 ushort *wbuf; in AdvSet38C0800EEPConfig()
9880 ushort *charfields; in AdvSet38C0800EEPConfig()
9881 ushort addr, chksum; in AdvSet38C0800EEPConfig()
9883 wbuf = (ushort *)cfg_buf; in AdvSet38C0800EEPConfig()
9884 charfields = (ushort *)&ADVEEP_38C0800_Config_Field_IsChar; in AdvSet38C0800EEPConfig()
9895 ushort word; in AdvSet38C0800EEPConfig()
9924 ushort word; in AdvSet38C0800EEPConfig()
9946 ushort *wbuf; in AdvSet38C1600EEPConfig()
9947 ushort *charfields; in AdvSet38C1600EEPConfig()
9948 ushort addr, chksum; in AdvSet38C1600EEPConfig()
9950 wbuf = (ushort *)cfg_buf; in AdvSet38C1600EEPConfig()
9951 charfields = (ushort *)&ADVEEP_38C1600_Config_Field_IsChar; in AdvSet38C1600EEPConfig()
9962 ushort word; in AdvSet38C1600EEPConfig()
9991 ushort word; in AdvSet38C1600EEPConfig()
10012 static ushort AdvGet3550EEPConfig(AdvPortAddr iop_base, in AdvGet3550EEPConfig()
10015 ushort wval, chksum; in AdvGet3550EEPConfig()
10016 ushort *wbuf; in AdvGet3550EEPConfig()
10018 ushort *charfields; in AdvGet3550EEPConfig()
10020 charfields = (ushort *)&ADVEEP_3550_Config_Field_IsChar; in AdvGet3550EEPConfig()
10021 wbuf = (ushort *)cfg_buf; in AdvGet3550EEPConfig()
10055 static ushort AdvGet38C0800EEPConfig(AdvPortAddr iop_base, in AdvGet38C0800EEPConfig()
10058 ushort wval, chksum; in AdvGet38C0800EEPConfig()
10059 ushort *wbuf; in AdvGet38C0800EEPConfig()
10061 ushort *charfields; in AdvGet38C0800EEPConfig()
10063 charfields = (ushort *)&ADVEEP_38C0800_Config_Field_IsChar; in AdvGet38C0800EEPConfig()
10064 wbuf = (ushort *)cfg_buf; in AdvGet38C0800EEPConfig()
10098 static ushort AdvGet38C1600EEPConfig(AdvPortAddr iop_base, in AdvGet38C1600EEPConfig()
10101 ushort wval, chksum; in AdvGet38C1600EEPConfig()
10102 ushort *wbuf; in AdvGet38C1600EEPConfig()
10104 ushort *charfields; in AdvGet38C1600EEPConfig()
10106 charfields = (ushort *)&ADVEEP_38C1600_Config_Field_IsChar; in AdvGet38C1600EEPConfig()
10107 wbuf = (ushort *)cfg_buf; in AdvGet38C1600EEPConfig()
10151 ushort warn_code; in AdvInitFrom3550EEP()
10301 ushort warn_code; in AdvInitFrom38C0800EEP()
10304 ushort sdtr_speed = 0; in AdvInitFrom38C0800EEP()
10500 ushort warn_code; in AdvInitFrom38C1600EEP()
10503 ushort sdtr_speed = 0; in AdvInitFrom38C1600EEP()
10743 (ushort)AdvReadByteRegister(iop_base, IOPB_CHIP_ID_1), in AdvInitGetConfig()
10744 (ushort)ADV_CHIP_ID_BYTE); in AdvInitGetConfig()
10747 (ushort)AdvReadWordRegister(iop_base, IOPW_CHIP_ID_0), in AdvInitGetConfig()
10748 (ushort)ADV_CHIP_ID_WORD); in AdvInitGetConfig()
10976 (ushort)inp(iop + 1), (ushort)inpw(iop)); in advansys_board_found()