From patchwork Fri May 4 14:50:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 10380823 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 2773D603B4 for ; Fri, 4 May 2018 14:51:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1913F294C7 for ; Fri, 4 May 2018 14:51:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0E0A6294DA; Fri, 4 May 2018 14:51: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=-7.9 required=2.0 tests=BAYES_00, 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 7D592294C7 for ; Fri, 4 May 2018 14:51:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751371AbeEDOvK (ORCPT ); Fri, 4 May 2018 10:51:10 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:41050 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751229AbeEDOvJ (ORCPT ); Fri, 4 May 2018 10:51:09 -0400 Received: from localhost ([127.0.0.1] helo=bazinga.breakpoint.cc) by Galois.linutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1fEc3A-00063e-4w; Fri, 04 May 2018 16:51:08 +0200 From: Sebastian Andrzej Siewior To: linux-scsi@vger.kernel.org Cc: tglx@linutronix.de, Hannes Reinecke , "James E.J. Bottomley" , "Martin K. Petersen" , Sebastian Andrzej Siewior Subject: [PATCH 2/2] qla2xxx: remove irq save in qla2x00_poll() Date: Fri, 4 May 2018 16:50:11 +0200 Message-Id: <20180504145011.5752-2-bigeasy@linutronix.de> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180504145011.5752-1-bigeasy@linutronix.de> References: <20180504145011.5752-1-bigeasy@linutronix.de> MIME-Version: 1.0 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 commit d2ba5675d899 ("[SCSI] qla2xxx: Disable local-interrupts while polling for RISC status.") added a local_irq_disable() before invoking the ->intr_handler callback. The function, which was used in this callback, did not disable interrupts while acquiring the spin_lock so a deadlock was possible and this change was one possible solution. The function in question was qla2300_intr_handler() and is using spin_lock_irqsave() since commit 43fac4d97a1a ("[SCSI] qla2xxx: Resolve a performance issue in interrupt"). I checked all other ->intr_handler callbacks and all of them use the irqsave variant so it is safe to remove the local_irq_save() block now. Signed-off-by: Sebastian Andrzej Siewior Acked-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_inline.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_inline.h b/drivers/scsi/qla2xxx/qla_inline.h index 37ae0f6d8ae5..bcbdf28bd7b9 100644 --- a/drivers/scsi/qla2xxx/qla_inline.h +++ b/drivers/scsi/qla2xxx/qla_inline.h @@ -58,14 +58,12 @@ qla2x00_debounce_register(volatile uint16_t __iomem *addr) static inline void qla2x00_poll(struct rsp_que *rsp) { - unsigned long flags; struct qla_hw_data *ha = rsp->hw; - local_irq_save(flags); + if (IS_P3P_TYPE(ha)) qla82xx_poll(0, rsp); else ha->isp_ops->intr_handler(0, rsp); - local_irq_restore(flags); } static inline uint8_t *