Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965185AbdCJORr (ORCPT ); Fri, 10 Mar 2017 09:17:47 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:42552 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933815AbdCJLvP (ORCPT ); Fri, 10 Mar 2017 06:51:15 -0500 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Daniel Jurgens" , "Yuval Shaia" , "Maor Gottlieb" , "Mark Bloch" , "Leon Romanovsky" , "Doug Ledford" Date: Fri, 10 Mar 2017 11:46:22 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 041/370] IB/mlx4: Put non zero value in max_ah device attribute In-Reply-To: X-SA-Exim-Connect-IP: 82.70.136.246 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1203 Lines: 34 3.16.42-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Maor Gottlieb commit 731e0415b4af3a133d0316e4dc8ef0ea57dc3fdf upstream. Use INT_MAX since this is the max value the attribute can hold, though hardware capability is unlimited. Fixes: 225c7b1feef1 ('IB/mlx4: Add a driver Mellanox ConnectX InfiniBand adapters') Signed-off-by: Maor Gottlieb Signed-off-by: Daniel Jurgens Reviewed-by: Mark Bloch Reviewed-by: Yuval Shaia Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford [bwh: Backported to 3.16: adjust context] Signed-off-by: Ben Hutchings --- drivers/infiniband/hw/mlx4/main.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/infiniband/hw/mlx4/main.c +++ b/drivers/infiniband/hw/mlx4/main.c @@ -212,6 +212,7 @@ static int mlx4_ib_query_device(struct i props->max_total_mcast_qp_attach = props->max_mcast_qp_attach * props->max_mcast_grp; props->max_map_per_fmr = dev->dev->caps.max_fmr_maps; + props->max_ah = INT_MAX; out: kfree(in_mad);