/freebsd/sys/dev/etherswitch/micrel/ |
H A D | ksz8995ma.c | 509 if (p->es_port < 0 || p->es_port >= sc->numports) in ksz8995ma_getport() 514 KSZ8995MA_PORT_SIZE * p->es_port); in ksz8995ma_getport() 516 KSZ8995MA_PORT_SIZE * p->es_port); in ksz8995ma_getport() 520 KSZ8995MA_PORT_SIZE * p->es_port); in ksz8995ma_getport() 527 KSZ8995MA_PORT_SIZE * p->es_port); in ksz8995ma_getport() 534 phy = sc->portphy[p->es_port]; in ksz8995ma_getport() 572 if (p->es_port < 0 || p->es_port >= sc->numports) in ksz8995ma_setport() 579 KSZ8995MA_PORT_SIZE * p->es_port); in ksz8995ma_setport() 581 KSZ8995MA_PORT_SIZE * p->es_port, in ksz8995ma_setport() 585 KSZ8995MA_PORT_SIZE * p->es_port); in ksz8995ma_setport() [all …]
|
/freebsd/sys/dev/etherswitch/infineon/ |
H A D | adm6996fc.c | 453 if (p->es_port < 0 || p->es_port >= sc->numports) in adm6996fc_getport() 462 if (p->es_port == 4) in adm6996fc_getport() 474 phy = sc->portphy[p->es_port]; in adm6996fc_getport() 475 mii = adm6996fc_miiforport(sc, p->es_port); in adm6996fc_getport() 516 if (p->es_port < 0 || p->es_port >= sc->numports) in adm6996fc_setport() 520 data = ADM6996FC_READREG(parent, bcaddr[p->es_port]); in adm6996fc_setport() 530 if (p->es_port == 4) { in adm6996fc_setport() 540 if (sc->portphy[p->es_port] == sc->cpuport) in adm6996fc_setport() 544 if (sc->portphy[p->es_port] != sc->cpuport) { in adm6996fc_setport() 545 mii = adm6996fc_miiforport(sc, p->es_port); in adm6996fc_setport() [all …]
|
/freebsd/sys/dev/etherswitch/felix/ |
H A D | felix.c | 649 reg = FELIX_REW_PORT_RD4(sc, p->es_port, FELIX_REW_PORT_TAG_CFG); in felix_get_port_cfg() 672 if (p->es_port >= sc->info.es_nports || p->es_port < 0) in felix_getport() 677 if (sc->ports[p->es_port].fixed_port) { in felix_getport() 681 ifmr->ifm_active = sc->ports[p->es_port].fixed_link_status; in felix_getport() 685 mii = felix_miiforport(sc, p->es_port); in felix_getport() 709 FELIX_ANA_PORT_WR4(sc, p->es_port, FELIX_ANA_PORT_DROP_CFG, reg); in felix_set_port_cfg() 711 reg = FELIX_REW_PORT_RD4(sc, p->es_port, FELIX_REW_PORT_TAG_CFG); in felix_set_port_cfg() 717 FELIX_REW_PORT_WR4(sc, p->es_port, FELIX_REW_PORT_TAG_CFG, reg); in felix_set_port_cfg() 752 if (p->es_port >= sc->info.es_nports || p->es_port < 0) in felix_setport() 757 if (felix_is_phyport(sc, p->es_port)) { in felix_setport() [all …]
|
/freebsd/sys/dev/etherswitch/mtkswitch/ |
H A D | mtkswitch_rt3050.c | 224 err = sc->hal.mtkswitch_vlan_set_pvid(sc, p->es_port, in mtkswitch_port_vlan_setup() 240 val |= SGC2_DOUBLE_TAG_PORT(p->es_port); in mtkswitch_port_vlan_setup() 242 val &= ~SGC2_DOUBLE_TAG_PORT(p->es_port); in mtkswitch_port_vlan_setup() 247 if (val & POC2_UNTAG_PORT(p->es_port)) in mtkswitch_port_vlan_setup() 248 val &= ~POC2_UNTAG_PORT(p->es_port); in mtkswitch_port_vlan_setup() 250 val |= POC2_UNTAG_PORT(p->es_port); in mtkswitch_port_vlan_setup() 252 val |= POC2_UNTAG_PORT(p->es_port); in mtkswitch_port_vlan_setup() 254 val &= ~POC2_UNTAG_PORT(p->es_port); in mtkswitch_port_vlan_setup() 270 sc->hal.mtkswitch_vlan_get_pvid(sc, p->es_port, &p->es_pvid); in mtkswitch_port_vlan_get() 275 if (val & SGC2_DOUBLE_TAG_PORT(p->es_port)) in mtkswitch_port_vlan_get() [all …]
|
H A D | mtkswitch.c | 445 if (p->es_port < 0 || p->es_port > sc->info.es_nports) in mtkswitch_getport() 452 mii = mtkswitch_miiforport(sc, p->es_port); in mtkswitch_getport() 453 if (mtkswitch_is_cpuport(sc, p->es_port)) { in mtkswitch_getport() 488 if (p->es_port < 0 || p->es_port > sc->info.es_nports) in mtkswitch_setport() 499 if (mtkswitch_is_cpuport(sc, p->es_port)) in mtkswitch_setport() 502 mii = mtkswitch_miiforport(sc, p->es_port); in mtkswitch_setport() 506 ifp = mtkswitch_ifpforport(sc, p->es_port); in mtkswitch_setport()
|
H A D | mtkswitch_mt7620.c | 305 err = sc->hal.mtkswitch_vlan_set_pvid(sc, p->es_port, in mtkswitch_port_vlan_setup() 326 sc->hal.mtkswitch_vlan_get_pvid(sc, p->es_port, &p->es_pvid); in mtkswitch_port_vlan_get()
|
/freebsd/sys/dev/etherswitch/rtl8366/ |
H A D | rtl8366rb.c | 668 if (p->es_port < 0 || p->es_port >= (sc->numphys + 1)) in rtl_getport() 670 if (sc->phy4cpu && p->es_port == sc->numphys) { in rtl_getport() 671 vlangroup = RTL8366_PVCR_GET(p->es_port + 1, in rtl_getport() 674 vlangroup = RTL8366_PVCR_GET(p->es_port, in rtl_getport() 679 if (p->es_port < sc->numphys) { in rtl_getport() 716 if (p->es_port < 0 || p->es_port >= (sc->numphys + 1)) in rtl_setport() 727 if (sc->phy4cpu && p->es_port == sc->numphys) { in rtl_setport() 728 port = p->es_port + 1; in rtl_setport() 730 port = p->es_port; in rtl_setport() 738 if (p->es_port == sc->numphys) in rtl_setport() [all …]
|
/freebsd/sys/dev/etherswitch/arswitch/ |
H A D | arswitch.c | 918 if (p->es_port < 0 || p->es_port > sc->info.es_nports) in arswitch_getport() 925 mii = arswitch_miiforport(sc, p->es_port); in arswitch_getport() 926 if (arswitch_is_cpuport(sc, p->es_port)) { in arswitch_getport() 945 if (!arswitch_is_cpuport(sc, p->es_port) && in arswitch_getport() 957 ar8327_led_mapping[p->es_port-1][led].reg); in arswitch_getport() 1009 AR8X16_REG_PORT_CTRL(p->es_port), in ar8xxx_port_vlan_setup() 1027 if (p->es_port < 0 || p->es_port > sc->info.es_nports) in arswitch_setport() 1038 if (arswitch_is_cpuport(sc, p->es_port)) in arswitch_setport() 1046 err = arswitch_setled(sc, p->es_port-1, i, p->es_led[i]); in arswitch_setport() 1052 mii = arswitch_miiforport(sc, p->es_port); in arswitch_setport() [all …]
|
H A D | arswitch_8327.c | 816 sc->hal.arswitch_vlan_set_pvid(sc, p->es_port, p->es_pvid); in ar8327_port_vlan_setup() 837 sc->hal.arswitch_vlan_get_pvid(sc, p->es_port, &p->es_pvid); in ar8327_port_vlan_get()
|
/freebsd/sys/dev/etherswitch/ar40xx/ |
H A D | ar40xx_main.c | 581 if (p->es_port < 0 || p->es_port > sc->sc_info.es_nports) in ar40xx_getport() 587 ar40xx_hw_get_port_pvid(sc, p->es_port, &p->es_pvid); in ar40xx_getport() 595 mii = ar40xx_phy_miiforport(sc, p->es_port); in ar40xx_getport() 599 if (p->es_port == 0) { in ar40xx_getport() 633 if (p->es_port < 0 || p->es_port > sc->sc_info.es_nports) in ar40xx_setport() 638 ret = ar40xx_hw_set_port_pvid(sc, p->es_port, p->es_pvid); in ar40xx_setport() 647 if (p->es_port == 0) in ar40xx_setport() 650 mii = ar40xx_phy_miiforport(sc, p->es_port); in ar40xx_setport() 654 ifp = ar40xx_phy_ifpforport(sc, p->es_port); in ar40xx_setport()
|
/freebsd/sys/dev/etherswitch/ukswitch/ |
H A D | ukswitch.c | 362 if (p->es_port < 0 || p->es_port >= sc->numports) in ukswitch_getport() 366 phy = sc->portphy[p->es_port]; in ukswitch_getport() 367 mii = ukswitch_miiforport(sc, p->es_port); in ukswitch_getport() 400 if (p->es_port < 0 || p->es_port >= sc->numports) in ukswitch_setport() 403 if (sc->portphy[p->es_port] == sc->cpuport) in ukswitch_setport() 406 mii = ukswitch_miiforport(sc, p->es_port); in ukswitch_setport() 410 ifp = ukswitch_ifpforport(sc, p->es_port); in ukswitch_setport()
|
/freebsd/sys/dev/etherswitch/ip17x/ |
H A D | ip17x.c | 411 if (p->es_port < 0 || p->es_port >= sc->numports) in ip17x_getport() 414 phy = sc->portphy[p->es_port]; in ip17x_getport() 431 mii = ip17x_miiforport(sc, p->es_port); in ip17x_getport() 465 if (p->es_port < 0 || p->es_port >= sc->numports) in ip17x_setport() 468 phy = sc->portphy[p->es_port]; in ip17x_setport() 469 ifp = ip17x_ifpforport(sc, p->es_port); in ip17x_setport() 470 mii = ip17x_miiforport(sc, p->es_port); in ip17x_setport()
|
/freebsd/sys/dev/etherswitch/e6000sw/ |
H A D | e6060sw.c | 474 if (p->es_port < 0 || p->es_port >= sc->numports) in e6060sw_getport() 480 CORE_REGISTER + sc->smi_offset + p->es_port, in e6060sw_getport() 484 phy = sc->portphy[p->es_port]; in e6060sw_getport() 485 mii = e6060sw_miiforport(sc, p->es_port); in e6060sw_getport() 521 if (p->es_port < 0 || p->es_port >= sc->numports) in e6060sw_setport() 526 CORE_REGISTER + sc->smi_offset + p->es_port, in e6060sw_setport() 532 CORE_REGISTER + sc->smi_offset + p->es_port, in e6060sw_setport() 536 if (sc->portphy[p->es_port] == sc->cpuport) in e6060sw_setport() 539 mii = e6060sw_miiforport(sc, p->es_port); in e6060sw_setport() 543 ifp = e6060sw_ifpforport(sc, p->es_port); in e6060sw_setport()
|
H A D | e6000sw.c | 943 if (p->es_port >= sc->num_ports || p->es_port < 0) 945 if (!e6000sw_is_portenabled(sc, p->es_port)) 949 e6000sw_get_pvid(sc, p->es_port, &p->es_pvid); 959 if (e6000sw_is_fixedport(sc, p->es_port)) { 960 if (e6000sw_is_cpuport(sc, p->es_port)) 965 if (e6000sw_is_fixed25port(sc, p->es_port)) 973 mii = e6000sw_miiforphy(sc, p->es_port); 993 if (p->es_port >= sc->num_ports || p->es_port < 0) 995 if (!e6000sw_is_portenabled(sc, p->es_port)) 1015 if (e6000sw_is_phyport(sc, p->es_port)) { [all …]
|
/freebsd/sbin/etherswitchcfg/ |
H A D | etherswitchcfg.c | 180 p.es_port = cfg->unit; in set_port_vid() 226 p.es_port = cfg->unit; in set_port_flag() 249 p.es_port = cfg->unit; in set_port_media() 275 p.es_port = cfg->unit; in set_port_mediaopt() 304 p.es_port = cfg->unit; in set_port_led() 473 p.es_port = atoi(argv[2]); in atu_flush() 477 p.es_port = 0; in atu_flush() 489 i, p.es_port); in atu_flush() 576 p.es_port = port; in print_port()
|
/freebsd/sys/dev/etherswitch/ |
H A D | etherswitch.h | 83 int es_port; member 109 int es_port; member
|
H A D | etherswitch.c | 208 error = ETHERSWITCH_FLUSH_PORT(etherswitch, portid->es_port); in etherswitchioctl()
|
/freebsd/sys/arm/ti/cpsw/ |
H A D | if_cpsw.c | 2820 if (p->es_port < 0 || p->es_port > CPSW_PORTS) in cpsw_getport() 2825 if (p->es_port == CPSW_CPU_PORT) { in cpsw_getport() 2834 psc = device_get_softc(sc->port[p->es_port - 1].dev); in cpsw_getport() 2838 reg = cpsw_read_4(sc, CPSW_PORT_P_VLAN(p->es_port)); in cpsw_getport() 2841 reg = cpsw_read_4(sc, CPSW_ALE_PORTCTL(p->es_port)); in cpsw_getport() 2858 if (p->es_port < 0 || p->es_port > CPSW_PORTS) in cpsw_setport() 2863 cpsw_write_4(sc, CPSW_PORT_P_VLAN(p->es_port), in cpsw_setport() 2867 reg = cpsw_read_4(sc, CPSW_ALE_PORTCTL(p->es_port)); in cpsw_setport() 2876 cpsw_write_4(sc, CPSW_ALE_PORTCTL(p->es_port), reg); in cpsw_setport() 2879 if (p->es_port == CPSW_CPU_PORT) in cpsw_setport() [all …]
|