[PATCH 1/1] input: usbhid: fix improper check

2016-12-03 Thread Pan Bian
From: Pan Bian Function hid_post_reset() returns 0 on success, or 1 on failures. However, in function hid_reset_resume(), uses "status >= 0" to check the return value of hid_post_reset(). Obviously, the condition will always be satisfied. This patch fixes the bug, uses

Re: [PATCH 2/2] USB: resume timing debug

2016-12-03 Thread Todd Brandt
On Sat, 2016-12-03 at 12:24 -0500, Alan Stern wrote: > On Fri, 2 Dec 2016, Todd Brandt wrote: > > > Add debug support for experimenting with USB timing delay > > values on the fly. This provides a debug interface through > > /sys/kernel/usb where a user can tweak the values. The code > > enforces

Re: [PATCH 1/2] USB: turn off padding of resume time delays

2016-12-03 Thread Todd Brandt
On Sat, 2016-12-03 at 12:20 -0500, Alan Stern wrote: > On Fri, 2 Dec 2016, Todd Brandt wrote: > > > Add a module parameter that replaces the USB_RESUME_TIMEOUT > > and other hardcoded delay numbers with the USB spec minimums. > > By default the patch retains the current values. > > > > The USB

Re: [PATCH 2/2] USB: resume timing debug

2016-12-03 Thread Todd Brandt
On Sat, 2016-12-03 at 10:04 +0100, Greg KH wrote: > On Fri, Dec 02, 2016 at 10:37:01PM -0800, Todd Brandt wrote: > > Add debug support for experimenting with USB timing delay > > values on the fly. This provides a debug interface through > > /sys/kernel/usb where a user can tweak the values. The

Re: [PATCH 0/2] USB: resume time optimization by using spec minimums

2016-12-03 Thread Todd Brandt
On Sat, 2016-12-03 at 10:05 +0100, Greg KH wrote: > On Fri, Dec 02, 2016 at 10:36:59PM -0800, Todd Brandt wrote: > > The USB resume code in the kernel currently uses a set of hard coded > > delay values that are defined in the USB 2.0 spec. Specifically these > > three have the most effect on

Aw: Re: [PATCH] usb: gadget: udc: core: fix return code of usb_gadget_probe_driver()

2016-12-03 Thread Felix Hädicke
Hi, > On 12/01/2016 10:44 PM, Felix Hädicke wrote: > > Hi, > > > >> Hi, > >> > >> Good catch but I have a few comments to commit message: > >> > >> On 12/01/2016 12:24 AM, Felix Hädicke wrote: > >>> This fixes a regression which was introduced by commit f1bddbb, by > >>> reverting a small

AW: AW: add usb option device

2016-12-03 Thread Giuseppe Lippolis
Dear All, > If possible you want to tell the option driver which interfaces to > bind to (white-listing) rather than specifying which not to bind to > (black-listing). The latter typically means probing all interfaces, > checking the black list, and then bailing out for unsupported >

Re: usb/gadget: GPF in usb_gadget_unregister_driver

2016-12-03 Thread Felix Hädicke
Hi, > Hi! > > I've got the following error report while running the syzkaller fuzzer. > > On commit 3c49de52d5647cda8b42c4255cf8a29d1e22eff5 (Dec 2). > > general protection fault: [#1] SMP KASAN > Dumping ftrace buffer: >(ftrace buffer empty) > Modules linked in: > CPU: 0 PID: 10564 Comm:

Re: [PATCH 2/2] USB: resume timing debug

2016-12-03 Thread Alan Stern
On Fri, 2 Dec 2016, Todd Brandt wrote: > Add debug support for experimenting with USB timing delay > values on the fly. This provides a debug interface through > /sys/kernel/usb where a user can tweak the values. The code > enforces the spec minimums so that a user can't set them > too low. > >

Re: [PATCH 1/2] USB: turn off padding of resume time delays

2016-12-03 Thread Alan Stern
On Fri, 2 Dec 2016, Todd Brandt wrote: > Add a module parameter that replaces the USB_RESUME_TIMEOUT > and other hardcoded delay numbers with the USB spec minimums. > By default the patch retains the current values. > > The USB subsystem currently uses heavily padded values for TDRSMDN > and

Re: usb/gadget: GPF in usb_gadget_unregister_driver

2016-12-03 Thread Greg Kroah-Hartman
On Sat, Dec 03, 2016 at 05:36:35PM +0100, Andrey Konovalov wrote: > Hi! > > I've got the following error report while running the syzkaller fuzzer. > > On commit 3c49de52d5647cda8b42c4255cf8a29d1e22eff5 (Dec 2). > > general protection fault: [#1] SMP KASAN > Dumping ftrace buffer: >

usb/gadget: GPF in usb_gadget_unregister_driver

2016-12-03 Thread Andrey Konovalov
Hi! I've got the following error report while running the syzkaller fuzzer. On commit 3c49de52d5647cda8b42c4255cf8a29d1e22eff5 (Dec 2). general protection fault: [#1] SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 0 PID: 10564 Comm: syz-executor0 Not

Re: [PATCH v3] usb: hcd.h: construct hub class request constants from simpler constants

2016-12-03 Thread Tal Shorer
On Fri, Nov 18, 2016 at 2:17 PM, Tal Shorer wrote: > Currently, each hub class request constant is defined by a line like: > #define ClearHubFeature (0x2000 | USB_REQ_CLEAR_FEATURE) > > The "magic" number for the high byte is one of 0x20, 0xa0, 0x23, 0xa3. > The 0x80

[PATCH 1/1] net: usb: set error code when usb_alloc_urb fails

2016-12-03 Thread Pan Bian
In function lan78xx_probe(), variable ret takes the errno code on failures. However, when the call to usb_alloc_urb() fails, its value will keeps 0. 0 indicates success in the context, which is inconsistent with the execution result. This patch fixes the bug, assigning "-ENOMEM" to ret when

Re: [PATCH 0/2] USB: resume time optimization by using spec minimums

2016-12-03 Thread Greg KH
On Fri, Dec 02, 2016 at 10:36:59PM -0800, Todd Brandt wrote: > The USB resume code in the kernel currently uses a set of hard coded > delay values that are defined in the USB 2.0 spec. Specifically these > three have the most effect on resume time: > > - tdrsmdn: resume signal time (20ms -

Re: [PATCH 2/2] USB: resume timing debug

2016-12-03 Thread Greg KH
On Fri, Dec 02, 2016 at 10:37:01PM -0800, Todd Brandt wrote: > Add debug support for experimenting with USB timing delay > values on the fly. This provides a debug interface through > /sys/kernel/usb where a user can tweak the values. The code > enforces the spec minimums so that a user can't set