From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262195AbVFUQeE (ORCPT ); Tue, 21 Jun 2005 12:34:04 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262194AbVFUQda (ORCPT ); Tue, 21 Jun 2005 12:33:30 -0400 Received: from mail.suse.de ([195.135.220.2]:5601 "EHLO mx1.suse.de") by vger.kernel.org with ESMTP id S262180AbVFUQ15 (ORCPT ); Tue, 21 Jun 2005 12:27:57 -0400 Date: Tue, 21 Jun 2005 18:27:54 +0200 Message-ID: From: Takashi Iwai To: Brice Goglin Cc: Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: 2.6.12-mm1 In-Reply-To: <42B80AB5.7090506@ens-lyon.org> References: <20050619233029.45dd66b8.akpm@osdl.org> <42B6777F.2050008@ens-lyon.org> <42B80AB5.7090506@ens-lyon.org> User-Agent: Wanderlust/2.12.0 (Your Wildest Dreams) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 MULE XEmacs/21.5 (beta18) (chestnut) (+CVS-20041021) (i386-suse-linux) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org At Tue, 21 Jun 2005 14:40:21 +0200, Brice Goglin wrote: > > Brice Goglin a écrit : > > Hi Andrew, > > > > I got this oops during boot. > > I copied it by hand since my machine crashed soon after (because of yenta). > > It doesn't occur when snd_maestro3 is skipped by discover. > > > > divide error: 0000 [#1] > > PREEMPT > > ... > > CPU: 0 > > EIP: 0060:[] Not tainted VLI > > EFLAGS: 00000282 (2.6.12-mm1=LoulousMobiles) > > EIP is at and_m3_enable_ints+0x1f/0x40 [snd_maestro3] > > eax: 00000050 ebx: 00002400 ecx: 00000050 edx: 00002418 > > esi: 00002418 edi: 00000000 ebp: 000000f0 esp: e6f5ce54 > > ds: 007b es: 007b ss: 0068 > > Process modprobe (pid: 2405, threadinfo=e6f5c000, task=e7a31570) > > ... > > Call trace: > > snd_m3_create+0x303/0x405 [snd_maestro3] > > The problem comes from git-alsa.patch. > Adding HV_INT_ENABLE to outw in snd_m3_enable_ints (in > sound/pci/maestro3.c) makes it generate a divide error > on my laptop. > > The attached patch reverts this and fixes my problem. > > Signed-off-by: Brice Goglin Well, this disables the h/w volume controls completely, so it's not a generic solution. Does the patch below have any improvement? Takashi --- linux/sound/pci/maestro3.c 20 May 2005 17:39:26 -0000 1.80 +++ linux/sound/pci/maestro3.c 21 Jun 2005 16:26:19 -0000 @@ -1050,11 +1050,6 @@ * lowlevel functions */ -#define big_mdelay(msec) do {\ - set_current_state(TASK_UNINTERRUPTIBLE);\ - schedule_timeout(((msec) * HZ) / 1000);\ -} while (0) - inline static void snd_m3_outw(m3_t *chip, u16 value, unsigned long reg) { outw(value, chip->iobase + reg); @@ -1096,7 +1091,7 @@ static void snd_m3_assp_halt(m3_t *chip) { chip->reset_state = snd_m3_inb(chip, DSP_PORT_CONTROL_REG_B) & ~REGB_STOP_CLOCK; - big_mdelay(10); + msleep(10); snd_m3_outb(chip, chip->reset_state & ~REGB_ENABLE_RESET, DSP_PORT_CONTROL_REG_B); } @@ -2108,9 +2103,9 @@ */ tmp = inw(io + RING_BUS_CTRL_A); outw(RAC_SDFS_ENABLE|LAC_SDFS_ENABLE, io + RING_BUS_CTRL_A); - big_mdelay(20); + msleep(20); outw(tmp, io + RING_BUS_CTRL_A); - big_mdelay(50); + msleep(50); #endif } @@ -2589,7 +2584,7 @@ snd_pcm_suspend_all(chip->pcm); snd_ac97_suspend(chip->ac97); - big_mdelay(10); /* give the assp a chance to idle.. */ + msleep(10); /* give the assp a chance to idle.. */ snd_m3_assp_halt(chip); @@ -2697,6 +2692,8 @@ } spin_lock_init(&chip->reg_lock); + spin_lock_init(&chip->ac97_lock); + switch (pci->device) { case PCI_DEVICE_ID_ESS_ALLEGRO: case PCI_DEVICE_ID_ESS_ALLEGRO_1: @@ -2765,6 +2762,8 @@ snd_m3_assp_init(chip); snd_m3_amp_enable(chip, 1); + tasklet_init(&chip->hwvol_tq, snd_m3_update_hw_volume, (unsigned long)chip); + if (request_irq(pci->irq, snd_m3_interrupt, SA_INTERRUPT|SA_SHIRQ, card->driver, (void *)chip)) { snd_printk("unable to grab IRQ %d\n", pci->irq); @@ -2786,9 +2785,6 @@ return err; } - spin_lock_init(&chip->ac97_lock); - tasklet_init(&chip->hwvol_tq, snd_m3_update_hw_volume, (unsigned long)chip); - if ((err = snd_m3_mixer(chip)) < 0) return err;