RE: [PATCH] usb: dwc2: gadget: Fix issue in dwc2_gadget_start_isoc()

2018-06-13 Thread Zengtao (B)
Hi Minas: >-Original Message- >From: linux-usb-ow...@vger.kernel.org >[mailto:linux-usb-ow...@vger.kernel.org] On Behalf Of Minas Harutyunyan >Sent: Tuesday, June 12, 2018 4:37 PM >To: Felipe Balbi ; Greg Kroah-Hartman >; Minas Harutyunyan >; linux-usb@vger.kernel.org >Cc: John Youn

Re: [PATCH v2] USB: cdc-wdm: don't enable interrupts in USB-giveback

2018-06-13 Thread Sebastian Andrzej Siewior
On 2018-06-13 19:43:55 [+0200], Oliver Neukum wrote: > On Mi, 2018-06-13 at 18:28 +0200, Sebastian Andrzej Siewior wrote: > > The function service_outstanding_interrupt() will unconditionally enable > > interrupts during unlock and invoke usb_submit_urb() with GFP_KERNEL. > > If the HCD completes

Re: [PATCH v2] USB: cdc-wdm: don't enable interrupts in USB-giveback

2018-06-13 Thread Oliver Neukum
On Mi, 2018-06-13 at 18:28 +0200, Sebastian Andrzej Siewior wrote: > The function service_outstanding_interrupt() will unconditionally enable > interrupts during unlock and invoke usb_submit_urb() with GFP_KERNEL. > If the HCD completes in BH (like ehci does) then the context remains > atomic due

[PATCH v2] USB: cdc-wdm: don't enable interrupts in USB-giveback

2018-06-13 Thread Sebastian Andrzej Siewior
In the code path __usb_hcd_giveback_urb() -> wdm_in_callback() -> service_outstanding_interrupt() The function service_outstanding_interrupt() will unconditionally enable interrupts during unlock and invoke usb_submit_urb() with GFP_KERNEL. If the HCD completes in BH (like ehci does) then

Re: USB role switches, usb-connector, typec and device trees

2018-06-13 Thread Heikki Krogerus
On Tue, Jun 12, 2018 at 07:16:03PM +0200, Mats Karrman wrote: > On 2018-06-07 14:01, Heikki Krogerus wrote: > > > On Thu, Jun 07, 2018 at 09:22:56AM +0200, Hans de Goede wrote: > > > Hi, > > > > > > On 06-06-18 23:36, Mats Karrman wrote: > > > > Hello Gentlemen, > > > > > > > > I'm trying to

Re: [PATCH v3] storage: Widen bcdDevice range for SanDisk SDDR-31 quirk

2018-06-13 Thread Mark Knibbs
The SanDisk SDDR-31 needs the US_FL_FIX_CAPACITY quirk. Previously that was only applied for bcdDevice 0x0009, but later firmware which reports bcdDevice 0x0022 needs it too. Signed-off-by: Mark Knibbs --- v4: Max. bcdDevice is 0x0022 again, removed extraneous text v3: Fixed tabs, but

RE: [PATCH v6 12/15] usb: typec: tcpm: set cc for drp toggling attach

2018-06-13 Thread Jun Li
Hi > -Original Message- > From: Jun Li > Sent: 2018年6月13日 19:07 > To: Guenter Roeck ; Heikki Krogerus > ; shufan_...@richtek.com > Cc: robh...@kernel.org; gre...@linuxfoundation.org; cw00.c...@samsung.com; > a.ha...@samsung.com; Peter Chen ; > garsi...@embeddedor.com; gso...@gmail.com;

RE: [PATCH v6 12/15] usb: typec: tcpm: set cc for drp toggling attach

2018-06-13 Thread Jun Li
Hi, > -Original Message- > From: Guenter Roeck [mailto:groe...@gmail.com] On Behalf Of Guenter Roeck > Sent: 2018年6月11日 21:35 > To: Heikki Krogerus ; Jun Li > Cc: robh...@kernel.org; gre...@linuxfoundation.org; cw00.c...@samsung.com; > a.ha...@samsung.com; shufan_...@richtek.com; Peter

Re: Regarding usb: gadget: ffs: Fix BUG when userland exits with submitted AIO transfers

2018-06-13 Thread Vincent Pelletier
Hello, On Sat, 2 Jun 2018 01:02:24 +0300, Sam Protsenko wrote: > Hi Vincent, > > The issue you mentioned in your RFC patch is also reproducing on TI > X15 board (dwc3) with Android master, when doing "adb root" command. > Your patch fixes it just fine, for which I really thankful. Thanks a lot

usb: gadget: ffs: Fix BUG when userland exits with submitted AIO transfers

2018-06-13 Thread Vincent Pelletier
This bug happens only when the UDC needs to sleep during usb_ep_dequeue, as is the case for (at least) dwc3. [ 382.200896] BUG: scheduling while atomic: screen/1808/0x0100 [ 382.207124] 4 locks held by screen/1808: [ 382.211266] #0: (rcu_callback){}, at: []

Re: [PATCH] usb: dwc3: of-simple: fix use-after-free on remove

2018-06-13 Thread Johan Hovold
On Wed, Jun 13, 2018 at 12:39:18PM +0300, Felipe Balbi wrote: > Roger Quadros writes: > > I'm still trying to get my head around this. > > > > in probe() we do > > { > > enable all clocks; > > pm_runtime_set_active(dev); > > pm_runtime_enable(dev); > >

RE: [PATCH v6 05/15] usb: typec: add API to get typec basic port power and data config

2018-06-13 Thread Jun Li
Hi Heikki, > -Original Message- > From: Heikki Krogerus [mailto:heikki.kroge...@linux.intel.com] > Sent: 2018年6月11日 19:09 > To: Jun Li > Cc: robh...@kernel.org; gre...@linuxfoundation.org; li...@roeck-us.net; > cw00.c...@samsung.com; a.ha...@samsung.com; shufan_...@richtek.com; > Peter

Re: [PATCH] usb: dwc3: of-simple: fix use-after-free on remove

2018-06-13 Thread Felipe Balbi
Roger Quadros writes: > On 13/06/18 11:05, Felipe Balbi wrote: >> Roger Quadros writes: >> >>> Hi Johan, >>> >>> On 31/05/18 17:45, Johan Hovold wrote: The clocks have already been explicitly disabled and put as part of remove() so the runtime suspend callback must not be run when

Re: [PATCH] USB: cdc-wdm: don't enable interrupts in USB-giveback

2018-06-13 Thread Oliver Neukum
On Di, 2018-06-12 at 21:57 +0200, Sebastian Andrzej Siewior wrote: > > Yes, the atomic case should be rare. It will only happen on errors, and > > IIUC that's only to work around issues caused by reporting errors back > > to userspace without actually wanting to err out anyway. > > Yup. The

Re: [PATCH] usb: dwc3: of-simple: fix use-after-free on remove

2018-06-13 Thread Roger Quadros
On 13/06/18 11:05, Felipe Balbi wrote: > Roger Quadros writes: > >> Hi Johan, >> >> On 31/05/18 17:45, Johan Hovold wrote: >>> The clocks have already been explicitly disabled and put as part of >>> remove() so the runtime suspend callback must not be run when balancing >>> the runtime PM usage

Re: [PATCH] usb: dwc3: of-simple: fix use-after-free on remove

2018-06-13 Thread Felipe Balbi
Roger Quadros writes: > Hi Johan, > > On 31/05/18 17:45, Johan Hovold wrote: >> The clocks have already been explicitly disabled and put as part of >> remove() so the runtime suspend callback must not be run when balancing >> the runtime PM usage count before returning. >> >> Fixes:

Re: [PATCH] usb: dwc3: of-simple: fix use-after-free on remove

2018-06-13 Thread Roger Quadros
Hi Johan, On 31/05/18 17:45, Johan Hovold wrote: > The clocks have already been explicitly disabled and put as part of > remove() so the runtime suspend callback must not be run when balancing > the runtime PM usage count before returning. > > Fixes: 16adc674d0d6 ("usb: dwc3: add generic OF glue

Re: USB role switches, usb-connector, typec and device trees

2018-06-13 Thread Andrzej Hajda
On 12.06.2018 19:33, Mats Karrman wrote: > Hi Andrzej, > > On 2018-06-07 13:40, Andrzej Hajda wrote: > >> On 06.06.2018 23:36, Mats Karrman wrote: >>> Hello Gentlemen, >>> >>> I'm trying to get my head around USB role switches in connection with >>> Type-C ports >>> and device-trees. So far I

Re: [PATCH v7] usb: gadget: uvc: configfs: Add bFrameIndex attributes

2018-06-13 Thread Joel Pepper
Hi Laurent, looks good to me; I have no complaints. On 13.06.2018 00:58, Laurent Pinchart wrote: > From: Joel Pepper > > - Add bFrameIndex as a UVCG_FRAME_ATTR_RO for each frame size. > - Automatically assign ascending bFrameIndex to each frame in a format. > > Before all "bFrameindex"