lkml.org 
[lkml]   [2000]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[Patch] Soundblaster ISAPnP quirk
Soundblaster PnP cards have a io range of 0x388 to 0x388 for their mpu
port. If two such cards are to be auto-configured in the same computer or
if 0x388 is used by something else then they will fail to auto-configure.

This patch adds an ISAPnP quirk to increase the port range. It has been
approved by the ISAPnP maintainer, Jaroslav Kysela, and tested by myself
and several others. It applys against 2.3.51 and 2.3.99-pre1.

Thank you for your time,
Paul Laufer
--- linux/drivers/pnp/quirks.c.51.virgin.c Mon Mar 13 00:49:23 2000
+++ linux/drivers/pnp/quirks.c Mon Mar 13 13:22:11 2000
@@ -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 @@
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 mtu 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 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 }
};
\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.024 / U:1.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site