From owner-freebsd-multimedia@FreeBSD.ORG Tue Jan 3 02:07:07 2006 Return-Path: X-Original-To: freebsd-multimedia@freebsd.org Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 88D5A16A41F for ; Tue, 3 Jan 2006 02:07:07 +0000 (GMT) (envelope-from pyunyh@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id 911EF43D5F for ; Tue, 3 Jan 2006 02:07:06 +0000 (GMT) (envelope-from pyunyh@gmail.com) Received: by zproxy.gmail.com with SMTP id 8so2601645nzo for ; Mon, 02 Jan 2006 18:07:05 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:cc:subject:message-id:reply-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=jmX1AkoKk+Mqxf9renk1pr4ZBh+h528dBYgAcNedjfnWkIITv+ZFArQUkoe+UctHizrcssEtzF/1Mk1nb2tX4rGWQVa+qpYZ2bxXwV0VkDbk6XQB27BG80cEE6RY1s2aaRob+dr898Ughcg8kdA38XfgrRm6sw0Lnv5BpfOyi5g= Received: by 10.36.222.77 with SMTP id u77mr2878197nzg; Mon, 02 Jan 2006 18:07:05 -0800 (PST) Received: from michelle.rndsoft.co.kr ( [211.32.202.217]) by mx.gmail.com with ESMTP id 8sm37963nzn.2006.01.02.18.07.04; Mon, 02 Jan 2006 18:07:05 -0800 (PST) Received: from michelle.rndsoft.co.kr (localhost.rndsoft.co.kr [127.0.0.1]) by michelle.rndsoft.co.kr (8.13.5/8.13.5) with ESMTP id k03265PP001828 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 3 Jan 2006 11:06:05 +0900 (KST) (envelope-from pyunyh@gmail.com) Received: (from yongari@localhost) by michelle.rndsoft.co.kr (8.13.5/8.13.5/Submit) id k03264dx001827; Tue, 3 Jan 2006 11:06:04 +0900 (KST) (envelope-from pyunyh@gmail.com) Date: Tue, 3 Jan 2006 11:06:04 +0900 From: Pyun YongHyeon To: Julian Elischer Message-ID: <20060103020604.GA1725@rndsoft.co.kr> References: <43B970E8.5010406@elischer.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43B970E8.5010406@elischer.org> User-Agent: Mutt/1.4.2.1i Cc: FreeBSD Multimedia Subject: Re: recent Maestro messages. X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2006 02:07:07 -0000 On Mon, Jan 02, 2006 at 10:28:56AM -0800, Julian Elischer wrote: > Recently the MAestro attach code has started to spew out the following > during boot. > > someone who knows pcm_addchan() should look to see it the locking in > agg_attach() > can be adjusted to avoid this error safely. > > ===================== > > malloc(M_WAITOK) of "256", forcing M_NOWAIT with the following > non-sleepable loc > ks held: > exclusive sleep mutex ESS Technology Maestro-2E (hardware status lock) r = > 0 (0x > c228be28) locked @ > /usr/src/sys/modules/sound/driver/maestro/../../../../dev/sou > nd/pci/maestro.c:270 > KDB: stack backtrace: > kdb_backtrace(1,e0,c10653c0,4,c0c209ec) at kdb_backtrace+0x29 > witness_warn(5,0,c089b071,c0840681,e0) at witness_warn+0x192 > uma_zalloc_arg(c10653c0,0,502) at uma_zalloc_arg+0x41 > malloc(d8,c0907860,502,c0c20a38,c062efe8) at malloc+0xb2 > devfs_alloc(c22c3800,0,c22c3780,c0c20a60,c062f0d4) at devfs_alloc+0x17 > make_dev_credv(c0ae0420,30004,0,0,0) at make_dev_credv+0x34 > make_dev(c0ae0420,30004,0,0,1b6) at make_dev+0x20 > pcm_chn_add(c228bc00,c22fad80,c228be00,0,0) at pcm_chn_add+0x14e > pcm_addchan(c22ba600,1,c0ac4ca0,c228be00,c228be28) at pcm_addchan+0x36 > agg_attach(c22ba600) at agg_attach+0x553 > device_attach(c22ba600,c22ba880,c22ba600,c22ba380,0) at device_attach+0x58 > device_probe_and_attach(c22ba600) at device_probe_and_attach+0xe0 > bus_generic_attach(c22ba380,6,c229d7c0,1,c0b2c39c) at > bus_generic_attach+0x16 > acpi_pci_attach(c22ba380) at acpi_pci_attach+0xd0 > device_attach(c22ba380,c228acf0,c22ba380,0,c223ea80) at device_attach+0x58 > device_probe_and_attach(c22ba380) at device_probe_and_attach+0xe0 > bus_generic_attach(c223ea80,c223ea80,0,c229d7c0,c22b5480) at > bus_generic_attach+ > 0x16 > acpi_pcib_attach(c223ea80,c22b5494,0,c0c20c58,c066e3cc) at > acpi_pcib_attach+0x12 > f > acpi_pcib_acpi_attach(c223ea80) at acpi_pcib_acpi_attach+0xcf > device_attach(c223ea80,c0c20ca0,c223ea80,c22b2c80,c223d600) at > device_attach+0x5 > 8 > device_probe_and_attach(c223ea80) at device_probe_and_attach+0xe0 > bus_generic_attach(c223d600,103f,1016,c22a3468,4) at bus_generic_attach+0x16 > acpi_attach(c223d600) at acpi_attach+0x631 > device_attach(c223d600,0,c223d600,c223dd00,0) at device_attach+0x58 > device_probe_and_attach(c223d600) at device_probe_and_attach+0xe0 > bus_generic_attach(c223dd00,c223dd00,c223dd00,c0c20d40,c066a624) at > bus_generic_ > attach+0x16 > nexus_attach(c223dd00) at nexus_attach+0x13 > device_attach(c223dd00,c0951fb4,c223dd00,c0923ed0,c28000) at > device_attach+0x58 > device_probe_and_attach(c223dd00) at device_probe_and_attach+0xe0 > root_bus_configure(c0c20d88,c062b006,0,c1ec00,c1e000) at > root_bus_configure+0x16 > configure(0,c1ec00,c1e000,0,c0446ce5) at configure+0x9 > mi_startup() at mi_startup+0x96 > begin() at begin+0x2c I'm not surprised that maestro(4) would freeze system. As maestro(4) invokes pci_set_powerstate() in suspend/resume/play/capture, it would generates lots of LORs and it even calls msleep(9) with driver lock held. In addition, DMA buffering used in maestro(4) is questionable and we should cleanup this too. I have a patch that partially addresses the issue but it still does not fix other issues mentioned in kern/63204. As my system works without problems, I don't know what caused this. :-( http://people.freebsd.org/~yongari/maestro.c http://people.freebsd.org/~yongari/maestro_reg.h Captuing was not tested and wouldn't work. -- Regards, Pyun YongHyeon