From owner-freebsd-mobile Mon Aug 20 11: 1:37 2001 Delivered-To: freebsd-mobile@freebsd.org Received: from mail.wrs.com (unknown-1-11.windriver.com [147.11.1.11]) by hub.freebsd.org (Postfix) with ESMTP id B2CDE37B40D; Mon, 20 Aug 2001 11:01:25 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: from laptop.baldwin.cx (john@[147.11.46.201]) by mail.wrs.com (8.9.3/8.9.1) with ESMTP id LAA09119; Mon, 20 Aug 2001 11:01:24 -0700 (PDT) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20010818112512.B20719@enterprise.spock.org> Date: Mon, 20 Aug 2001 11:01:31 -0700 (PDT) From: John Baldwin To: Jonathan Chen Subject: Re: re-insertion panic Cc: mobile@FreeBSD.org, Martin Dieringer Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On 18-Aug-01 Jonathan Chen wrote: > On Fri, Aug 17, 2001 at 02:50:36PM -0700, John Baldwin wrote: >> >> On 17-Aug-01 Martin Dieringer wrote: >> > >> > >> > hi. >> > after I finally switched on PCIIRQ on my Thinkpad (600x) and thus >> > made my 3com 575bt card work with a -current >> > NEWCARD kernel, there is the following problem: >> > To suspend the laptop I have to take the card out, >> > on reinsertion following two messages keep on running through the >> > screen: >> > >> > /usr/src/sys/kern/kern_synch.c:377 >> > sleeping with "xl0" locked from /usr/src/sys/pci/if_xl.c:1246 >> > /usr/src/sys/kern/kern_synch.c:377 >> > sleeping with "pccbb1" locked from /usr/src/sys/dev/pccbb/pccbb.c:643 >> >> Ugh, both these locks need to be disabled for the time being. > > I'm not too familiar with the locking architecture on FreeBSD, so this is > probably my fault... I've been meaning to take a look ainto this for some > time now, but something more pressing always manages to come up everytime I > have some free time... > > Since I don't know too much about the way mutexes are done on freebsd, I > would really appreciate it if somebody could hand me a definitive guide > on mutex and locking on FreeBSD, or point out what I should be looking at > in the source... Or better yet, look through dec/pccbb and tell me what I > did wrong and how to fix it... I have some patches to change how the locking works somewhat. However, I think holding the lock across a CARD_DETACH() is the problem in this case (since that can sleep). The definitive guide doesn't exist yet. In theory that's what my BSDCon paper will sort of be. :-/ Speaking if which, one week until the abstract is due. *sigh* :) -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message