Lines Matching refs:gbe_intf

683 struct gbe_intf {  struct
1684 struct gbe_intf *gbe_intf; in keystone_get_stat_strings() local
1688 gbe_intf = netcp_module_get_intf_data(&gbe_module, netcp); in keystone_get_stat_strings()
1689 if (!gbe_intf) in keystone_get_stat_strings()
1691 gbe_dev = gbe_intf->gbe_dev; in keystone_get_stat_strings()
1709 struct gbe_intf *gbe_intf; in keystone_get_sset_count() local
1712 gbe_intf = netcp_module_get_intf_data(&gbe_module, netcp); in keystone_get_sset_count()
1713 if (!gbe_intf) in keystone_get_sset_count()
1715 gbe_dev = gbe_intf->gbe_dev; in keystone_get_sset_count()
1827 struct gbe_intf *gbe_intf; in keystone_get_ethtool_stats() local
1830 gbe_intf = netcp_module_get_intf_data(&gbe_module, netcp); in keystone_get_ethtool_stats()
1831 if (!gbe_intf) in keystone_get_ethtool_stats()
1834 gbe_dev = gbe_intf->gbe_dev; in keystone_get_ethtool_stats()
1848 struct gbe_intf *gbe_intf; in keystone_get_settings() local
1854 gbe_intf = netcp_module_get_intf_data(&gbe_module, netcp); in keystone_get_settings()
1855 if (!gbe_intf) in keystone_get_settings()
1858 if (!gbe_intf->slave) in keystone_get_settings()
1863 cmd->port = gbe_intf->slave->phy_port_t; in keystone_get_settings()
1873 struct gbe_intf *gbe_intf; in keystone_set_settings() local
1879 gbe_intf = netcp_module_get_intf_data(&gbe_module, netcp); in keystone_set_settings()
1880 if (!gbe_intf) in keystone_set_settings()
1883 if (!gbe_intf->slave) in keystone_set_settings()
1886 if (cmd->port != gbe_intf->slave->phy_port_t) { in keystone_set_settings()
1903 gbe_intf->slave->phy_port_t = cmd->port; in keystone_set_settings()
1924 struct gbe_intf *gbe_intf) in gbe_set_slave_mac() argument
1926 struct net_device *ndev = gbe_intf->ndev; in gbe_set_slave_mac()
2016 struct gbe_intf *gbe_intf; in xgbe_adjust_link() local
2018 gbe_intf = netcp_module_get_intf_data(&xgbe_module, netcp); in xgbe_adjust_link()
2019 if (!gbe_intf) in xgbe_adjust_link()
2022 netcp_ethss_update_link_state(gbe_intf->gbe_dev, gbe_intf->slave, in xgbe_adjust_link()
2029 struct gbe_intf *gbe_intf; in gbe_adjust_link() local
2031 gbe_intf = netcp_module_get_intf_data(&gbe_module, netcp); in gbe_adjust_link()
2032 if (!gbe_intf) in gbe_adjust_link()
2035 netcp_ethss_update_link_state(gbe_intf->gbe_dev, gbe_intf->slave, in gbe_adjust_link()
2106 static void gbe_slave_stop(struct gbe_intf *intf) in gbe_slave_stop()
2137 static int gbe_slave_open(struct gbe_intf *gbe_intf) in gbe_slave_open() argument
2139 struct gbe_priv *priv = gbe_intf->gbe_dev; in gbe_slave_open()
2140 struct gbe_slave *slave = gbe_intf->slave; in gbe_slave_open()
2150 gbe_set_slave_mac(slave, gbe_intf); in gbe_slave_open()
2154 cpsw_ale_add_mcast(priv->ale, gbe_intf->ndev->broadcast, in gbe_slave_open()
2171 slave->phy = of_phy_connect(gbe_intf->ndev, in gbe_slave_open()
2230 static void gbe_add_mcast_addr(struct gbe_intf *gbe_intf, u8 *addr) in gbe_add_mcast_addr() argument
2232 struct gbe_priv *gbe_dev = gbe_intf->gbe_dev; in gbe_add_mcast_addr()
2238 for_each_set_bit(vlan_id, gbe_intf->active_vlans, VLAN_N_VID) { in gbe_add_mcast_addr()
2245 static void gbe_add_ucast_addr(struct gbe_intf *gbe_intf, u8 *addr) in gbe_add_ucast_addr() argument
2247 struct gbe_priv *gbe_dev = gbe_intf->gbe_dev; in gbe_add_ucast_addr()
2252 for_each_set_bit(vlan_id, gbe_intf->active_vlans, VLAN_N_VID) in gbe_add_ucast_addr()
2257 static void gbe_del_mcast_addr(struct gbe_intf *gbe_intf, u8 *addr) in gbe_del_mcast_addr() argument
2259 struct gbe_priv *gbe_dev = gbe_intf->gbe_dev; in gbe_del_mcast_addr()
2264 for_each_set_bit(vlan_id, gbe_intf->active_vlans, VLAN_N_VID) { in gbe_del_mcast_addr()
2269 static void gbe_del_ucast_addr(struct gbe_intf *gbe_intf, u8 *addr) in gbe_del_ucast_addr() argument
2271 struct gbe_priv *gbe_dev = gbe_intf->gbe_dev; in gbe_del_ucast_addr()
2276 for_each_set_bit(vlan_id, gbe_intf->active_vlans, VLAN_N_VID) { in gbe_del_ucast_addr()
2284 struct gbe_intf *gbe_intf = intf_priv; in gbe_add_addr() local
2285 struct gbe_priv *gbe_dev = gbe_intf->gbe_dev; in gbe_add_addr()
2293 gbe_add_mcast_addr(gbe_intf, naddr->addr); in gbe_add_addr()
2297 gbe_add_ucast_addr(gbe_intf, naddr->addr); in gbe_add_addr()
2310 struct gbe_intf *gbe_intf = intf_priv; in gbe_del_addr() local
2311 struct gbe_priv *gbe_dev = gbe_intf->gbe_dev; in gbe_del_addr()
2319 gbe_del_mcast_addr(gbe_intf, naddr->addr); in gbe_del_addr()
2323 gbe_del_ucast_addr(gbe_intf, naddr->addr); in gbe_del_addr()
2336 struct gbe_intf *gbe_intf = intf_priv; in gbe_add_vid() local
2337 struct gbe_priv *gbe_dev = gbe_intf->gbe_dev; in gbe_add_vid()
2339 set_bit(vid, gbe_intf->active_vlans); in gbe_add_vid()
2352 struct gbe_intf *gbe_intf = intf_priv; in gbe_del_vid() local
2353 struct gbe_priv *gbe_dev = gbe_intf->gbe_dev; in gbe_del_vid()
2356 clear_bit(vid, gbe_intf->active_vlans); in gbe_del_vid()
2362 struct gbe_intf *gbe_intf = intf_priv; in gbe_ioctl() local
2363 struct phy_device *phy = gbe_intf->slave->phy; in gbe_ioctl()
2375 struct gbe_intf *gbe_intf; in netcp_ethss_timer() local
2379 for_each_intf(gbe_intf, gbe_dev) { in netcp_ethss_timer()
2380 if (!gbe_intf->slave->open) in netcp_ethss_timer()
2382 netcp_ethss_update_link_state(gbe_dev, gbe_intf->slave, in netcp_ethss_timer()
2383 gbe_intf->ndev); in netcp_ethss_timer()
2407 struct gbe_intf *gbe_intf = data; in gbe_tx_hook() local
2409 p_info->tx_pipe = &gbe_intf->tx_pipe; in gbe_tx_hook()
2415 struct gbe_intf *gbe_intf = intf_priv; in gbe_open() local
2416 struct gbe_priv *gbe_dev = gbe_intf->gbe_dev; in gbe_open()
2418 struct gbe_slave *slave = gbe_intf->slave; in gbe_open()
2430 gbe_intf->tx_pipe.flags = SWITCH_TO_PORT_IN_TAGINFO; in gbe_open()
2433 gbe_intf->tx_pipe.switch_to_port = 0; in gbe_open()
2435 gbe_intf->tx_pipe.switch_to_port = port_num; in gbe_open()
2439 gbe_intf->tx_pipe.dma_chan_name, in gbe_open()
2440 gbe_intf->tx_pipe.dma_channel, in gbe_open()
2441 gbe_intf->tx_pipe.switch_to_port, in gbe_open()
2442 gbe_intf->tx_pipe.flags); in gbe_open()
2444 gbe_slave_stop(gbe_intf); in gbe_open()
2456 ret = gbe_slave_open(gbe_intf); in gbe_open()
2461 gbe_intf); in gbe_open()
2468 gbe_slave_stop(gbe_intf); in gbe_open()
2474 struct gbe_intf *gbe_intf = intf_priv; in gbe_close() local
2477 gbe_slave_stop(gbe_intf); in gbe_close()
2479 gbe_intf); in gbe_close()
2481 gbe_intf->slave->open = false; in gbe_close()
2482 atomic_set(&gbe_intf->slave->link_state, NETCP_LINK_STATE_INVALID); in gbe_close()
3211 struct gbe_intf *gbe_intf; in gbe_attach() local
3219 gbe_intf = devm_kzalloc(gbe_dev->dev, sizeof(*gbe_intf), GFP_KERNEL); in gbe_attach()
3220 if (!gbe_intf) in gbe_attach()
3223 gbe_intf->ndev = ndev; in gbe_attach()
3224 gbe_intf->dev = gbe_dev->dev; in gbe_attach()
3225 gbe_intf->gbe_dev = gbe_dev; in gbe_attach()
3227 gbe_intf->slave = devm_kzalloc(gbe_dev->dev, in gbe_attach()
3228 sizeof(*gbe_intf->slave), in gbe_attach()
3230 if (!gbe_intf->slave) { in gbe_attach()
3235 if (init_slave(gbe_dev, gbe_intf->slave, node)) { in gbe_attach()
3240 gbe_intf->tx_pipe = gbe_dev->tx_pipe; in gbe_attach()
3242 list_add_tail(&gbe_intf->gbe_intf_list, &gbe_dev->gbe_intf_head); in gbe_attach()
3243 *intf_priv = gbe_intf; in gbe_attach()
3247 if (gbe_intf->slave) in gbe_attach()
3248 devm_kfree(gbe_dev->dev, gbe_intf->slave); in gbe_attach()
3249 if (gbe_intf) in gbe_attach()
3250 devm_kfree(gbe_dev->dev, gbe_intf); in gbe_attach()
3256 struct gbe_intf *gbe_intf = intf_priv; in gbe_release() local
3258 gbe_intf->ndev->ethtool_ops = NULL; in gbe_release()
3259 list_del(&gbe_intf->gbe_intf_list); in gbe_release()
3260 devm_kfree(gbe_intf->dev, gbe_intf->slave); in gbe_release()
3261 devm_kfree(gbe_intf->dev, gbe_intf); in gbe_release()