Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S265321AbUASROR (ORCPT ); Mon, 19 Jan 2004 12:14:17 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S265331AbUASROQ (ORCPT ); Mon, 19 Jan 2004 12:14:16 -0500 Received: from ns.suse.de ([195.135.220.2]:53968 "EHLO Cantor.suse.de") by vger.kernel.org with ESMTP id S265321AbUASROO (ORCPT ); Mon, 19 Jan 2004 12:14:14 -0500 Date: Mon, 19 Jan 2004 18:14:12 +0100 Message-ID: From: Takashi Iwai To: arjanv@redhat.com Cc: Johannes Stezenbach , linux-kernel@vger.kernel.org Subject: Re: 2.6.1-mm4: ALSA es1968 DMA alloc problem In-Reply-To: <1074531954.4443.6.camel@laptop.fenrus.com> References: <20040117161013.GA3303@convergence.de> <1074531954.4443.6.camel@laptop.fenrus.com> User-Agent: Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.5 (Demachiyanagi) APEL/10.6 MULE XEmacs/21.4 (patch 13) (Rational FORTRAN) (i386-suse-linux) MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2490 Lines: 70 At Mon, 19 Jan 2004 18:05:54 +0100, Arjan van de Ven wrote: > > [1 ] > On Mon, 2004-01-19 at 17:29, Takashi Iwai wrote: > > --- linux/sound/core/memalloc.c 15 Jan 2004 16:17:36 -0000 1.20 > > +++ linux/sound/core/memalloc.c 19 Jan 2004 11:52:21 -0000 > > @@ -841,10 +844,11 @@ > > continue; > > } > > > > - if (pci_set_consistent_dma_mask(pci, dev->dma_mask) < 0) { > > + if (pci_set_dma_mask(pci, dev->dma_mask) < 0) { > > printk(KERN_ERR "snd-page-alloc: cannot set DMA mask %lx for pci %04x:%04x\n", dev->dma_mask, dev->vendor, dev->device); > > continue; > > } > > + pci_set_consistent_dma_mask(pci, dev->dma_mask); > > for (i = 0; i < dev->buffers; i++) { > > struct snd_mem_list *mem; > > mem = kmalloc(sizeof(*mem), GFP_KERNEL); > > unchecked > > > > --- linux/sound/pci/emu10k1/emu10k1_main.c 2 Jan 2004 13:39:33 -0000 1.27 > > +++ linux/sound/pci/emu10k1/emu10k1_main.c 19 Jan 2004 11:47:55 -0000 > > @@ -599,11 +599,12 @@ > > return -ENOMEM; > > /* set the DMA transfer mask */ > > emu->dma_mask = is_audigy ? AUDIGY_DMA_MASK : EMU10K1_DMA_MASK; > > - if (pci_set_consistent_dma_mask(pci, emu->dma_mask) < 0) { > > + if (pci_set_dma_mask(pci, emu->dma_mask)) { > > snd_printk(KERN_ERR "architecture does not support PCI busmaster DMA with mask 0x%lx\n", emu->dma_mask); > > snd_magic_kfree(emu); > > return -ENXIO; > > } > > + pci_set_consistent_dma_mask(pci, emu->dma_mask); > > emu->card = card; > > spin_lock_init(&emu->reg_lock); > > spin_lock_init(&emu->emu_lock); > > unchecked hmm, can calling pci_set_consistent_dma_mask() after pci_set_dma_mask() fail? then we need to fix Documentation/DMA-mapping.txt, too. > > --- linux/sound/pci/trident/trident_main.c 20 Nov 2003 12:03:01 -0000 1.43 > > +++ linux/sound/pci/trident/trident_main.c 19 Jan 2004 11:48:59 -0000 > > @@ -3952,6 +3952,7 @@ > > return; > > > > pci_enable_device(trident->pci); > > + pci_set_dma_mask(trident->pci, 0x3fffffff); /* FIXME: correct? */ > > pci_set_consistent_dma_mask(trident->pci, 0x3fffffff); /* FIXME: correct? */ > > pci_set_master(trident->pci); /* to be sure */ > > > > unchecked this one is in the resume callback. Takashi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/