summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
diff options
context:
space:
mode:
authorArjun Vynipadath2017-06-23 15:44:37 +0200
committerDavid S. Miller2017-06-23 20:22:39 +0200
commit8f46d46715a12f509e13200033a1ed4d6cf335ff (patch)
treecdeb27d6f3c9805444a1f644d31528648bd6b34b /drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
parentcxgb4: Update T6 Buffer Group and Channel Mappings (diff)
downloadkernel-qcow2-linux-8f46d46715a12f509e13200033a1ed4d6cf335ff.tar.gz
kernel-qcow2-linux-8f46d46715a12f509e13200033a1ed4d6cf335ff.tar.xz
kernel-qcow2-linux-8f46d46715a12f509e13200033a1ed4d6cf335ff.zip
cxgb4: Use Firmware params to get buffer-group map
Buffer group mappings can be obtained using FW_PARAMs cmd for newer FW. Since some of the bg_maps are obtained in atomic context, created another t4_query_params_ns(), that wont sleep when awaiting mbox cmd completion. Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: Arjun Vynipadath <arjun@chelsio.com> 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/cxgb4.h')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/cxgb4.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
index f60a64bd6c41..451c138ff6ea 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
@@ -362,6 +362,11 @@ struct adapter_params {
unsigned int max_ordird_qp; /* Max read depth per RDMA QP */
unsigned int max_ird_adapter; /* Max read depth per adapter */
bool fr_nsmr_tpte_wr_support; /* FW support for FR_NSMR_TPTE_WR */
+
+ /* MPS Buffer Group Map[per Port]. Bit i is set if buffer group i is
+ * used by the Port
+ */
+ u8 mps_bg_map[MAX_NPORTS]; /* MPS Buffer Group Map */
};
/* State needed to monitor the forward progress of SGE Ingress DMA activities
@@ -1495,9 +1500,12 @@ int t4_fw_initialize(struct adapter *adap, unsigned int mbox);
int t4_query_params(struct adapter *adap, unsigned int mbox, unsigned int pf,
unsigned int vf, unsigned int nparams, const u32 *params,
u32 *val);
+int t4_query_params_ns(struct adapter *adap, unsigned int mbox, unsigned int pf,
+ unsigned int vf, unsigned int nparams, const u32 *params,
+ u32 *val);
int t4_query_params_rw(struct adapter *adap, unsigned int mbox, unsigned int pf,
unsigned int vf, unsigned int nparams, const u32 *params,
- u32 *val, int rw);
+ u32 *val, int rw, bool sleep_ok);
int t4_set_params_timeout(struct adapter *adap, unsigned int mbox,
unsigned int pf, unsigned int vf,
unsigned int nparams, const u32 *params,