drivers/net/ethernet/chelsio/cxgb/common.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/chelsio/cxgb/common.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/chelsio/cxgb/common.h- Extension
.h- Size
- 10117 bytes
- Lines
- 342
- 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
linux/module.hlinux/netdevice.hlinux/types.hlinux/delay.hlinux/pci.hlinux/ethtool.hlinux/if_vlan.hlinux/mdio.hlinux/crc32.hlinux/slab.hasm/io.hlinux/pci_ids.h
Detected Declarations
struct t1_rx_modestruct sge_paramsstruct chelsio_pci_paramsstruct tp_paramsstruct mc5_paramsstruct adapter_paramsstruct link_configstruct cmacstruct cphystruct port_infostruct sgestruct peespistruct adapterstruct mdio_opsstruct gmacstruct gphystruct board_infofunction t1_is_asicfunction adapter_matches_typefunction vlan_tso_capablefunction core_ticks_per_usec
Annotated Snippet
struct t1_rx_mode {
struct net_device *dev;
};
#define t1_rx_mode_promisc(rm) (rm->dev->flags & IFF_PROMISC)
#define t1_rx_mode_allmulti(rm) (rm->dev->flags & IFF_ALLMULTI)
#define t1_rx_mode_mc_cnt(rm) (netdev_mc_count(rm->dev))
#define t1_get_netdev(rm) (rm->dev)
#define MAX_NPORTS 4
#define PORT_MASK ((1 << MAX_NPORTS) - 1)
#define NMTUS 8
#define TCB_SIZE 128
#define SPEED_INVALID 0xffff
#define DUPLEX_INVALID 0xff
/* Max frame size PM3393 can handle. Includes Ethernet header and CRC. */
#define PM3393_MAX_FRAME_SIZE 9600
#define VSC7326_MAX_MTU 9600
enum {
CHBT_BOARD_N110,
CHBT_BOARD_N210,
CHBT_BOARD_7500,
CHBT_BOARD_8000,
CHBT_BOARD_CHT101,
CHBT_BOARD_CHT110,
CHBT_BOARD_CHT210,
CHBT_BOARD_CHT204,
CHBT_BOARD_CHT204V,
CHBT_BOARD_CHT204E,
CHBT_BOARD_CHN204,
CHBT_BOARD_COUGAR,
CHBT_BOARD_6800,
CHBT_BOARD_SIMUL,
};
enum {
CHBT_TERM_FPGA,
CHBT_TERM_T1,
CHBT_TERM_T2,
CHBT_TERM_T3
};
enum {
CHBT_MAC_CHELSIO_A,
CHBT_MAC_IXF1010,
CHBT_MAC_PM3393,
CHBT_MAC_VSC7321,
CHBT_MAC_DUMMY
};
enum {
CHBT_PHY_88E1041,
CHBT_PHY_88E1111,
CHBT_PHY_88X2010,
CHBT_PHY_XPAK,
CHBT_PHY_MY3126,
CHBT_PHY_8244,
CHBT_PHY_DUMMY
};
enum {
PAUSE_RX = 1 << 0,
PAUSE_TX = 1 << 1,
PAUSE_AUTONEG = 1 << 2
};
/* Revisions of T1 chip */
enum {
TERM_T1A = 0,
TERM_T1B = 1,
TERM_T2 = 3
};
struct sge_params {
unsigned int cmdQ_size[2];
unsigned int freelQ_size[2];
unsigned int large_buf_capacity;
unsigned int rx_coalesce_usecs;
unsigned int last_rx_coalesce_raw;
unsigned int default_rx_coalesce_usecs;
unsigned int sample_interval_usecs;
unsigned int coalesce_enable;
unsigned int polling;
};
struct chelsio_pci_params {
Annotation
- Immediate include surface: `linux/module.h`, `linux/netdevice.h`, `linux/types.h`, `linux/delay.h`, `linux/pci.h`, `linux/ethtool.h`, `linux/if_vlan.h`, `linux/mdio.h`.
- Detected declarations: `struct t1_rx_mode`, `struct sge_params`, `struct chelsio_pci_params`, `struct tp_params`, `struct mc5_params`, `struct adapter_params`, `struct link_config`, `struct cmac`, `struct cphy`, `struct port_info`.
- 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.