Re: [PATCH] usb: xhci: dbc: get rid of global pointer

2019-06-19 Thread Mathias Nyman
On 19.6.2019 9.33, Felipe Balbi wrote: @Mathias, can you drop the previous fix? I'll try to come up with a better version of this. Dropped -Mathias

Re: [PATCH] usb: core: devio: add ioctls for suspend and resume

2019-06-19 Thread Oliver Neukum
Am Dienstag, den 18.06.2019, 11:50 -0400 schrieb Alan Stern: > On Tue, 18 Jun 2019, Mayuresh Kulkarni wrote: > > > > You're right that the program needs to know when the device is about > > > to > > > be suspended. But waiting for an ioctl to return isn't a good way > > > to do it; this needs t

Re: [PATCH] USB: serial: option: add support for GosunCn ME3630 RNDIS mode

2019-06-19 Thread Johan Hovold
On Wed, Jun 19, 2019 at 12:30:19AM +0200, Jörgen Storvist wrote: > Added USB IDs for GosunCn ME3630 cellular module in RNDIS mode. > > T: Bus=03 Lev=01 Prnt=01 Port=01 Cnt=03 Dev#= 18 Spd=480 MxCh= 0 > D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 > P: Vendor=19d2 ProdID=0601 Rev=

Re: [PATCH] usb: xhci: dbc: get rid of global pointer

2019-06-19 Thread Johan Hovold
On Wed, Jun 19, 2019 at 09:33:40AM +0300, Felipe Balbi wrote: > Johan Hovold writes: > > Are you sure you actually did register two xhci debug ttys? > > hmm, let me check: ... > Hmm, so it only really registers after writing to sysfs file. Man, this > is an odd driver :-) I hear you. :) > @M

Re: [PATCH] usb: core: devio: add ioctls for suspend and resume

2019-06-19 Thread Alan Stern
On Wed, 19 Jun 2019, Oliver Neukum wrote: > Am Dienstag, den 18.06.2019, 11:50 -0400 schrieb Alan Stern: > > On Tue, 18 Jun 2019, Mayuresh Kulkarni wrote: > > > > > > You're right that the program needs to know when the device is about > > > > to > > > > be suspended. But waiting for an ioctl t

Re: [PATCH] USB/Gadget: Fix race between gether_disconnect and rx_submit

2019-06-19 Thread Greg KH
On Wed, Jun 19, 2019 at 06:41:10AM +, kvaradarajan wrote: > On spin lock release in rx_submit, gether_disconnect get > a chance to run, it makes port_usb NULL, rx_submit access > NULL port USB, hence null pointer crash. > > Fixed by releasing the lock in rx_submit after port_usb > is

Re: [PATCH] usb: core: devio: add ioctls for suspend and resume

2019-06-19 Thread Oliver Neukum
Am Mittwoch, den 19.06.2019, 10:40 -0400 schrieb Alan Stern: > On Wed, 19 Jun 2019, Oliver Neukum wrote: > > It would be easiest to export the usb_autopm_* API to user space. > > But ->suspend and ->resume callbacks are part of that API, and as you > say, it is not feasible to have these callbac

Re: [PATCH] usb: core: devio: add ioctls for suspend and resume

2019-06-19 Thread Alan Stern
On Wed, 19 Jun 2019, Oliver Neukum wrote: > Am Mittwoch, den 19.06.2019, 10:40 -0400 schrieb Alan Stern: > > On Wed, 19 Jun 2019, Oliver Neukum wrote: > > > > It would be easiest to export the usb_autopm_* API to user space. > > > > But ->suspend and ->resume callbacks are part of that API, and

Re: [PATCH] usb: Replace a < b ? a : b construct with min_t(type, a, b) in adutux driver

2019-06-19 Thread dmg
Greg KH writes: > On Tue, Jun 18, 2019 at 10:22:52AM -0700, dmg wrote: >> >> Greg KH writes: >> >> >> diff --git a/drivers/usb/misc/adutux.c b/drivers/usb/misc/adutux.c >> >> index 9465fb95d70a..4a9fa3152f2a 100644 >> >> --- a/drivers/usb/misc/adutux.c >> >> +++ b/drivers/usb/misc/adutux.c >>

RE: [RFC] Sorting out dwc3 ISOC endpoints once and for all

2019-06-19 Thread John Youn
> -Original Message- > From: linux-usb-ow...@vger.kernel.org On > Behalf Of Felipe Balbi > Sent: Tuesday, June 18, 2019 11:29 PM > To: Thinh Nguyen ; Thinh Nguyen > ; John Youn > Cc: linux-usb@vger.kernel.org > Subject: Re: [RFC] Sorting out dwc3 ISOC endpoints once and for all > > >

Re: [PATCH] usb: Replace a < b ? a : b construct with min_t(type, a, b) in adutux driver

2019-06-19 Thread Greg KH
On Wed, Jun 19, 2019 at 09:39:55AM -0700, dmg wrote: > > Greg KH writes: > > > On Tue, Jun 18, 2019 at 10:22:52AM -0700, dmg wrote: > >> > >> Greg KH writes: > >> > >> >> diff --git a/drivers/usb/misc/adutux.c b/drivers/usb/misc/adutux.c > >> >> index 9465fb95d70a..4a9fa3152f2a 100644 > >> >> -

Re: [RFC] Sorting out dwc3 ISOC endpoints once and for all

2019-06-19 Thread Thinh Nguyen
Felipe Balbi wrote: > Hi, > > Thinh Nguyen writes: >> Would there be any obvious draw-back to going down this route? The thing >> is that, as it is, it seems like we will *always* have some corner case >> where we can't guarantee that we can even start a transfer since there's >> n

xHCI Driver Compliance Test Support

2019-06-19 Thread Rob Weber
Hi Mathias, I am working on running our custom USB dual-role product through some compliance testing. It seems that the SoC and host controller are not responding to the LFPS signaling and timeout that is supposed to automatically begin the compliance test sequence. I'm currently running a 4.9.11

[PATCH] usb: clean up some of the computations in adu_read

2019-06-19 Thread dmg
From: Daniel M German Replace ?: with min to calculate the number of bytes in the secondary buffer, including changing the data type of data_in_secondary to size_t to be type-consistent. data_in_secondary can never be negative. Remove some spurious calculations (copy_to_user returns zero on succ

RE: Adding NovAtel USB vendor & device ID to Kernel

2019-06-19 Thread SNELL James
Hi Johan, I apologize for the extreme delay in replying to your latest message. I was considering approaching this an entirely different way and have since returned to submitting the request directly to you. As such, I will now address each of your questions. -- Q1. Do your products support oth

Re: [PATCH] usb: gadget: avoid using gadget after freed

2019-06-19 Thread Lianwei Wang
On Tue, Jun 18, 2019 at 11:21 PM Felipe Balbi wrote: > > > Hi, > > Lianwei Wang writes: > >> Lianwei Wang writes: > >> > On Mon, Jun 17, 2019 at 5:40 AM Felipe Balbi wrote: > >> >> > >> >> Lianwei Wang writes: > >> >> > >> >> > The udc and gadget device will be deleted when udc device is > >>

[PATCH] usb: Replace snprintf with scnprintf in gether_get_ifname

2019-06-19 Thread dmg
From: Daniel M German snprintf returns the actual length of the buffer created; however, this is not the case if snprintf truncates its parameter. See https://lwn.net/Articles/69419/ for a detailed explanation. The current code correctly handles this case at the expense of extra code in the retur

Re: [PATCH] usb: gadget: avoid using gadget after freed

2019-06-19 Thread Felipe Balbi
Hi, Lianwei Wang writes: > On Tue, Jun 18, 2019 at 11:21 PM Felipe Balbi wrote: >> >> >> Hi, >> >> Lianwei Wang writes: >> >> Lianwei Wang writes: >> >> > On Mon, Jun 17, 2019 at 5:40 AM Felipe Balbi wrote: >> >> >> >> >> >> Lianwei Wang writes: >> >> >> >> >> >> > The udc and gadget devi

Re: [PATCH] usb: gadget: avoid using gadget after freed

2019-06-19 Thread Lianwei Wang
On Wed, Jun 19, 2019 at 10:55 PM Felipe Balbi wrote: > > > Hi, > > Lianwei Wang writes: > > > On Tue, Jun 18, 2019 at 11:21 PM Felipe Balbi wrote: > >> > >> > >> Hi, > >> > >> Lianwei Wang writes: > >> >> Lianwei Wang writes: > >> >> > On Mon, Jun 17, 2019 at 5:40 AM Felipe Balbi wrote: > >>