drivers/scsi/mpi3mr/mpi/mpi30_init.h

Source file repositories/reference/linux-study-clean/drivers/scsi/mpi3mr/mpi/mpi30_init.h

File Facts

System
Linux kernel
Corpus path
drivers/scsi/mpi3mr/mpi/mpi30_init.h
Extension
.h
Size
7479 bytes
Lines
148
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 mpi3_scsi_io_cdb_eedp32 {
	u8                 cdb[20];
	__be32             primary_reference_tag;
	__le16             primary_application_tag;
	__le16             primary_application_tag_mask;
	__le32             transfer_length;
};

union mpi3_scsi_io_cdb_union {
	u8                         cdb32[32];
	struct mpi3_scsi_io_cdb_eedp32 eedp32;
	struct mpi3_sge_common         sge;
};

struct mpi3_scsi_io_request {
	__le16                     host_tag;
	u8                         ioc_use_only02;
	u8                         function;
	__le16                     ioc_use_only04;
	u8                         ioc_use_only06;
	u8                         msg_flags;
	__le16                     change_count;
	__le16                     dev_handle;
	__le32                     flags;
	__le32                     skip_count;
	__le32                     data_length;
	u8                         lun[8];
	union mpi3_scsi_io_cdb_union  cdb;
	union mpi3_sge_union          sgl[4];
};

#define MPI3_SCSIIO_MSGFLAGS_METASGL_VALID                  (0x80)
#define MPI3_SCSIIO_MSGFLAGS_DIVERT_TO_FIRMWARE             (0x40)
#define MPI3_SCSIIO_FLAGS_LARGE_CDB                         (0x60000000)
#define MPI3_SCSIIO_FLAGS_LARGE_CDB_MASK		    (0x60000000)
#define MPI3_SCSIIO_FLAGS_LARGE_CDB_SHIFT		    (29)
#define MPI3_SCSIIO_FLAGS_IOC_USE_ONLY_27_MASK		    (0x18000000)
#define MPI3_SCSIIO_FLAGS_IOC_USE_ONLY_27_SHIFT		    (27)
#define MPI3_SCSIIO_FLAGS_CDB_16_OR_LESS                    (0x00000000)
#define MPI3_SCSIIO_FLAGS_CDB_GREATER_THAN_16               (0x20000000)
#define MPI3_SCSIIO_FLAGS_CDB_IN_SEPARATE_BUFFER            (0x40000000)
#define MPI3_SCSIIO_FLAGS_TASKATTRIBUTE_MASK                (0x07000000)
#define MPI3_SCSIIO_FLAGS_TASKATTRIBUTE_SHIFT		    (24)
#define MPI3_SCSIIO_FLAGS_DATADIRECTION_MASK		    (0x000c0000)
#define MPI3_SCSIIO_FLAGS_DATADIRECTION_SHIFT               (18)
#define MPI3_SCSIIO_FLAGS_TASKATTRIBUTE_SIMPLEQ             (0x00000000)
#define MPI3_SCSIIO_FLAGS_TASKATTRIBUTE_HEADOFQ             (0x01000000)
#define MPI3_SCSIIO_FLAGS_TASKATTRIBUTE_ORDEREDQ            (0x02000000)
#define MPI3_SCSIIO_FLAGS_TASKATTRIBUTE_ACAQ                (0x04000000)
#define MPI3_SCSIIO_FLAGS_CMDPRI_MASK                       (0x00f00000)
#define MPI3_SCSIIO_FLAGS_CMDPRI_SHIFT                      (20)
#define MPI3_SCSIIO_FLAGS_DATADIRECTION_NO_DATA_TRANSFER    (0x00000000)
#define MPI3_SCSIIO_FLAGS_DATADIRECTION_WRITE               (0x00040000)
#define MPI3_SCSIIO_FLAGS_DATADIRECTION_READ                (0x00080000)
#define MPI3_SCSIIO_FLAGS_DMAOPERATION_MASK                 (0x00030000)
#define MPI3_SCSIIO_FLAGS_DMAOPERATION_SHIFT			(16)
#define MPI3_SCSIIO_FLAGS_DMAOPERATION_HOST_PI              (0x00010000)
#define MPI3_SCSIIO_FLAGS_DIVERT_REASON_MASK                (0x000000f0)
#define MPI3_SCSIIO_FLAGS_DIVERT_REASON_SHIFT			(4)
#define MPI3_SCSIIO_FLAGS_DIVERT_REASON_IO_THROTTLING       (0x00000010)
#define MPI3_SCSIIO_FLAGS_DIVERT_REASON_WRITE_SAME_TOO_LARGE (0x00000020)
#define MPI3_SCSIIO_FLAGS_DIVERT_REASON_PROD_SPECIFIC       (0x00000080)
#define MPI3_SCSIIO_METASGL_INDEX                           (3)
struct mpi3_scsi_io_reply {
	__le16                     host_tag;
	u8                         ioc_use_only02;
	u8                         function;
	__le16                     ioc_use_only04;
	u8                         ioc_use_only06;
	u8                         msg_flags;
	__le16                     ioc_use_only08;
	__le16                     ioc_status;
	__le32                     ioc_log_info;
	u8                         scsi_status;
	u8                         scsi_state;
	__le16                     dev_handle;
	__le32                     transfer_count;
	__le32                     sense_count;
	__le32                     response_data;
	__le16                     task_tag;
	__le16                     scsi_status_qualifier;
	__le32                     eedp_error_offset;
	__le16                     eedp_observed_app_tag;
	__le16                     eedp_observed_guard;
	__le32                     eedp_observed_ref_tag;
	__le64                     sense_data_buffer_address;
};

#define MPI3_SCSIIO_REPLY_MSGFLAGS_REFTAG_OBSERVED_VALID        (0x01)
#define MPI3_SCSIIO_REPLY_MSGFLAGS_APPTAG_OBSERVED_VALID        (0x02)

Annotation

Implementation Notes