drivers/scsi/megaraid/megaraid_ioctl.h

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

File Facts

System
Linux kernel
Corpus path
drivers/scsi/megaraid/megaraid_ioctl.h
Extension
.h
Size
8399 bytes
Lines
303
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 uioc_timeout {
	struct timer_list timer;
	uioc_t		  *uioc;
};

/**
 * struct mraid_hba_info - information about the controller
 *
 * @pci_vendor_id		: PCI vendor id
 * @pci_device_id		: PCI device id
 * @subsystem_vendor_id		: PCI subsystem vendor id
 * @subsystem_device_id		: PCI subsystem device id
 * @baseport			: base port of hba memory
 * @pci_bus			: PCI bus
 * @pci_dev_fn			: PCI device/function values
 * @irq				: interrupt vector for the device
 *
 * Extended information of 256 bytes about the controller. Align on the single
 * byte boundary so that 32-bit applications can be run on 64-bit platform
 * drivers withoug re-compilation.
 * NOTE: reduce the number of reserved bytes whenever new field are added, so
 * that total size of the structure remains 256 bytes.
 */
typedef struct mraid_hba_info {

	uint16_t	pci_vendor_id;
	uint16_t	pci_device_id;
	uint16_t	subsys_vendor_id;
	uint16_t	subsys_device_id;

	uint64_t	baseport;
	uint8_t		pci_bus;
	uint8_t		pci_dev_fn;
	uint8_t		pci_slot;
	uint8_t		irq;

	uint32_t	unique_id;
	uint32_t	host_no;

	uint8_t		num_ldrv;
} __attribute__ ((aligned(256), packed)) mraid_hba_info_t;


/**
 * mcontroller	: adapter info structure for old mimd_t apps
 *
 * @base	: base address
 * @irq		: irq number
 * @numldrv	: number of logical drives
 * @pcibus	: pci bus
 * @pcidev	: pci device
 * @pcifun	: pci function
 * @pciid	: pci id
 * @pcivendor	: vendor id
 * @pcislot	: slot number
 * @uid		: unique id
 */
typedef struct mcontroller {

	uint64_t	base;
	uint8_t		irq;
	uint8_t		numldrv;
	uint8_t		pcibus;
	uint16_t	pcidev;
	uint8_t		pcifun;
	uint16_t	pciid;
	uint16_t	pcivendor;
	uint8_t		pcislot;
	uint32_t	uid;

} __attribute__ ((packed)) mcontroller_t;


/**
 * mm_dmapool_t	: Represents one dma pool with just one buffer
 *
 * @vaddr	: Virtual address
 * @paddr	: DMA physicall address
 * @bufsize	: In KB - 4 = 4k, 8 = 8k etc.
 * @handle	: Handle to the dma pool
 * @lock	: lock to synchronize access to the pool
 * @in_use	: If pool already in use, attach new block
 */
typedef struct mm_dmapool {
	caddr_t		vaddr;
	dma_addr_t	paddr;
	uint32_t	buf_size;
	struct dma_pool	*handle;
	spinlock_t	lock;
	uint8_t		in_use;

Annotation

Implementation Notes