u-boot-dfu-20240606

- dwc3 fix crash when ep0 stalls or gadget is stopped
- Kconfig build fix for DFU_SF (SPI flash DFU driver)
This commit is contained in:
Tom Rini
2024-06-06 08:24:15 -06:00
2 changed files with 3 additions and 2 deletions

View File

@@ -68,6 +68,7 @@ config DFU_RAM
config DFU_SF config DFU_SF
bool "SPI flash back end for DFU" bool "SPI flash back end for DFU"
depends on SPI_FLASH || DM_SPI_FLASH
help help
This option enables using DFU to read and write to SPI flash based This option enables using DFU to read and write to SPI flash based
storage. storage.

View File

@@ -249,7 +249,7 @@ void dwc3_gadget_giveback(struct dwc3_ep *dep, struct dwc3_request *req,
list_del(&req->list); list_del(&req->list);
req->trb = NULL; req->trb = NULL;
if (req->request.length) if (req->request.dma && req->request.length)
dwc3_flush_cache((uintptr_t)req->request.dma, req->request.length); dwc3_flush_cache((uintptr_t)req->request.dma, req->request.length);
if (req->request.status == -EINPROGRESS) if (req->request.status == -EINPROGRESS)
@@ -257,7 +257,7 @@ void dwc3_gadget_giveback(struct dwc3_ep *dep, struct dwc3_request *req,
if (dwc->ep0_bounced && dep->number == 0) if (dwc->ep0_bounced && dep->number == 0)
dwc->ep0_bounced = false; dwc->ep0_bounced = false;
else else if (req->request.dma)
usb_gadget_unmap_request(&dwc->gadget, &req->request, usb_gadget_unmap_request(&dwc->gadget, &req->request,
req->direction); req->direction);