Date: Mon, 19 May 2014 22:12:50 +0200 From: Hans Petter Selasky <hps@selasky.org> To: John Baldwin <jhb@FreeBSD.org>, freebsd-current <freebsd-current@freebsd.org> Subject: Re: panic: resource_list_add: resource entry is busy Message-ID: <537A65C2.6060203@selasky.org> In-Reply-To: <5379200E.8080602@selasky.org> References: <53763B0F.4040003@selasky.org> <5377529C.3000508@FreeBSD.org> <53791D78.3070305@selasky.org> <5379200E.8080602@selasky.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?537A65C2.6060203>