drivers/net/dsa/mv88e6xxx/chip.h
Source file repositories/reference/linux-study-clean/drivers/net/dsa/mv88e6xxx/chip.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/dsa/mv88e6xxx/chip.h- Extension
.h- Size
- 24451 bytes
- Lines
- 894
- 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/idr.hlinux/if_vlan.hlinux/irq.hlinux/gpio/consumer.hlinux/kthread.hlinux/leds.hlinux/phy.hlinux/property.hlinux/ptp_clock_kernel.hlinux/timecounter.hnet/dsa.h
Detected Declarations
struct mv88e6xxx_opsstruct mv88e6xxx_infostruct mv88e6xxx_atu_entrystruct mv88e6xxx_vtu_entrystruct mv88e6xxx_stu_entrystruct mv88e6xxx_bus_opsstruct mv88e6xxx_irq_opsstruct mv88e6xxx_gpio_opsstruct mv88e6xxx_avb_opsstruct mv88e6xxx_ptp_opsstruct mv88e6xxx_pcs_opsstruct mv88e6xxx_cc_coeffsstruct mv88e6xxx_tcam_opsstruct mv88e6xxx_irqstruct mv88e6xxx_port_hwtstampstruct mv88e6xxx_policystruct mv88e6xxx_vlanstruct mv88e6xxx_portstruct mv88e6xxx_region_privstruct mv88e6xxx_mststruct mv88e6xxx_hw_statstruct mv88e6xxx_tcamstruct mv88e6xxx_chipstruct mv88e6xxx_tcam_keystruct mv88e6xxx_tcam_actionstruct mv88e6xxx_tcam_entrystruct mv88e6xxx_bus_opsstruct mv88e6xxx_mdio_busstruct mv88e6xxx_opsstruct mv88e6xxx_irq_opsstruct mv88e6xxx_gpio_opsstruct mv88e6xxx_avb_opsstruct mv88e6xxx_ptp_opsstruct mv88e6xxx_pcs_opsstruct mv88e6xxx_tcam_opsenum mv88e6xxx_egress_modeenum mv88e6xxx_egress_directionenum mv88e6xxx_frame_modeenum mv88e6xxx_modelenum mv88e6xxx_familyenum mv88e6xxx_edsa_supportenum mv88e6xxx_policy_mappingenum mv88e6xxx_policy_actionenum mv88e6xxx_region_idfunction mv88e6xxx_has_stufunction mv88e6xxx_has_pvtfunction mv88e6xxx_has_lagfunction mv88e6xxx_has_tcam
Annotated Snippet
struct mv88e6xxx_info {
enum mv88e6xxx_family family;
u16 prod_num;
const char *name;
unsigned int num_databases;
unsigned int num_macs;
unsigned int num_ports;
unsigned int num_internal_phys;
unsigned int num_gpio;
unsigned int num_tcam_entries;
unsigned int max_vid;
unsigned int max_sid;
unsigned int port_base_addr;
unsigned int phy_base_addr;
unsigned int global1_addr;
unsigned int global2_addr;
unsigned int tcam_addr;
unsigned int age_time_coeff;
unsigned int g1_irqs;
unsigned int g2_irqs;
int stats_type;
bool pvt;
/* Mark certain ports as invalid. This is required for example for the
* MV88E6220 (which is in general a MV88E6250 with 7 ports) but the
* ports 2-4 are not routet to pins.
*/
unsigned int invalid_port_mask;
/* Multi-chip Addressing Mode.
* Some chips respond to only 2 registers of its own SMI device address
* when it is non-zero, and use indirect access to internal registers.
*/
bool multi_chip;
/* Dual-chip Addressing Mode
* Some chips respond to only half of the 32 SMI addresses,
* allowing two to coexist on the same SMI interface.
*/
bool dual_chip;
enum mv88e6xxx_edsa_support edsa_support;
/* Mask for FromPort and ToPort value of PortVec used in ATU Move
* operation. 0 means that the ATU Move operation is not supported.
*/
u8 atu_move_port_mask;
const struct mv88e6xxx_ops *ops;
/* Supports PTP */
bool ptp_support;
/* Internal PHY start index. 0 means that internal PHYs range starts at
* port 0, 1 means internal PHYs range starts at port 1, etc
*/
unsigned int internal_phys_offset;
};
struct mv88e6xxx_atu_entry {
u8 state;
bool trunk;
u16 portvec;
u8 mac[ETH_ALEN];
};
struct mv88e6xxx_vtu_entry {
u16 vid;
u16 fid;
u8 sid;
bool valid;
bool policy;
u8 member[DSA_MAX_PORTS];
u8 state[DSA_MAX_PORTS]; /* Older silicon has no STU */
};
struct mv88e6xxx_stu_entry {
u8 sid;
bool valid;
u8 state[DSA_MAX_PORTS];
};
struct mv88e6xxx_bus_ops;
struct mv88e6xxx_irq_ops;
struct mv88e6xxx_gpio_ops;
struct mv88e6xxx_avb_ops;
struct mv88e6xxx_ptp_ops;
struct mv88e6xxx_pcs_ops;
struct mv88e6xxx_cc_coeffs;
struct mv88e6xxx_tcam_ops;
struct mv88e6xxx_irq {
u16 masked;
Annotation
- Immediate include surface: `linux/idr.h`, `linux/if_vlan.h`, `linux/irq.h`, `linux/gpio/consumer.h`, `linux/kthread.h`, `linux/leds.h`, `linux/phy.h`, `linux/property.h`.
- Detected declarations: `struct mv88e6xxx_ops`, `struct mv88e6xxx_info`, `struct mv88e6xxx_atu_entry`, `struct mv88e6xxx_vtu_entry`, `struct mv88e6xxx_stu_entry`, `struct mv88e6xxx_bus_ops`, `struct mv88e6xxx_irq_ops`, `struct mv88e6xxx_gpio_ops`, `struct mv88e6xxx_avb_ops`, `struct mv88e6xxx_ptp_ops`.
- 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.