Re: [BUG] uas: regression preventing some drives from being used

2018-02-07 Thread Oliver Neukum
Am Dienstag, den 06.02.2018, 23:13 +0100 schrieb Cyril Roelandt: > Hi, > > I use two hard drives in an enclosure connected to my PC using UAS. The > enclosure is a JMicron JMS56x (152d:0562); the drives are a Fujitsu MHZ2160BH > G2 (2"5, 160GB) and a Western Digital EFRX-68N32N0 (3"5, 4TB). > > U

Re: power management problems in ehci-omap

2018-02-07 Thread Roger Quadros
Hi, On 06/02/18 20:40, Andreas Kemnade wrote: > On Tue, 6 Feb 2018 10:16:23 -0800 > Tony Lindgren wrote: > >> * Andreas Kemnade [180206 18:04]: >>> On Tue, 6 Feb 2018 09:17:37 -0800 >>> Tony Lindgren wrote: uarts=$(find /sys/class/tty/tty[SO]*/power/ -type d 2>/dev/null) for uart i

Re: xhci_hcd: kernel 4.15.1 oops on suspend to ram

2018-02-07 Thread Mathias Nyman
On 06.02.2018 20:07, Jose Marino wrote: I'm running archlinux on a Dell XPS15 9550 and I connect it to a TB16 thunderbolt dock. Connected to the dock I have a 4k external display and a USB logitech transmitter for my wireless keyboard and mouse. The module 'xhci_pci' is automatically unloaded/

Re: USB gadget : generic functionfs function has no os_desc while rndis function has, why?

2018-02-07 Thread Krzysztof Opasiak
On 02/07/2018 08:25 AM, Jun Sun wrote: Thanks, Krysztof. I'm trying to follow your example and maybe to massage it into my need. One quick question - In your example, you set vendor code to be 0xBC. Is this code of any significance? What values should I use? b_vendor_code = 0xBC, Well..

WARN: Success on ctrl setup TRB without IOC set??

2018-02-07 Thread Peter Chen
Hi Mathias, I am implementing USB2 EHSET SINGLE_STEP_SET_FEATURE Test for XHCI port, (see ehset_single_step_set_feature for EHCI), it needs to set IOC for setup packet, and software waits 15 seconds before DATA + STATUS stage. After porting such design for XHCI, it triggers above warning, and retu

High CPU load produced by USB (DW2)

2018-02-07 Thread Mirza Krak
Hi. I initially started a thread on a different mailing list [1], and you can take look there for some additional background. I am using a 4.14.15 stable kernel on a RK3288 SoC (FireFly RK3288 board) which uses the DW2 USB core. I have noticed that when connecting a USB device there is unreasonab

Should debugfs be world-readable?

2018-02-07 Thread Felipe Balbi
Hi guys, I've been thinking about this for a while now. Should we allow debugfs files be world-readable? Many of these files expose addresses to kernel data. For example dwc3 dumps out the TRB ring of every endpoint: # cat dwc3.37.auto/ep1in/trb_ring buffer_addr,size,type,ioc,isp_imi,csp,chn,l

Re: Should debugfs be world-readable?

2018-02-07 Thread Greg Kroah-Hartman
On Wed, Feb 07, 2018 at 01:41:27PM +0200, Felipe Balbi wrote: > > Hi guys, > > I've been thinking about this for a while now. Should we allow debugfs > files be world-readable? By default, debugfs is not mounted world-readable, so no matter what the permissions are on the files, "normal" users c

Re: Should debugfs be world-readable?

2018-02-07 Thread Felipe Balbi
Hi, Greg Kroah-Hartman writes: > On Wed, Feb 07, 2018 at 01:41:27PM +0200, Felipe Balbi wrote: >> >> Hi guys, >> >> I've been thinking about this for a while now. Should we allow debugfs >> files be world-readable? > > By default, debugfs is not mounted world-readable, so no matter what the >

Re: WARN: Success on ctrl setup TRB without IOC set??

2018-02-07 Thread Mathias Nyman
On 07.02.2018 11:45, Peter Chen wrote: Hi Mathias, I am implementing USB2 EHSET SINGLE_STEP_SET_FEATURE Test for XHCI port, (see ehset_single_step_set_feature for EHCI), it needs to set IOC for setup packet, and software waits 15 seconds before DATA + STATUS stage. After porting such design for

Re: [PATCH 2/2] usb: gadget: udc: atmel: convert to use GPIO descriptors

2018-02-07 Thread Linus Walleij
On Thu, Feb 1, 2018 at 10:34 AM, Ludovic Desroches wrote: > Use GPIO descriptors instead of relying on the old method. > Include irq.h header since it is needed and was indirectly > included through of_gpio.h. > > Signed-off-by: Ludovic Desroches Reviewed-by: Linus Walleij Thank you for doing

Re: High CPU load produced by USB (DW2)

2018-02-07 Thread gregkh
On Wed, Feb 07, 2018 at 10:48:57AM +0100, Mirza Krak wrote: > Hi. > > I initially started a thread on a different mailing list [1], and you > can take look there for some additional background. > > I am using a 4.14.15 stable kernel on a RK3288 SoC (FireFly RK3288 > board) which uses the DW2 USB

Re: usb: uas : working uas devices ?

2018-02-07 Thread Greg KH
On Wed, Feb 07, 2018 at 12:13:36PM +0530, Tushar Nimkar wrote: > Can anyone help me in selecting UASP/UAS device ? > Any link/ model no. will be helpful. > I could see unusual_uas.h has many devices which are not behaving well > so don't want to take risk in selecting. The majority work just fine,

Re: usb: uas : working uas devices ?

2018-02-07 Thread Tushar Nimkar
Thanks Adrian and Greg. On Wed, Feb 7, 2018 at 7:59 PM, Greg KH wrote: > On Wed, Feb 07, 2018 at 12:13:36PM +0530, Tushar Nimkar wrote: >> Can anyone help me in selecting UASP/UAS device ? >> Any link/ model no. will be helpful. >> I could see unusual_uas.h has many devices which are not behaving

Re: usb: uas : working uas devices ?

2018-02-07 Thread Menion
This is not fully true Multibay enclosure may have problem, see my thread "uas failing on multiple disk access on a jmicron JMS567 bridge" 2018-02-07 15:38 GMT+01:00 Tushar Nimkar : > Thanks Adrian and Greg. > > On Wed, Feb 7, 2018 at 7:59 PM, Greg KH wrote: >> On Wed, Feb 07, 2018 at 12:13:36PM

Re: usb: uas : working uas devices ?

2018-02-07 Thread Tushar Nimkar
JMS567 is already reported and under "unusual_devs.h" correct me if wrong. commit ID :d92146222c96c22b45486961be642b1ba1c4129c On Wed, Feb 7, 2018 at 8:09 PM, Menion wrote: > This is not fully true > Multibay enclosure may have problem, see my thread "uas failing on > multiple disk access on a j

Re: usb: uas : working uas devices ?

2018-02-07 Thread Greg KH
On Wed, Feb 07, 2018 at 03:39:33PM +0100, Menion wrote: > This is not fully true There are always going to be exceptions, that's why we have a quirk list. It's easier to list the small handful of "broken" devices, than it is to list the "working" devices :) thanks, greg k-h -- To unsubscribe fr

Re: usb: uas : working uas devices ?

2018-02-07 Thread Menion
In which kernel version this commit endup? The unusual device will be downgraded to BOT mode? 2018-02-07 15:52 GMT+01:00 Tushar Nimkar : > JMS567 is already reported and under "unusual_devs.h" > correct me if wrong. > > commit ID :d92146222c96c22b45486961be642b1ba1c4129c > > On Wed, Feb 7, 2018 at

Re: usb: uas: device reset most the time while enumeration- usb3.0

2018-02-07 Thread Tushar Nimkar
Oliver/Greg, sorry to say but for my custom board it's difficult to flash 4.14 or 4.15. I are not sure that it will boot or not on my platform. But Still i will try to do that and in parallel will try to flash on Beagle bone.And will try. I used Lecroy today following are some observation.. work

VM Fails to Start When Passing Through PCIe Card

2018-02-07 Thread Blake lee
Virtual Machine fails to start when trying to pass through USB PCIe card. Virtual Machine setup in libvirt with USB PCie card set to pass through. 06:00.0 USB controller [0c03]: Renesas Technology Corp. uPD720201 USB 3.0 Host Controller [1912:0014] (rev 03) Kernel driver in use: xhci_hcd Kernel m

Re: xhci_hcd: kernel 4.15.1 oops on suspend to ram

2018-02-07 Thread Jose Marino
I applied your debugfs fix commits on top of 4.15.1 and it fixes the problem. No more kernel oops on suspend. Jose On 02/07/2018 02:28 AM, Mathias Nyman wrote: On 06.02.2018 20:07, Jose Marino wrote: I'm running archlinux on a Dell XPS15 9550 and I connect it to a TB16 thunderbolt dock. Conne

Re: [PATCH 2/2] usb: gadget: udc: atmel: convert to use GPIO descriptors

2018-02-07 Thread Ludovic Desroches
On Wed, Feb 07, 2018 at 02:55:35PM +0100, Linus Walleij wrote: > On Thu, Feb 1, 2018 at 10:34 AM, Ludovic Desroches > wrote: > > > Use GPIO descriptors instead of relying on the old method. > > Include irq.h header since it is needed and was indirectly > > included through of_gpio.h. > > > > Sign

Re: [PATCH] usb: musb: fix enumeration after resume

2018-02-07 Thread Bin Liu
On Tue, Feb 06, 2018 at 10:47:25AM -0800, Tony Lindgren wrote: > * Andreas Kemnade [180127 08:34]: > > On dm3730 there are enumeration problems after resume. > > Investigation led to the cause that the MUSB_POWER_SOFTCONN > > bit is not set. If it was set before suspend (because it > > was enabled

Re: [PATCH] usb: musb: fix enumeration after resume

2018-02-07 Thread Bin Liu
On Tue, Feb 06, 2018 at 08:00:24PM +0100, Andreas Kemnade wrote: > Hi, > > On Tue, 6 Feb 2018 12:46:05 -0600 > Bin Liu wrote: > > > Hi, > > > > On Sat, Jan 27, 2018 at 09:34:03AM +0100, Andreas Kemnade wrote: > > > On dm3730 there are enumeration problems after resume. > > > Investigation led t

[PATCH] Revert "usb: musb: host: don't start next rx urb if current one failed"

2018-02-07 Thread Bin Liu
This reverts commit dbac5d07d13e330e6706813c9fde477140fb5d80. commit dbac5d07d13e ("usb: musb: host: don't start next rx urb if current one failed") along with commit b5801212229f ("usb: musb: host: clear rxcsr error bit if set") try to solve the issue described in [1], but the latter alone is su

[PATCH 3.18 9/9] usbip: vhci: stop printing kernel pointer addresses in messages

2018-02-07 Thread Shuah Khan
Upstream commit 8272d099d05f ("usbip: vhci: stop printing kernel pointer addresses in messages") Remove and/or change debug, info. and error messages to not print kernel pointer addresses. Signed-off-by: Shuah Khan Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/usbip/vhci_hcd.c

[PATCH 3.18 2/9] usbip: fix stub_rx: harden CMD_SUBMIT path to handle malicious input

2018-02-07 Thread Shuah Khan
Upstream commit c6688ef9f297 ("usbip: fix stub_rx: harden CMD_SUBMIT path to handle malicious input") Harden CMD_SUBMIT path to handle malicious input that could trigger large memory allocations. Add checks to validate transfer_buffer_length and number_of_packets to protect against bad input reque

[PATCH 3.18 3/9] usbip: prevent vhci_hcd driver from leaking a socket pointer address

2018-02-07 Thread Shuah Khan
commit 2f2d0088eb93 ("usbip: prevent vhci_hcd driver from leaking a socket pointer address") When a client has a USB device attached over IP, the vhci_hcd driver is locally leaking a socket pointer address via the /sys/devices/platform/vhci_hcd/status file (world-readable) and in debug output whe

[PATCH 3.18 8/9] usbip: stub: stop printing kernel pointer addresses in messages

2018-02-07 Thread Shuah Khan
Upstream commit 248a22044366 ("usbip: stub: stop printing kernel pointer addresses in messages") Remove and/or change debug, info. and error messages to not print kernel pointer addresses. Signed-off-by: Shuah Khan Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/usbip/stub_main.c

[PATCH 3.18 5/9] usb: usbip: Fix possible deadlocks reported by lockdep

2018-02-07 Thread Shuah Khan
From: Andrew Goodbody Upstream commit 21619792d1ec ("usb: usbip: Fix possible deadlocks reported by lockdep") Change spin_lock calls to spin_lock_irqsave to prevent attmpted recursive lock taking in interrupt context. This patch fixes Bug 109351 https://bugzilla.kernel.org/show_bug.cgi?id=109

[PATCH 3.18 7/9] usbip: prevent leaking socket pointer address in messages

2018-02-07 Thread Shuah Khan
Upstream commit 90120d15f4c3 ("usbip: prevent leaking socket pointer address in messages") usbip driver is leaking socket pointer address in messages. Remove the messages that aren't useful and print sockfd in the ones that are useful for debugging. Signed-off-by: Shuah Khan Cc: stable Signed-o

[PATCH 3.18 6/9] usbip: vhci_hcd: clear just the USB_PORT_STAT_POWER bit

2018-02-07 Thread Shuah Khan
Upstream commit 1c9de5bf4286 ("usbip: vhci-hcd: Add USB3 SuperSpeed support") vhci_hcd clears all the bits port_status bits instead of clearing just the USB_PORT_STAT_POWER bit when it handles ClearPortFeature: USB_PORT_FEAT_POWER. This causes vhci_hcd attach to fail in a bad state, leaving device

[PATCH 3.18 1/9] usbip: fix stub_rx: get_pipe() to validate endpoint number

2018-02-07 Thread Shuah Khan
Upstream commit 635f545a7e8b ("usbip: fix stub_rx: get_pipe() to validate endpoint number") get_pipe() routine doesn't validate the input endpoint number and uses to reference ep_in and ep_out arrays. Invalid endpoint number can trigger BUG(). Range check the epnum and returning error instead of c

[PATCH 3.18 4/9] usbip: Fix potential format overflow in userspace tools

2018-02-07 Thread Shuah Khan
Upstream commit e5dfa3f902b9 ("usbip: Fix potential format overflow in userspace tools") The usbip userspace tools call sprintf()/snprintf() and don't check for the return value which can lead the paths to overflow, truncating the final file in the path. More urgently, GCC 7 now warns that these

[PATCH 3.18 0/9] Backports for security and critical bug fixes

2018-02-07 Thread Shuah Khan
As I started backporting security fixes, found a few problems that prevent tools to build on newer gcc releases, deadlock bug, and another bug that prevents client from being able to use imported devices. This patch series consists of security fixes and fixes to critical bugs. Andrew Goodbody (1)

Re: [RFC PATCH v2 1/5] dt-bindings: add bindings for USB physical connector

2018-02-07 Thread Rob Herring
On Mon, Feb 05, 2018 at 10:06:35AM +0100, Andrzej Hajda wrote: > On 05.02.2018 07:08, Rob Herring wrote: > > On Wed, Jan 31, 2018 at 02:44:31PM +0100, Andrzej Hajda wrote: > >> These bindings allow to describe most known standard USB connectors > >> and it should be possible to extend it if necessa

Re: [Bug 197863] Thinkpad X240 resume dramatically slower on kernels 4.13+

2018-02-07 Thread Rafael J. Wysocki
On Mon, Feb 5, 2018 at 6:06 PM, Rafael J. Wysocki wrote: > On 2/5/2018 3:14 PM, Bjørn Mork wrote: >> >> "Rafael J. Wysocki" writes: >>> >>> On 2/4/2018 9:28 PM, Bjørn Mork wrote: >>> But I do wonder if the attached (completely untested!!) patch makes things any better? >>> >>> I don't t

Re: VM Fails to Start When Passing Through PCIe Card

2018-02-07 Thread Greg KH
On Wed, Feb 07, 2018 at 11:11:49AM -0500, Blake lee wrote: > Virtual Machine fails to start when trying to pass through USB PCIe card. > > Virtual Machine setup in libvirt with USB PCie card set to pass through. > > 06:00.0 USB controller [0c03]: Renesas Technology Corp. uPD720201 USB > 3.0 Host

Re: VM Fails to Start When Passing Through PCIe Card

2018-02-07 Thread Blake lee
Greg, I apologize as I've forgot to cc the mailing list. Anyway some people in the VFIO Discord were having similar issues and reverting the commit below fixed their issue. https://github.com/torvalds/linux/commit/052f71e25a7ecd80a9567b291df8ea333d9a8565 I just tested and it has resolved my issu

Re: [PATCHv2] musb_host: fix lockup on rxcsr_h_error

2018-02-07 Thread Bin Liu
Maxim, On Fri, Jan 26, 2018 at 12:24:54PM +0300, Maxim Uvarov wrote: > Bin, > > I looked to my local git and code does not have this latest line "goto > finish". It was tested without it and everything worked. Right now I > can not get access to that hardware to check with and without. But > onl

[PATCH v6] usb: ohci: Proper handling of ed_rm_list to handle race condition between usb_kill_urb() and finish_unlinks()

2018-02-07 Thread Jeffy Chen
From: AMAN DEEP There is a race condition between finish_unlinks->finish_urb() function and usb_kill_urb() in ohci controller case. The finish_urb calls spin_unlock(&ohci->lock) before usb_hcd_giveback_urb() function call, then if during this time, usb_kill_urb is called for another endpoint, the