public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lukasz Kosewski <lkosewsk@nit.ca>
To: Andrew Morton <akpm@osdl.org>
Cc: Arjan van de Ven <arjan@infradead.org>,
	vgoyal@in.ibm.com, linux-kernel@vger.kernel.org,
	linux-scsi@vger.kernel.org
Subject: Re: SCSI aic7xxx driver: Initialization Failure over a kdump reboot
Date: Thu, 06 Jan 2005 23:53:27 -0500	[thread overview]
Message-ID: <41DE15C7.6030102@nit.ca> (raw)
In-Reply-To: <20050106195043.4b77c63e.akpm@osdl.org>

Andrew Morton wrote:
>> looks like the following is happening:
>> the controller wants to send an irq (probably from previous life)
>> then suddenly the driver gets loaded
>> * which registers an irq handler
>> * which does pci_enable_device()
>> and .. the irq goes through. 
>> the irq handler just is not yet expecting this irq, so
>> returns "uh dunno not mine"
>> the kernel then decides to disable the irq on the apic level
>> and then the driver DOES need an irq during init
>> ... which never happens.
>>
> 
> 
> yes, that's exactly what e100 was doing on my laptop last month.  Fixed
> that by arranging for the NIC to be reset before the call to
> pci_set_master().

I noticed the exact same thing with a usb-uhci hub on a VIA MicroATX
board a month back.  I rewrote the init sequence of the driver so that
it resets all of the hubs in the system first, and THEN registers their
interrupts.

This seems like a problem that CAN happen with level-triggered
interrupts.  Us fixing it in individual drivers is not the solution; we
need a general solution.

I have an idea of something I might do for 2.6.11, but I doubt anyone
will actually agree with it.  Say we keep a counter of how many times
interrupt x has been fired off since the last timer interrupt
(obviously, a timer interrupt resets the counter).  Then we can pick an
arbitrary threshold for masking out this interrupt until another device
actually pines for it.

Or something.  The point is, we need a general solution to the problem,
not poking about in every single driver trying to tie it down.

Luke Kosewski
Human Cannonball
Net Integration Technologies

  reply	other threads:[~2005-01-07  4:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-06 12:35 SCSI aic7xxx driver: Initialization Failure over a kdump reboot Vivek Goyal
2005-01-06 12:12 ` Arjan van de Ven
2005-01-07  3:50   ` Andrew Morton
2005-01-07  4:53     ` Lukasz Kosewski [this message]
2005-01-07  4:38       ` Matthew Wilcox
2005-01-30 15:27         ` Marcelo Tosatti
2005-01-30 18:27           ` Arjan van de Ven
2005-01-30 15:57             ` Marcelo Tosatti
2005-01-07  7:36       ` Vivek Goyal
2005-01-07 14:55       ` Lukasz Kosewski
2005-01-07 14:50         ` linux-os
2005-01-07 15:44           ` Vivek Goyal
2005-01-07 16:52         ` Vivek Goyal
2005-01-07 17:36       ` Denis Vlasenko
2005-01-07  5:27     ` Vivek Goyal

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=41DE15C7.6030102@nit.ca \
    --to=lkosewsk@nit.ca \
    --cc=akpm@osdl.org \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=vgoyal@in.ibm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox