aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/chelsio/cxgb4/sge.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4/sge.c')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/sge.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/sge.c b/drivers/net/ethernet/chelsio/cxgb4/sge.c
index b4b9f6048fe7..b688b32c21fe 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/sge.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/sge.c
@@ -2171,7 +2171,7 @@ static void sge_rx_timer_cb(unsigned long data)
2171 struct adapter *adap = (struct adapter *)data; 2171 struct adapter *adap = (struct adapter *)data;
2172 struct sge *s = &adap->sge; 2172 struct sge *s = &adap->sge;
2173 2173
2174 for (i = 0; i < ARRAY_SIZE(s->starving_fl); i++) 2174 for (i = 0; i < BITS_TO_LONGS(s->egr_sz); i++)
2175 for (m = s->starving_fl[i]; m; m &= m - 1) { 2175 for (m = s->starving_fl[i]; m; m &= m - 1) {
2176 struct sge_eth_rxq *rxq; 2176 struct sge_eth_rxq *rxq;
2177 unsigned int id = __ffs(m) + i * BITS_PER_LONG; 2177 unsigned int id = __ffs(m) + i * BITS_PER_LONG;
@@ -2259,7 +2259,7 @@ static void sge_tx_timer_cb(unsigned long data)
2259 struct adapter *adap = (struct adapter *)data; 2259 struct adapter *adap = (struct adapter *)data;
2260 struct sge *s = &adap->sge; 2260 struct sge *s = &adap->sge;
2261 2261
2262 for (i = 0; i < ARRAY_SIZE(s->txq_maperr); i++) 2262 for (i = 0; i < BITS_TO_LONGS(s->egr_sz); i++)
2263 for (m = s->txq_maperr[i]; m; m &= m - 1) { 2263 for (m = s->txq_maperr[i]; m; m &= m - 1) {
2264 unsigned long id = __ffs(m) + i * BITS_PER_LONG; 2264 unsigned long id = __ffs(m) + i * BITS_PER_LONG;
2265 struct sge_ofld_txq *txq = s->egr_map[id]; 2265 struct sge_ofld_txq *txq = s->egr_map[id];
@@ -2741,7 +2741,8 @@ void t4_free_sge_resources(struct adapter *adap)
2741 free_rspq_fl(adap, &adap->sge.intrq, NULL); 2741 free_rspq_fl(adap, &adap->sge.intrq, NULL);
2742 2742
2743 /* clear the reverse egress queue map */ 2743 /* clear the reverse egress queue map */
2744 memset(adap->sge.egr_map, 0, sizeof(adap->sge.egr_map)); 2744 memset(adap->sge.egr_map, 0,
2745 adap->sge.egr_sz * sizeof(*adap->sge.egr_map));
2745} 2746}
2746 2747
2747void t4_sge_start(struct adapter *adap) 2748void t4_sge_start(struct adapter *adap)