Skip to content

Commit fc4144e

Browse files
RajuRangojujgunthorpe
authored andcommitted
cxgb4: Export sge_host_page_size to ulds
Export the sge_host_page_size field to ULDs via cxgb4_lld_info, so that iw_cxgb4 can make use of this in calculating the correct qp/cq mask. Fixes: 2391b00 ("cxgb4: Remove SGE_HOST_PAGE_SIZE dependency on page size") Signed-off-by: Raju Rangoju <rajur@chelsio.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
1 parent 48396e8 commit fc4144e

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,7 @@ static void uld_init(struct adapter *adap, struct cxgb4_lld_info *lld)
660660
lld->cclk_ps = 1000000000 / adap->params.vpd.cclk;
661661
lld->udb_density = 1 << adap->params.sge.eq_qpp;
662662
lld->ucq_density = 1 << adap->params.sge.iq_qpp;
663+
lld->sge_host_page_size = 1 << (adap->params.sge.hps + 10);
663664
lld->filt_mode = adap->params.tp.vlan_pri_map;
664665
/* MODQ_REQ_MAP sets queues 0-3 to chan 0-3 */
665666
for (i = 0; i < NCHAN; i++)

drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ struct cxgb4_lld_info {
336336
unsigned int cclk_ps; /* Core clock period in psec */
337337
unsigned short udb_density; /* # of user DB/page */
338338
unsigned short ucq_density; /* # of user CQs/page */
339+
unsigned int sge_host_page_size; /* SGE host page size */
339340
unsigned short filt_mode; /* filter optional components */
340341
unsigned short tx_modq[NCHAN]; /* maps each tx channel to a */
341342
/* scheduler queue */

0 commit comments

Comments
 (0)