mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
Revert "usb: dwc3: gadget: Avoid starting DWC3 gadget during UDC unbind"
This reverts commitb83692feb0which is commit8217f07a50upstream. 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:
@@ -1043,7 +1043,6 @@ struct dwc3_scratchpad_array {
|
|||||||
* @tx_fifo_resize_max_num: max number of fifos allocated during txfifo resize
|
* @tx_fifo_resize_max_num: max number of fifos allocated during txfifo resize
|
||||||
* @hsphy_interface: "utmi" or "ulpi"
|
* @hsphy_interface: "utmi" or "ulpi"
|
||||||
* @connected: true when we're connected to a host, false otherwise
|
* @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
|
* @delayed_status: true when gadget driver asks for delayed status
|
||||||
* @ep0_bounced: true when we used bounce buffer
|
* @ep0_bounced: true when we used bounce buffer
|
||||||
* @ep0_expect_in: true when we expect a DATA IN transfer
|
* @ep0_expect_in: true when we expect a DATA IN transfer
|
||||||
@@ -1264,7 +1263,6 @@ struct dwc3 {
|
|||||||
const char *hsphy_interface;
|
const char *hsphy_interface;
|
||||||
|
|
||||||
unsigned connected:1;
|
unsigned connected:1;
|
||||||
unsigned softconnect:1;
|
|
||||||
unsigned delayed_status:1;
|
unsigned delayed_status:1;
|
||||||
unsigned ep0_bounced:1;
|
unsigned ep0_bounced:1;
|
||||||
unsigned ep0_expect_in:1;
|
unsigned ep0_expect_in:1;
|
||||||
|
|||||||
@@ -2461,7 +2461,6 @@ static int dwc3_gadget_pullup(struct usb_gadget *g, int is_on)
|
|||||||
|
|
||||||
is_on = !!is_on;
|
is_on = !!is_on;
|
||||||
|
|
||||||
dwc->softconnect = is_on;
|
|
||||||
/*
|
/*
|
||||||
* Per databook, when we want to stop the gadget, if a control transfer
|
* 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.
|
* 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;
|
int ret;
|
||||||
|
|
||||||
if (!dwc->gadget_driver || !dwc->softconnect)
|
if (!dwc->gadget_driver)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
ret = __dwc3_gadget_start(dwc);
|
ret = __dwc3_gadget_start(dwc);
|
||||||
|
|||||||
Reference in New Issue
Block a user