Commit dd2e0b6e authored by Jeff Garzik's avatar Jeff Garzik

[netdrvr 8139cp] stats improvements and fixes

* make sure rx_frags is still accounted
* query RxMissed register, and clear, upon each get-stats func call
parent 9526e693
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
TODO: TODO:
* Test Tx checksumming thoroughly * Test Tx checksumming thoroughly
* Implement dev->tx_timeout * Implement dev->tx_timeout
* Implement __cp_get_stats
Low priority TODO: Low priority TODO:
* Complete reset on PciErr * Complete reset on PciErr
...@@ -159,6 +158,7 @@ enum { ...@@ -159,6 +158,7 @@ enum {
TxConfig = 0x40, /* Tx configuration */ TxConfig = 0x40, /* Tx configuration */
ChipVersion = 0x43, /* 8-bit chip version, inside TxConfig */ ChipVersion = 0x43, /* 8-bit chip version, inside TxConfig */
RxConfig = 0x44, /* Rx configuration */ RxConfig = 0x44, /* Rx configuration */
RxMissed = 0x4C, /* 24 bits valid, write clears */
Cfg9346 = 0x50, /* EEPROM select/control; Cfg reg [un]lock */ Cfg9346 = 0x50, /* EEPROM select/control; Cfg reg [un]lock */
Config1 = 0x52, /* Config1 */ Config1 = 0x52, /* Config1 */
Config3 = 0x59, /* Config3 */ Config3 = 0x59, /* Config3 */
...@@ -546,6 +546,7 @@ static int cp_rx_poll (struct net_device *dev, int *budget) ...@@ -546,6 +546,7 @@ static int cp_rx_poll (struct net_device *dev, int *budget)
*/ */
cp_rx_err_acct(cp, rx_tail, status, len); cp_rx_err_acct(cp, rx_tail, status, len);
cp->net_stats.rx_dropped++; cp->net_stats.rx_dropped++;
cp->cp_stats.rx_frags++;
goto rx_next; goto rx_next;
} }
...@@ -939,7 +940,9 @@ static void cp_set_rx_mode (struct net_device *dev) ...@@ -939,7 +940,9 @@ static void cp_set_rx_mode (struct net_device *dev)
static void __cp_get_stats(struct cp_private *cp) static void __cp_get_stats(struct cp_private *cp)
{ {
/* XXX implement */ /* only lower 24 bits valid; write any value to clear */
cp->net_stats.rx_missed_errors += (cpr32 (RxMissed) & 0xffffff);
cpw32 (RxMissed, 0);
} }
static struct net_device_stats *cp_get_stats(struct net_device *dev) static struct net_device_stats *cp_get_stats(struct net_device *dev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment