From: Jim Paris <jim@jtan.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: [PATCH] Re: PCI IRQ problems -- update
Date: Sat, 11 Dec 2004 17:03:08 -0500 [thread overview]
Message-ID: <20041211220307.GA23848@jim.sh> (raw)
In-Reply-To: <20041211202314.GA22731@jim.sh>
> The ICH3-M datasheet says offset 0x09 is the Programming Interface
> register. Default value is 0x8A (legacy on both), value here is 0x8E
> (legacy on primary, native on secondary). This mixed-mode setting
> is noted as a disallowed combination in the datasheet.
>
> So it looks like my BIOS is screwing me. Where could/should I fix
> this up?
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?
-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.
*/
next prev parent reply other threads:[~2004-12-11 22:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-11 17:35 PCI IRQ problems -- update Jim Paris
2004-12-11 16:45 ` Alan Cox
2004-12-11 20:02 ` Jim Paris
2004-12-12 11:32 ` Alan Cox
2004-12-11 20:23 ` Jim Paris
2004-12-11 22:03 ` Jim Paris [this message]
2004-12-12 11:43 ` [PATCH] " Alan Cox
2004-12-12 11:29 ` Alan Cox
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=20041211220307.GA23848@jim.sh \
--to=jim@jtan.com \
--cc=alan@lxorguk.ukuu.org.uk \
--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