Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/38556 )
Change subject: libpayload/xhci: Fix MPS handling in set_address ......................................................................
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 --- M payloads/libpayload/drivers/usb/xhci_devconf.c 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Patrick Georgi: Looks good to me, approved Edward O'Callaghan: Looks good to me, approved
diff --git a/payloads/libpayload/drivers/usb/xhci_devconf.c b/payloads/libpayload/drivers/usb/xhci_devconf.c index 3f50caa..51ff29f 100644 --- a/payloads/libpayload/drivers/usb/xhci_devconf.c +++ b/payloads/libpayload/drivers/usb/xhci_devconf.c @@ -227,7 +227,7 @@ }
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);