Re: [PATCH 3/3] usb: chipidea: use hrtimer for otg fsm timers

2015-02-26 Thread Li Jun
On Thu, Feb 26, 2015 at 07:25:56PM +0800, Peter Chen wrote: > On Mon, Feb 09, 2015 at 02:54:48PM +0800, Li Jun wrote: > > From: Li Jun > > > > Current otg fsm timers are using controller 1ms irq and count it, this patch > > is to replace it with hrtimer solution, use one hrtimer for all otg timer

Re: [PATCH v3 1/1] USB: ch341: set tty baud speed according to tty struct

2015-02-26 Thread Johan Hovold
On Thu, Feb 26, 2015 at 10:02:41AM -0500, Nicolas PLANEL wrote: > The ch341_set_baudrate() function initialize the device baud speed according > to the value on priv->baud_rate. By default the ch341_open() set it to a > hardcoded value (DEFAULT_BAUD_RATE 9600). Unfortunately, the tty_struct is > no

Re: [PATCH v3] USB: serial: cp210x: Adding Seletek device id's

2015-02-26 Thread Johan Hovold
On Fri, Feb 27, 2015 at 02:08:29AM +0100, Michiel vd Garde wrote: > These device ID's are not associated with the cp210x module currently, > but should be. This patch allows the devices to operate upon > connecting them to the usb bus as intended. > > Signed-off-by: Michiel van de Garde Now appl

keyboard/trackpad combo unusable on MacBookPro4,1 with bcm5974.ko

2015-02-26 Thread Christian Böhme
Hello all, this is a response to https://bugzilla.kernel.org/show_bug.cgi?id=14987#c6 whose main thread more or less merely rehashes what was already said in other (bug) reports before it elsewhere. I'd like for this to be a reminder that the issue never really was resolved but left lingering b

Re: [PATCH v4 4/4] phy: add phy-hi6220-usb

2015-02-26 Thread Peter Chen
On Thu, Feb 26, 2015 at 04:48:30PM +0800, zhangfei wrote: > Hi, Roger > > On 02/24/2015 06:13 PM, Roger Quadros wrote: > >>>On Sat, Feb 21, 2015 at 11:03:05PM +0800, zhangfei wrote: > +static void hi6220_start_peripheral(struct hi6220_priv *priv, bool > on) > +{ >

Re: [PATCH v3] USB: serial: cp210x: Adding Seletek device id's

2015-02-26 Thread Michiel vd Garde
These device ID's are not associated with the cp210x module currently, but should be. This patch allows the devices to operate upon connecting them to the usb bus as intended. Signed-off-by: Michiel van de Garde diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index f40c8

Re: [PATCH v2] USB: serial: cp210x: Adding Seletek device id's

2015-02-26 Thread Greg KH
On Fri, Feb 27, 2015 at 01:44:54AM +0100, Michiel vd Garde wrote: > These device ID's are not associated with the cp210x module currently, but > should be. > This patch allows the devices to operate upon connecting them to the usb bus > as intended. > > Signed-off-by: Michiel van de Garde

[PATCH v2] USB: serial: cp210x: Adding Seletek device id's

2015-02-26 Thread Michiel vd Garde
These device ID's are not associated with the cp210x module currently, but should be. This patch allows the devices to operate upon connecting them to the usb bus as intended. Signed-off-by: Michiel van de Garde mailto:mgpar...@gmail.com>> diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/

Re: [RFC PATCH] xhci: fix reporting of 0-sized URBs in control endpoints

2015-02-26 Thread Aleksander Morgado
On Thu, Feb 26, 2015 at 5:12 PM, Mathias Nyman wrote: > When a control transfer has a short data stage, the xHCI controller generates > two transfer events: a COMP_SHORT_TX event that specifies the untransferred > amount, and a COMP_SUCCESS event. But when the data stage is not short, only > the C

[PATCH v3 09/22] usb: musb: dsps: remove babble check from dsps irq handler

2015-02-26 Thread Felipe Balbi
musb->int_usb already contains the correct information for musb-core to handle babble. In fact, this very check was just causing a nonsensical babble interrupt storm. With this I can get test.sh to run and, even though all tests fail with timeout, that's still better than locking up the system du

[PATCH v3 04/22] usb: musb: dsps: return error code if reset fails

2015-02-26 Thread Felipe Balbi
if reset fails, we should return a *negative* error code, not a positive value. Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_dsps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index 53bd0e71d19f..7584601

[PATCH v3 06/22] usb: musb: core: break long line

2015-02-26 Thread Felipe Balbi
no functional changes, clean up only. Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index f63599368645..10d3f10ba728 100644 --- a/drivers/usb/musb/musb

[PATCH v3 07/22] usb: musb: core: remove unnecessary reg access from resume IRQ

2015-02-26 Thread Felipe Balbi
when musb is operating as host and a remote wakeup fires up, a resume interrupt will be raised. At that point SUSPENDM bit is automatically cleared and RESUME bit is automatically set. Remove those two from IRQ handler. Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_core.c | 15 -

[PATCH v3 22/22] usb: musb: core: always try to recover from babble

2015-02-26 Thread Felipe Balbi
we can also have babble conditions with LS/FS and we also want to recover in that case. Because of that we will drop the check of HSMODE and always try to run babble recovery. Suggested-by: Bin Liu Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_core.c | 22 ++ 1 file

[PATCH v3 02/22] usb: musb: core: add missing curly braces

2015-02-26 Thread Felipe Balbi
no functional changes, clean up only. Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 625ff4321505..2767ce1bf016 100644 --- a/drivers/usb/musb/mu

[PATCH v3 11/22] usb: musb: core: controller drops session automatically

2015-02-26 Thread Felipe Balbi
Whenever babble happens, MUSB controller will drop session automatically. The only case where it won't drop the session, is when we're running on AM335x and SW_SESSION_CTRL bit has been set. In that case, controller will not touch session bit so SW has a chance to recover from babble condition. S

[PATCH v3 20/22] usb: musb: core: remove unnecessary forward declaration

2015-02-26 Thread Felipe Balbi
no functional changes, cleanup only. Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 191f02ee4ec6..cb9f6bd07b64 100644 --- a/drivers/usb/musb/musb_core.c +++ b/driver

[PATCH v3 13/22] usb: musb: core: refactor IRQ enable/disable to separate functions

2015-02-26 Thread Felipe Balbi
sometimes we want to just mask/unmask interrupts without touching devctl register. For those cases, let's introduce musb_enable_interrupts and musb_disable_interrupts() Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_core.c | 37 ++--- 1 file changed, 26 ins

[PATCH v3 12/22] usb: musb: dsps: add dsps_ prefix to sw_babble_control

2015-02-26 Thread Felipe Balbi
this makes it easier to filter function traces. No functional changes. Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_dsps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index 285f0e4b083d..b52eecaf11a4

[PATCH v3 15/22] usb: musb: core: decrease delayed_work time

2015-02-26 Thread Felipe Balbi
When babble IRQ happens, we need to wait only 5.3us (320 cycles of 60MHz clock), we will give it some slack and schedule our work a 10 usecs into the future. Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/u

[PATCH v3 14/22] usb: musb: don't touch devctl from babble recovery

2015-02-26 Thread Felipe Balbi
We do *not* want to touch devctl at all when trying to recover from babble. All we want to do is mask IRQs until we're done without our babble recovery, at which point we will unmask IRQs. Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_core.c | 6 -- 1 file changed, 4 insertions(+), 2

[PATCH v3 16/22] usb: musb: dsps: do not reset musb on babble

2015-02-26 Thread Felipe Balbi
All we have to do is, really, drop session bit and let the session restart. Big thanks goes to Bin Liu for inspiring this work. Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_dsps.c | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/usb/musb/musb

[PATCH v3 21/22] usb: musb: core: disable irqs inside babble recovery

2015-02-26 Thread Felipe Balbi
There's no point is splitting those anymore. We're now also able to drop another forward declaration. Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_core.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core

[PATCH v3 18/22] usb: musb: rename ->reset() to ->recover()

2015-02-26 Thread Felipe Balbi
recover is a much better name than reset, considering we don't really reset the IP, just run platform-specific babble recovery algorithm. while at that, also fix a typo in comment and add kdoc for recover memeber of platform_ops. Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_core.c | 2

[PATCH v3 08/22] usb: musb: core: there is no connect interrupt in peripheral mode

2015-02-26 Thread Felipe Balbi
MUSB does not generate a connect IRQ when working in peripheral mode. Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_core.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 81909ea74353..c3c5a6462600 100644 --- a/driv

[PATCH v3 17/22] usb: musb: core: simplify musb_recover_work()

2015-02-26 Thread Felipe Balbi
we're not resetting musb at all, just restarting the session. This means we don't need to touch PHYs or VBUS or anything like that. Just make sure session bit is reenabled after MUSB dropped it. while at that, make sure to tell usbcore that we're dropping the session and, thus, disconnecting the d

[PATCH v3 19/22] usb: musb: core: drop recover_work

2015-02-26 Thread Felipe Balbi
that's not needed anymore. Everything that we call is irq-safe, so we might as well not have a delayed work for babble recovery. Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_core.c | 17 + drivers/usb/musb/musb_core.h | 1 - 2 files changed, 9 insertions(+), 9 deletions

[PATCH v3 05/22] usb: musb: core: move babble recovery inside babble check

2015-02-26 Thread Felipe Balbi
There was already a proper place where we were checking for babble interrupts, move babble recovery there. Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_core.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/mus

[PATCH v3 10/22] usb: musb: dsps: check for the single bit

2015-02-26 Thread Felipe Balbi
We want to check if that particular bit is set. It could very well be that bootloader (or romcode) has fiddled with MUSB before us which could leave other bits set in this register. Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_dsps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH v3 01/22] usb: musb: core: remove unnecessary logical comparison

2015-02-26 Thread Felipe Balbi
devctl & MUSB_DEVCTL_HM represents a single bit, just check for the bit, there's really no need to compare the result against 0. Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/musb/musb_core.c b/drivers

[PATCH v3 03/22] usb: musb: core: fix highspeed check

2015-02-26 Thread Felipe Balbi
FSDEV is set for both HIGH and FULL speeds, the correct HIGHSPEED check is done through power register's HSMODE bit. Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_core.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/drivers/usb/musb/musb_core.

[PATCH v3 00/22] usb: musb: the big MUSB patch bomb

2015-02-26 Thread Felipe Balbi
Hi folks, this is v3 of my patchset which has been in discussion with Bin Liu (hey, thanks). patches have been tested with AM335x BBB using g_zero and g_mass_storage. My BBB, for whatever reason, always causes babble when I connect the peripheral port to the host port on the same board. So that

Re: [PATCH v2 03/15] usb: musb: core: fix highspeed check

2015-02-26 Thread Felipe Balbi
On Thu, Feb 26, 2015 at 02:38:07PM -0600, Bin Liu wrote: > On Thu, Feb 26, 2015 at 2:31 PM, Felipe Balbi wrote: > > On Thu, Feb 26, 2015 at 02:25:20PM -0600, Bin Liu wrote: > >> On Thu, Feb 26, 2015 at 2:19 PM, Felipe Balbi wrote: > >> > Hi again, > >> > > >> > On Thu, Feb 26, 2015 at 02:15:40PM

Re: [PATCH v2 03/15] usb: musb: core: fix highspeed check

2015-02-26 Thread Bin Liu
On Thu, Feb 26, 2015 at 2:31 PM, Felipe Balbi wrote: > On Thu, Feb 26, 2015 at 02:25:20PM -0600, Bin Liu wrote: >> On Thu, Feb 26, 2015 at 2:19 PM, Felipe Balbi wrote: >> > Hi again, >> > >> > On Thu, Feb 26, 2015 at 02:15:40PM -0600, Felipe Balbi wrote: >> >> > > >> >> > On Thu, Feb 26, 2015 at

Re: [PATCH v2 03/15] usb: musb: core: fix highspeed check

2015-02-26 Thread Felipe Balbi
On Thu, Feb 26, 2015 at 02:25:20PM -0600, Bin Liu wrote: > On Thu, Feb 26, 2015 at 2:19 PM, Felipe Balbi wrote: > > Hi again, > > > > On Thu, Feb 26, 2015 at 02:15:40PM -0600, Felipe Balbi wrote: > >> > > >> >> > On Thu, Feb 26, 2015 at 12:25:16PM -0600, Felipe Balbi wrote: > >> > > >> >> >> FSDEV

Re: [PATCH v2 03/15] usb: musb: core: fix highspeed check

2015-02-26 Thread Bin Liu
On Thu, Feb 26, 2015 at 2:19 PM, Felipe Balbi wrote: > Hi again, > > On Thu, Feb 26, 2015 at 02:15:40PM -0600, Felipe Balbi wrote: >> > > >> >> > On Thu, Feb 26, 2015 at 12:25:16PM -0600, Felipe Balbi wrote: >> > > >> >> >> FSDEV is set for both HIGH and FULL speeds, >> > > >> >> >> the correct HI

Re: [PATCH v2 03/15] usb: musb: core: fix highspeed check

2015-02-26 Thread Felipe Balbi
Hi again, On Thu, Feb 26, 2015 at 02:15:40PM -0600, Felipe Balbi wrote: > > > >> >> > On Thu, Feb 26, 2015 at 12:25:16PM -0600, Felipe Balbi wrote: > > > >> >> >> FSDEV is set for both HIGH and FULL speeds, > > > >> >> >> the correct HIGHSPEED check is done through > > > >> >> >> power register's

Re: [PATCH v2 03/15] usb: musb: core: fix highspeed check

2015-02-26 Thread Felipe Balbi
Hi, On Thu, Feb 26, 2015 at 02:11:15PM -0600, Felipe Balbi wrote: > On Thu, Feb 26, 2015 at 02:04:37PM -0600, Bin Liu wrote: > > On Thu, Feb 26, 2015 at 1:59 PM, Felipe Balbi wrote: > > > On Thu, Feb 26, 2015 at 01:49:51PM -0600, Bin Liu wrote: > > >> On Thu, Feb 26, 2015 at 1:48 PM, Felipe Balbi

Re: [PATCH v2 03/15] usb: musb: core: fix highspeed check

2015-02-26 Thread Felipe Balbi
On Thu, Feb 26, 2015 at 02:04:37PM -0600, Bin Liu wrote: > On Thu, Feb 26, 2015 at 1:59 PM, Felipe Balbi wrote: > > On Thu, Feb 26, 2015 at 01:49:51PM -0600, Bin Liu wrote: > >> On Thu, Feb 26, 2015 at 1:48 PM, Felipe Balbi wrote: > >> > On Thu, Feb 26, 2015 at 01:30:21PM -0600, Bin Liu wrote: >

Re: [PATCH v2 03/15] usb: musb: core: fix highspeed check

2015-02-26 Thread Bin Liu
On Thu, Feb 26, 2015 at 2:04 PM, Bin Liu wrote: > On Thu, Feb 26, 2015 at 1:59 PM, Felipe Balbi wrote: >> On Thu, Feb 26, 2015 at 01:49:51PM -0600, Bin Liu wrote: >>> On Thu, Feb 26, 2015 at 1:48 PM, Felipe Balbi wrote: >>> > On Thu, Feb 26, 2015 at 01:30:21PM -0600, Bin Liu wrote: >>> >> Felipe

Re: [PATCH v2 03/15] usb: musb: core: fix highspeed check

2015-02-26 Thread Bin Liu
On Thu, Feb 26, 2015 at 1:59 PM, Felipe Balbi wrote: > On Thu, Feb 26, 2015 at 01:49:51PM -0600, Bin Liu wrote: >> On Thu, Feb 26, 2015 at 1:48 PM, Felipe Balbi wrote: >> > On Thu, Feb 26, 2015 at 01:30:21PM -0600, Bin Liu wrote: >> >> Felipe, >> >> >> >> On Thu, Feb 26, 2015 at 12:27 PM, Felipe

[PATCH v3 1/1] USB: ch341: set tty baud speed according to tty struct

2015-02-26 Thread Nicolas PLANEL
The ch341_set_baudrate() function initialize the device baud speed according to the value on priv->baud_rate. By default the ch341_open() set it to a hardcoded value (DEFAULT_BAUD_RATE 9600). Unfortunately, the tty_struct is not initialized with the same default value. (usually 56700) This means t

[PATCH v3 0/1] USB: ch341: set tty baud speed according to tty struct

2015-02-26 Thread Nicolas PLANEL
Nicolas PLANEL (1): USB: ch341: set tty baud speed according to tty struct drivers/usb/serial/ch341.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) -- 2.3.0 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.ker

Re: [PATCH v2 03/15] usb: musb: core: fix highspeed check

2015-02-26 Thread Felipe Balbi
On Thu, Feb 26, 2015 at 01:49:51PM -0600, Bin Liu wrote: > On Thu, Feb 26, 2015 at 1:48 PM, Felipe Balbi wrote: > > On Thu, Feb 26, 2015 at 01:30:21PM -0600, Bin Liu wrote: > >> Felipe, > >> > >> On Thu, Feb 26, 2015 at 12:27 PM, Felipe Balbi wrote: > >> > On Thu, Feb 26, 2015 at 12:25:16PM -0600

Re: [PATCH 24/29] usb: gadget: printer: factor out f_printer

2015-02-26 Thread Felipe Balbi
On Mon, Feb 23, 2015 at 04:02:13PM +0100, Andrzej Pietrasiewicz wrote: > The legacy printer gadget now contains both a reusable printer function > and legacy gadget proper implementations interwoven, but logically > separate. This patch factors out a reusable f_printer. > > Signed-off-by: Andrzej

Re: [PATCH v2 03/15] usb: musb: core: fix highspeed check

2015-02-26 Thread Felipe Balbi
On Thu, Feb 26, 2015 at 01:30:21PM -0600, Bin Liu wrote: > Felipe, > > On Thu, Feb 26, 2015 at 12:27 PM, Felipe Balbi wrote: > > On Thu, Feb 26, 2015 at 12:25:16PM -0600, Felipe Balbi wrote: > >> FSDEV is set for both HIGH and FULL speeds, > >> the correct HIGHSPEED check is done through > >> pow

Re: [PATCH v2 03/15] usb: musb: core: fix highspeed check

2015-02-26 Thread Bin Liu
On Thu, Feb 26, 2015 at 1:48 PM, Felipe Balbi wrote: > On Thu, Feb 26, 2015 at 01:30:21PM -0600, Bin Liu wrote: >> Felipe, >> >> On Thu, Feb 26, 2015 at 12:27 PM, Felipe Balbi wrote: >> > On Thu, Feb 26, 2015 at 12:25:16PM -0600, Felipe Balbi wrote: >> >> FSDEV is set for both HIGH and FULL speed

Re: [PATCH v2 09/15] usb: musb: dsps: remove babble check from dsps irq handler

2015-02-26 Thread Felipe Balbi
On Thu, Feb 26, 2015 at 01:34:03PM -0600, Bin Liu wrote: > Felipe, > > On Thu, Feb 26, 2015 at 12:25 PM, Felipe Balbi wrote: > > musb->int_usb already contains the correct > > information for musb-core to handle babble. > > > > In fact, this very check was just causing a > > nonsensical babble in

[RFC][PATCH] usbnet: Fix tx_bytes statistic running backward in cdc_ncm

2015-02-26 Thread Ben Hutchings
cdc_ncm disagrees with usbnet about how much framing overhead should be counted in the tx_bytes statistics, and tries 'fix' this by decrementing tx_bytes on the transmit path. But statistics must never be decremented except due to roll-over; this will thoroughly confuse user-space. Also, tx_bytes

Re: [PATCH v2 11/15] usb: musb: core: controller drops session automatically

2015-02-26 Thread Bin Liu
Felipe, On Thu, Feb 26, 2015 at 12:25 PM, Felipe Balbi wrote: > Whenever babble happens, MUSB controller will > drop session automatically. > > The only case where it won't drop the session, > is when we're running on AM335x and SW_SESSION_CTRL > bit has been set. In that case, controller will >

Re: [PATCH v2 09/15] usb: musb: dsps: remove babble check from dsps irq handler

2015-02-26 Thread Bin Liu
Felipe, On Thu, Feb 26, 2015 at 12:25 PM, Felipe Balbi wrote: > musb->int_usb already contains the correct > information for musb-core to handle babble. > > In fact, this very check was just causing a > nonsensical babble interrupt storm because. I guess this is my English problem. I thought you

[PATCH net-next] usbnet: Fix tx_packets stat for FLAG_MULTI_FRAME drivers

2015-02-26 Thread Ben Hutchings
Currently the usbnet core does not update the tx_packets statistic for drivers with FLAG_MULTI_PACKET and there is no hook in the TX completion path where they could do this. cdc_ncm and dependent drivers are bumping tx_packets stat on the transmit path while asix and sr9800 aren't updating it at

Re: [PATCH v2 03/15] usb: musb: core: fix highspeed check

2015-02-26 Thread Bin Liu
Felipe, On Thu, Feb 26, 2015 at 12:27 PM, Felipe Balbi wrote: > On Thu, Feb 26, 2015 at 12:25:16PM -0600, Felipe Balbi wrote: >> FSDEV is set for both HIGH and FULL speeds, >> the correct HIGHSPEED check is done through >> power register's HSMODE bit. >> >> Signed-off-by: Felipe Balbi > > I'm st

Re: [PATCH] USB: serial: cp210x: Adding Seletek device id's

2015-02-26 Thread Michiel
On 26-02-15 18:54, Johan Hovold wrote: > Thanks for the patch. Looks good, but there are a few minor issues: Oh webmail... :/ version 2 here: These device ID's are not associated with the cp210x module currently, but should be. This patch allows the devices to operate upon connecting them to the u

Re: [PATCH v2] usb: isp1760: add peripheral/device controller chip id

2015-02-26 Thread Laurent Pinchart
Hi Sudeep, Thank you for the patch. On Thursday 26 February 2015 11:47:57 Sudeep Holla wrote: > As per the SAF1761 data sheet[0], the DcChipID register represents > the hardware version number (0001h) and the chip ID (1582h) for the > Peripheral Controller. > > However as per the ISP1761 data sh

Re: URB IRQ fires on URB after usb_kill_urb() already completed

2015-02-26 Thread Alan Stern
On Wed, 25 Feb 2015, Devin Heitmueller wrote: > Hi Alan, > > I think I see what's going on. Permit me to comment on your > explanation of urb->use_count first, since it's relevant later on. I won't go over this in great detail, because I think your proposed explanation is wrong. My impression

[PATCH] usb: gadget: f_mass_storage: use defined constant instead of numeric value

2015-02-26 Thread Tal Shorer
Signed-off-by: Tal Shorer --- drivers/usb/gadget/function/f_mass_storage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/function/f_mass_storage.c b/drivers/usb/gadget/function/f_mass_storage.c index 811929c..6d5ca2b 100644 --- a/drivers/usb/gadget/functi

Re: [PATCH v2 03/15] usb: musb: core: fix highspeed check

2015-02-26 Thread Felipe Balbi
On Thu, Feb 26, 2015 at 12:25:16PM -0600, Felipe Balbi wrote: > FSDEV is set for both HIGH and FULL speeds, > the correct HIGHSPEED check is done through > power register's HSMODE bit. > > Signed-off-by: Felipe Balbi I'm still unsure if we should really ignore babble on FS/LS. It seems to me we

[PATCH v2 05/15] usb: musb: core: move babble recovery inside babble check

2015-02-26 Thread Felipe Balbi
There was already a proper place where we were checking for babble interrupts, move babble recovery there. Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_core.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/mus

[PATCH v2 15/15] usb: musb: core: decrease delayed_work time

2015-02-26 Thread Felipe Balbi
When babble IRQ happens, we need to wait only 5.3us (320 cycles of 60MHz clock), we will give it some slack and schedule our work a 10 usecs into the future. Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/u

[PATCH v2 14/15] usb: musb: don't touch devctl from babble recovery

2015-02-26 Thread Felipe Balbi
We do *not* want to touch devctl at all when trying to recover from babble. All we want to do is mask IRQs until we're done without our babble recovery, at which point we will unmask IRQs. Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_core.c | 6 -- 1 file changed, 4 insertions(+), 2

[PATCH v2 10/15] usb: musb: dsps: check for the single bit

2015-02-26 Thread Felipe Balbi
We want to check if that particular bit is set. It could very well be that bootloader (or romcode) has fiddled with MUSB before us which could leave other bits set in this register. Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_dsps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH v2 11/15] usb: musb: core: controller drops session automatically

2015-02-26 Thread Felipe Balbi
Whenever babble happens, MUSB controller will drop session automatically. The only case where it won't drop the session, is when we're running on AM335x and SW_SESSION_CTRL bit has been set. In that case, controller will not touch session bit so SW has a chance to recover from babble condition. S

[PATCH v2 02/15] usb: musb: core: add missing curly braces

2015-02-26 Thread Felipe Balbi
no functional changes, clean up only. Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 625ff4321505..2767ce1bf016 100644 --- a/drivers/usb/musb/mu

[PATCH v2 12/15] usb: musb: dsps: add dsps_ prefix to sw_babble_control

2015-02-26 Thread Felipe Balbi
this makes it easier to filter function traces. No functional changes. Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_dsps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index 285f0e4b083d..b52eecaf11a4

[PATCH v2 08/15] usb: musb: core: there is no connect interrupt in peripheral mode

2015-02-26 Thread Felipe Balbi
MUSB does not generate a connect IRQ when working in peripheral mode. Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_core.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 81909ea74353..c3c5a6462600 100644 --- a/driv

[PATCH v2 06/15] usb: musb: core: break long line

2015-02-26 Thread Felipe Balbi
no functional changes, clean up only. Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index f63599368645..10d3f10ba728 100644 --- a/drivers/usb/musb/musb

[PATCH v2 13/15] usb: musb: core: refactor IRQ enable/disable to separate functions

2015-02-26 Thread Felipe Balbi
sometimes we want to just mask/unmask interrupts without touching devctl register. For those cases, let's introduce musb_enable_interrupts and musb_disable_interrupts() Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_core.c | 37 ++--- 1 file changed, 26 ins

[PATCH v2 04/15] usb: musb: dsps: return error code if reset fails

2015-02-26 Thread Felipe Balbi
if reset fails, we should return a *negative* error code, not a positive value. Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_dsps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index 53bd0e71d19f..7584601

[PATCH v2 07/15] usb: musb: core: remove unnecessary reg access from resume IRQ

2015-02-26 Thread Felipe Balbi
when musb is operating as host and a remote wakeup fires up, a resume interrupt will be raised. At that point SUSPENDM bit is automatically cleared and RESUME bit is automatically set. Remove those two from IRQ handler. Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_core.c | 15 -

[PATCH v2 09/15] usb: musb: dsps: remove babble check from dsps irq handler

2015-02-26 Thread Felipe Balbi
musb->int_usb already contains the correct information for musb-core to handle babble. In fact, this very check was just causing a nonsensical babble interrupt storm because. With this I can get test.sh to run and, even though all tests fail with timeout, that's still better than locking up the s

[PATCH v2 03/15] usb: musb: core: fix highspeed check

2015-02-26 Thread Felipe Balbi
FSDEV is set for both HIGH and FULL speeds, the correct HIGHSPEED check is done through power register's HSMODE bit. Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_core.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/drivers/usb/musb/musb_core.

[PATCH v2 01/15] usb: musb: core: remove unnecessary logical comparison

2015-02-26 Thread Felipe Balbi
devctl & MUSB_DEVCTL_HM represents a single bit, just check for the bit, there's really no need to compare the result against 0. Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/musb/musb_core.c b/drivers

Re: [RFC PATCH] xhci: fix reporting of 0-sized URBs in control endpoints

2015-02-26 Thread Alan Stern
On Thu, 26 Feb 2015, Mathias Nyman wrote: > On 26.02.2015 18:12, Mathias Nyman wrote: > > When a control transfer has a short data stage, the xHCI controller > > generates > > two transfer events: a COMP_SHORT_TX event that specifies the untransferred > > amount, and a COMP_SUCCESS event. But whe

Re: [PATCH 3/7] usb: musb: core: move babble recovery inside babble check

2015-02-26 Thread Bin Liu
On Thu, Feb 26, 2015 at 11:56 AM, Felipe Balbi wrote: > Hi again, > > On Thu, Feb 26, 2015 at 11:54:43AM -0600, Felipe Balbi wrote: >> > >> >> > >> > There was already a proper place where we were >> > >> >> > >> > checking for babble interrupts, move babble >> > >> >> > >> > recovery there. >> >

Re: [PATCH v3] xhci: fix reporting of 0-sized URBs in control endpoint

2015-02-26 Thread Alan Stern
On Thu, 26 Feb 2015, Mathias Nyman wrote: > On 26.02.2015 16:57, Alan Stern wrote: > > On Thu, 26 Feb 2015, Mathias Nyman wrote: > > > >> I'm starting to like your idea of setting the urb->actual_length in > >> advance, > >> It may actually simplify things. > > > > But it will make unlinking mo

Re: [PATCH 3/7] usb: musb: core: move babble recovery inside babble check

2015-02-26 Thread Bin Liu
Felipe, On Thu, Feb 26, 2015 at 11:54 AM, Felipe Balbi wrote: > On Thu, Feb 26, 2015 at 11:51:11AM -0600, Bin Liu wrote: >> Felipe, >> >> On Thu, Feb 26, 2015 at 11:40 AM, Felipe Balbi wrote: >> > Hi, >> > >> > On Thu, Feb 26, 2015 at 11:20:29AM -0600, Bin Liu wrote: >> >> >> > >> > There was al

Re: [PATCH 3/7] usb: musb: core: move babble recovery inside babble check

2015-02-26 Thread Felipe Balbi
Hi again, On Thu, Feb 26, 2015 at 11:54:43AM -0600, Felipe Balbi wrote: > > >> >> > >> > There was already a proper place where we were > > >> >> > >> > checking for babble interrupts, move babble > > >> >> > >> > recovery there. > > >> >> > >> > > > >> >> > >> > Signed-off-by: Felipe Balbi > > >

Re: [PATCH 3/7] usb: musb: core: move babble recovery inside babble check

2015-02-26 Thread Felipe Balbi
On Thu, Feb 26, 2015 at 11:51:11AM -0600, Bin Liu wrote: > Felipe, > > On Thu, Feb 26, 2015 at 11:40 AM, Felipe Balbi wrote: > > Hi, > > > > On Thu, Feb 26, 2015 at 11:20:29AM -0600, Bin Liu wrote: > >> >> > >> > There was already a proper place where we were > >> >> > >> > checking for babble in

Re: [PATCH] USB: serial: cp210x: Adding Seletek device id's

2015-02-26 Thread Johan Hovold
On Thu, Feb 26, 2015 at 06:37:17PM +0100, Michiel vdG wrote: > These device ID's are not associated with the cp210x module currently, > but should be. This patch allows the devices to operate upon > connecting them to the usb bus as intended. > > Tested personally, reviewed by manufacturer Thanks

Re: [PATCH 3/7] usb: musb: core: move babble recovery inside babble check

2015-02-26 Thread Bin Liu
Felipe, On Thu, Feb 26, 2015 at 11:40 AM, Felipe Balbi wrote: > Hi, > > On Thu, Feb 26, 2015 at 11:20:29AM -0600, Bin Liu wrote: >> >> > >> > There was already a proper place where we were >> >> > >> > checking for babble interrupts, move babble >> >> > >> > recovery there. >> >> > >> > >> >> > >

Re: [PATCH 3/7] usb: musb: core: move babble recovery inside babble check

2015-02-26 Thread Felipe Balbi
Hi, On Thu, Feb 26, 2015 at 11:20:29AM -0600, Bin Liu wrote: > >> > >> > There was already a proper place where we were > >> > >> > checking for babble interrupts, move babble > >> > >> > recovery there. > >> > >> > > >> > >> > Signed-off-by: Felipe Balbi > >> > >> > --- > >> > >> > drivers/usb/

[PATCH] USB: serial: cp210x: Adding Seletek device id's

2015-02-26 Thread Michiel vdG
These device ID's are not associated with the cp210x module currently, but should be. This patch allows the devices to operate upon connecting them to the usb bus as intended. Tested personally, reviewed by manufacturer diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index

Re: [PATCH 4/4] xen: add Xen pvUSB maintainer

2015-02-26 Thread Konrad Rzeszutek Wilk
On February 26, 2015 8:35:17 AM EST, Juergen Gross wrote: >Add myself as maintainer for the Xen pvUSB stuff. > >Signed-off-by: Juergen Gross >--- > MAINTAINERS | 8 > 1 file changed, 8 insertions(+) > >diff --git a/MAINTAINERS b/MAINTAINERS >index ddc5a8c..8ec1e1f 100644 >--- a/MAINTAINER

Re: [PATCH 3/7] usb: musb: core: move babble recovery inside babble check

2015-02-26 Thread Bin Liu
Felipe, On Thu, Feb 26, 2015 at 10:54 AM, Felipe Balbi wrote: > On Thu, Feb 26, 2015 at 10:44:15AM -0600, Felipe Balbi wrote: >> On Thu, Feb 26, 2015 at 10:37:50AM -0600, Bin Liu wrote: >> > Felipe, >> > >> > On Thu, Feb 26, 2015 at 10:31 AM, Felipe Balbi wrote: >> > > On Thu, Feb 26, 2015 at 10

Re: [PATCH 3/7] usb: musb: core: move babble recovery inside babble check

2015-02-26 Thread Felipe Balbi
On Thu, Feb 26, 2015 at 10:44:15AM -0600, Felipe Balbi wrote: > On Thu, Feb 26, 2015 at 10:37:50AM -0600, Bin Liu wrote: > > Felipe, > > > > On Thu, Feb 26, 2015 at 10:31 AM, Felipe Balbi wrote: > > > On Thu, Feb 26, 2015 at 10:21:38AM -0600, Bin Liu wrote: > > >> Felipe, > > >> > > >> On Thu, Fe

Re: [PATCH 3/7] usb: musb: core: move babble recovery inside babble check

2015-02-26 Thread Felipe Balbi
On Thu, Feb 26, 2015 at 10:37:50AM -0600, Bin Liu wrote: > Felipe, > > On Thu, Feb 26, 2015 at 10:31 AM, Felipe Balbi wrote: > > On Thu, Feb 26, 2015 at 10:21:38AM -0600, Bin Liu wrote: > >> Felipe, > >> > >> On Thu, Feb 26, 2015 at 9:07 AM, Felipe Balbi wrote: > >> > There was already a proper

Re: [PATCH v2 1/1] USB: ch341: set tty baud speed according to tty struct

2015-02-26 Thread Johan Hovold
On Thu, Feb 19, 2015 at 11:43:27AM +0700, Johan Hovold wrote: > On Wed, Feb 18, 2015 at 03:22:30PM -0500, Nicolas PLANEL wrote: > > The ch341_set_baudrate() function initialize the device baud speed according > > to the value on priv->baud_rate. By default the ch341_open() set it to a > > hardcoded

Re: [PATCH 3/7] usb: musb: core: move babble recovery inside babble check

2015-02-26 Thread Bin Liu
Felipe, On Thu, Feb 26, 2015 at 10:31 AM, Felipe Balbi wrote: > On Thu, Feb 26, 2015 at 10:21:38AM -0600, Bin Liu wrote: >> Felipe, >> >> On Thu, Feb 26, 2015 at 9:07 AM, Felipe Balbi wrote: >> > There was already a proper place where we were >> > checking for babble interrupts, move babble >> >

Re: [PATCH 3/7] usb: musb: core: move babble recovery inside babble check

2015-02-26 Thread Felipe Balbi
On Thu, Feb 26, 2015 at 10:21:38AM -0600, Bin Liu wrote: > Felipe, > > On Thu, Feb 26, 2015 at 9:07 AM, Felipe Balbi wrote: > > There was already a proper place where we were > > checking for babble interrupts, move babble > > recovery there. > > > > Signed-off-by: Felipe Balbi > > --- > > driv

Re: [PATCH 3/7] usb: musb: core: move babble recovery inside babble check

2015-02-26 Thread Bin Liu
Felipe, On Thu, Feb 26, 2015 at 9:07 AM, Felipe Balbi wrote: > There was already a proper place where we were > checking for babble interrupts, move babble > recovery there. > > Signed-off-by: Felipe Balbi > --- > drivers/usb/musb/musb_core.c | 13 ++--- > 1 file changed, 6 insertions(+

Re: [RFC PATCH] xhci: fix reporting of 0-sized URBs in control endpoints

2015-02-26 Thread Mathias Nyman
On 26.02.2015 18:12, Mathias Nyman wrote: > When a control transfer has a short data stage, the xHCI controller generates > two transfer events: a COMP_SHORT_TX event that specifies the untransferred > amount, and a COMP_SUCCESS event. But when the data stage is not short, only > the COMP_SUCCESS e

[RFC PATCH] xhci: fix reporting of 0-sized URBs in control endpoints

2015-02-26 Thread Mathias Nyman
When a control transfer has a short data stage, the xHCI controller generates two transfer events: a COMP_SHORT_TX event that specifies the untransferred amount, and a COMP_SUCCESS event. But when the data stage is not short, only the COMP_SUCCESS event occurs. Therefore, xhci-hcd sets urb->actual_

Re: [PATCH v3] xhci: fix reporting of 0-sized URBs in control endpoint

2015-02-26 Thread Mathias Nyman
On 26.02.2015 16:57, Alan Stern wrote: > On Thu, 26 Feb 2015, Mathias Nyman wrote: > >> I'm starting to like your idea of setting the urb->actual_length in advance, >> It may actually simplify things. > > But it will make unlinking more difficult. Also, what will you do if > there is more than

Re: [PATCH 7/7] usb: musb: dsps: remove babble check from dsps irq handler

2015-02-26 Thread Felipe Balbi
On Thu, Feb 26, 2015 at 09:18:04AM -0600, Bin Liu wrote: > Felipe, > > On Thu, Feb 26, 2015 at 9:07 AM, Felipe Balbi wrote: > > musb->int_usb already contains the correct > > information for musb-core to handle babble. > > > > In fact, this very check was just causing a > > nonsensical babble int

[PATCH] USB: pl2303: disable break on shutdown

2015-02-26 Thread Johan Hovold
Currently an enabled break state is not disabled on final close nor on re-open and has to be disabled manually. Fix this by disabling break on port shutdown. Reported-by: Jari Ruusu Tested-by: Jari Ruusu Signed-off-by: Johan Hovold --- drivers/usb/serial/pl2303.c | 18 +- 1 fi

Re: [PATCH 3/7] usb: musb: core: move babble recovery inside babble check

2015-02-26 Thread Bin Liu
Felipe, On Thu, Feb 26, 2015 at 9:07 AM, Felipe Balbi wrote: > There was already a proper place where we were > checking for babble interrupts, move babble > recovery there. I commented on the same before, discussed in [1]. [1]: http://marc.info/?l=linux-usb&m=140109400304196&w=2 > > Signed-o

[PATCH 3/5] can: kvaser_usb: Utilize all possible tx URBs

2015-02-26 Thread Ahmed S. Darwish
From: Ahmed S. Darwish The driver currently limits the number of outstanding, not yet ACKed, transfers to 16 URBs. Meanwhile, the Kvaser firmware provides its actual max supported number of outstanding transmissions in its reply to the CMD_GET_SOFTWARE_INFO message. One example is the UsbCan-II

[PATCH 2/5] can: kvaser_usb: Read all messages in a bulk-in URB buffer

2015-02-26 Thread Ahmed S. Darwish
From: Ahmed S. Darwish The Kvaser firmware can only read and write messages that are not crossing the USB endpoint's wMaxPacketSize boundary. While receiving commands from the CAN device, if the next command in the same URB buffer crossed that max packet size boundary, the firmware puts a zero-le

[PATCH 4/7] usb: musb: core: break long line

2015-02-26 Thread Felipe Balbi
no functional changes, clean up only. Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 0569b24719e6..ad895da33047 100644 --- a/drivers/usb/musb/musb

  1   2   >