From patchwork Sun Aug 14 06:43:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tuo cao <91tuocao@gmail.com> X-Patchwork-Id: 597257 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C07FC25B08 for ; Sun, 14 Aug 2022 06:44:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240240AbiHNGo1 (ORCPT ); Sun, 14 Aug 2022 02:44:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240180AbiHNGoZ (ORCPT ); Sun, 14 Aug 2022 02:44:25 -0400 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D1D05FAD3; Sat, 13 Aug 2022 23:44:24 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id x10so4012741plb.3; Sat, 13 Aug 2022 23:44:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc; bh=x/Q3fU1bn9QVuiMbQk5jZ1nohKUqZAypaJSN80aFDfo=; b=dWtAh9sTXz7dnaowHMm+DKSlsj8xHf8nzxEpMOcNScraGbeBvUtFtDTALT4v/qjJYc 9cc8AcefpDpf5jJYSTcLksRNWc2Bb8Wi7i0rObufF661pv2o0IY0X/ks07LG/rBZWUdV VW0HGWZfb/uDeL6hAAnxnNIoExNXZpup9k35D6Xl5vbdsS+TBLr6pasPEraty2xtln3g JF2Z5IZcQ6zGgPDPsPGkl4m0rXSpLWZAhh2Wa6iLpuKFXVK9y0frPRoZ5LJnaLX2LRks ElrdV6wZo13dUcN9yS0O8VTMqq0rPApNIyXjYqH9HxpFpqRrcpvQo/SgCSCsxSk9v+Cp fLlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc; bh=x/Q3fU1bn9QVuiMbQk5jZ1nohKUqZAypaJSN80aFDfo=; b=qRwkso1hvijQyDTRERXQQWiIRYAHyX4wm/QfGjRnz9ARG9t+vIlyJl7wlmFlMrz8NE DUEG/IxxSYIL+vBQmHpRVoDTTE7efFROG8K5mJ9CAgufajGUWjuh7jsWCKbjwPmxk2NU 0zxooUI4rEUTLSf5UrD93xYI+Bna2uIKK9cLX14Y6zaKgU6DrAUjeTqXH+rUK+1gu1UW MHVWOt6R+BcMSGCHz3A5kS96J39wOYkhr0h4R8KywJ94nX97nWDTeB6w0A2+TeKTKAFu jYuRKuypD7voR5zn4OBAehalh3jkr6yA2gCQRyo4Fr4uHCRjkWUcSCzvsfUEhbB6OKOY 7b0A== X-Gm-Message-State: ACgBeo2jwuoE9nVEr8NdqiFH8bjkl+STTQOspOPIvAa3eUwgtG9oLimJ MoebAOsXRoH8Vq9uBvbw1Eo= X-Google-Smtp-Source: AA6agR78JNbrhxuHuDr9egylanK64uXcsgBpSqTwjbQjVWA6ISa+41l0KdO+bsjFayZDws49rOaQSQ== X-Received: by 2002:a17:90b:b13:b0:1f3:7ab:35b2 with SMTP id bf19-20020a17090b0b1300b001f307ab35b2mr22071610pjb.118.1660459463983; Sat, 13 Aug 2022 23:44:23 -0700 (PDT) Received: from localhost.localdomain ([182.160.5.243]) by smtp.gmail.com with ESMTPSA id o27-20020aa7979b000000b0052d481032a7sm4593778pfp.26.2022.08.13.23.44.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Aug 2022 23:44:23 -0700 (PDT) From: Tuo Cao <91tuocao@gmail.com> To: James.Bottomley@HansenPartnership.com, martin.petersen@oracle.com, khalid@gonehiking.org, willy@infradead.org, hare@suse.com Cc: anil.gurumurthy@qlogic.com, sudarsana.kalluru@qlogic.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, 91tuocao@gmail.com Subject: [PATCH 1/9] scsi: 53c700: move spin_lock_irqsave to spin_lock in interrupt handler Date: Sun, 14 Aug 2022 14:43:29 +0800 Message-Id: <20220814064337.32621-2-91tuocao@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220814064337.32621-1-91tuocao@gmail.com> References: <20220814064337.32621-1-91tuocao@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org it is unnecessary to call spin_lock_irqsave in a interrupt handler. Signed-off-by: Tuo Cao <91tuocao@gmail.com> --- drivers/scsi/53c700.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c index e1e4f9d10887..55dc0fb7943e 100644 --- a/drivers/scsi/53c700.c +++ b/drivers/scsi/53c700.c @@ -1490,7 +1490,6 @@ NCR_700_intr(int irq, void *dev_id) __u8 istat; __u32 resume_offset = 0; __u8 pun = 0xff, lun = 0xff; - unsigned long flags; int handled = 0; /* Use the host lock to serialise access to the 53c700 @@ -1498,7 +1497,7 @@ NCR_700_intr(int irq, void *dev_id) * lock to enter the done routines. When that happens, we * need to ensure that for this driver, the host lock and the * queue lock point to the same thing. */ - spin_lock_irqsave(host->host_lock, flags); + spin_lock(host->host_lock); if((istat = NCR_700_readb(host, ISTAT_REG)) & (SCSI_INT_PENDING | DMA_INT_PENDING)) { __u32 dsps; @@ -1746,7 +1745,7 @@ NCR_700_intr(int irq, void *dev_id) } } out_unlock: - spin_unlock_irqrestore(host->host_lock, flags); + spin_unlock(host->host_lock); return IRQ_RETVAL(handled); } From patchwork Sun Aug 14 06:43:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tuo cao <91tuocao@gmail.com> X-Patchwork-Id: 597481 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A2C7C25B0F for ; Sun, 14 Aug 2022 06:44:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240256AbiHNGob (ORCPT ); Sun, 14 Aug 2022 02:44:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240244AbiHNGo1 (ORCPT ); Sun, 14 Aug 2022 02:44:27 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B290D5FAD3; Sat, 13 Aug 2022 23:44:26 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id ch17-20020a17090af41100b001fa74771f61so266645pjb.0; Sat, 13 Aug 2022 23:44:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc; bh=8w69UxMgS/IUHtw9ds2dBjBRrqH0ahgGAwwqZA/txFQ=; b=aKKQz5sFQCVaTceIOoVbWkOV3QFKZDWPRq1urXbfMFSBC7wIGRp8tsO2Alk6zbu3o9 PjFri5yx0tzYG72rSP+VKd7/HoED9DYtZn/fi2v6C6XjyCDYthz7fxfqUbSABFurUxtO SqCnN+m6DqDJRV1kfAA08mZVpl0zK4ASReMxxzU5PXDkhu9HRM03muCuq88aQPJY6Blj KbB5o9GCYHBoiwLqSvamKcbujJ55J2onSG9uNaAx5Oo2WSmZPbDFPzAWRar5ssw5/7HH pERKfc3ybed76W3+KWN+KT/F6lU6vN5jpYiHYe495ZUfmDaIRzlji/94bxd4O5g1x4yQ We9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc; bh=8w69UxMgS/IUHtw9ds2dBjBRrqH0ahgGAwwqZA/txFQ=; b=2y4lm0Cl+16owL6vjB+my8O/4JiK2pi/hTJfTEpmZPz8tBZOzN48r8kx22AvSlBkPD njMy9h0/mfKcJFFn+FpwdrGM/9H7qxC1WKhBxT+4CumnF92oY9zoSojgfAH2CVsFqo4f 01kiRjam8Vhxry1VFpB9xG8KWYRL91erh/FMB1QrTPbE2Uz2UBEcipig2LIHYpavYmDc zCskNlgmB643RKq8ITgc9u1zinJ5PAHSUnWonH+z/sCWzS/WymfbnQ7PXF5homkozHsR RBFLFjb+Cy7+C497dW8YincKGJXdDvjMuaAJbwYVjWpmtAdvwIVuEl6X3tfd7Qe49eqI XKtA== X-Gm-Message-State: ACgBeo2F+WeH+fTIr5BfkvHw1Ln9YfUSNqK8TCifSaA9MrUmy/c0TcW2 XjwxCHkfQQxb/ZDy0gPmSm4= X-Google-Smtp-Source: AA6agR6Jn3ZfRkr3Esc1AnXnpCacJ/RYaHz3m4BC1Ktg7WZ0a4caJ0bbcvxNnWE1fYzjRAY7WRrk2g== X-Received: by 2002:a17:90b:152:b0:1f3:2b02:90fe with SMTP id em18-20020a17090b015200b001f32b0290femr12300966pjb.198.1660459466184; Sat, 13 Aug 2022 23:44:26 -0700 (PDT) Received: from localhost.localdomain ([182.160.5.243]) by smtp.gmail.com with ESMTPSA id o27-20020aa7979b000000b0052d481032a7sm4593778pfp.26.2022.08.13.23.44.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Aug 2022 23:44:25 -0700 (PDT) From: Tuo Cao <91tuocao@gmail.com> To: James.Bottomley@HansenPartnership.com, martin.petersen@oracle.com, khalid@gonehiking.org, willy@infradead.org, hare@suse.com Cc: anil.gurumurthy@qlogic.com, sudarsana.kalluru@qlogic.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, 91tuocao@gmail.com Subject: [PATCH 2/9] scsi: a100u2w: move spin_lock_irqsave to spin_lock in interrupt handler Date: Sun, 14 Aug 2022 14:43:30 +0800 Message-Id: <20220814064337.32621-3-91tuocao@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220814064337.32621-1-91tuocao@gmail.com> References: <20220814064337.32621-1-91tuocao@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org it is unnecessary to call spin_lock_irqsave in a interrupt handler. Signed-off-by: Tuo Cao <91tuocao@gmail.com> --- drivers/scsi/a100u2w.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/a100u2w.c b/drivers/scsi/a100u2w.c index d02eb5b213d0..391c094758c0 100644 --- a/drivers/scsi/a100u2w.c +++ b/drivers/scsi/a100u2w.c @@ -1055,12 +1055,11 @@ static irqreturn_t inia100_intr(int irqno, void *devid) { struct Scsi_Host *shost = (struct Scsi_Host *)devid; struct orc_host *host = (struct orc_host *)shost->hostdata; - unsigned long flags; irqreturn_t res; - spin_lock_irqsave(shost->host_lock, flags); + spin_lock(shost->host_lock); res = orc_interrupt(host); - spin_unlock_irqrestore(shost->host_lock, flags); + spin_unlock(shost->host_lock); return res; } From patchwork Sun Aug 14 06:43:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tuo cao <91tuocao@gmail.com> X-Patchwork-Id: 597256 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA40BC25B06 for ; Sun, 14 Aug 2022 06:44:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240276AbiHNGok (ORCPT ); Sun, 14 Aug 2022 02:44:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240250AbiHNGob (ORCPT ); Sun, 14 Aug 2022 02:44:31 -0400 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD82460518; Sat, 13 Aug 2022 23:44:28 -0700 (PDT) Received: by mail-pf1-x42c.google.com with SMTP id f192so4349206pfa.9; Sat, 13 Aug 2022 23:44:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc; bh=n7qz4yto1ktZFNeUhXN4QwZ2RPkWwBLjwxLu+TNsHm8=; b=c/Xc5xP4iiK4XaSBAFj8Gf8yPlb6joaklimQycaDAEjpCX+IqL4eLqbRPY7+V+nU/Q dRbfnuGXhZuVA0Akp9EuLG90+FjG/W+duHpCm/nVjoXrBoFhGgBrttdDEZFmOYHfNlJ9 60fxAXHDcRnPpikbMtPYaXnJBMRg8oNKGECUh/5j1ZTRTudTlrCIhfgsbq9FgxcQmt/l pwgID2J+QyQ8oWVBXeqTNKMGs1kmur3ce65d2rWw34118iaoL+e5joqU8PniucG9Qv6/ ZvPzjBYhLYuGOEBg0GxWiiQCSNISgY+o3xXtRYTnPJdTsLMsw84NeMQeRH4SLhGB6+ty VjTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc; bh=n7qz4yto1ktZFNeUhXN4QwZ2RPkWwBLjwxLu+TNsHm8=; b=dVU14wcOh49puuv9BuVS57rFA/g6YQsiGQ2mFPSfYekvzUGbXyvJCweHRn/CUZm+9c qbCHi644sCNJT/hwCtuFK3AanN+nX8PcKbu4qGaaa04WM/BvxiF5nLtNgJpg90Ln4HQH JKZO1UguojC5CJXWut0T/7LA7Dn48BNr0yrq0YFjoOazmqvMm+DmNMLi2C7IewgWTbuP a8QRk4BpSdeX/PYNZQlz6GFjl86Kmcz15AqkNsazd801J18qMZwEJQqc2DcdBsdMdFUv q3ltWGkybC3SGXrORwPoCmefKo+H/1+8j/72UsXaRN0PrfKGfFJ0dlvrcgBrmJ1xgHCL PIjw== X-Gm-Message-State: ACgBeo2KsRsSLFPmKiZQ9GNHd/Dn59FlqUhUqV+lrDihi8sEO+ZfuTSN CRDmWgwfh9Z/U8NvrGPzX2w= X-Google-Smtp-Source: AA6agR4YO1de6C8oV19LEjufWPZJpJDTIQ6mn6LIU7ZfFUAlbvbutaC8aTb3smYe8GAjYZyHb1cfrQ== X-Received: by 2002:a63:e410:0:b0:422:45b3:837 with SMTP id a16-20020a63e410000000b0042245b30837mr7718283pgi.175.1660459468362; Sat, 13 Aug 2022 23:44:28 -0700 (PDT) Received: from localhost.localdomain ([182.160.5.243]) by smtp.gmail.com with ESMTPSA id o27-20020aa7979b000000b0052d481032a7sm4593778pfp.26.2022.08.13.23.44.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Aug 2022 23:44:28 -0700 (PDT) From: Tuo Cao <91tuocao@gmail.com> To: James.Bottomley@HansenPartnership.com, martin.petersen@oracle.com, khalid@gonehiking.org, willy@infradead.org, hare@suse.com Cc: anil.gurumurthy@qlogic.com, sudarsana.kalluru@qlogic.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, 91tuocao@gmail.com Subject: [PATCH 3/9] scsi: a2091: move spin_lock_irqsave to spin_lock in interrupt handler Date: Sun, 14 Aug 2022 14:43:31 +0800 Message-Id: <20220814064337.32621-4-91tuocao@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220814064337.32621-1-91tuocao@gmail.com> References: <20220814064337.32621-1-91tuocao@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org it is unnecessary to call spin_lock_irqsave in a interrupt handler. Signed-off-by: Tuo Cao <91tuocao@gmail.com> --- drivers/scsi/a2091.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/a2091.c b/drivers/scsi/a2091.c index 74312400468b..0a79ba0b20f7 100644 --- a/drivers/scsi/a2091.c +++ b/drivers/scsi/a2091.c @@ -34,14 +34,13 @@ static irqreturn_t a2091_intr(int irq, void *data) struct Scsi_Host *instance = data; struct a2091_hostdata *hdata = shost_priv(instance); unsigned int status = hdata->regs->ISTR; - unsigned long flags; if (!(status & (ISTR_INT_F | ISTR_INT_P)) || !(status & ISTR_INTS)) return IRQ_NONE; - spin_lock_irqsave(instance->host_lock, flags); + spin_lock(instance->host_lock); wd33c93_intr(instance); - spin_unlock_irqrestore(instance->host_lock, flags); + spin_unlock(instance->host_lock); return IRQ_HANDLED; } From patchwork Sun Aug 14 06:43:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tuo cao <91tuocao@gmail.com> X-Patchwork-Id: 597480 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9EE53C25B08 for ; Sun, 14 Aug 2022 06:44:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240291AbiHNGol (ORCPT ); Sun, 14 Aug 2022 02:44:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229882AbiHNGoe (ORCPT ); Sun, 14 Aug 2022 02:44:34 -0400 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E829B61B12; Sat, 13 Aug 2022 23:44:31 -0700 (PDT) Received: by mail-pj1-x1032.google.com with SMTP id o5-20020a17090a3d4500b001ef76490983so4335037pjf.2; Sat, 13 Aug 2022 23:44:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc; bh=dBUCfl7ovG2Vsq0YOjmDbDDGATwn6CqcVymMcfKmnSs=; b=FKsOdyc5fE03yIQ938uyXVkFPPLWlmI+mHCJYM9b2ZddFry7ju2Lv6wXMPIKolLO8J /9y0NWkzEVb0LFj8bjENZcbCEN6MQESAA2L3OJcA3AOhIdngKyvSDmNM98s1MeexRj6u DiDDi4z8d1jAFhXYMQychq986/wC1U9dYqKA99mg9ym+g1qoLORAJz063/RHMVZVAuYC 4ZgyTwHOYsf8bzbm1JFJqYCCEQDmyn/DOz0fpq0RiJfAR1ppgwbDfQcox/zEQFe9/Vmr ofLThdJojpkZy1uXWNklM008BGyYjeX3Kqcc4xL6ZGPdkPgSbga0NQg9xbNgfye2cT5Y 4uMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc; bh=dBUCfl7ovG2Vsq0YOjmDbDDGATwn6CqcVymMcfKmnSs=; b=DzYoCgFiJo7Cg4E2+qixdBhmseBDaXvKc1C9Oao9xGDDNfVTOeGp9ydwj2nJ+T/6rk zTgLVYHQKfzNU+25ZixkUpaW0kCP21zyS7nbgJEglyTpdl/PYD9sZI78lq9ZMDbr48UV DnhgKLIyoBWdENMK+ds/mP9P/StI4YCRaL9PI2VEDMBCCrIFit4S6L3i3KWQjLlWebmg WbIIVUvyO0c9kSnar7VHOzQOn+GoPCUaj0DfvSWkhIcC0gLnEq8ym+0nuxt5OmkfY83g Oae1oBLFSr5vtM25RE3wWwNCJnzNpIHkqeqVGOa38rZIggsdtvA3WDo6+y09s9cm4K5D FVag== X-Gm-Message-State: ACgBeo0JHtHLD9J56EkPA0ndmrzXaCC+ZLB3qjSTtcAEaK0vq+IPo1lL 2EIqZqhyWeAymYiaIXD5guk= X-Google-Smtp-Source: AA6agR4YfgZpeOqTRAry23FZ3DnqYEvL7edsuLVry2wHV73DxeZGeiOKjIV+/K/qxsm0955JJtNHeQ== X-Received: by 2002:a17:902:cec8:b0:16f:8081:54bc with SMTP id d8-20020a170902cec800b0016f808154bcmr10969618plg.139.1660459470590; Sat, 13 Aug 2022 23:44:30 -0700 (PDT) Received: from localhost.localdomain ([182.160.5.243]) by smtp.gmail.com with ESMTPSA id o27-20020aa7979b000000b0052d481032a7sm4593778pfp.26.2022.08.13.23.44.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Aug 2022 23:44:30 -0700 (PDT) From: Tuo Cao <91tuocao@gmail.com> To: James.Bottomley@HansenPartnership.com, martin.petersen@oracle.com, khalid@gonehiking.org, willy@infradead.org, hare@suse.com Cc: anil.gurumurthy@qlogic.com, sudarsana.kalluru@qlogic.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, 91tuocao@gmail.com Subject: [PATCH 4/9] scsi: a3000: move spin_lock_irqsave to spin_lock in interrupt handler Date: Sun, 14 Aug 2022 14:43:32 +0800 Message-Id: <20220814064337.32621-5-91tuocao@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220814064337.32621-1-91tuocao@gmail.com> References: <20220814064337.32621-1-91tuocao@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org it is unnecessary to call spin_lock_irqsave in a interrupt handler. Signed-off-by: Tuo Cao <91tuocao@gmail.com> --- drivers/scsi/a3000.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/a3000.c b/drivers/scsi/a3000.c index 2c5cb1a02e86..f34c436459d5 100644 --- a/drivers/scsi/a3000.c +++ b/drivers/scsi/a3000.c @@ -36,14 +36,13 @@ static irqreturn_t a3000_intr(int irq, void *data) struct Scsi_Host *instance = data; struct a3000_hostdata *hdata = shost_priv(instance); unsigned int status = hdata->regs->ISTR; - unsigned long flags; if (!(status & ISTR_INT_P)) return IRQ_NONE; if (status & ISTR_INTS) { - spin_lock_irqsave(instance->host_lock, flags); + spin_lock(instance->host_lock); wd33c93_intr(instance); - spin_unlock_irqrestore(instance->host_lock, flags); + spin_unlock(instance->host_lock); return IRQ_HANDLED; } pr_warn("Non-serviced A3000 SCSI-interrupt? ISTR = %02x\n", status); From patchwork Sun Aug 14 06:43:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tuo cao <91tuocao@gmail.com> X-Patchwork-Id: 597255 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49243C25B0F for ; Sun, 14 Aug 2022 06:44:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240298AbiHNGom (ORCPT ); Sun, 14 Aug 2022 02:44:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240244AbiHNGoe (ORCPT ); Sun, 14 Aug 2022 02:44:34 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DEF961112; Sat, 13 Aug 2022 23:44:33 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id ch17-20020a17090af41100b001fa74771f61so266742pjb.0; Sat, 13 Aug 2022 23:44:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc; bh=WGucK6A+7SMvvshGIdsAODR7OhhetiQhlNUf0D2nokw=; b=Jrul6cFXqZzr7sMQmOdzdAKmja4nShj+64SNWr0CzTx452D9lOyUH0xbFXaH/x5IxS KzerY8GKSdBnVWB9Q/3PSzrL2SPXfhLIldeY0WFe6z1eSrH/4I2LHqsfgsWNiyKqYBM2 8YZEz8Gld+uuU3fQbHs28v3XedKNVGfyNYQbO2p+FJuJwzaxnzv/+urUohK1hCL+YwcQ O22QwEmlecohN3Bc+vbg0zJKlkHaoNDih7dIxqOeb4SWlOX5KJTwJPEWNNYyVnIy8R10 FSOUWj+AZZ8gHd6lkXAMkGxsSYXAyr7oOzHu/p3tSX5GOyelp3GcQQkc81sVeJ8Qzk7P 9vfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc; bh=WGucK6A+7SMvvshGIdsAODR7OhhetiQhlNUf0D2nokw=; b=EOFCfgSZ7IRKiEvIWrRPHSdiAnJXmHzCvC2teAeDfYauIRYWd7HVmPYekf0lPfQzNv sd0IHy8mOh6XW0xbsWkX5quZ3hiq9is1QnWN9LI+ShEBKXyKINbmwUHPyQX87nHFOD4U 1abPIsFwIzthqs3SOkjt7WvivyGYXy0X4tRDhe8mbIibvUWpXMCTq7te0s1OygE/3txe DG0NgzAadKt1wUJjleOMtjrUaA6HuwtFsQmq7JlSMG7YZF5nOzk2UccFfL+nHrJcsPrp xa1eQFVKzYVEUgEEFLeKZfq88c9TjnPsJaJF5/vuD962ftFMxFKLLC80NSq5gSU/bt9D xZ5A== X-Gm-Message-State: ACgBeo2ERPaSWZmzPEWRUUqMGNNopY2062cQEFlr9Yl2RVcmftStZErN SXhRsumaHF2XD4Mc97FLHDk= X-Google-Smtp-Source: AA6agR5foPcXHj0G32XHenSQ/1289LiOmyjMgiNs4la+kMONVXSfBsLI+REueuiYdjX9Of4bCw15dw== X-Received: by 2002:a17:90b:38cd:b0:1fa:5566:9214 with SMTP id nn13-20020a17090b38cd00b001fa55669214mr9272289pjb.35.1660459472806; Sat, 13 Aug 2022 23:44:32 -0700 (PDT) Received: from localhost.localdomain ([182.160.5.243]) by smtp.gmail.com with ESMTPSA id o27-20020aa7979b000000b0052d481032a7sm4593778pfp.26.2022.08.13.23.44.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Aug 2022 23:44:32 -0700 (PDT) From: Tuo Cao <91tuocao@gmail.com> To: James.Bottomley@HansenPartnership.com, martin.petersen@oracle.com, khalid@gonehiking.org, willy@infradead.org, hare@suse.com Cc: anil.gurumurthy@qlogic.com, sudarsana.kalluru@qlogic.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, 91tuocao@gmail.com Subject: [PATCH 5/9] scsi: BusLogic: move spin_lock_irqsave to spin_lock in interrupt handler Date: Sun, 14 Aug 2022 14:43:33 +0800 Message-Id: <20220814064337.32621-6-91tuocao@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220814064337.32621-1-91tuocao@gmail.com> References: <20220814064337.32621-1-91tuocao@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org it is unnecessary to call spin_lock_irqsave in a interrupt handler. Signed-off-by: Tuo Cao <91tuocao@gmail.com> --- drivers/scsi/BusLogic.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c index f2abffce2659..e2eb020966cd 100644 --- a/drivers/scsi/BusLogic.c +++ b/drivers/scsi/BusLogic.c @@ -2739,11 +2739,10 @@ static void blogic_process_ccbs(struct blogic_adapter *adapter) static irqreturn_t blogic_inthandler(int irq_ch, void *devid) { struct blogic_adapter *adapter = (struct blogic_adapter *) devid; - unsigned long processor_flag; /* Acquire exclusive access to Host Adapter. */ - spin_lock_irqsave(adapter->scsi_host->host_lock, processor_flag); + spin_lock(adapter->scsi_host->host_lock); /* Handle Interrupts appropriately for each Host Adapter type. */ @@ -2811,7 +2810,7 @@ static irqreturn_t blogic_inthandler(int irq_ch, void *devid) /* Release exclusive access to Host Adapter. */ - spin_unlock_irqrestore(adapter->scsi_host->host_lock, processor_flag); + spin_unlock(adapter->scsi_host->host_lock); return IRQ_HANDLED; } From patchwork Sun Aug 14 06:43:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tuo cao <91tuocao@gmail.com> X-Patchwork-Id: 597479 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67C01C25B06 for ; Sun, 14 Aug 2022 06:45:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240289AbiHNGpI (ORCPT ); Sun, 14 Aug 2022 02:45:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240247AbiHNGom (ORCPT ); Sun, 14 Aug 2022 02:44:42 -0400 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3AEB5647EC; Sat, 13 Aug 2022 23:44:35 -0700 (PDT) Received: by mail-pg1-x532.google.com with SMTP id 202so4152465pgc.8; Sat, 13 Aug 2022 23:44:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc; bh=WTcptoHTlt8t0Uw787rjRlrJSUTtZQTxGFKI+vfMRbw=; b=CCpZ+mtrX0u+mFtsRgAUlwUh51Uh4RETylKQaMvxGZH1XGhg0GmYVp43DRDrYyqE/a fN3OWenfZXgHmfl1dYPTi+Bs10e6LZbZ6AXHUilToisYLTFPLP9FeB5YJdoylKID1ikh YF67ky/vS5Ov927cuuCn/mfCRnja5N2qSty5WefVCEr9Nk3oa0RVavCyF6PQbW9KRF1m +qG6EXX0r4EScOfYqxbm0CIaEtx3i5/TbtL02OsLbYMdsipJpC5cM75YziuqXzspBtjK qN1X+iPF6C3zjhfZ9J22Y1t+Q4RrEeC71oJ9mnoAIZOqfW1og4RnXyGRYBDEHndIAURK GB9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc; bh=WTcptoHTlt8t0Uw787rjRlrJSUTtZQTxGFKI+vfMRbw=; b=ky9U8MjXlR/jfX61LF/JQpVBdwzNK50o90LaUD5kfkhR5yjBg8Ctx2PnqvLSLvspHY dXRBiZUdEV6YsJrrlcysBTqOGkGXXr1A/UI38iC4TEd8eF29LxlwjgOLcReUeYdIpAGm t3fbYCob0Fep7m183CTCD7adt2iDSCvPfXq/sAR/69eWXwxc0fwlaztsNMUFqU4TV0jY Wz2R3FDpW1hMtZ9EILk1lpmsXdVaxrCxc9YS9RbptW0urgseyeEdTVGVXNmDuLMc1XpQ lZJVeEP4GOEQwXWun4u9HrRyR+q+PHK9Ls3cAFwdJA6By0+t9jRzTrrwcnK44aGW6tai tlQw== X-Gm-Message-State: ACgBeo18op7sb0b4fND+SC3/moOlVVID4qI1+A4M4VaNM1O/+VLAIbYe cgHhMvuySEY4SnRRD8YvR3E= X-Google-Smtp-Source: AA6agR7ZpmWGP7r5GU11jppfRo+BTncutxWo903b/yOtV40cQgGzdD5ADIO+XppvV9DWPArII8Ay5A== X-Received: by 2002:a63:5c4a:0:b0:41d:bd7d:6084 with SMTP id n10-20020a635c4a000000b0041dbd7d6084mr9309641pgm.411.1660459475059; Sat, 13 Aug 2022 23:44:35 -0700 (PDT) Received: from localhost.localdomain ([182.160.5.243]) by smtp.gmail.com with ESMTPSA id o27-20020aa7979b000000b0052d481032a7sm4593778pfp.26.2022.08.13.23.44.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Aug 2022 23:44:34 -0700 (PDT) From: Tuo Cao <91tuocao@gmail.com> To: James.Bottomley@HansenPartnership.com, martin.petersen@oracle.com, khalid@gonehiking.org, willy@infradead.org, hare@suse.com Cc: anil.gurumurthy@qlogic.com, sudarsana.kalluru@qlogic.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, 91tuocao@gmail.com Subject: [PATCH 6/9] scsi: advansys: move spin_lock_irqsave to spin_lock in interrupt handler Date: Sun, 14 Aug 2022 14:43:34 +0800 Message-Id: <20220814064337.32621-7-91tuocao@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220814064337.32621-1-91tuocao@gmail.com> References: <20220814064337.32621-1-91tuocao@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org it is unnecessary to call spin_lock_irqsave in a interrupt handler. Signed-off-by: Tuo Cao <91tuocao@gmail.com> --- drivers/scsi/advansys.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c index f301aec044bb..2f402f73ae4e 100644 --- a/drivers/scsi/advansys.c +++ b/drivers/scsi/advansys.c @@ -7137,10 +7137,9 @@ static irqreturn_t advansys_interrupt(int irq, void *dev_id) struct Scsi_Host *shost = dev_id; struct asc_board *boardp = shost_priv(shost); irqreturn_t result = IRQ_NONE; - unsigned long flags; ASC_DBG(2, "boardp 0x%p\n", boardp); - spin_lock_irqsave(shost->host_lock, flags); + spin_lock(shost->host_lock); if (ASC_NARROW_BOARD(boardp)) { if (AscIsIntPending(shost->io_port)) { result = IRQ_HANDLED; @@ -7155,7 +7154,7 @@ static irqreturn_t advansys_interrupt(int irq, void *dev_id) ASC_STATS(shost, interrupt); } } - spin_unlock_irqrestore(shost->host_lock, flags); + spin_unlock(shost->host_lock); ASC_DBG(1, "end\n"); return result; From patchwork Sun Aug 14 06:43:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tuo cao <91tuocao@gmail.com> X-Patchwork-Id: 597254 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6A61C25B06 for ; Sun, 14 Aug 2022 06:45:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240338AbiHNGpU (ORCPT ); Sun, 14 Aug 2022 02:45:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240303AbiHNGom (ORCPT ); Sun, 14 Aug 2022 02:44:42 -0400 Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A415867C88; Sat, 13 Aug 2022 23:44:37 -0700 (PDT) Received: by mail-pg1-x531.google.com with SMTP id c24so4149911pgg.11; Sat, 13 Aug 2022 23:44:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc; bh=bpHflVqpWFCurIS5n6prF8RqBgNPSiD5kv/4SFiqdqI=; b=mwcYny7oCPSQKZ1FC4syu8SOhDeD6KdzzNLzmXR55TGnD+AC779AdiOiwpaPIQPwkG M4MBYsM+6nWzNnDrj0CC/aJ6c2YOkkvalKCokgYXywjUVdeJDsql0G+ZMolJ0uataFrU Q1GEDxrzHDtq6q3uA/83Xm2ra4+VAUuIZmu69rIAyG10reFTOwwL4ijlBWlRIfhD4CUK 6oNhWE5ypXpLoCn0ePC/VvhXcbhTl7DoiqZ2f/uMCWPP6QLeW5puL4/EQaSpzYPZBcv6 vJJw2/KKJcbOqtMEm193MVfruhcz8X1Uo/tXGvNg2MYuB7X7aXuxObwsdAnnY2Gcn6UG RoOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc; bh=bpHflVqpWFCurIS5n6prF8RqBgNPSiD5kv/4SFiqdqI=; b=HHfIk9udEgTBA28k96xU4aQIDA7Rnjq1HZqhqOzkTiLQsD9dWbeBKt6Ffme09pv8B6 IC6beH7VQRxOB1vvkbUJXRp0W3iQNl5A9YdrfD4VdhJ/qQ0SoPiUR4dEY8w6tYiAaTFT AViCsWwRGy7nByskFgj2HFzYgr3Yk7NI3DLPWzyfPlx02qlVSt7TIN6IvIz02We/7LCj cja3dq9zoffxFJB5Iw2czU/YkKRzF8+BG2nGJvjRxZKkw4VN5BxpFblxLQu80fLgTHVl mV9TBsQTXNW+cvzJ1JOhxlYxCsmr9155WKuXkkgo5dEDhvd3gRF5ih4T+t/WGaCMygJ6 1Yug== X-Gm-Message-State: ACgBeo3XEOxKA0KCI3txfCYhWl8ikri0qNlzwFSVNnHnO/UeUS4GN0D7 16TVJS707jtpTYB/Texxn0g= X-Google-Smtp-Source: AA6agR6aN+cNBziv2g6L/nCULTB4wP2gc5R52kExDTjPOXl6Zbz72M+uhW7Dn+6q5vAtL80GD0+Brw== X-Received: by 2002:a05:6a00:1948:b0:525:45e3:2eb7 with SMTP id s8-20020a056a00194800b0052545e32eb7mr11258981pfk.77.1660459477252; Sat, 13 Aug 2022 23:44:37 -0700 (PDT) Received: from localhost.localdomain ([182.160.5.243]) by smtp.gmail.com with ESMTPSA id o27-20020aa7979b000000b0052d481032a7sm4593778pfp.26.2022.08.13.23.44.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Aug 2022 23:44:36 -0700 (PDT) From: Tuo Cao <91tuocao@gmail.com> To: James.Bottomley@HansenPartnership.com, martin.petersen@oracle.com, khalid@gonehiking.org, willy@infradead.org, hare@suse.com Cc: anil.gurumurthy@qlogic.com, sudarsana.kalluru@qlogic.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, 91tuocao@gmail.com Subject: [PATCH 7/9] scsi: aha1542: move spin_lock_irqsave to spin_lock in interrupt handler Date: Sun, 14 Aug 2022 14:43:35 +0800 Message-Id: <20220814064337.32621-8-91tuocao@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220814064337.32621-1-91tuocao@gmail.com> References: <20220814064337.32621-1-91tuocao@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org it is unnecessary to call spin_lock_irqsave in a interrupt handler. Signed-off-by: Tuo Cao <91tuocao@gmail.com> --- drivers/scsi/aha1542.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c index 552ca95157da..b49082bc5b54 100644 --- a/drivers/scsi/aha1542.c +++ b/drivers/scsi/aha1542.c @@ -281,7 +281,6 @@ static irqreturn_t aha1542_interrupt(int irq, void *dev_id) struct aha1542_hostdata *aha1542 = shost_priv(sh); int errstatus, mbi, mbo, mbistatus; int number_serviced; - unsigned long flags; struct scsi_cmnd *tmp_cmd; int flag; struct mailbox *mb = aha1542->mb; @@ -306,7 +305,7 @@ static irqreturn_t aha1542_interrupt(int irq, void *dev_id) #endif number_serviced = 0; - spin_lock_irqsave(sh->host_lock, flags); + spin_lock(sh->host_lock); while (1) { flag = inb(INTRFLAGS(sh->io_port)); @@ -339,7 +338,7 @@ static irqreturn_t aha1542_interrupt(int irq, void *dev_id) } while (mbi != aha1542->aha1542_last_mbi_used); if (mb[mbi].status == 0) { - spin_unlock_irqrestore(sh->host_lock, flags); + spin_unlock(sh->host_lock); /* Hmm, no mail. Must have read it the last time around */ if (!number_serviced) shost_printk(KERN_WARNING, sh, "interrupt received, but no mail.\n"); @@ -367,7 +366,7 @@ static irqreturn_t aha1542_interrupt(int irq, void *dev_id) tmp_cmd = aha1542->int_cmds[mbo]; if (!tmp_cmd) { - spin_unlock_irqrestore(sh->host_lock, flags); + spin_unlock(sh->host_lock); shost_printk(KERN_WARNING, sh, "Unexpected interrupt\n"); shost_printk(KERN_WARNING, sh, "tarstat=%x, hastat=%x idlun=%x ccb#=%d\n", ccb[mbo].tarstat, ccb[mbo].hastat, ccb[mbo].idlun, mbo); From patchwork Sun Aug 14 06:43:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tuo cao <91tuocao@gmail.com> X-Patchwork-Id: 597478 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BEB56C25B06 for ; Sun, 14 Aug 2022 06:45:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240356AbiHNGpZ (ORCPT ); Sun, 14 Aug 2022 02:45:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240315AbiHNGpA (ORCPT ); Sun, 14 Aug 2022 02:45:00 -0400 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5ED2461B12; Sat, 13 Aug 2022 23:44:40 -0700 (PDT) Received: by mail-pf1-x42e.google.com with SMTP id k14so4386566pfh.0; Sat, 13 Aug 2022 23:44:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc; bh=J0IgRCNJ5zc066qO2+BSqn97K/QHn49DvsVSGMTObUo=; b=Bc7HOD4dYzcxi5LkgcO2VwQV46IzFaUbg7GPwCGjiQtQwY+twq0EajtCWrz2xIqZtm syih3CkT9aVKtjbROpryD+OR3Ip55O+SLf1AgX3neLe9DP2/kmq1xVsE1yIct9NxAQPJ NgTDMIG5Wyamx/EVSDSBsimrnU5ZrwK3qF6U+1nBJ5ELNgx560OHNrUcT3H3dkjUgnXP +3FSztjYdmKRrqiGNVii5yZhaedi5r8/i9okpw4PjO6/ljLhQn/7NDMroXLONUnOwh6o Mubdn8+ULwPafsyqVRCTOlS0P3ielWHBfuZfg/oW9OU8CPl8J/+fnUjcVyYvUsUOEvWC QKug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc; bh=J0IgRCNJ5zc066qO2+BSqn97K/QHn49DvsVSGMTObUo=; b=XhbTuG9VRCiQNqqazf7ojFzpwx0vlk0+aA99j36FlQFdUDxJlmDkiCqVgz4gRzcfLx hDNjVF85+dkgPqkO4j4jRQoJTJp98SvVfEtTFslRskgP8uFSJGXcXOXufMaAl6FlASJ3 h2gh1xdTtYsj/XbUtqRvFQZj1Hr++BipIxbKHxKAgqpnD7Y2lAvH3YSXGEpwPFi9x991 aXEeN/3fuqk0qyDiFx27edSZrrjy0bFKr/hx2CUUzprXSb5f0sdPuCoGzH4ktWKl7XsI DWayXU6OY1H3m9rzuD2TtVBsYFSRXNQSi/hDgLoYbR2adHm9KE1RLQG5nWRFRbIKCKAT k7Jw== X-Gm-Message-State: ACgBeo1EkMSbVbgkWw1sC8gkGUV8B6PkAhii3jZtTB2ryWLrCYSppE4p 6qy299gXZmepebUfJJBsw5s= X-Google-Smtp-Source: AA6agR4Bv8K5j45NR9cWF3WsYfymXfcq2W3VZ3dL3yaosEb4mZ2TxerWrMunao1wdCzzebZY8vu5Hg== X-Received: by 2002:a63:4f5a:0:b0:41d:10ae:6203 with SMTP id p26-20020a634f5a000000b0041d10ae6203mr9459572pgl.258.1660459479522; Sat, 13 Aug 2022 23:44:39 -0700 (PDT) Received: from localhost.localdomain ([182.160.5.243]) by smtp.gmail.com with ESMTPSA id o27-20020aa7979b000000b0052d481032a7sm4593778pfp.26.2022.08.13.23.44.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Aug 2022 23:44:39 -0700 (PDT) From: Tuo Cao <91tuocao@gmail.com> To: James.Bottomley@HansenPartnership.com, martin.petersen@oracle.com, khalid@gonehiking.org, willy@infradead.org, hare@suse.com Cc: anil.gurumurthy@qlogic.com, sudarsana.kalluru@qlogic.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, 91tuocao@gmail.com Subject: [PATCH 8/9] scsi: aha1740: move spin_lock_irqsave to spin_lock in interrupt handler Date: Sun, 14 Aug 2022 14:43:36 +0800 Message-Id: <20220814064337.32621-9-91tuocao@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220814064337.32621-1-91tuocao@gmail.com> References: <20220814064337.32621-1-91tuocao@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org it is unnecessary to call spin_lock_irqsave in a interrupt handler. Signed-off-by: Tuo Cao <91tuocao@gmail.com> --- drivers/scsi/aha1740.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/aha1740.c b/drivers/scsi/aha1740.c index 134255751819..c4f46ab927d1 100644 --- a/drivers/scsi/aha1740.c +++ b/drivers/scsi/aha1740.c @@ -218,14 +218,13 @@ static irqreturn_t aha1740_intr_handle(int irq, void *dev_id) struct ecb *ecbptr; struct scsi_cmnd *SCtmp; unsigned int base; - unsigned long flags; int handled = 0; struct aha1740_sg *sgptr; struct eisa_device *edev; if (!host) panic("aha1740.c: Irq from unknown host!\n"); - spin_lock_irqsave(host->host_lock, flags); + spin_lock(host->host_lock); base = host->io_port; number_serviced = 0; edev = HOSTDATA(host)->edev; @@ -315,7 +314,7 @@ static irqreturn_t aha1740_intr_handle(int irq, void *dev_id) number_serviced++; } - spin_unlock_irqrestore(host->host_lock, flags); + spin_unlock(host->host_lock); return IRQ_RETVAL(handled); } From patchwork Sun Aug 14 06:43:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tuo cao <91tuocao@gmail.com> X-Patchwork-Id: 597253 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97463C25B06 for ; Sun, 14 Aug 2022 06:45:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236068AbiHNGpk (ORCPT ); Sun, 14 Aug 2022 02:45:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230131AbiHNGpH (ORCPT ); Sun, 14 Aug 2022 02:45:07 -0400 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5508E61D47; Sat, 13 Aug 2022 23:44:42 -0700 (PDT) Received: by mail-pg1-x532.google.com with SMTP id 202so4152590pgc.8; Sat, 13 Aug 2022 23:44:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc; bh=eRP0R2EaBtwSq8WtYYvJ1VIiqvdFfbDzoNH6Xz9adF4=; b=gJTq4+2G2E8UjOzN05cmXZvN90i7memh0g8Vie6zK1iCWo1/89Fb7eFgNla5CnP1AL TSJg0M4C+eex55+sagcNQ7UmrYFhK60eqLXlbsj3wM67eSbYNUXman2xHu4efTVHmqNB ZIVDJKemz0mkuaADoV8/nbdi9R0EqfNH82RFylPSy81uY47Ad4MSczhqQlICoXsvSnPr OxlXRyyEl2RmTux7Z/rKk0kpgpyQsewtHF7Jky/WdQCjo7WfyXTMmwFH8vJCpzunJqGK XqnhbNj95dj3Xw5Agj3i1vkHX8UdhO9Y4d8602pA3lIjuvIhKQjsUB3mn4SYqoTeU/td 47ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc; bh=eRP0R2EaBtwSq8WtYYvJ1VIiqvdFfbDzoNH6Xz9adF4=; b=vaHZtSkQvIBUFJv1v5fCkKE0FVIP1T4/H3IRCPzNgWIVNIW9OaumSG4FZKPGEh9ZOc 9ThZMeoXbDqweVJhB0nRqKhk7UUvP48pAq3t8JZa79lzoIuADynAX7o/u2hp6M8hG+7m zT5sVwEy0N2qfcXwanuzPLeEL0DGB9YlIlDjQNLMFjAePfY/wtPPV3UJIZHI7lM70Czn jpmyZ0jp7zCnsUanzCi6e0wrqsXROX1wEVblbVWJ7jm4fQDsaKDYI9JE/x4dBSG4GtZz 0gsYBbTR5z7aCxznDkbMMbyHx/t8sJiB58UKq+nGG+wz7T+BowGyLMESUOEoV+DVmfmQ tZjg== X-Gm-Message-State: ACgBeo0DAd4FiCksYo08MmQmj+TzyN/EcT/EuQI5hYqvmBtL3SA3Lo+v yOoDVp5wSBTh1ESP04kFFjA= X-Google-Smtp-Source: AA6agR40kM1yEhA2lQH3A99ngi9U6RGioao6KJCMRA3Y6JtaX4ryHMT+pLNna9uSvmu7RS9+ThBuuA== X-Received: by 2002:aa7:88c4:0:b0:52f:755c:a354 with SMTP id k4-20020aa788c4000000b0052f755ca354mr10785397pff.81.1660459481710; Sat, 13 Aug 2022 23:44:41 -0700 (PDT) Received: from localhost.localdomain ([182.160.5.243]) by smtp.gmail.com with ESMTPSA id o27-20020aa7979b000000b0052d481032a7sm4593778pfp.26.2022.08.13.23.44.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Aug 2022 23:44:41 -0700 (PDT) From: Tuo Cao <91tuocao@gmail.com> To: James.Bottomley@HansenPartnership.com, martin.petersen@oracle.com, khalid@gonehiking.org, willy@infradead.org, hare@suse.com Cc: anil.gurumurthy@qlogic.com, sudarsana.kalluru@qlogic.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, 91tuocao@gmail.com Subject: [PATCH 9/9] scsi: bfad: move spin_lock_irqsave to spin_lock in interrupt handler Date: Sun, 14 Aug 2022 14:43:37 +0800 Message-Id: <20220814064337.32621-10-91tuocao@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220814064337.32621-1-91tuocao@gmail.com> References: <20220814064337.32621-1-91tuocao@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org it is unnecessary to call spin_lock_irqsave in a interrupt handler. Signed-off-by: Tuo Cao <91tuocao@gmail.com> --- drivers/scsi/bfa/bfad.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c index e5aa982ffedc..3191377d543b 100644 --- a/drivers/scsi/bfa/bfad.c +++ b/drivers/scsi/bfa/bfad.c @@ -1086,25 +1086,24 @@ bfad_intx(int irq, void *dev_id) { struct bfad_s *bfad = dev_id; struct list_head doneq; - unsigned long flags; bfa_boolean_t rc; - spin_lock_irqsave(&bfad->bfad_lock, flags); + spin_lock(&bfad->bfad_lock); rc = bfa_intx(&bfad->bfa); if (!rc) { - spin_unlock_irqrestore(&bfad->bfad_lock, flags); + spin_unlock(&bfad->bfad_lock); return IRQ_NONE; } bfa_comp_deq(&bfad->bfa, &doneq); - spin_unlock_irqrestore(&bfad->bfad_lock, flags); + spin_unlock(&bfad->bfad_lock); if (!list_empty(&doneq)) { bfa_comp_process(&bfad->bfa, &doneq); - spin_lock_irqsave(&bfad->bfad_lock, flags); + spin_lock(&bfad->bfad_lock); bfa_comp_free(&bfad->bfa, &doneq); - spin_unlock_irqrestore(&bfad->bfad_lock, flags); + spin_unlock(&bfad->bfad_lock); } return IRQ_HANDLED; @@ -1117,20 +1116,19 @@ bfad_msix(int irq, void *dev_id) struct bfad_msix_s *vec = dev_id; struct bfad_s *bfad = vec->bfad; struct list_head doneq; - unsigned long flags; - spin_lock_irqsave(&bfad->bfad_lock, flags); + spin_lock(&bfad->bfad_lock); bfa_msix(&bfad->bfa, vec->msix.entry); bfa_comp_deq(&bfad->bfa, &doneq); - spin_unlock_irqrestore(&bfad->bfad_lock, flags); + spin_unlock(&bfad->bfad_lock); if (!list_empty(&doneq)) { bfa_comp_process(&bfad->bfa, &doneq); - spin_lock_irqsave(&bfad->bfad_lock, flags); + spin_lock(&bfad->bfad_lock); bfa_comp_free(&bfad->bfa, &doneq); - spin_unlock_irqrestore(&bfad->bfad_lock, flags); + spin_unlock(&bfad->bfad_lock); } return IRQ_HANDLED;