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

2018-06-20 Thread Rafael J. Wysocki
On Thu, Jun 21, 2018 at 12:32 AM, Rafael J. Wysocki wrote: > On Wed, Jun 20, 2018 at 5:46 PM, Johan Hovold wrote: >> On Wed, Jun 20, 2018 at 02:54:10PM +0200, Rafael J. Wysocki wrote: >>> On Wednesday, June 20, 2018 2:23:46 PM CEST Johan Hovold wrote: >>> > On Wed, Jun 20, 2018 at 02:16:59AM

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

2018-06-20 Thread Rafael J. Wysocki
On Wed, Jun 20, 2018 at 5:46 PM, Johan Hovold wrote: > On Wed, Jun 20, 2018 at 02:54:10PM +0200, Rafael J. Wysocki wrote: >> On Wednesday, June 20, 2018 2:23:46 PM CEST Johan Hovold wrote: >> > On Wed, Jun 20, 2018 at 02:16:59AM -0700, Tony Lindgren wrote: >> > > Hi, >> > > >> > > Adding Rafael

Re: [PATCH 8/9] ALSA: usx2y: usbusx2yaudio: use usb_fill_int_urb()

2018-06-20 Thread Takashi Iwai
On Wed, 20 Jun 2018 17:47:01 +0200, Sebastian Andrzej Siewior wrote: > > On 2018-06-20 17:38:44 [+0200], To Takashi Iwai wrote: > > okay, as you wish: > > I'm sorry, I compiled one patch and send the other. Here is the fixed > one. Well, you seem to have forgotten to update the changelog...

Re: UAC2 gadget not recognized on Windows 10

2018-06-20 Thread Jassi Brar
On Wed, Jun 20, 2018 at 9:16 PM, jonsm...@gmail.com wrote: > On Wed, Jun 20, 2018 at 11:19 AM Jassi Brar wrote: >> >> On Wed, Jun 20, 2018 at 8:32 PM, jonsm...@gmail.com >> wrote: >> > >> > >> > >> > On Wed, Jun 20, 2018 at 9:36 AM Jassi Brar >> > wrote: >> >> >> >> On Tue, Feb 13, 2018 at

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

2018-06-20 Thread Johan Hovold
On Wed, Jun 20, 2018 at 02:54:10PM +0200, Rafael J. Wysocki wrote: > On Wednesday, June 20, 2018 2:23:46 PM CEST Johan Hovold wrote: > > On Wed, Jun 20, 2018 at 02:16:59AM -0700, Tony Lindgren wrote: > > > Hi, > > > > > > Adding Rafael and linux-pm to Cc as well. > > > > > > * Felipe Balbi

Re: [PATCH 8/9] ALSA: usx2y: usbusx2yaudio: use usb_fill_int_urb()

2018-06-20 Thread Sebastian Andrzej Siewior
On 2018-06-20 17:38:44 [+0200], To Takashi Iwai wrote: > okay, as you wish: I'm sorry, I compiled one patch and send the other. Here is the fixed one. > > thanks, > > > > Takashi > --- >8 Subject: [PATCH 8/9 v4] ALSA: usx2y: usbusx2yaudio: use usb_fill_int_urb() Using

Re: UAC2 gadget not recognized on Windows 10

2018-06-20 Thread jonsm...@gmail.com
On Wed, Jun 20, 2018 at 11:19 AM Jassi Brar wrote: > > On Wed, Jun 20, 2018 at 8:32 PM, jonsm...@gmail.com > wrote: > > > > > > > > On Wed, Jun 20, 2018 at 9:36 AM Jassi Brar wrote: > >> > >> On Tue, Feb 13, 2018 at 3:02 PM, Robert Bielik > >> wrote: > >> >> Enabling SOF interrupts will be a

Re: UAC2 gadget not recognized on Windows 10

2018-06-20 Thread Jassi Brar
On Wed, Jun 20, 2018 at 8:32 PM, jonsm...@gmail.com wrote: > > > > On Wed, Jun 20, 2018 at 9:36 AM Jassi Brar wrote: >> >> On Tue, Feb 13, 2018 at 3:02 PM, Robert Bielik >> wrote: >> >> Enabling SOF interrupts will be a big pain :-) Well, enabling the >> >> interrupt itself is a no-brainer,

Re: [PATCH 8/9] ALSA: usx2y: usbusx2yaudio: use usb_fill_int_urb()

2018-06-20 Thread Takashi Iwai
On Wed, 20 Jun 2018 16:39:22 +0200, Sebastian Andrzej Siewior wrote: > > On 2018-06-20 14:51:12 [+0200], Takashi Iwai wrote: > > On Tue, 19 Jun 2018 23:55:20 +0200, > > Sebastian Andrzej Siewior wrote: > > > - (*purb)->transfer_buffer = > > > -

Re: [PATCH 8/9] ALSA: usx2y: usbusx2yaudio: use usb_fill_int_urb()

2018-06-20 Thread Sebastian Andrzej Siewior
On 2018-06-20 14:51:12 [+0200], Takashi Iwai wrote: > On Tue, 19 Jun 2018 23:55:20 +0200, > Sebastian Andrzej Siewior wrote: > > - (*purb)->transfer_buffer = > > - kmalloc_array(subs->maxpacksize, > > -

Re: [PATCH 4/9 v2] ALSA: usb-audio: use usb_fill_int_urb()

2018-06-20 Thread Takashi Iwai
On Wed, 20 Jun 2018 15:56:53 +0200, Takashi Iwai wrote: > > On Wed, 20 Jun 2018 15:52:49 +0200, > Sebastian Andrzej Siewior wrote: > > > > On 2018-06-20 15:21:49 [+0200], Takashi Iwai wrote: > > > > usb_fill_int_urb() ensures that syncinterval is within the allowed range > > > > on HS/SS. The

Re: [PATCH 4/9 v2] ALSA: usb-audio: use usb_fill_int_urb()

2018-06-20 Thread Takashi Iwai
On Wed, 20 Jun 2018 15:52:49 +0200, Sebastian Andrzej Siewior wrote: > > On 2018-06-20 15:21:49 [+0200], Takashi Iwai wrote: > > > usb_fill_int_urb() ensures that syncinterval is within the allowed range > > > on HS/SS. The interval value seems to come from > > > snd_usb_parse_datainterval()

Re: [PATCH 4/9 v2] ALSA: usb-audio: use usb_fill_int_urb()

2018-06-20 Thread Sebastian Andrzej Siewior
On 2018-06-20 15:21:49 [+0200], Takashi Iwai wrote: > > usb_fill_int_urb() ensures that syncinterval is within the allowed range > > on HS/SS. The interval value seems to come from > > snd_usb_parse_datainterval() which is bInterval - 1 and only in the rage > > 1 … 4. So in order to keep the magic

Re: UAC2 gadget not recognized on Windows 10

2018-06-20 Thread Jassi Brar
On Tue, Feb 13, 2018 at 3:02 PM, Robert Bielik wrote: >> Enabling SOF interrupts will be a big pain :-) Well, enabling the >> interrupt itself is a no-brainer, but it'll cause terrible CPU overload. > > Oh, I see. Hmm... would it be possible to allow upper levels to config this > dynamically ?

Re: [PATCH 4/9 v2] ALSA: usb-audio: use usb_fill_int_urb()

2018-06-20 Thread Takashi Iwai
On Wed, 20 Jun 2018 11:38:27 +0200, Sebastian Andrzej Siewior wrote: > > Using usb_fill_int_urb() helps to find code which initializes an > URB. A grep for members of the struct (like ->complete) reveal lots > of other things, too. > > data_ep_set_params() additionally sets

Re: ALSA: use irqsave() in URB completion + usb_fill_int_urb

2018-06-20 Thread Takashi Iwai
On Tue, 19 Jun 2018 23:55:12 +0200, Sebastian Andrzej Siewior wrote: > > This series is mostly about using _irqsave() primitives in the > completion callback in order to get rid of local_irq_save() in > __usb_hcd_giveback_urb(). While at it, I also tried to move drivers to > use

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

2018-06-20 Thread Rafael J. Wysocki
On Wednesday, June 20, 2018 2:23:46 PM CEST Johan Hovold wrote: > On Wed, Jun 20, 2018 at 02:16:59AM -0700, Tony Lindgren wrote: > > Hi, > > > > Adding Rafael and linux-pm to Cc as well. > > > > * Felipe Balbi [180619 01:23]: > > > This is a direct consequence of not paying attention to the

Re: [PATCH 8/9] ALSA: usx2y: usbusx2yaudio: use usb_fill_int_urb()

2018-06-20 Thread Takashi Iwai
On Tue, 19 Jun 2018 23:55:20 +0200, Sebastian Andrzej Siewior wrote: > > Using usb_fill_int_urb() helps to find code which initializes an > URB. A grep for members of the struct (like ->complete) reveal lots > of other things, too. > > The "&& !(*purb)->transfer_buffer" check has been removed

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

2018-06-20 Thread Johan Hovold
On Wed, Jun 20, 2018 at 02:16:59AM -0700, Tony Lindgren wrote: > Hi, > > Adding Rafael and linux-pm to Cc as well. > > * Felipe Balbi [180619 01:23]: > > This is a direct consequence of not paying attention to the order of > > things. If driver were to assume that pm_domain->activate() would do

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

2018-06-20 Thread Rafael J. Wysocki
On Wed, Jun 20, 2018 at 1:05 PM, Felipe Balbi wrote: > "Rafael J. Wysocki" writes: > >> On Wed, Jun 20, 2018 at 11:27 AM, Felipe Balbi wrote: >>> >>> Hi, >>> >>> Tony Lindgren writes: * Felipe Balbi [180619 01:23]: > This is a direct consequence of not paying attention to the order

[GIT PULL] USB fixes for v4.18-rc1

2018-06-20 Thread Felipe Balbi
Hi Greg, here's the first set of fixes for current -rc cycle. Patches have been soaking for a while and I've also tested on some of our platforms from the lab. Let me know if you want anything to be changed. cheers The following changes since commit ce397d215ccd07b8ae3f71db689aedb85d56ab40:

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

2018-06-20 Thread Felipe Balbi
"Rafael J. Wysocki" writes: > On Wed, Jun 20, 2018 at 11:27 AM, Felipe Balbi wrote: >> >> Hi, >> >> Tony Lindgren writes: >>> * Felipe Balbi [180619 01:23]: This is a direct consequence of not paying attention to the order of things. If driver were to assume that

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

2018-06-20 Thread Rafael J. Wysocki
On Wed, Jun 20, 2018 at 11:27 AM, Felipe Balbi wrote: > > Hi, > > Tony Lindgren writes: >> * Felipe Balbi [180619 01:23]: >>> This is a direct consequence of not paying attention to the order of >>> things. If driver were to assume that pm_domain->activate() would do the >>> right thing for the

[PATCH 4/9 v2] ALSA: usb-audio: use usb_fill_int_urb()

2018-06-20 Thread Sebastian Andrzej Siewior
Using usb_fill_int_urb() helps to find code which initializes an URB. A grep for members of the struct (like ->complete) reveal lots of other things, too. data_ep_set_params() additionally sets urb->transfer_buffer_length which was not the case earlier. usb_fill_int_urb() ensures that

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

2018-06-20 Thread Felipe Balbi
Hi, Tony Lindgren writes: > * Felipe Balbi [180619 01:23]: >> This is a direct consequence of not paying attention to the order of >> things. If driver were to assume that pm_domain->activate() would do the >> right thing for the device -- meaning that probe would run with an >> active device

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

2018-06-20 Thread Tony Lindgren
Hi, Adding Rafael and linux-pm to Cc as well. * Felipe Balbi [180619 01:23]: > This is a direct consequence of not paying attention to the order of > things. If driver were to assume that pm_domain->activate() would do the > right thing for the device -- meaning that probe would run with an >

Re: [PATCH] USB: serial: ftdi_sio: Add MTP NVM support

2018-06-20 Thread Srinivas Kandagatla
Overall nvmem side looks good! Minor nits below. On 14/06/18 21:08, Loic Poulain wrote: Most of FTDI's devices have an EEPROM which records FTDI devices configuration setting (e.g. the VID, PID, I/O config...) and user data. FT230R chip integrates a 128-byte eeprom, FT230X a 2048-byte eeprom...

Re: [PATCH] USB: serial: ftdi_sio: Add MTP NVM support

2018-06-20 Thread Loic Poulain
Hi Johan, Srini, On 19 June 2018 at 15:06, Johan Hovold wrote: > On Tue, Jun 19, 2018 at 02:32:11PM +0200, Loic Poulain wrote: >> Hi Johan, Srini, >> >> On 18 June 2018 at 11:47, Srinivas Kandagatla >> wrote: >> > On 18/06/18 09:46, Johan Hovold wrote: > >> >> I'm not necessarily against the

Re: [PATCH 4/9] ALSA: usb-audio: use usb_fill_int_urb()

2018-06-20 Thread Sergei Shtylyov
Hello! On 6/20/2018 12:55 AM, Sebastian Andrzej Siewior wrote: Using usb_fill_int_urb() helps to find code which initializes an URB. A grep for members of the struct (like ->complete) reveal lots of other things, too. data_ep_set_params() additionally sets urb->transfer_buffer_length which