[PATCH v3] USB: pl2303: Rewrite pl2303_encode_baud_rate_divisor

2015-07-26 Thread MichaƂ Pecio
This commit fixes the following issues: 1. The 9th bit of buf was believed to be the LSB of divisor's exponent, but the hardware interprets it as MSB (9th bit) of the mantissa. The exponent is actually one bit shorter and applies to base 4, not 2 as previously believed. 2. Loop iterations double

Re: [PATCH 3/4] cp210x: Store part number

2015-07-26 Thread Oliver Neukum
On Fri, 2015-07-24 at 08:48 +0200, Petr Tesarik wrote: > @@ -872,6 +886,12 @@ static int cp210x_startup(struct usb_serial > *serial) > > usb_set_serial_data(serial, spriv); > > + /* Get the 1-byte part number of the cp210x device */ > + cp210x_control_msg(serial->port[0], CP

Re: [PATCH v3 42/46] usb: gadget: move ep_matches() from epautoconf to udc-core

2015-07-26 Thread Alan Stern
On Sun, 26 Jul 2015, Petr Cvek wrote: > What about higher speeds (not relevant on PXA, but ep_matches() is > called from usb_ep_autoconfig_ss() )? According to > > http://wiki.osdev.org/Universal_Serial_Bus#Maximum_Data_Payload_Size_2 > > High speed INT endpoint has a maximum data payload

Re: [PATCH v3 42/46] usb: gadget: move ep_matches() from epautoconf to udc-core

2015-07-26 Thread Petr Cvek
On 26.7.2015 17:14, Alan Stern wrote: > On Sun, 26 Jul 2015, Petr Cvek wrote: > >> What about higher speeds (not relevant on PXA, but ep_matches() is >> called from usb_ep_autoconfig_ss() )? According to >> >> http://wiki.osdev.org/Universal_Serial_Bus#Maximum_Data_Payload_Size_2 >> >> High s

Re: [PATCH v3 42/46] usb: gadget: move ep_matches() from epautoconf to udc-core

2015-07-26 Thread Robert Baldyga
On 07/26/2015 05:14 PM, Alan Stern wrote: On Sun, 26 Jul 2015, Petr Cvek wrote: What about higher speeds (not relevant on PXA, but ep_matches() is called from usb_ep_autoconfig_ss() )? According to http://wiki.osdev.org/Universal_Serial_Bus#Maximum_Data_Payload_Size_2 High speed INT e

[PATCH] drivers/usb: Delete XHCI command timer if necessary

2015-07-26 Thread Gavin Shan
When xhci_mem_cleanup() is called, it's possible that the command timer isn't initialized and scheduled. For those cases, to delete the command timer causes soft-lockup as below stack dump shows. The patch avoids deleting the command timer if it's not scheduled with the help of timer_pending(). N

[PATCH] USB: Gadget: UVC: Fix unreachable control queue completion function in f_uvc.c

2015-07-26 Thread Petr Cvek
Some UVC commands require additional data. Add usb_ep_queue(), so uvc_function_ep0_complete() can be called and send received data to the userspace. Fixing maxpacket variable inicialization value to be inside USB full speed range. Signed-off-by: Petr Cvek --- drivers/usb/gadget/function/f_uvc.c

Re: [PATCH] usb: gadget: Convert use of __constant_cpu_to_le16 to cpu_to_le16

2015-07-26 Thread Vaishali Thakkar
On Sat, Jun 6, 2015 at 7:02 AM, Vaishali Thakkar wrote: > In big endian cases, macro cpu_to_le16 unfolds to __swab16 which > provides special case for constants. In little endian cases, > __constant_cpu_to_le16 and cpu_to_le16 expand directly to the > same expression. So, replace __constant_cpu_to

Re: [PATCH 3/4] cp210x: Store part number

2015-07-26 Thread Petr Tesarik
On Sun, 26 Jul 2015 15:32:54 +0200 Oliver Neukum wrote: > On Fri, 2015-07-24 at 08:48 +0200, Petr Tesarik wrote: > > @@ -872,6 +886,12 @@ static int cp210x_startup(struct usb_serial > > *serial) > > > > usb_set_serial_data(serial, spriv); > > > > + /* Get the 1-byte part number

[PATCH v3 5/6] usb: dwc3: ep0: Add chained TRB support

2015-07-26 Thread Kishon Vijay Abraham I
Add chained TRB support to ep0. Now TRB's can be chained just by invoking _dwc3_ep0_start_trans_ with 'chain' parameter set to true. Signed-off-by: Kishon Vijay Abraham I --- drivers/usb/dwc3/ep0.c| 16 +--- drivers/usb/dwc3/gadget.c |2 +- 2 files changed, 14 insertions(+)

[PATCH v3 6/6] usb: dwc3: ep0: handle non maxpacket aligned transfers > 512

2015-07-26 Thread Kishon Vijay Abraham I
Use chained TRB mechanism to handle non maxpacket aligned transfers greater than bounce buffer size. With this the first TRB will be programmed to receive 'ALIGN(ur->length - maxp, maxp)' data and the second TRB will be programmed to receive the remaining data using bounce buffer. Signed-off-by: K

[PATCH v3] USB: sierra: add 1199:68AB device ID

2015-07-26 Thread Dirk Behme
Add support for the Sierra Wireless AR8550 device with USB descriptor 0x1199, 0x68AB. It is common with MC879x modules 1199:683c/683d which also are composite devices with 7 interfaces (0..6) and also MDM62xx based as the AR8550. The major difference are only the interface attributes 02/02/01 on

[PATCH v3 1/6] usb: dwc3: ep0: Fix mem corruption on OUT transfers of more than 512 bytes

2015-07-26 Thread Kishon Vijay Abraham I
DWC3 uses bounce buffer to handle non max packet aligned OUT transfers and the size of bounce buffer is 512 bytes. However if the host initiates OUT transfers of size more than 512 bytes (and non max packet aligned), the driver throws a WARN dump but still programs the TRB to receive more than 512

[PATCH v3 3/6] usb: dwc3: ep0: preparation for handling non maxpacket aligned transfers > 512

2015-07-26 Thread Kishon Vijay Abraham I
No functional change. This is in preparation for handling non maxpacket aligned transfers greater than bounce buffer size. This is basically to avoid code duplication when using chained TRB transfers to handle non maxpacket aligned transfers greater than bounce buffer size. Signed-off-by: Kishon V

RE: [PATCH 2/3] drivers: usb: dwc3: Add adjust_frame_length_quirk

2015-07-26 Thread Badola Nikhil
> -Original Message- > From: Felipe Balbi [mailto:ba...@ti.com] > Sent: Thursday, July 23, 2015 8:39 PM > To: Felipe Balbi > Cc: Badola Nikhil-B46172; linux-ker...@vger.kernel.org; linux- > u...@vger.kernel.org; linux-o...@vger.kernel.org; > gre...@linuxfoundation.org > Subject: Re: [PATCH

[PATCH v3 4/6] usb: dwc3; ep0: Modify _dwc3_ep0_start_trans_ API to take 'chain' parameter

2015-07-26 Thread Kishon Vijay Abraham I
No functional change. Added a new parameter in _dwc3_ep0_start_trans_ to indicate whether the TRB is a chained TRB or last TRB. This is in preparation for adding chained TRB support for ep0. Signed-off-by: Kishon Vijay Abraham I --- drivers/usb/dwc3/ep0.c | 15 --- 1 file changed,

[PATCH v3 2/6] usb: dwc3: ep0: use _roundup_ to calculate the transfer size

2015-07-26 Thread Kishon Vijay Abraham I
No functional change. Used _roundup_ macro to calculate the transfer size aligned to maxpacket in dwc3_ep0_complete_data. It also makes it similar to how transfer size is calculated in __dwc3_ep0_do_control_data. Signed-off-by: Kishon Vijay Abraham I --- drivers/usb/dwc3/ep0.c |4 +--- 1 fi

[PATCH v3 0/6] usb: dwc3: handle non maxpacket aligned transfers > 512

2015-07-26 Thread Kishon Vijay Abraham I
Patch series first fixes memory corruption and then adds support to handle non maxpacket aligned transfers. Patch series adds support to handle non maxpacket aligned transfers greater than bounce buffer size (512). It first adds chained TRB support and then uses it to handle non maxpacket aligned