Lines Matching refs:ocelot_port
268 struct ocelot_port *ocelot_port = ocelot->ports[port]; in ocelot_single_vlan_aware_bridge() local
270 if (!ocelot_port || !ocelot_port->bridge || in ocelot_single_vlan_aware_bridge()
271 !br_vlan_enabled(ocelot_port->bridge)) in ocelot_single_vlan_aware_bridge()
275 bridge = ocelot_port->bridge; in ocelot_single_vlan_aware_bridge()
279 if (bridge == ocelot_port->bridge) in ocelot_single_vlan_aware_bridge()
386 struct ocelot_port *ocelot_port = ocelot->ports[port]; in ocelot_port_manage_port_tag() local
390 if (ocelot_port->vlan_aware) { in ocelot_port_manage_port_tag()
429 struct ocelot_port *ocelot_port = ocelot->ports[port]; in ocelot_bridge_num_find() local
431 if (ocelot_port && ocelot_port->bridge == bridge) in ocelot_bridge_num_find()
432 return ocelot_port->bridge_num; in ocelot_bridge_num_find()
460 struct ocelot_port *ocelot_port = ocelot->ports[port]; in ocelot_port_set_pvid() local
461 u16 pvid = ocelot_vlan_unaware_pvid(ocelot, ocelot_port->bridge); in ocelot_port_set_pvid()
464 ocelot_port->pvid_vlan = pvid_vlan; in ocelot_port_set_pvid()
466 if (ocelot_port->vlan_aware && pvid_vlan) in ocelot_port_set_pvid()
479 if (!pvid_vlan && ocelot_port->vlan_aware) in ocelot_port_set_pvid()
595 struct ocelot_port *ocelot_port = ocelot->ports[port]; in ocelot_port_vlan_filtering() local
615 ocelot_port->bridge); in ocelot_port_vlan_filtering()
616 else if (ocelot_port->bridge) in ocelot_port_vlan_filtering()
618 ocelot_port->bridge); in ocelot_port_vlan_filtering()
622 ocelot_port->vlan_aware = vlan_aware; in ocelot_port_vlan_filtering()
634 ocelot_port_set_pvid(ocelot, port, ocelot_port->pvid_vlan); in ocelot_port_vlan_filtering()
700 struct ocelot_port *ocelot_port = ocelot->ports[port]; in ocelot_vlan_del() local
707 if (ocelot_port->pvid_vlan && ocelot_port->pvid_vlan->vid == vid) in ocelot_vlan_del()
817 struct ocelot_port *ocelot_port = ocelot->ports[port]; in ocelot_port_configure_serdes() local
822 if (ocelot_port->phy_mode == PHY_INTERFACE_MODE_QSGMII) in ocelot_port_configure_serdes()
823 ocelot_port_rmwl(ocelot_port, 0, in ocelot_port_configure_serdes()
828 if (ocelot_port->phy_mode != PHY_INTERFACE_MODE_INTERNAL) { in ocelot_port_configure_serdes()
840 ocelot_port->phy_mode); in ocelot_port_configure_serdes()
857 struct ocelot_port *ocelot_port = ocelot->ports[port]; in ocelot_phylink_mac_config() local
860 ocelot_port_writel(ocelot_port, DEV_PORT_MISC_HDX_FAST_DIS, in ocelot_phylink_mac_config()
864 ocelot_port_writel(ocelot_port, PCS1G_MODE_CFG_SGMII_MODE_ENA, in ocelot_phylink_mac_config()
866 ocelot_port_writel(ocelot_port, PCS1G_SD_CFG_SD_SEL, PCS1G_SD_CFG); in ocelot_phylink_mac_config()
869 ocelot_port_writel(ocelot_port, PCS1G_CFG_PCS_ENA, PCS1G_CFG); in ocelot_phylink_mac_config()
872 ocelot_port_writel(ocelot_port, 0, PCS1G_ANEG_CFG); in ocelot_phylink_mac_config()
875 ocelot_port_writel(ocelot_port, 0, PCS1G_LB_CFG); in ocelot_phylink_mac_config()
884 struct ocelot_port *ocelot_port = ocelot->ports[port]; in ocelot_phylink_mac_link_down() local
887 ocelot_port->speed = SPEED_UNKNOWN; in ocelot_phylink_mac_link_down()
889 ocelot_port_rmwl(ocelot_port, 0, DEV_MAC_ENA_CFG_RX_ENA, in ocelot_phylink_mac_link_down()
908 ocelot_port_rmwl(ocelot_port, in ocelot_phylink_mac_link_down()
925 struct ocelot_port *ocelot_port = ocelot->ports[port]; in ocelot_phylink_mac_link_up() local
929 ocelot_port->speed = speed; in ocelot_phylink_mac_link_up()
952 ocelot_port_writel(ocelot_port, mode, DEV_MAC_MODE_CFG); in ocelot_phylink_mac_link_up()
957 ocelot_port_writel(ocelot_port, DEV_CLOCK_CFG_LINK_SPEED(mac_speed), in ocelot_phylink_mac_link_up()
1001 ocelot_port_writel(ocelot_port, DEV_MAC_ENA_CFG_RX_ENA | in ocelot_phylink_mac_link_up()
1256 struct ocelot_port *ocelot_port = ocelot->ports[port]; in ocelot_ifh_set_basic() local
1261 ocelot_xmit_get_vlan_info(skb, ocelot_port->bridge, &vlan_tci, in ocelot_ifh_set_basic()
1557 struct ocelot_port *ocelot_port = ocelot->ports[port]; in ocelot_get_bond_mask() local
1559 if (!ocelot_port) in ocelot_get_bond_mask()
1562 if (ocelot_port->bond == bond) in ocelot_get_bond_mask()
1594 struct ocelot_port *cpu) in ocelot_dsa_8021q_cpu_assigned_ports()
1600 struct ocelot_port *ocelot_port = ocelot->ports[port]; in ocelot_dsa_8021q_cpu_assigned_ports() local
1602 if (!ocelot_port) in ocelot_dsa_8021q_cpu_assigned_ports()
1605 if (ocelot_port->dsa_8021q_cpu == cpu) in ocelot_dsa_8021q_cpu_assigned_ports()
1620 struct ocelot_port *ocelot_port = ocelot->ports[port]; in ocelot_port_assigned_dsa_8021q_cpu_mask() local
1621 struct ocelot_port *cpu_port = ocelot_port->dsa_8021q_cpu; in ocelot_port_assigned_dsa_8021q_cpu_mask()
1635 struct ocelot_port *ocelot_port = ocelot->ports[src_port]; in ocelot_get_bridge_fwd_mask() local
1640 if (!ocelot_port || ocelot_port->stp_state != BR_STATE_FORWARDING) in ocelot_get_bridge_fwd_mask()
1643 bridge = ocelot_port->bridge; in ocelot_get_bridge_fwd_mask()
1648 ocelot_port = ocelot->ports[port]; in ocelot_get_bridge_fwd_mask()
1650 if (!ocelot_port) in ocelot_get_bridge_fwd_mask()
1653 if (ocelot_port->stp_state == BR_STATE_FORWARDING && in ocelot_get_bridge_fwd_mask()
1654 ocelot_port->bridge == bridge) in ocelot_get_bridge_fwd_mask()
1679 struct ocelot_port *ocelot_port = ocelot->ports[port]; in ocelot_apply_bridge_fwd_mask() local
1682 if (!ocelot_port) { in ocelot_apply_bridge_fwd_mask()
1685 } else if (ocelot_port->is_dsa_8021q_cpu) { in ocelot_apply_bridge_fwd_mask()
1690 ocelot_port); in ocelot_apply_bridge_fwd_mask()
1691 } else if (ocelot_port->bridge) { in ocelot_apply_bridge_fwd_mask()
1692 struct net_device *bond = ocelot_port->bond; in ocelot_apply_bridge_fwd_mask()
1738 struct ocelot_port *ocelot_port = ocelot->ports[port]; in ocelot_update_pgid_cpu() local
1740 if (!ocelot_port || !ocelot_port->is_dsa_8021q_cpu) in ocelot_update_pgid_cpu()
1754 struct ocelot_port *cpu_port = ocelot->ports[cpu]; in ocelot_port_setup_dsa_8021q_cpu()
1772 struct ocelot_port *cpu_port = ocelot->ports[cpu]; in ocelot_port_teardown_dsa_8021q_cpu()
1791 struct ocelot_port *cpu_port = ocelot->ports[cpu]; in ocelot_port_assign_dsa_8021q_cpu()
1815 struct ocelot_port *ocelot_port = ocelot->ports[port]; in ocelot_bridge_stp_state_set() local
1820 ocelot_port->stp_state = state; in ocelot_bridge_stp_state_set()
1823 ocelot_port->learn_ena) in ocelot_bridge_stp_state_set()
2062 struct ocelot_port *ocelot_port = ocelot->ports[port]; in ocelot_port_bridge_join() local
2071 ocelot_port->bridge = bridge; in ocelot_port_bridge_join()
2072 ocelot_port->bridge_num = bridge_num; in ocelot_port_bridge_join()
2088 struct ocelot_port *ocelot_port = ocelot->ports[port]; in ocelot_port_bridge_leave() local
2095 ocelot_port->bridge = NULL; in ocelot_port_bridge_leave()
2096 ocelot_port->bridge_num = -1; in ocelot_port_bridge_leave()
2128 struct ocelot_port *ocelot_port = ocelot->ports[port]; in ocelot_set_aggr_pgids() local
2130 if (!ocelot_port || !ocelot_port->bond) in ocelot_set_aggr_pgids()
2149 struct ocelot_port *ocelot_port = ocelot->ports[port]; in ocelot_set_aggr_pgids() local
2155 if (ocelot_port->lag_tx_active) in ocelot_set_aggr_pgids()
2176 struct ocelot_port *ocelot_port = ocelot->ports[port]; in ocelot_set_aggr_pgids() local
2178 if (!ocelot_port) in ocelot_set_aggr_pgids()
2181 if (ocelot_port->bond == bond) in ocelot_set_aggr_pgids()
2197 struct ocelot_port *ocelot_port = ocelot->ports[port]; in ocelot_setup_logical_port_ids() local
2200 if (!ocelot_port) in ocelot_setup_logical_port_ids()
2203 bond = ocelot_port->bond; in ocelot_setup_logical_port_ids()
2372 struct ocelot_port *ocelot_port = ocelot->ports[port]; in ocelot_port_lag_change() local
2376 ocelot_port->lag_tx_active = lag_tx_active; in ocelot_port_lag_change()
2459 struct ocelot_port *ocelot_port = ocelot->ports[port]; in ocelot_port_set_maxlen() local
2473 ocelot_port_writel(ocelot_port, maxlen, DEV_MAC_MAXLEN_CFG); in ocelot_port_set_maxlen()
2512 struct ocelot_port *ocelot_port = ocelot->ports[port]; in ocelot_port_set_learning() local
2521 ocelot_port->learn_ena = enabled; in ocelot_port_set_learning()
2837 struct ocelot_port *ocelot_port = ocelot->ports[port]; in ocelot_init_port() local
2839 skb_queue_head_init(&ocelot_port->tx_skbs); in ocelot_init_port()
2847 ocelot_port_writel(ocelot_port, DEV_MAC_IFG_CFG_TX_IFG(5), in ocelot_init_port()
2851 ocelot_port_writel(ocelot_port, DEV_MAC_HDX_CFG_LATE_COL_POS(67) | in ocelot_init_port()
2855 ocelot_port_writel(ocelot_port, DEV_MAC_HDX_CFG_LATE_COL_POS(67), in ocelot_init_port()
2860 ocelot_port_writel(ocelot_port, DEV_MAC_TAGS_CFG_TAG_ID(ETH_P_8021AD) | in ocelot_init_port()
2867 ocelot_port_writel(ocelot_port, 0, DEV_MAC_FC_MAC_HIGH_CFG); in ocelot_init_port()
2868 ocelot_port_writel(ocelot_port, 0, DEV_MAC_FC_MAC_LOW_CFG); in ocelot_init_port()
3152 struct ocelot_port *ocelot_port = ocelot->ports[port]; in ocelot_deinit_port() local
3154 skb_queue_purge(&ocelot_port->tx_skbs); in ocelot_deinit_port()