lkml.org 
[lkml]   [1998]   [Dec]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [2.1.132] Modularized sound oops, OPL3-SA1
    The pas2 has the same problem.  I fixed it with the following code (which
    you should be able to apply with a few modifications to opl3):

    void unload_pas(struct address_info *hw_config)
    {
    free_irq(hw_config->irq, NULL);
    sound_free_dma(hw_config->dma);
    release_region(hw_config->io_base, 4);
    sound_unload_mixerdev(audio_devs[pas_audiodev]->mixer_dev);
    sound_unload_mididev(pas2_midi_dev);
    sound_unload_audiodev(pas_audiodev);
    }

    the sound_unload calls decrement the usage for soundcore. I inserted them
    for the pas2 and now it unloads properly. (Making testing patches on the
    driver MUCH easier!) release_region releases i/o portspace, and free_irq
    and free_dma should be self-explanatory.

    drivers/sound/opl3sa.c should have a similar function to unload_pas...

    good luck!

    On Thu, 24 Dec 1998, Chris Noe wrote:

    >
    > Linux iniquity 2.1.132 #112 Thu Dec 24 00:40:38 MST 1998 i586 unknown
    >
    > With a modularized opl3sa1 sound card setup, it looks like soundcore.o's
    > MOD_USE_COUNT is never fully decremented, even when all it's child modules
    > are (auto or manually) unloaded, and the next attempt at autoloading the
    > sound modules causes an oops.
    >
    > Relevant /etc/conf.modules:
    > ---------------------------
    > alias block-major-14 sound
    > alias sound opl3sa
    > post-install opl3sa /usr/local/bin/aumix -m 0 -x 0 -w 70 -s 32 -i 4 -c 20
    > options opl3sa io=0x530 irq=11 dma=0 dma2=1 mpu_io=0x330 mpu_irq=5
    > options opl3 io=0x388
    >
    > Relevant .config:
    > -----------------
    > CONFIG_MODULES=y
    > CONFIG_MODVERSIONS=y
    > CONFIG_KMOD=y
    > #
    > # Sound
    > #
    > CONFIG_SOUND=m
    > CONFIG_SOUND_OSS=m
    > CONFIG_SOUND_OPL3SA1=m
    > CONFIG_SOUND_SOFTOSS=m
    > CONFIG_SOUND_YM3812=m
    > CONFIG_SOUND_VMIDI=m
    >
    > Script started on Thu Dec 24 20:29:05 1998
    > iniquity:~# lsmod
    > Module Size Used by
    > isofs 17544 1 (autoclean)
    > ide-cd 20340 1 (autoclean)
    > cdrom 11180 0 (autoclean) [ide-cd]
    > opl3sa 1944 0 (autoclean)
    > uart401 5624 0 (autoclean) [opl3sa]
    > ad1848 14220 0 (autoclean) [opl3sa]
    > sound 56152 0 (autoclean) [opl3sa uart401 ad1848]
    > soundcore 1948 6 (autoclean) [sound]
    > nls_iso8859-1 2016 2 (autoclean)
    > nls_cp437 3540 1 (autoclean)
    > vfat 13652 1 (autoclean)
    > fat 24472 1 (autoclean) [vfat]
    > iniquity:~# rmmod -a
    > iniquity:~# rmmod -a
    > iniquity:~# lsmod
    > Module Size Used by
    > isofs 17544 1 (autoclean)
    > ide-cd 20340 1 (autoclean)
    > cdrom 11180 0 (autoclean) [ide-cd]
    > soundcore 1948 1 (autoclean)
    > nls_iso8859-1 2016 2 (autoclean)
    > nls_cp437 3540 1 (autoclean)
    > vfat 13652 1 (autoclean)
    > fat 24472 1 (autoclean) [vfat]
    > iniquity:~# echo "" >/dev/dsp
    > (oopsen below)
    >
    > Unable to handle kernel paging request at virtual address c382916c
    > current->tss.cr3 = 02652000, %cr3 = 02652000
    > *pde = 0009c063
    > Oops: 0000
    > CPU: 0
    > EIP: 0010:[<c381b2a2>]
    > EFLAGS: 00010246
    > eax: c3829150 ebx: c26db840 ecx: 00000003 edx: 00000003
    > esi: c01ab860 edi: c01ab860 ebp: c263d8a0 esp: c2655f54
    > ds: 0018 es: 0018 ss: 0018
    > Process bash (pid: 95, process nr: 13, stackpage=c2655000)
    > Stack: c0123e5e c01ab860 c26db840 c26db840 00000000 c01ab860 c0122bfb c01ab860
    > c26db840 00000003 00000003 c25d4000 000001b6 c0122c81 c25d4000 00000241
    > 0122d8d c25d4000 00000241 000001b6 00000003 c2654000
    > Call Trace: [<c0123e5e>] [<c0122bfb>] [<c0122c81>] [<c0122d8d>] [<c0108804>]
    > Code: 8b 40 1c 85 c0 74 0b 53 56 ff d0 83 c4 08 5b 5e c3 90 31 c0
    > Warning: trailing garbage ignored on Code: line
    > Text: 'Code: 8b 40 1c 85 c0 74 0b 53 56 ff d0 83 c4 08 5b 5e c3 90 31 c0'
    > Garbage: 'c0'
    >
    > >>EIP: c381b2a2 <soundcore_open+42/6c>
    > Trace: c0123e5e <chrdev_open+3e/4c>
    > Trace: c0122bfb <filp_open+af/11c>
    > Trace: c0122c81 <do_open+19/44>
    > Trace: c0122d8d <sys_open+39/68>
    > Trace: c0108804 <system_call+34/40>
    > Code: c381b2a2 <soundcore_open+42/6c> 00000000 <_EIP>:
    > Code: c381b2a2 <soundcore_open+42/6c> 0: 8b 40 1c movl 0x1c(%eax),%eax
    > Code: c381b2a5 <soundcore_open+45/6c> 3: 85 c0 testl %eax,%eax
    > Code: c381b2a7 <soundcore_open+47/6c> 5: 74 0b je 12 <_EIP+0x12> c381b2b4 <soundcore_open+54/6c>
    > Code: c381b2a9 <soundcore_open+49/6c> 7: 53 pushl %ebx
    > Code: c381b2aa <soundcore_open+4a/6c> 8: 56 pushl %esi
    > Code: c381b2ab <soundcore_open+4b/6c> 9: ff d0 call *%eax
    > Code: c381b2ad <soundcore_open+4d/6c> b: 83 c4 08 addl $0x8,%esp
    > Code: c381b2b0 <soundcore_open+50/6c> e: 5b popl %ebx
    > Code: c381b2b1 <soundcore_open+51/6c> f: 5e popl %esi
    > Code: c381b2b2 <soundcore_open+52/6c> 10: c3 ret
    > Code: c381b2b3 <soundcore_open+53/6c> 11: 90 nop
    > Code: c381b2b4 <soundcore_open+54/6c> 12: 31 00 xorl %eax,(%eax)
    > Code: c381b2b6 <soundcore_open+56/6c> 14:
    >
    > The same behavior occurs when all the appropriate modules are loaded by
    > hand: modprobe opl3sa io=xxx irq=xxx, etc. (i.e. soundcore.o never
    > unloads, next access oopses)
    >
    > Bummer, it stinks to find stuff like this so close to 2.2 :(
    >
    > Chris Noe
    > (stiker@northlink.com)
    >
    > --
    > ---------------------------------------------------------
    > #!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
    > $/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
    > lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)
    > ---- http://online.offshore.com.ai/arms-trafficker/ -----
    >
    >
    > -
    > 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/
    >

    -- Bob

    Bob McElrath (mcelrath@draal.physics.wisc.edu) Univ. of Wisconsin at Madison


    -
    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/

    \
     
     \ /
      Last update: 2005-03-22 13:46    [W:0.028 / U:0.748 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site