From patchwork Thu Oct 19 09:48:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shivasharan Srikanteshwara X-Patchwork-Id: 10016271 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 9BBCF60215 for ; Thu, 19 Oct 2017 09:50:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7BD2928C6D for ; Thu, 19 Oct 2017 09:50:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7080728CB4; Thu, 19 Oct 2017 09:50:11 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 2881728C6D for ; Thu, 19 Oct 2017 09:50:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752600AbdJSJuK (ORCPT ); Thu, 19 Oct 2017 05:50:10 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:56134 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752445AbdJSJuJ (ORCPT ); Thu, 19 Oct 2017 05:50:09 -0400 Received: by mail-pf0-f195.google.com with SMTP id 17so6188785pfn.12 for ; Thu, 19 Oct 2017 02:50:09 -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:in-reply-to:references; bh=dGxkttgotF1baGIWabo4l8PAQvgEryuJd0fI3hj1rjw=; b=ODCcr4ybAbj1r9bQHSUYV1k9Rl469sUVHwhinO6kp44eM2LX73wnZ8QTNgEgoehOML 7on6hzOfbTTQWuFZJtafCQQRHi38WyRqr22ivucgBIrsM2zEWWxUMryIsM0xkA1ufyIO XGPkLYumyXVmrdZDsmpdcdhs/gHvSo+iDMdac= 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:in-reply-to :references; bh=dGxkttgotF1baGIWabo4l8PAQvgEryuJd0fI3hj1rjw=; b=Xe+AMkLNPe95hdZEqNn6InBlWBxCCHu22SCagLhmH28A8Mz/XbdRICdLLvf0MdkuQI Fej79rtCDmaa4q1JK9OekAOaZpzGuT4xFJR7K+BvcaC2inbOgMTXeLlhba1C1llHohPw DON1lBEqUYreKjYBKH64KfvRMbq12sRj66W9xCCgzk0846wWlMdqsNb3mDMv6Y63bys8 rVruON1WTB5n1vYUnVjjTsjnQcBONFBxvIx49mIChzDojnIxBSro4TEjibeevbsDQGjc WLYp1OfGEdd7AXrSK311wIyXDMer/H1na3/SBG3wr0FbRP7Rtat10GuOpg6Rc86b7V1M Ypug== X-Gm-Message-State: AMCzsaVkiUyUVsAGOBSvc/c3rFofH6DIYRy9fxaaZ0zw6AJ5ybOd9d9O j2wv0MD42bs7OJvyHxRu0ASHOPeB X-Google-Smtp-Source: ABhQp+R+PgDsyxgTU5JPyRp43w0Cdw2+VrvtcJ9gqY9bsBjgFi+gAZCnlkNGHjkipbA5r7FSXlesHA== X-Received: by 10.99.95.14 with SMTP id t14mr903055pgb.70.1508406607934; Thu, 19 Oct 2017 02:50:07 -0700 (PDT) Received: from dhcp-135-24-192-142.localdomain ([192.19.239.250]) by smtp.gmail.com with ESMTPSA id e84sm27202885pfd.1.2017.10.19.02.50.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Oct 2017 02:50:06 -0700 (PDT) From: Shivasharan S To: linux-scsi@vger.kernel.org Cc: kashyap.desai@broadcom.com, sumit.saxena@broadcom.com, Shivasharan S Subject: [PATCH 04/19] megaraid_sas: Remove redundant checks for ctrl_context Date: Thu, 19 Oct 2017 02:48:51 -0700 Message-Id: <1508406546-25944-5-git-send-email-shivasharan.srikanteshwara@broadcom.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1508406546-25944-1-git-send-email-shivasharan.srikanteshwara@broadcom.com> References: <1508406546-25944-1-git-send-email-shivasharan.srikanteshwara@broadcom.com> 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 Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c index cd997ccf5ebf..340079d0bff0 100644 --- a/drivers/scsi/megaraid/megaraid_sas_fusion.c +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c @@ -991,7 +991,7 @@ megasas_sync_pd_seq_num(struct megasas_instance *instance, bool pend) { dcmd->flags = cpu_to_le16(MFI_FRAME_DIR_READ); /* Below code is only for non pended DCMD */ - if (instance->ctrl_context && !instance->mask_interrupts) + if (!instance->mask_interrupts) ret = megasas_issue_blocked_cmd(instance, cmd, MFI_IO_TIMEOUT_SECS); else @@ -1004,7 +1004,7 @@ megasas_sync_pd_seq_num(struct megasas_instance *instance, bool pend) { ret = -EINVAL; } - if (ret == DCMD_TIMEOUT && instance->ctrl_context) + if (ret == DCMD_TIMEOUT) megaraid_sas_kill_hba(instance); if (ret == DCMD_SUCCESS) @@ -1080,13 +1080,13 @@ megasas_get_ld_map_info(struct megasas_instance *instance) dcmd->sgl.sge32[0].phys_addr = cpu_to_le32(ci_h); dcmd->sgl.sge32[0].length = cpu_to_le32(size_map_info); - if (instance->ctrl_context && !instance->mask_interrupts) + if (!instance->mask_interrupts) ret = megasas_issue_blocked_cmd(instance, cmd, MFI_IO_TIMEOUT_SECS); else ret = megasas_issue_polled(instance, cmd); - if (ret == DCMD_TIMEOUT && instance->ctrl_context) + if (ret == DCMD_TIMEOUT) megaraid_sas_kill_hba(instance); megasas_return_cmd(instance, cmd);