patch-2.2.19 linux/drivers/sound/trident.c

Next file: linux/drivers/sound/ymf_sb.c
Previous file: linux/drivers/sound/sound_core.c
Back to the patch index
Back to the overall index

diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.18/drivers/sound/trident.c linux/drivers/sound/trident.c
@@ -2789,7 +2789,7 @@
 	u16 w;
 	unsigned long iobase;
 	struct trident_card *card;
-
+	unsigned long flags;
 
 	iobase = pci_dev->base_address[0] & PCI_BASE_ADDRESS_IO_MASK;
 	if (check_region(iobase, 256)) {
@@ -2882,10 +2882,17 @@
 		
 			/* reset command */
 			while (inb(card->iobase + ALI_MPUR1) & 0x40);
+			
+			/* After the out the chip goes into irq jammed on
+			   mode. We have to keep irqs off until it shuts up 
+			   again */
+			save_flags(flags);
+			cli();
 			outb(0xff, card->iobase + ALI_MPUR1);
 			while (inb(card->iobase + ALI_MPUR1) & 0x80);
 			while ((inb(card->iobase + ALI_MPUR0) != 0xfe) && (inb(card->iobase+ALI_MPUR1) != 0x10)) 
 				while (inb(card->iobase + ALI_MPUR1) & 0x80);
+			restore_flags(flags);
 			
 			midi->ird = midi->iwr = midi->icnt = 0;
 		}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)