drivers/scsi/bnx2fc/bnx2fc_fcoe.c
Source file repositories/reference/linux-study-clean/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/bnx2fc/bnx2fc_fcoe.c- Extension
.c- Size
- 78116 bytes
- Lines
- 2990
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
bnx2fc.hlinux/ethtool.hnet/netdev_lock.h
Detected Declarations
enum bnx2fc_create_link_statefunction bnx2fc_fcf_get_vlan_idfunction bnx2fc_clean_rx_queuefunction bnx2fc_get_paged_crc_eoffunction bnx2fc_abort_iofunction bnx2fc_xmit_l2_framefunction bnx2fc_xmitfunction bnx2fc_rcvfunction bnx2fc_l2_rcv_threadfunction bnx2fc_recv_framefunction bnx2fc_percpu_io_threadfunction list_for_each_entry_safefunction bnx2fc_shost_configfunction bnx2fc_link_okfunction bnx2fc_get_link_statefunction bnx2fc_net_configfunction bnx2fc_destroy_timerfunction bnx2fc_indicate_neteventfunction list_for_each_entry_safefunction bnx2fc_libfc_configfunction bnx2fc_em_configfunction bnx2fc_lport_configfunction bnx2fc_fip_recvfunction bnx2fc_update_src_macfunction bnx2fc_fip_sendfunction bnx2fc_vport_createfunction bnx2fc_free_vportfunction bnx2fc_vport_destroyfunction bnx2fc_vport_disablefunction bnx2fc_interface_setupfunction bnx2fc_attach_transportfunction bnx2fc_release_transportfunction bnx2fc_interface_releasefunction bnx2fc_interface_getfunction bnx2fc_interface_putfunction bnx2fc_hba_destroyfunction bnx2fc_interface_createfunction bnx2fc_net_cleanupfunction bnx2fc_interface_cleanupfunction bnx2fc_if_destroyfunction __bnx2fc_destroyfunction bnx2fc_destroyfunction bnx2fc_port_destroyfunction bnx2fc_unbind_adapter_devicesfunction bnx2fc_bind_adapter_devicesfunction bnx2fc_bind_pcidevfunction bnx2fc_unbind_pcidevfunction bnx2fc_ulp_get_stats
Annotated Snippet
module_init(bnx2fc_mod_init);
module_exit(bnx2fc_mod_exit);
static struct fcoe_sysfs_function_template bnx2fc_fcoe_sysfs_templ = {
.set_fcoe_ctlr_enabled = bnx2fc_ctlr_enabled,
.get_fcoe_ctlr_link_fail = fcoe_ctlr_get_lesb,
.get_fcoe_ctlr_vlink_fail = fcoe_ctlr_get_lesb,
.get_fcoe_ctlr_miss_fka = fcoe_ctlr_get_lesb,
.get_fcoe_ctlr_symb_err = fcoe_ctlr_get_lesb,
.get_fcoe_ctlr_err_block = fcoe_ctlr_get_lesb,
.get_fcoe_ctlr_fcs_error = fcoe_ctlr_get_lesb,
.get_fcoe_fcf_selected = fcoe_fcf_get_selected,
.get_fcoe_fcf_vlan_id = bnx2fc_fcf_get_vlan_id,
};
static struct fc_function_template bnx2fc_transport_function = {
.show_host_node_name = 1,
.show_host_port_name = 1,
.show_host_supported_classes = 1,
.show_host_supported_fc4s = 1,
.show_host_active_fc4s = 1,
.show_host_maxframe_size = 1,
.show_host_port_id = 1,
.show_host_supported_speeds = 1,
.get_host_speed = fc_get_host_speed,
.show_host_speed = 1,
.show_host_port_type = 1,
.get_host_port_state = fc_get_host_port_state,
.show_host_port_state = 1,
.show_host_symbolic_name = 1,
.dd_fcrport_size = (sizeof(struct fc_rport_libfc_priv) +
sizeof(struct bnx2fc_rport)),
.show_rport_maxframe_size = 1,
.show_rport_supported_classes = 1,
.show_host_fabric_name = 1,
.show_starget_node_name = 1,
.show_starget_port_name = 1,
.show_starget_port_id = 1,
.set_rport_dev_loss_tmo = fc_set_rport_loss_tmo,
.show_rport_dev_loss_tmo = 1,
.get_fc_host_stats = bnx2fc_get_host_stats,
.issue_fc_host_lip = bnx2fc_fcoe_reset,
.terminate_rport_io = bnx2fc_rport_terminate_io,
.vport_create = bnx2fc_vport_create,
.vport_delete = bnx2fc_vport_destroy,
.vport_disable = bnx2fc_vport_disable,
.bsg_request = fc_lport_bsg_request,
};
static struct fc_function_template bnx2fc_vport_xport_function = {
.show_host_node_name = 1,
.show_host_port_name = 1,
.show_host_supported_classes = 1,
.show_host_supported_fc4s = 1,
.show_host_active_fc4s = 1,
.show_host_maxframe_size = 1,
.show_host_port_id = 1,
.show_host_supported_speeds = 1,
.get_host_speed = fc_get_host_speed,
.show_host_speed = 1,
.show_host_port_type = 1,
.get_host_port_state = fc_get_host_port_state,
.show_host_port_state = 1,
.show_host_symbolic_name = 1,
.dd_fcrport_size = (sizeof(struct fc_rport_libfc_priv) +
sizeof(struct bnx2fc_rport)),
.show_rport_maxframe_size = 1,
.show_rport_supported_classes = 1,
.show_host_fabric_name = 1,
.show_starget_node_name = 1,
.show_starget_port_name = 1,
.show_starget_port_id = 1,
.set_rport_dev_loss_tmo = fc_set_rport_loss_tmo,
.show_rport_dev_loss_tmo = 1,
.get_fc_host_stats = fc_get_host_stats,
.issue_fc_host_lip = bnx2fc_fcoe_reset,
.terminate_rport_io = fc_rport_terminate_io,
.bsg_request = fc_lport_bsg_request,
};
Annotation
- Immediate include surface: `bnx2fc.h`, `linux/ethtool.h`, `net/netdev_lock.h`.
- Detected declarations: `enum bnx2fc_create_link_state`, `function bnx2fc_fcf_get_vlan_id`, `function bnx2fc_clean_rx_queue`, `function bnx2fc_get_paged_crc_eof`, `function bnx2fc_abort_io`, `function bnx2fc_xmit_l2_frame`, `function bnx2fc_xmit`, `function bnx2fc_rcv`, `function bnx2fc_l2_rcv_thread`, `function bnx2fc_recv_frame`.
- 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.
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.