• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/sys/dev/etherswitch/arswitch/

Lines Matching defs:port

80 /* Map port+led to register+shift */
280 * Map the hard-coded port config from the switch setup to
281 * the chipset port config (status, duplex, flow, etc.)
312 * Fetch the port data for the given port.
323 int port)
330 snprintf(sbuf, 128, "port.%d.force_link", port);
339 snprintf(sbuf, 128, "port.%d.speed", port);
355 "%s: invalid port %d duplex value (%d)\n",
357 port,
363 snprintf(sbuf, 128, "port.%d.duplex", port);
369 snprintf(sbuf, 128, "port.%d.txpause", port);
375 snprintf(sbuf, 128, "port.%d.rxpause", port);
383 "%s: port %d: speed=%d, duplex=%d, txpause=%d, rxpause=%d\n",
385 port,
723 /* enable CPU port and disable mirror port */
764 ar8327_port_init(struct arswitch_softc *sc, int port)
769 /* For now, port can see all other ports */
772 if (port == AR8X16_PORT_CPU)
774 else if (port == 6)
779 arswitch_writereg(sc->sc_dev, AR8327_REG_PORT_STATUS(port), t);
780 arswitch_writereg(sc->sc_dev, AR8327_REG_PORT_HEADER(port), 0);
783 * Default to 1 port group.
787 arswitch_writereg(sc->sc_dev, AR8327_REG_PORT_VLAN0(port), t);
790 arswitch_writereg(sc->sc_dev, AR8327_REG_PORT_VLAN1(port), t);
793 * This doesn't configure any ports which this port can "see".
794 * bits 0-6 control which ports a frame coming into this port
798 * to that port.
803 /* So this allows traffic to any port except ourselves */
804 t |= (ports & ~(1 << port));
805 arswitch_writereg(sc->sc_dev, AR8327_REG_PORT_LOOKUP(port), t);
830 * Get the port VLAN configuration.
841 /* Retrieve the current port configuration from the VTU */
853 ar8327_port_disable_mirror(struct arswitch_softc *sc, int port)
857 AR8327_REG_PORT_LOOKUP(port),
861 AR8327_REG_PORT_HOL_CTRL1(port),
887 * XXX TODO: disable any Q-in-Q port configuration,
942 * Disable port mirroring entirely.
954 /* Each port - pvid 1 */
968 int port;
973 /* For port based vlans the vlanid is the same as the port index. */
974 port = vid & ETHERSWITCH_VID_MASK;
975 reg = arswitch_readreg(sc->sc_dev, AR8327_REG_PORT_LOOKUP(port));
983 int err, port;
987 /* For port based vlans the vlanid is the same as the port index. */
988 port = vid & ETHERSWITCH_VID_MASK;
990 err = arswitch_modifyreg(sc->sc_dev, AR8327_REG_PORT_LOOKUP(port),
1014 ar8327_get_pvid(struct arswitch_softc *sc, int port, int *pvid)
1023 port = port & ETHERSWITCH_VID_MASK;
1024 reg = arswitch_readreg(sc->sc_dev, AR8327_REG_PORT_VLAN0(port));
1033 ar8327_set_pvid(struct arswitch_softc *sc, int port, int pvid)
1042 arswitch_writereg(sc->sc_dev, AR8327_REG_PORT_VLAN0(port), t);
1081 ar8327_atu_flush_port(struct arswitch_softc *sc, int port)
1093 val |= SM(port, AR8327_ATU_FUNC_PORT_NUM);
1211 * If any of the bits are set, update the port mask.
1212 * Worry about the port config itself when getport() is called.