drivers/scsi/bfa/bfad_im.h
Source file repositories/reference/linux-study-clean/drivers/scsi/bfa/bfad_im.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/bfa/bfad_im.h- Extension
.h- Size
- 5633 bytes
- Lines
- 201
- Domain
- Driver Families
- Bucket
- drivers/scsi
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- 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
bfa_fcs.h
Detected Declarations
struct bfad_cmd_privstruct bfad_itnim_data_sstruct bfad_im_port_sstruct bfad_im_port_pointerstruct bfad_itnim_sstruct bfad_fcp_bindingstruct bfad_im_senum bfad_itnim_stateenum bfad_binding_typefunction bfad_im_post_vendor_event
Annotated Snippet
struct bfad_cmd_priv {
unsigned long status;
wait_queue_head_t *wq;
};
static inline struct bfad_cmd_priv *bfad_priv(struct scsi_cmnd *cmd)
{
return scsi_cmd_priv(cmd);
}
struct bfad_itnim_data_s {
struct bfad_itnim_s *itnim;
};
struct bfad_im_port_s {
struct bfad_s *bfad;
struct bfad_port_s *port;
struct work_struct port_delete_work;
int idr_id;
u16 cur_scsi_id;
u16 flags;
struct list_head binding_list;
struct Scsi_Host *shost;
struct list_head itnim_mapped_list;
struct fc_vport *fc_vport;
};
struct bfad_im_port_pointer {
struct bfad_im_port_s *p;
};
static inline struct bfad_im_port_s *bfad_get_im_port(struct Scsi_Host *host)
{
struct bfad_im_port_pointer *im_portp = shost_priv(host);
return im_portp->p;
}
enum bfad_itnim_state {
ITNIM_STATE_NONE,
ITNIM_STATE_ONLINE,
ITNIM_STATE_OFFLINE_PENDING,
ITNIM_STATE_OFFLINE,
ITNIM_STATE_TIMEOUT,
ITNIM_STATE_FREE,
};
/*
* Per itnim data structure
*/
struct bfad_itnim_s {
struct list_head list_entry;
struct bfa_fcs_itnim_s fcs_itnim;
struct work_struct itnim_work;
u32 flags;
enum bfad_itnim_state state;
struct bfad_im_s *im;
struct bfad_im_port_s *im_port;
struct bfad_rport_s *drv_rport;
struct fc_rport *fc_rport;
struct bfa_itnim_s *bfa_itnim;
u16 scsi_tgt_id;
u16 channel;
u16 queue_work;
unsigned long last_ramp_up_time;
unsigned long last_queue_full_time;
};
enum bfad_binding_type {
FCP_PWWN_BINDING = 0x1,
FCP_NWWN_BINDING = 0x2,
FCP_FCID_BINDING = 0x3,
};
struct bfad_fcp_binding {
struct list_head list_entry;
enum bfad_binding_type binding_type;
u16 scsi_target_id;
u32 fc_id;
wwn_t nwwn;
wwn_t pwwn;
};
struct bfad_im_s {
struct bfad_s *bfad;
struct workqueue_struct *drv_workq;
struct work_struct aen_im_notify_work;
};
#define bfad_get_aen_entry(_drv, _entry) do { \
unsigned long _flags; \
Annotation
- Immediate include surface: `bfa_fcs.h`.
- Detected declarations: `struct bfad_cmd_priv`, `struct bfad_itnim_data_s`, `struct bfad_im_port_s`, `struct bfad_im_port_pointer`, `struct bfad_itnim_s`, `struct bfad_fcp_binding`, `struct bfad_im_s`, `enum bfad_itnim_state`, `enum bfad_binding_type`, `function bfad_im_post_vendor_event`.
- Atlas domain: Driver Families / drivers/scsi.
- Implementation status: integration 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.