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

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
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to