[PATCH] drivers: musb_gadget: Save endpoint desc to usb_ep->desc

qianfanguijin at qq.com qianfanguijin at qq.com
Mon Nov 8 04:04:20 CET 2021


From: qianfan Zhao <qianfanguijin at 163.com>

Fix fastboot flash bug.

If the downloading file size is equal to the partition size, "fastboot
flash" can't work, at least in sunxi platform, because used an
uninitalized point: ep->desc.

Reproduce: fastboot flash loader1 spl/sunxi-spl.bin.

Signed-off-by: qianfan Zhao <qianfanguijin at 163.com>
---
 drivers/usb/musb-new/musb_gadget.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/musb-new/musb_gadget.c b/drivers/usb/musb-new/musb_gadget.c
index 5b149dac6d..12d9911ecd 100644
--- a/drivers/usb/musb-new/musb_gadget.c
+++ b/drivers/usb/musb-new/musb_gadget.c
@@ -1188,6 +1188,7 @@ static int musb_gadget_enable(struct usb_ep *ep,
 	} else
 		musb_ep->dma = NULL;
 
+	musb_ep->end_point.desc = desc;
 	musb_ep->desc = desc;
 	musb_ep->busy = 0;
 	musb_ep->wedged = 0;
-- 
2.17.1



More information about the U-Boot mailing list