drivers/net/dsa/vitesse-vsc73xx.h
Source file repositories/reference/linux-study-clean/drivers/net/dsa/vitesse-vsc73xx.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/dsa/vitesse-vsc73xx.h- Extension
.h- Size
- 3112 bytes
- Lines
- 95
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/device.hlinux/etherdevice.hlinux/gpio/driver.h
Detected Declarations
struct vsc73xx_portinfostruct vsc73xxstruct vsc73xx_opsstruct vsc73xx_bridge_vlan
Annotated Snippet
struct vsc73xx_portinfo {
u16 pvid_vlan_filtering;
u16 pvid_tag_8021q;
bool pvid_vlan_filtering_configured;
bool pvid_tag_8021q_configured;
};
/**
* struct vsc73xx - VSC73xx state container: main data structure
* @dev: The device pointer
* @reset: The descriptor for the GPIO line tied to the reset pin
* @ds: Pointer to the DSA core structure
* @gc: Main structure of the GPIO controller
* @chipid: Storage for the Chip ID value read from the CHIPID register of the
* switch
* @addr: MAC address used in flow control frames
* @ops: Structure with hardware-dependent operations
* @priv: Pointer to the configuration interface structure
* @portinfo: Storage table portinfo structructures
* @vlans: List of configured vlans. Contains port mask and untagged status of
* every vlan configured in port vlan operation. It doesn't cover tag_8021q
* vlans.
* @fdb_lock: Mutex protects fdb access
*/
struct vsc73xx {
struct device *dev;
struct gpio_desc *reset;
struct dsa_switch *ds;
struct gpio_chip gc;
u16 chipid;
u8 addr[ETH_ALEN];
const struct vsc73xx_ops *ops;
void *priv;
struct vsc73xx_portinfo portinfo[VSC73XX_MAX_NUM_PORTS];
struct list_head vlans;
struct mutex fdb_lock;
};
/**
* struct vsc73xx_ops - VSC73xx methods container
* @read: Method for register reading over the hardware-dependent interface
* @write: Method for register writing over the hardware-dependent interface
*/
struct vsc73xx_ops {
int (*read)(struct vsc73xx *vsc, u8 block, u8 subblock, u8 reg,
u32 *val);
int (*write)(struct vsc73xx *vsc, u8 block, u8 subblock, u8 reg,
u32 val);
};
/**
* struct vsc73xx_bridge_vlan - VSC73xx driver structure which keeps vlan
* database copy
* @vid: VLAN number
* @portmask: each bit represents one port
* @untagged: each bit represents one port configured with @vid untagged
* @list: list structure
*/
struct vsc73xx_bridge_vlan {
u16 vid;
u8 portmask;
u8 untagged;
struct list_head list;
};
int vsc73xx_is_addr_valid(u8 block, u8 subblock);
int vsc73xx_probe(struct vsc73xx *vsc);
void vsc73xx_remove(struct vsc73xx *vsc);
void vsc73xx_shutdown(struct vsc73xx *vsc);
Annotation
- Immediate include surface: `linux/device.h`, `linux/etherdevice.h`, `linux/gpio/driver.h`.
- Detected declarations: `struct vsc73xx_portinfo`, `struct vsc73xx`, `struct vsc73xx_ops`, `struct vsc73xx_bridge_vlan`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
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.