Messages in this thread Patch in this message | | | From | Daniel Stone <> | Subject | [PATCH] 2.3.27+ - SB16 without ISA PnP | Date | Sun, 14 Nov 1999 11:05:20 +1100 |
| |
I have tested this patch with : a) SB16 module, ISA PnP compiled in : OK b) SB16 module, ISA PnP not in at all : OK c) SB16 compiled-in, ISA PnP compiled in : NO d) SB16 compiled in, ISA PnP not in at all : NO
My SB16 is a standard ISA PnP ... though I've tried to dodge the Linux support for ISA PnP. I don't like it and it's constantly broken. The problem with compiling in drivers for cards like this has been around for ages. So don't blame me for starting it. I've only tested this patch on 2.3.27 with an ISA PnP SB16 ... but it should work on 2.3.28 and all the other cards supported by the SB driver.
=) d--- linux-2.3.27/drivers/sound/sb_card-orig.c Sun Nov 14 08:25:59 1999 +++ linux-2.3.27/drivers/sound/sb_card.c Sun Nov 14 09:46:17 1999 @@ -18,5 +18,7 @@ #include <linux/module.h> #include <linux/init.h> +#ifdef CONFIG_ISAPNP /* Patched so it will compile withOUT ISA PnP */ #include <linux/isapnp.h> +#endif #include "sound_config.h" @@ -141,5 +143,9 @@ int sm_games = 0; /* Mixer - see sb_mixer.c */ int acer = 0; /* Do acer notebook init */ +#ifdef CONFIG_ISAPNP +int isapnp = 1; +#else int isapnp = 0; +#endif MODULE_PARM(io, "i"); @@ -155,8 +161,11 @@ MODULE_PARM(sm_games, "i"); MODULE_PARM(esstype, "i"); +#ifdef CONFIG_ISAPNP MODULE_PARM(isapnp, "i"); +#endif void *smw_free = NULL; +#ifdef CONFIG_ISAPNP static struct { unsigned short vendor, function; char *name; } isapnp_sb_list[] __initdata = { @@ -213,4 +222,5 @@ return -ENODEV; } +#endif int init_module(void) @@ -220,41 +230,37 @@ if (mad16 == 0 && trix == 0 && pas2 == 0 && support == 0) { - if (isapnp == 1) +#ifdef CONFIG_ISAPNP + if (sb_probe_isapnp(&config, &config_mpu)<0) { - if (sb_probe_isapnp(&config, &config_mpu)<0) - { - printk(KERN_ERR "sb_card: No ISAPnP cards found\n"); - return -EINVAL; - } - } - else - { - if (io == -1 || dma == -1 || irq == -1) - { - printk(KERN_ERR "sb_card: I/O, IRQ, and DMA are mandatory\n"); - return -EINVAL; - } - config.io_base = io; - config.irq = irq; - config.dma = dma; - config.dma2 = dma16; + printk(KERN_ERR "sb_card: No ISAPnP cards found\n"); + return -EINVAL; } - config.card_subtype = type; - - if (!probe_sb(&config)) - return -ENODEV; - attach_sb_card(&config); - - if(config.slots[0]==-1) - return -ENODEV; -#ifdef CONFIG_MIDI - if (isapnp == 0) - config_mpu.io_base = mpu_io; - if (probe_sbmpu(&config_mpu)) - sbmpu = 1; - if (sbmpu) - attach_sbmpu(&config_mpu); #endif + } + if (io == -1 || dma == -1 || irq == -1) + { + printk(KERN_ERR "sb_card: I/O, IRQ, and DMA are mandatory\n"); + return -EINVAL; } + config.io_base = io; + config.irq = irq; + config.dma = dma; + config.dma2 = dma16; + config.card_subtype = type; + + if (!probe_sb(&config)) + return -ENODEV; + attach_sb_card(&config); + + if(config.slots[0]==-1) + return -ENODEV; +#ifdef CONFIG_MIDI + if (isapnp == 0) + config_mpu.io_base = mpu_io; + if (probe_sbmpu(&config_mpu)) + sbmpu = 1; + if (sbmpu) + attach_sbmpu(&config_mpu); +#endif SOUND_LOCK; return 0; | |