Lines Matching refs:netdev
101 struct emac_adapter *adpt = netdev_priv(rx_q->netdev); in emac_napi_rtx()
119 struct net_device *netdev) in emac_start_xmit() argument
121 struct emac_adapter *adpt = netdev_priv(netdev); in emac_start_xmit()
145 adpt->netdev->name, status & ISR_ERROR); in emac_isr()
165 adpt->netdev->name); in emac_isr()
175 static int emac_set_features(struct net_device *netdev, in emac_set_features() argument
178 netdev_features_t changed = features ^ netdev->features; in emac_set_features()
179 struct emac_adapter *adpt = netdev_priv(netdev); in emac_set_features()
187 if (!netif_running(netdev)) in emac_set_features()
193 netdev->features = features; in emac_set_features()
199 static void emac_rx_mode_set(struct net_device *netdev) in emac_rx_mode_set() argument
201 struct emac_adapter *adpt = netdev_priv(netdev); in emac_rx_mode_set()
208 netdev_for_each_mc_addr(ha, netdev) in emac_rx_mode_set()
213 static int emac_change_mtu(struct net_device *netdev, int new_mtu) in emac_change_mtu() argument
215 struct emac_adapter *adpt = netdev_priv(netdev); in emac_change_mtu()
217 netif_dbg(adpt, hw, adpt->netdev, in emac_change_mtu()
218 "changing MTU from %d to %d\n", netdev->mtu, in emac_change_mtu()
220 netdev->mtu = new_mtu; in emac_change_mtu()
222 if (netif_running(netdev)) in emac_change_mtu()
229 static int emac_open(struct net_device *netdev) in emac_open() argument
231 struct emac_adapter *adpt = netdev_priv(netdev); in emac_open()
237 netdev_err(adpt->netdev, "could not request emac-core0 irq\n"); in emac_open()
244 netdev_err(adpt->netdev, "error allocating rx/tx rings\n"); in emac_open()
268 static int emac_close(struct net_device *netdev) in emac_close() argument
270 struct emac_adapter *adpt = netdev_priv(netdev); in emac_close()
286 static void emac_tx_timeout(struct net_device *netdev, unsigned int txqueue) in emac_tx_timeout() argument
288 struct emac_adapter *adpt = netdev_priv(netdev); in emac_tx_timeout()
335 static void emac_get_stats64(struct net_device *netdev, in emac_get_stats64() argument
338 struct emac_adapter *adpt = netdev_priv(netdev); in emac_get_stats64()
547 struct net_device *netdev = adpt->netdev; in emac_probe_resources() local
553 ether_addr_copy(netdev->dev_addr, maddr); in emac_probe_resources()
555 eth_hw_addr_random(netdev); in emac_probe_resources()
573 netdev->base_addr = (unsigned long)adpt->base; in emac_probe_resources()
598 struct net_device *netdev; in emac_probe() local
615 netdev = alloc_etherdev(sizeof(struct emac_adapter)); in emac_probe()
616 if (!netdev) in emac_probe()
619 dev_set_drvdata(&pdev->dev, netdev); in emac_probe()
620 SET_NETDEV_DEV(netdev, &pdev->dev); in emac_probe()
621 emac_set_ethtool_ops(netdev); in emac_probe()
623 adpt = netdev_priv(netdev); in emac_probe()
624 adpt->netdev = netdev; in emac_probe()
646 netdev->watchdog_timeo = EMAC_WATCHDOG_TIME; in emac_probe()
647 netdev->irq = adpt->irq.irq; in emac_probe()
649 netdev->netdev_ops = &emac_netdev_ops; in emac_probe()
671 netdev->features = NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_RXCSUM | in emac_probe()
674 netdev->hw_features = netdev->features; in emac_probe()
676 netdev->vlan_features |= NETIF_F_SG | NETIF_F_HW_CSUM | in emac_probe()
680 netdev->min_mtu = EMAC_MIN_ETH_FRAME_SIZE - in emac_probe()
682 netdev->max_mtu = EMAC_MAX_ETH_FRAME_SIZE - in emac_probe()
690 netif_napi_add(netdev, &adpt->rx_q.napi, emac_napi_rtx, in emac_probe()
693 ret = register_netdev(netdev); in emac_probe()
704 netif_info(adpt, probe, netdev, in emac_probe()
721 free_netdev(netdev); in emac_probe()
728 struct net_device *netdev = dev_get_drvdata(&pdev->dev); in emac_remove() local
729 struct emac_adapter *adpt = netdev_priv(netdev); in emac_remove()
731 netif_carrier_off(netdev); in emac_remove()
732 netif_tx_disable(netdev); in emac_remove()
734 unregister_netdev(netdev); in emac_remove()
749 free_netdev(netdev); in emac_remove()
756 struct net_device *netdev = dev_get_drvdata(&pdev->dev); in emac_shutdown() local
757 struct emac_adapter *adpt = netdev_priv(netdev); in emac_shutdown()
759 if (netdev->flags & IFF_UP) { in emac_shutdown()