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>
This commit is contained in:
parent
1b95501fad
commit
bc2f9a30f3
|
@ -232,10 +232,10 @@ 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) {
|
||||
usb_debug ("MSC: received malformed CSW\n");
|
||||
|
|
Loading…
Reference in New Issue