summaryrefslogtreecommitdiff
path: root/payloads
diff options
context:
space:
mode:
authorKangheui Won <khwon@chromium.org>2020-01-24 21:53:01 +1100
committerPatrick Georgi <pgeorgi@google.com>2020-02-05 09:56:26 +0000
commita3d79292e7a6adc0c5dc4c53117feb5225bc6225 (patch)
tree426a99cc63faba05d999ca54c7167fd8a8c65e15 /payloads
parentb48148f4b35dbf7fc36612cb933c133a37a69261 (diff)
libpayload/xhci: Fix MPS handling in set_address
We set MPS to speed_to_default_mps(speed) initially but later compare maxpacketsize with 8 to change mps. So compare with speed_to_default_mps(speed) to determine if we need to change settings here. BUG=b:147783572 BRANCH=none TEST=works with 12Mbps/8MPS USB device Signed-off-by: Kangheui Won <khwon@chromium.org> Change-Id: I32455483fceec56f14af6118b77615c14b3f9f39 Reviewed-on: https://review.coreboot.org/c/coreboot/+/38556 Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'payloads')
-rw-r--r--payloads/libpayload/drivers/usb/xhci_devconf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/payloads/libpayload/drivers/usb/xhci_devconf.c b/payloads/libpayload/drivers/usb/xhci_devconf.c
index 3f50caa512..51ff29f5c8 100644
--- a/payloads/libpayload/drivers/usb/xhci_devconf.c
+++ b/payloads/libpayload/drivers/usb/xhci_devconf.c
@@ -227,7 +227,7 @@ xhci_set_address (hci_t *controller, usb_speed speed, int hubport, int hubaddr)
}
dev->endpoints[0].maxpacketsize = usb_decode_mps0(speed, buf[7]);
- if (dev->endpoints[0].maxpacketsize != 8) {
+ if (dev->endpoints[0].maxpacketsize != speed_to_default_mps(speed)) {
memset((void *)ic->dev.ep0, 0x00, ctxsize);
*ic->add = (1 << 1); /* EP0 Context */
EC_SET(MPS, ic->dev.ep0, dev->endpoints[0].maxpacketsize);