NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kernel lockup on 6.0 beta2 on cardbus insertion on Dell Inspiron 9100 laptop

Good catch.

I think this was meant to be:

Index: cardbus.c
RCS file: /cvsroot/src/sys/dev/cardbus/cardbus.c,v
retrieving revision 1.108
diff -u -r1.108 cardbus.c
--- cardbus.c   1 Aug 2011 11:20:27 -0000       1.108
+++ cardbus.c   7 Jun 2012 08:56:30 -0000
@@ -265,7 +265,7 @@
                        /* XXX byte order? */
                        bus_space_read_region_1(bar_tag, bar_memh,
                            cis_ptr, tuples,
-                           MIN(bar_size - MIN(bar_size, cis_ptr), len));
+                           MIN(bar_size-cis_ptr, len));
                command = cardbus_conf_read(cc, cf, tag,

Can you try this?

David, you originally intrudced this:
revision 1.84
date: 2008/01/02 22:29:00;  author: dyoung;  state: Exp;  lines: +4 -3
Do not read past the CIS region.  Stops an MCHK exception on macppc
(reported by macallan@).

I originally detected this bug by activating 'PCI master target
abort' interrupts on the AMD Elan SC520 processor.  Lo and behold,
several interrupts occurred before the system had finished booting!
NetBSD should probably activate PCI exception reporting whenever
it is available.

Can you review/verify?



Home | Main Index | Thread Index | Old Index