* Re: [PATCH] Re: PCI IRQ problems -- update
[not found] ` <1102851831.1371.23.camel@localhost.localdomain>
@ 2004-12-16 11:16 ` Jim Paris
2005-01-07 2:22 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 2+ messages in thread
From: Jim Paris @ 2004-12-16 11:16 UTC (permalink / raw)
To: Alan Cox; +Cc: Linux IDE
Alan Cox wrote:
> > I added a quirk for this case. This is against 2.6.10-rc3, and it
> > makes all of my problems go away cleanly. Is this reasonable?
>
> I think so. You might want to send a copy to linux-ide@vger.kernel.org
> so that Bartlomiej doesn't miss it.
Alan, thanks for the help.
Bartlomiej: I have an ICH3-M controller on my laptop. The BIOS is
leaving the prog-if as 0x8E (primary = legacy, secondary = native).
When the PCI interrupt is routed (either in the IDE driver's
pci_enable_device, or earlier if pci=routeirq is used), unhandled
interrupts cause IRQ 9 to be disabled, breaking most of my other
hardware. This seems to be caused by having the nonexistant secondary
interface set to native mode. According to the datasheet I checked,
having different modes for primary/secondary is not an allowed
combination anyway, so the following PCI quirk checks for this case
and forces both interfaces to legacy if true.
It may make sense to make this more generic (this problem may affect
other PCI IDs as well), or it may be better solved in the IDE driver,
at least when pci=routeirq is not used. But the following patch does
work well for me.
-jim
--- a/drivers/pci/quirks.c 2004-12-10 19:18:50.000000000 -0500
+++ b/drivers/pci/quirks.c 2004-12-11 16:32:41.000000000 -0500
@@ -717,6 +717,26 @@
}
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB5IDE, quirk_svwks_csb5ide );
+/*
+ * Intel 82801CAM ICH3-M datasheet says IDE modes must be the same
+ */
+static void __init quirk_ide_samemode(struct pci_dev *pdev)
+{
+ u8 prog;
+ pci_read_config_byte(pdev, PCI_CLASS_PROG, &prog);
+ if ( ((prog & 1) && !(prog & 4)) || ((prog & 4) && !(prog & 1)) )
+ {
+ printk(KERN_INFO
+ "PCI: IDE mode mismatch; forcing legacy mode\n");
+ prog &= ~5;
+ pdev->class &= ~5;
+ pci_write_config_byte(pdev, PCI_CLASS_PROG, prog);
+ /* need to re-assign BARs for compat mode */
+ quirk_ide_bases(pdev);
+ }
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_10, quirk_ide_samemode);
+
/* This was originally an Alpha specific thing, but it really fits here.
* The i82375 PCI/EISA bridge appears as non-classified. Fix that.
*/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Re: PCI IRQ problems -- update
2004-12-16 11:16 ` [PATCH] Re: PCI IRQ problems -- update Jim Paris
@ 2005-01-07 2:22 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2005-01-07 2:22 UTC (permalink / raw)
To: Jim Paris; +Cc: Alan Cox, Linux IDE
On Thu, 16 Dec 2004 06:16:56 -0500, Jim Paris <jim@jtan.com> wrote:
> Alan Cox wrote:
> > > I added a quirk for this case. This is against 2.6.10-rc3, and it
> > > makes all of my problems go away cleanly. Is this reasonable?
> >
> > I think so. You might want to send a copy to linux-ide@vger.kernel.org
> > so that Bartlomiej doesn't miss it.
Bart of course missed it, applied now
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-01-07 2:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20041211173538.GA21216@jim.sh>
[not found] ` <1102783555.7267.37.camel@localhost.localdomain>
[not found] ` <20041211202314.GA22731@jim.sh>
[not found] ` <20041211220307.GA23848@jim.sh>
[not found] ` <1102851831.1371.23.camel@localhost.localdomain>
2004-12-16 11:16 ` [PATCH] Re: PCI IRQ problems -- update Jim Paris
2005-01-07 2:22 ` Bartlomiej Zolnierkiewicz
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).