diff options
Diffstat (limited to 'drivers/net/chelsio/cxgb2.c')
-rw-r--r-- | drivers/net/chelsio/cxgb2.c | 74 |
1 files changed, 38 insertions, 36 deletions
diff --git a/drivers/net/chelsio/cxgb2.c b/drivers/net/chelsio/cxgb2.c index 0ca5b07c1a6b..53bec6739812 100644 --- a/drivers/net/chelsio/cxgb2.c +++ b/drivers/net/chelsio/cxgb2.c | |||
@@ -390,13 +390,19 @@ static char stats_strings[][ETH_GSTRING_LEN] = { | |||
390 | "RxOutOfRangeLengthField", | 390 | "RxOutOfRangeLengthField", |
391 | "RxFrameTooLongErrors", | 391 | "RxFrameTooLongErrors", |
392 | 392 | ||
393 | "TSO", | 393 | /* Port stats */ |
394 | "VLANextractions", | 394 | "RxPackets", |
395 | "VLANinsertions", | ||
396 | "RxCsumGood", | 395 | "RxCsumGood", |
396 | "TxPackets", | ||
397 | "TxCsumOffload", | 397 | "TxCsumOffload", |
398 | "RxDrops" | 398 | "TxTso", |
399 | 399 | "RxVlan", | |
400 | "TxVlan", | ||
401 | |||
402 | /* Interrupt stats */ | ||
403 | "rx drops", | ||
404 | "pure_rsps", | ||
405 | "unhandled irqs", | ||
400 | "respQ_empty", | 406 | "respQ_empty", |
401 | "respQ_overflow", | 407 | "respQ_overflow", |
402 | "freelistQ_empty", | 408 | "freelistQ_empty", |
@@ -404,10 +410,6 @@ static char stats_strings[][ETH_GSTRING_LEN] = { | |||
404 | "pkt_mismatch", | 410 | "pkt_mismatch", |
405 | "cmdQ_full0", | 411 | "cmdQ_full0", |
406 | "cmdQ_full1", | 412 | "cmdQ_full1", |
407 | "tx_ipfrags", | ||
408 | "tx_reg_pkts", | ||
409 | "tx_lso_pkts", | ||
410 | "tx_do_cksum", | ||
411 | 413 | ||
412 | "espi_DIP2ParityErr", | 414 | "espi_DIP2ParityErr", |
413 | "espi_DIP4Err", | 415 | "espi_DIP4Err", |
@@ -451,12 +453,10 @@ static void get_stats(struct net_device *dev, struct ethtool_stats *stats, | |||
451 | struct adapter *adapter = dev->priv; | 453 | struct adapter *adapter = dev->priv; |
452 | struct cmac *mac = adapter->port[dev->if_port].mac; | 454 | struct cmac *mac = adapter->port[dev->if_port].mac; |
453 | const struct cmac_statistics *s; | 455 | const struct cmac_statistics *s; |
454 | const struct sge_port_stats *ss; | ||
455 | const struct sge_intr_counts *t; | 456 | const struct sge_intr_counts *t; |
457 | struct sge_port_stats ss; | ||
456 | 458 | ||
457 | s = mac->ops->statistics_update(mac, MAC_STATS_UPDATE_FULL); | 459 | s = mac->ops->statistics_update(mac, MAC_STATS_UPDATE_FULL); |
458 | ss = t1_sge_get_port_stats(adapter->sge, dev->if_port); | ||
459 | t = t1_sge_get_intr_counts(adapter->sge); | ||
460 | 460 | ||
461 | *data++ = s->TxOctetsOK; | 461 | *data++ = s->TxOctetsOK; |
462 | *data++ = s->TxOctetsBad; | 462 | *data++ = s->TxOctetsBad; |
@@ -492,35 +492,37 @@ static void get_stats(struct net_device *dev, struct ethtool_stats *stats, | |||
492 | *data++ = s->RxOutOfRangeLengthField; | 492 | *data++ = s->RxOutOfRangeLengthField; |
493 | *data++ = s->RxFrameTooLongErrors; | 493 | *data++ = s->RxFrameTooLongErrors; |
494 | 494 | ||
495 | *data++ = ss->tso; | 495 | t1_sge_get_port_stats(adapter->sge, dev->if_port, &ss); |
496 | *data++ = ss->vlan_xtract; | 496 | *data++ = ss.rx_packets; |
497 | *data++ = ss->vlan_insert; | 497 | *data++ = ss.rx_cso_good; |
498 | *data++ = ss->rx_cso_good; | 498 | *data++ = ss.tx_packets; |
499 | *data++ = ss->tx_cso; | 499 | *data++ = ss.tx_cso; |
500 | *data++ = ss->rx_drops; | 500 | *data++ = ss.tx_tso; |
501 | 501 | *data++ = ss.vlan_xtract; | |
502 | *data++ = (u64)t->respQ_empty; | 502 | *data++ = ss.vlan_insert; |
503 | *data++ = (u64)t->respQ_overflow; | 503 | |
504 | *data++ = (u64)t->freelistQ_empty; | 504 | t = t1_sge_get_intr_counts(adapter->sge); |
505 | *data++ = (u64)t->pkt_too_big; | 505 | *data++ = t->rx_drops; |
506 | *data++ = (u64)t->pkt_mismatch; | 506 | *data++ = t->pure_rsps; |
507 | *data++ = (u64)t->cmdQ_full[0]; | 507 | *data++ = t->unhandled_irqs; |
508 | *data++ = (u64)t->cmdQ_full[1]; | 508 | *data++ = t->respQ_empty; |
509 | *data++ = (u64)t->tx_ipfrags; | 509 | *data++ = t->respQ_overflow; |
510 | *data++ = (u64)t->tx_reg_pkts; | 510 | *data++ = t->freelistQ_empty; |
511 | *data++ = (u64)t->tx_lso_pkts; | 511 | *data++ = t->pkt_too_big; |
512 | *data++ = (u64)t->tx_do_cksum; | 512 | *data++ = t->pkt_mismatch; |
513 | *data++ = t->cmdQ_full[0]; | ||
514 | *data++ = t->cmdQ_full[1]; | ||
513 | 515 | ||
514 | if (adapter->espi) { | 516 | if (adapter->espi) { |
515 | const struct espi_intr_counts *e; | 517 | const struct espi_intr_counts *e; |
516 | 518 | ||
517 | e = t1_espi_get_intr_counts(adapter->espi); | 519 | e = t1_espi_get_intr_counts(adapter->espi); |
518 | *data++ = (u64) e->DIP2_parity_err; | 520 | *data++ = e->DIP2_parity_err; |
519 | *data++ = (u64) e->DIP4_err; | 521 | *data++ = e->DIP4_err; |
520 | *data++ = (u64) e->rx_drops; | 522 | *data++ = e->rx_drops; |
521 | *data++ = (u64) e->tx_drops; | 523 | *data++ = e->tx_drops; |
522 | *data++ = (u64) e->rx_ovflw; | 524 | *data++ = e->rx_ovflw; |
523 | *data++ = (u64) e->parity_err; | 525 | *data++ = e->parity_err; |
524 | } | 526 | } |
525 | } | 527 | } |
526 | 528 | ||