From: Takashi Iwai Subject: Re: Lockup with ALSA CVS on 2.4.19 SMP, 1 GB Date: Tue, 17 Sep 2002 12:22:22 +0200 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: <20020916215834.86476.qmail@web40602.mail.yahoo.com> Mime-Version: 1.0 (generated by SEMI 1.14.4 - "Hosorogi") Content-Type: multipart/mixed; boundary="Multipart_Tue_Sep_17_12:22:22_2002-1" Return-path: In-Reply-To: <20020916215834.86476.qmail@web40602.mail.yahoo.com> Errors-To: alsa-devel-admin@lists.sourceforge.net List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: To: Chris Rankin Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org --Multipart_Tue_Sep_17_12:22:22_2002-1 Content-Type: text/plain; charset=US-ASCII At Mon, 16 Sep 2002 22:58:34 +0100 (BST), Chris Rankin wrote: > > Hi, > > I tried reporting this a few days ago, but it seems as > if the list is currently being moderated by a tame > black hole. I have now subscribed ... > > My machine run Linux 2.4.19 SMP, 1 GB memory > (Highmem), has a SB Live! card and recently locked up > completely after updating my ALSA kernel modules from > CVS. All I had done to trigger it was to try and play > a WAV file using aplay, but aplay did not even return > before the keyboard, mouse and network connection all > froze. After rebooting and fscking, I restored > memory.c to version 1.19 and wrappers.c to version > 1.5, recompiled, and everything was fine again. I have > since stopped updating my CVS sources, of course. is yours the vanilla kernel? i still don't figure out which part of the last change of pci_alloc_consistent hack affects it. it's nothing bug calling pci_alloc_consistent() with a proper dma_mask. anyway, could you try the attached patch? ciao, Takashi --Multipart_Tue_Sep_17_12:22:22_2002-1 Content-Type: application/octet-stream Content-Disposition: attachment; filename="wrapper.dif" Content-Transfer-Encoding: 7bit --- alsa-kernel/core/wrappers.c 12 Sep 2002 09:00:12 -0000 1.5 +++ alsa-kernel/core/wrappers.c 17 Sep 2002 10:19:51 -0000 @@ -67,6 +67,11 @@ #include +/* to be sure... */ +#ifdef HACK_PCI_ALLOC_CONSISTENT +#error pci_alloc_consistent hack is already defined!! +#endif + /* * A dirty hack... when the kernel code is fixed this should be removed. * @@ -93,13 +98,11 @@ rmask = ~((unsigned long)dma_mask); hwdev->dma_mask = 0xffffffff; /* do without masking */ ret = pci_alloc_consistent(hwdev, size, dma_handle); - if (ret && ((*dma_handle + size - 1) & rmask)) { - pci_free_consistent(hwdev, size, ret, *dma_handle); - ret = 0; - } hwdev->dma_mask = dma_mask; /* restore */ - if (! ret) + if (ret && (((unsigned long)*dma_handle + size - 1) & rmask)) { + pci_free_consistent(hwdev, size, ret, *dma_handle); ret = pci_alloc_consistent(hwdev, size, dma_handle); + } return ret; } --Multipart_Tue_Sep_17_12:22:22_2002-1-- ------------------------------------------------------- Sponsored by: AMD - Your access to the experts on Hammer Technology! Open Source & Linux Developers, register now for the AMD Developer Symposium. Code: EX8664 http://www.developwithamd.com/developerlab