From patchwork Thu Jun 27 02:41:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selvin Xavier X-Patchwork-Id: 13713767 Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) (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 482FEF9E4 for ; Thu, 27 Jun 2024 03:02:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719457324; cv=none; b=A5MbLpZFLD7CxenDTCa5SSLUELBe9VgJOi5Ios+mrlb0LAjTqxdyz6UQ1Ofz0K/yeFqATfl8CKYBo1NPmZeMTZ9yYJmqazdZncH86TZiA8SPdRqJBmNTUVkG0unP1vP1K5nHkSd9Y/toodyL4R08LDMPKm+hx3R01wH9GVwzgAA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719457324; c=relaxed/simple; bh=cQ2CM5xAZJunftQNliRO/vPRPTFuCLA7gZLdBGlMgOw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type; b=pVUppYgBa3zoMtJgtBCqgaML8ZHzDiNPjZX8q34hI8YaqdX9Hiz9KocoUDvRF1yo6KDoJmqUBcsajjtnwojIwR+89Lex3cqHpoVDSN4c8KeGkjGKlmS7ALVocf0eSVrc7VlNXu9GMhJNVkQsneDy0pvwwdrALLqcBO95vOLVoTI= 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=HoW9m7FO; arc=none smtp.client-ip=209.85.214.170 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="HoW9m7FO" Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-1f480624d10so61501865ad.1 for ; Wed, 26 Jun 2024 20:02:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1719457322; x=1720062122; 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=bSsf9znd4oVsM5HZXF24KiNx2k95El3gJPGyz2GdLX0=; b=HoW9m7FO49r0/MvuoBAVSKI6YcXAW4SpEbGOeiIizuWc+7g+7BSUxarFhoHvZIa0KU FtWciuy09RtxjoiLYNjrw+NvQm/07TJZT1XJb1b38TGL+igIGYoEnnsm0kO31RH1zJ+Z SGTJLe/jDeKJB0vES2RUCESXjM7WS/am9Ju70= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719457322; x=1720062122; 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=bSsf9znd4oVsM5HZXF24KiNx2k95El3gJPGyz2GdLX0=; b=cmR6QL0eFr5Bk33ulRYRbyCD5Htec+TxfApBeEh8/l/bjyOeMCqUeYUzPbVvbHz/St AHPAG7avBIJSIJABdJNPMU60tfJWAt5oQrV9t1TBq4d9mb/5bd8KCb1/MRYr/JdjPE4o SPqdFtfkG3XUkJF1AdZAiLN2XoMU0485ACH2jlDC8XqmjfmXMtlU682d8TpWqKfYw+Rx SUsifNfnOrW6Q68M3XFgMDEZpU086F/jlZ9AzVgZNklYtmTKcz+Ga0apOt0w9X83nfA3 NsV5PQqOlIUlmyJS8sCfqfYyRlGcmhTYSYjj8C4WlGyPZw5tvn0ZxxKzok92ikYOiYJk BuJg== X-Gm-Message-State: AOJu0YzlYCNFtZ5rAi1RZMrKPYfoEElVzYgzCwF3pEnohB73jhmuYRAl fbyIX8k2a31dLo8uY6AYmSTH1EqfsYemGreXMp73UToce5ncUAxj26xKABVlDw== X-Google-Smtp-Source: AGHT+IGh7dRDZkvmYPBMX0ii2ilWlS3gAeq/irzL856vTJdk40hg/UO4oi15URKsu5Ffn1VOeHRA8Q== X-Received: by 2002:a17:902:e995:b0:1f9:8f78:5553 with SMTP id d9443c01a7336-1fa1d4fdc46mr121817505ad.18.1719457322417; Wed, 26 Jun 2024 20:02:02 -0700 (PDT) Received: from sxavier-dev.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1faac997da7sm2103285ad.216.2024.06.26.20.01.59 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Jun 2024 20:02:01 -0700 (PDT) From: Selvin Xavier To: leon@kernel.org, jgg@ziepe.ca Cc: linux-rdma@vger.kernel.org, andrew.gospodarek@broadcom.com, Selvin Xavier , Chandramohan Akula , Ajit Khaparde Subject: [PATCH for-next 2/3] RDMA/bnxt_re: Enable DB moderation for genP7 adapters Date: Wed, 26 Jun 2024 19:41:04 -0700 Message-Id: <1719456065-27394-3-git-send-email-selvin.xavier@broadcom.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1719456065-27394-1-git-send-email-selvin.xavier@broadcom.com> References: <1719456065-27394-1-git-send-email-selvin.xavier@broadcom.com> Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Enable DB moderation support for GenP7 adapters also. Query from FW and update the status. Signed-off-by: Chandramohan Akula Signed-off-by: Ajit Khaparde Signed-off-by: Selvin Xavier --- drivers/infiniband/hw/bnxt_re/main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c index 2a727f4..2c5282f 100644 --- a/drivers/infiniband/hw/bnxt_re/main.c +++ b/drivers/infiniband/hw/bnxt_re/main.c @@ -423,6 +423,7 @@ int bnxt_re_hwrm_qcaps(struct bnxt_re_dev *rdev) struct hwrm_func_qcaps_input req = {}; struct bnxt_qplib_chip_ctx *cctx; struct bnxt_fw_msg fw_msg = {}; + u32 flags_ext2; int rc; cctx = rdev->chip_ctx; @@ -436,9 +437,9 @@ int bnxt_re_hwrm_qcaps(struct bnxt_re_dev *rdev) return rc; cctx->modes.db_push = le32_to_cpu(resp.flags) & FUNC_QCAPS_RESP_FLAGS_WCB_PUSH_MODE; - cctx->modes.dbr_pacing = - le32_to_cpu(resp.flags_ext2) & - FUNC_QCAPS_RESP_FLAGS_EXT2_DBR_PACING_EXT_SUPPORTED; + flags_ext2 = le32_to_cpu(resp.flags_ext2); + cctx->modes.dbr_pacing = flags_ext2 & FUNC_QCAPS_RESP_FLAGS_EXT2_DBR_PACING_EXT_SUPPORTED || + flags_ext2 & FUNC_QCAPS_RESP_FLAGS_EXT2_DBR_PACING_V0_SUPPORTED; return 0; }