Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 May 2014 10:07:58 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Hans Petter Selasky <hps@selasky.org>
Cc:        freebsd-current <freebsd-current@freebsd.org>, Warner Losh <imp@freebsd.org>
Subject:   Re: panic: resource_list_add: resource entry is busy
Message-ID:  <201405231007.58608.jhb@freebsd.org>
In-Reply-To: <537A65C2.6060203@selasky.org>
References:  <53763B0F.4040003@selasky.org> <5379200E.8080602@selasky.org> <537A65C2.6060203@selasky.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday, May 19, 2014 4:12:50 pm Hans Petter Selasky wrote:
> 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.

Oops, your patch was dropped in my reply, but it just disables 
pccard_scan_cis() while a device is probing.

Warner, the issue here is that pccard_scan_cis() can do a bus_alloc_resource() 
for SYS_RES_MEMORY rid 0 of a pccard device concurrently with 
pccard_function_init().  Hans patch might be along the right track, though
we might want to make /dev/pccard.X block until pccard_function_init() 
finishes rather than causing pccard_scan_cis() to fail.  What do you think?

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405231007.58608.jhb>