• Home
  • Raw
  • Download

Lines Matching refs:ndev

187     struct net_device    *ndev;  member
333 db->phy_dev = of_phy_connect(db->ndev, db->phy_node, in emac_mdio_probe()
337 netdev_err(db->ndev, "could not find the PHY\n"); in emac_mdio_probe()
411 static unsigned int emac_setup(struct net_device *ndev) in emac_setup() argument
413 struct emac_board_info *db = netdev_priv(ndev); in emac_setup()
454 static void emac_set_rx_mode(struct net_device *ndev) in emac_set_rx_mode() argument
456 struct emac_board_info *db = netdev_priv(ndev); in emac_set_rx_mode()
462 if (ndev->flags & IFF_PROMISC) in emac_set_rx_mode()
474 static unsigned int emac_powerup(struct net_device *ndev) in emac_powerup() argument
476 struct emac_board_info *db = netdev_priv(ndev); in emac_powerup()
509 emac_setup(ndev); in emac_powerup()
512 writel(ndev->dev_addr[0] << 16 | ndev->dev_addr[1] << 8 | ndev-> in emac_powerup()
514 writel(ndev->dev_addr[3] << 16 | ndev->dev_addr[4] << 8 | ndev-> in emac_powerup()
943 static int emac_stop(struct net_device *ndev) in emac_stop() argument
945 struct emac_board_info *db = netdev_priv(ndev); in emac_stop()
948 dev_dbg(db->dev, "shutting down %s\n", ndev->name); in emac_stop()
950 netif_stop_queue(ndev); in emac_stop()
951 netif_carrier_off(ndev); in emac_stop()
955 emac_mdio_remove(ndev); in emac_stop()
957 emac_shutdown(ndev); in emac_stop()
959 free_irq(ndev->irq, ndev); in emac_stop()
988 struct net_device *ndev; in emac_probe() local
997 ndev = alloc_etherdev(sizeof(struct emac_board_info)); in emac_probe()
998 if (!ndev) { in emac_probe()
1003 SET_NETDEV_DEV(ndev, &pdev->dev); in emac_probe()
1005 db = netdev_priv(ndev); in emac_probe()
1009 db->ndev = ndev; in emac_probe()
1035 ndev->base_addr = (unsigned long)db->membase; in emac_probe()
1036 ndev->irq = irq_of_parse_and_map(np, 0); in emac_probe()
1037 if (ndev->irq == -ENXIO) { in emac_probe()
1038 netdev_err(ndev, "No irq resource\n"); in emac_probe()
1039 ret = ndev->irq; in emac_probe()
1096 netdev_dbg(ndev, "Info: Emac_power_vol[%d] = %d\n", i, value); in emac_probe()
1103 netdev_err(ndev, "Error: Emac-power%d get error\n", i); in emac_probe()
1105 netdev_dbg(ndev, "Emac-power%d get success\n", i); in emac_probe()
1111 ether_addr_copy(ndev->dev_addr, mac_addr); in emac_probe()
1114 if (!is_valid_ether_addr(ndev->dev_addr)) { in emac_probe()
1115 eth_hw_addr_random(ndev); in emac_probe()
1117 ndev->dev_addr); in emac_probe()
1121 emac_powerup(ndev); in emac_probe()
1124 ndev->netdev_ops = &emac_netdev_ops; in emac_probe()
1125 ndev->watchdog_timeo = msecs_to_jiffies(watchdog); in emac_probe()
1126 ndev->ethtool_ops = &emac_ethtool_ops; in emac_probe()
1128 platform_set_drvdata(pdev, ndev); in emac_probe()
1131 netif_carrier_off(ndev); in emac_probe()
1133 ret = register_netdev(ndev); in emac_probe()
1145 ndev->name, db->membase, ndev->irq, ndev->dev_addr); in emac_probe()
1163 free_netdev(ndev); in emac_probe()
1170 struct net_device *ndev = platform_get_drvdata(pdev); in emac_remove() local
1171 struct emac_board_info *db = netdev_priv(ndev); in emac_remove()
1173 unregister_netdev(ndev); in emac_remove()
1183 free_netdev(ndev); in emac_remove()
1191 struct net_device *ndev = platform_get_drvdata(dev); in emac_suspend() local
1193 netif_carrier_off(ndev); in emac_suspend()
1194 netif_device_detach(ndev); in emac_suspend()
1195 emac_shutdown(ndev); in emac_suspend()
1202 struct net_device *ndev = platform_get_drvdata(dev); in emac_resume() local
1203 struct emac_board_info *db = netdev_priv(ndev); in emac_resume()
1206 emac_init_device(ndev); in emac_resume()
1207 netif_device_attach(ndev); in emac_resume()