Lines Matching +full:3 +full:- +full:byte

1 /* SPDX-License-Identifier: GPL-2.0-only */
6 Copyright 1995-1998 by Leonard N. Zubkoff <lnz@dandelion.com>
12 Special thanks to Wayne Yen, Jin-Lon Hon, and Alex Win of BusLogic, whose
61 #define BLOGIC_TAG_DEPTH_BB 3
62 #define BLOGIC_UNTAG_DEPTH 3
110 BLOGIC_WARN_LEVEL = 3,
150 static int blogic_adapter_addr_count[3] = { 0, BLOGIC_MULTIMASTER_ADDR_COUNT, BLOGIC_FLASHPOINT_ADD…
160 (adapter->adapter_type == BLOGIC_MULTIMASTER)
163 (adapter->adapter_type == BLOGIC_FLASHPOINT)
181 BLOGIC_PCI_BUS = 3,
189 BLOGIC_VESA_BUS, /* BT-4xx */
190 BLOGIC_ISA_BUS, /* BT-5xx */
191 BLOGIC_MCA_BUS, /* BT-6xx */
192 BLOGIC_EISA_BUS, /* BT-7xx */
193 BLOGIC_UNKNOWN_BUS, /* BT-8xx */
194 BLOGIC_PCI_BUS /* BT-9xx */
205 BLOGIC_BIOS_DISK255x63 = 3
210 Define a 10^18 Statistics Byte Counter data type.
241 bool nosort_pci:1; /* Bit 3 */
254 bool trace_err:1; /* Bit 3 */
266 #define BLOGIC_GEOMETRY_REG 3 /* RO register */
269 Define the structure of the write-only Control Register.
275 unsigned char:4; /* Bits 0-3 */
284 Define the structure of the read-only Status Register.
293 bool cmd_param_busy:1; /* Bit 3 */
302 Define the structure of the read-only Interrupt Register.
311 bool ext_busreset:1; /* Bit 3 */
312 unsigned char rsvd:3; /* Bits 4-6 */
318 Define the structure of the read-only Geometry Register.
324 enum blogic_bios_diskgeometry d0_geo:2; /* Bits 0-1 */
325 enum blogic_bios_diskgeometry d1_geo:2; /* Bits 2-3 */
326 unsigned char:3; /* Bits 4-6 */
387 unsigned char type; /* Byte 0 */
388 unsigned char custom_features; /* Byte 1 */
389 unsigned char fw_ver_digit1; /* Byte 2 */
390 unsigned char fw_ver_digit2; /* Byte 3 */
398 unsigned char:5; /* Byte 0 Bits 0-4 */
399 bool dma_ch5:1; /* Byte 0 Bit 5 */
400 bool dma_ch6:1; /* Byte 0 Bit 6 */
401 bool dma_ch7:1; /* Byte 0 Bit 7 */
402 bool irq_ch9:1; /* Byte 1 Bit 0 */
403 bool irq_ch10:1; /* Byte 1 Bit 1 */
404 bool irq_ch11:1; /* Byte 1 Bit 2 */
405 bool irq_ch12:1; /* Byte 1 Bit 3 */
406 unsigned char:1; /* Byte 1 Bit 4 */
407 bool irq_ch14:1; /* Byte 1 Bit 5 */
408 bool irq_ch15:1; /* Byte 1 Bit 6 */
409 unsigned char:1; /* Byte 1 Bit 7 */
410 unsigned char id:4; /* Byte 2 Bits 0-3 */
411 unsigned char:4; /* Byte 2 Bits 4-7 */
419 unsigned char offset:4; /* Bits 0-3 */
420 unsigned char tx_period:3; /* Bits 4-6 */
425 bool sync:1; /* Byte 0 Bit 0 */
426 bool parity:1; /* Byte 0 Bit 1 */
427 unsigned char:6; /* Byte 0 Bits 2-7 */
428 unsigned char tx_rate; /* Byte 1 */
429 unsigned char preempt_time; /* Byte 2 */
430 unsigned char timeoff_bus; /* Byte 3 */
431 unsigned char mbox_count; /* Byte 4 */
432 unsigned char mbox_addr[3]; /* Bytes 5-7 */
433 struct blogic_syncval sync0to7[8]; /* Bytes 8-15 */
434 unsigned char disconnect_ok0to7; /* Byte 16 */
435 unsigned char sig; /* Byte 17 */
436 unsigned char char_d; /* Byte 18 */
437 unsigned char bus_type; /* Byte 19 */
438 unsigned char wide_tx_ok0to7; /* Byte 20 */
439 unsigned char wide_tx_active0to7; /* Byte 21 */
440 struct blogic_syncval sync8to15[8]; /* Bytes 22-29 */
441 unsigned char disconnect_ok8to15; /* Byte 30 */
442 unsigned char:8; /* Byte 31 */
443 unsigned char wide_tx_ok8to15; /* Byte 32 */
444 unsigned char wide_tx_active8to15; /* Byte 33 */
452 unsigned char mbox_count; /* Byte 0 */
453 u32 base_mbox_addr; /* Bytes 1-4 */
467 BLOGIC_IO_234 = 3,
475 enum blogic_isa_ioport isa_port; /* Byte 0 */
476 unsigned char irq_ch; /* Byte 1 */
477 bool low_term:1; /* Byte 2 Bit 0 */
478 bool high_term:1; /* Byte 2 Bit 1 */
479 unsigned char:2; /* Byte 2 Bits 2-3 */
480 bool JP1:1; /* Byte 2 Bit 4 */
481 bool JP2:1; /* Byte 2 Bit 5 */
482 bool JP3:1; /* Byte 2 Bit 6 */
483 bool genericinfo_valid:1; /* Byte 2 Bit 7 */
484 unsigned char:8; /* Byte 3 */
492 unsigned char bus_type; /* Byte 0 */
493 unsigned char bios_addr; /* Byte 1 */
494 unsigned short sg_limit; /* Bytes 2-3 */
495 unsigned char mbox_count; /* Byte 4 */
496 u32 base_mbox_addr; /* Bytes 5-8 */
498 unsigned char:2; /* Byte 9 Bits 0-1 */
499 bool fast_on_eisa:1; /* Byte 9 Bit 2 */
500 unsigned char:3; /* Byte 9 Bits 3-5 */
501 bool level_int:1; /* Byte 9 Bit 6 */
502 unsigned char:1; /* Byte 9 Bit 7 */
504 unsigned char fw_rev[3]; /* Bytes 10-12 */
505 bool wide:1; /* Byte 13 Bit 0 */
506 bool differential:1; /* Byte 13 Bit 1 */
507 bool scam:1; /* Byte 13 Bit 2 */
508 bool ultra:1; /* Byte 13 Bit 3 */
509 bool smart_term:1; /* Byte 13 Bit 4 */
510 unsigned char:3; /* Byte 13 Bits 5-7 */
531 unsigned char offset; /* Byte 0 */
532 unsigned char count; /* Byte 1 */
540 unsigned char factory_sig[2]; /* Bytes 0-1 */
541 unsigned char info_bytes; /* Byte 2 */
542 unsigned char adapter_type[6]; /* Bytes 3-8 */
543 unsigned char:8; /* Byte 9 */
544 bool floppy:1; /* Byte 10 Bit 0 */
545 bool floppy_sec:1; /* Byte 10 Bit 1 */
546 bool level_int:1; /* Byte 10 Bit 2 */
547 unsigned char:2; /* Byte 10 Bits 3-4 */
548 unsigned char systemram_bios:3; /* Byte 10 Bits 5-7 */
549 unsigned char dma_ch:7; /* Byte 11 Bits 0-6 */
550 bool dma_autoconf:1; /* Byte 11 Bit 7 */
551 unsigned char irq_ch:7; /* Byte 12 Bits 0-6 */
552 bool irq_autoconf:1; /* Byte 12 Bit 7 */
553 unsigned char dma_tx_rate; /* Byte 13 */
554 unsigned char scsi_id; /* Byte 14 */
555 bool low_term:1; /* Byte 15 Bit 0 */
556 bool parity:1; /* Byte 15 Bit 1 */
557 bool high_term:1; /* Byte 15 Bit 2 */
558 bool noisy_cable:1; /* Byte 15 Bit 3 */
559 bool fast_sync_neg:1; /* Byte 15 Bit 4 */
560 bool reset_enabled:1; /* Byte 15 Bit 5 */
561 bool:1; /* Byte 15 Bit 6 */
562 bool active_negation:1; /* Byte 15 Bit 7 */
563 unsigned char bus_on_delay; /* Byte 16 */
564 unsigned char bus_off_delay; /* Byte 17 */
565 bool bios_enabled:1; /* Byte 18 Bit 0 */
566 bool int19_redir_enabled:1; /* Byte 18 Bit 1 */
567 bool ext_trans_enable:1; /* Byte 18 Bit 2 */
568 bool removable_as_fixed:1; /* Byte 18 Bit 3 */
569 bool:1; /* Byte 18 Bit 4 */
570 bool morethan2_drives:1; /* Byte 18 Bit 5 */
571 bool bios_int:1; /* Byte 18 Bit 6 */
572 bool floptical:1; /* Byte 19 Bit 7 */
573 unsigned short dev_enabled; /* Bytes 19-20 */
574 unsigned short wide_ok; /* Bytes 21-22 */
575 unsigned short fast_ok; /* Bytes 23-24 */
576 unsigned short sync_ok; /* Bytes 25-26 */
577 unsigned short discon_ok; /* Bytes 27-28 */
578 unsigned short send_start_unit; /* Bytes 29-30 */
579 unsigned short ignore_bios_scan; /* Bytes 31-32 */
580 unsigned char pci_int_pin:2; /* Byte 33 Bits 0-1 */
581 unsigned char adapter_ioport:2; /* Byte 33 Bits 2-3 */
582 bool strict_rr_enabled:1; /* Byte 33 Bit 4 */
583 bool vesabus_33mhzplus:1; /* Byte 33 Bit 5 */
584 bool vesa_burst_write:1; /* Byte 33 Bit 6 */
585 bool vesa_burst_read:1; /* Byte 33 Bit 7 */
586 unsigned short ultra_ok; /* Bytes 34-35 */
587 unsigned int:32; /* Bytes 36-39 */
588 unsigned char:8; /* Byte 40 */
589 unsigned char autoscsi_maxlun; /* Byte 41 */
590 bool:1; /* Byte 42 Bit 0 */
591 bool scam_dominant:1; /* Byte 42 Bit 1 */
592 bool scam_enabled:1; /* Byte 42 Bit 2 */
593 bool scam_lev2:1; /* Byte 42 Bit 3 */
594 unsigned char:4; /* Byte 42 Bits 4-7 */
595 bool int13_exten:1; /* Byte 43 Bit 0 */
596 bool:1; /* Byte 43 Bit 1 */
597 bool cd_boot:1; /* Byte 43 Bit 2 */
598 unsigned char:5; /* Byte 43 Bits 3-7 */
599 unsigned char boot_id:4; /* Byte 44 Bits 0-3 */
600 unsigned char boot_ch:4; /* Byte 44 Bits 4-7 */
601 unsigned char force_scan_order:1; /* Byte 45 Bit 0 */
602 unsigned char:7; /* Byte 45 Bits 1-7 */
603 unsigned short nontagged_to_alt_ok; /* Bytes 46-47 */
604 unsigned short reneg_sync_on_check; /* Bytes 48-49 */
605 unsigned char rsvd[10]; /* Bytes 50-59 */
606 unsigned char manuf_diag[2]; /* Bytes 60-61 */
607 unsigned short cksum; /* Bytes 62-63 */
611 Define the Host Adapter Local RAM Auto SCSI Byte 45 structure.
616 unsigned char:7; /* Bits 1-7 */
620 Define the Host Adapter Local RAM BIOS Drive Map Byte structure.
627 unsigned char:2; /* Bits 1-2 */
628 enum blogic_bios_diskgeometry diskgeom:2; /* Bits 3-4 */
629 unsigned char tgt_id:3; /* Bits 5-7 */
655 only uses codes 0 - 4. The FlashPoint SCCB Manager has no mailboxes, so
690 BLOGIC_NOTX = 3
746 BLOGIC_RSVDTAG = 3
762 u32 segbytes; /* Bytes 0-3 */
763 u32 segdata; /* Bytes 4-7 */
774 BLOGIC_CCB_RESET = 3
784 CCBs only in having the TagEnable and QueueTag fields moved from byte 17 to
785 byte 1, and the Logical Unit field in byte 17 expanded to 6 bits. In theory,
788 the SCSI-2 specification defines Bit 5 as LUNTAR. Extended LUN Format CCBs
801 enum blogic_ccb_opcode opcode; /* Byte 0 */
802 unsigned char:3; /* Byte 1 Bits 0-2 */
803 enum blogic_datadir datadir:2; /* Byte 1 Bits 3-4 */
804 bool tag_enable:1; /* Byte 1 Bit 5 */
805 enum blogic_queuetag queuetag:2; /* Byte 1 Bits 6-7 */
806 unsigned char cdblen; /* Byte 2 */
807 unsigned char sense_datalen; /* Byte 3 */
808 u32 datalen; /* Bytes 4-7 */
809 u32 data; /* Bytes 8-11 */
810 unsigned char:8; /* Byte 12 */
811 unsigned char:8; /* Byte 13 */
812 enum blogic_adapter_status adapter_status; /* Byte 14 */
813 enum blogic_tgt_status tgt_status; /* Byte 15 */
814 unsigned char tgt_id; /* Byte 16 */
815 unsigned char lun:5; /* Byte 17 Bits 0-4 */
816 bool legacytag_enable:1; /* Byte 17 Bit 5 */
817 enum blogic_queuetag legacy_tag:2; /* Byte 17 Bits 6-7 */
818 unsigned char cdb[BLOGIC_CDB_MAXLEN]; /* Bytes 18-29 */
819 unsigned char:8; /* Byte 30 */
820 unsigned char:8; /* Byte 31 */
821 u32 rsvd_int; /* Bytes 32-35 */
822 u32 sensedata; /* Bytes 36-39 */
826 void (*callback) (struct blogic_ccb *); /* Bytes 40-43 */
827 u32 base_addr; /* Bytes 44-47 */
828 enum blogic_cmplt_code comp_code; /* Byte 48 */
830 unsigned char:8; /* Byte 49 */
831 u16 os_flags; /* Bytes 50-51 */
832 unsigned char private[24]; /* Bytes 52-99 */
857 u32 ccb; /* Bytes 0-3 */
858 u32:24; /* Bytes 4-6 */
859 enum blogic_action action; /* Byte 7 */
867 u32 ccb; /* Bytes 0-3 */
868 enum blogic_adapter_status adapter_status; /* Byte 4 */
869 enum blogic_tgt_status tgt_status; /* Byte 5 */
870 unsigned char:8; /* Byte 6 */
871 enum blogic_cmplt_code comp_code; /* Byte 7 */
941 u32 base_addr; /* Bytes 0-3 */
942 bool present; /* Byte 4 */
943 unsigned char irq_ch; /* Byte 5 */
944 unsigned char scsi_id; /* Byte 6 */
945 unsigned char scsi_lun; /* Byte 7 */
946 u16 fw_rev; /* Bytes 8-9 */
947 u16 sync_ok; /* Bytes 10-11 */
948 u16 fast_ok; /* Bytes 12-13 */
949 u16 ultra_ok; /* Bytes 14-15 */
950 u16 discon_ok; /* Bytes 16-17 */
951 u16 wide_ok; /* Bytes 18-19 */
952 bool parity:1; /* Byte 20 Bit 0 */
953 bool wide:1; /* Byte 20 Bit 1 */
954 bool softreset:1; /* Byte 20 Bit 2 */
955 bool ext_trans_enable:1; /* Byte 20 Bit 3 */
956 bool low_term:1; /* Byte 20 Bit 4 */
957 bool high_term:1; /* Byte 20 Bit 5 */
958 bool report_underrun:1; /* Byte 20 Bit 6 */
959 bool scam_enabled:1; /* Byte 20 Bit 7 */
960 bool scam_lev2:1; /* Byte 21 Bit 0 */
961 unsigned char:7; /* Byte 21 Bits 1-7 */
962 unsigned char family; /* Byte 22 */
963 unsigned char bus_type; /* Byte 23 */
964 unsigned char model[3]; /* Bytes 24-26 */
965 unsigned char relative_cardnum; /* Byte 27 */
966 unsigned char rsvd[4]; /* Bytes 28-31 */
967 u32 os_rsvd; /* Bytes 32-35 */
968 unsigned char translation_info[4]; /* Bytes 36-39 */
969 u32 rsvd2[5]; /* Bytes 40-59 */
970 u32 sec_range; /* Bytes 60-63 */
1085 unsigned char devtype:5; /* Byte 0 Bits 0-4 */
1086 unsigned char dev_qual:3; /* Byte 0 Bits 5-7 */
1087 unsigned char dev_modifier:7; /* Byte 1 Bits 0-6 */
1088 bool rmb:1; /* Byte 1 Bit 7 */
1089 unsigned char ansi_ver:3; /* Byte 2 Bits 0-2 */
1090 unsigned char ecma_ver:3; /* Byte 2 Bits 3-5 */
1091 unsigned char iso_ver:2; /* Byte 2 Bits 6-7 */
1092 unsigned char resp_fmt:4; /* Byte 3 Bits 0-3 */
1093 unsigned char:2; /* Byte 3 Bits 4-5 */
1094 bool TrmIOP:1; /* Byte 3 Bit 6 */
1095 bool AENC:1; /* Byte 3 Bit 7 */
1096 unsigned char addl_len; /* Byte 4 */
1097 unsigned char:8; /* Byte 5 */
1098 unsigned char:8; /* Byte 6 */
1099 bool SftRe:1; /* Byte 7 Bit 0 */
1100 bool CmdQue:1; /* Byte 7 Bit 1 */
1101 bool:1; /* Byte 7 Bit 2 */
1102 bool linked:1; /* Byte 7 Bit 3 */
1103 bool sync:1; /* Byte 7 Bit 4 */
1104 bool WBus16:1; /* Byte 7 Bit 5 */
1105 bool WBus32:1; /* Byte 7 Bit 6 */
1106 bool RelAdr:1; /* Byte 7 Bit 7 */
1107 unsigned char vendor[8]; /* Bytes 8-15 */
1108 unsigned char product[16]; /* Bytes 16-31 */
1109 unsigned char product_rev[4]; /* Bytes 32-35 */
1123 outb(cr.all, adapter->io_addr + BLOGIC_CNTRL_REG); in blogic_busreset()
1131 outb(cr.all, adapter->io_addr + BLOGIC_CNTRL_REG); in blogic_intreset()
1139 outb(cr.all, adapter->io_addr + BLOGIC_CNTRL_REG); in blogic_softreset()
1147 outb(cr.all, adapter->io_addr + BLOGIC_CNTRL_REG); in blogic_hardreset()
1152 return inb(adapter->io_addr + BLOGIC_STATUS_REG); in blogic_rdstatus()
1158 outb(value, adapter->io_addr + BLOGIC_CMD_PARM_REG); in blogic_setcmdparam()
1163 return inb(adapter->io_addr + BLOGIC_DATAIN_REG); in blogic_rddatain()
1168 return inb(adapter->io_addr + BLOGIC_INT_REG); in blogic_rdint()
1173 return inb(adapter->io_addr + BLOGIC_GEOMETRY_REG); in blogic_rdgeom()
1219 blogic_addcount increments Byte Counter by Amount.
1225 bytecount->units += amount; in blogic_addcount()
1226 if (bytecount->units > 999999999) { in blogic_addcount()
1227 bytecount->units -= 1000000000; in blogic_addcount()
1228 bytecount->billions++; in blogic_addcount()
1244 index = (amount < 4 * 1024 ? 2 : 3); in blogic_incszbucket()