Re: [PATCH v3 4/6] usb: core: add power sequence handling for USB devices

2016-07-27 Thread Peter Chen
On Wed, Jul 27, 2016 at 09:25:11AM -0700, Joshua Clayton wrote: > > > On 07/20/2016 02:40 AM, Peter Chen wrote: > > Some hard-wired USB devices need to do power sequence to let the > > device work normally, the typical power sequence like: enable USB > > PHY clock, toggle reset pin, etc. But curr

[PATCH] usb: hub: Fix unbalanced reference count and memory leak

2016-07-27 Thread Viresh Kumar
If the hub gets disconnected while the core is still activating it, this can result in leaking memory of few USB structures. This will happen if we have done a kref_get() from hub_activate() and scheduled a delayed work item for HUB_INIT2/3. Now if hub_disconnect() gets called before the delayed w

Re: [PATCH v2] usb: serial: ftdi_sio Added 0a5c:6422 device ID for WICED USB UART dev board

2016-07-27 Thread Greg KH
On Wed, Jul 27, 2016 at 07:27:25PM +, Sheng-Hui Chu wrote: > > BCM20706V2_EVAL is a WICED dev board designed with FT2232H USB 2.0 UART/FIFO > IC. > > To support BCM920706V2_EVAL dev board for WICED development on Linux. Add > the VID(0a5c) and > PID(6422) to ftdi_sio driver to allow loadi

Re: [RFC] usb: host: u132-hcd: Remove deprecated create_singlethread_workqueue

2016-07-27 Thread Alan Stern
On Wed, 27 Jul 2016, Tejun Heo wrote: > Hello, Alan. > > On Wed, Jul 27, 2016 at 02:54:51PM -0400, Alan Stern wrote: > > > Hmm... I didn't know the whole USB stack could operate without > > > allocating memory. Does usb stack have mempools and stuff all the way > > > through? > > > > No -- the

Re: [PATCH 9/9] usb: gadget: f_hid: use alloc_ep_req()

2016-07-27 Thread Michal Nazarewicz
On Tue, Jul 26 2016, Felipe F. Tonello wrote: > Use gadget's framework allocation function instead of directly calling > usb_ep_alloc_request(). > > Signed-off-by: Felipe F. Tonello Acked-by: Michal Nazarewicz > --- > drivers/usb/gadget/function/f_hid.c | 6 +- > 1 file changed, 1 insertio

Re: [PATCH 8/9] usb: gadget: f_hid: use free_ep_req()

2016-07-27 Thread Michal Nazarewicz
On Tue, Jul 26 2016, Felipe F. Tonello wrote: > We should always use free_ep_req() when allocating requests with > alloc_ep_req(). > > Signed-off-by: Felipe F. Tonello Acked-by: Michal Nazarewicz > --- > drivers/usb/gadget/function/f_hid.c | 10 +++--- > 1 file changed, 3 insertions(+), 7

Re: [PATCH 7/9] usb: gadget: remove useless parameter in alloc_ep_req()

2016-07-27 Thread Michal Nazarewicz
On Tue, Jul 26 2016, Felipe F. Tonello wrote: > This parameter was not really necessary and gadget drivers would almost always I personally like when commit messages can be read without subject, so perhaps: The default_length parameter of alloc_ep_req was not … But that’s just me. > cre

Re: [PATCH 2/9] usb: gadget: align buffer size when allocating for OUT endpoint

2016-07-27 Thread Michal Nazarewicz
On Tue, Jul 26 2016, Felipe F. Tonello wrote: > Using usb_ep_align() makes sure that the buffer size for OUT endpoints is > always aligned with wMaxPacketSize (512 usually). This makes sure > that no buffer has the wrong size, which can cause nasty bugs. > > Signed-off-by: Felipe F. Tonello > ---

Re: [PATCH 4/9] usb: gadget: f_midi: defaults buflen sizes to 512

2016-07-27 Thread Michal Nazarewicz
On Tue, Jul 26 2016, Felipe F. Tonello wrote: > 512 is the value used by wMaxPacketSize, as specified by the USB Spec. This > makes sure this driver uses, by default, the most optimal value for IN and OUT > endpoint requests. > > Signed-off-by: Felipe F. Tonello Acked-by: Michal Nazarewicz > --

Re: [PATCH 1/9] usb: gadget: fix usb_ep_align_maybe endianness and new usb_ep_align

2016-07-27 Thread Michal Nazarewicz
On Tue, Jul 26 2016, Felipe F. Tonello wrote: > USB spec specifies wMaxPacketSize to be little endian (as other properties), > so when using this variable in the driver we should convert to the current > CPU endianness if necessary. > > This patch also introduces usb_ep_align() which does always re

[PATCH v2] usb: serial: ftdi_sio Added 0a5c:6422 device ID for WICED USB UART dev board

2016-07-27 Thread Sheng-Hui Chu
BCM20706V2_EVAL is a WICED dev board designed with FT2232H USB 2.0 UART/FIFO IC. To support BCM920706V2_EVAL dev board for WICED development on Linux. Add the VID(0a5c) and PID(6422) to ftdi_sio driver to allow loading ftdi_sio for this board. Signed-off-by: Jeffrey Chu --- drivers/usb/seria

Re: [RFC] usb: host: u132-hcd: Remove deprecated create_singlethread_workqueue

2016-07-27 Thread Tejun Heo
Hello, Alan. On Wed, Jul 27, 2016 at 02:54:51PM -0400, Alan Stern wrote: > > Hmm... I didn't know the whole USB stack could operate without > > allocating memory. Does usb stack have mempools and stuff all the way > > through? > > No -- the USB stack does need to allocate memory in order to oper

Re: [PATCH v2 10/22] usb: serial: ti_usb_3410_5052: Change ti_write_byte function arguments

2016-07-27 Thread Oliver Neukum
On Wed, 2016-07-27 at 18:08 +0200, Mathieu OTHACEHE wrote: > Hi, > > > this makes me think something is wrong with the data structure. > > We should have a be32 there, it seems to me. > > You mean something like : > > struct ti_write_data_bytes { > u8 bAddrType; > u8 bDataT

Re: [PATCH] usb: serial: ftdi_sio: Added 0a5c:6422 device ID for WICED USB UART dev board

2016-07-27 Thread Greg KH
On Wed, Jul 27, 2016 at 11:54:23AM -0700, Greg KH wrote: > On Wed, Jul 27, 2016 at 02:44:19PM -0400, Jeffrey Chu wrote: > > Signed-off-by: Jeffrey Chu > > You should really put _some_ changelog comments in here, please? Also, your From: address doesn't match your signed-off-by: address. If that

Re: [RFC] usb: host: u132-hcd: Remove deprecated create_singlethread_workqueue

2016-07-27 Thread Alan Stern
On Wed, 27 Jul 2016, Tejun Heo wrote: > Hello, Oliver. > > On Wed, Jul 27, 2016 at 11:29:56AM +0200, Oliver Neukum wrote: > > On Wed, 2016-07-27 at 14:50 +0530, Bhaktipriya Shridhar wrote: > > > The workqueue "workqueue" has multiple workitems which may require > > > ordering. Hence, a dedicated

Re: [PATCH] usb: serial: ftdi_sio: Added 0a5c:6422 device ID for WICED USB UART dev board

2016-07-27 Thread Greg KH
On Wed, Jul 27, 2016 at 02:44:19PM -0400, Jeffrey Chu wrote: > Signed-off-by: Jeffrey Chu You should really put _some_ changelog comments in here, please? > --- > drivers/usb/serial/ftdi_sio.c | 1 + > drivers/usb/serial/ftdi_sio_ids.h | 8 > 2 files changed, 9 insertions(+) > > d

[PATCH] usb: serial: ftdi_sio: Added 0a5c:6422 device ID for WICED USB UART dev board

2016-07-27 Thread Jeffrey Chu
Signed-off-by: Jeffrey Chu --- drivers/usb/serial/ftdi_sio.c | 1 + drivers/usb/serial/ftdi_sio_ids.h | 8 2 files changed, 9 insertions(+) diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 0082080..ef19af4 100644 --- a/drivers/usb/serial/ftdi_sio.c ++

Re: [RFC] usb: host: u132-hcd: Remove deprecated create_singlethread_workqueue

2016-07-27 Thread Tejun Heo
Hello, Oliver. On Wed, Jul 27, 2016 at 11:29:56AM +0200, Oliver Neukum wrote: > On Wed, 2016-07-27 at 14:50 +0530, Bhaktipriya Shridhar wrote: > > The workqueue "workqueue" has multiple workitems which may require > > ordering. Hence, a dedicated ordered workqueue has been used. > > Since the work

Re: [PATCH v2 1/2] usb: typec: Add USB Power Delivery sink port support

2016-07-27 Thread Bin Gao
On Wed, Jul 27, 2016 at 11:13:43AM +0300, Felipe Balbi wrote: > > Hi, > > Bin Gao writes: > > This patch implements a simple USB Power Delivery sink port state machine. > > It assumes the hardware only handles PD packet transmitting and receiving > > over the CC line of the USB Type-C connector.

Re: [PATCH v2 1/2] usb: typec: Add USB Power Delivery sink port support

2016-07-27 Thread Bin Gao
On Wed, Jul 27, 2016 at 11:21:13AM +0200, Oliver Neukum wrote: > On Tue, 2016-07-26 at 11:37 -0700, Bin Gao wrote: > > +#define MAKE_HEADER(port, header, msg, objs) \ > > +do { \ > > + header->type = msg; \ > > + header->data_role = PD_DATA_ROLE_UFP; \ > > + header->revision = por

Re: pwc over musb: 100% frame drop (lost) on high resolution stream

2016-07-27 Thread Matwey V. Kornilov
Hello, I've just biseced commit, which introduced this issue commit f551e13529833e052f75ec628a8af7b034af20f9 Author: Bin Liu Date: Mon Apr 25 15:53:30 2016 -0500 Revert "usb: musb: musb_host: Enable HCD_BH flag to handle urb return in bottom half" I have not checked yet, if it was intent

Re: [PATCH v3 4/6] usb: core: add power sequence handling for USB devices

2016-07-27 Thread Joshua Clayton
On 07/20/2016 02:40 AM, Peter Chen wrote: > Some hard-wired USB devices need to do power sequence to let the > device work normally, the typical power sequence like: enable USB > PHY clock, toggle reset pin, etc. But current Linux USB driver > lacks of such code to do it, it may cause some hard-w

Re: [PATCH v2 10/22] usb: serial: ti_usb_3410_5052: Change ti_write_byte function arguments

2016-07-27 Thread Mathieu OTHACEHE
Hi, > this makes me think something is wrong with the data structure. > We should have a be32 there, it seems to me. You mean something like : struct ti_write_data_bytes { u8 bAddrType; u8 bDataType; u8 bDataCounter; __be32 wBaseAddr; u8

Re: Patch for pl2302 usb/serial module.

2016-07-27 Thread Greg KH
On Wed, Jul 27, 2016 at 07:46:01AM -0400, Serge Bromow wrote: > Please Consider the Environment before Printing the E-Mail. IMPORTANT > NOTICE: This message is intended only for the use of the individual or > entity to which it is addressed. The message may contain information that is > privileged,

Re: [PATCH v2 03/22] usb: serial: ti_usb_3410_5052: Use kzalloc instead of kmalloc

2016-07-27 Thread Mathieu OTHACEHE
> in that case, where is the initialisation to 0 you avoid and hence > can remove from the code? Hi, In v1, kzalloc was useful to avoid wFlags initialisation to 0 : https://lkml.org/lkml/2016/5/12/139 In v2 wFlags initialisation has be removed so this patch has no purpose anymore, my bad. Tha

Re: Patch for pl2302 usb/serial module.

2016-07-27 Thread Oliver Neukum
On Wed, 2016-07-27 at 07:46 -0400, Serge Bromow wrote: > In summary I am using a new HP product (display pole) that works with > the pl2303 module but is not recognized as the device product ID is > not > in the module table. To correct this I have attached 2 patches that I > would like applied

Patch for pl2302 usb/serial module.

2016-07-27 Thread Serge Bromow
I was referred to your group from "helpd...@kernel.org". In summary I am using a new HP product (display pole) that works with the pl2303 module but is not recognized as the device product ID is not in the module table. To correct this I have attached 2 patches that I would like applied to th

Re: [PATCH v2 03/22] usb: serial: ti_usb_3410_5052: Use kzalloc instead of kmalloc

2016-07-27 Thread Sergei Shtylyov
On 7/26/2016 8:59 PM, Mathieu OTHACEHE wrote: Use kzalloc instead of kmalloc to avoid field initialisation to 0. Avoid? kzalloc() does initialize to 0. :-) Signed-off-by: Mathieu OTHACEHE MBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body o

Re: [PATCH] usb: gadget: remove redundant self assignment

2016-07-27 Thread Peter Chen
On Mon, Jul 25, 2016 at 10:57:36PM +0100, Colin King wrote: > From: Colin Ian King > > The assignment ret = ret is redundant and can be removed. > > Signed-off-by: Colin Ian King > --- > drivers/usb/gadget/udc/core.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/

Re: [RFC] usb: host: u132-hcd: Remove deprecated create_singlethread_workqueue

2016-07-27 Thread Oliver Neukum
On Wed, 2016-07-27 at 14:50 +0530, Bhaktipriya Shridhar wrote: > The workqueue "workqueue" has multiple workitems which may require > ordering. Hence, a dedicated ordered workqueue has been used. > Since the workqueue is not being used on a memory reclaim path, > WQ_MEM_RECLAIM has not been set. T

Re: [PATCH v2 1/2] usb: typec: Add USB Power Delivery sink port support

2016-07-27 Thread Oliver Neukum
On Tue, 2016-07-26 at 11:37 -0700, Bin Gao wrote: > +#define MAKE_HEADER(port, header, msg, objs) \ > +do { \ > + header->type = msg; \ > + header->data_role = PD_DATA_ROLE_UFP; \ > + header->revision = port->pd_rev; \ > + header->power_role = PD_POWER_ROLE_SINK; \ > +

[RFC] usb: host: u132-hcd: Remove deprecated create_singlethread_workqueue

2016-07-27 Thread Bhaktipriya Shridhar
alloc_ordered_workqueue replaces the deprecated create_singlethread_workqueue. The workqueue "workqueue" has multiple workitems which may require ordering. Hence, a dedicated ordered workqueue has been used. Since the workqueue is not being used on a memory reclaim path, WQ_MEM_RECLAIM has not bee

[RFC] whci: Remove deprecated create_singlethread_workqueue

2016-07-27 Thread Bhaktipriya Shridhar
alloc_ordered_workqueue replaces the deprecated create_singlethread_workqueue. The workqueue "workqueue" has multiple workitems which may require ordering. Hence, a dedicated ordered workqueue has been used. Since the workqueue is not being used on a memory reclaim path, WQ_MEM_RECLAIM has not bee

Re: [PATCH v2 2/2] usb: typec: add PD sink port support for Intel Whiskey Cove PMIC Typc-C PHY driver

2016-07-27 Thread Felipe Balbi
(before anything: please have a look at the patches I wrote on top of this. They might help you somewhat https://git.kernel.org/cgit/linux/kernel/git/balbi/usb.git/log/?h=bxt-typec-pd-fixes) Bin Gao writes: > From: Chandra Sekhar Anagani > > This adds PD sink port support for the USB Type-C PH

Re: [PATCH v2 10/22] usb: serial: ti_usb_3410_5052: Change ti_write_byte function arguments

2016-07-27 Thread Oliver Neukum
On Tue, 2016-07-26 at 19:59 +0200, Mathieu OTHACEHE wrote: > @@ -1626,7 +1624,7 @@ static int ti_write_byte(struct usb_serial_port > *port, > data->bAddrType = TI_RW_DATA_ADDR_XDATA; > data->bDataType = TI_RW_DATA_BYTE; > data->bDataCounter = 1; > - data->wBaseAddrHi =

Re: [PATCH v2 1/2] usb: typec: Add USB Power Delivery sink port support

2016-07-27 Thread Felipe Balbi
Hi, Bin Gao writes: > This patch implements a simple USB Power Delivery sink port state machine. > It assumes the hardware only handles PD packet transmitting and receiving > over the CC line of the USB Type-C connector. The state transition is > completely controlled by software. This patch onl

Re: [PATCH v2 03/22] usb: serial: ti_usb_3410_5052: Use kzalloc instead of kmalloc

2016-07-27 Thread Oliver Neukum
On Tue, 2016-07-26 at 19:59 +0200, Mathieu OTHACEHE wrote: > Use kzalloc instead of kmalloc to avoid field initialisation to 0. > > Signed-off-by: Mathieu OTHACEHE > --- > drivers/usb/serial/ti_usb_3410_5052.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/