drivers/scsi/csiostor/csio_scsi.h

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

File Facts

System
Linux kernel
Corpus path
drivers/scsi/csiostor/csio_scsi.h
Extension
.h
Size
10735 bytes
Lines
353
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 csio_scsi_stats {
	uint64_t		n_tot_success;	/* Total number of good I/Os */
	uint32_t		n_rn_nr_error;	/* No. of remote-node-not-
						 * ready errors
						 */
	uint32_t		n_hw_nr_error;	/* No. of hw-module-not-
						 * ready errors
						 */
	uint32_t		n_dmamap_error;	/* No. of DMA map erros */
	uint32_t		n_unsupp_sge_error; /* No. of too-many-SGes
						     * errors.
						     */
	uint32_t		n_no_req_error;	/* No. of Out-of-ioreqs error */
	uint32_t		n_busy_error;	/* No. of -EBUSY errors */
	uint32_t		n_hosterror;	/* No. of FW_HOSTERROR I/O */
	uint32_t		n_rsperror;	/* No. of response errors */
	uint32_t		n_autosense;	/* No. of auto sense replies */
	uint32_t		n_ovflerror;	/* No. of overflow errors */
	uint32_t		n_unflerror;	/* No. of underflow errors */
	uint32_t		n_rdev_nr_error;/* No. of rdev not
						 * ready errors
						 */
	uint32_t		n_rdev_lost_error;/* No. of rdev lost errors */
	uint32_t		n_rdev_logo_error;/* No. of rdev logo errors */
	uint32_t		n_link_down_error;/* No. of link down errors */
	uint32_t		n_no_xchg_error; /* No. no exchange error */
	uint32_t		n_unknown_error;/* No. of unhandled errors */
	uint32_t		n_aborted;	/* No. of aborted I/Os */
	uint32_t		n_abrt_timedout; /* No. of abort timedouts */
	uint32_t		n_abrt_fail;	/* No. of abort failures */
	uint32_t		n_abrt_dups;	/* No. of duplicate aborts */
	uint32_t		n_abrt_race_comp; /* No. of aborts that raced
						   * with completions.
						   */
	uint32_t		n_abrt_busy_error;/* No. of abort failures
						   * due to -EBUSY.
						   */
	uint32_t		n_closed;	/* No. of closed I/Os */
	uint32_t		n_cls_busy_error; /* No. of close failures
						   * due to -EBUSY.
						   */
	uint32_t		n_active;	/* No. of IOs in active_q */
	uint32_t		n_tm_active;	/* No. of TMs in active_q */
	uint32_t		n_wcbfn;	/* No. of I/Os in worker
						 * cbfn q
						 */
	uint32_t		n_free_ioreq;	/* No. of freelist entries */
	uint32_t		n_free_ddp;	/* No. of DDP freelist */
	uint32_t		n_unaligned;	/* No. of Unaligned SGls */
	uint32_t		n_inval_cplop;	/* No. invalid CPL op's in IQ */
	uint32_t		n_inval_scsiop;	/* No. invalid scsi op's in IQ*/
};

struct csio_scsim {
	struct csio_hw		*hw;		/* Pointer to HW moduel */
	uint8_t			max_sge;	/* Max SGE */
	uint8_t			proto_cmd_len;	/* Proto specific SCSI
						 * cmd length
						 */
	uint16_t		proto_rsp_len;	/* Proto specific SCSI
						 * response length
						 */
	spinlock_t		freelist_lock;	/* Lock for ioreq freelist */
	struct list_head	active_q;	/* Outstanding SCSI I/Os */
	struct list_head	ioreq_freelist;	/* Free list of ioreq's */
	struct list_head	ddp_freelist;	/* DDP descriptor freelist */
	struct csio_scsi_stats	stats;		/* This module's statistics */
};

/* State machine defines */
enum csio_scsi_ev {
	CSIO_SCSIE_START_IO = 1,		/* Start a regular SCSI IO */
	CSIO_SCSIE_START_TM,			/* Start a TM IO */
	CSIO_SCSIE_COMPLETED,			/* IO Completed */
	CSIO_SCSIE_ABORT,			/* Abort IO */
	CSIO_SCSIE_ABORTED,			/* IO Aborted */
	CSIO_SCSIE_CLOSE,			/* Close exchange */
	CSIO_SCSIE_CLOSED,			/* Exchange closed */
	CSIO_SCSIE_DRVCLEANUP,			/* Driver wants to manually
						 * cleanup this I/O.
						 */
};

enum csio_scsi_lev {
	CSIO_LEV_ALL = 1,
	CSIO_LEV_LNODE,
	CSIO_LEV_RNODE,
	CSIO_LEV_LUN,
};

Annotation

Implementation Notes