linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Nicolas STRANSKY <Nico@stransky.cx>
Cc: linux-ide@vger.kernel.org
Subject: Re: IRQ problem with sata_sil
Date: Wed, 10 May 2006 13:36:48 +0900	[thread overview]
Message-ID: <44616DE0.3020008@gmail.com> (raw)
In-Reply-To: <e3n4ru$ktd$1@sea.gmane.org>

Nicolas STRANSKY wrote:
> Hi all,
> 
> I've encountered a problem when trying to use a SATA card with a Silicon
> Image SIL 3112 host controller chip. When inserting the module, the
> kernel made this error:
> 

Hello, Nicolas.

One of the most annoying problem with traditional IDE interface is that 
the controller doesn't have 'hey! I'm the needy one!' flag.  So, when an 
IRQ is raised, there is no way whether the controller is actually 
raising the interrupt or not.  libata (and probably other IDE drivers 
too) works around this by determining when to expect interrupt and 
handle the interrupt according to HSM.

Under normal circumstances, this usually works, but every now and then 
something weird happens and the controller raises IRQ that libata wasn't 
expecting, resulting in stuck IRQ and Linux IRQ layer saves its ass by 
disabling the IRQ, which is a good thing; otherwise, the whole system 
would hang completely.

In your case, the IRQ was in raised state before you loaded the module. 
  While loading the module, IRQ gets unmasked.  As libata hasn't issued 
any command yet, it isn't expecting interrupts, so it thinks the 
interrupt doesn't belong to it.  So, the stuck IRQ and your symptom.

libata is in the way of getting new EH/probing mechanism and the problem 
will be resolved.  New EH/probing does two things to prevent such things.

* freeze (mask interrupt) the port before requesting IRQ and thaw 
(unmask) only after the controller and drives are reset and in known 
good state.

* sil3112 family of controllers (and most of other modern SATA 
controllers too) actually have the needy flag.  New version of sata_sil 
will have customized IRQ handler which properly detects and handles 
unexpected/spurious interrupts.

New EH/probing will probably included in 2.6.18 but I intend to make 
patches against stable series.  So, if this problem bugs you, stay tuned.

-- 
tejun

      parent reply	other threads:[~2006-05-10  4:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-08 10:00 IRQ problem with sata_sil Nicolas STRANSKY
2006-05-08 10:19 ` Paul M.
2006-05-09  5:39   ` Nicolas STRANSKY
2006-05-10  1:11     ` jason
2006-05-10  4:36 ` Tejun Heo [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=44616DE0.3020008@gmail.com \
    --to=htejun@gmail.com \
    --cc=Nico@stransky.cx \
    --cc=linux-ide@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).