Lines Matching refs:mac_dev
46 static void mac_exception(struct mac_device *mac_dev, in mac_exception() argument
51 mac_dev->set_exception(mac_dev->fman_mac, in mac_exception()
53 dev_err(mac_dev->dev, "10G MAC got RX FIFO Error = %x\n", ex); in mac_exception()
56 dev_dbg(mac_dev->dev, "%s:%s() -> %d\n", KBUILD_BASENAME ".c", in mac_exception()
60 int fman_set_multi(struct net_device *net_dev, struct mac_device *mac_dev) in fman_set_multi() argument
68 priv = mac_dev->priv; in fman_set_multi()
73 err = mac_dev->remove_hash_mac_addr(mac_dev->fman_mac, addr); in fman_set_multi()
84 err = mac_dev->add_hash_mac_addr(mac_dev->fman_mac, addr); in fman_set_multi()
101 struct mac_device *mac_dev) in dpaa_eth_add_device() argument
109 priv = mac_dev->priv; in dpaa_eth_add_device()
111 data.mac_dev = mac_dev; in dpaa_eth_add_device()
122 pdev->dev.parent = mac_dev->dev; in dpaa_eth_add_device()
156 int (*init)(struct mac_device *mac_dev, struct device_node *mac_node, in mac_probe()
160 struct mac_device *mac_dev; in mac_probe() local
172 mac_dev = devm_kzalloc(dev, sizeof(*mac_dev), GFP_KERNEL); in mac_probe()
173 if (!mac_dev) in mac_probe()
178 platform_set_drvdata(_of_dev, mac_dev); in mac_probe()
181 mac_dev->priv = priv; in mac_probe()
182 mac_dev->dev = dev; in mac_probe()
200 mac_dev->fman_dev = &of_dev->dev; in mac_probe()
212 priv->fman = fman_bind(mac_dev->fman_dev); in mac_probe()
223 put_device(mac_dev->fman_dev); in mac_probe()
228 mac_dev->res = platform_get_mem_or_io(_of_dev, 0); in mac_probe()
229 if (!mac_dev->res) { in mac_probe()
236 mac_dev->res); in mac_probe()
242 mac_dev->vaddr = devm_ioremap(dev, mac_dev->res->start, in mac_probe()
243 resource_size(mac_dev->res)); in mac_probe()
244 if (!mac_dev->vaddr) { in mac_probe()
265 err = of_get_mac_address(mac_node, mac_dev->addr); in mac_probe()
278 if (nph != ARRAY_SIZE(mac_dev->port)) { in mac_probe()
303 mac_dev->fman_port_devs[i] = &of_dev->dev; in mac_probe()
305 mac_dev->port[i] = fman_port_bind(mac_dev->fman_port_devs[i]); in mac_probe()
306 if (!mac_dev->port[i]) { in mac_probe()
316 put_device(mac_dev->fman_port_devs[i]); in mac_probe()
329 mac_dev->phy_if = phy_if; in mac_probe()
336 err = init(mac_dev, mac_node, ¶ms); in mac_probe()
340 if (!is_zero_ether_addr(mac_dev->addr)) in mac_probe()
341 dev_info(dev, "FMan MAC address: %pM\n", mac_dev->addr); in mac_probe()
343 priv->eth_dev = dpaa_eth_add_device(fman_id, mac_dev); in mac_probe()
356 put_device(mac_dev->fman_port_devs[i]); in mac_probe()
358 put_device(mac_dev->fman_dev); in mac_probe()
366 struct mac_device *mac_dev = platform_get_drvdata(pdev); in mac_remove() local
370 put_device(mac_dev->fman_port_devs[i]); in mac_remove()
371 put_device(mac_dev->fman_dev); in mac_remove()
373 platform_device_unregister(mac_dev->priv->eth_dev); in mac_remove()