Revert "usb: dwc3: gadget: Avoid starting DWC3 gadget during UDC unbind"

This reverts commit b83692feb0 which is
commit 8217f07a50 upstream.

It breaks the kernel ABI and will be brought back in an abi-safe way in
a later commit.

Bug: 161946584
Bug: 200287549
Cc: Wesley Cheng <wcheng@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ib9a113d36bc784b243e5a1b168a8c7470992c8ff
This commit is contained in:
Greg Kroah-Hartman
2022-09-30 11:15:50 +02:00
parent 3e07193055
commit 9181fb4ea4
2 changed files with 1 additions and 4 deletions

View File

@@ -1043,7 +1043,6 @@ struct dwc3_scratchpad_array {
* @tx_fifo_resize_max_num: max number of fifos allocated during txfifo resize
* @hsphy_interface: "utmi" or "ulpi"
* @connected: true when we're connected to a host, false otherwise
* @softconnect: true when gadget connect is called, false when disconnect runs
* @delayed_status: true when gadget driver asks for delayed status
* @ep0_bounced: true when we used bounce buffer
* @ep0_expect_in: true when we expect a DATA IN transfer
@@ -1264,7 +1263,6 @@ struct dwc3 {
const char *hsphy_interface;
unsigned connected:1;
unsigned softconnect:1;
unsigned delayed_status:1;
unsigned ep0_bounced:1;
unsigned ep0_expect_in:1;

View File

@@ -2461,7 +2461,6 @@ static int dwc3_gadget_pullup(struct usb_gadget *g, int is_on)
is_on = !!is_on;
dwc->softconnect = is_on;
/*
* Per databook, when we want to stop the gadget, if a control transfer
* is still in process, complete it and get the core into setup phase.
@@ -4430,7 +4429,7 @@ int dwc3_gadget_resume(struct dwc3 *dwc)
{
int ret;
if (!dwc->gadget_driver || !dwc->softconnect)
if (!dwc->gadget_driver)
return 0;
ret = __dwc3_gadget_start(dwc);