Changeset View
Changeset View
Standalone View
Standalone View
sys/mips/cavium/octe/mv88e61xxphy.c
Show All 12 Lines | |||||
psc = &sc->sc_ports[port]; | psc = &sc->sc_ports[port]; | ||||
portbuf[0] = '0' + port; | portbuf[0] = '0' + port; | ||||
portN_node = SYSCTL_ADD_NODE(ctx, port_tree, OID_AUTO, portbuf, | portN_node = SYSCTL_ADD_NODE(ctx, port_tree, OID_AUTO, portbuf, | ||||
CTLFLAG_RD, NULL, "Switch Port"); | CTLFLAG_RD, NULL, "Switch Port"); | ||||
portN_tree = SYSCTL_CHILDREN(portN_node); | portN_tree = SYSCTL_CHILDREN(portN_node); | ||||
SYSCTL_ADD_PROC(ctx, portN_tree, OID_AUTO, "duplex", | SYSCTL_ADD_PROC(ctx, portN_tree, OID_AUTO, "duplex", | ||||
CTLFLAG_RD | CTLTYPE_INT, psc, | CTLFLAG_RD | CTLTYPE_INT | CTLFLAG_NEEDGIANT, psc, | ||||
MV88E61XXPHY_LINK_SYSCTL_DUPLEX, | MV88E61XXPHY_LINK_SYSCTL_DUPLEX, | ||||
mv88e61xxphy_sysctl_link_proc, "IU", | mv88e61xxphy_sysctl_link_proc, "IU", | ||||
"Media duplex status (0 = half duplex; 1 = full duplex)"); | "Media duplex status (0 = half duplex; 1 = full duplex)"); | ||||
SYSCTL_ADD_PROC(ctx, portN_tree, OID_AUTO, "link", | SYSCTL_ADD_PROC(ctx, portN_tree, OID_AUTO, "link", | ||||
CTLFLAG_RD | CTLTYPE_INT, psc, | CTLFLAG_RD | CTLTYPE_INT | CTLFLAG_NEEDGIANT, psc, | ||||
MV88E61XXPHY_LINK_SYSCTL_LINK, | MV88E61XXPHY_LINK_SYSCTL_LINK, | ||||
mv88e61xxphy_sysctl_link_proc, "IU", | mv88e61xxphy_sysctl_link_proc, "IU", | ||||
"Link status (0 = down; 1 = up)"); | "Link status (0 = down; 1 = up)"); | ||||
SYSCTL_ADD_PROC(ctx, portN_tree, OID_AUTO, "media", | SYSCTL_ADD_PROC(ctx, portN_tree, OID_AUTO, "media", | ||||
CTLFLAG_RD | CTLTYPE_INT, psc, | CTLFLAG_RD | CTLTYPE_INT | CTLFLAG_NEEDGIANT, psc, | ||||
MV88E61XXPHY_LINK_SYSCTL_MEDIA, | MV88E61XXPHY_LINK_SYSCTL_MEDIA, | ||||
mv88e61xxphy_sysctl_link_proc, "IU", | mv88e61xxphy_sysctl_link_proc, "IU", | ||||
"Media speed (0 = unknown; 10 = 10Mbps; 100 = 100Mbps; 1000 = 1Gbps)"); | "Media speed (0 = unknown; 10 = 10Mbps; 100 = 100Mbps; 1000 = 1Gbps)"); | ||||
SYSCTL_ADD_PROC(ctx, portN_tree, OID_AUTO, "domain", | SYSCTL_ADD_PROC(ctx, portN_tree, OID_AUTO, "domain", | ||||
CTLFLAG_RW | CTLTYPE_INT, psc, | CTLFLAG_RW | CTLTYPE_INT | CTLFLAG_NEEDGIANT, psc, | ||||
MV88E61XXPHY_PORT_SYSCTL_DOMAIN, | MV88E61XXPHY_PORT_SYSCTL_DOMAIN, | ||||
mv88e61xxphy_sysctl_port_proc, "IU", | mv88e61xxphy_sysctl_port_proc, "IU", | ||||
"Broadcast domain (ports can only talk to other ports in the same domain)"); | "Broadcast domain (ports can only talk to other ports in the same domain)"); | ||||
SYSCTL_ADD_PROC(ctx, portN_tree, OID_AUTO, "vlan", | SYSCTL_ADD_PROC(ctx, portN_tree, OID_AUTO, "vlan", | ||||
CTLFLAG_RW | CTLTYPE_INT, psc, | CTLFLAG_RW | CTLTYPE_INT | CTLFLAG_NEEDGIANT, psc, | ||||
MV88E61XXPHY_PORT_SYSCTL_VLAN, | MV88E61XXPHY_PORT_SYSCTL_VLAN, | ||||
mv88e61xxphy_sysctl_port_proc, "IU", | mv88e61xxphy_sysctl_port_proc, "IU", | ||||
"Tag packets from/for this port with a given VLAN."); | "Tag packets from/for this port with a given VLAN."); | ||||
SYSCTL_ADD_PROC(ctx, portN_tree, OID_AUTO, "priority", | SYSCTL_ADD_PROC(ctx, portN_tree, OID_AUTO, "priority", | ||||
CTLFLAG_RW | CTLTYPE_INT, psc, | CTLFLAG_RW | CTLTYPE_INT | CTLFLAG_NEEDGIANT, psc, | ||||
MV88E61XXPHY_PORT_SYSCTL_PRIORITY, | MV88E61XXPHY_PORT_SYSCTL_PRIORITY, | ||||
mv88e61xxphy_sysctl_port_proc, "IU", | mv88e61xxphy_sysctl_port_proc, "IU", | ||||
"Default packet priority for this port."); | "Default packet priority for this port."); | ||||
} | } | ||||
mv88e61xxphy_init(sc); | mv88e61xxphy_init(sc); | ||||
return (0); | return (0); | ||||
Show All 12 Lines |