Ran Bi has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36678 )
Change subject: libpayload: usbmsc: update return value of CSW transfer ......................................................................
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 --- M payloads/libpayload/drivers/usb/usbmsc.c 1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/36678/1
diff --git a/payloads/libpayload/drivers/usb/usbmsc.c b/payloads/libpayload/drivers/usb/usbmsc.c old mode 100644 new mode 100755 index 2412e99..d8b7bce --- a/payloads/libpayload/drivers/usb/usbmsc.c +++ b/payloads/libpayload/drivers/usb/usbmsc.c @@ -232,9 +232,9 @@
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) {
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36678 )
Change subject: libpayload: usbmsc: update return value of CSW transfer ......................................................................
Patch Set 1:
(2 comments)
https://review.coreboot.org/c/coreboot/+/36678/1/payloads/libpayload/drivers... File payloads/libpayload/drivers/usb/usbmsc.c:
https://review.coreboot.org/c/coreboot/+/36678/1/payloads/libpayload/drivers... PS1, Line 235: ret = ctrlr->bulk (ep, sizeof (csw_t), (u8 *) csw, 1); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/c/coreboot/+/36678/1/payloads/libpayload/drivers... PS1, Line 235: ret = ctrlr->bulk (ep, sizeof (csw_t), (u8 *) csw, 1); space prohibited between function name and open parenthesis '('
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36678 )
Change subject: libpayload: usbmsc: update return value of CSW transfer ......................................................................
Patch Set 1: Code-Review+1
Hi Julius, I think this looks correct (a fix to https://review.coreboot.org/c/coreboot/+/34485). Do you agree?
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36678 )
Change subject: libpayload: usbmsc: update return value of CSW transfer ......................................................................
Patch Set 1: Code-Review+2
Oh crap, yes... sorry about that. Thanks for the fix.
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/36678 )
Change subject: libpayload: usbmsc: update return value of CSW transfer ......................................................................
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 --- M payloads/libpayload/drivers/usb/usbmsc.c 1 file changed, 2 insertions(+), 2 deletions(-)
Approvals: build bot (Jenkins): Verified Julius Werner: Looks good to me, approved Hung-Te Lin: Looks good to me, but someone else must approve
diff --git a/payloads/libpayload/drivers/usb/usbmsc.c b/payloads/libpayload/drivers/usb/usbmsc.c old mode 100644 new mode 100755 index 2412e99..d8b7bce --- a/payloads/libpayload/drivers/usb/usbmsc.c +++ b/payloads/libpayload/drivers/usb/usbmsc.c @@ -232,9 +232,9 @@
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) {