Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: xhci panic
On 01/20/17 14:35, Patrick Welche wrote:
On Fri, Jan 20, 2017 at 02:10:24PM +0000, Nick Hudson wrote:
On 01/20/17 11:50, Patrick Welche wrote:
On Fri, Jan 20, 2017 at 11:08:14AM +0000, Nick Hudson wrote:
On 01/20/17 10:56, Patrick Welche wrote:
Just tried a this morning's kernel on amd64 (was looking forward to the
new xhci.c :-) ), and (laptop so no serial console):
xhci0 at pci4 dev 0 function 0: NEC USB3 Houst Controller (rev. 0x04)
xhci0: interrupting at msi2 vec 0
uvm_fault(0x..., 0x0, 1) -> e
Stopped in pid 0.1 (system) at netbsd:vmem_alloc
vmem_alloc
uvm_km_kmem_alloc
kmem_intr_alloc
kmem_intr_zalloc
xhci_init
xhci_pci_attach
...
mp_pci_scan
Can you boot with -x and send the output please
OK - going off-list!
P
can you show the full backtrace,e.g.
Stopped in pid 0.1 (system) at netbsd:vmem_alloc+FOO
need to know the source line of vmem_alloc+FOO is
(gdb) info line *(vmem_alloc+0x3e)
Line 1056 of "../../../../kern/subr_vmem.c"
starts at address 0xffffffff8052efa2 <vmem_alloc+60>
and ends at 0xffffffff8052efac <vmem_alloc+70>.
1 /* $NetBSD: subr_vmem.c,v 1.95 2016/07/07 06:55:43 msaitoh Exp $ */
...
1050 #if defined(QCACHE)
1051 if (size <= vm->vm_qcache_max) {
1052 void *p;
1053 int qidx = (size + vm->vm_quantum_mask) >> vm->vm_quantum_shift;
1054 qcache_t *qc = vm->vm_qcache[qidx - 1];
1055
1056 p = pool_cache_get(qc->qc_cache, vmf_to_prf(flags));
1057 if (addrp != NULL)
1058 *addrp = (vmem_addr_t)p;
1059 return (p == NULL) ? ENOMEM : 0;
1060 }
1061 #endif /* defined(QCACHE) */
For more, it'll be easier to do later when I'm near a second computer...
(I can boot this laptop with boot -c, disable xhci, using an envelope as
memory...)
Cheers,
Patrick
Does this help?
Nick
Index: sys/dev/usb/xhci.c
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/xhci.c,v
retrieving revision 1.69
diff -u -p -r1.69 xhci.c
--- sys/dev/usb/xhci.c 19 Jan 2017 20:35:44 -0000 1.69
+++ sys/dev/usb/xhci.c 20 Jan 2017 14:52:33 -0000
@@ -958,12 +958,12 @@ xhci_init(struct xhci_softc *sc)
aprint_debug_dev(sc->sc_dev, "xECP %x\n", XHCI_HCC_XECP(hcc) * 4);
/* default all ports to bus 0, i.e. usb 3 */
- sc->sc_ctlrportbus = kmem_zalloc(sc->sc_maxports * sizeof(uint8_t) / NBBY, KM_SLEEP);
- sc->sc_ctlrportmap = kmem_zalloc(sc->sc_maxports * sizeof(int), KM_SLEEP);
+ sc->sc_ctlrportbus = kmem_zalloc(max(sc->sc_maxports * sizeof(uint8_t) / NBBY, 32), KM_SLEEP);
+ sc->sc_ctlrportmap = kmem_zalloc(max(sc->sc_maxports * sizeof(int), 32), KM_SLEEP);
/* controller port to bus roothub port map */
for (size_t j = 0; j < __arraycount(sc->sc_rhportmap); j++) {
- sc->sc_rhportmap[j] = kmem_zalloc(sc->sc_maxports * sizeof(int), KM_SLEEP);
+ sc->sc_rhportmap[j] = kmem_zalloc(max(sc->sc_maxports * sizeof(int), 32), KM_SLEEP);
}
/*
Home |
Main Index |
Thread Index |
Old Index