diff options
Diffstat (limited to 'drivers/net/chelsio/cxgb2.c')
| -rwxr-xr-x[-rw-r--r--] | drivers/net/chelsio/cxgb2.c | 70 |
1 files changed, 53 insertions, 17 deletions
diff --git a/drivers/net/chelsio/cxgb2.c b/drivers/net/chelsio/cxgb2.c index 2dbf8dc116c6..c5975047c89b 100644..100755 --- a/drivers/net/chelsio/cxgb2.c +++ b/drivers/net/chelsio/cxgb2.c | |||
| @@ -374,7 +374,9 @@ static char stats_strings[][ETH_GSTRING_LEN] = { | |||
| 374 | "TxInternalMACXmitError", | 374 | "TxInternalMACXmitError", |
| 375 | "TxFramesWithExcessiveDeferral", | 375 | "TxFramesWithExcessiveDeferral", |
| 376 | "TxFCSErrors", | 376 | "TxFCSErrors", |
| 377 | 377 | "TxJumboFramesOk", | |
| 378 | "TxJumboOctetsOk", | ||
| 379 | |||
| 378 | "RxOctetsOK", | 380 | "RxOctetsOK", |
| 379 | "RxOctetsBad", | 381 | "RxOctetsBad", |
| 380 | "RxUnicastFramesOK", | 382 | "RxUnicastFramesOK", |
| @@ -392,16 +394,17 @@ static char stats_strings[][ETH_GSTRING_LEN] = { | |||
| 392 | "RxInRangeLengthErrors", | 394 | "RxInRangeLengthErrors", |
| 393 | "RxOutOfRangeLengthField", | 395 | "RxOutOfRangeLengthField", |
| 394 | "RxFrameTooLongErrors", | 396 | "RxFrameTooLongErrors", |
| 397 | "RxJumboFramesOk", | ||
| 398 | "RxJumboOctetsOk", | ||
| 395 | 399 | ||
| 396 | /* Port stats */ | 400 | /* Port stats */ |
| 397 | "RxPackets", | ||
| 398 | "RxCsumGood", | 401 | "RxCsumGood", |
| 399 | "TxPackets", | ||
| 400 | "TxCsumOffload", | 402 | "TxCsumOffload", |
| 401 | "TxTso", | 403 | "TxTso", |
| 402 | "RxVlan", | 404 | "RxVlan", |
| 403 | "TxVlan", | 405 | "TxVlan", |
| 404 | 406 | "TxNeedHeadroom", | |
| 407 | |||
| 405 | /* Interrupt stats */ | 408 | /* Interrupt stats */ |
| 406 | "rx drops", | 409 | "rx drops", |
| 407 | "pure_rsps", | 410 | "pure_rsps", |
| @@ -463,23 +466,56 @@ static void get_stats(struct net_device *dev, struct ethtool_stats *stats, | |||
| 463 | const struct cmac_statistics *s; | 466 | const struct cmac_statistics *s; |
| 464 | const struct sge_intr_counts *t; | 467 | const struct sge_intr_counts *t; |
| 465 | struct sge_port_stats ss; | 468 | struct sge_port_stats ss; |
| 466 | unsigned int len; | ||
| 467 | 469 | ||
| 468 | s = mac->ops->statistics_update(mac, MAC_STATS_UPDATE_FULL); | 470 | s = mac->ops->statistics_update(mac, MAC_STATS_UPDATE_FULL); |
| 469 | 471 | t = t1_sge_get_intr_counts(adapter->sge); | |
| 470 | len = sizeof(u64)*(&s->TxFCSErrors + 1 - &s->TxOctetsOK); | ||
| 471 | memcpy(data, &s->TxOctetsOK, len); | ||
| 472 | data += len; | ||
| 473 | |||
| 474 | len = sizeof(u64)*(&s->RxFrameTooLongErrors + 1 - &s->RxOctetsOK); | ||
| 475 | memcpy(data, &s->RxOctetsOK, len); | ||
| 476 | data += len; | ||
| 477 | |||
| 478 | t1_sge_get_port_stats(adapter->sge, dev->if_port, &ss); | 472 | t1_sge_get_port_stats(adapter->sge, dev->if_port, &ss); |
| 479 | memcpy(data, &ss, sizeof(ss)); | ||
| 480 | data += sizeof(ss); | ||
| 481 | 473 | ||
| 482 | t = t1_sge_get_intr_counts(adapter->sge); | 474 | *data++ = s->TxOctetsOK; |
| 475 | *data++ = s->TxOctetsBad; | ||
| 476 | *data++ = s->TxUnicastFramesOK; | ||
| 477 | *data++ = s->TxMulticastFramesOK; | ||
| 478 | *data++ = s->TxBroadcastFramesOK; | ||
| 479 | *data++ = s->TxPauseFrames; | ||
| 480 | *data++ = s->TxFramesWithDeferredXmissions; | ||
| 481 | *data++ = s->TxLateCollisions; | ||
| 482 | *data++ = s->TxTotalCollisions; | ||
| 483 | *data++ = s->TxFramesAbortedDueToXSCollisions; | ||
| 484 | *data++ = s->TxUnderrun; | ||
| 485 | *data++ = s->TxLengthErrors; | ||
| 486 | *data++ = s->TxInternalMACXmitError; | ||
| 487 | *data++ = s->TxFramesWithExcessiveDeferral; | ||
| 488 | *data++ = s->TxFCSErrors; | ||
| 489 | *data++ = s->TxJumboFramesOK; | ||
| 490 | *data++ = s->TxJumboOctetsOK; | ||
| 491 | |||
| 492 | *data++ = s->RxOctetsOK; | ||
| 493 | *data++ = s->RxOctetsBad; | ||
| 494 | *data++ = s->RxUnicastFramesOK; | ||
| 495 | *data++ = s->RxMulticastFramesOK; | ||
| 496 | *data++ = s->RxBroadcastFramesOK; | ||
| 497 | *data++ = s->RxPauseFrames; | ||
| 498 | *data++ = s->RxFCSErrors; | ||
| 499 | *data++ = s->RxAlignErrors; | ||
| 500 | *data++ = s->RxSymbolErrors; | ||
| 501 | *data++ = s->RxDataErrors; | ||
| 502 | *data++ = s->RxSequenceErrors; | ||
| 503 | *data++ = s->RxRuntErrors; | ||
| 504 | *data++ = s->RxJabberErrors; | ||
| 505 | *data++ = s->RxInternalMACRcvError; | ||
| 506 | *data++ = s->RxInRangeLengthErrors; | ||
| 507 | *data++ = s->RxOutOfRangeLengthField; | ||
| 508 | *data++ = s->RxFrameTooLongErrors; | ||
| 509 | *data++ = s->RxJumboFramesOK; | ||
| 510 | *data++ = s->RxJumboOctetsOK; | ||
| 511 | |||
| 512 | *data++ = ss.rx_cso_good; | ||
| 513 | *data++ = ss.tx_cso; | ||
| 514 | *data++ = ss.tx_tso; | ||
| 515 | *data++ = ss.vlan_xtract; | ||
| 516 | *data++ = ss.vlan_insert; | ||
| 517 | *data++ = ss.tx_need_hdrroom; | ||
| 518 | |||
| 483 | *data++ = t->rx_drops; | 519 | *data++ = t->rx_drops; |
| 484 | *data++ = t->pure_rsps; | 520 | *data++ = t->pure_rsps; |
| 485 | *data++ = t->unhandled_irqs; | 521 | *data++ = t->unhandled_irqs; |
