From owner-freebsd-current@FreeBSD.ORG Mon May 19 20:12:09 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A4C103D5; Mon, 19 May 2014 20:12:09 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 611B422E1; Mon, 19 May 2014 20:12:08 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 89A7F1FE029; Mon, 19 May 2014 22:12:01 +0200 (CEST) Message-ID: <537A65C2.6060203@selasky.org> Date: Mon, 19 May 2014 22:12:50 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: John Baldwin , freebsd-current Subject: Re: panic: resource_list_add: resource entry is busy References: <53763B0F.4040003@selasky.org> <5377529C.3000508@FreeBSD.org> <53791D78.3070305@selasky.org> <5379200E.8080602@selasky.org> In-Reply-To: <5379200E.8080602@selasky.org> Content-Type: multipart/mixed; boundary="------------080404070304060207020402" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2014 20:12:09 -0000 This is a multi-part message in MIME format. --------------080404070304060207020402 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 05/18/14 23:03, Hans Petter Selasky wrote: > Hi, > > First call: > > resource_list_add: Hi, It appears that the /dev/pccard.X is opened and reading some CIS data from the device before any driver has been attached. The attached patch solves the panic I've seen. Not sure if the patch is correct. --HPS --------------080404070304060207020402 Content-Type: text/x-diff; name="pccard.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pccard.diff" diff --git a/sys/dev/pccard/pccard_cis.c b/sys/dev/pccard/pccard_cis.c index dbd7165..2914a37 100644 --- a/sys/dev/pccard/pccard_cis.c +++ b/sys/dev/pccard/pccard_cis.c @@ -133,6 +133,10 @@ pccard_scan_cis(device_t bus, device_t dev, pccard_scan_t fct, void *arg) /* allocate some memory */ + if (device_get_state(dev) == DS_NOTPRESENT) { + return (-1); + } + /* * Some reports from the field suggest that a 64k memory boundary * helps card CIS being able to be read. Try it here and see what --------------080404070304060207020402--