From patchwork Tue Jun 27 00:46:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Satish Kharat X-Patchwork-Id: 9810629 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4F56E603D7 for ; Tue, 27 Jun 2017 00:56:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 37C1827861 for ; Tue, 27 Jun 2017 00:56:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2810D283A5; Tue, 27 Jun 2017 00:56:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, USER_IN_DEF_DKIM_WL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B919D27861 for ; Tue, 27 Jun 2017 00:56:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751813AbdF0A4t (ORCPT ); Mon, 26 Jun 2017 20:56:49 -0400 Received: from alln-iport-6.cisco.com ([173.37.142.93]:37538 "EHLO alln-iport-6.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751742AbdF0A4i (ORCPT ); Mon, 26 Jun 2017 20:56:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=902; q=dns/txt; s=iport; t=1498524997; x=1499734597; h=from:to:cc:subject:date:message-id; bh=e/YbXc0auZp6WtvP4rTp2NKTrtAnK0o0hdFYIZUiG+8=; b=Dadji82LVl36foAll9UrVbZbGWaX86+JRbsZ/GaRulIn+Nx2ok4ysAaA 8Ua1upMxN9Ike5xHXxLhRd88HdoqA316OEkBaQlYoFwuvaX5LM5CXlVn4 Jf6rk3YBWc/tvzycsCoAl1DCApQfkZE6N2LSwNnh7Rt3E+JDu12gQjZxv Y=; X-IronPort-AV: E=Sophos;i="5.39,398,1493683200"; d="scan'208";a="446229575" Received: from rcdn-core-12.cisco.com ([173.37.93.148]) by alln-iport-6.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Jun 2017 00:47:03 +0000 Received: from satishkh.cisco.com ([10.157.132.70]) by rcdn-core-12.cisco.com (8.14.5/8.14.5) with ESMTP id v5R0l2XY017868; Tue, 27 Jun 2017 00:47:02 GMT From: Satish Kharat To: linux-scsi@vger.kernel.org Cc: satishkh@cisco.com, Sesidhar Baddela Subject: [PATCH 1/1] fnic: Zero io_cmpl_skip on fw reset completion Date: Mon, 26 Jun 2017 17:46:23 -0700 Message-Id: <1498524383-32398-1-git-send-email-satishkh@cisco.com> X-Mailer: git-send-email 2.5.5 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Sesidhar Baddela --- drivers/scsi/fnic/fnic_scsi.c | 1 + 1 file changed, 1 insertion(+) 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);