[PATCH 2/6] xhci: handle port status events for removed USB3 hcd

2018-11-12 Thread Mathias Nyman
At xhci removal the USB3 hcd (shared_hcd) is removed before the primary USB2 hcd. Interrupts for port status changes may still occur for USB3 ports after the shared_hcd is freed, causing NULL pointer dereference. Check if xhci->shared_hcd is still valid before handing USB3 port events Cc: Repor

[PATCH 1/6] xhci: Fix leaking USB3 shared_hcd at xhci removal

2018-11-12 Thread Mathias Nyman
Ensure that the shared_hcd pointer is valid when calling usb_put_hcd() The shared_hcd is removed and freed in xhci by first calling usb_remove_hcd(xhci->shared_hcd), and later usb_put_hcd(xhci->shared_hcd) Afer commit fe190ed0d602 ("xhci: Do not halt the host until both HCD have disconnected thei

[PATCH 0/6] xhci fixes for usb-linus

2018-11-12 Thread Mathias Nyman
A few xhci fixes for usb-linus, among othres fixing a hcd leak at removal, setting timout values correctly, and making sure USB3 and USB2 ports don't get mixed up in resume when port speed field may be unreliable. This series was sent to Greg and other patch stakeholders earlier,but due to a typ

[PATCH 4/6] usb: xhci: fix uninitialized completion when USB3 port got wrong status

2018-11-12 Thread Mathias Nyman
From: Aaron Ma Realtek USB3.0 Card Reader [0bda:0328] reports wrong port status on Cannon lake PCH USB3.1 xHCI [8086:a36d] after resume from S3, after clear port reset it works fine. Since this device is registered on USB3 roothub at boot, when port status reports not superspeed, xhci_get_port_s

[PATCH 3/6] xhci: Add check for invalid byte size error when UAS devices are connected.

2018-11-12 Thread Mathias Nyman
From: Sandeep Singh Observed "TRB completion code (27)" error which corresponds to Stopped - Length Invalid error(xhci spec section 4.17.4) while connecting USB to SATA bridge. Looks like this case was not considered when the following patch[1] was committed. Hence adding this new check which ca

[PATCH 5/6] usb: xhci: fix timeout for transition from RExit to U0

2018-11-12 Thread Mathias Nyman
From: Aaron Ma This definition is used by msecs_to_jiffies in milliseconds. According to the comments, max rexit timeout should be 20ms. Align with the comments to properly calculate the delay. Verified on Sunrise Point-LP and Cannon Lake. Cc: sta...@vger.kernel.org Signed-off-by: Aaron Ma Sig

[PATCH 6/6] xhci: Add quirk to workaround the errata seen on Cavium Thunder-X2 Soc

2018-11-12 Thread Mathias Nyman
From: "Cherian, George" Implement workaround for ThunderX2 Errata-129 (documented in CN99XX Known Issues" available at Cavium support site). As per ThunderX2errata-129, USB 2 device may come up as USB 1 if a connection to a USB 1 device is followed by another connection to a USB 2 device, the lin

Re: [PATCH -next] USB: serial: quatech2: remove set but not used variable 'port_priv'

2018-11-12 Thread Johan Hovold
On Thu, Oct 11, 2018 at 07:44:33AM +, YueHaibing wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/usb/serial/quatech2.c: In function 'qt2_process_read_urb': > drivers/usb/serial/quatech2.c:503:27: warning: > variable 'port_priv' set but not used [-Wunused-but-set-variable]

Re: [PATCH] Improve the accuracy of the baud rate generator by using round-to-closest instead of truncating when calculating baud rate divisors.

2018-11-12 Thread Johan Hovold
On Wed, Oct 31, 2018 at 09:16:48PM +0100, Nikolaj Fogh wrote: > I have experienced that the ftdi_sio driver gives less-than-optimal baud > rates as the driver truncates instead of rounds to nearest during baud rate > divisor calculation. Please break your lines at 72 cols or so, and use the comm

Inquiry 12/11/2018

2018-11-12 Thread sinara-group
Hi,friend, This is Daniel Murray and i am from Sinara Group Co.Ltd Group Co.,LTD in Russia. We are glad to know about your company from the web and we are interested in your products. Could you kindly send us your Latest catalog and price list for our trial order. Best Regards, Daniel Murray

Re: [PATCH 3/3] usb: dwc3: Support option to disable USB2 LPM

2018-11-12 Thread Roger Quadros
Thinh, On 12/11/18 07:29, Thinh Nguyen wrote: > Hi Roger, > > On 11/9/2018 3:58 AM, Roger Quadros wrote: >> Hi, >> >> On 08/11/18 04:10, Thinh Nguyen wrote: >>> Support the option to disable USB2 LPM. Set xhci "usb2-lpm-disable" >>> property via "snps,usb2-lpm-disable" property. >>> >>> Signed-of

Re: Adding NovAtel USB vendor & device ID to Kernel

2018-11-12 Thread Johan Hovold
On Thu, Nov 08, 2018 at 01:07:47AM +, SNELL James wrote: > Hello, > We produce extremely high-end GNSS (GPS, etc) receivers that are often > used for a very wide range of applications. Our receivers can be > connected to via USB, which will provide 3 USB-to-serial ports that > can be used to is

Re: [PATCH 3/3] usb: dwc3: Support option to disable USB2 LPM

2018-11-12 Thread Felipe Balbi
Hi, Roger Quadros writes: >>> Also can we have some consistency in usage of '-' vs '_'? >> Right.. I agree. I've been using '-' as it is the preferred syntax as >> most of the properties, but some old properties use '_'. Do you have any >> suggestion? > > I'd keep it consistent to "snps,usb3_lpm

Re: [PATCH 3/3] usb: dwc3: Support option to disable USB2 LPM

2018-11-12 Thread Roger Quadros
On 12/11/18 13:03, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: Also can we have some consistency in usage of '-' vs '_'? >>> Right.. I agree. I've been using '-' as it is the preferred syntax as >>> most of the properties, but some old properties use '_'. Do you have any >>> sugge

Re: Query on usb/core/devio.c

2018-11-12 Thread Mayuresh Kulkarni
On Fri, 2018-11-09 at 10:33 -0500, Alan Stern wrote: > On Fri, 9 Nov 2018, Mayuresh Kulkarni wrote: > > > > > > > > > The driver has no way to tell whether the resume was caused by the  > > > host or by the device.  (In fact, it's possible for a resume to be  > > > caused by _both_ the host and

Re: Query on usb/core/devio.c

2018-11-12 Thread Oliver Neukum
On Mo, 2018-11-12 at 12:04 +, Mayuresh Kulkarni wrote: > I think I now understand the disconnect between us this point. Below is an > attempt to bridge that, so please bear with me: > 1. In our use-case(s), the end user can "interact" with composite USB device > either by physically interacting

[PATCH] dma: cppi41: delete channel from pending list when stop channel

2018-11-12 Thread Bin Liu
The driver defines three states for a cppi channel. - idle: .chan_busy == 0 && not in .pending list - pending: .chan_busy == 0 && in .pending list - busy: .chan_busy == 1 && not in .pending list There are cases in which the cppi channel could be in the pending state when cppi41_dma_issue_pending()

[PATCH] dma: cppi41: delete channel from pending list when stop channel

2018-11-12 Thread Bin Liu
The driver defines three states for a cppi channel. - idle: .chan_busy == 0 && not in .pending list - pending: .chan_busy == 0 && in .pending list - busy: .chan_busy == 1 && not in .pending list There are cases in which the cppi channel could be in the pending state when cppi41_dma_issue_pending()

Re: [PATCH] dma: cppi41: delete channel from pending list when stop channel

2018-11-12 Thread Bin Liu
Sorry, please ignore this. Used incorrect Vinod email address. On Mon, Nov 12, 2018 at 09:40:49AM -0600, Bin Liu wrote: > The driver defines three states for a cppi channel. > - idle: .chan_busy == 0 && not in .pending list > - pending: .chan_busy == 0 && in .pending list > - busy: .chan_busy == 1

Re: Query on usb/core/devio.c

2018-11-12 Thread Alan Stern
On Mon, 12 Nov 2018, Mayuresh Kulkarni wrote: > On Fri, 2018-11-09 at 10:33 -0500, Alan Stern wrote: > > On Fri, 9 Nov 2018, Mayuresh Kulkarni wrote: > > > > > > > > > > > > > The driver has no way to tell whether the resume was caused by the  > > > > host or by the device.  (In fact, it's poss

Price Inquiry

2018-11-12 Thread Daniel Murray
Hi,friend, This is Daniel Murray and i am from Sinara Group Co.Ltd Group Co.,LTD in Russia. We are glad to know about your company from the web and we are interested in your products. Could you kindly send us your Latest catalog and price list for our trial order. Best Regards, Daniel Murray

[PATCH] xhci: handle stop ep on invalid CStream

2018-11-12 Thread Henry Lin
Below Note in xHCI spec 6.4.2.1 describes a Transfer Event is generated for Stop Endpoint Command on invalid CStream: CStream is not valid until a Streams endpoint transitions to the Start Stream state for the first time. A Transfer Event generated by a Stop Endpoint Command shall report '0' in th

Re: [PATCH] usb: dwc2: gadget: fix ISOC frame overflow handling

2018-11-12 Thread Minas Harutyunyan
Hi John, On 11/9/2018 10:43 PM, John Keeping wrote: > Hi Minas, > > On Fri, 9 Nov 2018 14:36:36 + > Minas Harutyunyan wrote: > >> On 11/9/2018 12:43 PM, Minas Harutyunyan wrote: >>> Hi John, >>> >>> On 11/8/2018 9:37 PM, John Keeping wrote: Hi Minas, On Mon, 5 Nov 2018 08:28:

Re: [PATCH 06/10] phy: Add usb phy support for hi3660 Soc of Hisilicon

2018-11-12 Thread Kishon Vijay Abraham I
Hi, On 27/10/18 3:28 PM, Yu Chen wrote: > This driver handles usb phy power on and shutdown for hi3660 Soc of > Hisilicon. > > Cc: Kishon Vijay Abraham I > Cc: "David S. Miller" > Cc: Greg Kroah-Hartman > Cc: Mauro Carvalho Chehab > Cc: Andrew Morton > Cc: Arnd Bergmann > Cc: Shawn Guo > C

Re: [PATCH] Add support of TI ICDI to USB simple serial device

2018-11-12 Thread Johan Hovold
On Fri, Oct 26, 2018 at 07:38:07PM +0800, Dashi Cao wrote: > TI In-Circuit Debug Interface (ICDI) is a debugging interface for TI ARM > microcontrollers. It has four USB interfaces and the first two of them are > presented as standard ACM serial device. The 3rd interface is the debugging > inter

Re: [PATCH -next] USB: serial: mos7840: remove set but not used variables 'st, data1, iflag'

2018-11-12 Thread Johan Hovold
On Fri, Oct 26, 2018 at 08:25:49PM +0800, YueHaibing wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/usb/serial/mos7840.c: In function 'mos7840_interrupt_callback': > drivers/usb/serial/mos7840.c:604:14: warning: > variable 'st' set but not used [-Wunused-but-set-variable] >

Re: WARNING in usb_submit_urb (4)

2018-11-12 Thread syzbot
syzbot has found a reproducer for the following crash on: HEAD commit:e12e00e388de Merge tag 'kbuild-fixes-v4.20' of git://git.k.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=100e4ef540 kernel config: https://syzkaller.appspot.com/x/.config?x=8f215f

Re: [PATCH] USB: serial: mos7840: Add a product ID for the new product

2018-11-12 Thread Johan Hovold
On Mon, Nov 12, 2018 at 03:16:05PM +0800, Jackychou wrote: > From: JackyChou > > Add a new PID 0x7843 to the driver. > Let the new products be able to set up 3 serial ports with the driver. > > Signed-off-by: JackyChou > --- > drivers/usb/serial/mos7840.c | 26 ++ > 1 f

Re: [PATCH] HID: add driver for U2F Zero built-in LED and RNG

2018-11-12 Thread Jiri Kosina
On Thu, 1 Nov 2018, Andrej Shadura wrote: > Hi everyone, > > I’ve got a comment from Nick Kossifidis that I probably shouldn’t set > RNG’s quality to 1024. Adding linux-crypto@ to the loop. So, what was this about? Is there any resolution to it? :) Thanks. > > On 23/10/2018 16:46, Andrej Shad

Re: [PATCH v1 4/5] usb: dwc3: drd: Switch to device property for 'extcon' handling

2018-11-12 Thread Felipe Balbi
Hi, Andy Shevchenko writes: > Switch to device property for 'extcon' handling. > No functional change intended. > > Signed-off-by: Andy Shevchenko > --- > drivers/usb/dwc3/drd.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/usb/dwc3/drd.c b/drivers/usb/d

Re: [PATCH v1 2/5] extcon: Return -EPROBE_DEFER when extcon device is not found

2018-11-12 Thread Heikki Krogerus
On Sat, Nov 10, 2018 at 08:10:58PM +0200, Andy Shevchenko wrote: > All current users of extcon_get_extcon_dev() API considers > an extcon device a mandatory to appear. Thus, they all convert > NULL pointer to -EPROBE_DEFER error code. > > There is one more caller anticipated with the same requirem

RE: scsi_set_medium_removal timeout issue

2018-11-12 Thread Zengtao (B)
Hi Alan: >-Original Message- >From: Alan Stern [mailto:st...@rowland.harvard.edu] >Sent: Wednesday, October 31, 2018 10:20 PM >To: Zengtao (B) >Cc: j...@linux.vnet.ibm.com; martin.peter...@oracle.com; >gre...@linuxfoundation.org; linux-s...@vger.kernel.org; >linux-ker...@vger.kernel.org;

RE: scsi_set_medium_removal timeout issue

2018-11-12 Thread Alan Stern
On Mon, 12 Nov 2018, Zengtao (B) wrote: > >> >Something is wrong here. Before sending PREVENT-ALLOW MEDIUM > >> >REMOVAL, the host should issue SYNCHRONIZE CACHE. This will force > >> >fsg_lun_fsync_sub to run, and the host should allow a long timeout > >> >for this command. Then when PREVENT-A

Re: [PATCH v1 1/5] drivercore: Revert "deferral race condition fix"

2018-11-12 Thread Peter Ujfalusi
Hi Andy, On 2018-11-10 20:10, Andy Shevchenko wrote: > Consider the following scenario. > > There are two independent devices coupled together by functional dependencies: > - USB OTG (dwc3-pci) > - extcon (tested with extcon-intel-mrfld, not yet in upstream) > > Each of the driver services a c

Re: [PATCH v1 1/1] usb: dwc3: Fix NULL pointer exception in dwc3_pci_remove()

2018-11-12 Thread sathyanarayanan kuppuswamy
Felipe/Greg, Any comments ? On 10/17/18 11:40 AM, Kuppuswamy Sathyanarayanan wrote: In dwc3_pci_quirks() function, gpiod lookup table is only registered for baytrail SOC. But in dwc3_pci_remove(), we try to unregistered it without any checks. This leads to NULL pointer de-reference exception in

[PATCH] usb: xhci: fix build warning - missing prototype

2018-11-12 Thread Jean-Philippe Menil
Fix build warning when building drivers/usb/host/xhci-mem.o due to missing prototype for xhci_free_virt_devices_depth_first. This function is only used in xhci-mem.c so just make it static. Signed-off-by: Jean-Philippe Menil --- drivers/usb/host/xhci-mem.c | 2 +- 1 file changed, 1 insertion(+)

Re: [PATCH] usb: dwc2: gadget: fix ISOC frame overflow handling

2018-11-12 Thread John Keeping
Hi Minas, On Mon, 12 Nov 2018 08:53:36 + Minas Harutyunyan wrote: > On 11/9/2018 10:43 PM, John Keeping wrote: > > On Fri, 9 Nov 2018 14:36:36 + > > Minas Harutyunyan wrote: > > > >> On 11/9/2018 12:43 PM, Minas Harutyunyan wrote: > >>> Hi John, > >>> > >>> On 11/8/2018 9:37 PM, Joh