drivers/net/dsa/b53/b53_priv.h
Source file repositories/reference/linux-study-clean/drivers/net/dsa/b53/b53_priv.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/dsa/b53/b53_priv.h- Extension
.h- Size
- 16674 bytes
- Lines
- 562
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/mutex.hlinux/phylink.hlinux/etherdevice.hnet/dsa.hb53_regs.hlinux/bcm47xx_nvram.hlinux/gpio.hbcm47xx_board.h
Detected Declarations
struct b53_devicestruct net_devicestruct b53_io_opsstruct b53_arl_entrystruct b53_arl_opsstruct b53_pcsstruct b53_portstruct b53_vlanstruct b53_devicestruct b53_arl_entryenum b53_variant_idfunction is5325efunction is5325mfunction is5365function is5397_98function is539xfunction is531x5function is63xxfunction is6318_268function is5301xfunction is58xxfunction b53_max_arl_entriesfunction b53_switch_removefunction b53_switch_shutdownfunction b53_arl_to_entryfunction b53_arl_to_entry_25function b53_arl_to_entry_89function b53_arl_from_entryfunction b53_arl_from_entry_25function b53_arl_from_entry_89function b53_arl_search_to_entry_25function b53_arl_search_to_entry_63xxfunction b53_arl_read_entryfunction b53_arl_write_entryfunction b53_arl_search_read
Annotated Snippet
struct b53_io_ops {
int (*read8)(struct b53_device *dev, u8 page, u8 reg, u8 *value);
int (*read16)(struct b53_device *dev, u8 page, u8 reg, u16 *value);
int (*read32)(struct b53_device *dev, u8 page, u8 reg, u32 *value);
int (*read48)(struct b53_device *dev, u8 page, u8 reg, u64 *value);
int (*read64)(struct b53_device *dev, u8 page, u8 reg, u64 *value);
int (*write8)(struct b53_device *dev, u8 page, u8 reg, u8 value);
int (*write16)(struct b53_device *dev, u8 page, u8 reg, u16 value);
int (*write32)(struct b53_device *dev, u8 page, u8 reg, u32 value);
int (*write48)(struct b53_device *dev, u8 page, u8 reg, u64 value);
int (*write64)(struct b53_device *dev, u8 page, u8 reg, u64 value);
int (*phy_read16)(struct b53_device *dev, int addr, int reg, u16 *value);
int (*phy_write16)(struct b53_device *dev, int addr, int reg, u16 value);
int (*irq_enable)(struct b53_device *dev, int port);
void (*irq_disable)(struct b53_device *dev, int port);
void (*phy_enable)(struct b53_device *dev, int port);
void (*phy_disable)(struct b53_device *dev, int port);
void (*phylink_get_caps)(struct b53_device *dev, int port,
struct phylink_config *config);
struct phylink_pcs *(*phylink_mac_select_pcs)(struct b53_device *dev,
int port,
phy_interface_t interface);
u8 (*serdes_map_lane)(struct b53_device *dev, int port);
void (*serdes_link_set)(struct b53_device *dev, int port,
unsigned int mode, phy_interface_t interface,
bool link_up);
};
struct b53_arl_entry;
struct b53_arl_ops {
void (*arl_read_entry)(struct b53_device *dev,
struct b53_arl_entry *ent, u8 idx);
void (*arl_write_entry)(struct b53_device *dev,
const struct b53_arl_entry *ent, u8 idx);
void (*arl_search_read)(struct b53_device *dev, u8 idx,
struct b53_arl_entry *ent);
};
#define B53_INVALID_LANE 0xff
enum {
BCM4908_DEVICE_ID = 0x4908,
BCM5325_DEVICE_ID = 0x25,
BCM5365_DEVICE_ID = 0x65,
BCM5389_DEVICE_ID = 0x89,
BCM5395_DEVICE_ID = 0x95,
BCM5397_DEVICE_ID = 0x97,
BCM5398_DEVICE_ID = 0x98,
BCM53101_DEVICE_ID = 0x53101,
BCM53115_DEVICE_ID = 0x53115,
BCM53125_DEVICE_ID = 0x53125,
BCM53128_DEVICE_ID = 0x53128,
BCM63XX_DEVICE_ID = 0x6300,
BCM6318_DEVICE_ID = 0x6318,
BCM6328_DEVICE_ID = 0x6328,
BCM6362_DEVICE_ID = 0x6362,
BCM6368_DEVICE_ID = 0x6368,
BCM63268_DEVICE_ID = 0x63268,
BCM53010_DEVICE_ID = 0x53010,
BCM53011_DEVICE_ID = 0x53011,
BCM53012_DEVICE_ID = 0x53012,
BCM53018_DEVICE_ID = 0x53018,
BCM53019_DEVICE_ID = 0x53019,
BCM58XX_DEVICE_ID = 0x5800,
BCM583XX_DEVICE_ID = 0x58300,
BCM7445_DEVICE_ID = 0x7445,
BCM7278_DEVICE_ID = 0x7278,
BCM53134_DEVICE_ID = 0x5075,
};
enum b53_variant_id {
B53_VARIANT_NONE = 0,
B53_VARIANT_5325E,
B53_VARIANT_5325M,
};
struct b53_pcs {
struct phylink_pcs pcs;
struct b53_device *dev;
u8 lane;
};
#define B53_N_PORTS 9
#define B53_N_PORTS_25 6
#define B53_N_PCS 2
struct b53_port {
u16 vlan_ctl_mask;
u16 pvid;
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/mutex.h`, `linux/phylink.h`, `linux/etherdevice.h`, `net/dsa.h`, `b53_regs.h`, `linux/bcm47xx_nvram.h`, `linux/gpio.h`.
- Detected declarations: `struct b53_device`, `struct net_device`, `struct b53_io_ops`, `struct b53_arl_entry`, `struct b53_arl_ops`, `struct b53_pcs`, `struct b53_port`, `struct b53_vlan`, `struct b53_device`, `struct b53_arl_entry`.
- 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.
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.