Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-17 Thread Doug Anderson
Alan, On Tue, Nov 17, 2015 at 7:40 AM, Alan Stern wrote: > On Mon, 16 Nov 2015, Doug Anderson wrote: > >> > Fundamentally there's no difference between a "connect" interrupt and a >> > "disconnect" interrupt. They should both do exactly the same things: >> > clear the interrupt source, post a "c

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-17 Thread Alan Stern
On Mon, 16 Nov 2015, Doug Anderson wrote: > > Fundamentally there's no difference between a "connect" interrupt and a > > "disconnect" interrupt. They should both do exactly the same things: > > clear the interrupt source, post a "connection change" event, and set > > the driver's connect status

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-16 Thread Doug Anderson
John, On Mon, Nov 16, 2015 at 5:53 PM, John Youn wrote: > Yup it's only available in host mode. The same with all the > host-mode registers. You will get a ModeMis interrupt if you > try to access them in device mode. > > I gave my test-by on the v2 patches earlier, no problems here. Yup, I appr

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-16 Thread John Youn
On 11/16/2015 3:14 PM, Doug Anderson wrote: > Alan, > > On Mon, Nov 16, 2015 at 12:31 PM, Alan Stern > wrote: >> On Mon, 16 Nov 2015, Doug Anderson wrote: >> >>> Alan, >>> >>> On Mon, Nov 16, 2015 at 11:31 AM, Alan Stern >>> wrote: On Mon, 16 Nov 2015, Doug Anderson wrote: > ---

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-16 Thread Doug Anderson
Alan, On Mon, Nov 16, 2015 at 12:31 PM, Alan Stern wrote: > On Mon, 16 Nov 2015, Doug Anderson wrote: > >> Alan, >> >> On Mon, Nov 16, 2015 at 11:31 AM, Alan Stern >> wrote: >> > On Mon, 16 Nov 2015, Doug Anderson wrote: >> > >> >> --- >> >> >> >> usb: dwc2: host: Fix missing device insertions

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-16 Thread Alan Stern
On Mon, 16 Nov 2015, Julius Werner wrote: > Another point to note, which I think is what prevents the flow Alan > suggested from working, is this little snippet in DWC2's hub_control > GetPortStatus callback: > > if (!hsotg->flags.b.port_connect_status) { >

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-16 Thread Alan Stern
On Mon, 16 Nov 2015, Doug Anderson wrote: > Alan, > > On Mon, Nov 16, 2015 at 11:31 AM, Alan Stern > wrote: > > On Mon, 16 Nov 2015, Doug Anderson wrote: > > > >> --- > >> > >> usb: dwc2: host: Fix missing device insertions > >> > >> If you've got your interrupt signals bouncing a bit as you in

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-16 Thread Julius Werner
Another point to note, which I think is what prevents the flow Alan suggested from working, is this little snippet in DWC2's hub_control GetPortStatus callback: if (!hsotg->flags.b.port_connect_status) { /* * The port is disconnected

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-16 Thread Doug Anderson
Alan, On Mon, Nov 16, 2015 at 11:31 AM, Alan Stern wrote: > On Mon, 16 Nov 2015, Doug Anderson wrote: > >> --- >> >> usb: dwc2: host: Fix missing device insertions >> >> If you've got your interrupt signals bouncing a bit as you insert your >> USB device, you might end up in a state when the devi

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-16 Thread Alan Stern
On Mon, 16 Nov 2015, Doug Anderson wrote: > --- > > usb: dwc2: host: Fix missing device insertions > > If you've got your interrupt signals bouncing a bit as you insert your > USB device, you might end up in a state when the device is connected but > the driver doesn't know it. > > Specifically

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-16 Thread Felipe Balbi
hi, Doug Anderson writes: > Felipe, > > On Mon, Nov 16, 2015 at 10:22 AM, Felipe Balbi wrote: >>> I added "force" in v2 of the patch in response to John's feedback to >>> v1. He pointed out that when you unload the module when you have a >>> device connected that my v1 patch would not properly

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-16 Thread Doug Anderson
Felipe, On Mon, Nov 16, 2015 at 10:22 AM, Felipe Balbi wrote: >> I added "force" in v2 of the patch in response to John's feedback to >> v1. He pointed out that when you unload the module when you have a >> device connected that my v1 patch would not properly disconnect the >> device (or, rather

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-16 Thread Felipe Balbi
Hi, Doug Anderson writes: > Felipe, > > On Mon, Nov 16, 2015 at 9:44 AM, Felipe Balbi wrote: >>> extern void dwc2_hcd_start(struct dwc2_hsotg *hsotg); >>> #else >>> static inline int dwc2_hcd_get_frame_number(struct dwc2_hsotg *hsotg) >>> { return 0; } >>> -static inline void dwc2_hcd_disco

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-16 Thread Doug Anderson
Felipe, On Mon, Nov 16, 2015 at 9:44 AM, Felipe Balbi wrote: >> extern void dwc2_hcd_start(struct dwc2_hsotg *hsotg); >> #else >> static inline int dwc2_hcd_get_frame_number(struct dwc2_hsotg *hsotg) >> { return 0; } >> -static inline void dwc2_hcd_disconnect(struct dwc2_hsotg *hsotg) {} >> +

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-16 Thread Felipe Balbi
Hi, (replying here for the context of why I think this is NOT the smallest patch possible for the -rc) Douglas Anderson writes: > If you've got your interrupt signals bouncing a bit as you insert your > USB device, you might end up in a state when the device is connected but > the driver doesn'

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-04 Thread John Youn
On 11/3/2015 12:31 PM, Douglas Anderson wrote: > If you've got your interrupt signals bouncing a bit as you insert your > USB device, you might end up in a state when the device is connected but > the driver doesn't know it. > > Specifically, the observed order is: > 1. hardware sees connect > 2

[PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-03 Thread Douglas Anderson
If you've got your interrupt signals bouncing a bit as you insert your USB device, you might end up in a state when the device is connected but the driver doesn't know it. Specifically, the observed order is: 1. hardware sees connect 2. hardware sees disconnect 3. hardware sees connect 4. dwc2