diff options
author | Alex Vesker <valex@mellanox.com> | 2017-07-13 11:27:12 +0300 |
---|---|---|
committer | Leon Romanovsky <leon@kernel.org> | 2017-07-23 09:45:11 +0300 |
commit | 11f74b40359b19f760964e71d04882a6caf530cc (patch) | |
tree | a2e92b8a700c7a02920e32577f1a31199bea2aba /drivers/infiniband/ulp | |
parent | a08e1120627f72e9ed7c291e3b9f8dd29c1513ab (diff) | |
download | linux-11f74b40359b19f760964e71d04882a6caf530cc.tar.xz |
IB/ipoib: Prevent setting negative values to max_nonsrq_conn_qp
Don't allow negative values to max_nonsrq_conn_qp. There is no functional
impact on a negative value but it is logicically incorrect.
Fixes: 68e995a29572 ("IPoIB/cm: Add connected mode support for devices without SRQs")
Signed-off-by: Alex Vesker <valex@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'drivers/infiniband/ulp')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 144187b407bd..8b7ec15a9d6e 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -2366,6 +2366,7 @@ static int __init ipoib_init_module(void) ipoib_sendq_size = max3(ipoib_sendq_size, 2 * MAX_SEND_CQE, IPOIB_MIN_QUEUE_SIZE); #ifdef CONFIG_INFINIBAND_IPOIB_CM ipoib_max_conn_qp = min(ipoib_max_conn_qp, IPOIB_CM_MAX_CONN_QP); + ipoib_max_conn_qp = max(ipoib_max_conn_qp, 0); #endif /* |