summaryrefslogtreecommitdiff
path: root/payloads
diff options
context:
space:
mode:
authorChangqi Hu <changqi.hu@mediatek.com>2019-11-08 18:24:17 +0800
committerPatrick Georgi <pgeorgi@google.com>2019-11-11 10:25:24 +0000
commitbc2f9a30f3a61e3d02baf7abcc5440407035f354 (patch)
treeb559a6b3354160edffa11487849e22ed0fac891a /payloads
parent1b95501fad0b94098a1e6c5be637efaf113dcb88 (diff)
downloadcoreboot-bc2f9a30f3a61e3d02baf7abcc5440407035f354.tar.xz
libpayload: usbmsc: update return value of CSW transfer
When the first CSW transfer failed, get_csw function will retry CSW transfer again, but the return value is not updated. Change-Id: I289916baa08d0a189d659164a0002347f6f435db Signed-off-by: Changqi Hu <changqi.hu@mediatek.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/36678 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'payloads')
-rwxr-xr-x[-rw-r--r--]payloads/libpayload/drivers/usb/usbmsc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/payloads/libpayload/drivers/usb/usbmsc.c b/payloads/libpayload/drivers/usb/usbmsc.c
index 2412e99af3..d8b7bcea6e 100644..100755
--- a/payloads/libpayload/drivers/usb/usbmsc.c
+++ b/payloads/libpayload/drivers/usb/usbmsc.c
@@ -232,9 +232,9 @@ get_csw (endpoint_t *ep, csw_t *csw)
if (ret < 0) {
clear_stall (ep);
- if (ctrlr->bulk (ep, sizeof (csw_t), (u8 *) csw, 1) < 0) {
+ ret = ctrlr->bulk (ep, sizeof (csw_t), (u8 *) csw, 1);
+ if (ret < 0)
return reset_transport (ep->dev);
- }
}
if (ret != sizeof(csw_t) || csw->dCSWTag != tag ||
csw->dCSWSignature != csw_signature) {