drivers/scsi/ibmvscsi/ibmvfc.h
Source file repositories/reference/linux-study-clean/drivers/scsi/ibmvscsi/ibmvfc.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/ibmvscsi/ibmvfc.h- Extension
.h- Size
- 23675 bytes
- Lines
- 957
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/list.hlinux/types.hscsi/viosrp.h
Detected Declarations
struct ibmvfc_mad_commonstruct ibmvfc_npiv_login_madstruct ibmvfc_npiv_logout_madstruct ibmvfc_npiv_loginstruct ibmvfc_common_svc_parmsstruct ibmvfc_service_parmsstruct ibmvfc_npiv_login_respstruct ibmvfc_discover_targets_entrystruct ibmvfc_discover_targetsstruct ibmvfc_port_loginstruct ibmvfc_move_loginstruct ibmvfc_prli_svc_parmsstruct ibmvfc_process_loginstruct ibmvfc_query_tgtstruct ibmvfc_implicit_logoutstruct ibmvfc_tmfstruct ibmvfc_fcp_rsp_infostruct ibmvfc_fcp_rspstruct ibmvfc_fcp_cmd_iustruct ibmvfc_cmdstruct ibmvfc_passthru_fc_iustruct ibmvfc_passthru_iustruct ibmvfc_passthru_madstruct ibmvfc_channel_enquirystruct ibmvfc_channel_setup_madstruct ibmvfc_channel_setupstruct ibmvfc_connection_infostruct ibmvfc_trace_start_entrystruct ibmvfc_trace_end_entrystruct ibmvfc_trace_entrystruct ibmvfc_async_descstruct ibmvfc_crqstruct ibmvfc_sub_crqstruct ibmvfc_async_crqstruct ibmvfc_targetstruct ibmvfc_eventstruct ibmvfc_event_poolstruct ibmvfc_queuestruct ibmvfc_channelsstruct ibmvfc_hostenum ibmvfc_crq_validenum ibmvfc_crq_init_msgenum ibmvfc_crq_xport_evtsenum ibmvfc_cmd_status_flagsenum ibmvfc_fabric_mapped_errorsenum ibmvfc_vios_errorsenum ibmvfc_mad_typesenum ibmvfc_fc_reason
Annotated Snippet
struct ibmvfc_mad_common {
__be32 version;
__be32 reserved;
__be32 opcode;
__be16 status;
__be16 length;
__be64 tag;
} __packed __aligned(8);
struct ibmvfc_npiv_login_mad {
struct ibmvfc_mad_common common;
struct srp_direct_buf buffer;
} __packed __aligned(8);
struct ibmvfc_npiv_logout_mad {
struct ibmvfc_mad_common common;
} __packed __aligned(8);
#define IBMVFC_MAX_NAME 256
struct ibmvfc_npiv_login {
__be32 ostype;
#define IBMVFC_OS_LINUX 0x02
__be32 pad;
__be64 max_dma_len;
__be32 max_payload;
__be32 max_response;
__be32 partition_num;
__be32 vfc_frame_version;
__be16 fcp_version;
__be16 flags;
#define IBMVFC_CLIENT_MIGRATED 0x01
#define IBMVFC_FLUSH_ON_HALT 0x02
__be32 max_cmds;
__be64 capabilities;
#define IBMVFC_CAN_MIGRATE 0x01
#define IBMVFC_CAN_USE_CHANNELS 0x02
#define IBMVFC_CAN_HANDLE_FPIN 0x04
#define IBMVFC_CAN_USE_MAD_VERSION 0x08
#define IBMVFC_CAN_SEND_VF_WWPN 0x10
__be64 node_name;
struct srp_direct_buf async;
u8 partition_name[IBMVFC_MAX_NAME];
u8 device_name[IBMVFC_MAX_NAME];
u8 drc_name[IBMVFC_MAX_NAME];
__be64 reserved2[2];
} __packed __aligned(8);
struct ibmvfc_common_svc_parms {
__be16 fcph_version;
__be16 b2b_credit;
__be16 features;
__be16 bb_rcv_sz; /* upper nibble is BB_SC_N */
__be32 ratov;
__be32 edtov;
} __packed __aligned(4);
struct ibmvfc_service_parms {
struct ibmvfc_common_svc_parms common;
u8 port_name[8];
u8 node_name[8];
__be32 class1_parms[4];
__be32 class2_parms[4];
__be32 class3_parms[4];
__be32 obsolete[4];
__be32 vendor_version[4];
__be32 services_avail[2];
__be32 ext_len;
__be32 reserved[30];
__be32 clk_sync_qos[2];
__be32 reserved2;
} __packed __aligned(4);
struct ibmvfc_npiv_login_resp {
__be32 version;
__be16 status;
__be16 error;
__be32 flags;
#define IBMVFC_NATIVE_FC 0x01
__be32 reserved;
__be64 capabilities;
#define IBMVFC_CAN_FLUSH_ON_HALT 0x08
#define IBMVFC_CAN_SUPPRESS_ABTS 0x10
#define IBMVFC_MAD_VERSION_CAP 0x20
#define IBMVFC_HANDLE_VF_WWPN 0x40
#define IBMVFC_CAN_SUPPORT_CHANNELS 0x80
__be32 max_cmds;
__be32 scsi_id_sz;
__be64 max_dma_len;
__be64 scsi_id;
Annotation
- Immediate include surface: `linux/list.h`, `linux/types.h`, `scsi/viosrp.h`.
- Detected declarations: `struct ibmvfc_mad_common`, `struct ibmvfc_npiv_login_mad`, `struct ibmvfc_npiv_logout_mad`, `struct ibmvfc_npiv_login`, `struct ibmvfc_common_svc_parms`, `struct ibmvfc_service_parms`, `struct ibmvfc_npiv_login_resp`, `struct ibmvfc_discover_targets_entry`, `struct ibmvfc_discover_targets`, `struct ibmvfc_port_login`.
- 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.
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.