From patchwork Fri Feb 24 14:43:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ranjan Kumar X-Patchwork-Id: 13151315 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1503C678DB for ; Fri, 24 Feb 2023 14:44:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229999AbjBXOo7 (ORCPT ); Fri, 24 Feb 2023 09:44:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229982AbjBXOor (ORCPT ); Fri, 24 Feb 2023 09:44:47 -0500 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B2303BDB6 for ; Fri, 24 Feb 2023 06:44:43 -0800 (PST) Received: by mail-pl1-x635.google.com with SMTP id l15so18110056pls.1 for ; Fri, 24 Feb 2023 06:44:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=xNGgYTKwdBeej4VsrKQsLux520uy7Kil0g2HIDxMeZI=; b=do3ra+qiW0uHKVMPR1owoOYXcOBvNofhddTGmzMQa/gl0um0ygI2530DetL70IBvwB UZYTx9CySzNtW4h5g5ETj0XQ5ibnJdcKIxpWz9IHTaQyPxbP4bW14hXoXBZj/1YyV3Ik W7iDyDSH29QyrjHzGxtn8+/+6AVY1pPKz7pG0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version: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=xNGgYTKwdBeej4VsrKQsLux520uy7Kil0g2HIDxMeZI=; b=XQTigEuB+6y6fKs3kMUrqpdo5WmYNNK3TimlRaxdT1uTofHJXNnwypSv7aXIclZJTS hSoQlGEL2tAaQgOVjP4cSHYPp+TpQSHVM+8eg9lOhb23adqdRXR/lK3GWY8a5CwKxZAs xbalRAcANqtIzeftybDcCvgkLkKZICxJzbDZeDYeA6bsQ9UgC818U1lxT0Em37J/PCPD Y3ngPcw8/E5JHBDPK5q8nVIfl4g3zvWnrMNQ7My0tAyaQxfBb5i9NxAi9XcFhiydziFz DC8CnN0CuWSp9D7Bh17j3PIfKHm/DGODwOZ2FV3g9Wx1BuFRjdPAqpWzl+IodqnIhHPn Tx2w== X-Gm-Message-State: AO0yUKUXTPdSGeccwQbf58cnwNl2PFUJjoWD0c3Bqmk1Md4M9CyvU5fO E52g/maJP2yDD5b+TDUoXhPCOa/cYJJaWCu9w6o4RlzKq913MixL8Vi7dj48ezk/8oem4hCzlXC zFTkQe4LHnF2H55ArE4XErRJ2GvZB3bBpXEiYdy4DBk1xg0qQ++QX6Adws6U2H8MJlErfUxVoDE 0UjgfRqlU= X-Google-Smtp-Source: AK7set8ifzpUCrwCI10BPRRDCTY42d3Cnu5FEevRRKsp31uKvedTNzbOM5m4OemOtcd/7n7ClL1mQA== X-Received: by 2002:a17:902:c403:b0:19a:880b:bfd1 with SMTP id k3-20020a170902c40300b0019a880bbfd1mr18735006plk.40.1677249882522; Fri, 24 Feb 2023 06:44:42 -0800 (PST) Received: from localhost.localdomain ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id b5-20020a170902a9c500b00186748fe6ccsm8911549plr.214.2023.02.24.06.44.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Feb 2023 06:44:42 -0800 (PST) From: Ranjan Kumar To: linux-scsi@vger.kernel.org, martin.petersen@oracle.com Cc: rajsekhar.chundru@broadcom.com, sathya.prakash@broadcom.com, sumit.saxena@broadcom.com, Ranjan Kumar , Sreekanth Reddy Subject: [PATCH 12/15] mpi3mr: NVMe commands size greater than 8K fails Date: Fri, 24 Feb 2023 06:43:17 -0800 Message-Id: <20230224144320.10601-13-ranjan.kumar@broadcom.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230224144320.10601-1-ranjan.kumar@broadcom.com> References: <20230224144320.10601-1-ranjan.kumar@broadcom.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org A wrong variable is checked while populating PRP entries in the PRP page and that results in failure .Hence no PRP entries in the PRP page were successfully created and any NVMe Encapsulated commands with PRP of size greater than 8K failed Signed-off-by: Ranjan Kumar Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpi3mr/mpi3mr_app.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/mpi3mr/mpi3mr_app.c b/drivers/scsi/mpi3mr/mpi3mr_app.c index 935e26afc291..b2542708a36b 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_app.c +++ b/drivers/scsi/mpi3mr/mpi3mr_app.c @@ -894,7 +894,7 @@ static int mpi3mr_build_nvme_prp(struct mpi3mr_ioc *mrioc, * each time through the loop. */ *prp_entry = cpu_to_le64(dma_addr); - if (*prp1_entry & sgemod_mask) { + if (*prp_entry & sgemod_mask) { dprint_bsg_err(mrioc, "%s: PRP address collides with SGE modifier\n", __func__); @@ -903,7 +903,7 @@ static int mpi3mr_build_nvme_prp(struct mpi3mr_ioc *mrioc, *prp_entry &= ~sgemod_mask; *prp_entry |= sgemod_val; prp_entry++; - prp_entry_dma++; + prp_entry_dma += prp_size; } /*