From patchwork Thu May 10 22:32:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10392519 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id ED32460236 for ; Thu, 10 May 2018 22:32:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC72928A1D for ; Thu, 10 May 2018 22:32:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BDA6028A51; Thu, 10 May 2018 22:32:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 29A9728A1D for ; Thu, 10 May 2018 22:32:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751099AbeEJWcK (ORCPT ); Thu, 10 May 2018 18:32:10 -0400 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:29167 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750806AbeEJWcK (ORCPT ); Thu, 10 May 2018 18:32:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1525991531; x=1557527531; h=from:to:cc:subject:date:message-id; bh=1DxGbWsSfZvRqKTBnMstzFoRrdIMHC+wazeXE2bKIMs=; b=YzlKnlYyjaboOjrE5NWJ1YnSBd4Xy7/HfAwMS7vxknqpOT1rbVv+LuIs 7Iu94yDUJAXtiTCy7y8cVjfz6xVOyLlkTSBWsRQJnmGj6s1bLK0ARUNrN HHQ3KxFOkJb47J3zNCS2I6YJffp7+JdPIahqdbz0MkpY0bRpeqeF6QDNk k91c9R3DmE3iFprdZ0Mp4lEy/qFDayxVAu/52CK51NTKh3R8MIT/0a7PQ vCX75H/hFY4FTbGzOSukk8MCpmUgFPzT1L/v5dOqDFWZ7KMUeZh6eRviq 4lUZ6T5xpXcvLpdvMFpkFLGP8rUCFDGnf7CZ0HdvRAVkJwh0Cf6Q4kMpG A==; X-IronPort-AV: E=Sophos;i="5.49,386,1520870400"; d="scan'208";a="78573142" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 11 May 2018 06:32:10 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP; 10 May 2018 15:23:40 -0700 Received: from thinkpad-bart.sdcorp.global.sandisk.com ([10.111.70.1]) by uls-op-cesaip01.wdc.com with ESMTP; 10 May 2018 15:32:10 -0700 From: Bart Van Assche To: Jason Gunthorpe Cc: Doug Ledford , linux-rdma@vger.kernel.org, Bart Van Assche , Steve Wise , stable@vger.kernel.org Subject: [PATCH] IB/srpt: Increase port count Date: Thu, 10 May 2018 15:32:09 -0700 Message-Id: <20180510223209.10277-1-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.16.3 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since there are adapters that have four ports, increase the size of the srpt_device.port[] array. This patch avoids that the following warning is hit with quad port Chelsio adapters: WARN_ON(sdev->device->phys_port_cnt > ARRAY_SIZE(sdev->port)); Reported-by: Steve Wise Signed-off-by: Bart Van Assche Cc: Steve Wise Cc: --- drivers/infiniband/ulp/srpt/ib_srpt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.h b/drivers/infiniband/ulp/srpt/ib_srpt.h index 2361483476a0..b72f1f4066fa 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.h +++ b/drivers/infiniband/ulp/srpt/ib_srpt.h @@ -410,7 +410,7 @@ struct srpt_device { struct mutex sdev_mutex; bool use_srq; struct srpt_recv_ioctx **ioctx_ring; - struct srpt_port port[2]; + struct srpt_port port[4]; struct ib_event_handler event_handler; struct list_head list; };