Subject: Conflict between audioamd and nell or: how to choose an interrupt
To: None <port-sparc@NetBSD.ORG>
From: Martin Husemann <martin@duskware.de>
List: port-sparc
Date: 10/10/2002 21:10:56
Just in case anyone didn't notice yet: I'm completely unaware of any details
how SBUS works and how sparc handles interrupt priorities - so I need a
friendly soul to explain something to me:

The nell gets two interrupts assigned by the firmware. The hardware is pretty
flexible and could use both, but that requires locking in the driver or
exoses it to race conditions between the two interrupt handlers (which is
what we see with currently). So I modified the driver to only use one of the
two interrupts. This makes the driver simpler and works like a charm.

The only problem is: how do I choose which of the interrupts it should use?
I currently hard-coded the first one in the sbus attach args.

I wonder if it is worth to make this configurable (via a flags parameter)
or if one option is always preferable. Additionally I noticed this in the
FAQ:

There is a conflict between the audioamd device in sun4c and some sun4m
models and the (nell) device.

and then it is suggested to use

  options AUDIO_C_HANDLER

I didn't find any explanation for the kind of conflict and why the fastpath
handler is needed (or is it disabled?) in this configuration.

If choosing one over the other interrupt would resolve this conflict, this
should be taken into account.

Thanks,

Martin