drivers/net/ethernet/brocade/bna/bna_tx_rx.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/brocade/bna/bna_tx_rx.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/brocade/bna/bna_tx_rx.c- Extension
.c- Size
- 91594 bytes
- Lines
- 3668
- Domain
- Driver Families
- Bucket
- drivers/net
- 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.
- 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
bna.hbfi.h
Detected Declarations
enum bna_tx_eventfunction Copyrightfunction bna_rxf_sm_stopped_entryfunction bna_rxf_sm_stoppedfunction bna_rxf_sm_cfg_wait_entryfunction bna_rxf_sm_cfg_waitfunction bna_rxf_sm_started_entryfunction bna_rxf_sm_startedfunction bna_rxf_sm_last_resp_wait_entryfunction bna_bfi_ucast_reqfunction bna_bfi_mcast_add_reqfunction bna_bfi_mcast_del_reqfunction bna_bfi_mcast_filter_reqfunction bna_bfi_rx_promisc_reqfunction bna_bfi_rx_vlan_filter_setfunction bna_bfi_vlan_strip_enablefunction bna_bfi_rit_cfgfunction bna_bfi_rss_cfgfunction bna_bfi_rss_enablefunction bna_rxf_mcmac_getfunction bna_rxf_mchandle_getfunction bna_rxf_mchandle_attachfunction bna_rxf_mcast_delfunction bna_rxf_mcast_cfg_applyfunction bna_rxf_vlan_cfg_applyfunction bna_rxf_mcast_cfg_resetfunction bna_rxf_rss_cfg_applyfunction bna_rxf_cfg_applyfunction bna_rxf_cfg_resetfunction bna_rit_initfunction bna_bfi_rxf_cfg_rspfunction bna_bfi_rxf_ucast_set_rspfunction bna_bfi_rxf_mcast_add_rspfunction bna_rxf_initfunction bna_rxf_uninitfunction bna_rx_cb_rxf_startedfunction bna_rxf_startfunction bna_rx_cb_rxf_stoppedfunction bna_rxf_stopfunction bna_rxf_failfunction bna_rx_ucast_setfunction bna_rx_mcast_addfunction bna_mac_findfunction bna_rx_ucast_listsetfunction bna_rx_mcast_listsetfunction bna_rx_mcast_delallfunction bna_rx_vlan_addfunction bna_rx_vlan_del
Annotated Snippet
if (!bna_rxf_cfg_apply(rxf)) {
/* No more pending config updates */
bfa_fsm_set_state(rxf, bna_rxf_sm_started);
}
break;
default:
bfa_sm_fault(event);
}
}
static void
bna_rxf_sm_started_entry(struct bna_rxf *rxf)
{
call_rxf_start_cbfn(rxf);
call_rxf_cam_fltr_cbfn(rxf);
}
static void
bna_rxf_sm_started(struct bna_rxf *rxf, enum bna_rxf_event event)
{
switch (event) {
case RXF_E_STOP:
case RXF_E_FAIL:
bna_rxf_cfg_reset(rxf);
bfa_fsm_set_state(rxf, bna_rxf_sm_stopped);
break;
case RXF_E_CONFIG:
bfa_fsm_set_state(rxf, bna_rxf_sm_cfg_wait);
break;
default:
bfa_sm_fault(event);
}
}
static void
bna_rxf_sm_last_resp_wait_entry(struct bna_rxf *rxf)
{
}
static void
bna_rxf_sm_last_resp_wait(struct bna_rxf *rxf, enum bna_rxf_event event)
{
switch (event) {
case RXF_E_FAIL:
case RXF_E_FW_RESP:
bna_rxf_cfg_reset(rxf);
bfa_fsm_set_state(rxf, bna_rxf_sm_stopped);
break;
default:
bfa_sm_fault(event);
}
}
static void
bna_bfi_ucast_req(struct bna_rxf *rxf, struct bna_mac *mac,
enum bfi_enet_h2i_msgs req_type)
{
struct bfi_enet_ucast_req *req = &rxf->bfi_enet_cmd.ucast_req;
bfi_msgq_mhdr_set(req->mh, BFI_MC_ENET, req_type, 0, rxf->rx->rid);
req->mh.num_entries = htons(
bfi_msgq_num_cmd_entries(sizeof(struct bfi_enet_ucast_req)));
ether_addr_copy(req->mac_addr, mac->addr);
bfa_msgq_cmd_set(&rxf->msgq_cmd, NULL, NULL,
sizeof(struct bfi_enet_ucast_req), &req->mh);
bfa_msgq_cmd_post(&rxf->rx->bna->msgq, &rxf->msgq_cmd);
}
static void
bna_bfi_mcast_add_req(struct bna_rxf *rxf, struct bna_mac *mac)
{
struct bfi_enet_mcast_add_req *req =
&rxf->bfi_enet_cmd.mcast_add_req;
bfi_msgq_mhdr_set(req->mh, BFI_MC_ENET, BFI_ENET_H2I_MAC_MCAST_ADD_REQ,
0, rxf->rx->rid);
req->mh.num_entries = htons(
bfi_msgq_num_cmd_entries(sizeof(struct bfi_enet_mcast_add_req)));
ether_addr_copy(req->mac_addr, mac->addr);
bfa_msgq_cmd_set(&rxf->msgq_cmd, NULL, NULL,
sizeof(struct bfi_enet_mcast_add_req), &req->mh);
bfa_msgq_cmd_post(&rxf->rx->bna->msgq, &rxf->msgq_cmd);
}
static void
bna_bfi_mcast_del_req(struct bna_rxf *rxf, u16 handle)
Annotation
- Immediate include surface: `bna.h`, `bfi.h`.
- Detected declarations: `enum bna_tx_event`, `function Copyright`, `function bna_rxf_sm_stopped_entry`, `function bna_rxf_sm_stopped`, `function bna_rxf_sm_cfg_wait_entry`, `function bna_rxf_sm_cfg_wait`, `function bna_rxf_sm_started_entry`, `function bna_rxf_sm_started`, `function bna_rxf_sm_last_resp_wait_entry`, `function bna_bfi_ucast_req`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
- 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.