All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
To: linux-scsi@vger.kernel.org
Cc: martin.petersen@oracle.com, mpi3mr-linuxdrv.pdl@broadcom.com,
	Sreekanth Reddy <sreekanth.reddy@broadcom.com>
Subject: [PATCH 6/9] mpi3mr: Fix report actual data transfer sz
Date: Thu, 10 Feb 2022 15:28:14 +0530	[thread overview]
Message-ID: <20220210095817.22828-7-sreekanth.reddy@broadcom.com> (raw)
In-Reply-To: <20220210095817.22828-1-sreekanth.reddy@broadcom.com>

[-- Attachment #1: Type: text/plain, Size: 923 bytes --]

The driver is missing to set the residual size
while completing an IO. Hence, proper data transfer size is
reported to the kernel on IO completion based on the
transfer length reported by the firmware.

Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
---
 drivers/scsi/mpi3mr/mpi3mr_os.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c
index 1c2e7d3..dd15c1f 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_os.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_os.c
@@ -2600,6 +2600,8 @@ void mpi3mr_process_op_reply_desc(struct mpi3mr_ioc *mrioc,
 		scmd->result = DID_OK << 16;
 		goto out_success;
 	}
+
+	scsi_set_resid(scmd, scsi_bufflen(scmd) - xfer_count);
 	if (ioc_status == MPI3_IOCSTATUS_SCSI_DATA_UNDERRUN &&
 	    xfer_count == 0 && (scsi_status == MPI3_SCSI_STATUS_BUSY ||
 	    scsi_status == MPI3_SCSI_STATUS_RESERVATION_CONFLICT ||
-- 
2.27.0


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4218 bytes --]

  parent reply	other threads:[~2022-02-10  9:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-10  9:58 [PATCH 0/9] mpi3mr: Bug fixes Sreekanth Reddy
2022-02-10  9:58 ` [PATCH 1/9] mpi3mr: Fix deadlock while canceling the fw event Sreekanth Reddy
2022-02-10  9:58 ` [PATCH 2/9] mpi3mr: Fix print proper pending IO count Sreekanth Reddy
2022-02-10  9:58 ` [PATCH 3/9] mpi3mr: update MPI3 headers Sreekanth Reddy
2022-02-10  9:58 ` [PATCH 4/9] mpi3mr: Fix hibernation issue Sreekanth Reddy
2022-02-10  9:58 ` [PATCH 5/9] mpi3mr: Fix cmnd getting marked as inuse forever Sreekanth Reddy
2022-02-10  9:58 ` Sreekanth Reddy [this message]
2022-02-10  9:58 ` [PATCH 7/9] mpi3mr: Update the copyright year Sreekanth Reddy
2022-02-10  9:58 ` [PATCH 8/9] mpi3mr: Fix memory leaks Sreekanth Reddy
2022-02-10  9:58 ` [PATCH 9/9] mpi3mr: Bump driver version to 8.0.0.68.0 Sreekanth Reddy
2022-02-11 22:45 ` [PATCH 0/9] mpi3mr: Bug fixes Martin K. Petersen
2022-02-15  3:19 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220210095817.22828-7-sreekanth.reddy@broadcom.com \
    --to=sreekanth.reddy@broadcom.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=mpi3mr-linuxdrv.pdl@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.