Bug 33154 - something during the boot process incorrectly updates sound IRQ in modules.conf
something during the boot process incorrectly updates sound IRQ in modules.conf
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: sndconfig (Show other bugs)
7.3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-03-25 21:48 EST by Eugene Kanter
Modified: 2014-03-16 22:20 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-01-21 17:19:53 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
isapnp.conf from RedHat 7.0 from the same machine. (8.06 KB, text/plain)
2001-03-25 21:50 EST, Eugene Kanter
no flags Details
/proc/isapnp - looks horrible.... (2.62 KB, text/plain)
2001-03-26 08:09 EST, Eugene Kanter
no flags Details

  None (edit)
Description Eugene Kanter 2001-03-25 21:48:34 EST
here is what gets put in by default:

options mad16 io=0x530 irq=5 dma=0 dma16=0 mpu_io=0x300 mpu_irq=5 joystick=1

Note two irq=5 and two dma=0. If I fix it by hand sound works but next
reboot modules.conf goes back to incorrect values. grepping as much as I
could think related to the boot process I still was not able to find what
causes the incorrect values to persist.

I am not even sure that initscripts has anything to do with this.
Comment 1 Eugene Kanter 2001-03-25 21:50:30 EST
Created attachment 13609 [details]
isapnp.conf from RedHat 7.0 from the same machine.
Comment 2 Bill Nottingham 2001-03-25 21:59:27 EST
What does /proc/isapnp look like on your machine?
Comment 3 Eugene Kanter 2001-03-26 08:09:43 EST
Created attachment 13666 [details]
/proc/isapnp - looks horrible....
Comment 4 Bill Nottingham 2001-03-26 11:19:01 EST
Something is seriously screwed up there. Have you run the userspace
isapnp tools since you booted?
Comment 5 Eugene Kanter 2001-03-26 11:53:06 EST
Nothing except for sndconfig from the same disk (which failed). Should I just 
scrap and reinstall the latest (qa0322)? Is there a way to clean things up?
Comment 6 Bill Nottingham 2001-03-26 12:03:52 EST
Does it persist if you comment out the call to sndconfig in rc.sysinit
and reboot?

What does /proc/interrupts and /proc/ioports say?
Comment 7 Eugene Kanter 2001-03-26 12:55:11 EST
scenario 1: normal boot, unload all sound modules

rmmod opl3 mad16 ad1848 sb_lib uart401 sound soundcore

edit /etc/modules.conf:

alias sound-slot-0 mad16
post-install sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -L
pre-remove sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -S
options sound dmabuf=1
alias synth0 opl3
options opl3 io=0x388
options sb support=1
options mad16 io=0x530 irq=5 dma=0 dma16=1 mpu_io=0x300 mpu_irq=9 joystick=1
Comment 8 Bill Nottingham 2001-03-26 12:57:29 EST
No, I meant does /proc/isapnp look the same?
Comment 9 Eugene Kanter 2001-03-26 13:05:35 EST
continue from previous earlier-then-expected submission:

starting to play sound and midi causes autoload of modules and everything plays 
just fine.

scenario 2:

leave correct modules.conf, comment out sndconf from rc.sysinit, reboot.
results: modules.conf stays unchanged, but no sound module can be loaded at all.

# modprobe mad16
/lib/modules/2.4.2-0.1.28/kernel/drivers/sound/mad16.o: init_module: No such 
device
Hint: insmod errors can be caused by incorrect module parameters, including 
invalid IO or IRQ parameters
/lib/modules/2.4.2-0.1.28/kernel/drivers/sound/mad16.o: 
insmod /lib/modules/2.4.2-0.1.28/kernel/drivers/sound/mad16.o failed
/lib/modules/2.4.2-0.1.28/kernel/drivers/sound/mad16.o: insmod mad16 failed


Here are files at the end of scenario 2:

# cat /proc/interrupts
           CPU0
  0:      60876          XT-PIC  timer
  1:          4          XT-PIC  keyboard
  2:          0          XT-PIC  cascade
  8:          1          XT-PIC  rtc
 11:       6901          XT-PIC  aic7xxx, aic7xxx, usb-uhci, eth0
 12:         23          XT-PIC  PS/2 Mouse
 15:          2          XT-PIC  ide1
NMI:          0
ERR:          0

# cat /proc/ioports
0000-001f : dma1
0020-003f : pic1
0040-005f : timer
0060-006f : keyboard
0070-007f : rtc
0080-008f : dma page reg
00a0-00bf : pic2
00c0-00df : dma2
00f0-00ff : fpu
0170-0177 : ide1
0213-0213 : isapnp read
02f8-02ff : serial(auto)
0376-0376 : ide1
03c0-03df : vga+
03f8-03ff : serial(auto)
0a79-0a79 : isapnp write
0cf8-0cff : PCI conf1
4000-40ff : VIA Technologies, Inc. VT82C586B ACPI
c000-cfff : PCI Bus #01
  c000-c0ff : ATI Technologies Inc Rage 128 PF
d000-d00f : VIA Technologies, Inc. Bus Master IDE
  d000-d007 : ide0
  d008-d00f : ide1
d400-d41f : VIA Technologies, Inc. UHCI USB
  d400-d41f : usb-uhci
d800-d8ff : Adaptec AIC-7881U
  d800-d8fe : aic7xxx
dc00-dcff : Adaptec AHA-294x / AIC-7871
  dc00-dcfe : aic7xxx
e000-e0ff : Realtek Semiconductor Co., Ltd. RTL-8139
  e000-e0ff : eth0

# cat /proc/isapnp
Card 1 'OPT0931:OPTi Audio 16' PnP version 1.0
  Logical device 0 'OPTffff:AUX0'
    Device is not active
  Logical device 1 'OPT9310:OPTi Audio 16'
    Device is not active
    Active port ,0xe00
    Resources 0
      Priority acceptable
      Port 0x534-0x608, align 0x3, size 0x4, 16-bit address decoding
      Port 0x380-0x3f0, align 0xf, size 0xc, 16-bit address decoding
      Port 0x220-0x240, align 0x1f, size 0x10, 16-bit address decoding
      Port 0xe0c-0xffc, align 0x3, size 0x4, 16-bit address decoding
      IRQ 5,7,10 High-Edge
      DMA 0,1,3 8-bit byte-count type-A
      DMA 0,1,3 8-bit byte-count type-A
      Alternate resources 0:1
        Priority acceptable
        Port 0x534-0xff0, align 0x3, size 0x4, 16-bit address decoding
        Port 0x380-0x3f0, align 0xf, size 0xc, 16-bit address decoding
        Port 0x220-0x240, align 0x1f, size 0x10, 16-bit address decoding
        Port 0xe0c-0xffc, align 0x3, size 0x4, 16-bit address decoding
        IRQ 5,7,2/9,10,11 High-Edge
        DMA 0,1,3 8-bit byte-count type-A
        DMA 0,1,3 8-bit byte-count type-A
      Alternate resources 0:2
        Priority acceptable
        Port 0x534-0xff0, align 0x3, size 0x4, 16-bit address decoding
        Port 0x380-0x3f0, align 0xf, size 0xc, 16-bit address decoding
        Port 0x220-0x240, align 0x1f, size 0x10, 16-bit address decoding
        Port 0xe0c-0xffc, align 0x3, size 0x4, 16-bit address decoding
        IRQ 5,7,2/9,10,11 High-Edge
        DMA 0,1,3 8-bit byte-count type-A
  Logical device 2 'OPT0001:Game Port'
    Device is not active
    Resources 0
      Priority preferred
      Port 0x200-0x20f, align 0x0, size 0x1, 16-bit address decoding
  Logical device 3 'OPT0002:MPU401'
    Device is not active
    Resources 0
      Priority preferred
      Port 0x300-0x360, align 0xf, size 0x2, 16-bit address decoding
      IRQ 5,7,2/9,10,11 High-Edge
Comment 10 Eugene Kanter 2001-03-26 21:47:39 EST
one more anomaly observed:

# cat /dev/sndstat
cat: /dev/sndstat: No such device

# tail -f /var/log/messages
Mar 26 21:43:47 xxx modprobe: modprobe: Can't locate module sound-service-0-6
Comment 11 Bill Nottingham 2001-04-03 00:34:22 EDT
/dev/sndstat doesn't exist in 2.4.
Comment 12 Eugene Kanter 2001-04-03 09:44:07 EDT
if /dev/sndstat does not exists in 2.4 what is the replacement?
Comment 13 Eugene Kanter 2001-04-03 09:46:27 EDT
No changes in QA0401. Sound irqs and dmas still assigned incorrectly.
Comment 14 Bill Nottingham 2001-04-03 11:49:04 EDT
Nothing replaces /dev/sndstat. It's obsolete.
Comment 15 Bill Nottingham 2001-04-03 11:51:58 EDT
Again, does in this situation (when the device is not active) running
sndconfig --mungepnp result in the /proc/isapnp having all 0xffff?
Comment 16 Eugene Kanter 2001-04-03 15:24:09 EDT
That is correct. After clean install of qa0401 I have

alias sound-slot-0 mad16
post-install sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -L >/dev/null 
2>&1 || :
pre-remove sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -S >/dev/null 2>&1 
|| :
options sound dmabuf=1
alias synth0 opl3
options opl3 io=0x388
options sb support=1
options mad16 io=0x530 irq=5 dma=0 dma16=0 mpu_io=0x300 mpu_irq=5 joystick=1

and a huge number (probably all of them) 0xffffs and 255s in /proc/isapnp

As we experimented before, commenting out sndcofig from the rc.sysinit and 
running it manually later results in no 0xffffs but still mostly incorrect 
irq's assigned in modules.conf.
Comment 17 Bill Nottingham 2001-04-03 15:26:08 EDT
Are there any messages from the isapnp driver in dmesg?
Comment 18 Eugene Kanter 2001-04-03 16:05:21 EDT
# dmesg | grep -i isa
PCI: Disabled enhanced CPU to PCI posting #2
Activating ISA DMA hang workarounds.
isapnp: Scanning for PnP cards...
isapnp: Card 'OPTi Audio 16'
isapnp: 1 Plug & Play card detected total
Serial driver version 5.02 (2000-08-09) with MANY_PORTS MULTIPORT SHARE_IRQ 
SERIAL_PCI ISAPNP enabled
scsi0 : Adaptec AHA274x/284x/294x (EISA/VLB/PCI-Fast SCSI) 5.2.4/5.2.0
scsi1 : Adaptec AHA274x/284x/294x (EISA/VLB/PCI-Fast SCSI) 5.2.4/5.2.0
CDROM Disabled.

I just repeated the tests: disabling sndconfig in rc.sysinit and running it 
later by hand results in the same 0xffffs and 255s in /proc/isapnp as after 
original clean install of QA0401. sndconfig --mungepnp adds no output to dmesg.
Comment 19 Bill Nottingham 2001-04-03 16:13:48 EDT
Assigning to kernel. sndconfig is merely telling the kernel's isapnp code
to autoconfigre it, and something there is going quite wrong...
Comment 20 Eugene Kanter 2001-07-07 21:46:24 EDT
I think I found at least ONE bug in kudzu code.

sndconfig.c:1549 calls isapnpActivate which is in kudzu isapnp.c

here is the backtrace
(gdb) where
#0  isapnpActivate (dev=0xbffff468) at isapnp.c:430
#1  0x0804d92f in mungeisapnp (set=0xbffff510, devs=0x80e04c0) at sndconfig.c:1549
#2  0x0804ec8e in main (argc=2, argv=0xbffffa54) at sndconfig.c:2001
#3  0x4003d0be in __libc_start_main (main=0x804dba0 <main>, argc=2,
ubp_av=0xbffffa54, init=0x8049990 <_init>, fini=0x806ebb0 <_fini>,
rtld_fini=0x4000bb08 <_dl_fini>, stack_end=0xbffffa4c) at
../sysdeps/generic/libc-start.c:129


after isapnp.c:425

newdev = (struct isapnpDevice *)isapnpProbe(CLASS_UNSPEC, PROBE_ALL, NULL);

newdev contains incorrectl list of devices. The last struct device contains
corrupted meaniless entries.

(gdb) print * newdev
$3 = {next = 0x11, index = 1852534389, class = 7239535, bus = BUS_UNSPEC, device
= 0x11 <Address 0x11 out of bounds>, driver = 0x6654504f <Address 0x6654504f out
of bounds>, desc = 0x666666 <Address 0x666666 out of bounds>, detached = 0,
newDevice = 0x11, freeDevice = 0x3164616d, writeDevice = 0x40140036
<nbits.0+22>, compareDevice = 0x10, deviceId = 0x19 <Address 0x19 out of
bounds>, pdeviceId = 0x6954504f <Address 0x6954504f out of bounds>, compat =
0x64754120 <Address 0x64754120 out of bounds>, native = 824209257, active =
1430338102, cardnum = 12376, logdev = 97, io = 0x80e1d60, irq = 0x0, dma = 0x5,
mem = 0x800}

no wonder pretty much everything after this could be invalid.

The current state of /proc/isapnp is attached.
Comment 21 Eugene Kanter 2001-07-07 21:56:22 EDT
adding attachment failed. despite the specified description it says that no
description provided. bug in bugzilla?
here is the /proc/isapnp, break in isapnp.c:427, running sndconfig --mungepnp.
isapnpProbe returns bad newdev list. By this time only one device was activated.

# cat /proc/isapnp 
Card 1 'OPT0931:OPTi Audio 16' PnP version 1.0
  Logical device 0 'OPTffff:AUX0'
    Device is active
  Logical device 1 'OPT9310:OPTi Audio 16'
    Device is not active
    Active port ,0xe00
    Resources 0
      Priority acceptable
      Port 0x534-0x608, align 0x3, size 0x4, 16-bit address decoding
      Port 0x380-0x3f0, align 0xf, size 0xc, 16-bit address decoding
      Port 0x220-0x240, align 0x1f, size 0x10, 16-bit address decoding
      Port 0xe0c-0xffc, align 0x3, size 0x4, 16-bit address decoding
      IRQ 5,7,10 High-Edge
      DMA 0,1,3 8-bit byte-count type-A
      DMA 0,1,3 8-bit byte-count type-A
      Alternate resources 0:1
        Priority acceptable
        Port 0x534-0xff0, align 0x3, size 0x4, 16-bit address decoding
        Port 0x380-0x3f0, align 0xf, size 0xc, 16-bit address decoding
        Port 0x220-0x240, align 0x1f, size 0x10, 16-bit address decoding
        Port 0xe0c-0xffc, align 0x3, size 0x4, 16-bit address decoding
        IRQ 5,7,2/9,10,11 High-Edge
        DMA 0,1,3 8-bit byte-count type-A
        DMA 0,1,3 8-bit byte-count type-A
      Alternate resources 0:2
        Priority acceptable
        Port 0x534-0xff0, align 0x3, size 0x4, 16-bit address decoding
        Port 0x380-0x3f0, align 0xf, size 0xc, 16-bit address decoding
        Port 0x220-0x240, align 0x1f, size 0x10, 16-bit address decoding
        Port 0xe0c-0xffc, align 0x3, size 0x4, 16-bit address decoding
        IRQ 5,7,2/9,10,11 High-Edge
        DMA 0,1,3 8-bit byte-count type-A
  Logical device 2 'OPT0001:Game Port'
    Device is not active
    Resources 0
      Priority preferred
      Port 0x200-0x20f, align 0x0, size 0x1, 16-bit address decoding
  Logical device 3 'OPT0002:MPU401'
    Device is not active
    Resources 0
      Priority preferred
      Port 0x300-0x360, align 0xf, size 0x2, 16-bit address decoding
      IRQ 5,7,2/9,10,11 High-Edge

Comment 22 Eugene Kanter 2001-07-07 22:41:59 EDT
Ok, I guess previous claim about corrupted newdev can be disregarded. I can not
duplicate it anymore.
However I think I found the real reason. If you look closely at /proc/isapnp
you see that there is some funny empty logical device 0. Real sound device is
number 1. It seems to me that code in sndconfig.c starting with 1552 hadcoded
to assume that logical device 0 is primary sound device. In my case when
device 0 is nothing the whole thing breaks, since swich statement for logical
device 1 does not copy irqs at all. That is why I get duplicate irqs,
taken from previous parse of mpu401 entries. Having my /proc/isapnp it is very
easy for you to duplicate cituation, since kudzu fuction isapnpProbe checks
for ./isapnp before /proc/isapnp - debug purposes?
Comment 23 Bill Nottingham 2001-07-09 00:57:40 EDT
Yup. I'll have to dig out the MAD16 card we have here to see if the logical device
layout is the same. If it's not, we have an ugly problem.

(The solution, of course, is to generate a full listing of all mad16 cards,
and put the isapnp support in the driver. :) )
Comment 24 Bill Nottingham 2005-01-21 17:19:53 EST
sndconfig is no longer developed, and this release has reached end-of-life.
Closing out old bugs.

Note You need to log in before you can comment on or make changes to this bug.