diff options
author | Ganesh Goudar <ganeshgr@chelsio.com> | 2017-12-19 04:52:28 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-12-19 22:14:19 +0300 |
commit | f988008a8654e0a2b748ba49ee9fa18069161f76 (patch) | |
tree | 396379d80f6e2ebc54be05c7de86f7861a83057b /drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | |
parent | 1df94c3c5dadbce3df6cc0e989d8c85d43a903d6 (diff) | |
download | linux-f988008a8654e0a2b748ba49ee9fa18069161f76.tar.xz |
cxgb4: RSS table is 4k for T6
RSS table is 4k for T6 and later cards, add check for the
same.
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4/t4_hw.c')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c index d18e708c21c5..44930ca06c4b 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c +++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c @@ -4927,6 +4927,14 @@ void t4_intr_disable(struct adapter *adapter) t4_set_reg_field(adapter, PL_INT_MAP0_A, 1 << pf, 0); } +unsigned int t4_chip_rss_size(struct adapter *adap) +{ + if (CHELSIO_CHIP_VERSION(adap->params.chip) <= CHELSIO_T5) + return RSS_NENTRIES; + else + return T6_RSS_NENTRIES; +} + /** * t4_config_rss_range - configure a portion of the RSS mapping table * @adapter: the adapter @@ -5065,10 +5073,11 @@ static int rd_rss_row(struct adapter *adap, int row, u32 *val) */ int t4_read_rss(struct adapter *adapter, u16 *map) { + int i, ret, nentries; u32 val; - int i, ret; - for (i = 0; i < RSS_NENTRIES / 2; ++i) { + nentries = t4_chip_rss_size(adapter); + for (i = 0; i < nentries / 2; ++i) { ret = rd_rss_row(adapter, i, &val); if (ret) return ret; |