diff options
author | joe <joe@FreeBSD.org> | 2002-04-01 19:42:51 +0000 |
---|---|---|
committer | joe <joe@FreeBSD.org> | 2002-04-01 19:42:51 +0000 |
commit | a4893138413f926c69ced90b8e7debbccd28829b (patch) | |
tree | 2bffb34bb356623bb311eb54da3d1806bbfa6db2 /sys/dev/usb/uhci.c | |
parent | a1b45b6baa6fa7f8baf047455b9a62f06dd54c7b (diff) | |
download | FreeBSD-src-a4893138413f926c69ced90b8e7debbccd28829b.zip FreeBSD-src-a4893138413f926c69ced90b8e7debbccd28829b.tar.gz |
MFNetBSD: ohci.c rev 1.92, uhci.c rev 1.122 (part)
date: 2000/08/08 19:51:46; author: tv; state: Exp; lines: +24 -13
%b -> bitmask_snprintf()
Because this code is shared, add a macro for bitmask_snprintf()
that should expand to the equivalent snprintf() on non-NetBSD
systems. This is only used in ?HCI_DEBUG cases anyway.
Diffstat (limited to 'sys/dev/usb/uhci.c')
-rw-r--r-- | sys/dev/usb/uhci.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c index d64088b..84ccb1d 100644 --- a/sys/dev/usb/uhci.c +++ b/sys/dev/usb/uhci.c @@ -763,6 +763,8 @@ uhci_dumpregs(uhci_softc_t *sc) void uhci_dump_td(uhci_soft_td_t *p) { + char sbuf[128], sbuf2[128]; + DPRINTFN(-1,("TD(%p) at %08lx = link=0x%08lx status=0x%08lx " "token=0x%08lx buffer=0x%08lx\n", p, (long)p->physaddr, @@ -770,13 +772,16 @@ uhci_dump_td(uhci_soft_td_t *p) (long)le32toh(p->td.td_status), (long)le32toh(p->td.td_token), (long)le32toh(p->td.td_buffer))); - DPRINTFN(-1,(" %b %b,errcnt=%d,actlen=%d pid=%02x,addr=%d,endpt=%d," - "D=%d,maxlen=%d\n", - (int)le32toh(p->td.td_link), - "\20\1T\2Q\3VF", - (int)le32toh(p->td.td_status), - "\20\22BITSTUFF\23CRCTO\24NAK\25BABBLE\26DBUFFER\27" - "STALLED\30ACTIVE\31IOC\32ISO\33LS\36SPD", + + bitmask_snprintf((int)le32toh(p->td.td_link), "\20\1T\2Q\3VF", + sbuf, sizeof(sbuf)); + bitmask_snprintf((int)le32toh(p->td.td_status), + "\20\22BITSTUFF\23CRCTO\24NAK\25BABBLE\26DBUFFER\27" + "STALLED\30ACTIVE\31IOC\32ISO\33LS\36SPD", + sbuf2, sizeof(sbuf2)); + + DPRINTFN(-1,(" %s %s,errcnt=%d,actlen=%d pid=%02x,addr=%d,endpt=%d," + "D=%d,maxlen=%d\n", sbuf, sbuf2, UHCI_TD_GET_ERRCNT(le32toh(p->td.td_status)), UHCI_TD_GET_ACTLEN(le32toh(p->td.td_status)), UHCI_TD_GET_PID(le32toh(p->td.td_token)), |