STRUCT VSC73XX(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct vsc73xx πŸ’–

okay so welcome to the Kernel API Manual bestie, today we're doing struct vsc73xx and honestly? she's the main character of this whole file. this is the VSC73xx state container: main data structure ✨ like, everything else in this driver kinda orbits around her, no cap.


✨ NAME ✨

struct vsc73xx β€” the VSC73xx state container, aka the main data structure 🫢


🌸 SYNOPSIS 🌸

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;
 };

like, look at her. iconic. every single field accounted for πŸ’…


🫢 MEMBERS 🫢

every field gets her moment, let's go:

  • dev β€” The device pointer. yeah that's it, that's the whole vibe, she just points at the device πŸŽ€
  • reset β€” The descriptor for the GPIO line tied to the reset pin. so when you gotta ✨ reset ✨ her, this is the line you poke
  • ds β€” Pointer to the DSA core structure. the DSA girlies stay connected πŸ’œ
  • gc β€” Main structure of the GPIO controller. she's in charge of the GPIOs, lowkey a whole manager
  • chipid β€” Storage for the Chip ID value read from the CHIPID register of the switch. literally just holding the ID so nobody has to go ask the switch again πŸ™ˆ
  • addr β€” MAC address used in flow control frames. yes bestie, an actual MAC address, it lives in addr[ETH_ALEN]
  • ops β€” Structure with hardware-dependent operations. the hardware-specific stuff goes here so the rest of us can pretend it's all the same πŸ¦‹
  • priv β€” Pointer to the configuration interface structure. the ~private~ one, iykyk
  • portinfo β€” Storage table portinfo structructures. yes the typo is canon, i don't make the rules πŸ’€ it's a whole table of struct vsc73xx_portinfo
  • 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. ⭐ so important: port mask + untagged status per vlan, but not the tag_8021q ones, don't come for her for that
  • fdb_lock β€” Mutex protects fdb access. hold the lock, bestie, or the fdb gets messy 😭
fr fr, that vlans note is the one people get wrong: tag_8021q vlans are simply not in this list. periodt.

🌈 SEE ALSO 🌈

  • Kernel file ./drivers/net/dsa/vitesse-vsc73xx.h β€” go read the header, she's right there 🧚
  • struct vsc73xx_portinfo(9)
  • struct vsc73xx_ops(9)
  • struct vsc73xx_bridge_vlan(9)

and that's the page, bestie πŸŽ€ this lil masterpiece lives in ./drivers/net/dsa, it's dated October 2026, and it's filed under struct vsc73xx(9) β€” go forth and read the header, ily, bye πŸ‘‘πŸ’–

πŸ“¦ where this page comes from