drivers/scsi/qlogicfas408.h

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

File Facts

System
Linux kernel
Corpus path
drivers/scsi/qlogicfas408.h
Extension
.h
Size
4687 bytes
Lines
121
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 qlogicfas408_priv {
	int qbase;		/* Port */
	int qinitid;		/* initiator ID */
	int qabort;		/* Flag to cause an abort */
	int qlirq;		/* IRQ being used */
	int int_type;		/* type of irq, 2 for ISA board, 0 for PCMCIA */
	char qinfo[80];		/* description */
	struct scsi_cmnd *qlcmd;	/* current command being processed */
	struct Scsi_Host *shost;	/* pointer back to host */
	struct qlogicfas408_priv *next; /* next private struct */
};

/* The qlogic card uses two register maps - These macros select which one */
#define REG0 ( outb( inb( qbase + 0xd ) & 0x7f , qbase + 0xd ), outb( 4 , qbase + 0xd ))
#define REG1 ( outb( inb( qbase + 0xd ) | 0x80 , qbase + 0xd ), outb( 0xb4 | int_type, qbase + 0xd ))

/* following is watchdog timeout in microseconds */
#define WATCHDOG 5000000

/*----------------------------------------------------------------*/
/* the following will set the monitor border color (useful to find
   where something crashed or gets stuck at and as a simple profiler) */

#define rtrc(i) {}

#define get_priv_by_cmd(x) (struct qlogicfas408_priv *)&((x)->device->host->hostdata[0])
#define get_priv_by_host(x) (struct qlogicfas408_priv *)&((x)->hostdata[0])

irqreturn_t qlogicfas408_ihandl(int irq, void *dev_id);
enum scsi_qc_status qlogicfas408_queuecommand(struct Scsi_Host *h,
					      struct scsi_cmnd *cmd);
int qlogicfas408_biosparam(struct scsi_device * disk,
			   struct gendisk *unused,
			   sector_t capacity, int ip[]);
int qlogicfas408_abort(struct scsi_cmnd * cmd);
extern int qlogicfas408_host_reset(struct scsi_cmnd *cmd);
const char *qlogicfas408_info(struct Scsi_Host *host);
int qlogicfas408_get_chip_type(int qbase, int int_type);
void qlogicfas408_setup(int qbase, int id, int int_type);
int qlogicfas408_detect(int qbase, int int_type);
void qlogicfas408_disable_ints(struct qlogicfas408_priv *priv);
#endif	/* __QLOGICFAS408_H */

Annotation

Implementation Notes