drivers/scsi/BusLogic.h

Source file repositories/reference/linux-study-clean/drivers/scsi/BusLogic.h

File Facts

System
Linux kernel
Corpus path
drivers/scsi/BusLogic.h
Extension
.h
Size
34306 bytes
Lines
1287
Domain
Driver Families
Bucket
drivers/scsi
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

struct blogic_byte_count {
	unsigned int units;
	unsigned int billions;
};


/*
  Define the structure for I/O Address and Bus Probing Information.
*/

struct blogic_probeinfo {
	enum blogic_adapter_type adapter_type;
	enum blogic_adapter_bus_type adapter_bus_type;
	unsigned long io_addr;
	unsigned long pci_addr;
	struct pci_dev *pci_device;
	unsigned char bus;
	unsigned char dev;
	unsigned char irq_ch;
};

/*
  Define the Probe Options.
*/

struct blogic_probe_options {
	bool noprobe:1;			/* Bit 0 */
	bool noprobe_pci:1;		/* Bit 2 */
	bool nosort_pci:1;		/* Bit 3 */
	bool multimaster_first:1;	/* Bit 4 */
	bool flashpoint_first:1;	/* Bit 5 */
};

/*
  Define the Global Options.
*/

struct blogic_global_options {
	bool trace_probe:1;	/* Bit 0 */
	bool trace_hw_reset:1;	/* Bit 1 */
	bool trace_config:1;	/* Bit 2 */
	bool trace_err:1;	/* Bit 3 */
};

/*
  Define the BusLogic SCSI Host Adapter I/O Register Offsets.
*/

#define BLOGIC_CNTRL_REG	0	/* WO register */
#define BLOGIC_STATUS_REG	0	/* RO register */
#define BLOGIC_CMD_PARM_REG	1	/* WO register */
#define BLOGIC_DATAIN_REG	1	/* RO register */
#define BLOGIC_INT_REG		2	/* RO register */
#define BLOGIC_GEOMETRY_REG	3	/* RO register */

/*
  Define the structure of the write-only Control Register.
*/

union blogic_cntrl_reg {
	unsigned char all;
	struct {
		unsigned char:4;	/* Bits 0-3 */
		bool bus_reset:1;	/* Bit 4 */
		bool int_reset:1;	/* Bit 5 */
		bool soft_reset:1;	/* Bit 6 */
		bool hard_reset:1;	/* Bit 7 */
	} cr;
};

/*
  Define the structure of the read-only Status Register.
*/

union blogic_stat_reg {
	unsigned char all;
	struct {
		bool cmd_invalid:1;	/* Bit 0 */
		bool rsvd:1;		/* Bit 1 */
		bool datain_ready:1;	/* Bit 2 */
		bool cmd_param_busy:1;	/* Bit 3 */
		bool adapter_ready:1;	/* Bit 4 */
		bool init_reqd:1;	/* Bit 5 */
		bool diag_failed:1;	/* Bit 6 */
		bool diag_active:1;	/* Bit 7 */
	} sr;
};

/*
  Define the structure of the read-only Interrupt Register.

Annotation

Implementation Notes