2.2.14pre12:linuxppc modular sound patch not included

brandon (casey@eecs.tulane.edu)
Fri, 10 Dec 1999 12:52:31 -0600 (CST)


alan, cort,

this patch is needed in order for modular dmasound to
work correctly. without it the kernel would print out
an interrupt initialization error and then panic with
solid lockup if dmasound was compiled as a module.

i've been using it for a month with no problems.

i sent this to cort because your name is associated with
all of the ppc patches, i figured that if you were the ppc
maintainer then this patch should go to you.

-brandon
ps. i subscribe to kernel-digest

---------- Forwarded message ----------
Date: Sun, 14 Nov 1999 04:53:02 -0600 (CST)
From: Takashi Oe <toe@unlserve.unl.edu>
To: Jes Sorensen <Jes.Sorensen@cern.ch>
Cc: brandon <casey@eecs.tulane.edu>, linux-kernel@vger.rutgers.edu
Subject: Re: linuxppc modular sound patch

On 14 Nov 1999, Jes Sorensen wrote:

> This seems wrong:

Yes.

>
> diff -urN vger-991109/dmasound.c dmasound-991113/dmasound.c

[...]

> You are passing the same pointer as the data pointer to the interrupt
> allocation. This pointer is also used to distinguish registerred
> interrupt handlers in case multiple handlers are assigned the same
> interrupt number.

Here is a patch again with the change:

diff -urN vger-991109/dmasound.c dmasound-991113/dmasound.c
--- vger-991109/dmasound.c Fri Aug 20 21:32:41 1999
+++ dmasound-991113/dmasound.c Sun Nov 14 04:37:28 1999
@@ -3003,8 +3003,10 @@

static int __init PMacIrqInit(void)
{
- if (request_irq(awacs_irq, pmac_awacs_intr, 0, "AWACS", 0)
- || request_irq(awacs_tx_irq, pmac_awacs_tx_intr, 0, "AWACS out", 0))
+ if (request_irq(awacs_irq, pmac_awacs_intr, 0, "AWACS",
+ (void *)awacs)
+ || request_irq(awacs_tx_irq, pmac_awacs_tx_intr, 0, "AWACS out",
+ (void *)awacs_txdma))
return 0;
return 1;
}
@@ -3016,8 +3018,8 @@
out_le32(&awacs_txdma->control, RUN<<16);
/* disable interrupts from awacs interface */
out_le32(&awacs->control, in_le32(&awacs->control) & 0xfff);
- free_irq(awacs_irq, pmac_awacs_intr);
- free_irq(awacs_tx_irq, pmac_awacs_tx_intr);
+ free_irq(awacs_irq, (void *)awacs);
+ free_irq(awacs_tx_irq, (void *)awacs_txdma);
kfree(awacs_tx_cmd_space);
if (beep_buf)
kfree(beep_buf);

This patch is against 2.2.x kernel, and dmasound.c in 2.3.x would also
need a patch very similar to this.

Takashi Oe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/