drivers/net/ethernet/qlogic/qed/qed_mcp.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/qlogic/qed/qed_mcp.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/qlogic/qed/qed_mcp.h- Extension
.h- Size
- 35529 bytes
- Lines
- 1397
- 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.
- 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
linux/types.hlinux/delay.hlinux/slab.hlinux/spinlock.hlinux/qed/qed_fcoe_if.hqed_hsi.hqed_dev_api.h
Detected Declarations
struct qed_mcp_link_speed_paramsstruct qed_mcp_link_pause_paramsstruct qed_mcp_link_paramsstruct qed_mcp_link_capabilitiesstruct qed_mcp_link_statestruct qed_mcp_function_infostruct qed_mcp_nvm_commonstruct qed_mcp_drv_versionstruct qed_mcp_lan_statsstruct qed_mcp_fcoe_statsstruct qed_mcp_iscsi_statsstruct qed_mcp_rdma_statsstruct qed_mfw_tlv_genericstruct qed_nvm_image_attstruct qed_mcp_infostruct qed_mcp_mb_paramsstruct qed_drv_tlv_hdrstruct qed_load_req_paramsstruct qed_resc_lock_paramsstruct qed_resc_unlock_paramsenum qed_mcp_eee_modeenum qed_mcp_protocol_typeenum qed_ov_eswitchenum qed_ov_clientenum qed_ov_driver_stateenum qed_ov_wolenum qed_mfw_tlv_typeenum qed_drv_roleenum qed_resc_lockfunction qed_mcp_is_ext_speed_supported
Annotated Snippet
struct qed_mcp_link_speed_params {
bool autoneg;
u32 advertised_speeds;
#define QED_EXT_SPEED_MASK_RES 0x1
#define QED_EXT_SPEED_MASK_1G 0x2
#define QED_EXT_SPEED_MASK_10G 0x4
#define QED_EXT_SPEED_MASK_20G 0x8
#define QED_EXT_SPEED_MASK_25G 0x10
#define QED_EXT_SPEED_MASK_40G 0x20
#define QED_EXT_SPEED_MASK_50G_R 0x40
#define QED_EXT_SPEED_MASK_50G_R2 0x80
#define QED_EXT_SPEED_MASK_100G_R2 0x100
#define QED_EXT_SPEED_MASK_100G_R4 0x200
#define QED_EXT_SPEED_MASK_100G_P4 0x400
u32 forced_speed; /* In Mb/s */
#define QED_EXT_SPEED_1G 0x1
#define QED_EXT_SPEED_10G 0x2
#define QED_EXT_SPEED_20G 0x4
#define QED_EXT_SPEED_25G 0x8
#define QED_EXT_SPEED_40G 0x10
#define QED_EXT_SPEED_50G_R 0x20
#define QED_EXT_SPEED_50G_R2 0x40
#define QED_EXT_SPEED_100G_R2 0x80
#define QED_EXT_SPEED_100G_R4 0x100
#define QED_EXT_SPEED_100G_P4 0x200
};
struct qed_mcp_link_pause_params {
bool autoneg;
bool forced_rx;
bool forced_tx;
};
enum qed_mcp_eee_mode {
QED_MCP_EEE_DISABLED,
QED_MCP_EEE_ENABLED,
QED_MCP_EEE_UNSUPPORTED
};
struct qed_mcp_link_params {
struct qed_mcp_link_speed_params speed;
struct qed_mcp_link_pause_params pause;
u32 loopback_mode;
struct qed_link_eee_params eee;
u32 fec;
struct qed_mcp_link_speed_params ext_speed;
u32 ext_fec_mode;
};
struct qed_mcp_link_capabilities {
u32 speed_capabilities;
bool default_speed_autoneg;
u32 fec_default;
enum qed_mcp_eee_mode default_eee;
u32 eee_lpi_timer;
u8 eee_speed_caps;
u32 default_ext_speed_caps;
u32 default_ext_autoneg;
u32 default_ext_speed;
u32 default_ext_fec;
};
struct qed_mcp_link_state {
bool link_up;
u32 min_pf_rate;
/* Actual link speed in Mb/s */
u32 line_speed;
/* PF max speed in Mb/s, deduced from line_speed
* according to PF max bandwidth configuration.
*/
u32 speed;
bool full_duplex;
bool an;
bool an_complete;
bool parallel_detection;
bool pfc_enabled;
u32 partner_adv_speed;
#define QED_LINK_PARTNER_SPEED_1G_HD BIT(0)
#define QED_LINK_PARTNER_SPEED_1G_FD BIT(1)
#define QED_LINK_PARTNER_SPEED_10G BIT(2)
#define QED_LINK_PARTNER_SPEED_20G BIT(3)
#define QED_LINK_PARTNER_SPEED_25G BIT(4)
Annotation
- Immediate include surface: `linux/types.h`, `linux/delay.h`, `linux/slab.h`, `linux/spinlock.h`, `linux/qed/qed_fcoe_if.h`, `qed_hsi.h`, `qed_dev_api.h`.
- Detected declarations: `struct qed_mcp_link_speed_params`, `struct qed_mcp_link_pause_params`, `struct qed_mcp_link_params`, `struct qed_mcp_link_capabilities`, `struct qed_mcp_link_state`, `struct qed_mcp_function_info`, `struct qed_mcp_nvm_common`, `struct qed_mcp_drv_version`, `struct qed_mcp_lan_stats`, `struct qed_mcp_fcoe_stats`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source 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.