From patchwork Wed Jul 18 05:22:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sreekanth Reddy X-Patchwork-Id: 10531311 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 E53D8600F4 for ; Wed, 18 Jul 2018 05:23:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D57AE291D5 for ; Wed, 18 Jul 2018 05:23:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C9553291DC; Wed, 18 Jul 2018 05:23:12 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 6E301291D5 for ; Wed, 18 Jul 2018 05:23:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726180AbeGRF7O (ORCPT ); Wed, 18 Jul 2018 01:59:14 -0400 Received: from mail-qt0-f193.google.com ([209.85.216.193]:39289 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725974AbeGRF7O (ORCPT ); Wed, 18 Jul 2018 01:59:14 -0400 Received: by mail-qt0-f193.google.com with SMTP id q12-v6so3005829qtp.6 for ; Tue, 17 Jul 2018 22:23:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id; bh=r6SRYzjwRU2ATMfhfAi15nvb1hzm4DJp8i0y6tbtx8g=; b=Ew+m4cVLdI6eCVmOlwcDRqmPDa1/w+5aNuuh7ji7LhAtw5XXZZahakkBZcQknIgwHb lkzIs0bzRb4mgCT1/5yMEnGAtbeDxu/O4h6eXYCKYE9vBF6QQ7N6izNq8Smv+RRdleQY H/bokkWlsbmtItYEje/+hqQkXjp6zIg1dr9kw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=r6SRYzjwRU2ATMfhfAi15nvb1hzm4DJp8i0y6tbtx8g=; b=evCXd6Pb2BDgaOtTkI4X1MgOJjGLbBhOZ+C9Nd3TghSc5oKX081MHGyoc/94yjg5Z6 meHZCfKwrvF8b+1VX2ywixA5afE2iUqSSgrC/PFCsAEL2PI9ZErQKEKy8a5sgib14/dw 69QfnNlVEFlvXhUfGpPP4DZoqarxUvKAqFYjbOhlM18aohihJ2Fqj2TJnOedYauDgHUd eEGb7y2B5AgBpceYuRraj6U22d9RHH3Xy4JdCIX5zfUcK142nRFoSN4JawED5eCmc0Ya MmQZ8aY0ddKH4Ls+JvdppWiwx1ZzrHccXEwKnwqHLDdp4Ldr0mtq1Nww87reIC+plARU AQuQ== X-Gm-Message-State: AOUpUlEfYIlVmVF1geTZJweAMAArLmwo0SGpF1qc0gyc5Rs8rITjba3e w6QtOhy0NADg1+P0iBsnnhBerwqt X-Google-Smtp-Source: AAOMgpcKQ9okP4l1LXJvgbV+txvuZ/XriFiiKQSrK0POrz3f4VS269HIc4QM4pg1RWUWVmmQOeQe9Q== X-Received: by 2002:a0c:c993:: with SMTP id b19-v6mr4953570qvk.95.1531891390560; Tue, 17 Jul 2018 22:23:10 -0700 (PDT) Received: from localhost.localdomain.localdomain ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id e33-v6sm2176375qte.54.2018.07.17.22.23.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Jul 2018 22:23:09 -0700 (PDT) From: Sreekanth Reddy To: martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, sathya.prakash@broadcom.com, thenzl@redhat.com, Sreekanth Reddy Subject: [PATCH] mpt3sas: correct reset of smid while clearing scsi tracker Date: Wed, 18 Jul 2018 01:22:55 -0400 Message-Id: <1531891375-31216-1-git-send-email-sreekanth.reddy@broadcom.com> X-Mailer: git-send-email 1.8.3.1 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 In mpt3sas_base_clear_st() function smid value is reseted in wrong line, i.e. driver should reset smid value to zero after decrementing chain_offset counter in chain_lookup table but in current code, driver is resetting smid value before decrementing the chain_offset counter. which we are correcting with this patch. Signed-off-by: Sreekanth Reddy Reviewed-by: Tomas Henzl Reviewed-by: Bart Van Assche --- drivers/scsi/mpt3sas/mpt3sas_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index 902610d..94b939b 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -3283,8 +3283,8 @@ void mpt3sas_base_clear_st(struct MPT3SAS_ADAPTER *ioc, return; st->cb_idx = 0xFF; st->direct_io = 0; - st->smid = 0; atomic_set(&ioc->chain_lookup[st->smid - 1].chain_offset, 0); + st->smid = 0; } /**