aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/cxgb3/common.h
diff options
context:
space:
mode:
authorDivy Le Ray <divy@chelsio.com>2007-03-18 16:10:12 -0400
committerJeff Garzik <jeff@garzik.org>2007-03-23 01:48:34 -0400
commitfc90664e3438c990d280f179ccb0642711d5c553 (patch)
tree8ece58a4eec002186f1c569385830f03336b50af /drivers/net/cxgb3/common.h
parent2e2839627a957714808f98a802d137a7a2a1df46 (diff)
cxgb3 - Fix potential MAC hang
Under rare conditions, the MAC might hang while generating a pause frame. This patch fine tunes the MAC settings to avoid the issue, allows for periodic MAC state check, and triggers a recovery if hung. Also fix one MAC statistics counter for the rev board T3B2. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/cxgb3/common.h')
-rw-r--r--drivers/net/cxgb3/common.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/cxgb3/common.h b/drivers/net/cxgb3/common.h
index e23deeb7d06d..85e5543cfb57 100644
--- a/drivers/net/cxgb3/common.h
+++ b/drivers/net/cxgb3/common.h
@@ -260,6 +260,10 @@ struct mac_stats {
260 unsigned long serdes_signal_loss; 260 unsigned long serdes_signal_loss;
261 unsigned long xaui_pcs_ctc_err; 261 unsigned long xaui_pcs_ctc_err;
262 unsigned long xaui_pcs_align_change; 262 unsigned long xaui_pcs_align_change;
263
264 unsigned long num_toggled; /* # times toggled TxEn due to stuck TX */
265 unsigned long num_resets; /* # times reset due to stuck TX */
266
263}; 267};
264 268
265struct tp_mib_stats { 269struct tp_mib_stats {
@@ -400,6 +404,12 @@ struct adapter_params {
400 unsigned int rev; /* chip revision */ 404 unsigned int rev; /* chip revision */
401}; 405};
402 406
407enum { /* chip revisions */
408 T3_REV_A = 0,
409 T3_REV_B = 2,
410 T3_REV_B2 = 3,
411};
412
403struct trace_params { 413struct trace_params {
404 u32 sip; 414 u32 sip;
405 u32 sip_mask; 415 u32 sip_mask;
@@ -465,6 +475,10 @@ struct cmac {
465 struct adapter *adapter; 475 struct adapter *adapter;
466 unsigned int offset; 476 unsigned int offset;
467 unsigned int nucast; /* # of address filters for unicast MACs */ 477 unsigned int nucast; /* # of address filters for unicast MACs */
478 unsigned int tcnt;
479 unsigned int xcnt;
480 unsigned int toggle_cnt;
481 unsigned int txen;
468 struct mac_stats stats; 482 struct mac_stats stats;
469}; 483};
470 484
@@ -666,6 +680,7 @@ int t3_mac_set_address(struct cmac *mac, unsigned int idx, u8 addr[6]);
666int t3_mac_set_num_ucast(struct cmac *mac, int n); 680int t3_mac_set_num_ucast(struct cmac *mac, int n);
667const struct mac_stats *t3_mac_update_stats(struct cmac *mac); 681const struct mac_stats *t3_mac_update_stats(struct cmac *mac);
668int t3_mac_set_speed_duplex_fc(struct cmac *mac, int speed, int duplex, int fc); 682int t3_mac_set_speed_duplex_fc(struct cmac *mac, int speed, int duplex, int fc);
683int t3b2_mac_watchdog_task(struct cmac *mac);
669 684
670void t3_mc5_prep(struct adapter *adapter, struct mc5 *mc5, int mode); 685void t3_mc5_prep(struct adapter *adapter, struct mc5 *mc5, int mode);
671int t3_mc5_init(struct mc5 *mc5, unsigned int nservers, unsigned int nfilters, 686int t3_mc5_init(struct mc5 *mc5, unsigned int nservers, unsigned int nfilters,