From: Matthew Wilcox <matthew@wil.cx>
To: Andrew Vasquez <andrew.vasquez@qlogic.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: lockdep warning in qla2xxx
Date: Wed, 7 May 2008 12:09:04 -0600 [thread overview]
Message-ID: <20080507180904.GA19219@parisc-linux.org> (raw)
In-Reply-To: <20080506213729.GH57975@plap4.qlogic.org>
On Tue, May 06, 2008 at 02:37:29PM -0700, Andrew Vasquez wrote:
> Ok, admitently, my parsing of lockdep warnings is pretty weak, but I
> guess what's happening here is that lockdep is detecting the
> interrupt-handler is run in both process and interrupt context with
> irqs-enabled in the former case.
I believe you to be correct.
> During init-time and error-recovery (after a RISC reset), the driver
> disables interrupts and 'polls' for completions by calling
> qla2x00_poll():
>
> static inline void
> qla2x00_poll(scsi_qla_host_t *ha)
> {
> ha->isp_ops->intr_handler(0, ha);
> }
>
> which in-turn calls the ISP registered interrupt handler. One
> possible solution to silence lockdep is to disable local interrupts
> while the handler is polled... This though seems fairly heavy handed.
> Does something like the following make sense???
>
> ---
>
> diff --git a/drivers/scsi/qla2xxx/qla_inline.h b/drivers/scsi/qla2xxx/qla_inline.h
> index e9bae27..92fafbd 100644
> --- a/drivers/scsi/qla2xxx/qla_inline.h
> +++ b/drivers/scsi/qla2xxx/qla_inline.h
> @@ -34,7 +34,11 @@ qla2x00_debounce_register(volatile uint16_t __iomem *addr)
> static inline void
> qla2x00_poll(scsi_qla_host_t *ha)
> {
> + unsigned long flags;
> +
> + local_irq_save(flags);
> ha->isp_ops->intr_handler(0, ha);
> + local_irq_restore(flags);
> }
Looks like the right idea to me.
Reviewed-by: Matthew Wilcox <willy@linux.intel.com>
--
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
prev parent reply other threads:[~2008-05-07 18:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-06 18:23 lockdep warning in qla2xxx Matthew Wilcox
2008-05-06 21:37 ` Andrew Vasquez
2008-05-07 18:09 ` Matthew Wilcox [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080507180904.GA19219@parisc-linux.org \
--to=matthew@wil.cx \
--cc=andrew.vasquez@qlogic.com \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.