diff options
author | Hans Petter Selasky <hselasky@FreeBSD.org> | 2014-02-14 07:17:36 +0000 |
---|---|---|
committer | Hans Petter Selasky <hselasky@FreeBSD.org> | 2014-02-14 07:17:36 +0000 |
commit | c4a1e93fa64d3fce3ff3e3bf9ece2e4051d71f04 (patch) | |
tree | 337c4fce8e6a65d6845be05886699c9089a2fafc | |
parent | e952166b53cecbc097537c9ba3d15a4c8b3347ac (diff) | |
download | src-c4a1e93fa64d3fce3ff3e3bf9ece2e4051d71f04.tar.gz src-c4a1e93fa64d3fce3ff3e3bf9ece2e4051d71f04.zip |
Fix minor logical error in the XHCI driver. Set correct SETUP packet
direction value.
MFC after: 2 days
Reported by: Horse Ma <HMa@wyse.com>
Notes
Notes:
svn path=/head/; revision=261872
-rw-r--r-- | sys/dev/usb/controller/xhci.c | 3 | ||||
-rw-r--r-- | sys/dev/usb/controller/xhci.h | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/usb/controller/xhci.c b/sys/dev/usb/controller/xhci.c index 0e0cff33596d..238bd552884e 100644 --- a/sys/dev/usb/controller/xhci.c +++ b/sys/dev/usb/controller/xhci.c @@ -1759,7 +1759,8 @@ restart: /* check wLength */ if (td->td_trb[0].qwTrb0 & htole64(XHCI_TRB_0_WLENGTH_MASK)) { - if (td->td_trb[0].qwTrb0 & htole64(1)) + if (td->td_trb[0].qwTrb0 & + htole64(XHCI_TRB_0_DIR_IN_MASK)) dword |= XHCI_TRB_3_TRT_IN; else dword |= XHCI_TRB_3_TRT_OUT; diff --git a/sys/dev/usb/controller/xhci.h b/sys/dev/usb/controller/xhci.h index 10045a720168..c63632b0b44b 100644 --- a/sys/dev/usb/controller/xhci.h +++ b/sys/dev/usb/controller/xhci.h @@ -192,6 +192,7 @@ struct xhci_stream_ctx { struct xhci_trb { volatile uint64_t qwTrb0; +#define XHCI_TRB_0_DIR_IN_MASK (0x80ULL << 0) #define XHCI_TRB_0_WLENGTH_MASK (0xFFFFULL << 48) volatile uint32_t dwTrb2; #define XHCI_TRB_2_ERROR_GET(x) (((x) >> 24) & 0xFF) |