Lines Matching refs:gbe_intf
684 struct gbe_intf { struct
1514 struct gbe_intf *gbe_intf; in keystone_get_stat_strings() local
1518 gbe_intf = netcp_module_get_intf_data(&gbe_module, netcp); in keystone_get_stat_strings()
1519 if (!gbe_intf) in keystone_get_stat_strings()
1521 gbe_dev = gbe_intf->gbe_dev; in keystone_get_stat_strings()
1539 struct gbe_intf *gbe_intf; in keystone_get_sset_count() local
1542 gbe_intf = netcp_module_get_intf_data(&gbe_module, netcp); in keystone_get_sset_count()
1543 if (!gbe_intf) in keystone_get_sset_count()
1545 gbe_dev = gbe_intf->gbe_dev; in keystone_get_sset_count()
1630 struct gbe_intf *gbe_intf; in keystone_get_ethtool_stats() local
1633 gbe_intf = netcp_module_get_intf_data(&gbe_module, netcp); in keystone_get_ethtool_stats()
1634 if (!gbe_intf) in keystone_get_ethtool_stats()
1637 gbe_dev = gbe_intf->gbe_dev; in keystone_get_ethtool_stats()
1651 struct gbe_intf *gbe_intf; in keystone_get_settings() local
1657 gbe_intf = netcp_module_get_intf_data(&gbe_module, netcp); in keystone_get_settings()
1658 if (!gbe_intf) in keystone_get_settings()
1661 if (!gbe_intf->slave) in keystone_get_settings()
1666 cmd->port = gbe_intf->slave->phy_port_t; in keystone_get_settings()
1676 struct gbe_intf *gbe_intf; in keystone_set_settings() local
1682 gbe_intf = netcp_module_get_intf_data(&gbe_module, netcp); in keystone_set_settings()
1683 if (!gbe_intf) in keystone_set_settings()
1686 if (!gbe_intf->slave) in keystone_set_settings()
1689 if (cmd->port != gbe_intf->slave->phy_port_t) { in keystone_set_settings()
1706 gbe_intf->slave->phy_port_t = cmd->port; in keystone_set_settings()
1727 struct gbe_intf *gbe_intf) in gbe_set_slave_mac() argument
1729 struct net_device *ndev = gbe_intf->ndev; in gbe_set_slave_mac()
1824 struct gbe_intf *gbe_intf; in xgbe_adjust_link() local
1826 gbe_intf = netcp_module_get_intf_data(&xgbe_module, netcp); in xgbe_adjust_link()
1827 if (!gbe_intf) in xgbe_adjust_link()
1830 netcp_ethss_update_link_state(gbe_intf->gbe_dev, gbe_intf->slave, in xgbe_adjust_link()
1837 struct gbe_intf *gbe_intf; in gbe_adjust_link() local
1839 gbe_intf = netcp_module_get_intf_data(&gbe_module, netcp); in gbe_adjust_link()
1840 if (!gbe_intf) in gbe_adjust_link()
1843 netcp_ethss_update_link_state(gbe_intf->gbe_dev, gbe_intf->slave, in gbe_adjust_link()
1904 static void gbe_slave_stop(struct gbe_intf *intf) in gbe_slave_stop()
1939 static int gbe_slave_open(struct gbe_intf *gbe_intf) in gbe_slave_open() argument
1941 struct gbe_priv *priv = gbe_intf->gbe_dev; in gbe_slave_open()
1942 struct gbe_slave *slave = gbe_intf->slave; in gbe_slave_open()
1951 gbe_set_slave_mac(slave, gbe_intf); in gbe_slave_open()
1955 cpsw_ale_add_mcast(priv->ale, gbe_intf->ndev->broadcast, in gbe_slave_open()
1972 slave->phy = of_phy_connect(gbe_intf->ndev, in gbe_slave_open()
2031 static void gbe_add_mcast_addr(struct gbe_intf *gbe_intf, u8 *addr) in gbe_add_mcast_addr() argument
2033 struct gbe_priv *gbe_dev = gbe_intf->gbe_dev; in gbe_add_mcast_addr()
2039 for_each_set_bit(vlan_id, gbe_intf->active_vlans, VLAN_N_VID) { in gbe_add_mcast_addr()
2046 static void gbe_add_ucast_addr(struct gbe_intf *gbe_intf, u8 *addr) in gbe_add_ucast_addr() argument
2048 struct gbe_priv *gbe_dev = gbe_intf->gbe_dev; in gbe_add_ucast_addr()
2053 for_each_set_bit(vlan_id, gbe_intf->active_vlans, VLAN_N_VID) in gbe_add_ucast_addr()
2058 static void gbe_del_mcast_addr(struct gbe_intf *gbe_intf, u8 *addr) in gbe_del_mcast_addr() argument
2060 struct gbe_priv *gbe_dev = gbe_intf->gbe_dev; in gbe_del_mcast_addr()
2065 for_each_set_bit(vlan_id, gbe_intf->active_vlans, VLAN_N_VID) { in gbe_del_mcast_addr()
2070 static void gbe_del_ucast_addr(struct gbe_intf *gbe_intf, u8 *addr) in gbe_del_ucast_addr() argument
2072 struct gbe_priv *gbe_dev = gbe_intf->gbe_dev; in gbe_del_ucast_addr()
2077 for_each_set_bit(vlan_id, gbe_intf->active_vlans, VLAN_N_VID) { in gbe_del_ucast_addr()
2085 struct gbe_intf *gbe_intf = intf_priv; in gbe_add_addr() local
2086 struct gbe_priv *gbe_dev = gbe_intf->gbe_dev; in gbe_add_addr()
2094 gbe_add_mcast_addr(gbe_intf, naddr->addr); in gbe_add_addr()
2098 gbe_add_ucast_addr(gbe_intf, naddr->addr); in gbe_add_addr()
2111 struct gbe_intf *gbe_intf = intf_priv; in gbe_del_addr() local
2112 struct gbe_priv *gbe_dev = gbe_intf->gbe_dev; in gbe_del_addr()
2120 gbe_del_mcast_addr(gbe_intf, naddr->addr); in gbe_del_addr()
2124 gbe_del_ucast_addr(gbe_intf, naddr->addr); in gbe_del_addr()
2137 struct gbe_intf *gbe_intf = intf_priv; in gbe_add_vid() local
2138 struct gbe_priv *gbe_dev = gbe_intf->gbe_dev; in gbe_add_vid()
2140 set_bit(vid, gbe_intf->active_vlans); in gbe_add_vid()
2153 struct gbe_intf *gbe_intf = intf_priv; in gbe_del_vid() local
2154 struct gbe_priv *gbe_dev = gbe_intf->gbe_dev; in gbe_del_vid()
2157 clear_bit(vid, gbe_intf->active_vlans); in gbe_del_vid()
2163 struct gbe_intf *gbe_intf = intf_priv; in gbe_ioctl() local
2164 struct phy_device *phy = gbe_intf->slave->phy; in gbe_ioctl()
2176 struct gbe_intf *gbe_intf; in netcp_ethss_timer() local
2180 for_each_intf(gbe_intf, gbe_dev) { in netcp_ethss_timer()
2181 if (!gbe_intf->slave->open) in netcp_ethss_timer()
2183 netcp_ethss_update_link_state(gbe_dev, gbe_intf->slave, in netcp_ethss_timer()
2184 gbe_intf->ndev); in netcp_ethss_timer()
2207 struct gbe_intf *gbe_intf = data; in gbe_tx_hook() local
2209 p_info->tx_pipe = &gbe_intf->tx_pipe; in gbe_tx_hook()
2215 struct gbe_intf *gbe_intf = intf_priv; in gbe_open() local
2216 struct gbe_priv *gbe_dev = gbe_intf->gbe_dev; in gbe_open()
2218 struct gbe_slave *slave = gbe_intf->slave; in gbe_open()
2230 gbe_intf->tx_pipe.flags = SWITCH_TO_PORT_IN_TAGINFO; in gbe_open()
2233 gbe_intf->tx_pipe.switch_to_port = 0; in gbe_open()
2235 gbe_intf->tx_pipe.switch_to_port = port_num; in gbe_open()
2239 gbe_intf->tx_pipe.dma_chan_name, in gbe_open()
2240 gbe_intf->tx_pipe.dma_channel, in gbe_open()
2241 gbe_intf->tx_pipe.switch_to_port, in gbe_open()
2242 gbe_intf->tx_pipe.flags); in gbe_open()
2244 gbe_slave_stop(gbe_intf); in gbe_open()
2256 ret = gbe_slave_open(gbe_intf); in gbe_open()
2261 gbe_intf); in gbe_open()
2268 gbe_slave_stop(gbe_intf); in gbe_open()
2274 struct gbe_intf *gbe_intf = intf_priv; in gbe_close() local
2277 gbe_slave_stop(gbe_intf); in gbe_close()
2279 gbe_intf); in gbe_close()
2281 gbe_intf->slave->open = false; in gbe_close()
2282 atomic_set(&gbe_intf->slave->link_state, NETCP_LINK_STATE_INVALID); in gbe_close()
2961 struct gbe_intf *gbe_intf; in gbe_attach() local
2969 gbe_intf = devm_kzalloc(gbe_dev->dev, sizeof(*gbe_intf), GFP_KERNEL); in gbe_attach()
2970 if (!gbe_intf) in gbe_attach()
2973 gbe_intf->ndev = ndev; in gbe_attach()
2974 gbe_intf->dev = gbe_dev->dev; in gbe_attach()
2975 gbe_intf->gbe_dev = gbe_dev; in gbe_attach()
2977 gbe_intf->slave = devm_kzalloc(gbe_dev->dev, in gbe_attach()
2978 sizeof(*gbe_intf->slave), in gbe_attach()
2980 if (!gbe_intf->slave) { in gbe_attach()
2985 if (init_slave(gbe_dev, gbe_intf->slave, node)) { in gbe_attach()
2990 gbe_intf->tx_pipe = gbe_dev->tx_pipe; in gbe_attach()
2992 list_add_tail(&gbe_intf->gbe_intf_list, &gbe_dev->gbe_intf_head); in gbe_attach()
2993 *intf_priv = gbe_intf; in gbe_attach()
2997 if (gbe_intf->slave) in gbe_attach()
2998 devm_kfree(gbe_dev->dev, gbe_intf->slave); in gbe_attach()
2999 if (gbe_intf) in gbe_attach()
3000 devm_kfree(gbe_dev->dev, gbe_intf); in gbe_attach()
3006 struct gbe_intf *gbe_intf = intf_priv; in gbe_release() local
3008 gbe_intf->ndev->ethtool_ops = NULL; in gbe_release()
3009 list_del(&gbe_intf->gbe_intf_list); in gbe_release()
3010 devm_kfree(gbe_intf->dev, gbe_intf->slave); in gbe_release()
3011 devm_kfree(gbe_intf->dev, gbe_intf); in gbe_release()