Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3624975pxb; Mon, 24 Jan 2022 13:48:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJyk1EKN3ZlM9GZcOBQtPDBDiDdLM1d0bHrF+8M4UcgWAm8pJsBy2lGeKgyL6EclIOHjhlVp X-Received: by 2002:a17:902:ea05:b0:14b:3891:ebd3 with SMTP id s5-20020a170902ea0500b0014b3891ebd3mr9920308plg.95.1643060903455; Mon, 24 Jan 2022 13:48:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643060903; cv=none; d=google.com; s=arc-20160816; b=MEmMyR1AH6MfRlXs5OcHpKJzrApWtY792ha1bLeSG9LPIcyQ6z5+LxuRbZTGHtFzzQ PAdtVAZPr2sKjBTTMaEtFvvGOx1nm+w95ji1SRqYrRXnW1jxx8IRt8e0OZdfnQ7bU5oM YK9H3KJAgx2HoefM4+w8pGWZvrMxkJWTaQha2EfrwrhvLR+2JSYS1qhGuq0IGW4McStJ I/jjzYgENWFR6nnrQED43Z1aWC9IrvoKrDFkPgizdu16BF+wnxKIAqh6huGqybUxf1T5 XR7bkFAZ7qCuxPX77sL8pCnhe+AVYhBcLzT6k6sGUYu4ho//mEuw1QC0JP8doNvdVpb3 Vk2A== 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=wAlnPRtISkZnQr0CX6zmiQfW48MZNJAhdo0Xc2byn3c=; b=HhQNN4clVhaTpTfsibv0rURXO/kZg94f8k/QFkMN1zIl872nCOzxgPxL3UuRi8XPwh iYRMQ6+fvPPsQjpXhmZa7vE3n9h656paX9Jhy7QRQSXToF3jnlwbiKrpnbSsVmssNol4 bcz6o8pJN+f9PY7Krt6znZ/H8KhP0/A7dqZow6bQ/den8wRhaRPzB4t08Lma7KBbSRHk /BbuvdcKR77adDWXYNs1wnMsgdNrrPFnGkvJ2b5ZhAsptbpqmO/qbbD1U5VfqehhBs/b SP6/dPI0YT4Ds2KgKvPYt74OAH0rvUJBNFn13coZ2jhH8WRc/1vYo72LGcy4d5BkBeNx FcAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nOExfnP9; 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 j9si14627936pgj.128.2022.01.24.13.48.09; Mon, 24 Jan 2022 13:48:23 -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=nOExfnP9; 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 S1455158AbiAXVew (ORCPT + 99 others); Mon, 24 Jan 2022 16:34:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348495AbiAXU5F (ORCPT ); Mon, 24 Jan 2022 15:57:05 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78473C0D9433; Mon, 24 Jan 2022 11:18:06 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 158FD60909; Mon, 24 Jan 2022 19:18:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2532C340E5; Mon, 24 Jan 2022 19:18:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643051885; bh=NGhZjXS4KdgHxuHTra3Zo18KP6/yuT5w/WsUHTf9LhQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nOExfnP9xjXB6Q9k/5oKpa/XT/RNn6jocwImqXaHA3CW6G/n+qqL9kJOFwrzCV3ML TIBhDwRO9o9HuAjQLeMMDiyDQN/6fwkdNq5Zc3IHPVX8g0+Meb3rcwDBY7qCOvVe4l JJdhqiwHQNpJ8dEbDvWkn/8ufpuazCeDKmMvyWc8= 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 4.19 119/239] RDMA/cxgb4: Set queue pair state when being queried Date: Mon, 24 Jan 2022 19:42:37 +0100 Message-Id: <20220124183946.890289842@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183943.102762895@linuxfoundation.org> References: <20220124183943.102762895@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 20e3128f59b14..aa48627fc0bfa 100644 --- a/drivers/infiniband/hw/cxgb4/qp.c +++ b/drivers/infiniband/hw/cxgb4/qp.c @@ -2483,6 +2483,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