summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRam Amrani <Ram.Amrani@Cavium.com>2017-01-01 14:57:10 +0300
committerDavid S. Miller <davem@davemloft.net>2017-01-02 05:02:14 +0300
commit1fe582ecade714e90e71c67c32edb7b5b809d651 (patch)
treeebf9db04e42cfca601459d4d96aaf52071dd359d /drivers
parent8806787609dea02c333b187f94c1556798ac8897 (diff)
downloadlinux-1fe582ecade714e90e71c67c32edb7b5b809d651.tar.xz
qed: Conserve RDMA resources when !QEDR
If qedr isn't part of the kernel then don't allocate RDMA resources for it in qed. Signed-off-by: Ram Amrani <Ram.Amrani@cavium.com> Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/qlogic/qed/qed_mcp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_mcp.c b/drivers/net/ethernet/qlogic/qed/qed_mcp.c
index 256674131c47..c8a877594032 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_mcp.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_mcp.c
@@ -1122,7 +1122,9 @@ qed_mcp_get_shmem_proto(struct qed_hwfn *p_hwfn,
switch (p_info->config & FUNC_MF_CFG_PROTOCOL_MASK) {
case FUNC_MF_CFG_PROTOCOL_ETHERNET:
- if (qed_mcp_get_shmem_proto_mfw(p_hwfn, p_ptt, p_proto))
+ if (!IS_ENABLED(CONFIG_QED_RDMA))
+ *p_proto = QED_PCI_ETH;
+ else if (qed_mcp_get_shmem_proto_mfw(p_hwfn, p_ptt, p_proto))
qed_mcp_get_shmem_proto_legacy(p_hwfn, p_proto);
break;
case FUNC_MF_CFG_PROTOCOL_ISCSI: