diff options
author | Hariprasad Shenai <hariprasad@chelsio.com> | 2015-12-23 17:17:14 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-12-24 03:34:45 (GMT) |
commit | 676d6a753066e9b5ae6c0a6ce8ec8cf9dabc4352 (patch) | |
tree | 89d45a34c20a51addc7398cac2594602018bd3c9 /drivers/net/ethernet/chelsio/cxgb4/sge.c | |
parent | acac596286bcadda964d0e15dbbd8bdebedcaa41 (diff) | |
download | linux-676d6a753066e9b5ae6c0a6ce8ec8cf9dabc4352.tar.xz |
cxgb4: Update register range and SGE registers for T6 adapter
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4/sge.c')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/sge.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/sge.c b/drivers/net/ethernet/chelsio/cxgb4/sge.c index 099b946..5829c9c 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/sge.c +++ b/drivers/net/ethernet/chelsio/cxgb4/sge.c @@ -3202,10 +3202,21 @@ int t4_sge_init(struct adapter *adap) * buffers. */ sge_conm_ctrl = t4_read_reg(adap, SGE_CONM_CTRL_A); - if (is_t4(adap->params.chip)) + switch (CHELSIO_CHIP_VERSION(adap->params.chip)) { + case CHELSIO_T4: egress_threshold = EGRTHRESHOLD_G(sge_conm_ctrl); - else + break; + case CHELSIO_T5: egress_threshold = EGRTHRESHOLDPACKING_G(sge_conm_ctrl); + break; + case CHELSIO_T6: + egress_threshold = T6_EGRTHRESHOLDPACKING_G(sge_conm_ctrl); + break; + default: + dev_err(adap->pdev_dev, "Unsupported Chip version %d\n", + CHELSIO_CHIP_VERSION(adap->params.chip)); + return -EINVAL; + } s->fl_starve_thres = 2*egress_threshold + 1; t4_idma_monitor_init(adap, &s->idma_monitor); |