aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/cxgb3/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/cxgb3/common.h')
-rw-r--r--drivers/net/cxgb3/common.h27
1 files changed, 24 insertions, 3 deletions
diff --git a/drivers/net/cxgb3/common.h b/drivers/net/cxgb3/common.h
index e23deeb7d06d..8d1379633698 100644
--- a/drivers/net/cxgb3/common.h
+++ b/drivers/net/cxgb3/common.h
@@ -112,8 +112,7 @@ enum {
112}; 112};
113 113
114enum { 114enum {
115 SUPPORTED_OFFLOAD = 1 << 24, 115 SUPPORTED_IRQ = 1 << 24
116 SUPPORTED_IRQ = 1 << 25
117}; 116};
118 117
119enum { /* adapter interrupt-maintained statistics */ 118enum { /* adapter interrupt-maintained statistics */
@@ -260,6 +259,10 @@ struct mac_stats {
260 unsigned long serdes_signal_loss; 259 unsigned long serdes_signal_loss;
261 unsigned long xaui_pcs_ctc_err; 260 unsigned long xaui_pcs_ctc_err;
262 unsigned long xaui_pcs_align_change; 261 unsigned long xaui_pcs_align_change;
262
263 unsigned long num_toggled; /* # times toggled TxEn due to stuck TX */
264 unsigned long num_resets; /* # times reset due to stuck TX */
265
263}; 266};
264 267
265struct tp_mib_stats { 268struct tp_mib_stats {
@@ -354,6 +357,9 @@ enum {
354 MC5_MODE_72_BIT = 2 357 MC5_MODE_72_BIT = 2
355}; 358};
356 359
360/* MC5 min active region size */
361enum { MC5_MIN_TIDS = 16 };
362
357struct vpd_params { 363struct vpd_params {
358 unsigned int cclk; 364 unsigned int cclk;
359 unsigned int mclk; 365 unsigned int mclk;
@@ -398,6 +404,13 @@ struct adapter_params {
398 unsigned int stats_update_period; /* MAC stats accumulation period */ 404 unsigned int stats_update_period; /* MAC stats accumulation period */
399 unsigned int linkpoll_period; /* link poll period in 0.1s */ 405 unsigned int linkpoll_period; /* link poll period in 0.1s */
400 unsigned int rev; /* chip revision */ 406 unsigned int rev; /* chip revision */
407 unsigned int offload;
408};
409
410enum { /* chip revisions */
411 T3_REV_A = 0,
412 T3_REV_B = 2,
413 T3_REV_B2 = 3,
401}; 414};
402 415
403struct trace_params { 416struct trace_params {
@@ -465,6 +478,13 @@ struct cmac {
465 struct adapter *adapter; 478 struct adapter *adapter;
466 unsigned int offset; 479 unsigned int offset;
467 unsigned int nucast; /* # of address filters for unicast MACs */ 480 unsigned int nucast; /* # of address filters for unicast MACs */
481 unsigned int tx_tcnt;
482 unsigned int tx_xcnt;
483 u64 tx_mcnt;
484 unsigned int rx_xcnt;
485 u64 rx_mcnt;
486 unsigned int toggle_cnt;
487 unsigned int txen;
468 struct mac_stats stats; 488 struct mac_stats stats;
469}; 489};
470 490
@@ -588,7 +608,7 @@ static inline int is_10G(const struct adapter *adap)
588 608
589static inline int is_offload(const struct adapter *adap) 609static inline int is_offload(const struct adapter *adap)
590{ 610{
591 return adapter_info(adap)->caps & SUPPORTED_OFFLOAD; 611 return adap->params.offload;
592} 612}
593 613
594static inline unsigned int core_ticks_per_usec(const struct adapter *adap) 614static inline unsigned int core_ticks_per_usec(const struct adapter *adap)
@@ -666,6 +686,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); 686int t3_mac_set_num_ucast(struct cmac *mac, int n);
667const struct mac_stats *t3_mac_update_stats(struct cmac *mac); 687const 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); 688int t3_mac_set_speed_duplex_fc(struct cmac *mac, int speed, int duplex, int fc);
689int t3b2_mac_watchdog_task(struct cmac *mac);
669 690
670void t3_mc5_prep(struct adapter *adapter, struct mc5 *mc5, int mode); 691void t3_mc5_prep(struct adapter *adapter, struct mc5 *mc5, int mode);
671int t3_mc5_init(struct mc5 *mc5, unsigned int nservers, unsigned int nfilters, 692int t3_mc5_init(struct mc5 *mc5, unsigned int nservers, unsigned int nfilters,