Lines Matching refs:uchar
63 typedef unsigned char uchar; typedef
122 #define ASC_SCSI_TIX_TYPE uchar
124 #define ASC_SCSI_BIT_ID_TYPE uchar
256 uchar status;
257 uchar q_no;
258 uchar cntl;
259 uchar sg_queue_cnt;
260 uchar target_id;
261 uchar target_lun;
265 uchar sense_len;
266 uchar extra_bytes;
271 uchar target_ix;
272 uchar flag;
273 uchar cdb_len;
274 uchar tag_code;
279 uchar done_stat;
280 uchar host_stat;
281 uchar scsi_stat;
282 uchar scsi_msg;
286 uchar cdb[ASC_MAX_CDB_LEN];
287 uchar y_first_sg_list_qp;
288 uchar y_working_sg_qp;
289 uchar y_working_sg_ix;
290 uchar y_res;
300 uchar q_status;
301 uchar q_no;
302 uchar cntl;
303 uchar sense_len;
304 uchar extra_bytes;
305 uchar res;
325 uchar *cdbptr;
334 uchar *cdbptr;
336 uchar *sense_ptr;
338 uchar cdb[ASC_MAX_CDB_LEN];
339 uchar sense[ASC_MIN_SENSE_LEN];
343 uchar fwd;
344 uchar bwd;
352 uchar seq_no;
353 uchar q_no;
354 uchar cntl;
355 uchar sg_head_qp;
356 uchar sg_list_cnt;
357 uchar sg_cur_list_cnt;
361 uchar fwd;
362 uchar bwd;
432 uchar msg_type;
433 uchar msg_len;
434 uchar msg_req;
437 uchar sdtr_xfer_period;
438 uchar sdtr_req_ack_offset;
441 uchar wdtr_width;
444 uchar mdp_b3;
445 uchar mdp_b2;
446 uchar mdp_b1;
447 uchar mdp_b0;
450 uchar res;
466 uchar chip_scsi_id;
467 uchar isa_dma_speed;
468 uchar isa_dma_channel;
469 uchar chip_version;
472 uchar max_tag_qng[ASC_MAX_TID + 1];
473 uchar sdtr_period_offset[ASC_MAX_TID + 1];
474 uchar adapter_info[6];
510 uchar *overrun_buf;
512 uchar scsi_reset_wait;
513 uchar chip_no;
515 uchar max_total_qng;
516 uchar cur_total_qng;
517 uchar in_critical_cnt;
518 uchar last_q_shortage;
520 uchar cur_dvc_qng[ASC_MAX_TID + 1];
521 uchar max_dvc_qng[ASC_MAX_TID + 1];
524 const uchar *sdtr_period_tbl;
529 uchar dos_int13_table[ASC_MAX_TID + 1];
533 uchar min_sdtr_index;
534 uchar max_sdtr_index;
540 uchar type[ASC_MAX_TID + 1][ASC_MAX_LUN + 1];
591 uchar init_sdtr;
592 uchar disc_enable;
593 uchar use_cmd_qng;
594 uchar start_motor;
595 uchar max_total_qng;
596 uchar max_tag_qng;
597 uchar bios_scan;
598 uchar power_up_wait;
599 uchar no_scam;
600 uchar id_speed; /* low order 4 bits is chip scsi id */
602 uchar dos_int13_table[ASC_MAX_TID + 1];
603 uchar adapter_info[6];
706 #define SC_SEL (uchar)(0x80)
707 #define SC_BSY (uchar)(0x40)
708 #define SC_ACK (uchar)(0x20)
709 #define SC_REQ (uchar)(0x10)
710 #define SC_ATN (uchar)(0x08)
711 #define SC_IO (uchar)(0x04)
712 #define SC_CD (uchar)(0x02)
713 #define SC_MSG (uchar)(0x01)
714 #define SEC_SCSI_CTL (uchar)(0x80)
715 #define SEC_ACTIVE_NEGATE (uchar)(0x40)
716 #define SEC_SLEW_RATE (uchar)(0x20)
717 #define SEC_ENABLE_FILTER (uchar)(0x10)
777 #define CC_CHIP_RESET (uchar)0x80
778 #define CC_SCSI_RESET (uchar)0x40
779 #define CC_HALT (uchar)0x20
780 #define CC_SINGLE_STEP (uchar)0x10
781 #define CC_DMA_ABLE (uchar)0x08
782 #define CC_TEST (uchar)0x04
783 #define CC_BANK_ONE (uchar)0x02
784 #define CC_DIAG (uchar)0x01
817 #define AscGetChipSignatureByte(port) (uchar)inp((port)+IOP_SIG_BYTE)
819 #define AscGetChipVerNo(port) (uchar)inp((port)+IOP_VERSION)
824 #define AscGetChipEEPCmd(port) (uchar)inp((port)+IOP_EEP_CMD)
832 #define AscGetChipIFC(port) (uchar)inp((port)+IOP_REG_IFC)
836 #define AscGetChipControl(port) (uchar)inp((port)+IOP_CTRL)
838 #define AscGetChipSyn(port) (uchar)inp((port)+IOP_SYN_OFFSET)
844 #define AscGetExtraControl(port) (uchar)inp((port)+IOP_EXTRA_CONTROL)
848 #define AscReadChipIX(port) (uchar)inp((port)+IOP_REG_IX)
852 #define AscReadChipQP(port) (uchar)inp((port)+IOP_REG_QP)
858 #define AscReadChipDmaSpeed(port) (uchar)inp((port)+IOP_DMA_SPEED)
868 #define AscReadChipDvcID(port) (uchar)inp((port)+IOP_REG_ID)
944 uchar adapter_scsi_id; /* 09 Host Adapter ID */
945 uchar bios_boot_delay; /* power up wait */
947 uchar scsi_reset_delay; /* 10 reset delay */
948 uchar bios_id_lun; /* first boot device scsi id & lun */
952 uchar termination; /* 11 0 - automatic */
958 uchar reserved1; /* reserved byte (not used) */
979 uchar max_host_qng; /* 15 maximum host queuing */
980 uchar max_dvc_qng; /* maximum per device queuing */
987 uchar oem_name[16]; /* 22 OEM name */
1013 uchar adapter_scsi_id; /* 09 Host Adapter ID */
1014 uchar bios_boot_delay; /* power up wait */
1016 uchar scsi_reset_delay; /* 10 reset delay */
1017 uchar bios_id_lun; /* first boot device scsi id & lun */
1021 uchar termination_se; /* 11 0 - automatic */
1027 uchar termination_lvd; /* 11 0 - automatic */
1052 uchar max_host_qng; /* 15 maximum host queueing */
1053 uchar max_dvc_qng; /* maximum per device queuing */
1060 uchar oem_name[16]; /* 22 OEM name */
1115 uchar adapter_scsi_id; /* 09 Host Adapter ID */
1116 uchar bios_boot_delay; /* power up wait */
1118 uchar scsi_reset_delay; /* 10 reset delay */
1119 uchar bios_id_lun; /* first boot device scsi id & lun */
1123 uchar termination_se; /* 11 0 - automatic */
1129 uchar termination_lvd; /* 11 0 - automatic */
1154 uchar max_host_qng; /* 15 maximum host queueing */
1155 uchar max_dvc_qng; /* maximum per device queuing */
1162 uchar oem_name[16]; /* 22 OEM name */
1711 uchar chip_version; /* chip version */
1712 uchar termination; /* Term. Ctrl. bits 6-5 of SCSI_CFG1 register */
1725 uchar reserved1;
1726 uchar reserved2;
1727 uchar reserved3;
1728 uchar sg_cnt; /* Valid entries in block. */
1748 uchar cntl; /* Ucode flags and state (ASC_MC_QC_*). */
1749 uchar target_cmd;
1750 uchar target_id; /* Device target identifier. */
1751 uchar target_lun; /* Device target logical unit number. */
1756 uchar mflag;
1757 uchar sense_len;
1758 uchar cdb_len; /* SCSI CDB length. Must <= 16 bytes. */
1759 uchar scsi_cntl;
1760 uchar done_status; /* Completion status. */
1761 uchar scsi_status; /* SCSI status byte. */
1762 uchar host_status; /* Ucode host status. */
1763 uchar sg_working_ix;
1764 uchar cdb[12]; /* SCSI CDB bytes 0-11. */
1767 uchar cdb16[4]; /* SCSI CDB bytes 12-15. */
1801 uchar align[24]; /* Request structure padding. */
1832 uchar max_dvc_qng; /* maximum number of tagged commands per device */
1834 uchar scsi_reset_wait; /* delay in seconds after scsi bus reset */
1835 uchar chip_no; /* should be assigned by caller */
1836 uchar max_host_qng; /* maximum number of Q'ed command allowed */
1839 uchar chip_scsi_id; /* chip SCSI target ID */
1840 uchar chip_type;
1841 uchar bist_err_code;
2204 ASC_DBG_PRT_HEX((lvl), "CDB", (uchar *) (cdb), (len));
2207 ASC_DBG_PRT_HEX((lvl), "SENSE", (uchar *) (sense), (len));
2210 ASC_DBG_PRT_HEX((lvl), "INQUIRY", (uchar *) (inq), (len));
2277 uchar sdtr_data[ASC_MAX_TID + 1]; /* SDTR information */
2442 static void asc_prt_hex(char *f, uchar *s, int l) in asc_prt_hex()
2796 static int asc_get_eeprom_string(ushort *serialnum, uchar *cp) in asc_get_eeprom_string()
2885 uchar serialstr[13]; in asc_prt_asc_board_eeprom()
2956 uchar serialstr[13]; in asc_prt_adv_board_eeprom()
3297 uchar syn_period_ix; in asc_prt_asc_board_info()
3352 uchar lrambyte; in asc_prt_adv_board_info()
3656 static void AscSetBank(PortAddr iop_base, uchar bank) in AscSetBank()
3658 uchar val; in AscSetBank()
3692 uchar cc_val; in AscStopChip()
3697 AscSetChipControl(iop_base, (uchar)(cc_val | CC_HALT)); in AscStopChip()
3745 if (AscGetChipSignatureByte(iop_base) == (uchar)ASC_1000_ID1B) { in AscFindSignature()
3773 static uchar AscReadLramByte(PortAddr iop_base, ushort addr) in AscReadLramByte()
3816 static void AscWriteLramByte(PortAddr iop_base, ushort addr, uchar byte_val) in AscWriteLramByte()
3841 const uchar *s_buffer, int words) in AscMemWordCopyPtrToLram()
3868 ushort s_addr, uchar *s_buffer, int dwords) in AscMemDWordCopyPtrToLram()
3887 ushort s_addr, uchar *d_buffer, int words) in AscMemWordCopyPtrFromLram()
3913 uchar i; in AscInitLram()
3924 (uchar)(i + 1)); in AscInitLram()
3926 (uchar)(asc_dvc->max_total_qng)); in AscInitLram()
3928 (uchar)i); in AscInitLram()
3933 (uchar)(i + 1)); in AscInitLram()
3935 (uchar)(i - 1)); in AscInitLram()
3937 (uchar)i); in AscInitLram()
3940 (uchar)ASC_QLINK_END); in AscInitLram()
3942 (uchar)(asc_dvc->max_total_qng - 1)); in AscInitLram()
3944 (uchar)asc_dvc->max_total_qng); in AscInitLram()
3947 for (; i <= (uchar)(asc_dvc->max_total_qng + 3); in AscInitLram()
3960 const uchar *mcode_buf, ushort mcode_size) in AscLoadMicroCode()
3997 (uchar)((int)asc_dvc->max_total_qng + 1)); in AscInitQLinkVar()
3999 (uchar)((int)asc_dvc->max_total_qng + 2)); in AscInitQLinkVar()
4046 (uchar *)&phy_addr, 1); in AscInitMicroCodeVar()
4049 (uchar *)&phy_size, 1); in AscInitMicroCodeVar()
4413 uchar tid; in AdvInitAsc3550Driver()
4416 uchar max_cmd[ADV_MAX_TID + 1]; in AdvInitAsc3550Driver()
4856 uchar byte; in AdvInitAsc38C0800Driver()
4857 uchar tid; in AdvInitAsc38C0800Driver()
4860 uchar max_cmd[ADV_MAX_TID + 1]; in AdvInitAsc38C0800Driver()
5342 uchar byte; in AdvInitAsc38C1600Driver()
5343 uchar tid; in AdvInitAsc38C1600Driver()
5346 uchar max_cmd[ASC_MAX_TID + 1]; in AdvInitAsc38C1600Driver()
5824 uchar tid, max_cmd[ADV_MAX_TID + 1]; in AdvResetChipAndSB()
5907 static void adv_async_callback(ADV_DVC_VAR *adv_dvc_varp, uchar code) in adv_async_callback()
6113 uchar int_stat; in AdvISR()
6136 uchar intrb_code; in AdvISR()
6236 uchar host_flag; in AscAckInterrupt()
6237 uchar risc_flag; in AscAckInterrupt()
6251 (uchar)(host_flag | ASC_HOST_FLAG_ACK_INT)); in AscAckInterrupt()
6263 static uchar AscGetSynPeriodIndex(ASC_DVC_VAR *asc_dvc, uchar syn_time) in AscGetSynPeriodIndex()
6265 const uchar *period_table; in AscGetSynPeriodIndex()
6276 return (uchar)i; in AscGetSynPeriodIndex()
6279 return (uchar)max_index; in AscGetSynPeriodIndex()
6281 return (uchar)(max_index + 1); in AscGetSynPeriodIndex()
6285 static uchar
6286 AscMsgOutSDTR(ASC_DVC_VAR *asc_dvc, uchar sdtr_period, uchar sdtr_offset) in AscMsgOutSDTR()
6289 uchar sdtr_period_index = AscGetSynPeriodIndex(asc_dvc, sdtr_period); in AscMsgOutSDTR()
6301 (uchar *)&sdtr_buf, in AscMsgOutSDTR()
6307 (uchar *)&sdtr_buf, in AscMsgOutSDTR()
6313 static uchar
6314 AscCalSDTRData(ASC_DVC_VAR *asc_dvc, uchar sdtr_period, uchar syn_offset) in AscCalSDTRData()
6316 uchar byte; in AscCalSDTRData()
6317 uchar sdtr_period_ix; in AscCalSDTRData()
6326 static bool AscSetChipSynRegAtID(PortAddr iop_base, uchar id, uchar sdtr_data) in AscSetChipSynRegAtID()
6355 static void AscSetChipSDTR(PortAddr iop_base, uchar sdtr_data, uchar tid_no) in AscSetChipSDTR()
6371 uchar tag_code; in AscIsrChipHalted()
6372 uchar q_status; in AscIsrChipHalted()
6373 uchar halt_qp; in AscIsrChipHalted()
6374 uchar sdtr_data; in AscIsrChipHalted()
6375 uchar target_ix; in AscIsrChipHalted()
6376 uchar q_cntl, tid_no; in AscIsrChipHalted()
6377 uchar cur_dvc_qng; in AscIsrChipHalted()
6378 uchar asyn_sdtr; in AscIsrChipHalted()
6379 uchar scsi_status; in AscIsrChipHalted()
6396 target_id = (uchar)ASC_TID_TO_TARGET_ID(tid_no); in AscIsrChipHalted()
6419 (uchar *)&ext_msg, in AscIsrChipHalted()
6509 (uchar *)&ext_msg, in AscIsrChipHalted()
6523 (uchar *)&ext_msg, in AscIsrChipHalted()
6546 (uchar)(asc_dvc-> in AscIsrChipHalted()
6549 (uchar)(sdtr_data & (uchar) in AscIsrChipHalted()
6593 (uchar *)&out_msg, in AscIsrChipHalted()
6671 DvcGetQinfo(PortAddr iop_base, ushort s_addr, uchar *inbuf, int words) in DvcGetQinfo()
6688 static uchar
6694 uchar sg_queue_cnt; in _AscCopyLramScsiDoneQ()
6698 (uchar *)scsiq, in _AscCopyLramScsiDoneQ()
6703 scsiq->q_status = (uchar)_val; in _AscCopyLramScsiDoneQ()
6704 scsiq->q_no = (uchar)(_val >> 8); in _AscCopyLramScsiDoneQ()
6707 scsiq->cntl = (uchar)_val; in _AscCopyLramScsiDoneQ()
6708 sg_queue_cnt = (uchar)(_val >> 8); in _AscCopyLramScsiDoneQ()
6712 scsiq->sense_len = (uchar)_val; in _AscCopyLramScsiDoneQ()
6713 scsiq->extra_bytes = (uchar)(_val >> 8); in _AscCopyLramScsiDoneQ()
6852 uchar next_qp; in AscIsrQDone()
6853 uchar n_q_used; in AscIsrQDone()
6854 uchar sg_list_qp; in AscIsrQDone()
6855 uchar sg_queue_cnt; in AscIsrQDone()
6856 uchar q_cnt; in AscIsrQDone()
6857 uchar done_q_tail; in AscIsrQDone()
6858 uchar tid_no; in AscIsrQDone()
6864 uchar cur_target_qng; in AscIsrQDone()
6872 done_q_tail = (uchar)AscGetVarDoneQTail(iop_base); in AscIsrQDone()
6884 (uchar)(scsiq-> in AscIsrQDone()
6885 q_status & (uchar)~(QS_READY | in AscIsrQDone()
6973 (uchar)(CC_SCSI_RESET in AscIsrQDone()
7015 uchar ctrl_reg; in AscISR()
7016 uchar saved_ctrl_reg; in AscISR()
7019 uchar host_flag; in AscISR()
7048 saved_ctrl_reg &= (uchar)(~CC_HALT); in AscISR()
7063 (uchar)(~ASC_HOST_FLAG_IN_ISR); in AscISR()
7065 (uchar)(host_flag | (uchar)ASC_HOST_FLAG_IN_ISR)); in AscISR()
7071 saved_ctrl_reg &= (uchar)(~CC_HALT); in AscISR()
7254 uchar saved_stop_code; in AscHostReqRiscHalt()
7273 AscSetRunChipSynRegAtID(PortAddr iop_base, uchar tid_no, uchar sdtr_data) in AscSetRunChipSynRegAtID()
7865 AscGetNumOfFreeQueue(ASC_DVC_VAR *asc_dvc, uchar target_ix, uchar n_qs) in AscGetNumOfFreeQueue()
7870 uchar tid_no; in AscGetNumOfFreeQueue()
7902 static uchar AscAllocFreeQueue(PortAddr iop_base, uchar free_q_head) in AscAllocFreeQueue()
7905 uchar next_qp; in AscAllocFreeQueue()
7906 uchar q_status; in AscAllocFreeQueue()
7909 q_status = (uchar)AscReadLramByte(iop_base, in AscAllocFreeQueue()
7918 static uchar
7919 AscAllocMultipleFreeQueue(PortAddr iop_base, uchar free_q_head, uchar n_free_q) in AscAllocMultipleFreeQueue()
7921 uchar i; in AscAllocMultipleFreeQueue()
7942 DvcPutScsiQ(PortAddr iop_base, ushort s_addr, uchar *outbuf, int words) in DvcPutScsiQ()
7957 static int AscPutReadyQueue(ASC_DVC_VAR *asc_dvc, ASC_SCSI_Q *scsiq, uchar q_no) in AscPutReadyQueue()
7960 uchar tid_no; in AscPutReadyQueue()
7961 uchar sdtr_data; in AscPutReadyQueue()
7962 uchar syn_period_ix; in AscPutReadyQueue()
7963 uchar syn_offset; in AscPutReadyQueue()
7986 (uchar *)scsiq->cdbptr, scsiq->q2.cdb_len >> 1); in AscPutReadyQueue()
7990 (uchar *)&scsiq->q1.cntl, in AscPutReadyQueue()
8000 AscPutReadySgListQueue(ASC_DVC_VAR *asc_dvc, ASC_SCSI_Q *scsiq, uchar q_no) in AscPutReadySgListQueue()
8013 uchar next_qp; in AscPutReadySgListQueue()
8038 sg_list_dwords = (uchar)(ASC_SG_LIST_PER_Q * 2); in AscPutReadySgListQueue()
8073 (uchar *)&scsi_sg_q, in AscPutReadySgListQueue()
8077 (uchar *)&sg_head-> in AscPutReadySgListQueue()
8093 AscSendScsiQueue(ASC_DVC_VAR *asc_dvc, ASC_SCSI_Q *scsiq, uchar n_q_required) in AscSendScsiQueue()
8096 uchar free_q_head; in AscSendScsiQueue()
8097 uchar next_qp; in AscSendScsiQueue()
8098 uchar tid_no; in AscSendScsiQueue()
8099 uchar target_ix; in AscSendScsiQueue()
8106 free_q_head = (uchar)AscGetVarFreeQHead(iop_base); in AscSendScsiQueue()
8109 (uchar)n_q_required); in AscSendScsiQueue()
8133 static uchar _syn_offset_one_disable_cmd[ASC_SYN_OFFSET_ONE_DISABLE_LIST] = {
8162 uchar target_ix; in AscExeScsiQueue()
8163 uchar tid_no; in AscExeScsiQueue()
8164 uchar sdtr_data; in AscExeScsiQueue()
8165 uchar extra_bytes; in AscExeScsiQueue()
8166 uchar scsi_cmd; in AscExeScsiQueue()
8167 uchar disable_cmd; in AscExeScsiQueue()
8190 (uchar)(asc_dvc-> in AscExeScsiQueue()
8193 (uchar)(sdtr_data & (uchar) in AscExeScsiQueue()
8273 (uchar)((ushort)addr & 0x0003); in AscExeScsiQueue()
8320 (uchar)((ushort)addr & 0x0003); in AscExeScsiQueue()
8622 static uchar AscSetChipScsiID(PortAddr iop_base, uchar new_host_id) in AscSetChipScsiID()
8661 static void AscEnableIsaDma(uchar dma_channel) in AscEnableIsaDma()
8716 uchar value; in AscSetIsaDmaChannel()
8731 static uchar AscGetIsaDmaSpeed(PortAddr iop_base) in AscGetIsaDmaSpeed()
8733 uchar speed_value; in AscGetIsaDmaSpeed()
8742 static uchar AscSetIsaDmaSpeed(PortAddr iop_base, uchar speed_value) in AscSetIsaDmaSpeed()
8756 uchar chip_version; in AscInitAscDvcVar()
8824 (uchar)AscGetIsaDmaChannel(iop_base); in AscInitAscDvcVar()
8836 static int AscWriteEEPCmdReg(PortAddr iop_base, uchar cmd_reg) in AscWriteEEPCmdReg()
8856 static ushort AscReadEEPWord(PortAddr iop_base, uchar addr) in AscReadEEPWord()
8859 uchar cmd_reg; in AscReadEEPWord()
8886 *wbuf = AscReadEEPWord(iop_base, (uchar)s_addr); in AscGetEEPConfig()
8897 wval = AscReadEEPWord(iop_base, (uchar)s_addr); in AscGetEEPConfig()
8914 *wbuf = AscReadEEPWord(iop_base, (uchar)s_addr); in AscGetEEPConfig()
8964 static ushort AscWriteEEPWord(PortAddr iop_base, uchar addr, ushort word_val) in AscWriteEEPWord()
8975 (uchar)((uchar)ASC_EEP_CMD_WRITE | addr)); in AscWriteEEPWord()
9002 if (*wbuf != AscWriteEEPWord(iop_base, (uchar)s_addr, *wbuf)) { in AscSetEEPConfigOnce()
9021 AscWriteEEPWord(iop_base, (uchar)s_addr, word)) { in AscSetEEPConfigOnce()
9027 AscWriteEEPWord(iop_base, (uchar)s_addr, *wbuf)) { in AscSetEEPConfigOnce()
9035 if (sum != AscWriteEEPWord(iop_base, (uchar)s_addr, sum)) { in AscSetEEPConfigOnce()
9045 if (*wbuf != AscReadEEPWord(iop_base, (uchar)s_addr)) { in AscSetEEPConfigOnce()
9064 (iop_base, (uchar)s_addr)); in AscSetEEPConfigOnce()
9067 word = AscReadEEPWord(iop_base, (uchar)s_addr); in AscSetEEPConfigOnce()
9074 if (AscReadEEPWord(iop_base, (uchar)s_addr) != sum) { in AscSetEEPConfigOnce()
9246 (uchar)(ASC_DEF_SDTR_OFFSET | in AscInitFromEEP()
10296 uchar tid, termination; in AdvInitFrom38C0800EEP()
10495 uchar tid, termination; in AdvInitFrom38C1600EEP()