From patchwork Tue Feb 28 14:08:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ranjan Kumar X-Patchwork-Id: 657680 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 5B6F5C64ED6 for ; Tue, 28 Feb 2023 14:09:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229816AbjB1OJQ (ORCPT ); Tue, 28 Feb 2023 09:09:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229826AbjB1OJI (ORCPT ); Tue, 28 Feb 2023 09:09:08 -0500 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BAE1CEB48 for ; Tue, 28 Feb 2023 06:09:07 -0800 (PST) Received: by mail-pj1-x102c.google.com with SMTP id l1so9959674pjt.2 for ; Tue, 28 Feb 2023 06:09:07 -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=ayYvdeRbVGYYaSZ524Y0Mf1rh4wEW+6hdtCnqkadsKA=; b=Ca6SYFrp1DOpEJrPCCimSQKHz4g2i+coi3JOcVpAFqS1YQXkcGUE9HY63y+NppUX6m fzj3I0obaue9kzP1UZ7Yh9462oGup5UMOOMVr88o2lUh9nlu2JEVVokG52gr8LfBX3qh DODT7144vRQ6UaQjB2Xs9Q7pMu6XHGX5ZIzkY= 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=ayYvdeRbVGYYaSZ524Y0Mf1rh4wEW+6hdtCnqkadsKA=; b=ukKFNX2+aW/wHFbVXQNS+N+BBJVle0d5VxEvH27WzK+t/ms0nZ1yxthZHFREYu/bxf zEU8ouOgx1V3X7GPbq2Lib/N41YszYyiiBUc+j7/HV/tYTf7vPSK3SxwWlAAUTJoCPTa b/Z6+t7mROGnLPJTqCD81n+4+R25U12nJgtMnMXac8ttfOaIgkpVocPFu771JCRqNugi mx+ccj7jIzymeu2t0iR2JPC8bUU1feY5SSY+f37zeggMpbr6KZIK96ULTibDcT4GRGD0 qBWMPoADvz28fH4TnDZuIQPTESNO7l61YzAs6cl8hJAhXaFEHPTCo+0s+nZI5e25rAeN aHOw== X-Gm-Message-State: AO0yUKUJJXWtXMmpUOQ0KHNjb0zxmRjv/ksnI/cQFgA9jZJYO+V4MFx/ 0ggJ++3FKoG5xGAZ0f4nkw6Hv+O1Fh9OyQbRBF8yEYdXrGkdZh63Dqn4UC80l9B7Ddy1sqytg3e zg+M5rKmKeY34cDk2tFstdn0tWJ+rT722cHPDndqHSjVM/PE24XGIDuliN5UOFN7Z6fai/qKM2r VVR7rVTPE= X-Google-Smtp-Source: AK7set9GBUe7eBZddKr546vRvzobZ9EYITSv8cdSfQp+0F6GKFQfTYeCVF9fUFnhODXQQCJFYk7T0w== X-Received: by 2002:a17:902:daca:b0:19a:945d:e31 with SMTP id q10-20020a170902daca00b0019a945d0e31mr3830332plx.13.1677593346905; Tue, 28 Feb 2023 06:09:06 -0800 (PST) Received: from localhost.localdomain ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id ji1-20020a170903324100b00198e03c3ad4sm6625465plb.278.2023.02.28.06.09.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Feb 2023 06:09:06 -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 5/6] mpi3mr: NVMe commands size greater than 8K fails Date: Tue, 28 Feb 2023 06:08:34 -0800 Message-Id: <20230228140835.4075-6-ranjan.kumar@broadcom.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230228140835.4075-1-ranjan.kumar@broadcom.com> References: <20230228140835.4075-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 9baac224b213..49318ba893c8 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; } /*