Subject: Small patch for SoundBlaster driver
To: None <port-i386@NetBSD.ORG>
From: Gene Hightower <gene@pactitle.com>
List: port-i386
Date: 11/14/1994 15:20:02
I added a (original old) SoundBlaster card to my system this weekend.
I configured the thing for IRQ 9, I forget what the default was, but
it wasn't 9.  Anyhow, the driver didn't think that 9 was a valid IRQ.
It seems that the 2->9 mapping confused things somewhat.  Anyhow, this
little patch fixed the problem.

If this is not the "right" thing to do, please let me know.

*** /sys/arch/i386/isa/sbreg.h.~1~      Wed Oct  5 21:04:21 1994
--- /sys/arch/i386/isa/sbreg.h  Sun Nov 13 18:08:16 1994
***************
*** 140,149 ****
   * Macros to detect valid hardware configuration data.
   */
  #ifdef SBPRO
! #define SB_IRQ_VALID(mask)  ((mask) & 0x04a4) /* IRQ 2,5,7,10 */
  #define SB_DRQ_VALID(chan)  ((chan) == 0 || (chan) == 1 || (chan) == 3)
  #else /* !SBPRO */
! #define SB_IRQ_VALID(mask)  ((mask) & 0x00ac) /* IRQ 2,3,5,7 */
  #define SB_DRQ_VALID(chan)  ((chan) == 1)
  #endif /* !SBPRO */
  #define SB_BASE_VALID(base) ((base) == 0x220 || (base) == 0x240)
--- 140,149 ----
   * Macros to detect valid hardware configuration data.
   */
  #ifdef SBPRO
! #define SB_IRQ_VALID(mask)  ((mask) & 0x6a0)  /* IRQ 5,7,9,10 */
  #define SB_DRQ_VALID(chan)  ((chan) == 0 || (chan) == 1 || (chan) == 3)
  #else /* !SBPRO */
! #define SB_IRQ_VALID(mask)  ((mask) & 0x2a8)  /* IRQ 3,5,7,9 */
  #define SB_DRQ_VALID(chan)  ((chan) == 1)
  #endif /* !SBPRO */
  #define SB_BASE_VALID(base) ((base) == 0x220 || (base) == 0x240)

-- Gene