equal
deleted
inserted
replaced
423 static struct rtnl_link_stats64 *ccat_eth_get_stats64(struct net_device *dev, struct rtnl_link_stats64 |
423 static struct rtnl_link_stats64 *ccat_eth_get_stats64(struct net_device *dev, struct rtnl_link_stats64 |
424 *storage) |
424 *storage) |
425 { |
425 { |
426 struct ccat_eth_priv *const priv = netdev_priv(dev); |
426 struct ccat_eth_priv *const priv = netdev_priv(dev); |
427 struct ccat_mac_register mac; |
427 struct ccat_mac_register mac; |
428 |
|
429 memcpy_fromio(&mac, priv->reg.mac, sizeof(mac)); |
428 memcpy_fromio(&mac, priv->reg.mac, sizeof(mac)); |
430 storage->rx_packets = mac.rx_frames; /* total packets received */ |
429 storage->rx_packets = mac.rx_frames; /* total packets received */ |
431 storage->tx_packets = mac.tx_frames; /* total packets transmitted */ |
430 storage->tx_packets = mac.tx_frames; /* total packets transmitted */ |
432 storage->rx_bytes = atomic64_read(&priv->rx_bytes); /* total bytes received */ |
431 storage->rx_bytes = atomic64_read(&priv->rx_bytes); /* total bytes received */ |
433 storage->tx_bytes = atomic64_read(&priv->tx_bytes); /* total bytes transmitted */ |
432 storage->tx_bytes = atomic64_read(&priv->tx_bytes); /* total bytes transmitted */ |
498 priv->ccatdev = ccatdev; |
497 priv->ccatdev = ccatdev; |
499 |
498 |
500 /* ccat register mappings */ |
499 /* ccat register mappings */ |
501 memcpy_fromio(&priv->info, addr, sizeof(priv->info)); |
500 memcpy_fromio(&priv->info, addr, sizeof(priv->info)); |
502 ccat_eth_priv_init_mappings(priv); |
501 ccat_eth_priv_init_mappings(priv); |
503 /* XXX disabled in release |
|
504 * ccat_print_function_info(priv); |
|
505 */ |
|
506 |
502 |
507 if (ccat_eth_priv_init_dma(priv)) { |
503 if (ccat_eth_priv_init_dma(priv)) { |
508 pr_warn("%s(): DMA initialization failed.\n", __FUNCTION__); |
504 pr_warn("%s(): DMA initialization failed.\n", __FUNCTION__); |
509 free_netdev(netdev); |
505 free_netdev(netdev); |
510 return NULL; |
506 return NULL; |