usb0: host system err in 6.0
Hans Petter Selasky
hselasky at c2i.net
Wed Nov 23 16:35:48 PST 2005
On Wednesday 23 November 2005 00:18, Tao Zhen wrote:
> Hans Petter Selasky wrote:
>
> Here are some more error messages, hopefully they are helpful. I had to
> disable the debugging as the error message quickly filled up the partition
> with log files. USBD_TIMEOUT message never showed up as I didn't plug in a
> device at all.
>
The "dmesg" looks ok. Edit "/sys/dev/usb2/_uhci.c" and lookup
"uhci_dump_all()". I am not sure how to best do it, but I want a binary copy
of the structure pointed to by "sc". Maybe someone else on this list has a
better suggestion, but here is what you can do:
static void
uhci_dump_all(uhci_softc_t *sc)
{
uhci_dumpregs(sc);
printf("intrs=%d\n", sc->sc_bus.no_intrs);
uhci_dump_qh(&sc->sc_ls_ctl_start);
uhci_dump_qh(&sc->sc_hs_ctl_start);
uhci_dump_qh(&sc->sc_bulk_start);
uhci_dump_qh(&sc->sc_last_qh);
/*
* a binary dump, that contains all
* hardware structures, is smaller
* than a decoded dump
*/
if(sc->sc_vendor[14] != '@')
{
u_int32_t len = sizeof(uhci_softc_t);
char buffer[(sizeof(uhci_softc_t)*2)+1];
char *dst = &buffer[0];
u_int8_t *src = (void *)sc;
u_int8_t last = 0;
sc->sc_vendor[14] = '@';
sc->sc_vendor[15] = 0;
while(len--) {
if(src[0] != last) {
last = src[0];
*dst++ = (last >> 4) + 'a';
*dst++ = (last & 0xF) +'a';
} else {
*dst++ = 'z';
}
src++;
}
*dst++ = 0;
printf("dumping %d (%d) bytes: <%s>\n",
sizeof(uhci_softc_t), dst-&buffer[0]-1, &buffer[0]);
}
return;
}
--HPS
More information about the freebsd-usb
mailing list