From: "Arulprabhu Ponnusamy (arulponn)" <arulponn@cisco.com>
To: "Karan Tilak Kumar (kartilak)" <kartilak@cisco.com>,
"Satish Kharat (satishkh)" <satishkh@cisco.com>
Cc: "Sesidhar Baddela (sebaddel)" <sebaddel@cisco.com>,
"jejb@linux.ibm.com" <jejb@linux.ibm.com>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] scsi: fnic: set scsi_set_resid only for underflow
Date: Tue, 24 Nov 2020 01:27:58 +0000 [thread overview]
Message-ID: <72C36CF2-3675-42F0-A87D-7D9A179667EE@cisco.com> (raw)
In-Reply-To: <20201121015134.18872-1-kartilak@cisco.com>
Looks good.
Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com>
On 11/20/20, 5:51 PM, "Karan Tilak Kumar" <kartilak@cisco.com> wrote:
Fix to set scsi_set_resid() only if
FCPIO_ICMND_CMPL_RESID_UNDER is set.
Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com>
Signed-off-by: Satish Kharat <satishkh@cisco.com>
---
drivers/scsi/fnic/fnic.h | 2 +-
drivers/scsi/fnic/fnic_scsi.c | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/fnic/fnic.h b/drivers/scsi/fnic/fnic.h
index 7c5c911b2673..e4d399f41a0a 100644
--- a/drivers/scsi/fnic/fnic.h
+++ b/drivers/scsi/fnic/fnic.h
@@ -39,7 +39,7 @@
#define DRV_NAME "fnic"
#define DRV_DESCRIPTION "Cisco FCoE HBA Driver"
-#define DRV_VERSION "1.6.0.51"
+#define DRV_VERSION "1.6.0.52"
#define PFX DRV_NAME ": "
#define DFX DRV_NAME "%d: "
diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c
index 16e66f5b833a..532c3c7ae372 100644
--- a/drivers/scsi/fnic/fnic_scsi.c
+++ b/drivers/scsi/fnic/fnic_scsi.c
@@ -921,10 +921,11 @@ static void fnic_fcpio_icmnd_cmpl_handler(struct fnic *fnic,
case FCPIO_SUCCESS:
sc->result = (DID_OK << 16) | icmnd_cmpl->scsi_status;
xfer_len = scsi_bufflen(sc);
- scsi_set_resid(sc, icmnd_cmpl->residual);
- if (icmnd_cmpl->flags & FCPIO_ICMND_CMPL_RESID_UNDER)
+ if (icmnd_cmpl->flags & FCPIO_ICMND_CMPL_RESID_UNDER) {
xfer_len -= icmnd_cmpl->residual;
+ scsi_set_resid(sc, icmnd_cmpl->residual);
+ }
if (icmnd_cmpl->scsi_status == SAM_STAT_CHECK_CONDITION)
atomic64_inc(&fnic_stats->misc_stats.check_condition);
--
2.29.2
next prev parent reply other threads:[~2020-11-24 1:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-21 1:51 Karan Tilak Kumar
2020-11-24 1:27 ` Arulprabhu Ponnusamy (arulponn) [this message]
2020-11-24 3:48 ` Martin K. Petersen
2020-12-01 5:04 ` 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=72C36CF2-3675-42F0-A87D-7D9A179667EE@cisco.com \
--to=arulponn@cisco.com \
--cc=jejb@linux.ibm.com \
--cc=kartilak@cisco.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=satishkh@cisco.com \
--cc=sebaddel@cisco.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®