[PROBLEM] usb hub malformed packets causes null pointer dereference

2015-11-10 Thread Cornea, Alexandru
Hello, We observed a kernel panic due to a null pointer dereference in the USB stack while sending malformed USB hub packets. Testing was done on a Galileo board, using kernel version 4.1.8 (image built with Yocto project). Output of /proc/version: Linux version

Re: scsi-sd fails with error "Invalid field in cdb" for SATA-to-USB adapter JMicron

2015-11-10 Thread Alan Stern
On Tue, 10 Nov 2015, Dmitry Katsubo wrote: > Hello everyone, > > Sorry for cross-posting from linux-s...@vger.kernel.org > > In continuation to the issue described in [1] and [2]: > > Unfortunately, I still suffer from the same problem on Linux kernel > v4.2.3. The problem is in detailed

Re: [PATCH] USB: DCW3: GADGET: Set Correct Max Speed

2015-11-10 Thread Felipe Balbi
Hi, John Youn writes: > On 11/9/2015 1:09 PM, Felipe Balbi wrote: >> >> Hi, >> >> "McCauley, Ben" writes: "McCauley, Ben" writes: >>> Ben is talking about setting the gadget->max_speed, which is >>>

Re: question on uas_stat_cmplt()

2015-11-10 Thread Hans de Goede
Hi, On 11/10/2015 05:25 PM, Oliver Neukum wrote: Hi, we have a report about a device returning IU_ID_RESPONSE to uas_stat_cmplt(). It seems to me that this is in principle a valid response to a command. Ugh, it has been a while since I last worked on this. IIRC IU_ID_RESPONSE is only used

question on uas_stat_cmplt()

2015-11-10 Thread Oliver Neukum
Hi, we have a report about a device returning IU_ID_RESPONSE to uas_stat_cmplt(). It seems to me that this is in principle a valid response to a command. Is the absence of an answer to it in uas_stat_cmplt() intentional? Regards Oliver -- To unsubscribe from this list:

[PATCH v5 0/7] USB MIDI Gadget improvements and bug fixes

2015-11-10 Thread Felipe F. Tonello
Patch 7 has changes on how to transmit IN USB requests. It implements a FIFO of pre-allocated usb requests and uses then as needed, instead of allocating then on demand. This is my initial implementation and is open for suggestions and comments. Patches 1-6 is pretty much straight forward.

[PATCH v5 2/7] usb: gadget: f_midi: remove duplicated code

2015-11-10 Thread Felipe F. Tonello
This code is duplicated from f_midi_start_ep(midi, f, midi->out_ep). Signed-off-by: Felipe F. Tonello --- drivers/usb/gadget/function/f_midi.c | 19 --- 1 file changed, 19 deletions(-) diff --git a/drivers/usb/gadget/function/f_midi.c

RE: [PATCH] USB: DCW3: GADGET: Set Correct Max Speed

2015-11-10 Thread McCauley, Ben
> -Original Message- > From: Felipe Balbi [mailto:ba...@ti.com] > Sent: Tuesday, November 10, 2015 9:10 AM > To: John Youn ; McCauley, Ben > ; John Youn ; > gre...@linuxfoundation.org > Cc: linux-usb@vger.kernel.org;

Req for mentor - [BUG]Busy luks disk not closable forever if medium is removed

2015-11-10 Thread Andrey Utkin
https://bugzilla.kernel.org/show_bug.cgi?id=107641 I believe it is an issue which should _better_ be fixed in kernel. My level of knowledge doesn't allow me to identify the location to work on, however, I am interested to work on this. Any help, ideas, thoughts, comments are appreciated. Thanks.

[PATCH v5 1/7] usb: gadget: f_midi: Transmit data only when IN ep is enabled

2015-11-10 Thread Felipe F. Tonello
This makes sure f_midi doesn't try to enqueue data when the IN endpoint is disabled, ie, USB cable is disconnected. Signed-off-by: Felipe F. Tonello --- drivers/usb/gadget/function/f_midi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v5 5/7] usb: gadget: gmidi: Cleanup legacy code

2015-11-10 Thread Felipe F. Tonello
Remove unnecessary headers and variables. Signed-off-by: Felipe F. Tonello --- drivers/usb/gadget/legacy/gmidi.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/usb/gadget/legacy/gmidi.c b/drivers/usb/gadget/legacy/gmidi.c index 8a18348..be8e91d

[PATCH v5 3/7] usb: gadget: define free_ep_req as universal function

2015-11-10 Thread Felipe F. Tonello
This function is shared between gadget functions, so this avoid unnecessary duplicated code and potentially avoid memory leaks. Signed-off-by: Felipe F. Tonello --- drivers/usb/gadget/function/f_midi.c | 6 -- drivers/usb/gadget/function/f_sourcesink.c | 6

[PATCH v5 6/7] usb: gadget: f_midi: set altsettings only for MIDIStreaming interface

2015-11-10 Thread Felipe F. Tonello
This avoids duplication of USB requests for OUT endpoint and re-enabling endpoints. Signed-off-by: Felipe F. Tonello --- drivers/usb/gadget/function/f_midi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/function/f_midi.c

[PATCH v5 7/7] usb: gadget: f_midi: pre-allocate IN requests

2015-11-10 Thread Felipe F. Tonello
This patch introduces pre-allocation of IN endpoint USB requests. This improves on latency (requires no usb request allocation on transmit) and avoid several potential probles on allocating too many usb requests (which involves DMA pool allocation problems). This implementation also handles

[PATCH v5 4/7] usb: gadget: f_midi: fix leak on failed to enqueue out requests

2015-11-10 Thread Felipe F. Tonello
This patch fixes a memory leak that occurs when an endpoint fails to enqueue the request. If that happens the complete function will never be called, thus never freeing the request. Signed-off-by: Felipe F. Tonello --- drivers/usb/gadget/function/f_midi.c | 1 + 1 file

Re: [PATCH v5 6/7] usb: gadget: f_midi: set altsettings only for MIDIStreaming interface

2015-11-10 Thread Sergei Shtylyov
Hello. On 11/10/2015 08:52 PM, Felipe F. Tonello wrote: This avoids duplication of USB requests for OUT endpoint and re-enabling endpoints. Signed-off-by: Felipe F. Tonello --- drivers/usb/gadget/function/f_midi.c | 4 +++- 1 file changed, 3 insertions(+), 1

[PATCH] USB: serial: cp210x: Remove CP2110 ID from compatibility list

2015-11-10 Thread Konstantin Shkolnyy
CP2110 ID (0x10c4, 0xea80) doesn't belong here because it's a HID and completely different from CP210x devices. Signed-off-by: Konstantin Shkolnyy --- drivers/usb/serial/cp210x.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/serial/cp210x.c

Re: scsi-sd fails with error "Invalid field in cdb" for SATA-to-USB adapter JMicron

2015-11-10 Thread Dmitry Katsubo
On 10/11/2015 16:00, Alan Stern wrote: On Tue, 10 Nov 2015, Dmitry Katsubo wrote: Hello everyone, Sorry for cross-posting from linux-s...@vger.kernel.org In continuation to the issue described in [1] and [2]: Unfortunately, I still suffer from the same problem on Linux kernel v4.2.3. The

Re: usb: dwc2: regression during boot on Raspberry Pi

2015-11-10 Thread John Youn
On 11/9/2015 12:43 PM, Stefan Wahren wrote: > Hi, > > Am 09.11.2015 um 12:53 schrieb Marek Szyprowski: >> Hello, >> >> >> This change looks reasonable, I remember the similar issue was in >> s3c-hsotg driver >> and it caused kernel ops on driver probe, when bootloader left dwc2 >> enabled. >> The

Re: CP2110 - no serial device created

2015-11-10 Thread Johan Hovold
On Mon, Nov 09, 2015 at 04:21:24PM +, Konstantin Shkolnyy wrote: > The cp210x driver can't handle CP2110 , because its a HID device. > cp210x is designed for a different USB device interface, found on > CP210x devices. > It's strange that the CP2110 ID 10c4 ea80 is listed inside cp210x. It

Re: [PATCH v3 00/12] usb: early: add support for early printk through USB3 debug port

2015-11-10 Thread Dave Young
Hi, On 11/09/15 at 03:38pm, Lu Baolu wrote: > This patch series adds support for early printk through USB3 debug port. > USB3 debug port is described in xHCI specification as an optional extended > capability. > I did a test with your previous patchset with the manually wired cable. debug host

Re: [PATCH v3 01/12] usb: xhci: add sysfs file for xHCI debug port

2015-11-10 Thread Dave Young
[snip] > diff --git a/drivers/usb/host/xhci-sysfs.c b/drivers/usb/host/xhci-sysfs.c > new file mode 100644 > index 000..0192ac4 > --- /dev/null > +++ b/drivers/usb/host/xhci-sysfs.c > @@ -0,0 +1,100 @@ > +/* > + * sysfs interface for xHCI host controller driver > + * > + * Copyright (C) 2015

Re: [PATCH v3 00/12] usb: early: add support for early printk through USB3 debug port

2015-11-10 Thread Lu, Baolu
On 11/11/2015 10:25 AM, Dave Young wrote: Hi, On 11/11/15 at 09:32am, Lu, Baolu wrote: On 11/10/2015 05:39 PM, Dave Young wrote: Hi, On 11/09/15 at 03:38pm, Lu Baolu wrote: This patch series adds support for early printk through USB3 debug port. USB3 debug port is described in xHCI

[PATCH 2/2] usb: phy: msm: fix connect/disconnect bug for dragonboard OTG port

2015-11-10 Thread Tim Bird
This fixes a bug where if you disconnect and re-connect the USB cable, the gadget driver stops working. Add support for async_irq to wake up driver from low power mode. Without this, the power management code never calls resume. Also, have the phy driver kick the gadget driver (chipidea otg) by

Re: [PATCH v3 01/12] usb: xhci: add sysfs file for xHCI debug port

2015-11-10 Thread Lu, Baolu
On 11/10/2015 05:36 PM, Dave Young wrote: [snip] diff --git a/drivers/usb/host/xhci-sysfs.c b/drivers/usb/host/xhci-sysfs.c new file mode 100644 index 000..0192ac4 --- /dev/null +++ b/drivers/usb/host/xhci-sysfs.c @@ -0,0 +1,100 @@ +/* + * sysfs interface for xHCI host controller driver

Re: [PATCH v3 00/12] usb: early: add support for early printk through USB3 debug port

2015-11-10 Thread Dave Young
Hi, On 11/11/15 at 09:32am, Lu, Baolu wrote: > > > On 11/10/2015 05:39 PM, Dave Young wrote: > >Hi, > > > >On 11/09/15 at 03:38pm, Lu Baolu wrote: > >>This patch series adds support for early printk through USB3 debug port. > >>USB3 debug port is described in xHCI specification as an optional

Re: [PATCH] extcon: add MAX3355 driver

2015-11-10 Thread Sergei Shtylyov
Hello. On 11/10/2015 2:52 AM, Chanwoo Choi wrote: I received the reply from you after too long time (17~18day). You better to reply it more a little more quickly if you have the question or new patches. I've replied as soon as I had my new idea. MAX3355E chip integrates a charge pump

[PATCH 1/2] Documentation: dt-bindings: add async_irq to msm_hsusb

2015-11-10 Thread Tim Bird
Add optional async_irq to msm_hsusb binding doc. Signed-off-by: Tim Bird --- Documentation/devicetree/bindings/usb/msm-hsusb.txt | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/usb/msm-hsusb.txt

Re: [PATCH v3 00/12] usb: early: add support for early printk through USB3 debug port

2015-11-10 Thread Lu, Baolu
On 11/10/2015 05:39 PM, Dave Young wrote: Hi, On 11/09/15 at 03:38pm, Lu Baolu wrote: This patch series adds support for early printk through USB3 debug port. USB3 debug port is described in xHCI specification as an optional extended capability. I did a test with your previous patchset

Re: [PATCH v3 00/12] usb: early: add support for early printk through USB3 debug port

2015-11-10 Thread Lu, Baolu
On 11/11/2015 10:25 AM, Dave Young wrote: [ 1616.823351] usb 2-2: new SuperSpeed USB device number 8 using xhci_hcd [ 1616.834520] usb 2-2: LPM exit latency is zeroed, disabling LPM. [ 1616.834856] usb 2-2: New USB device found, idVendor=1d6b, idProduct=0004 [ 1616.834858] usb 2-2: New USB

Re: [PATCH] Documentation: nousb is a module parameter

2015-11-10 Thread Oliver Neukum
On Tue, 2015-11-10 at 14:24 +0100, Takashi Iwai wrote: > On Tue, 10 Nov 2015 14:15:44 +0100, > Oliver Neukum wrote: > > > > The documentation wrongly implied that it is a core parameter. > > That is not true. If usbcore is compiled as a module, a module > > parameter needs a prefix. > > The code

[PATCH] Documentation: nousb is a module parameter

2015-11-10 Thread Oliver Neukum
The documentation wrongly implied that it is a core parameter. That is not true. If usbcore is compiled as a module, a module parameter needs a prefix. Signed-off-by: Oliver Neukum --- Documentation/kernel-parameters.txt | 4 ++-- 1 file changed, 2 insertions(+), 2

Re: [PATCH] Documentation: nousb is a module parameter

2015-11-10 Thread Takashi Iwai
On Tue, 10 Nov 2015 14:15:44 +0100, Oliver Neukum wrote: > > The documentation wrongly implied that it is a core parameter. > That is not true. If usbcore is compiled as a module, a module > parameter needs a prefix. The code drivers/usb/core/usb.c has the following: /* To disable USB, kernel

Re: [PATCH 2/2] usb: phy: msm: fix connect/disconnect bug for dragonboard OTG port

2015-11-10 Thread Peter Chen
On Tue, Nov 10, 2015 at 04:46:51PM -0800, Tim Bird wrote: > This fixes a bug where if you disconnect and re-connect the USB cable, > the gadget driver stops working. > > Add support for async_irq to wake up driver from low power mode. > Without this, the power management code never calls resume.