Lines Matching refs:ndev

1112 			netif_stop_queue(lp->ndev);  in tx_reclaim_skb()
1116 netif_queue_stopped(lp->ndev)) in tx_reclaim_skb()
1117 netif_wake_queue(lp->ndev); in tx_reclaim_skb()
1121 if (netif_queue_stopped(lp->ndev)) in tx_reclaim_skb()
1221 struct net_device *dev = lp->ndev; in bfin_mac_rx()
1624 struct net_device *ndev; in bfin_mac_probe() local
1630 ndev = alloc_etherdev(sizeof(struct bfin_mac_local)); in bfin_mac_probe()
1631 if (!ndev) in bfin_mac_probe()
1634 SET_NETDEV_DEV(ndev, &pdev->dev); in bfin_mac_probe()
1635 platform_set_drvdata(pdev, ndev); in bfin_mac_probe()
1636 lp = netdev_priv(ndev); in bfin_mac_probe()
1637 lp->ndev = ndev; in bfin_mac_probe()
1640 *(__le32 *) (&(ndev->dev_addr[0])) = cpu_to_le32(bfin_read_EMAC_ADDRLO()); in bfin_mac_probe()
1641 *(__le16 *) (&(ndev->dev_addr[4])) = cpu_to_le16((u16) bfin_read_EMAC_ADDRHI()); in bfin_mac_probe()
1658 if (!is_valid_ether_addr(ndev->dev_addr)) { in bfin_mac_probe()
1659 if (bfin_get_ether_addr(ndev->dev_addr) || in bfin_mac_probe()
1660 !is_valid_ether_addr(ndev->dev_addr)) { in bfin_mac_probe()
1662 netdev_warn(ndev, "Setting Ethernet MAC to a random one\n"); in bfin_mac_probe()
1663 eth_hw_addr_random(ndev); in bfin_mac_probe()
1667 setup_mac_addr(ndev->dev_addr); in bfin_mac_probe()
1681 lp->mii_bus->priv = ndev; in bfin_mac_probe()
1684 rc = mii_probe(ndev, mii_bus_data->phy_mode); in bfin_mac_probe()
1693 ndev->netdev_ops = &bfin_mac_netdev_ops; in bfin_mac_probe()
1694 ndev->ethtool_ops = &bfin_mac_ethtool_ops; in bfin_mac_probe()
1701 netif_napi_add(ndev, &lp->napi, bfin_mac_poll, CONFIG_BFIN_RX_DESC_NUM); in bfin_mac_probe()
1708 0, "EMAC_RX", ndev); in bfin_mac_probe()
1715 rc = register_netdev(ndev); in bfin_mac_probe()
1721 bfin_mac_hwtstamp_init(ndev); in bfin_mac_probe()
1722 rc = bfin_phc_init(ndev, &pdev->dev); in bfin_mac_probe()
1729 netdev_info(ndev, "%s, Version %s\n", DRV_DESC, DRV_VERSION); in bfin_mac_probe()
1735 free_irq(IRQ_MAC_RX, ndev); in bfin_mac_probe()
1742 free_netdev(ndev); in bfin_mac_probe()
1749 struct net_device *ndev = platform_get_drvdata(pdev); in bfin_mac_remove() local
1750 struct bfin_mac_local *lp = netdev_priv(ndev); in bfin_mac_remove()
1756 unregister_netdev(ndev); in bfin_mac_remove()
1760 free_irq(IRQ_MAC_RX, ndev); in bfin_mac_remove()
1762 free_netdev(ndev); in bfin_mac_remove()