aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/qlcnic/qlcnic_init.c
diff options
context:
space:
mode:
authorAmit Kumar Salecha <amit.salecha@qlogic.com>2010-04-21 22:51:35 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-22 18:28:26 -0400
commit8ae6df978b986a5ce099e7e7118f127563d2cbbe (patch)
tree3caffdbc168440397c2d20a0627c0254188b6bbf /drivers/net/qlcnic/qlcnic_init.c
parente802af9cabb011f09b9c19a82faef3dd315f27eb (diff)
qlcnic: additional driver statistics
Added additional driver statistics to track errors in rcv/tx path. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlcnic/qlcnic_init.c')
-rw-r--r--drivers/net/qlcnic/qlcnic_init.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/qlcnic/qlcnic_init.c b/drivers/net/qlcnic/qlcnic_init.c
index 01ce74ee99f9..9ef9f58f84dd 100644
--- a/drivers/net/qlcnic/qlcnic_init.c
+++ b/drivers/net/qlcnic/qlcnic_init.c
@@ -1287,6 +1287,7 @@ qlcnic_alloc_rx_skb(struct qlcnic_adapter *adapter,
1287 rds_ring->dma_size, PCI_DMA_FROMDEVICE); 1287 rds_ring->dma_size, PCI_DMA_FROMDEVICE);
1288 1288
1289 if (pci_dma_mapping_error(pdev, dma)) { 1289 if (pci_dma_mapping_error(pdev, dma)) {
1290 adapter->stats.rx_dma_map_error++;
1290 dev_kfree_skb_any(skb); 1291 dev_kfree_skb_any(skb);
1291 buffer->skb = NULL; 1292 buffer->skb = NULL;
1292 return -ENOMEM; 1293 return -ENOMEM;
@@ -1311,8 +1312,10 @@ static struct sk_buff *qlcnic_process_rxbuf(struct qlcnic_adapter *adapter,
1311 PCI_DMA_FROMDEVICE); 1312 PCI_DMA_FROMDEVICE);
1312 1313
1313 skb = buffer->skb; 1314 skb = buffer->skb;
1314 if (!skb) 1315 if (!skb) {
1316 adapter->stats.null_skb++;
1315 goto no_skb; 1317 goto no_skb;
1318 }
1316 1319
1317 if (likely(adapter->rx_csum && cksum == STATUS_CKSUM_OK)) { 1320 if (likely(adapter->rx_csum && cksum == STATUS_CKSUM_OK)) {
1318 adapter->stats.csummed++; 1321 adapter->stats.csummed++;
@@ -1502,6 +1505,8 @@ qlcnic_process_rcv_ring(struct qlcnic_host_sds_ring *sds_ring, int max)
1502 1505
1503 if (rxbuf) 1506 if (rxbuf)
1504 list_add_tail(&rxbuf->list, &sds_ring->free_list[ring]); 1507 list_add_tail(&rxbuf->list, &sds_ring->free_list[ring]);
1508 else
1509 adapter->stats.null_rxbuf++;
1505 1510
1506skip: 1511skip:
1507 for (; desc_cnt > 0; desc_cnt--) { 1512 for (; desc_cnt > 0; desc_cnt--) {