• Home
  • Raw
  • Download

Lines Matching refs:ndev

489 static int enc28j60_set_hw_macaddr(struct net_device *ndev)  in enc28j60_set_hw_macaddr()  argument
492 struct enc28j60_net *priv = netdev_priv(ndev); in enc28j60_set_hw_macaddr()
499 ndev->name, ndev->dev_addr); in enc28j60_set_hw_macaddr()
501 nolock_regb_write(priv, MAADR5, ndev->dev_addr[0]); in enc28j60_set_hw_macaddr()
502 nolock_regb_write(priv, MAADR4, ndev->dev_addr[1]); in enc28j60_set_hw_macaddr()
503 nolock_regb_write(priv, MAADR3, ndev->dev_addr[2]); in enc28j60_set_hw_macaddr()
504 nolock_regb_write(priv, MAADR2, ndev->dev_addr[3]); in enc28j60_set_hw_macaddr()
505 nolock_regb_write(priv, MAADR1, ndev->dev_addr[4]); in enc28j60_set_hw_macaddr()
506 nolock_regb_write(priv, MAADR0, ndev->dev_addr[5]); in enc28j60_set_hw_macaddr()
779 enc28j60_setlink(struct net_device *ndev, u8 autoneg, u16 speed, u8 duplex) in enc28j60_setlink() argument
781 struct enc28j60_net *priv = netdev_priv(ndev); in enc28j60_setlink()
792 dev_warn(&ndev->dev, in enc28j60_setlink()
798 dev_warn(&ndev->dev, "Warning: hw must be disabled " in enc28j60_setlink()
900 static void enc28j60_hw_rx(struct net_device *ndev) in enc28j60_hw_rx() argument
902 struct enc28j60_net *priv = netdev_priv(ndev); in enc28j60_hw_rx()
914 dev_err(&ndev->dev, in enc28j60_hw_rx()
926 ndev->stats.rx_errors++; in enc28j60_hw_rx()
949 dev_err(&ndev->dev, "Rx Error (%04x)\n", rxstat); in enc28j60_hw_rx()
950 ndev->stats.rx_errors++; in enc28j60_hw_rx()
952 ndev->stats.rx_crc_errors++; in enc28j60_hw_rx()
954 ndev->stats.rx_frame_errors++; in enc28j60_hw_rx()
956 ndev->stats.rx_over_errors++; in enc28j60_hw_rx()
961 dev_err(&ndev->dev, in enc28j60_hw_rx()
963 ndev->stats.rx_dropped++; in enc28j60_hw_rx()
965 skb->dev = ndev; in enc28j60_hw_rx()
973 skb->protocol = eth_type_trans(skb, ndev); in enc28j60_hw_rx()
975 ndev->stats.rx_packets++; in enc28j60_hw_rx()
976 ndev->stats.rx_bytes += len; in enc28j60_hw_rx()
1043 static void enc28j60_check_link_status(struct net_device *ndev) in enc28j60_check_link_status() argument
1045 struct enc28j60_net *priv = netdev_priv(ndev); in enc28j60_check_link_status()
1057 netif_carrier_on(ndev); in enc28j60_check_link_status()
1059 dev_info(&ndev->dev, "link up - %s\n", in enc28j60_check_link_status()
1063 dev_info(&ndev->dev, "link down\n"); in enc28j60_check_link_status()
1064 netif_carrier_off(ndev); in enc28j60_check_link_status()
1068 static void enc28j60_tx_clear(struct net_device *ndev, bool err) in enc28j60_tx_clear() argument
1070 struct enc28j60_net *priv = netdev_priv(ndev); in enc28j60_tx_clear()
1073 ndev->stats.tx_errors++; in enc28j60_tx_clear()
1075 ndev->stats.tx_packets++; in enc28j60_tx_clear()
1079 ndev->stats.tx_bytes += priv->tx_skb->len; in enc28j60_tx_clear()
1084 netif_wake_queue(ndev); in enc28j60_tx_clear()
1095 static int enc28j60_rx_interrupt(struct net_device *ndev) in enc28j60_rx_interrupt() argument
1097 struct enc28j60_net *priv = netdev_priv(ndev); in enc28j60_rx_interrupt()
1112 enc28j60_hw_rx(ndev); in enc28j60_rx_interrupt()
1121 struct net_device *ndev = priv->netdev; in enc28j60_irq_work_handler() local
1146 enc28j60_check_link_status(ndev); in enc28j60_irq_work_handler()
1160 dev_err(&ndev->dev, in enc28j60_irq_work_handler()
1169 enc28j60_tx_clear(ndev, err); in enc28j60_irq_work_handler()
1200 enc28j60_tx_clear(ndev, true); in enc28j60_irq_work_handler()
1202 enc28j60_tx_clear(ndev, true); in enc28j60_irq_work_handler()
1216 ndev->stats.rx_dropped++; in enc28j60_irq_work_handler()
1221 if (enc28j60_rx_interrupt(ndev)) in enc28j60_irq_work_handler()
1330 static void enc28j60_tx_timeout(struct net_device *ndev) in enc28j60_tx_timeout() argument
1332 struct enc28j60_net *priv = netdev_priv(ndev); in enc28j60_tx_timeout()
1335 dev_err(&ndev->dev, DRV_NAME " tx timeout\n"); in enc28j60_tx_timeout()
1337 ndev->stats.tx_errors++; in enc28j60_tx_timeout()
1458 struct net_device *ndev = priv->netdev; in enc28j60_restart_work_handler() local
1462 if (netif_running(ndev)) { in enc28j60_restart_work_handler()
1463 enc28j60_net_close(ndev); in enc28j60_restart_work_handler()
1464 ret = enc28j60_net_open(ndev); in enc28j60_restart_work_handler()
1466 dev_info(&ndev->dev, " could not restart %d\n", ret); in enc28j60_restart_work_handler()
1467 dev_close(ndev); in enc28j60_restart_work_handler()