Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3705491pxb; Mon, 24 Jan 2022 15:54:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJzvOqmkzIsH8zEU0nuAXIQ/5yOM5yL1F9rj7r9+j/3h4JzM+5Bn24dCp/6toipkBrzsjF4C X-Received: by 2002:aa7:8003:0:b0:4bc:1a91:6df3 with SMTP id j3-20020aa78003000000b004bc1a916df3mr16109490pfi.26.1643068467047; Mon, 24 Jan 2022 15:54:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643068467; cv=none; d=google.com; s=arc-20160816; b=L2H09wYhaYzBVQHQG0grrqlm2M010ZGGiDcS6ZSSEVPfAorEK9PJxyIl5IqVep+i49 l5/m9Ez6MSAkcxczltAksgrta7E7/nexHN4lGuI6/t/E6Cb89CsnzV0HirRJQER1Ccr2 sJCl7iyIu+l7FRsUMtIp5Da4zZzFMNfdsddpDVZIygdUun7/glt6mNJsZYYiaCpSZ3Vw 0Z7x8NMjZUEYGK6mJQdDxK8LCjud4D74SHWbmO39EYcJg/BjFYIlMrSvhxBo0ktbEkQk DZHi96l51E3jeZCZyy0wXTju4bq7OwDF+1VmKWw2r5THoIw3lEud8k1JGqdoTvFAnv0N bmbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=NMrFE0FIxpNca9OW5hBpcw+xIJDS9lWRMJ6pfBIAWNw=; b=mY5QywXVjD2gzmzYHs18HGeGRk/B4XmlaLJ/PcZ1AXIFDRRPoP/jMXD9/PWLkyFvLc N4pV1jndKHjNYcmdMCXsKZNRB1bJ1CMynStHPV55zcJq6Hik+7y7FaTq7E0gWSH2y8gF c07AhXYTbCkCQZfRItz1y5v0e4gLGPzdqm6pqXSxloztHazPok6jiqWb9tMsowi4yadd Hz8FKCuifEW+c2mn8Tb4KqBJTkUTfQatVgokVlY3hLFqmVNP9bzaWqLS48I8p3D3Ws7u Rtu+xv116V1xjOuowcoVxYiTInr7SlI45enC+j9x6QIM0eJfaqDIND2svUiZVs42xbRc m/5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=puXg8zQM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p14si17081648plf.521.2022.01.24.15.54.14; Mon, 24 Jan 2022 15:54:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=puXg8zQM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2363939AbiAXXqY (ORCPT + 99 others); Mon, 24 Jan 2022 18:46:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1845398AbiAXXMO (ORCPT ); Mon, 24 Jan 2022 18:12:14 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA5DFC067A4E; Mon, 24 Jan 2022 13:19:19 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 910DFB8121C; Mon, 24 Jan 2022 21:19:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A8AB2C340E4; Mon, 24 Jan 2022 21:19:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643059157; bh=Slr51+xyY5i5YjPnVEH/v3kjhkarQhm8KYwpq5C3Fao=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=puXg8zQMKPzaAClkJ102WF2lrhpV6cRAcQ5YuSg/w5rARptof89W4cl+SIlXBgzcG X6AA7XR1KkJEe1C91GpQbzv6idIEvtGtD3iimL3BHlyTPRpDWP6ONXTPHmlYDD2fkx 5bW0urOIzsCH4GYYncZCNrpMswbmi1NNoGwv4QGM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kamal Heib , Leon Romanovsky , Jason Gunthorpe , Sasha Levin Subject: [PATCH 5.16 0523/1039] RDMA/cxgb4: Set queue pair state when being queried Date: Mon, 24 Jan 2022 19:38:32 +0100 Message-Id: <20220124184142.871496305@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kamal Heib [ Upstream commit e375b9c92985e409c4bb95dd43d34915ea7f5e28 ] The API for ib_query_qp requires the driver to set cur_qp_state on return, add the missing set. Fixes: 67bbc05512d8 ("RDMA/cxgb4: Add query_qp support") Link: https://lore.kernel.org/r/20211220152530.60399-1-kamalheib1@gmail.com Signed-off-by: Kamal Heib Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/hw/cxgb4/qp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c index d20b4ef2c853d..ffbd9a89981e7 100644 --- a/drivers/infiniband/hw/cxgb4/qp.c +++ b/drivers/infiniband/hw/cxgb4/qp.c @@ -2460,6 +2460,7 @@ int c4iw_ib_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, memset(attr, 0, sizeof(*attr)); memset(init_attr, 0, sizeof(*init_attr)); attr->qp_state = to_ib_qp_state(qhp->attr.state); + attr->cur_qp_state = to_ib_qp_state(qhp->attr.state); init_attr->cap.max_send_wr = qhp->attr.sq_num_entries; init_attr->cap.max_recv_wr = qhp->attr.rq_num_entries; init_attr->cap.max_send_sge = qhp->attr.sq_max_sges; -- 2.34.1