2002-07-25 13:34:09

by Alan Cox

[permalink] [raw]
Subject: PATCH: 2.5.28 Fix other peoples ALSA PCI fixe

irq can be -1 if the card errors during config. synchronize_irq(-1) looks
bad

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.5.28/sound/pci/ens1370.c linux-2.5.28-ac1/sound/pci/ens1370.c
--- linux-2.5.28/sound/pci/ens1370.c Thu Jul 25 11:09:41 2002
+++ linux-2.5.28-ac1/sound/pci/ens1370.c Thu Jul 25 13:09:40 2002
@@ -1532,7 +1532,8 @@
outl(0, ES_REG(ensoniq, CONTROL)); /* switch everything off */
outl(0, ES_REG(ensoniq, SERIAL)); /* clear serial interface */
#endif
- synchronize_irq(ensoniq->irq);
+ if(ensoniq->irq >= 0)
+ synchronize_irq(ensoniq->irq);
pci_set_power_state(ensoniq->pci, 3);
__hw_end:
#ifdef CHIP1370
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.5.28/sound/pci/ice1712.c linux-2.5.28-ac1/sound/pci/ice1712.c
--- linux-2.5.28/sound/pci/ice1712.c Thu Jul 25 10:51:01 2002
+++ linux-2.5.28-ac1/sound/pci/ice1712.c Thu Jul 25 13:09:37 2002
@@ -4070,8 +4070,8 @@
/* --- */
__hw_end:
snd_ice1712_proc_done(ice);
- synchronize_irq();
if (ice->irq)
+ synchronize_irq(ice->irq);
free_irq(ice->irq, (void *) ice);
if (ice->res_port) {
release_resource(ice->res_port);
@@ -4143,7 +4143,7 @@
pci_write_config_word(ice->pci, 0x40, 0x807f);
pci_write_config_word(ice->pci, 0x42, 0x0006);
snd_ice1712_proc_init(ice);
- synchronize_irq();
+ synchronize_irq(ice->irq);

if ((ice->res_port = request_region(ice->port, 32, "ICE1712 - Controller")) == NULL) {
snd_ice1712_free(ice);
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.5.28/sound/pci/intel8x0.c linux-2.5.28-ac1/sound/pci/intel8x0.c
--- linux-2.5.28/sound/pci/intel8x0.c Thu Jul 25 11:09:41 2002
+++ linux-2.5.28-ac1/sound/pci/intel8x0.c Thu Jul 25 13:09:51 2002
@@ -1104,7 +1104,8 @@
outb(ICH_RESETREGS, ICHREG(chip, PO_CR));
outb(ICH_RESETREGS, ICHREG(chip, MC_CR));
/* --- */
- synchronize_irq(chip->irq);
+ if(chip->irq >= 0)
+ synchronize_irq(chip->irq);
__hw_end:
if (chip->bdbars)
snd_free_pci_pages(chip->pci, 3 * sizeof(u32) * ICH_MAX_FRAGS * 2, chip->bdbars, chip->bdbars_addr);


2002-07-25 14:16:08

by Athanasius

[permalink] [raw]
Subject: Re: PATCH: 2.5.28 Fix other peoples ALSA PCI fixe

On Thu, Jul 25, 2002 at 03:49:42PM +0100, Alan Cox wrote:
> diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.5.28/sound/pci/ice1712.c linux-2.5.28-ac1/sound/pci/ice1712.c
> --- linux-2.5.28/sound/pci/ice1712.c Thu Jul 25 10:51:01 2002
> +++ linux-2.5.28-ac1/sound/pci/ice1712.c Thu Jul 25 13:09:37 2002
> @@ -4070,8 +4070,8 @@
> /* --- */
> __hw_end:
> snd_ice1712_proc_done(ice);
> - synchronize_irq();
> if (ice->irq)
^^
> + synchronize_irq(ice->irq);
> free_irq(ice->irq, (void *) ice);
> if (ice->res_port) {
> release_resource(ice->res_port);

Um, need some {} on that if now ?

-Ath
--
- Athanasius = Athanasius(at)miggy.org.uk / http://www.clan-lovely.org/~athan/
Finger athan(at)fysh.org for PGP key
"And it's me who is my enemy. Me who beats me up.
Me who makes the monsters. Me who strips my confidence." Paula Cole - ME