Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 27575
b: refs/heads/master
c: cea94db
h: refs/heads/master
i:
  27573: 7d8cb3a
  27571: 3da5017
  27567: 8cc3544
v: v3
  • Loading branch information
Michael Chan authored and David S. Miller committed Jun 18, 2006
1 parent b29b922 commit 7d99234
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bc726a71d2799f0f8b68a17f49d86aa030f64abc
refs/heads/master: cea94db9b496d7fe25bbd3ebd0f24afaac2069d5
14 changes: 11 additions & 3 deletions trunk/drivers/net/bnx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -4034,6 +4034,8 @@ bnx2_timer(unsigned long data)
msg = (u32) ++bp->fw_drv_pulse_wr_seq;
REG_WR_IND(bp, bp->shmem_base + BNX2_DRV_PULSE_MB, msg);

bp->stats_blk->stat_FwRxDrop = REG_RD_IND(bp, BNX2_FW_RX_DROP_COUNT);

if ((bp->phy_flags & PHY_SERDES_FLAG) &&
(CHIP_NUM(bp) == CHIP_NUM_5706)) {

Expand Down Expand Up @@ -4504,6 +4506,10 @@ bnx2_get_stats(struct net_device *dev)
net_stats->tx_aborted_errors +
net_stats->tx_carrier_errors;

net_stats->rx_missed_errors =
(unsigned long) (stats_blk->stat_IfInMBUFDiscards +
stats_blk->stat_FwRxDrop);

return net_stats;
}

Expand Down Expand Up @@ -4986,7 +4992,7 @@ bnx2_set_rx_csum(struct net_device *dev, u32 data)
return 0;
}

#define BNX2_NUM_STATS 45
#define BNX2_NUM_STATS 46

static struct {
char string[ETH_GSTRING_LEN];
Expand Down Expand Up @@ -5036,6 +5042,7 @@ static struct {
{ "rx_mac_ctrl_frames" },
{ "rx_filtered_packets" },
{ "rx_discards" },
{ "rx_fw_discards" },
};

#define STATS_OFFSET32(offset_name) (offsetof(struct statistics_block, offset_name) / 4)
Expand Down Expand Up @@ -5086,6 +5093,7 @@ static const unsigned long bnx2_stats_offset_arr[BNX2_NUM_STATS] = {
STATS_OFFSET32(stat_MacControlFramesReceived),
STATS_OFFSET32(stat_IfInFramesL2FilterDiscards),
STATS_OFFSET32(stat_IfInMBUFDiscards),
STATS_OFFSET32(stat_FwRxDrop),
};

/* stat_IfHCInBadOctets and stat_Dot3StatsCarrierSenseErrors are
Expand All @@ -5096,15 +5104,15 @@ static u8 bnx2_5706_stats_len_arr[BNX2_NUM_STATS] = {
4,0,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,
4,4,4,4,4,4,
};

static u8 bnx2_5708_stats_len_arr[BNX2_NUM_STATS] = {
8,0,8,8,8,8,8,8,8,8,
4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,
4,4,4,4,4,4,
};

#define BNX2_NUM_TESTS 6
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/net/bnx2.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ struct statistics_block {
u32 stat_GenStat13;
u32 stat_GenStat14;
u32 stat_GenStat15;
u32 stat_FwRxDrop;
};


Expand Down Expand Up @@ -3481,6 +3482,8 @@ struct l2_fhdr {

#define BNX2_COM_SCRATCH 0x00120000

#define BNX2_FW_RX_DROP_COUNT 0x00120084


/*
* cp_reg definition
Expand Down

0 comments on commit 7d99234

Please sign in to comment.