Re: [PATCH] orinoco: Use shash instead of ahash for MIC calculations

2016-12-12 Thread Eric Biggers
On Mon, Dec 12, 2016 at 12:55:55PM -0800, Andy Lutomirski wrote: > +int orinoco_mic(struct crypto_shash *tfm_michael, u8 *key, > u8 *da, u8 *sa, u8 priority, > u8 *data, size_t data_len, u8 *mic) > { > - AHASH_REQUEST_ON_STACK(req, tfm_michael); > - struct

[PATCH v5 2/2] usb: dwc3: core: Support the dwc3 host suspend/resume

2016-12-12 Thread Baolin Wang
For some mobile devices with strict power management, we also want to suspend the host when the slave is detached for power saving. Thus we add the host suspend/resume functions to support this requirement. Signed-off-by: Baolin Wang --- Changes since v4: - Remove

[PATCH v5 1/2] usb: host: plat: Enable xhci plat runtime PM

2016-12-12 Thread Baolin Wang
Enable the xhci plat runtime PM for parent device to suspend/resume xhci. Also call pm_runtime_get_noresume() in probe() function in case the parent device doesn't call suspend/resume callback by runtime PM now. Signed-off-by: Baolin Wang --- Changes since v4: - No

[RFC][PATCH 0/5] Fixes and workarounds for dwc2 on HiKey board

2016-12-12 Thread John Stultz
I just wanted to send out my current queue of patches for dwc2 controller on the HiKey board. This does exclude my patchset[1] to add extcon support to dwc2, which John Youn suspects a pending rework of the dwc2 fifo init logic might make unnecssary. So in the meantime, I wanted to send out the

[RFC][PATCH 1/5] usb: dwc2: Avoid sleeping while holding hsotg->lock

2016-12-12 Thread John Stultz
Basically when plugging in various cables in different orders, I'm occasionally seeing the following BUG splat: [ 86.215403] BUG: scheduling while atomic: kworker/u16:2/53/0x0002 [ 86.219164] usb 1-1: USB disconnect, device number 9 [ 86.226845] Preemption disabled at:[ 86.230218] []

[RFC][PATCH 2/5] usb: dwc2: Workaround case where GOTGCTL state is wrong

2016-12-12 Thread John Stultz
When removing a USB-A to USB-otg adapter cable, we get a change status irq, and then in dwc2_conn_id_status_change, we erroniously see the GOTGCTL_CONID_B flag set. This causes us to get stuck in the "while (!dwc2_is_device_mode(hsotg))" loop, spitting out "Waiting for Peripheral Mode, Mode=Host"

[RFC][PATCH 4/5] usb: dwc2: Avoid suspending if we're in gadget mode

2016-12-12 Thread John Stultz
I've found when booting HiKey with the usb gadget cable attached if I then try to connect via adb, I get an infinite spew of: dwc2 f72c.usb: dwc2_hsotg_ep_sethalt(ep ffc0790ecb18 ep1out, 0) dwc2 f72c.usb: dwc2_hsotg_ep_sethalt(ep ffc0790eca18 ep1in, 0) It seems that the usb

[RFC][PATCH 3/5] usb: dwc2: Force port resume on switching to device mode

2016-12-12 Thread John Stultz
From: Chen Yu We've seen failures when switching between host and gadget mode, which was diagnosed as being caused due to the bus being auto-suspended when we switched. So this patch forces a port resume when switching to device mode if the bus is suspended. Cc: Wei Xu

[RFC][PATCH 5/5] usb: dwc2: Add a quirk to allow speed negotiation for Hisilicon Hi6220

2016-12-12 Thread John Stultz
From: Chen Yu The Hi6220's usb controller is limited in that it does not support "Split Transactions", so it does not support communicating with low-speed and full-speed devices behind a high-speed hub. Thus it requires a quirk so that we can manually drop the usb speed

Re: add URB_ZERO_PACKET in transfer_flags for usb-skeleton.c

2016-12-12 Thread Kim Jaejoong
Hi Oliver and Greg 2016-12-12 19:45 GMT+09:00 Oliver Neukum : > On Thu, 2016-12-08 at 16:16 +0100, Greg KH wrote: >> On Fri, Dec 09, 2016 at 12:09:46AM +0900, Jae Joong Kim wrote: >> > > Do you have a driver that was based on this skeleton that needed this >> > > flag to be

[yu.c.c...@intel.com: Re: [RFC] Why ax88772a_hw_reset sleeps for 200ms? Can we reduce the value?]

2016-12-12 Thread Chen Yu
+usb mailist. On 2016年12月12日 11:56, Chen Yu wrote: > Hi guys, > Currently I'm experiencing long time latency of resuming > from S3 on my MacBookPro 2015, according to the log of ftrace, > one of the suspicious time consumers is ax88772a_hw_reset has an > explicit msleep of 200ms in the code, is

Re: [PATCH] crypto: Make a few drivers depend on !VMAP_STACK

2016-12-12 Thread Herbert Xu
On Mon, Dec 12, 2016 at 12:55:20PM -0800, Andy Lutomirski wrote: > Eric Biggers found several crypto drivers that point scatterlists at > the stack. These drivers should never load on x86, but, for future > safety, make them depend on !VMAP_STACK. > > No -stable backport should be needed as no

[PATCH v2 1/1] Increase USB transfer limit

2016-12-12 Thread Mateusz Berezecki
Promote a variable keeping track of USB transfer memory usage to a wider data type and allow for higher bandwidth transfers from a large number of USB devices connected to a single host. --- drivers/usb/core/devio.c | 34 -- 1 file changed, 12 insertions(+), 22

Re: [PATCH 2/2] usb: host: xhci: Handle the right timeout command

2016-12-12 Thread Baolin Wang
Hi Mathias, On 12 December 2016 at 23:52, Mathias Nyman wrote: > On 05.12.2016 09:51, Baolin Wang wrote: >> >> If a command event is found on the event ring during an interrupt, >> we need to stop the command timer with del_timer(). Since del_timer() >> can fail if

Re: [PATCH] keys/encrypted: Fix two crypto-on-the-stack bugs

2016-12-12 Thread Andy Lutomirski
On Mon, Dec 12, 2016 at 2:28 PM, David Howells wrote: > Andy Lutomirski wrote: > >> +static const char zero_pad[16] = {0}; > > Isn't there a global page of zeros or something that we can share? Also, you > shouldn't explicitly initialise it so that it stays

Re: ch341

2016-12-12 Thread Russell Senior
On Mon, Dec 12, 2016 at 10:19 AM, Johan Hovold wrote: > On Mon, Dec 12, 2016 at 08:03:03AM -0800, Russell Senior wrote: >> On Mon, Dec 12, 2016 at 7:54 AM, Johan Hovold wrote: >> > On Mon, Dec 12, 2016 at 07:51:59AM -0800, Russell Senior wrote: >> >> On Mon,

Re: [PATCH v3] tools: usb: usbip: Add simple script to show how to setup vUDC

2016-12-12 Thread Shuah Khan
On 12/12/2016 11:55 AM, Krzysztof Opasiak wrote: > Add some simple script which creates a USB gadget using ConfigFS > and then exports it using vUDC. > > This may be useful for people who just started playing with > USB/IP and vUDC as it shows exact steps how to setup all stuff. > >

Re: [PATCH] wusbcore: Fix one more crypto-on-the-stack bug

2016-12-12 Thread Andy Lutomirski
On Mon, Dec 12, 2016 at 1:44 PM, Greg KH wrote: > On Mon, Dec 12, 2016 at 12:52:45PM -0800, Andy Lutomirski wrote: >> The driver put a constant buffer of all zeros on the stack and >> pointed a scatterlist entry at it. This doesn't work with virtual >> stacks. Make

Re: [PATCH] keys/encrypted: Fix two crypto-on-the-stack bugs

2016-12-12 Thread David Howells
Andy Lutomirski wrote: > +static const char zero_pad[16] = {0}; Isn't there a global page of zeros or something that we can share? Also, you shouldn't explicitly initialise it so that it stays in .bss. > - sg_set_buf(_out[1], pad, sizeof pad); > + sg_set_buf(_out[1],

Re: usb/core: warning in usb_create_ep_devs/sysfs_create_dir_ns

2016-12-12 Thread Alan Stern
On Mon, 12 Dec 2016, Alan Stern wrote: > On Mon, 12 Dec 2016, Dmitry Vyukov wrote: > > > On Mon, Dec 12, 2016 at 10:05 PM, Alan Stern > > wrote: > > > On Mon, 12 Dec 2016, Andrey Konovalov wrote: > > > > > >> Hi! > > >> > > >> While running the syzkaller fuzzer I've

Re: usb/core: warning in usb_create_ep_devs/sysfs_create_dir_ns

2016-12-12 Thread Greg Kroah-Hartman
On Mon, Dec 12, 2016 at 10:16:50PM +0100, Dmitry Vyukov wrote: > On Mon, Dec 12, 2016 at 10:05 PM, Alan Stern > wrote: > > On Mon, 12 Dec 2016, Andrey Konovalov wrote: > > > >> Hi! > >> > >> While running the syzkaller fuzzer I've got the following error report. > >> >

Re: usb/core: warning in usb_create_ep_devs/sysfs_create_dir_ns

2016-12-12 Thread Alan Stern
On Mon, 12 Dec 2016, Dmitry Vyukov wrote: > On Mon, Dec 12, 2016 at 10:05 PM, Alan Stern > wrote: > > On Mon, 12 Dec 2016, Andrey Konovalov wrote: > > > >> Hi! > >> > >> While running the syzkaller fuzzer I've got the following error report. > >> > >> On commit

Re: [PATCH] wusbcore: Fix one more crypto-on-the-stack bug

2016-12-12 Thread Greg KH
On Mon, Dec 12, 2016 at 12:52:45PM -0800, Andy Lutomirski wrote: > The driver put a constant buffer of all zeros on the stack and > pointed a scatterlist entry at it. This doesn't work with virtual > stacks. Make the buffer static to fix it. > > Cc: sta...@vger.kernel.org # 4.9 only >

Re: usb/core: warning in usb_create_ep_devs/sysfs_create_dir_ns

2016-12-12 Thread Dmitry Vyukov
On Mon, Dec 12, 2016 at 10:05 PM, Alan Stern wrote: > On Mon, 12 Dec 2016, Andrey Konovalov wrote: > >> Hi! >> >> While running the syzkaller fuzzer I've got the following error report. >> >> On commit 3c49de52d5647cda8b42c4255cf8a29d1e22eff5 (Dev 2). >> >> WARNING:

Re: usb/gadget: warning in ep_write_iter/__alloc_pages_nodemask

2016-12-12 Thread Alan Stern
On Mon, 12 Dec 2016, Michal Hocko wrote: > On Mon 12-12-16 21:32:35, Andrey Konovalov wrote: > > On Mon, Dec 12, 2016 at 9:31 PM, Andrey Konovalov > > wrote: > > > Hi! > > > > > > While running the syzkaller fuzzer I've got the following error report. > > > > > > The

Re: [PATCH v2] usb: dwc3: omap: fix race of pm runtime with irq handler in probe

2016-12-12 Thread Tony Lindgren
* Grygorii Strashko [161212 11:38]: > Now races can happen between interrupt handler execution and PM runtime in > error handling code path in probe and in dwc3_omap_remove() which will lead > to system crash: > > in probe: > ... > err1: >

Re: usb/core: warning in usb_create_ep_devs/sysfs_create_dir_ns

2016-12-12 Thread Alan Stern
On Mon, 12 Dec 2016, Andrey Konovalov wrote: > Hi! > > While running the syzkaller fuzzer I've got the following error report. > > On commit 3c49de52d5647cda8b42c4255cf8a29d1e22eff5 (Dev 2). > > WARNING: CPU: 2 PID: 865 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x8a/0xa0 > gadgetfs: disconnected >

Re: usb/gadget: warning in ep_write_iter/__alloc_pages_nodemask

2016-12-12 Thread Michal Hocko
On Mon 12-12-16 21:32:35, Andrey Konovalov wrote: > On Mon, Dec 12, 2016 at 9:31 PM, Andrey Konovalov > wrote: > > Hi! > > > > While running the syzkaller fuzzer I've got the following error report. > > > > The issue is that the len argument is not checked for being too

Re: usb/gadget: warning in ep_write_iter/__alloc_pages_nodemask

2016-12-12 Thread Alan Stern
On Mon, 12 Dec 2016, Andrey Konovalov wrote: > On Mon, Dec 12, 2016 at 9:31 PM, Andrey Konovalov > wrote: > > Hi! > > > > While running the syzkaller fuzzer I've got the following error report. > > > > The issue is that the len argument is not checked for being too big. >

[PATCH] orinoco: Use shash instead of ahash for MIC calculations

2016-12-12 Thread Andy Lutomirski
Eric Biggers pointed out that the orinoco driver pointed scatterlists at the stack. Fix it by switching from ahash to shash. The result should be simpler, faster, and more correct. Cc: sta...@vger.kernel.org # 4.9 only Reported-by: Eric Biggers Signed-off-by: Andy

[PATCH] crypto: Make a few drivers depend on !VMAP_STACK

2016-12-12 Thread Andy Lutomirski
Eric Biggers found several crypto drivers that point scatterlists at the stack. These drivers should never load on x86, but, for future safety, make them depend on !VMAP_STACK. No -stable backport should be needed as no released kernel configuration should be affected. Reported-by: Eric Biggers

[PATCH] cifs: Fix smbencrypt() to stop pointing a scatterlist at the stack

2016-12-12 Thread Andy Lutomirski
smbencrypt() points a scatterlist to the stack, which is breaks if CONFIG_VMAP_STACK=y. Fix it by switching to crypto_cipher_encrypt_one(). The new code should be considerably faster as an added benefit. This code is nearly identical to some code that Eric Biggers suggested. Cc:

[PATCH] keys/encrypted: Fix two crypto-on-the-stack bugs

2016-12-12 Thread Andy Lutomirski
The driver put a constant buffer of all zeros on the stack and pointed a scatterlist entry at it in two places. This doesn't work with virtual stacks. Use a static 16-byte buffer of zeros instead. Cc: sta...@vger.kernel.org # 4.9 only Reported-by: Eric Biggers

[PATCH] wusbcore: Fix one more crypto-on-the-stack bug

2016-12-12 Thread Andy Lutomirski
The driver put a constant buffer of all zeros on the stack and pointed a scatterlist entry at it. This doesn't work with virtual stacks. Make the buffer static to fix it. Cc: sta...@vger.kernel.org # 4.9 only Reported-by: Eric Biggers Signed-off-by: Andy Lutomirski

usb/core: warning in usb_create_ep_devs/sysfs_create_dir_ns

2016-12-12 Thread Andrey Konovalov
Hi! While running the syzkaller fuzzer I've got the following error report. On commit 3c49de52d5647cda8b42c4255cf8a29d1e22eff5 (Dev 2). WARNING: CPU: 2 PID: 865 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x8a/0xa0 gadgetfs: disconnected sysfs: cannot create duplicate filename

Re: usb/gadget: use-after-free in gadgetfs_setup

2016-12-12 Thread Alan Stern
On Mon, 12 Dec 2016, Krzysztof Opasiak wrote: > > Ah, good, that clears it up. The problem is that stop_activity() nukes > > all the endpoints except for endpoint 0! > > > > The patch below should fix the problem. > > > > Alan Stern > > > > > > > > Index:

Re: usb/gadget: warning in ep_write_iter/__alloc_pages_nodemask

2016-12-12 Thread Andrey Konovalov
On Mon, Dec 12, 2016 at 9:31 PM, Andrey Konovalov wrote: > Hi! > > While running the syzkaller fuzzer I've got the following error report. > > The issue is that the len argument is not checked for being too big. > > WARNING: CPU: 1 PID: 9935 at mm/page_alloc.c:3511 >

usb/gadget: warning in ep_write_iter/__alloc_pages_nodemask

2016-12-12 Thread Andrey Konovalov
Hi! While running the syzkaller fuzzer I've got the following error report. The issue is that the len argument is not checked for being too big. WARNING: CPU: 1 PID: 9935 at mm/page_alloc.c:3511 __alloc_pages_nodemask+0x159c/0x1e20 Kernel panic - not syncing: panic_on_warn set ... CPU: 1 PID:

Re: [Fwd: Emulating USB devices from userspace]

2016-12-12 Thread Krzysztof Opasiak
On 12/12/2016 09:12 PM, Fabian Vogt wrote: > Am Montag, 12. Dezember 2016, 20:55:24 CET schrieb Krzysztof Opasiak: >> >> On 12/12/2016 08:18 PM, Fabian Vogt wrote: >>> Am Montag, 12. Dezember 2016, 19:47:00 CET schrieb Krzysztof Opasiak: On 12/12/2016 04:40 PM, Fabian Vogt wrote: >

Re: usb/gadget: use-after-free in gadgetfs_setup

2016-12-12 Thread Andrey Konovalov
On Mon, Dec 12, 2016 at 9:09 PM, Alan Stern wrote: > On Mon, 12 Dec 2016, Andrey Konovalov wrote: > >> On Mon, Dec 12, 2016 at 7:44 PM, Alan Stern >> wrote: >> > >> > I'm still puzzled. Can you try running the test with the diagnostic >> >

Re: usb/gadget: use-after-free in gadgetfs_setup

2016-12-12 Thread Krzysztof Opasiak
On 12/12/2016 09:09 PM, Alan Stern wrote: > On Mon, 12 Dec 2016, Andrey Konovalov wrote: > >> On Mon, Dec 12, 2016 at 7:44 PM, Alan Stern >> wrote: >>> >>> I'm still puzzled. Can you try running the test with the diagnostic >>> patch below? The resulting kernel

Re: [Fwd: Emulating USB devices from userspace]

2016-12-12 Thread Fabian Vogt
Am Montag, 12. Dezember 2016, 20:55:24 CET schrieb Krzysztof Opasiak: > > On 12/12/2016 08:18 PM, Fabian Vogt wrote: > > Am Montag, 12. Dezember 2016, 19:47:00 CET schrieb Krzysztof Opasiak: > >> > >> On 12/12/2016 04:40 PM, Fabian Vogt wrote: > >>> Hi, > >>> > >>> (sorry for the missing message

Re: usb/gadget: use-after-free in gadgetfs_setup

2016-12-12 Thread Alan Stern
On Mon, 12 Dec 2016, Andrey Konovalov wrote: > On Mon, Dec 12, 2016 at 7:44 PM, Alan Stern wrote: > > > > I'm still puzzled. Can you try running the test with the diagnostic > > patch below? The resulting kernel log ought to help pin down where the > > problem comes

Re: [Fwd: Emulating USB devices from userspace]

2016-12-12 Thread Krzysztof Opasiak
On 12/12/2016 08:18 PM, Fabian Vogt wrote: > Am Montag, 12. Dezember 2016, 19:47:00 CET schrieb Krzysztof Opasiak: >> >> On 12/12/2016 04:40 PM, Fabian Vogt wrote: >>> Hi, >>> >>> (sorry for the missing message ID, I wasn't subscribed to this list >>> beforehand so I did not get the original

[PATCH v2] usb: dwc3: omap: fix race of pm runtime with irq handler in probe

2016-12-12 Thread Grygorii Strashko
Now races can happen between interrupt handler execution and PM runtime in error handling code path in probe and in dwc3_omap_remove() which will lead to system crash: in probe: ... err1: pm_runtime_put_sync(dev); ^^ PM runtime can race with IRQ handler when deferred probing happening

Re: [Fwd: Emulating USB devices from userspace]

2016-12-12 Thread Fabian Vogt
Am Montag, 12. Dezember 2016, 19:47:00 CET schrieb Krzysztof Opasiak: > > On 12/12/2016 04:40 PM, Fabian Vogt wrote: > > Hi, > > > > (sorry for the missing message ID, I wasn't subscribed to this list > > beforehand so I did not get the original message) > > > > On Fri, Dec 09, 2016 at

Re: usb/gadget: use-after-free in gadgetfs_setup

2016-12-12 Thread Andrey Konovalov
On Mon, Dec 12, 2016 at 7:44 PM, Alan Stern wrote: > > I'm still puzzled. Can you try running the test with the diagnostic > patch below? The resulting kernel log ought to help pin down where the > problem comes from. Sure, here's the log: usb 1-1: string descriptor

[PATCH v3] tools: usb: usbip: Add simple script to show how to setup vUDC

2016-12-12 Thread Krzysztof Opasiak
Add some simple script which creates a USB gadget using ConfigFS and then exports it using vUDC. This may be useful for people who just started playing with USB/IP and vUDC as it shows exact steps how to setup all stuff. Signed-off-by: Krzysztof Opasiak --- Changes since

Re: [Fwd: Emulating USB devices from userspace]

2016-12-12 Thread Krzysztof Opasiak
On 12/12/2016 04:40 PM, Fabian Vogt wrote: > Hi, > > (sorry for the missing message ID, I wasn't subscribed to this list > beforehand so I did not get the original message) > > On Fri, Dec 09, 2016 at 12:38:23AM +0100, Andrey Konovalov wrote: >> Hi, >> >> I'm working on a way to extend

Re: usb/gadget: use-after-free in gadgetfs_setup

2016-12-12 Thread Alan Stern
On Mon, 12 Dec 2016, Andrey Konovalov wrote: > > Can you also provide reproducers for the "GPF in > > usb_gadget_unregister_driver" and the "warning in dummy_free_request" > > tests? > > Hi Alan, > > I haven't managed to obtain a working reproducer, though the fuzzer > hits it pretty often :( >

Re: ch341

2016-12-12 Thread Johan Hovold
On Mon, Dec 12, 2016 at 08:03:03AM -0800, Russell Senior wrote: > On Mon, Dec 12, 2016 at 7:54 AM, Johan Hovold wrote: > > On Mon, Dec 12, 2016 at 07:51:59AM -0800, Russell Senior wrote: > >> On Mon, Dec 12, 2016 at 7:40 AM, Johan Hovold wrote: > >> > On Mon,

Re: FTD driverI issue?

2016-12-12 Thread Johan Hovold
On Mon, Dec 12, 2016 at 06:47:55PM +0100, Sylvain Le Gourriérec wrote: > Hello, > > I don't manage to run more than one FTDI Usb Serial Adapter on a Beagle > Bone Black. Since there is only one Usb Host port on the BBB, I tried with > several hub (powered or not) or cape. > > Each time that more

FTD driverI issue?

2016-12-12 Thread Sylvain Le Gourriérec
Hello, I don't manage to run more than one FTDI Usb Serial Adapter on a Beagle Bone Black. Since there is only one Usb Host port on the BBB, I tried with several hub (powered or not) or cape. Each time that more than one adapter is plugged, these errors appear (kernel 4.4 or kernel 4.9): [

Re: ch341

2016-12-12 Thread Johan Hovold
On Mon, Dec 12, 2016 at 10:55:14AM -0500, Alan Stern wrote: > On Mon, 12 Dec 2016, Johan Hovold wrote: > > > Ok, so that seems to confirm the suspicion that changing settings after > > the initial configuration is failing (even though the device does indeed > > support 5-bit mode). > > Perhaps

Re: [PATCH v2] tools: usb: usbip: Add simple script to show how to setup vUDC

2016-12-12 Thread Shuah Khan
Hi Krzysztof, On 12/12/2016 05:05 AM, Krzysztof Opasiak wrote: > > Hi, > > On 12/09/2016 10:40 PM, Shuah Khan wrote: >> Hi Krzysztof, >> >> Thanks for getting to this so quickly. Couple of comments below: >> >> On 12/09/2016 10:15 AM, Krzysztof Opasiak wrote: >>> Add some simple script which

Re: ch341

2016-12-12 Thread Russell Senior
On Mon, Dec 12, 2016 at 7:54 AM, Johan Hovold wrote: > On Mon, Dec 12, 2016 at 07:51:59AM -0800, Russell Senior wrote: >> On Mon, Dec 12, 2016 at 7:40 AM, Johan Hovold wrote: >> > On Mon, Dec 12, 2016 at 07:09:34AM -0800, Russell Senior wrote: >> >> On Mon,

Re: ch341

2016-12-12 Thread Alan Stern
On Mon, 12 Dec 2016, Johan Hovold wrote: > Ok, so that seems to confirm the suspicion that changing settings after > the initial configuration is failing (even though the device does indeed > support 5-bit mode). Perhaps issuing a USB device reset before trying to change the settings will help.

Re: ch341

2016-12-12 Thread Johan Hovold
On Mon, Dec 12, 2016 at 07:51:59AM -0800, Russell Senior wrote: > On Mon, Dec 12, 2016 at 7:40 AM, Johan Hovold wrote: > > On Mon, Dec 12, 2016 at 07:09:34AM -0800, Russell Senior wrote: > >> On Mon, Dec 12, 2016 at 1:54 AM, Johan Hovold wrote: > >> > >> > Ok,

Re: ch341

2016-12-12 Thread Russell Senior
On Mon, Dec 12, 2016 at 7:40 AM, Johan Hovold wrote: > On Mon, Dec 12, 2016 at 07:09:34AM -0800, Russell Senior wrote: >> On Mon, Dec 12, 2016 at 1:54 AM, Johan Hovold wrote: >> >> > Ok, so maybe your device simply does not support changing the line >> >

Re: [PATCH 2/2] usb: host: xhci: Handle the right timeout command

2016-12-12 Thread Mathias Nyman
On 05.12.2016 09:51, Baolin Wang wrote: If a command event is found on the event ring during an interrupt, we need to stop the command timer with del_timer(). Since del_timer() can fail if the timer is running and waiting on the xHCI lock, then it maybe get the wrong timeout command in

Re: [Fwd: Emulating USB devices from userspace]

2016-12-12 Thread Fabian Vogt
Hi, (sorry for the missing message ID, I wasn't subscribed to this list beforehand so I did not get the original message) On Fri, Dec 09, 2016 at 12:38:23AM +0100, Andrey Konovalov wrote: > Hi, > > I'm working on a way to extend syzkaller [1] to support fuzzing of the > USB subsystem. The idea

Re: ch341

2016-12-12 Thread Johan Hovold
On Mon, Dec 12, 2016 at 07:09:34AM -0800, Russell Senior wrote: > On Mon, Dec 12, 2016 at 1:54 AM, Johan Hovold wrote: > > > Ok, so maybe your device simply does not support changing the line > > settings more than once. That is, the initial settings chosen are used > > until

Re: ch341

2016-12-12 Thread Russell Senior
On Mon, Dec 12, 2016 at 1:54 AM, Johan Hovold wrote: > Ok, so maybe your device simply does not support changing the line > settings more than once. That is, the initial settings chosen are used > until re-connected. This would seem to be in accordance with a comment > found in

Re: usb/gadget: use-after-free in gadgetfs_setup

2016-12-12 Thread Andrey Konovalov
On Fri, Dec 9, 2016 at 8:57 PM, Alan Stern wrote: > On Fri, 9 Dec 2016, Andrey Konovalov wrote: > >> On Wed, Dec 7, 2016 at 8:15 PM, Alan Stern wrote: >> > On Wed, 7 Dec 2016, Andrey Konovalov wrote: >> > >> >> > And in any case, is there any

Re: [RFT PATCH 1/1] xhci: free xhci virtual devices with leaf nodes first

2016-12-12 Thread Mathias Nyman
On 09.12.2016 23:28, Guenter Roeck wrote: On Wed, Nov 30, 2016 at 01:41:24PM +0200, Mathias Nyman wrote: On 28.11.2016 22:24, Guenter Roeck wrote: On Wed, Nov 23, 2016 at 02:24:27PM +0200, Mathias Nyman wrote: the tt_info provided by a HS hub might be in use to by a child device Make sure we

Re: usb:xhci: support disable usb2 LPM Remote Wakeup

2016-12-12 Thread Mathias Nyman
On 12.12.2016 06:00, Thang Q. Nguyen wrote: On Sat, Dec 10, 2016 at 4:36 AM, Rob Herring wrote: On Sun, Dec 04, 2016 at 07:42:01PM +0700, Thang Q. Nguyen wrote: From: Thang Nguyen As per USB 2.0 link power management addendum ECN, table 1-2, page 4, device

Re: ch341

2016-12-12 Thread Johan Hovold
On Mon, Dec 12, 2016 at 04:36:54AM -0800, Russell Senior wrote: > On Mon, Dec 12, 2016 at 1:54 AM, Johan Hovold wrote: > > > If you connect the ch340 you have in loopback mode, with the removed > > initial LCR write that fixed the 5-bit behaviour, can you get that > > behaviour

Re: ch341

2016-12-12 Thread Russell Senior
On Mon, Dec 12, 2016 at 1:54 AM, Johan Hovold wrote: > If you connect the ch340 you have in loopback mode, with the removed > initial LCR write that fixed the 5-bit behaviour, can you get that > behaviour back by setting 5-bit word size after opening the port? (This > was what

Re: ch341

2016-12-12 Thread Russell Senior
On Mon, Dec 12, 2016 at 1:48 AM, Johan Hovold wrote: > What exactly did you mean by "the baudrate change" above? If you revert > to setting the divisors directly (rather than using SERIAL_INIT), we > should be back to how things work in 4.9 (which you can get to work with > the

Re: Fwd: UAS erorrs

2016-12-12 Thread Oliver Neukum
On Mon, 2016-12-12 at 09:37 +0100, Hans de Goede wrote: > Hi, I keep having the below errors and I think it is related to UAS? hi, it definitely is a UAS issue. Do you happen to know what command causes the error? Some more background, please. Regards Oliver -- To

Re: [PATCH v2] tools: usb: usbip: Add simple script to show how to setup vUDC

2016-12-12 Thread Krzysztof Opasiak
Hi, On 12/09/2016 10:40 PM, Shuah Khan wrote: > Hi Krzysztof, > > Thanks for getting to this so quickly. Couple of comments below: > > On 12/09/2016 10:15 AM, Krzysztof Opasiak wrote: >> Add some simple script which creates a USB gadget using ConfigFS >> and then exports it using vUDC. >> >>

Re: add URB_ZERO_PACKET in transfer_flags for usb-skeleton.c

2016-12-12 Thread Oliver Neukum
On Thu, 2016-12-08 at 16:16 +0100, Greg KH wrote: > On Fri, Dec 09, 2016 at 12:09:46AM +0900, Jae Joong Kim wrote: > > > Do you have a driver that was based on this skeleton that needed this > > > flag to be added to work properly? Has it been updated in the kernel > > > source tree properly for

Re: Should xhci_irq() call usb_hc_died()?

2016-12-12 Thread Mathias Nyman
On 12.12.2016 10:43, Felipe Balbi wrote: Hi, Bjorn Helgaas writes: Hi Mathias, ehci_irq(), ohci_irq(), fotg210_irq(), and oxu210_hcd_irq() contain code equivalent to this: status = ehci_readl(...); if (status == ~(u32) 0) { ... usb_hc_died(hcd); ...

Re: ch341

2016-12-12 Thread Johan Hovold
On Fri, Dec 09, 2016 at 07:38:51AM -0800, Russell Senior wrote: > > Also, when the above change makes usb-linus works, does changing the > > word size appear to work after probe? > > I'm not sure what changing the word size is supposed to do. The > usb-linus + previous patch in loopback seems to

Re: ch341

2016-12-12 Thread Johan Hovold
On Fri, Dec 09, 2016 at 07:14:02AM -0800, Russell Senior wrote: > >> Okay, I built your usb-linus > >> > >> 46490c347df406b3368680dd911620e52dc7bfa4 > >> > >> with the line: > >> > >>r = ch341_control_out(dev, 0x9a, 0x2518, 0x0050); > >> > >> commented out. More precisely: > > > >> Loopback

Re: usb:xhci: support disable usb2 LPM Remote Wakeup

2016-12-12 Thread Thang Q. Nguyen
Hi, On Mon, Dec 12, 2016 at 3:37 PM, Felipe Balbi wrote: > > Hi, > > "Thang Q. Nguyen" writes: >> On Sat, Dec 10, 2016 at 4:36 AM, Rob Herring wrote: >>> On Sun, Dec 04, 2016 at 07:42:01PM +0700, Thang Q. Nguyen wrote: From:

Re: [hid:for-4.10/i2c-hid 7/8] drivers/hid/i2c-hid/i2c-hid.c:772:19: error: 'struct i2c_hid' has no member named 'irq'

2016-12-12 Thread Jiri Kosina
On Sat, 10 Dec 2016, Benjamin Tissoires wrote: > Ouch. Sorry, I should have spotted this during review. > > Jiri, could you apply the following simple fix: Applied, thanks. -- Jiri Kosina SUSE Labs -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a

Re: Should xhci_irq() call usb_hc_died()?

2016-12-12 Thread Felipe Balbi
Hi, Bjorn Helgaas writes: > Hi Mathias, > > ehci_irq(), ohci_irq(), fotg210_irq(), and oxu210_hcd_irq() contain code > equivalent to this: > > status = ehci_readl(...); > if (status == ~(u32) 0) { > ... > usb_hc_died(hcd); > ... > return IRQ_HANDLED; >

RE: USB3.0 DWC3 can't work with latest Linux-4.9.rc7

2016-12-12 Thread Felipe Balbi
Hi, Jerry Huang writes: >> >> >> >> >> oh, it's the DMA thing. We have patches going to next for this. >> >> >> >> >> Arnd, do you know if next has all missing pieces? There was >> >> >> >> >> something pending on XHCI IIRC, right? >> >> >> >> > So, there are some patches

Re: usb:xhci: support disable usb2 LPM Remote Wakeup

2016-12-12 Thread Felipe Balbi
Hi, "Thang Q. Nguyen" writes: > On Sat, Dec 10, 2016 at 4:36 AM, Rob Herring wrote: >> On Sun, Dec 04, 2016 at 07:42:01PM +0700, Thang Q. Nguyen wrote: >>> From: Thang Nguyen >>> >>> As per USB 2.0 link power management addendum ECN, table