From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugtrack@alsa-project.org Subject: [ALSA - driver 0001833]: oops in snd_mpu401_uart Date: Thu, 16 Feb 2006 06:33:11 +0100 Message-ID: <6fc2f290fa0f3552890d3dd346bf36e7@bugtrack.alsa-project.org> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Return-path: Received: from bugtrack.alsa-project.org (gate.perex.cz [85.132.177.35]) by alsa.jcu.cz (ALSA's E-mail Delivery System) with ESMTP id 0A6A6160 for ; Thu, 16 Feb 2006 06:33:12 +0100 (MET) Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org A NOTE has been added to this issue. ====================================================================== ====================================================================== Reported By: ponchick Assigned To: ====================================================================== Project: ALSA - driver Issue ID: 1833 Category: GENERIC - mpu401 Reproducibility: always Severity: major Priority: normal Status: new Distribution: gentoo Kernel Version: gentoo-sources-2.6.15-r4 ====================================================================== Date Submitted: 02-09-2006 08:33 CET Last Modified: 02-16-2006 06:33 CET ====================================================================== Summary: oops in snd_mpu401_uart Description: I don't know what exactly happend but when I run wine or winecfg it segfaulted. dmesg shows following: Unable to handle kernel paging request at 0000000010228800 RIP: {:snd_mpu401_uart:mpu401_write_mmio+0} PGD 6e57067 PUD 0 Oops: 0002 [1] PREEMPT SMP CPU 1 Modules linked in: snd_rtctimer snd_seq_midi snd_pcm_oss snd_mixer_oss snd_seq_oss snd_seq_midi_event snd_seq snd_au8830 snd_ac97_codec snd_pcm snd_timer snd_page_alloc snd_ac97_bus snd_mpu401_uart snd_rawmidi snd_seq_device snd soundcore nvidia sky2 Pid: 11110, comm: wine-preloader Tainted: P 2.6.15-gentoo-r4 #1 RIP: 0010:[] {:snd_mpu401_uart:mpu401_write_mmio+0} RSP: 0018:ffff81003564f8f0 EFLAGS: 00010046 RAX: 0000000000000013 RBX: ffff81003cb4e580 RCX: 0000000000000000 RDX: 0000000010228800 RSI: 0000000000000000 RDI: ffff81003cb4e580 RBP: ffff81003eb60740 R08: 0000000000000000 R09: ffff8100279794c0 R10: 0000000000000000 R11: 0000000000000000 R12: ffff81003cb4fe00 R13: 0000000000000001 R14: ffff81003cb4e5f8 R15: 0000000000000246 FS: 000000005556c000(006b) GS:ffffffff8057b880(0063) knlGS:00000000556cb920 CS: 0010 DS: 002b ES: 002b CR0: 000000008005003b CR2: 0000000010228800 CR3: 00000000375ad000 CR4: 00000000000006e0 Process wine-preloader (pid: 11110, threadinfo ffff81003564e000, task ffff810002178440) Stack: ffffffff884ca19f ffff81003ffef500 0000000000000046 ff00000000000286 ffff81003cb4e580 ffff81003eb60740 ffff81003cb4fe00 ffff81003eb606c0 0000000000000000 ffff81003d7c3bd0 Call Trace:{:snd_mpu401_uart:snd_mpu401_uart_cmd+65} {:snd_mpu401_uart:snd_mpu401_uart_input_open+73} {:snd_rawmidi:snd_rawmidi_kernel_open+644} {:snd_seq_midi:midisynth_subscribe+53} {_spin_lock+27} {:snd_seq:subscribe_port+214} {:snd_seq:snd_seq_port_connect+433} {:snd_seq:snd_seq_ioctl_subscribe_port+226} {:snd_seq:snd_seq_kernel_client_ctl+92} {:snd_seq_oss:snd_seq_oss_midi_open+267} {:snd_seq_oss:snd_seq_oss_midi_open_all+35} {:snd_seq_oss:snd_seq_oss_open+1152} {:snd_seq_oss:snd_seq_oss_event_input+0} {:snd_seq_oss:free_devinfo+0} {__link_path_walk+3332} {__lock_text_start+20} {:snd_seq_oss:odev_open+52} {:soundcore:soundcore_open+513} {chrdev_open+454} {chrdev_open+0} {__dentry_open+310} {nameidata_to_filp+34} {filp_open+58} {get_unused_fd+234} {do_sys_open+81} {sysenter_do_call+27} Code: 40 88 32 c3 0f b6 06 0f b6 c0 c3 48 83 ec 28 4c 89 64 24 10 RIP {:snd_mpu401_uart:mpu401_write_mmio+0} RSP CR2: 0000000010228800 <6>note: wine-preloader[11110] exited with preempt_count 1 I use standalone alsa-driver (kernel one is out of date and doesn't support au8830 on 64-bit platforms) with gentoo-sources-2.6.14-r5, gentoo-sources-2.6.15-r1 and gentoo-sources-2.6.15-r4. ====================================================================== ---------------------------------------------------------------------- Raymond - 02-16-06 04:40 ---------------------------------------------------------------------- RIP {:snd_mpu401_uart:mpu401_write_mmio+0} RSP http://cvs.sourceforge.net/viewcvs.py/alsa/alsa-kernel/drivers/mpu401/mpu401_uart.c?r1=1.31&r2=1.32 mpu401_write_mmio and mpu401_read_mmio are only used by au88x0 driver. This may mean that the casting of (void _iomem *) from/to unsigned long is not correct. Can you try this to see if it works ? ( without VORTEX_MPU401_LEGACY ) aplaymidi --port=16:0 any.mid Index: alsa-driver/alsa-kernel/pci/au88x0/au88x0_mpu401.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/pci/au88x0/au88x0_mpu401.c,v retrieving revision 1.4 diff -u -r1.4 au88x0_mpu401.c --- alsa-driver/alsa-kernel/pci/au88x0/au88x0_mpu401.c 13 Jan 2006 17:16:29 -0000 1.4 +++ alsa-driver/alsa-kernel/pci/au88x0/au88x0_mpu401.c 15 Feb 2006 12:32:00 -0000 @@ -95,9 +95,8 @@ return temp; } #else - port = (unsigned long)(vortex->mmio + VORTEX_MIDI_DATA); if ((temp = - snd_mpu401_uart_new(vortex->card, 0, MPU401_HW_AUREAL, port, + snd_mpu401_uart_new(vortex->card, 0, MPU401_HW_AUREAL, VORTEX_MIDI_DATA, 1, 0, 0, &rmidi)) != 0) { hwwrite(vortex->mmio, VORTEX_CTRL, (hwread(vortex->mmio, VORTEX_CTRL) & @@ -105,7 +104,8 @@ return temp; } mpu = rmidi->private_data; - mpu->cport = (unsigned long)(vortex->mmio + VORTEX_MIDI_CMD); + mpu->private_data = vortex->mmio; + mpu->cport = VORTEX_MIDI_CMD; #endif vortex->rmidi = rmidi; return 0; Index: alsa-driver/alsa-kernel/drivers/mpu401/mpu401_uart.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/drivers/mpu401/mpu401_uart.c,v retrieving revision 1.41 diff -u -r1.41 mpu401_uart.c --- alsa-driver/alsa-kernel/drivers/mpu401/mpu401_uart.c 18 Nov 2005 18:52:14 -0000 1.41 +++ alsa-driver/alsa-kernel/drivers/mpu401/mpu401_uart.c 15 Feb 2006 12:32:59 -0000 @@ -70,12 +70,12 @@ static void mpu401_write_mmio(struct snd_mpu401 *mpu, unsigned char data, unsigned long addr) { - writeb(data, (void __iomem *)addr); + writeb(data, (void __iomem *)(mpu->private_data+addr)); } static unsigned char mpu401_read_mmio(struct snd_mpu401 *mpu, unsigned long addr) { - return readb((void __iomem *)addr); + return readb((void __iomem *)(mpu->private_data+addr)); } /* */ ---------------------------------------------------------------------- ponchick - 02-16-06 06:33 ---------------------------------------------------------------------- aplaymidi doesn't produce any sound with and without this patch. wine works fine but I think it cannot use midi too. dmesg says with patch: ALSA /var/tmp/portage/alsa-driver-1.0.11_rc3/work/alsa-driver-1.0.11rc3/drivers/mpu401/../../alsa-kernel/drivers/mpu401/mpu401_uart.c:222: cmd: 0xff failed at 0x28800 (status = 0x80, data = 0x1b) Without patch (using LEGACY): ALSA /var/tmp/portage/alsa-driver-1.0.11_rc3/work/alsa-driver-1.0.11rc3/drivers/mpu401/../../alsa-kernel/drivers/mpu401/mpu401_uart.c:222: cmd: 0xff failed at 0x330 (status = 0x80, data = 0x1b) This message appears only once on first run of aplaymidi. Next run doesn't produce any logs. Also I try wine at home with my "Monster Sound 2" (lspci output in bug 0001726) on 32-bit kernel and here is dmesg output on first run: vortex: FATAL: ResManager: resource type 0 exhausted. vortex: FATAL: ResManager: resource type 3 exhausted. ALSA /var/tmp/portage/alsa-driver-1.0.11_rc3/work/alsa-driver-1.0.11rc3/alsa-kernel/drivers/mpu401/mpu401_uart.c:222: cmd: 0xff failed at 0xfa7a8800 (status = 0x80, data = 0x92) vortex: FATAL: ResManager: resource type 0 exhausted. vortex: FATAL: ResManager: resource type 3 exhausted. On second run: vortex: FATAL: ResManager: resource type 0 exhausted. vortex: FATAL: ResManager: resource type 3 exhausted. vortex: FATAL: ResManager: resource type 0 exhausted. vortex: FATAL: ResManager: resource type 3 exhausted. I hope it can be helpful. Issue History Date Modified Username Field Change ====================================================================== 02-09-06 08:33 ponchick New Issue 02-09-06 08:33 ponchick Distribution => gentoo 02-09-06 08:33 ponchick Kernel Version => gentoo-sources-2.6.15-r4 02-09-06 09:12 Raymond Note Added: 0007971 02-09-06 09:32 Raymond Note Added: 0007973 02-09-06 11:57 ponchick Note Added: 0007975 02-09-06 12:32 Raymond Note Added: 0007976 02-09-06 12:35 Raymond Note Edited: 0007976 02-10-06 03:06 Raymond Note Added: 0007982 02-10-06 03:11 rlrevell Note Added: 0007983 02-10-06 03:49 Raymond Note Added: 0007984 02-10-06 05:08 ponchick Note Added: 0007986 02-10-06 05:36 Raymond Note Added: 0007988 02-10-06 06:03 Raymond Note Added: 0007990 02-10-06 10:09 ponchick Note Added: 0007997 02-10-06 11:30 Raymond Note Added: 0008001 02-12-06 03:32 Raymond Note Added: 0008024 02-12-06 14:14 Raymond Note Deleted: 0007990 02-13-06 07:08 Raymond Note Edited: 0008024 02-13-06 16:44 Raymond Note Edited: 0008001 02-14-06 10:41 Raymond Note Edited: 0008024 02-16-06 04:40 Raymond Note Added: 0008084 02-16-06 06:33 ponchick Note Added: 0008086 ====================================================================== ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642