Lines Matching refs:mac_dev

219 	mac_addr = priv->mac_dev->addr;  in dpaa_netdev_init()
221 net_dev->mem_start = priv->mac_dev->res->start; in dpaa_netdev_init()
222 net_dev->mem_end = priv->mac_dev->res->end; in dpaa_netdev_init()
249 err = priv->mac_dev->change_addr(priv->mac_dev->fman_mac, in dpaa_netdev_init()
278 struct mac_device *mac_dev; in dpaa_stop() local
283 mac_dev = priv->mac_dev; in dpaa_stop()
291 err = mac_dev->stop(mac_dev); in dpaa_stop()
296 for (i = 0; i < ARRAY_SIZE(mac_dev->port); i++) { in dpaa_stop()
297 error = fman_port_disable(mac_dev->port[i]); in dpaa_stop()
393 struct mac_device *mac_dev; in dpaa_mac_dev_get() local
401 mac_dev = eth_data->mac_dev; in dpaa_mac_dev_get()
402 if (!mac_dev) { in dpaa_mac_dev_get()
407 return mac_dev; in dpaa_mac_dev_get()
413 struct mac_device *mac_dev; in dpaa_set_mac_address() local
427 mac_dev = priv->mac_dev; in dpaa_set_mac_address()
429 err = mac_dev->change_addr(mac_dev->fman_mac, in dpaa_set_mac_address()
450 if (!!(net_dev->flags & IFF_PROMISC) != priv->mac_dev->promisc) { in dpaa_set_rx_mode()
451 priv->mac_dev->promisc = !priv->mac_dev->promisc; in dpaa_set_rx_mode()
452 err = priv->mac_dev->set_promisc(priv->mac_dev->fman_mac, in dpaa_set_rx_mode()
453 priv->mac_dev->promisc); in dpaa_set_rx_mode()
460 if (!!(net_dev->flags & IFF_ALLMULTI) != priv->mac_dev->allmulti) { in dpaa_set_rx_mode()
461 priv->mac_dev->allmulti = !priv->mac_dev->allmulti; in dpaa_set_rx_mode()
462 err = priv->mac_dev->set_allmulti(priv->mac_dev->fman_mac, in dpaa_set_rx_mode()
463 priv->mac_dev->allmulti); in dpaa_set_rx_mode()
470 err = priv->mac_dev->set_multi(net_dev, priv->mac_dev); in dpaa_set_rx_mode()
834 if (priv->mac_dev->if_support & SUPPORTED_10000baseT_Full) in dpaa_eth_cgr_init()
854 priv->cgr_data.cgr.cgrid, priv->mac_dev->addr, in dpaa_eth_cgr_init()
1273 static int dpaa_eth_init_ports(struct mac_device *mac_dev, in dpaa_eth_init_ports() argument
1279 struct fman_port *rxport = mac_dev->port[RX]; in dpaa_eth_init_ports()
1280 struct fman_port *txport = mac_dev->port[TX]; in dpaa_eth_init_ports()
1685 if (!fman_port_get_tstamp(priv->mac_dev->port[TX], vaddr, in dpaa_cleanup_tx_fd()
2699 if (!fman_port_get_tstamp(priv->mac_dev->port[RX], vaddr, &ns)) in rx_default_dqrr()
2707 !fman_port_get_hash_result_offset(priv->mac_dev->port[RX], in rx_default_dqrr()
2879 struct mac_device *mac_dev; in dpaa_adjust_link() local
2883 mac_dev = priv->mac_dev; in dpaa_adjust_link()
2884 mac_dev->adjust_link(mac_dev); in dpaa_adjust_link()
2893 struct mac_device *mac_dev; in dpaa_phy_init() local
2898 mac_dev = priv->mac_dev; in dpaa_phy_init()
2900 phy_dev = of_phy_connect(net_dev, mac_dev->phy_node, in dpaa_phy_init()
2902 mac_dev->phy_if); in dpaa_phy_init()
2909 if (mac_dev->phy_if != PHY_INTERFACE_MODE_XGMII || in dpaa_phy_init()
2913 mac_dev->if_support); in dpaa_phy_init()
2919 mac_dev->phy_dev = phy_dev; in dpaa_phy_init()
2927 struct mac_device *mac_dev; in dpaa_open() local
2932 mac_dev = priv->mac_dev; in dpaa_open()
2939 for (i = 0; i < ARRAY_SIZE(mac_dev->port); i++) { in dpaa_open()
2940 err = fman_port_enable(mac_dev->port[i]); in dpaa_open()
2945 err = priv->mac_dev->start(mac_dev); in dpaa_open()
2956 for (i = 0; i < ARRAY_SIZE(mac_dev->port); i++) in dpaa_open()
2957 fman_port_disable(mac_dev->port[i]); in dpaa_open()
3087 priv->mac_dev->set_tstamp(priv->mac_dev->fman_mac, true); in dpaa_ts_ioctl()
3100 priv->mac_dev->set_tstamp(priv->mac_dev->fman_mac, true); in dpaa_ts_ioctl()
3246 priv->ingress_cgr.cgrid, priv->mac_dev->addr); in dpaa_ingress_cgr_init()
3290 struct mac_device *mac_dev; in dpaa_eth_probe() local
3345 mac_dev = dpaa_mac_dev_get(pdev); in dpaa_eth_probe()
3346 if (IS_ERR(mac_dev)) { in dpaa_eth_probe()
3348 err = PTR_ERR(mac_dev); in dpaa_eth_probe()
3353 priv->rx_dma_dev = fman_port_get_device(mac_dev->port[RX]); in dpaa_eth_probe()
3354 priv->tx_dma_dev = fman_port_get_device(mac_dev->port[TX]); in dpaa_eth_probe()
3406 priv->mac_dev = mac_dev; in dpaa_eth_probe()
3422 dpaa_fq_setup(priv, &dpaa_fq_cbs, priv->mac_dev->port[TX]); in dpaa_eth_probe()
3452 err = dpaa_eth_init_ports(mac_dev, dpaa_bp, &port_fqs, in dpaa_eth_probe()