diff mbox

[1/1] fnic: Zero io_cmpl_skip on fw reset completion

Message ID 1498524383-32398-1-git-send-email-satishkh@cisco.com (mailing list archive)
State Accepted
Headers show

Commit Message

Satish Kharat June 27, 2017, 12:46 a.m. UTC
io_cmpl_skip keep track of number of completions to skip when
stats are reset. If a fw_reset happens immediately after stats
reset it could put it out of sync so need to reset io_cmpl_skip
when fw reset is completed.

Signed-off-by: Satish Kharat <satishkh@cisco.com>
Signed-off-by: Sesidhar Baddela <sebaddel@cisco.com>
---
 drivers/scsi/fnic/fnic_scsi.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Martin K. Petersen June 28, 2017, 1:42 a.m. UTC | #1
Satish,

> io_cmpl_skip keep track of number of completions to skip when stats
> are reset. If a fw_reset happens immediately after stats reset it
> could put it out of sync so need to reset io_cmpl_skip when fw reset
> is completed.

Applied patches 1-4 to 4.13/scsi-queue. Thank you!
diff mbox

Patch

diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c
index d048f3b..beea14c 100644
--- a/drivers/scsi/fnic/fnic_scsi.c
+++ b/drivers/scsi/fnic/fnic_scsi.c
@@ -633,6 +633,7 @@  static int fnic_fcpio_fw_reset_cmpl_handler(struct fnic *fnic,
 
 	atomic64_set(&fnic->fnic_stats.fw_stats.active_fw_reqs, 0);
 	atomic64_set(&fnic->fnic_stats.io_stats.active_ios, 0);
+	atomic64_set(&fnic->io_cmpl_skip, 0);
 
 	spin_lock_irqsave(&fnic->fnic_lock, flags);