usb: gadget: dwc2_udc_otg: set ep's desc during enable/disable
PATCH 1/1 usb: gadget: dwc2_udc_otg: set ep's desc during enable/disable
Fastboot support has been broken on platforms using dwc2 controller since the gadget gets its max packet size from it.
This patch is the equivalent of 723fd5668ff which fixed the same issue but for the chipidea controller.
--- drivers/usb/gadget/dwc2_udc_otg.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/usb/gadget/dwc2_udc_otg.c +2 -0
@@ -655,6 +655,7 @@ static int dwc2_ep_enable(struct usb_ep *_ep,return -ESHUTDOWN ; } + _ep->desc = desc; ep->stopped =0 ; ep->desc = desc; ep->pio_irqs =0 ;
@@ -695,6 +696,7 @@ static int dwc2_ep_disable(struct usb_ep *_ep)/* Nuke all pending requests */ nuke (ep, -ESHUTDOWN ); + _ep->desc =NULL ; ep->desc =0 ; ep->stopped =1 ;
Signature · 1 line
2.34.1
Hi,
Quoted 17 lines · Gary Bisson
Fastboot support has been broken on platforms using dwc2 controller since the gadget gets its max packet size from it.
This patch is the equivalent of723fd5668ffwhich fixed the same issue but for the chipidea controller.Fixes 27c9141b111 ("usb: gadget: fastboot: use correct max packet size")Signed-off-by Gary Bisson <[email protected]>--- drivers/usb/gadget/dwc2_udc_otg.c | 2 ++ 1 file changed, 2 insertions(+)drivers/usb/gadget/dwc2_udc_otg.c +0
-0
drivers/usb/gadget/dwc2_udc_otg.c static int dwc2_ep_enable(struct usb_ep *_ep, · line 660
Quoted 6 lines
drivers/usb/gadget/dwc2_udc_otg.c +1
-0@@ -655,6 +655,7 @@ static int dwc2_ep_enable(struct usb_ep *_ep,return -ESHUTDOWN ; } + _ep->desc = desc; ep->stopped =0 ; ep->desc = desc;
Indeed the _ep and ep was confusing when looking code
drivers/usb/gadget/dwc2_udc_otg.c static int dwc2_ep_disable(struct usb_ep *_ep) · line 702
Quoted 10 lines
drivers/usb/gadget/dwc2_udc_otg.c +1
-0ep->pio_irqs =0 ;@@ -695,6 +696,7 @@ static int dwc2_ep_disable(struct usb_ep *_ep)/* Nuke all pending requests */ nuke (ep, -ESHUTDOWN ); + _ep->desc =NULL ; ep->desc =0 ; ep->stopped =1 ;
An off-tree patch removed from our Yukawa backlog, thanks !
Neil
Quoted 42 lines · Neil Armstrong
Hi,
Quoted 17 lines · Gary Bisson
Fastboot support has been broken on platforms using dwc2 controller since the gadget gets its max packet size from it.
This patch is the equivalent of723fd5668ffwhich fixed the same issue but for the chipidea controller.Fixes 27c9141b111 ("usb: gadget: fastboot: use correct max packet size")Signed-off-by Gary Bisson <[email protected]>--- drivers/usb/gadget/dwc2_udc_otg.c | 2 ++ 1 file changed, 2 insertions(+)drivers/usb/gadget/dwc2_udc_otg.c +0
-0drivers/usb/gadget/dwc2_udc_otg.c static int dwc2_ep_enable(struct usb_ep *_ep, · line 660
Quoted 6 lines
drivers/usb/gadget/dwc2_udc_otg.c +1
-0@@ -655,6 +655,7 @@ static int dwc2_ep_enable(struct usb_ep *_ep,return -ESHUTDOWN ; } + _ep->desc = desc; ep->stopped =0 ; ep->desc = desc;Indeed the
_epand ep was confusing when looking codedrivers/usb/gadget/dwc2_udc_otg.c static int dwc2_ep_disable(struct usb_ep *_ep) · line 702
Quoted 10 lines
drivers/usb/gadget/dwc2_udc_otg.c +1
-0ep->pio_irqs =0 ;@@ -695,6 +696,7 @@ static int dwc2_ep_disable(struct usb_ep *_ep)/* Nuke all pending requests */ nuke (ep, -ESHUTDOWN ); + _ep->desc =NULL ; ep->desc =0 ; ep->stopped =1 ;An off-tree patch removed from our Yukawa backlog, thanks !
Quoted 1 line
Reviewed-by Neil Armstrong <[email protected]>
+CC Tom, can you pick this one for CURRENT 2022.01 release?
Thank you
Mattijs Korpershoek
Tested-byHi Gary,
Thank you for your patch.
Quoted 43 lines · Marek Vasut
Quoted 42 lines · Neil Armstrong
Hi,
Quoted 17 lines · Gary Bisson
Fastboot support has been broken on platforms using dwc2 controller since the gadget gets its max packet size from it.
This patch is the equivalent of723fd5668ffwhich fixed the same issue but for the chipidea controller.Fixes 27c9141b111 ("usb: gadget: fastboot: use correct max packet size")Signed-off-by Gary Bisson <[email protected]>--- drivers/usb/gadget/dwc2_udc_otg.c | 2 ++ 1 file changed, 2 insertions(+)drivers/usb/gadget/dwc2_udc_otg.c +0
-0drivers/usb/gadget/dwc2_udc_otg.c static int dwc2_ep_enable(struct usb_ep *_ep, · line 660
Quoted 6 lines
drivers/usb/gadget/dwc2_udc_otg.c +1
-0@@ -655,6 +655,7 @@ static int dwc2_ep_enable(struct usb_ep *_ep,return -ESHUTDOWN ; } + _ep->desc = desc; ep->stopped =0 ; ep->desc = desc;Indeed the
_epand ep was confusing when looking codedrivers/usb/gadget/dwc2_udc_otg.c static int dwc2_ep_disable(struct usb_ep *_ep) · line 702
Quoted 10 lines
drivers/usb/gadget/dwc2_udc_otg.c +1
-0ep->pio_irqs =0 ;@@ -695,6 +696,7 @@ static int dwc2_ep_disable(struct usb_ep *_ep)/* Nuke all pending requests */ nuke (ep, -ESHUTDOWN ); + _ep->desc =NULL ; ep->desc =0 ; ep->stopped =1 ;An off-tree patch removed from our Yukawa backlog, thanks !
Quoted 1 line
Quoted 1 line
Reviewed-by Neil Armstrong <[email protected]>
I can confirm this fixes flashing issues on VIM3/VIM3L boards when flashing AOSP(yukawa) with fastboot.
Quoted 4 lines
+CC Tom, can you pick this one for CURRENT 2022.01 release?
Thank you
Quoted 10 lines · Gary Bisson
Fastboot support has been broken on platforms using dwc2 controller since the gadget gets its max packet size from it.
This patch is the equivalent of723fd5668ffwhich fixed the same issue but for the chipidea controller.Fixes 27c9141b111 ("usb: gadget: fastboot: use correct max packet size")Signed-off-by Gary Bisson <[email protected]>Reviewed-by Neil Armstrong <[email protected]>Tested-by Mattijs Korpershoek <[email protected]>
Applied to u-boot/master, thanks!
Signature · 1 line
Tom