-/* $OpenBSD: xhci.c,v 1.47 2014/12/19 22:44:59 guenther Exp $ */
+/* $OpenBSD: xhci.c,v 1.48 2014/12/21 11:20:24 mpi Exp $ */
/*
* Copyright (c) 2014 Martin Pieuchot
static void
xhci_dump_trb(struct xhci_trb *trb)
{
- printf("trb=%p (0x%016llx 0x%08x 0x%08x)\n", trb,
- (long long)trb->trb_paddr, trb->trb_status, trb->trb_flags);
+ printf("trb=%p (0x%016llx 0x%08x 0x%b)\n", trb,
+ (long long)letoh64(trb->trb_paddr), letoh32(trb->trb_status),
+ (int)letoh32(trb->trb_flags), XHCI_TRB_FLAGS_BITMASK);
}
#endif
-/* $OpenBSD: xhcireg.h,v 1.7 2014/12/15 17:10:44 mpi Exp $ */
+/* $OpenBSD: xhcireg.h,v 1.8 2014/12/21 11:20:24 mpi Exp $ */
/*-
* Copyright (c) 2014 Martin Pieuchot. All rights reserved.
#define XHCI_TRB_SET_SLOT(x) (((x) & 0xff) << 24)
} __packed;
+#define XHCI_TRB_FLAGS_BITMASK \
+ "\20\007IDT\006IOC\005CHAIN\004NOSNOOP\003ISP\002LINKSEG\001CYCLE"
+
#define XHCI_TRB_TYPE_MASK 0xfc00
#define XHCI_TRB_TYPE(x) (((x) & XHCI_TRB_TYPE_MASK) >> 10)