drivers/net/ethernet/wangxun/libwx/wx_vf.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/wangxun/libwx/wx_vf.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/wangxun/libwx/wx_vf.c- Extension
.c- Size
- 14873 bytes
- Lines
- 600
- Domain
- Driver Families
- Bucket
- drivers/net
- 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.
- 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
linux/etherdevice.hlinux/pci.hwx_type.hwx_hw.hwx_mbx.hwx_vf.h
Detected Declarations
function wx_virt_clr_regfunction wx_init_hw_vffunction wx_mbx_write_and_read_replyfunction wx_reset_hw_vffunction wx_stop_adapter_vffunction wx_set_rar_vffunction wx_update_mc_addr_list_vffunction wx_update_xcast_mode_vffunction wx_get_link_state_vffunction wx_set_vfta_vffunction wx_get_mac_addr_vffunction wx_get_fw_version_vffunction wx_set_uc_addr_vffunction wx_rlpml_set_vffunction wx_negotiate_api_versionfunction wx_get_queues_vffunction wx_get_link_status_from_pffunction wx_pf_ping_vffunction wx_check_physical_linkfunction wx_check_mac_link_vfexport wx_init_hw_vfexport wx_reset_hw_vfexport wx_stop_adapter_vfexport wx_set_rar_vfexport wx_update_mc_addr_list_vfexport wx_update_xcast_mode_vfexport wx_get_link_state_vfexport wx_set_vfta_vfexport wx_get_mac_addr_vfexport wx_get_fw_version_vfexport wx_set_uc_addr_vfexport wx_rlpml_set_vfexport wx_negotiate_api_versionexport wx_get_queues_vf
Annotated Snippet
if (msgbuf[0] & WX_VT_MSGTYPE_NACK) {
/* msg is NACK, we must have lost CTS status */
ret = -EBUSY;
goto out;
}
/* no message, check link status */
wx_check_physical_link(wx);
goto out;
default:
break;
}
if (!(msgbuf[0] & WX_VT_MSGTYPE_CTS)) {
/* msg is not CTS and is NACK we must have lost CTS status */
if (msgbuf[0] & WX_VT_MSGTYPE_NACK)
ret = -EBUSY;
goto out;
}
/* the pf is talking, if we timed out in the past we reinit */
if (!mbx->timeout) {
ret = -EBUSY;
goto out;
}
out:
return ret;
}
Annotation
- Immediate include surface: `linux/etherdevice.h`, `linux/pci.h`, `wx_type.h`, `wx_hw.h`, `wx_mbx.h`, `wx_vf.h`.
- Detected declarations: `function wx_virt_clr_reg`, `function wx_init_hw_vf`, `function wx_mbx_write_and_read_reply`, `function wx_reset_hw_vf`, `function wx_stop_adapter_vf`, `function wx_set_rar_vf`, `function wx_update_mc_addr_list_vf`, `function wx_update_xcast_mode_vf`, `function wx_get_link_state_vf`, `function wx_set_vfta_vf`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: integration 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.