Re: [RFC][PATCH 2/5] usb: dwc2: Workaround case where GOTGCTL state is wrong

2016-12-13 Thread John Stultz
On Tue, Dec 13, 2016 at 4:28 AM, Vardan Mikayelyan wrote: > On 12/13/2016 11:12 AM, John Stultz wrote: >> When removing a USB-A to USB-otg adapter cable, we get a change >> status irq, and then in dwc2_conn_id_status_change, we >> erroniously see the GOTGCTL_CONID_B flag set. This causes us to >>

Re: [RFC][PATCH 2/5] usb: dwc2: Workaround case where GOTGCTL state is wrong

2016-12-13 Thread Vardan Mikayelyan
On 12/13/2016 11:12 AM, John Stultz wrote: > When removing a USB-A to USB-otg adapter cable, we get a change > status irq, and then in dwc2_conn_id_status_change, we > erroniously see the GOTGCTL_CONID_B flag set. This causes us to > get stuck in the "while (!dwc2_is_device_mode(hsotg))" loop, > s

[RFC][PATCH 2/5] usb: dwc2: Workaround case where GOTGCTL state is wrong

2016-12-12 Thread John Stultz
When removing a USB-A to USB-otg adapter cable, we get a change status irq, and then in dwc2_conn_id_status_change, we erroniously see the GOTGCTL_CONID_B flag set. This causes us to get stuck in the "while (!dwc2_is_device_mode(hsotg))" loop, spitting out "Waiting for Peripheral Mode, Mode=Host"