Lines Matching refs:uchar

67 typedef unsigned char uchar;  typedef
126 #define ASC_SCSI_TIX_TYPE uchar
128 #define ASC_SCSI_BIT_ID_TYPE uchar
260 uchar status;
261 uchar q_no;
262 uchar cntl;
263 uchar sg_queue_cnt;
264 uchar target_id;
265 uchar target_lun;
269 uchar sense_len;
270 uchar extra_bytes;
275 uchar target_ix;
276 uchar flag;
277 uchar cdb_len;
278 uchar tag_code;
283 uchar done_stat;
284 uchar host_stat;
285 uchar scsi_stat;
286 uchar scsi_msg;
290 uchar cdb[ASC_MAX_CDB_LEN];
291 uchar y_first_sg_list_qp;
292 uchar y_working_sg_qp;
293 uchar y_working_sg_ix;
294 uchar y_res;
304 uchar q_status;
305 uchar q_no;
306 uchar cntl;
307 uchar sense_len;
308 uchar extra_bytes;
309 uchar res;
329 uchar *cdbptr;
338 uchar *cdbptr;
340 uchar *sense_ptr;
342 uchar cdb[ASC_MAX_CDB_LEN];
343 uchar sense[ASC_MIN_SENSE_LEN];
347 uchar fwd;
348 uchar bwd;
356 uchar seq_no;
357 uchar q_no;
358 uchar cntl;
359 uchar sg_head_qp;
360 uchar sg_list_cnt;
361 uchar sg_cur_list_cnt;
365 uchar fwd;
366 uchar bwd;
436 uchar msg_type;
437 uchar msg_len;
438 uchar msg_req;
441 uchar sdtr_xfer_period;
442 uchar sdtr_req_ack_offset;
445 uchar wdtr_width;
448 uchar mdp_b3;
449 uchar mdp_b2;
450 uchar mdp_b1;
451 uchar mdp_b0;
454 uchar res;
470 uchar chip_scsi_id;
471 uchar isa_dma_speed;
472 uchar isa_dma_channel;
473 uchar chip_version;
476 uchar max_tag_qng[ASC_MAX_TID + 1];
477 uchar sdtr_period_offset[ASC_MAX_TID + 1];
478 uchar adapter_info[6];
514 uchar *overrun_buf;
516 uchar scsi_reset_wait;
517 uchar chip_no;
519 uchar max_total_qng;
520 uchar cur_total_qng;
521 uchar in_critical_cnt;
522 uchar last_q_shortage;
524 uchar cur_dvc_qng[ASC_MAX_TID + 1];
525 uchar max_dvc_qng[ASC_MAX_TID + 1];
528 const uchar *sdtr_period_tbl;
533 uchar dos_int13_table[ASC_MAX_TID + 1];
537 uchar min_sdtr_index;
538 uchar max_sdtr_index;
544 uchar type[ASC_MAX_TID + 1][ASC_MAX_LUN + 1];
595 uchar init_sdtr;
596 uchar disc_enable;
597 uchar use_cmd_qng;
598 uchar start_motor;
599 uchar max_total_qng;
600 uchar max_tag_qng;
601 uchar bios_scan;
602 uchar power_up_wait;
603 uchar no_scam;
604 uchar id_speed; /* low order 4 bits is chip scsi id */
606 uchar dos_int13_table[ASC_MAX_TID + 1];
607 uchar adapter_info[6];
710 #define SC_SEL (uchar)(0x80)
711 #define SC_BSY (uchar)(0x40)
712 #define SC_ACK (uchar)(0x20)
713 #define SC_REQ (uchar)(0x10)
714 #define SC_ATN (uchar)(0x08)
715 #define SC_IO (uchar)(0x04)
716 #define SC_CD (uchar)(0x02)
717 #define SC_MSG (uchar)(0x01)
718 #define SEC_SCSI_CTL (uchar)(0x80)
719 #define SEC_ACTIVE_NEGATE (uchar)(0x40)
720 #define SEC_SLEW_RATE (uchar)(0x20)
721 #define SEC_ENABLE_FILTER (uchar)(0x10)
781 #define CC_CHIP_RESET (uchar)0x80
782 #define CC_SCSI_RESET (uchar)0x40
783 #define CC_HALT (uchar)0x20
784 #define CC_SINGLE_STEP (uchar)0x10
785 #define CC_DMA_ABLE (uchar)0x08
786 #define CC_TEST (uchar)0x04
787 #define CC_BANK_ONE (uchar)0x02
788 #define CC_DIAG (uchar)0x01
821 #define AscGetChipSignatureByte(port) (uchar)inp((port)+IOP_SIG_BYTE)
823 #define AscGetChipVerNo(port) (uchar)inp((port)+IOP_VERSION)
828 #define AscGetChipEEPCmd(port) (uchar)inp((port)+IOP_EEP_CMD)
836 #define AscGetChipIFC(port) (uchar)inp((port)+IOP_REG_IFC)
840 #define AscGetChipControl(port) (uchar)inp((port)+IOP_CTRL)
842 #define AscGetChipSyn(port) (uchar)inp((port)+IOP_SYN_OFFSET)
848 #define AscGetExtraControl(port) (uchar)inp((port)+IOP_EXTRA_CONTROL)
852 #define AscReadChipIX(port) (uchar)inp((port)+IOP_REG_IX)
856 #define AscReadChipQP(port) (uchar)inp((port)+IOP_REG_QP)
862 #define AscReadChipDmaSpeed(port) (uchar)inp((port)+IOP_DMA_SPEED)
872 #define AscReadChipDvcID(port) (uchar)inp((port)+IOP_REG_ID)
948 uchar adapter_scsi_id; /* 09 Host Adapter ID */
949 uchar bios_boot_delay; /* power up wait */
951 uchar scsi_reset_delay; /* 10 reset delay */
952 uchar bios_id_lun; /* first boot device scsi id & lun */
956 uchar termination; /* 11 0 - automatic */
962 uchar reserved1; /* reserved byte (not used) */
983 uchar max_host_qng; /* 15 maximum host queuing */
984 uchar max_dvc_qng; /* maximum per device queuing */
991 uchar oem_name[16]; /* 22 OEM name */
1017 uchar adapter_scsi_id; /* 09 Host Adapter ID */
1018 uchar bios_boot_delay; /* power up wait */
1020 uchar scsi_reset_delay; /* 10 reset delay */
1021 uchar bios_id_lun; /* first boot device scsi id & lun */
1025 uchar termination_se; /* 11 0 - automatic */
1031 uchar termination_lvd; /* 11 0 - automatic */
1056 uchar max_host_qng; /* 15 maximum host queueing */
1057 uchar max_dvc_qng; /* maximum per device queuing */
1064 uchar oem_name[16]; /* 22 OEM name */
1119 uchar adapter_scsi_id; /* 09 Host Adapter ID */
1120 uchar bios_boot_delay; /* power up wait */
1122 uchar scsi_reset_delay; /* 10 reset delay */
1123 uchar bios_id_lun; /* first boot device scsi id & lun */
1127 uchar termination_se; /* 11 0 - automatic */
1133 uchar termination_lvd; /* 11 0 - automatic */
1158 uchar max_host_qng; /* 15 maximum host queueing */
1159 uchar max_dvc_qng; /* maximum per device queuing */
1166 uchar oem_name[16]; /* 22 OEM name */
1715 uchar chip_version; /* chip version */
1716 uchar termination; /* Term. Ctrl. bits 6-5 of SCSI_CFG1 register */
1729 uchar reserved1;
1730 uchar reserved2;
1731 uchar reserved3;
1732 uchar sg_cnt; /* Valid entries in block. */
1752 uchar cntl; /* Ucode flags and state (ASC_MC_QC_*). */
1753 uchar target_cmd;
1754 uchar target_id; /* Device target identifier. */
1755 uchar target_lun; /* Device target logical unit number. */
1760 uchar mflag;
1761 uchar sense_len;
1762 uchar cdb_len; /* SCSI CDB length. Must <= 16 bytes. */
1763 uchar scsi_cntl;
1764 uchar done_status; /* Completion status. */
1765 uchar scsi_status; /* SCSI status byte. */
1766 uchar host_status; /* Ucode host status. */
1767 uchar sg_working_ix;
1768 uchar cdb[12]; /* SCSI CDB bytes 0-11. */
1771 uchar cdb16[4]; /* SCSI CDB bytes 12-15. */
1805 uchar align[24]; /* Request structure padding. */
1836 uchar max_dvc_qng; /* maximum number of tagged commands per device */
1838 uchar scsi_reset_wait; /* delay in seconds after scsi bus reset */
1839 uchar chip_no; /* should be assigned by caller */
1840 uchar max_host_qng; /* maximum number of Q'ed command allowed */
1843 uchar chip_scsi_id; /* chip SCSI target ID */
1844 uchar chip_type;
1845 uchar bist_err_code;
2208 ASC_DBG_PRT_HEX((lvl), "CDB", (uchar *) (cdb), (len));
2211 ASC_DBG_PRT_HEX((lvl), "SENSE", (uchar *) (sense), (len));
2214 ASC_DBG_PRT_HEX((lvl), "INQUIRY", (uchar *) (inq), (len));
2281 uchar sdtr_data[ASC_MAX_TID + 1]; /* SDTR information */
2446 static void asc_prt_hex(char *f, uchar *s, int l) in asc_prt_hex()
2800 static int asc_get_eeprom_string(ushort *serialnum, uchar *cp) in asc_get_eeprom_string()
2889 uchar serialstr[13]; in asc_prt_asc_board_eeprom()
2960 uchar serialstr[13]; in asc_prt_adv_board_eeprom()
3301 uchar syn_period_ix; in asc_prt_asc_board_info()
3356 uchar lrambyte; in asc_prt_adv_board_info()
3660 static void AscSetBank(PortAddr iop_base, uchar bank) in AscSetBank()
3662 uchar val; in AscSetBank()
3696 uchar cc_val; in AscStopChip()
3701 AscSetChipControl(iop_base, (uchar)(cc_val | CC_HALT)); in AscStopChip()
3749 if (AscGetChipSignatureByte(iop_base) == (uchar)ASC_1000_ID1B) { in AscFindSignature()
3777 static uchar AscReadLramByte(PortAddr iop_base, ushort addr) in AscReadLramByte()
3820 static void AscWriteLramByte(PortAddr iop_base, ushort addr, uchar byte_val) in AscWriteLramByte()
3845 const uchar *s_buffer, int words) in AscMemWordCopyPtrToLram()
3872 ushort s_addr, uchar *s_buffer, int dwords) in AscMemDWordCopyPtrToLram()
3891 ushort s_addr, uchar *d_buffer, int words) in AscMemWordCopyPtrFromLram()
3917 uchar i; in AscInitLram()
3928 (uchar)(i + 1)); in AscInitLram()
3930 (uchar)(asc_dvc->max_total_qng)); in AscInitLram()
3932 (uchar)i); in AscInitLram()
3937 (uchar)(i + 1)); in AscInitLram()
3939 (uchar)(i - 1)); in AscInitLram()
3941 (uchar)i); in AscInitLram()
3944 (uchar)ASC_QLINK_END); in AscInitLram()
3946 (uchar)(asc_dvc->max_total_qng - 1)); in AscInitLram()
3948 (uchar)asc_dvc->max_total_qng); in AscInitLram()
3951 for (; i <= (uchar)(asc_dvc->max_total_qng + 3); in AscInitLram()
3964 const uchar *mcode_buf, ushort mcode_size) in AscLoadMicroCode()
4001 (uchar)((int)asc_dvc->max_total_qng + 1)); in AscInitQLinkVar()
4003 (uchar)((int)asc_dvc->max_total_qng + 2)); in AscInitQLinkVar()
4050 (uchar *)&phy_addr, 1); in AscInitMicroCodeVar()
4053 (uchar *)&phy_size, 1); in AscInitMicroCodeVar()
4417 uchar tid; in AdvInitAsc3550Driver()
4420 uchar max_cmd[ADV_MAX_TID + 1]; in AdvInitAsc3550Driver()
4860 uchar byte; in AdvInitAsc38C0800Driver()
4861 uchar tid; in AdvInitAsc38C0800Driver()
4864 uchar max_cmd[ADV_MAX_TID + 1]; in AdvInitAsc38C0800Driver()
5346 uchar byte; in AdvInitAsc38C1600Driver()
5347 uchar tid; in AdvInitAsc38C1600Driver()
5350 uchar max_cmd[ASC_MAX_TID + 1]; in AdvInitAsc38C1600Driver()
5828 uchar tid, max_cmd[ADV_MAX_TID + 1]; in AdvResetChipAndSB()
5911 static void adv_async_callback(ADV_DVC_VAR *adv_dvc_varp, uchar code) in adv_async_callback()
6119 uchar int_stat; in AdvISR()
6142 uchar intrb_code; in AdvISR()
6242 uchar host_flag; in AscAckInterrupt()
6243 uchar risc_flag; in AscAckInterrupt()
6257 (uchar)(host_flag | ASC_HOST_FLAG_ACK_INT)); in AscAckInterrupt()
6269 static uchar AscGetSynPeriodIndex(ASC_DVC_VAR *asc_dvc, uchar syn_time) in AscGetSynPeriodIndex()
6271 const uchar *period_table; in AscGetSynPeriodIndex()
6282 return (uchar)i; in AscGetSynPeriodIndex()
6285 return (uchar)max_index; in AscGetSynPeriodIndex()
6287 return (uchar)(max_index + 1); in AscGetSynPeriodIndex()
6291 static uchar
6292 AscMsgOutSDTR(ASC_DVC_VAR *asc_dvc, uchar sdtr_period, uchar sdtr_offset) in AscMsgOutSDTR()
6295 uchar sdtr_period_index; in AscMsgOutSDTR()
6308 (uchar *)&sdtr_buf, in AscMsgOutSDTR()
6314 (uchar *)&sdtr_buf, in AscMsgOutSDTR()
6320 static uchar
6321 AscCalSDTRData(ASC_DVC_VAR *asc_dvc, uchar sdtr_period, uchar syn_offset) in AscCalSDTRData()
6323 uchar byte; in AscCalSDTRData()
6324 uchar sdtr_period_ix; in AscCalSDTRData()
6333 static bool AscSetChipSynRegAtID(PortAddr iop_base, uchar id, uchar sdtr_data) in AscSetChipSynRegAtID()
6362 static void AscSetChipSDTR(PortAddr iop_base, uchar sdtr_data, uchar tid_no) in AscSetChipSDTR()
6378 uchar tag_code; in AscIsrChipHalted()
6379 uchar q_status; in AscIsrChipHalted()
6380 uchar halt_qp; in AscIsrChipHalted()
6381 uchar sdtr_data; in AscIsrChipHalted()
6382 uchar target_ix; in AscIsrChipHalted()
6383 uchar q_cntl, tid_no; in AscIsrChipHalted()
6384 uchar cur_dvc_qng; in AscIsrChipHalted()
6385 uchar asyn_sdtr; in AscIsrChipHalted()
6386 uchar scsi_status; in AscIsrChipHalted()
6403 target_id = (uchar)ASC_TID_TO_TARGET_ID(tid_no); in AscIsrChipHalted()
6426 (uchar *)&ext_msg, in AscIsrChipHalted()
6516 (uchar *)&ext_msg, in AscIsrChipHalted()
6530 (uchar *)&ext_msg, in AscIsrChipHalted()
6553 (uchar)(asc_dvc-> in AscIsrChipHalted()
6556 (uchar)(sdtr_data & (uchar) in AscIsrChipHalted()
6600 (uchar *)&out_msg, in AscIsrChipHalted()
6678 DvcGetQinfo(PortAddr iop_base, ushort s_addr, uchar *inbuf, int words) in DvcGetQinfo()
6695 static uchar
6701 uchar sg_queue_cnt; in _AscCopyLramScsiDoneQ()
6705 (uchar *)scsiq, in _AscCopyLramScsiDoneQ()
6710 scsiq->q_status = (uchar)_val; in _AscCopyLramScsiDoneQ()
6711 scsiq->q_no = (uchar)(_val >> 8); in _AscCopyLramScsiDoneQ()
6714 scsiq->cntl = (uchar)_val; in _AscCopyLramScsiDoneQ()
6715 sg_queue_cnt = (uchar)(_val >> 8); in _AscCopyLramScsiDoneQ()
6719 scsiq->sense_len = (uchar)_val; in _AscCopyLramScsiDoneQ()
6720 scsiq->extra_bytes = (uchar)(_val >> 8); in _AscCopyLramScsiDoneQ()
6859 uchar next_qp; in AscIsrQDone()
6860 uchar n_q_used; in AscIsrQDone()
6861 uchar sg_list_qp; in AscIsrQDone()
6862 uchar sg_queue_cnt; in AscIsrQDone()
6863 uchar q_cnt; in AscIsrQDone()
6864 uchar done_q_tail; in AscIsrQDone()
6865 uchar tid_no; in AscIsrQDone()
6871 uchar cur_target_qng; in AscIsrQDone()
6879 done_q_tail = (uchar)AscGetVarDoneQTail(iop_base); in AscIsrQDone()
6891 (uchar)(scsiq-> in AscIsrQDone()
6892 q_status & (uchar)~(QS_READY | in AscIsrQDone()
6980 (uchar)(CC_SCSI_RESET in AscIsrQDone()
7022 uchar ctrl_reg; in AscISR()
7023 uchar saved_ctrl_reg; in AscISR()
7026 uchar host_flag; in AscISR()
7055 saved_ctrl_reg &= (uchar)(~CC_HALT); in AscISR()
7070 (uchar)(~ASC_HOST_FLAG_IN_ISR); in AscISR()
7072 (uchar)(host_flag | (uchar)ASC_HOST_FLAG_IN_ISR)); in AscISR()
7078 saved_ctrl_reg &= (uchar)(~CC_HALT); in AscISR()
7261 uchar saved_stop_code; in AscHostReqRiscHalt()
7280 AscSetRunChipSynRegAtID(PortAddr iop_base, uchar tid_no, uchar sdtr_data) in AscSetRunChipSynRegAtID()
7872 AscGetNumOfFreeQueue(ASC_DVC_VAR *asc_dvc, uchar target_ix, uchar n_qs) in AscGetNumOfFreeQueue()
7877 uchar tid_no; in AscGetNumOfFreeQueue()
7909 static uchar AscAllocFreeQueue(PortAddr iop_base, uchar free_q_head) in AscAllocFreeQueue()
7912 uchar next_qp; in AscAllocFreeQueue()
7913 uchar q_status; in AscAllocFreeQueue()
7916 q_status = (uchar)AscReadLramByte(iop_base, in AscAllocFreeQueue()
7925 static uchar
7926 AscAllocMultipleFreeQueue(PortAddr iop_base, uchar free_q_head, uchar n_free_q) in AscAllocMultipleFreeQueue()
7928 uchar i; in AscAllocMultipleFreeQueue()
7949 DvcPutScsiQ(PortAddr iop_base, ushort s_addr, uchar *outbuf, int words) in DvcPutScsiQ()
7964 static int AscPutReadyQueue(ASC_DVC_VAR *asc_dvc, ASC_SCSI_Q *scsiq, uchar q_no) in AscPutReadyQueue()
7967 uchar tid_no; in AscPutReadyQueue()
7968 uchar sdtr_data; in AscPutReadyQueue()
7969 uchar syn_period_ix; in AscPutReadyQueue()
7970 uchar syn_offset; in AscPutReadyQueue()
7993 (uchar *)scsiq->cdbptr, scsiq->q2.cdb_len >> 1); in AscPutReadyQueue()
7997 (uchar *)&scsiq->q1.cntl, in AscPutReadyQueue()
8007 AscPutReadySgListQueue(ASC_DVC_VAR *asc_dvc, ASC_SCSI_Q *scsiq, uchar q_no) in AscPutReadySgListQueue()
8020 uchar next_qp; in AscPutReadySgListQueue()
8045 sg_list_dwords = (uchar)(ASC_SG_LIST_PER_Q * 2); in AscPutReadySgListQueue()
8080 (uchar *)&scsi_sg_q, in AscPutReadySgListQueue()
8084 (uchar *)&sg_head-> in AscPutReadySgListQueue()
8100 AscSendScsiQueue(ASC_DVC_VAR *asc_dvc, ASC_SCSI_Q *scsiq, uchar n_q_required) in AscSendScsiQueue()
8103 uchar free_q_head; in AscSendScsiQueue()
8104 uchar next_qp; in AscSendScsiQueue()
8105 uchar tid_no; in AscSendScsiQueue()
8106 uchar target_ix; in AscSendScsiQueue()
8113 free_q_head = (uchar)AscGetVarFreeQHead(iop_base); in AscSendScsiQueue()
8116 (uchar)n_q_required); in AscSendScsiQueue()
8140 static uchar _syn_offset_one_disable_cmd[ASC_SYN_OFFSET_ONE_DISABLE_LIST] = {
8169 uchar target_ix; in AscExeScsiQueue()
8170 uchar tid_no; in AscExeScsiQueue()
8171 uchar sdtr_data; in AscExeScsiQueue()
8172 uchar extra_bytes; in AscExeScsiQueue()
8173 uchar scsi_cmd; in AscExeScsiQueue()
8174 uchar disable_cmd; in AscExeScsiQueue()
8197 (uchar)(asc_dvc-> in AscExeScsiQueue()
8200 (uchar)(sdtr_data & (uchar) in AscExeScsiQueue()
8280 (uchar)((ushort)addr & 0x0003); in AscExeScsiQueue()
8327 (uchar)((ushort)addr & 0x0003); in AscExeScsiQueue()
8629 static uchar AscSetChipScsiID(PortAddr iop_base, uchar new_host_id) in AscSetChipScsiID()
8668 static void AscEnableIsaDma(uchar dma_channel) in AscEnableIsaDma()
8723 uchar value; in AscSetIsaDmaChannel()
8738 static uchar AscGetIsaDmaSpeed(PortAddr iop_base) in AscGetIsaDmaSpeed()
8740 uchar speed_value; in AscGetIsaDmaSpeed()
8749 static uchar AscSetIsaDmaSpeed(PortAddr iop_base, uchar speed_value) in AscSetIsaDmaSpeed()
8763 uchar chip_version; in AscInitAscDvcVar()
8831 (uchar)AscGetIsaDmaChannel(iop_base); in AscInitAscDvcVar()
8843 static int AscWriteEEPCmdReg(PortAddr iop_base, uchar cmd_reg) in AscWriteEEPCmdReg()
8863 static ushort AscReadEEPWord(PortAddr iop_base, uchar addr) in AscReadEEPWord()
8866 uchar cmd_reg; in AscReadEEPWord()
8893 *wbuf = AscReadEEPWord(iop_base, (uchar)s_addr); in AscGetEEPConfig()
8904 wval = AscReadEEPWord(iop_base, (uchar)s_addr); in AscGetEEPConfig()
8921 *wbuf = AscReadEEPWord(iop_base, (uchar)s_addr); in AscGetEEPConfig()
8971 static ushort AscWriteEEPWord(PortAddr iop_base, uchar addr, ushort word_val) in AscWriteEEPWord()
8982 (uchar)((uchar)ASC_EEP_CMD_WRITE | addr)); in AscWriteEEPWord()
9009 if (*wbuf != AscWriteEEPWord(iop_base, (uchar)s_addr, *wbuf)) { in AscSetEEPConfigOnce()
9028 AscWriteEEPWord(iop_base, (uchar)s_addr, word)) { in AscSetEEPConfigOnce()
9034 AscWriteEEPWord(iop_base, (uchar)s_addr, *wbuf)) { in AscSetEEPConfigOnce()
9042 if (sum != AscWriteEEPWord(iop_base, (uchar)s_addr, sum)) { in AscSetEEPConfigOnce()
9052 if (*wbuf != AscReadEEPWord(iop_base, (uchar)s_addr)) { in AscSetEEPConfigOnce()
9071 (iop_base, (uchar)s_addr)); in AscSetEEPConfigOnce()
9074 word = AscReadEEPWord(iop_base, (uchar)s_addr); in AscSetEEPConfigOnce()
9081 if (AscReadEEPWord(iop_base, (uchar)s_addr) != sum) { in AscSetEEPConfigOnce()
9253 (uchar)(ASC_DEF_SDTR_OFFSET | in AscInitFromEEP()
10303 uchar tid, termination; in AdvInitFrom38C0800EEP()
10502 uchar tid, termination; in AdvInitFrom38C1600EEP()