drivers/scsi/pm8001/pm8001_sas.h
Source file repositories/reference/linux-study-clean/drivers/scsi/pm8001/pm8001_sas.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/pm8001/pm8001_sas.h- Extension
.h- Size
- 25935 bytes
- Lines
- 809
- 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.
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/module.hlinux/spinlock.hlinux/delay.hlinux/types.hlinux/ctype.hlinux/dma-mapping.hlinux/pci.hlinux/interrupt.hlinux/workqueue.hscsi/libsas.hscsi/scsi_tcq.hscsi/sas_ata.hlinux/atomic.hlinux/blk-mq.hpm8001_defs.h
Detected Declarations
struct pm8001_hba_infostruct pm8001_ccb_infostruct pm8001_devicestruct pm8001_ioctl_payloadstruct forensic_datastruct pm8001_dispatchstruct pm8001_chip_infostruct pm8001_portstruct pm8001_phystruct pm8001_devicestruct pm8001_prd_imtstruct pm8001_prdstruct pm8001_ccb_infostruct mpi_memstruct mpi_mem_reqstruct encryptstruct sas_phy_attribute_tablestruct inbound_queue_tablestruct outbound_queue_tablestruct pm8001_hba_memspacestruct isr_paramstruct pm8001_hba_infostruct pm8001_workstruct pm8001_fw_image_headerstruct fw_flash_updata_infostruct fw_control_infostruct fw_control_exenum fatal_error_reporterfunction pm8001_ccb_allocfunction pm8001_ccb_freefunction pm8001_ccb_task_free_done
Annotated Snippet
struct pm8001_ioctl_payload {
u32 signature;
u16 major_function;
u16 minor_function;
u16 status;
u16 offset;
u16 id;
u32 wr_length;
u32 rd_length;
u8 *func_specific;
};
#define MPI_FATAL_ERROR_TABLE_OFFSET_MASK 0xFFFFFF
#define MPI_FATAL_ERROR_TABLE_SIZE(value) ((0xFF000000 & value) >> SHIFT24)
#define MPI_FATAL_EDUMP_TABLE_LO_OFFSET 0x00 /* HNFBUFL */
#define MPI_FATAL_EDUMP_TABLE_HI_OFFSET 0x04 /* HNFBUFH */
#define MPI_FATAL_EDUMP_TABLE_LENGTH 0x08 /* HNFBLEN */
#define MPI_FATAL_EDUMP_TABLE_HANDSHAKE 0x0C /* FDDHSHK */
#define MPI_FATAL_EDUMP_TABLE_STATUS 0x10 /* FDDTSTAT */
#define MPI_FATAL_EDUMP_TABLE_ACCUM_LEN 0x14 /* ACCDDLEN */
#define MPI_FATAL_EDUMP_TABLE_TOTAL_LEN 0x18 /* TOTALLEN */
#define MPI_FATAL_EDUMP_TABLE_SIGNATURE 0x1C /* SIGNITURE */
#define MPI_FATAL_EDUMP_HANDSHAKE_RDY 0x1
#define MPI_FATAL_EDUMP_HANDSHAKE_BUSY 0x0
#define MPI_FATAL_EDUMP_TABLE_STAT_RSVD 0x0
#define MPI_FATAL_EDUMP_TABLE_STAT_DMA_FAILED 0x1
#define MPI_FATAL_EDUMP_TABLE_STAT_NF_SUCCESS_MORE_DATA 0x2
#define MPI_FATAL_EDUMP_TABLE_STAT_NF_SUCCESS_DONE 0x3
#define TYPE_GSM_SPACE 1
#define TYPE_QUEUE 2
#define TYPE_FATAL 3
#define TYPE_NON_FATAL 4
#define TYPE_INBOUND 1
#define TYPE_OUTBOUND 2
struct forensic_data {
u32 data_type;
union {
struct {
u32 direct_len;
u32 direct_offset;
void *direct_data;
} gsm_buf;
struct {
u16 queue_type;
u16 queue_index;
u32 direct_len;
void *direct_data;
} queue_buf;
struct {
u32 direct_len;
u32 direct_offset;
u32 read_len;
void *direct_data;
} data_buf;
};
};
/* bit31-26 - mask bar */
#define SCRATCH_PAD0_BAR_MASK 0xFC000000
/* bit25-0 - offset mask */
#define SCRATCH_PAD0_OFFSET_MASK 0x03FFFFFF
/* if AAP error state */
#define SCRATCH_PAD0_AAPERR_MASK 0xFFFFFFFF
/* Inbound doorbell bit7 */
#define SPCv_MSGU_CFG_TABLE_NONFATAL_DUMP 0x80
/* Inbound doorbell bit7 SPCV */
#define SPCV_MSGU_CFG_TABLE_TRANSFER_DEBUG_INFO 0x80
#define MAIN_MERRDCTO_MERRDCES 0xA0/* DWORD 0x28) */
/**
* enum fatal_error_reporter: Indicates the originator of the fatal error
*/
enum fatal_error_reporter {
REPORTER_DRIVER,
REPORTER_FIRMWARE,
};
struct pm8001_dispatch {
char *name;
int (*chip_init)(struct pm8001_hba_info *pm8001_ha);
void (*chip_post_init)(struct pm8001_hba_info *pm8001_ha);
int (*chip_soft_rst)(struct pm8001_hba_info *pm8001_ha);
void (*chip_rst)(struct pm8001_hba_info *pm8001_ha);
int (*chip_ioremap)(struct pm8001_hba_info *pm8001_ha);
void (*chip_iounmap)(struct pm8001_hba_info *pm8001_ha);
irqreturn_t (*isr)(struct pm8001_hba_info *pm8001_ha, u8 vec);
u32 (*is_our_interrupt)(struct pm8001_hba_info *pm8001_ha);
int (*isr_process_oq)(struct pm8001_hba_info *pm8001_ha, u8 vec);
void (*interrupt_enable)(struct pm8001_hba_info *pm8001_ha, u8 vec);
void (*interrupt_disable)(struct pm8001_hba_info *pm8001_ha, u8 vec);
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/module.h`, `linux/spinlock.h`, `linux/delay.h`, `linux/types.h`, `linux/ctype.h`, `linux/dma-mapping.h`, `linux/pci.h`.
- Detected declarations: `struct pm8001_hba_info`, `struct pm8001_ccb_info`, `struct pm8001_device`, `struct pm8001_ioctl_payload`, `struct forensic_data`, `struct pm8001_dispatch`, `struct pm8001_chip_info`, `struct pm8001_port`, `struct pm8001_phy`, `struct pm8001_device`.
- Atlas domain: Driver Families / drivers/scsi.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.