diff options
author | Anton Kochkov <anton.kochkov@gmail.com> | 2012-10-02 00:04:29 +0400 |
---|---|---|
committer | Peter Stuge <peter@stuge.se> | 2012-10-01 22:57:01 +0200 |
commit | efcb8de12e5c0757a5b3784a43a54046aaff460f (patch) | |
tree | 92da168938c41702d7ec5d0b86c9131ca15d3ab2 /payloads/libpayload/drivers/usb/uhci.c | |
parent | 86aa7c45a544c1b599ad78d8a7a84884521dd48f (diff) | |
download | coreboot-efcb8de12e5c0757a5b3784a43a54046aaff460f.tar.xz |
libpayload: fix for UHCI bulk transactions
Fixed masking to run QH shedule.
Fixed final zero filled TD generation for
UHCI bulk transaction.
Change-Id: I9c6ea34d132368922f2eeeaa7aadbbb6aac3e2b8
Signed-off-by: Anton Kochkov <anton.kochkov@gmail.com>
Reviewed-on: http://review.coreboot.org/1553
Tested-by: build bot (Jenkins)
Reviewed-by: Peter Stuge <peter@stuge.se>
Diffstat (limited to 'payloads/libpayload/drivers/usb/uhci.c')
-rw-r--r-- | payloads/libpayload/drivers/usb/uhci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/payloads/libpayload/drivers/usb/uhci.c b/payloads/libpayload/drivers/usb/uhci.c index 635a8f18bb..6cc6b282a2 100644 --- a/payloads/libpayload/drivers/usb/uhci.c +++ b/payloads/libpayload/drivers/usb/uhci.c @@ -411,7 +411,7 @@ static int run_schedule (usbdev_t *dev, td_t *td) { UHCI_INST (dev->controller)->qh_data->elementlinkptr = - virt_to_phys (td) | ~(FLISTP_QH | FLISTP_TERMINATE); + virt_to_phys (td) & ~(FLISTP_QH | FLISTP_TERMINATE); td = wait_for_completed_qh (dev->controller, UHCI_INST (dev->controller)->qh_data); if (td == 0) { @@ -429,7 +429,7 @@ uhci_bulk (endpoint_t *ep, int size, u8 *data, int finalize) int maxpsize = ep->maxpacketsize; if (maxpsize == 0) fatal("MaxPacketSize == 0!!!"); - int numpackets = (size + maxpsize - 1 + finalize) / maxpsize; + int numpackets = (size + maxpsize - 1) / maxpsize + finalize; if (numpackets == 0) return 0; td_t *tds = create_schedule (numpackets); |