From patchwork Tue Jan 23 04:54:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selvin Xavier X-Patchwork-Id: 13526833 Received: from mail-oo1-f52.google.com (mail-oo1-f52.google.com [209.85.161.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EB49F23BD for ; Tue, 23 Jan 2024 05:11:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705986674; cv=none; b=vDJc0KOqZtLGP9CEkecGqcGXgPVOXBxh0NHvNRJvoXLzQX3eu0bDhixTCaS+3RC5S6MBdS0ZYONPfQiKqGgPXuGH8Nj2Lg+0cb0kYdbvjITmlNOX59inctwUwnfkjJzHhWgSX8UPAA+FH4hgOnjry1/rXWlPdPfZtqtXeFha2Iw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705986674; c=relaxed/simple; bh=TP83NtJAGWQ5XwnOQ1rQQXAQavMDzE8Boh1IBjpSCfs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type; b=UoFOjAjVTmr2XsUTWjRHufOFMBIFDb7kvRJJGzrMxG+C/rI7SqgI3OTOfhXNksKmWUTU4e3nU8hy41P7B8LhT3wvNVUzaeS4erELzwzpBTrLYt4+dnylNsrAPzGN/D2ez4ZRwJQj0o6n7DJbrSeVGsds4gphxL8XdvlctM0k9yc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=fBnoYSMV; arc=none smtp.client-ip=209.85.161.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="fBnoYSMV" Received: by mail-oo1-f52.google.com with SMTP id 006d021491bc7-5957ede4deaso2387604eaf.1 for ; Mon, 22 Jan 2024 21:11:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1705986672; x=1706591472; darn=vger.kernel.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=wGnYINWTOc0yzlVaIlZsYBf72lF5TQri3tGhtHUrQEI=; b=fBnoYSMVVeuTaMslQcDF3RHWd+kpJC/Nv2LOrjlsEaW/LjiqbBNb2VSx4FFcHlEKXK Ip5oz2PCNEJAu1a9aQ9esfH7ddxUbR/0jsQP1H0TQK5IQDsDTm96qSAq3dA/DI6K+W1j oxOBax8GziU234vP5g5vvtWkVuyc3EyvqwGHQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705986672; x=1706591472; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wGnYINWTOc0yzlVaIlZsYBf72lF5TQri3tGhtHUrQEI=; b=bwoJrdrgcpAIyBpgaz8Wawd2Bf6D7Q2UXkWAAZdFub9Nj1pwyS4sagroi/1wOXQn4o NZ/VvB52l2/BPWYP2HYtsVQg8aq5e7/htNKbiS1r8VryVKS++gTDJtPx1XDwb4T6nmU4 RIrzs/3Y0uRvKg3g3+LJdVAThxaSfHoeKw7a73BUSUhxGw8n1n/Qu4gJKOOY8omkkua3 lhE9jpV8rpimT4tV32zmurNCrR2sSyvoePs/okokQQ27ivvy91QMRwkPmcqRBGSXn8BH MVf6+8w0CSdykFEfNif8eaj+BMf+vul2oyvjHqx5vBlwMAmCTH6H6URXjfcqaTDmkZAG tROA== X-Gm-Message-State: AOJu0YyLhsfzU2ForBbEHzSoYi6Am3ZvOMtmerHT9kMFviiAYPrePpkE +YLtbNBBDm7/GG7Ps5XzBywW6eUyglMpYh7QENpYmimHYs8RZYEylg4El0EMEQ== X-Google-Smtp-Source: AGHT+IETd/QCfXnqiY0fmj2qTSHQI/hT/GItsLBxuiO8/697D8Okk1KjXGg5b8qYg+gT3rHJcjNThw== X-Received: by 2002:a05:6358:7242:b0:175:f9b8:89bf with SMTP id i2-20020a056358724200b00175f9b889bfmr4504552rwa.22.1705986671848; Mon, 22 Jan 2024 21:11:11 -0800 (PST) Received: from dhcp-10-192-206-197.iig.avagotech.net.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id lp4-20020a056a003d4400b006dce766903dsm672949pfb.90.2024.01.22.21.11.09 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Jan 2024 21:11:11 -0800 (PST) From: Selvin Xavier To: leon@kernel.org, jgg@ziepe.ca Cc: linux-rdma@vger.kernel.org, andrew.gospodarek@broadcom.com, Kalesh AP , Selvin Xavier Subject: [PATCH for-rc 5/5] RDMA/bnxt_re: Add a missing check in bnxt_qplib_query_srq Date: Mon, 22 Jan 2024 20:54:37 -0800 Message-Id: <1705985677-15551-6-git-send-email-selvin.xavier@broadcom.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1705985677-15551-1-git-send-email-selvin.xavier@broadcom.com> References: <1705985677-15551-1-git-send-email-selvin.xavier@broadcom.com> Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: From: Kalesh AP Before populating the response, driver has to check the status of HWRM command. Fixes: 37cb11acf1f7 ("RDMA/bnxt_re: Add SRQ support for Broadcom adapters") Signed-off-by: Kalesh AP Signed-off-by: Selvin Xavier --- drivers/infiniband/hw/bnxt_re/qplib_fp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/bnxt_re/qplib_fp.c b/drivers/infiniband/hw/bnxt_re/qplib_fp.c index c98e04f..439d0c7 100644 --- a/drivers/infiniband/hw/bnxt_re/qplib_fp.c +++ b/drivers/infiniband/hw/bnxt_re/qplib_fp.c @@ -744,7 +744,8 @@ int bnxt_qplib_query_srq(struct bnxt_qplib_res *res, bnxt_qplib_fill_cmdqmsg(&msg, &req, &resp, &sbuf, sizeof(req), sizeof(resp), 0); rc = bnxt_qplib_rcfw_send_message(rcfw, &msg); - srq->threshold = le16_to_cpu(sb->srq_limit); + if (!rc) + srq->threshold = le16_to_cpu(sb->srq_limit); dma_free_coherent(&rcfw->pdev->dev, sbuf.size, sbuf.sb, sbuf.dma_addr);