patch-2.0.19 linux/drivers/sound/sb_common.c

Next file: linux/fs/exec.c
Previous file: linux/drivers/scsi/sr.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.18/linux/drivers/sound/sb_common.c linux/drivers/sound/sb_common.c
@@ -674,9 +674,6 @@
   devc->dev = num_audiodevs;
   devc->caps = hw_config->driver_use_1;
 
-  irq2devc[hw_config->irq] = devc;
-  devc->irq_ok = 0;
-
   if (snd_set_irq_handler (hw_config->irq,
 			   sbintr, "sound blaster", devc->osp) < 0)
     {
@@ -685,6 +682,9 @@
       return;
     }
 
+  irq2devc[hw_config->irq] = devc;
+  devc->irq_ok = 0;
+
   if (devc->major == 4)
     if (!sb16_set_irq_hw (devc, devc->irq))	/* Unsupported IRQ */
       {
@@ -705,7 +705,9 @@
     }
 
 #ifndef NO_SB_IRQ_TEST
-  for (n = 0; n < 3 && devc->irq_ok == 0; n++)
+  if (devc->major != 4 || devc->minor > 11) /* Not Sb16 v4.5 or v4.11 */
+  {
+    for (n = 0; n < 3 && devc->irq_ok == 0; n++)
     if (sb_dsp_command (devc, 0xf2))	/* Cause interrupt immediately */
       {
 	int             i;
@@ -723,6 +725,7 @@
     {
       DDB (printk ("IRQ test OK (IRQ%d)\n", devc->irq));
     }
+  }
 #endif
 
   request_region (hw_config->io_base, 16, "sound blaster");

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov