summaryrefslogtreecommitdiffstats
path: root/drivers/pnp
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-03-23 02:25:38 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-03-23 02:25:38 +0000
commit16b5d462f73eb29d1f67fa01cc1ea66afdc72569 (patch)
tree5407bd573f4840e473ea27cbe61e5c7a07131fcd /drivers/pnp
parentce8a076e11e7e5ee36007f9a3eee5bb3744cb8f6 (diff)
Merge with Linux 2.3.99-pre2.
Diffstat (limited to 'drivers/pnp')
-rw-r--r--drivers/pnp/quirks.c51
1 files changed, 49 insertions, 2 deletions
diff --git a/drivers/pnp/quirks.c b/drivers/pnp/quirks.c
index 12a82eba5..02766fa0d 100644
--- a/drivers/pnp/quirks.c
+++ b/drivers/pnp/quirks.c
@@ -18,7 +18,6 @@
#include <linux/isapnp.h>
#include <linux/string.h>
-
static void __init quirk_awe32_resources(struct pci_dev *dev)
{
struct isapnp_port *port, *port2, *port3;
@@ -67,6 +66,37 @@ static void __init quirk_cmi8330_resources(struct pci_dev *dev)
printk(KERN_INFO "isapnp: CMI8330 quirk - fixing interrupts and dma\n");
}
+static void __init quirk_sb16audio_resources(struct pci_dev *dev)
+{
+ struct isapnp_port *port;
+ struct isapnp_resources *res = dev->sysdata;
+ int changed = 0;
+
+ /*
+ * The default range on the mpu port for these devices is 0x388-0x388.
+ * Here we increase that range so that two such cards can be
+ * auto-configured.
+ */
+
+ for( ; res ; res = res->alt ) {
+ port = res->port;
+ if(!port)
+ continue;
+ port = port->next;
+ if(!port)
+ continue;
+ port = port->next;
+ if(!port)
+ continue;
+ if(port->min != port->max)
+ continue;
+ port->max += 0x70;
+ changed = 1;
+ }
+ if(changed)
+ printk(KERN_INFO "ISAPnP: SB audio device quirk - increasing port range\n");
+ return;
+}
/*
* ISAPnP Quirks
@@ -74,14 +104,31 @@ static void __init quirk_cmi8330_resources(struct pci_dev *dev)
*/
static struct isapnp_fixup isapnp_fixups[] __initdata = {
+ /* Soundblaster awe io port quirk */
{ ISAPNP_VENDOR('C','T','L'), ISAPNP_DEVICE(0x0021),
quirk_awe32_resources },
{ ISAPNP_VENDOR('C','T','L'), ISAPNP_DEVICE(0x0022),
quirk_awe32_resources },
{ ISAPNP_VENDOR('C','T','L'), ISAPNP_DEVICE(0x0023),
quirk_awe32_resources },
- { ISAPNP_VENDOR('@','X','@'), ISAPNP_DEVICE(0x0001), // CMI8330
+ /* CMI 8330 interrupt and dma fix */
+ { ISAPNP_VENDOR('@','X','@'), ISAPNP_DEVICE(0x0001),
quirk_cmi8330_resources },
+ /* Soundblaster audio device io port range quirk */
+ { ISAPNP_VENDOR('C','T','L'), ISAPNP_DEVICE(0x0001),
+ quirk_sb16audio_resources },
+ { ISAPNP_VENDOR('C','T','L'), ISAPNP_DEVICE(0x0031),
+ quirk_sb16audio_resources },
+ { ISAPNP_VENDOR('C','T','L'), ISAPNP_DEVICE(0x0041),
+ quirk_sb16audio_resources },
+ { ISAPNP_VENDOR('C','T','L'), ISAPNP_DEVICE(0x0042),
+ quirk_sb16audio_resources },
+ { ISAPNP_VENDOR('C','T','L'), ISAPNP_DEVICE(0x0043),
+ quirk_sb16audio_resources },
+ { ISAPNP_VENDOR('C','T','L'), ISAPNP_DEVICE(0x0044),
+ quirk_sb16audio_resources },
+ { ISAPNP_VENDOR('C','T','L'), ISAPNP_DEVICE(0x0045),
+ quirk_sb16audio_resources },
{ 0 }
};