Skip to contentSkip to conversation

ymfpci bugfix

PATCH Pete Zaitcev 1 participant 1 message Dec 8, 2001

lore
Share & tools
lore
#0 lore raw

Hi, Marcelo:

In a true display of "never say never" case, here is an unanticipated bugfix for ymfpci in 2.4 (RH Bug 56977). It applies on top and/or independently from other 2.4 fixes (perhaps with offset to 41 lines).

Thanks,
-- Pete

drivers/sound/ymfpci.c +8 -5
@@ -2162,12 +2203,15 @@
 {
 	u8 cmd;
 
+	/*
+	 * In the 744, 754 only 0x01 exists, 0x02 is undefined.
+	 * It does not seem to hurt to trip both regardless of revision.
+	 */
 	pci_read_config_byte(pci, PCIR_DSXGCTRL, &cmd);
-	if (cmd & 0x03) {
-		pci_write_config_byte(pci, PCIR_DSXGCTRL, cmd & 0xfc);
-		pci_write_config_byte(pci, PCIR_DSXGCTRL, cmd | 0x03);
-		pci_write_config_byte(pci, PCIR_DSXGCTRL, cmd & 0xfc);
-	}
+	pci_write_config_byte(pci, PCIR_DSXGCTRL, cmd & 0xfc);
+	pci_write_config_byte(pci, PCIR_DSXGCTRL, cmd | 0x03);
+	pci_write_config_byte(pci, PCIR_DSXGCTRL, cmd & 0xfc);
+
 	pci_write_config_word(pci, PCIR_DSXPWRCTRL1, 0);
 	pci_write_config_word(pci, PCIR_DSXPWRCTRL2, 0);
 }