public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Gunther.Mayer@t-online.de (Gunther Mayer)
To: linux-kernel@vger.kernel.org, dhinds@zen.stanford.edu
Cc: andre@linux-ide.org
Subject: Patch(2.4.5): Fix PCMCIA ATA/IDE freeze (w/ PCI add-in cards)
Date: Tue, 26 Jun 2001 22:20:38 +0200	[thread overview]
Message-ID: <3B38EE96.A6C11980@t-online.de> (raw)

Hi,

this patch fixes the hard hang (no SYSRQ) on inserting
any PCMCIA ATA/IDE card (e.g. CompactFlash, Clik40 etc)
to a PCI-Cardbus bridge add-in card.

Thanks David for his valuable explanation about what happens:
ide-probe registers it's irq handler too late! After it
triggers the interrupt during the probe the (shared) irq
loops forever, effectively wedging the machine completely.

Regards, Gunther



--- linux245.orig/drivers/ide/ide-cs.c  Fri Feb  9 20:40:02 2001
+++ linux/drivers/ide/ide-cs.c  Tue Jun 26 21:22:19 2001
@@ -324,6 +324,9 @@
     if (link->io.NumPorts2)
        release_region(link->io.BasePort2, link->io.NumPorts2);
 
+    outb(0x02, ctl_base); // Set nIEN = disable device interrupts
+                         // else it hangs on PCI-Cardbus add-in cards, wedging irq
+
     /* retry registration in case device is still spinning up */
     for (i = 0; i < 10; i++) {
        hd = ide_register(io_base, ctl_base, link->irq.AssignedIRQ);
--- linux245.orig/drivers/ide/ide-probe.c       Sun Mar 18 18:25:02 2001
+++ linux/drivers/ide/ide-probe.c       Tue Jun 26 21:25:07 2001
@@ -685,6 +685,8 @@
 #else /* !CONFIG_IDEPCI_SHARE_IRQ */
                int sa = (hwif->chipset == ide_pci) ? SA_INTERRUPT|SA_SHIRQ : SA_INTERRUPT;
 #endif /* CONFIG_IDEPCI_SHARE_IRQ */
+
+               outb(0x00, hwif->io_ports[IDE_CONTROL_OFFSET]); // clear nIEN == enable irqs
                if (ide_request_irq(hwif->irq, &ide_intr, sa, hwif->name, hwgroup)) {
                        if (!match)
                                kfree(hwgroup);

             reply	other threads:[~2001-06-26 20:28 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-26 20:20 Gunther Mayer [this message]
2001-06-27  7:29 ` Patch(2.4.5): Fix PCMCIA ATA/IDE freeze (w/ PCI add-in cards) Andre Hedrick
2001-06-27 11:25   ` Alan Cox
2001-06-27 16:54     ` Andre Hedrick
2001-06-27 17:21       ` Alan Cox
2001-06-27 20:01         ` Andre Hedrick
2001-06-27 20:51           ` Gunther Mayer
2001-06-27 21:55             ` Andre Hedrick
2001-06-28 17:21               ` Patch(2.4.5): Fix PCMCIA ATA/IDE freeze (w/ PCI add-in cards) V3 Gunther Mayer
2001-06-29  5:38                 ` Andre Hedrick
2001-06-29 18:09                   ` Patch(2.4.5): Fix PCMCIA ATA/IDE freeze (w/ PCI add-in cards)V3 Gunther Mayer
2001-06-30  8:14                     ` Andre Hedrick
2001-06-27 16:03   ` Patch(2.4.5): Fix PCMCIA ATA/IDE freeze (w/ PCI add-in cards) David Hinds
2001-06-27 16:56     ` Andre Hedrick
2001-06-27 16:23   ` Gunther Mayer
  -- strict thread matches above, loose matches on Subject: below --
2001-06-28  1:05 Andries.Brouwer
2001-06-28  3:39 ` Andre Hedrick
2001-06-30 10:05 ` Jens Axboe

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=3B38EE96.A6C11980@t-online.de \
    --to=gunther.mayer@t-online.de \
    --cc=andre@linux-ide.org \
    --cc=dhinds@zen.stanford.edu \
    --cc=linux-kernel@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