diff options
Diffstat (limited to 'drivers/net/spider_net.c')
-rw-r--r-- | drivers/net/spider_net.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c index d64e718afbd2..cc240adb7269 100644 --- a/drivers/net/spider_net.c +++ b/drivers/net/spider_net.c | |||
@@ -403,6 +403,7 @@ spider_net_prepare_rx_descr(struct spider_net_card *card, | |||
403 | if (!descr->skb) { | 403 | if (!descr->skb) { |
404 | if (netif_msg_rx_err(card) && net_ratelimit()) | 404 | if (netif_msg_rx_err(card) && net_ratelimit()) |
405 | pr_err("Not enough memory to allocate rx buffer\n"); | 405 | pr_err("Not enough memory to allocate rx buffer\n"); |
406 | card->spider_stats.alloc_rx_skb_error++; | ||
406 | return -ENOMEM; | 407 | return -ENOMEM; |
407 | } | 408 | } |
408 | descr->buf_size = bufsize; | 409 | descr->buf_size = bufsize; |
@@ -423,6 +424,7 @@ spider_net_prepare_rx_descr(struct spider_net_card *card, | |||
423 | dev_kfree_skb_any(descr->skb); | 424 | dev_kfree_skb_any(descr->skb); |
424 | if (netif_msg_rx_err(card) && net_ratelimit()) | 425 | if (netif_msg_rx_err(card) && net_ratelimit()) |
425 | pr_err("Could not iommu-map rx buffer\n"); | 426 | pr_err("Could not iommu-map rx buffer\n"); |
427 | card->spider_stats.rx_iommu_map_error++; | ||
426 | descr->dmac_cmd_status = SPIDER_NET_DESCR_NOT_IN_USE; | 428 | descr->dmac_cmd_status = SPIDER_NET_DESCR_NOT_IN_USE; |
427 | } else { | 429 | } else { |
428 | descr->dmac_cmd_status = SPIDER_NET_DESCR_CARDOWNED | | 430 | descr->dmac_cmd_status = SPIDER_NET_DESCR_CARDOWNED | |
@@ -651,6 +653,7 @@ spider_net_prepare_tx_descr(struct spider_net_card *card, | |||
651 | if (netif_msg_tx_err(card) && net_ratelimit()) | 653 | if (netif_msg_tx_err(card) && net_ratelimit()) |
652 | pr_err("could not iommu-map packet (%p, %i). " | 654 | pr_err("could not iommu-map packet (%p, %i). " |
653 | "Dropping packet\n", skb->data, skb->len); | 655 | "Dropping packet\n", skb->data, skb->len); |
656 | card->spider_stats.tx_iommu_map_error++; | ||
654 | return -ENOMEM; | 657 | return -ENOMEM; |
655 | } | 658 | } |
656 | 659 | ||
@@ -818,6 +821,7 @@ spider_net_xmit(struct sk_buff *skb, struct net_device *netdev) | |||
818 | } | 821 | } |
819 | 822 | ||
820 | if (spider_net_get_descr_status(descr) != SPIDER_NET_DESCR_NOT_IN_USE) { | 823 | if (spider_net_get_descr_status(descr) != SPIDER_NET_DESCR_NOT_IN_USE) { |
824 | card->netdev_stats.tx_dropped++; | ||
821 | result = NETDEV_TX_LOCKED; | 825 | result = NETDEV_TX_LOCKED; |
822 | goto out; | 826 | goto out; |
823 | } | 827 | } |
@@ -913,6 +917,7 @@ spider_net_pass_skb_up(struct spider_net_descr *descr, | |||
913 | pr_err("error in received descriptor found, " | 917 | pr_err("error in received descriptor found, " |
914 | "data_status=x%08x, data_error=x%08x\n", | 918 | "data_status=x%08x, data_error=x%08x\n", |
915 | data_status, data_error); | 919 | data_status, data_error); |
920 | card->spider_stats.rx_desc_error++; | ||
916 | return 0; | 921 | return 0; |
917 | } | 922 | } |
918 | 923 | ||
@@ -1010,9 +1015,11 @@ spider_net_decode_one_descr(struct spider_net_card *card, int napi) | |||
1010 | 1015 | ||
1011 | if ( (status != SPIDER_NET_DESCR_COMPLETE) && | 1016 | if ( (status != SPIDER_NET_DESCR_COMPLETE) && |
1012 | (status != SPIDER_NET_DESCR_FRAME_END) ) { | 1017 | (status != SPIDER_NET_DESCR_FRAME_END) ) { |
1013 | if (netif_msg_rx_err(card)) | 1018 | if (netif_msg_rx_err(card)) { |
1014 | pr_err("%s: RX descriptor with state %d\n", | 1019 | pr_err("%s: RX descriptor with state %d\n", |
1015 | card->netdev->name, status); | 1020 | card->netdev->name, status); |
1021 | card->spider_stats.rx_desc_unk_state++; | ||
1022 | } | ||
1016 | goto refill; | 1023 | goto refill; |
1017 | } | 1024 | } |
1018 | 1025 | ||
@@ -1934,6 +1941,7 @@ spider_net_tx_timeout(struct net_device *netdev) | |||
1934 | schedule_work(&card->tx_timeout_task); | 1941 | schedule_work(&card->tx_timeout_task); |
1935 | else | 1942 | else |
1936 | atomic_dec(&card->tx_timeout_task_counter); | 1943 | atomic_dec(&card->tx_timeout_task_counter); |
1944 | card->spider_stats.tx_timeouts++; | ||
1937 | } | 1945 | } |
1938 | 1946 | ||
1939 | /** | 1947 | /** |