diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2017-09-18 06:40:41 -0700 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2017-10-01 16:32:53 +0200 |
commit | 1897d60130976ece389d5875187b78ba0d41428f (patch) | |
tree | 0edb552528f6bf8439221fef711d06770be515e2 /drivers/usb/host/xhci.c | |
parent | 2f0eb2ac4b84f94e2f7de6e4ec9b63ce07cfec7a (diff) | |
download | u-boot-1897d60130976ece389d5875187b78ba0d41428f.tar.gz u-boot-1897d60130976ece389d5875187b78ba0d41428f.tar.xz u-boot-1897d60130976ece389d5875187b78ba0d41428f.zip |
usb: xhci: Add interrupt transfer support
xHCI uses normal TRBs for both bulk and interrupt. This adds the
missing interrupt transfer support to xHCI so that devices like
USB keyboard that uses interrupt transfer can work.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'drivers/usb/host/xhci.c')
-rw-r--r-- | drivers/usb/host/xhci.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 04eb1eb14d..4b3d58d56e 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -890,11 +890,18 @@ unknown: static int _xhci_submit_int_msg(struct usb_device *udev, unsigned long pipe, void *buffer, int length, int interval) { + if (usb_pipetype(pipe) != PIPE_INTERRUPT) { + printf("non-interrupt pipe (type=%lu)", usb_pipetype(pipe)); + return -EINVAL; + } + /* - * TODO: Not addressing any interrupt type transfer requests - * Add support for it later. + * xHCI uses normal TRBs for both bulk and interrupt. When the + * interrupt endpoint is to be serviced, the xHC will consume + * (at most) one TD. A TD (comprised of sg list entries) can + * take several service intervals to transmit. */ - return -EINVAL; + return xhci_bulk_tx(udev, pipe, length, buffer); } /** |