Re: Multiple usb_storage problems

2013-03-30 Thread Andy Lutomirski
On Sat, Mar 30, 2013 at 8:21 PM, Andy Lutomirski wrote: > I have a Corsair Flash Voyager GT and a Lenovo x220 running Fedora's > 3.8.2 kernel. It doesn't work very well, and the problems vary > depending on whether I'm using usb2 or usb3. > > - On usb3, the device node can't be opened with O_DIR

Multiple usb_storage problems

2013-03-30 Thread Andy Lutomirski
I have a Corsair Flash Voyager GT and a Lenovo x220 running Fedora's 3.8.2 kernel. It doesn't work very well, and the problems vary depending on whether I'm using usb2 or usb3. - On usb3, the device node can't be opened with O_DIRECT (using, for example, dd oflag=direct). It returns -EINVAL. (

Re: EHCI: port power regression when canceling suspend-to-disk

2013-03-30 Thread Alan Stern
On Sat, 30 Mar 2013, Matthijs Kooijman wrote: > Hi guys, > > I recently noticed a problem with suspend-to-disk on my Thinkpad X201. > I'm using swsusp, which offers a "press backspace to cancel" while it is > writing out the suspend image to the swap partition. When I do this, the > system mostly

Re: [PATCH net-next] cdc_ncm: return -ENOMEM if kzalloc fails

2013-03-30 Thread David Miller
From: Devendra Naga Date: Sat, 30 Mar 2013 14:33:22 +0530 > return -ENOMEM instead if kzalloc of cdc_ncm_ctx structure is failed. > > and also remove the comparision of ctx structure with NULL and make > it as !ctx. > > Signed-off-by: Devendra Naga Applied. -- To unsubscribe from this list: s

Re: [PATCH] usb: gadget: nokia: Add mass storage driver to g_nokia

2013-03-30 Thread Pavel Machek
On Mon 2013-01-21 10:05:06, Felipe Balbi wrote: > Hi, > > On Sun, Jan 20, 2013 at 11:17:31AM +0100, Pali Rohár wrote: > > On Sunday 20 January 2013 10:25:37 Felipe Balbi wrote: > > > On Sun, Jan 20, 2013 at 03:58:13AM +0100, Pali Rohár wrote: > > > > Signed-off-by: Pali Rohár > > > > > > NAK for

Re: cdc_acm device - unexpected characters sent to USB device

2013-03-30 Thread Oliver Neukum
On Saturday 30 March 2013 03:20:15 Mike Verstegen wrote: > - Downloaded the source code for the cdc_acm driver. > - Added a bunch of printk debug messages and stack_dumps to follow what's > going on. > - I rmmod'd the "stock" cdc_acm and insmod'd my instrumented module. > - All the dev

Re: [PATCH v2 00/21] usb: chipidea: updates for v3.10

2013-03-30 Thread Greg KH
On Sat, Mar 30, 2013 at 12:53:49PM +0200, Alexander Shishkin wrote: > Hi, > > Let's try again. Rebased it on top of usb-next and dropped the whole > tracepoint thing, but kept the part that removes the old event > buffer and other debug cleanups. So everything else is rebased on top > of that and

Re: [PATCH 12/27] usb: chipidea: usbmisc: rename file, struct and functions to usbmisc_imx

2013-03-30 Thread Marc Kleine-Budde
On 03/30/2013 05:11 PM, Alexander Shishkin wrote: > Marc Kleine-Budde writes: > >> On 03/30/2013 01:46 AM, Alexander Shishkin wrote: >>> From: Michael Grzeschik >>> >>> This driver will be used for every Freescale SoC which has this misc >>> memory layout to control the basic usb handling. So be

Re: [PATCH 12/27] usb: chipidea: usbmisc: rename file, struct and functions to usbmisc_imx

2013-03-30 Thread Alexander Shishkin
Marc Kleine-Budde writes: > On 03/30/2013 01:46 AM, Alexander Shishkin wrote: >> From: Michael Grzeschik >> >> This driver will be used for every Freescale SoC which has this misc >> memory layout to control the basic usb handling. So better name this >> driver, function and struct names in a m

Re: [PATCH] USB: EHCI: fix regression during bus resume

2013-03-30 Thread Matthijs Kooijman
Hi Alan, > The same sort of thing has happened to me. Often you're better off > looking to see if someone has already fixed a problem than trying to > fix it yourself. :-) I started debugging this before rc4 was out, and it was still broken in rc3 (but since the lockup only occured with an SD c

Re: [PATCH] USB: EHCI: fix regression during bus resume

2013-03-30 Thread Alan Stern
On Sat, 30 Mar 2013, Matthijs Kooijman wrote: > Hi Alan, > > > This patch (as1663) fixes a regression caused by commit > > 6e0c3339a6f19d748f16091d0a05adeb1e1f822b (USB: EHCI: unlink one async > > QH at a time). > > [...] > > The symptom is that when the root hub is resumed, USB communications >

Re: [PATCH] USB: EHCI: fix regression during bus resume

2013-03-30 Thread Matthijs Kooijman
Hi Alan, > This patch (as1663) fixes a regression caused by commit > 6e0c3339a6f19d748f16091d0a05adeb1e1f822b (USB: EHCI: unlink one async > QH at a time). > [...] > The symptom is that when the root hub is resumed, USB communications > don't work for some period of time. This is because ehci-hcd

[PATCH v4 6/6] USB: OHCI: avoid conflicting platform drivers

2013-03-30 Thread Arnd Bergmann
Like the EHCI driver, OHCI supports a large number of different platform glue drivers by directly including them, which causes problems with conflicting macro definitions in some cases. As more ARM architecture specific back-ends are required to coexist in a single build, we should split those out

[PATCH v4 4/6] USB: EHCI: make ehci-atmel a separate driver

2013-03-30 Thread Arnd Bergmann
From: Manjunath Goudar Separate the Atmel host controller driver from ehci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; however, note that other changes are still needed before Atmel can be booted with a multi-plat

[PATCH v4 0/6] USB EHCI multiplatform conversion

2013-03-30 Thread Arnd Bergmann
Hi Alan, This is a quick update to v3, addressing all issues you pointed in yesterday's review. Thanks for taking a thorough look on short notice on a public holiday! Arnd Arnd Bergmann (1): USB: OHCI: avoid conflicting platform drivers Manjunath Goudar (5): USB: EHCI: make ehci-ori

[PATCH v4 5/6] USB: EHCI: make ehci-msm a separate driver

2013-03-30 Thread Arnd Bergmann
From: Manjunath Goudar Separate the Qualcomm QSD/MSM on-chip host controller driver from ehci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; however, note that other changes are still needed before Qualcomm QSD/MSM

[PATCH v4 2/6] USB: EHCI: make ehci-spear a separate driver

2013-03-30 Thread Arnd Bergmann
From: Manjunath Goudar Separate the SPEAr host controller driver from ehci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; however, note that other changes are still needed before SPEAr can be booted with a multi-plat

[PATCH v4 3/6] USB: EHCI: make ehci-s5p a separate driver

2013-03-30 Thread Arnd Bergmann
From: Manjunath Goudar Separate the Samsung S5P/EXYNOS host controller driver from ehci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; however, note that other changes are still needed before S5P/EXYNOS can be boote

[PATCH v4 1/6] USB: EHCI: make ehci-orion a separate driver

2013-03-30 Thread Arnd Bergmann
From: Manjunath Goudar Separate the Orion host controller driver from ehci-hcd host code into its own driver module because of following reason. With the multiplatform changes in arm-soc tree, it becomes possible to enable the mvebu platform (which uses ehci-orion) at the same time as other plat

Re: [PATCH v3 7/7] USB: OHCI: avoid conflicting platform drivers

2013-03-30 Thread Arnd Bergmann
On Friday 29 March 2013, Alan Stern wrote: > I have not checked the details of all the changes; however, the basic > idea is okay as a stop-gap measure. Ok, thanks. > I guess this means the onus is now on me to split up ohci-hcd into a > central library and separate bus drivers, like ehci-hcd..

Re: [PATCH v3 6/7] USB: EHCI: make ehci-msm a separate driver

2013-03-30 Thread Arnd Bergmann
On Friday 29 March 2013, Alan Stern wrote: > On Thu, 28 Mar 2013, Arnd Bergmann wrote: > This patch is good. However the ehci-msm driver itself is not. While > checking through the code, I was struck by the fact that it never calls > usb_add_hcd() or usb_remove_hcd(). Obviously the driver canno

Re: [PATCH v3 5/7] USB: EHCI: make ehci-atmel a separate driver

2013-03-30 Thread Arnd Bergmann
On Friday 29 March 2013, Alan Stern wrote: > While not absolutely necessary, it would be nice to have the #include > files in alphabetical order. > > > + > > +#include "ehci.h" > > + > > +#define DRIVER_DESC "EHCI atmel driver" > > "atmel" should have a capital 'A'. > Ok, added these changes

Re: [PATCH v3 3/7] USB: EHCI: make ehci-s5p a separate driver

2013-03-30 Thread Arnd Bergmann
On Friday 29 March 2013, Alan Stern wrote: > On Thu, 28 Mar 2013, Arnd Bergmann wrote: > > Personally, I would have left these two functions the way they were and > relied on the compiler to inline them when appropriate. Eliminating > them just makes the code more complicated. Yes, makes sens

Re: [PATCH v3 2/7] USB: EHCI: make ehci-spear a separate driver

2013-03-30 Thread Arnd Bergmann
On Friday 29 March 2013, Alan Stern wrote: > On Thu, 28 Mar 2013, Arnd Bergmann wrote: > > > From: Manjunath Goudar > > > > Separate the SPEAr host controller driver from ehci-hcd host code > > so that it can be built as a separate driver module. > > This work is part of enabling multi-platform

Re: [PATCH 12/27] usb: chipidea: usbmisc: rename file, struct and functions to usbmisc_imx

2013-03-30 Thread Marc Kleine-Budde
On 03/30/2013 01:46 AM, Alexander Shishkin wrote: > From: Michael Grzeschik > > This driver will be used for every Freescale SoC which has this misc > memory layout to control the basic usb handling. So better name this > driver, function and struct names in a more generic way. > > Reported-by:

Re: [PATCH v3 1/7] USB: EHCI: make ehci-orion a separate driver

2013-03-30 Thread Arnd Bergmann
On Friday 29 March 2013, Alan Stern wrote: > I don't know about this last phrase. When someone is running "make > menuconfig", for example, what shows up is the symbol's description, > not the symbol's name. That person would see "EHCI support for Marvell > on-chip controller", not "USB_EHCI_M

[PATCH v2 21/21] usb: chipidea: udc: add the define TD_PAGE_COUNT and fix all users

2013-03-30 Thread Alexander Shishkin
From: Michael Grzeschik A static count of transfer descriptors was used everywhere in the driver with the fixed number 5. This patch adds a define, named TD_PAGE_COUNT, and replaces all users of this value. This way its possible to have only one parameter to change and limit the amount of buffer

[PATCH v2 15/21] usb: chipidea: udc: only clear active and halted bits in qhead

2013-03-30 Thread Alexander Shishkin
From: Michael Grzeschik The datasheet of the synopsys core describes only to overwrite the active and halted bits in the qhead before priming any endpoint. Signed-off-by: Michael Grzeschik Reviewed-by: Felipe Balbi [Alex: fixed a case of line-too-long] Signed-off-by: Alexander Shishkin --- d

[PATCH v2 20/21] usb: chipidea: udc: move _ep_queue into an unlocked function

2013-03-30 Thread Alexander Shishkin
From: Michael Grzeschik There is no need to call ep_queue unlocked inside the own driver. We move its functionionality into an unlocked version. This patch removes potential unlocked timeslots inside isr_setup_status_phase and isr_get_status_response, in which the lock got released just before a

[PATCH v2 19/21] usb: chipidea: udc: don't truncate requests to single tds

2013-03-30 Thread Alexander Shishkin
From: Michael Grzeschik It is not safe to truncate requests to the maximum possible size the controller can handle with one td and to keep working. That patch fixes that with proper error handling instead. Reported-by: Felipe Balbi Signed-off-by: Michael Grzeschik Signed-off-by: Alexander Shis

[PATCH v2 17/21] usb: chipidea: udc: move ZLT flag change to ep_enable

2013-03-30 Thread Alexander Shishkin
From: Michael Grzeschik Its not necessary and also not specified in the datasheet to change the ZLT flag before every ep_prime. This patch moves this to the ep_enable and applies it only for non configuration endpoints. Signed-off-by: Michael Grzeschik Reviewed-by: Felipe Balbi Signed-off-by:

[PATCH v2 18/21] usb: chipidea: udc: read status of td only once in hardware_dequeue

2013-03-30 Thread Alexander Shishkin
From: Michael Grzeschik This patch changes the read of the td status to one atomic operation to analyse coherent bits. Signed-off-by: Michael Grzeschik [Alex: fixed backwards endianness conversion] Signed-off-by: Alexander Shishkin --- drivers/usb/chipidea/udc.c |8 +--- 1 file change

[PATCH v2 14/21] usb: chipidea: big-endian support

2013-03-30 Thread Alexander Shishkin
From: Svetoslav Neykov Convert between big-endian and little-endian format when accessing the usb controller structures which are little-endian by specification. Fix cases where the little-endian memory layout is taken for granted. The patch doesn't have any effect on the already supported little

[PATCH v2 16/21] usb: chipidea: udc: rework ep_enable cap setting

2013-03-30 Thread Alexander Shishkin
From: Michael Grzeschik This patch reworks the cap value from several read and write operations to one single operation. Signed-off-by: Michael Grzeschik Reviewed-by: Felipe Balbi [Alex: removed useless isoc-related bit of code] Signed-off-by: Alexander Shishkin --- drivers/usb/chipidea/udc.

[PATCH v2 12/21] usb: chipidea: usbmisc: add post handling and errata fix for mx25

2013-03-30 Thread Alexander Shishkin
From: Michael Grzeschik This adds a post handling routine which is called after ci13xxx_add_device was called. The first user is the mx25, which has to disable the external-vbus-divider after the udc has started. Signed-off-by: Michael Grzeschik Signed-off-by: Marc Kleine-Budde [Alex: also fix

[PATCH v2 13/21] usb: chipidea: make pci platform datas static

2013-03-30 Thread Alexander Shishkin
PCI chipideas' platform datas are not static as all such things should be. Fix it. Reported-by: Marc Kleine-Budde Signed-off-by: Alexander Shishkin --- drivers/usb/chipidea/ci13xxx_pci.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/chipidea/ci13xxx_pc

[PATCH v2 11/21] usb: chipidea: usbmisc: add mx53 support

2013-03-30 Thread Alexander Shishkin
From: Michael Grzeschik This adds mx53 as the next user of the usbmisc driver and makes it possible to disable the overcurrent-detection of the internal phy. Signed-off-by: Michael Grzeschik Signed-off-by: Marc Kleine-Budde [Alex: fixed another set of line-too-long and void pointer cast] Signe

[PATCH v2 10/21] usb: chipidea: usbmisc: prepare driver to handle more than one soc

2013-03-30 Thread Alexander Shishkin
From: Marc Kleine-Budde This attaches the usbmisc_ops to the of_device_id data and makes it possible to define special functions per soc. Signed-off-by: Marc Kleine-Budde Signed-off-by: Michael Grzeschik [Alex: fixed one case of line-too-long and one bogus cast to void ptr] Signed-off-by: Alex

[PATCH v2 08/21] usb: chipidea: usbmisc: unset global varibale usbmisc on driver remove

2013-03-30 Thread Alexander Shishkin
From: Marc Kleine-Budde The probe function checks usbmisc to be NULL in the beginning. Without this patch the can only be loaded once. Signed-off-by: Marc Kleine-Budde Signed-off-by: Michael Grzeschik Signed-off-by: Alexander Shishkin --- drivers/usb/chipidea/usbmisc_imx.c |1 + 1 file c

[PATCH v2 09/21] usb: chipidea: usbmisc: fix a potential race condition

2013-03-30 Thread Alexander Shishkin
From: Marc Kleine-Budde This fixes a potential race condition where the ci13xxx_imx glue code could be fast enough to call one of the usbmisc_ops before he got a valid value on the static usbmisc pointer. To fix that we first set usbmisc, then call usbmisc_set_ops(). Signed-off-by: Marc Kleine-B

[PATCH v2 07/21] usb: chipidea: usbmisc: rename file, struct and functions to usbmisc_imx

2013-03-30 Thread Alexander Shishkin
From: Michael Grzeschik This driver will be used for every Freescale SoC which has this misc memory layout to control the basic usb handling. So better name this driver, function and struct names in a more generic way. Reported-by: Fabio Estevam Signed-off-by: Michael Grzeschik Signed-off-by:

[PATCH v2 04/21] usb: chipidea: move debug files creation/removal to the core

2013-03-30 Thread Alexander Shishkin
Create and remove debugfs entries in hdrc probe/remove instead of start/stop of the device controller. Gadget specific will not export anything while the controller is in host mode. Signed-off-by: Alexander Shishkin --- drivers/usb/chipidea/core.c |6 +- drivers/usb/chipidea/udc.c |

[PATCH v2 06/21] usb: chipidea: don't redefine __ffs()

2013-03-30 Thread Alexander Shishkin
From: Felipe Balbi chipidea's ffs_nr() is pretty much what __ffs() does. Use that one instead. Signed-off-by: Felipe Balbi [rebased on top of debug infrastructure rework] Signed-off-by: Alexander Shishkin --- drivers/usb/chipidea/ci.h | 15 +-- drivers/usb/chipidea/core.c |

[PATCH v2 05/21] usb: chipidea: fix precedence bug in ci_requests_show()

2013-03-30 Thread Alexander Shishkin
From: Dan Carpenter The intent here was to have parenthesis around the (ci->hw_ep_max / 2) so that it counts like "0 1 2 0 1 2". In the current code, the mod operation happens first so it counts like "0 0 1 1 2 2". Signed-off-by: Dan Carpenter [rebased on top of debug.c changes] Signed-off-by:

[PATCH v2 02/21] usb: chipidea: convert debug entries in sysfs to debugfs

2013-03-30 Thread Alexander Shishkin
Currently, we have a bunch of files in sysfs that display all sorts of debugging information for the device controller, so they have to move to debugfs where they belong. The "registers" interface have been removed, since it doesn't fit into the current driver design as is and it's hardly a good id

[PATCH v2 03/21] usb: chipidea: move role to debugfs

2013-03-30 Thread Alexander Shishkin
Manual role switching function is there for debugging purposes, so has to move to debugfs. Signed-off-by: Alexander Shishkin --- drivers/usb/chipidea/core.c | 39 -- drivers/usb/chipidea/debug.c | 54 ++ 2 files changed, 54

[PATCH v2 01/21] usb: chipidea: remove home-grown tracing facility

2013-03-30 Thread Alexander Shishkin
As part of the legacy from the original driver design, we retain home-grown tracing infrastructure, complete with own ring buffer and timestamps, which among other things has a performance penalty. This patch removes it. Signed-off-by: Alexander Shishkin --- drivers/usb/chipidea/debug.c | 360 +

[PATCH v2 00/21] usb: chipidea: updates for v3.10

2013-03-30 Thread Alexander Shishkin
Hi, Let's try again. Rebased it on top of usb-next and dropped the whole tracepoint thing, but kept the part that removes the old event buffer and other debug cleanups. So everything else is rebased on top of that and a couple of commit messages amended. Alexander Shishkin (5): usb: chipidea: r

Re: [PATCH 09/27] usb: chipidea: fix precedence bug in ci_requests_show()

2013-03-30 Thread Alexander Shishkin
Greg KH writes: > On Sat, Mar 30, 2013 at 02:46:25AM +0200, Alexander Shishkin wrote: >> From: Dan Carpenter >> >> The intent here was to have parenthesis around the (ci->hw_ep_max / 2) >> so that it counts like "0 1 2 0 1 2". In the current code, the mod >> operation happens first so it count

Re: [PATCH 12/27] usb: chipidea: usbmisc: rename file, struct and functions to usbmisc_imx

2013-03-30 Thread Alexander Shishkin
Greg KH writes: > On Sat, Mar 30, 2013 at 02:46:28AM +0200, Alexander Shishkin wrote: >> From: Michael Grzeschik >> >> This driver will be used for every Freescale SoC which has this misc >> memory layout to control the basic usb handling. So better name this >> driver, function and struct name

Re: [PATCH 05/27] usb: chipidea: replace interrupt accounting with tracepoints

2013-03-30 Thread Alexander Shishkin
Greg KH writes: > On Sat, Mar 30, 2013 at 02:46:21AM +0200, Alexander Shishkin wrote: >> The driver also has interrupt counters and another ring buffer for keeping >> track of the order in which they arrive. This patch converts these counters >> to trace points. Userspace tools such as perf can p

[PATCH net-next] cdc_ncm: return -ENOMEM if kzalloc fails

2013-03-30 Thread Devendra Naga
return -ENOMEM instead if kzalloc of cdc_ncm_ctx structure is failed. and also remove the comparision of ctx structure with NULL and make it as !ctx. Signed-off-by: Devendra Naga --- drivers/net/usb/cdc_ncm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/us

Re: [PATCH 04/27] usb: chipidea: convert events to tracepoints

2013-03-30 Thread Alexander Shishkin
Greg KH writes: > On Sat, Mar 30, 2013 at 02:46:20AM +0200, Alexander Shishkin wrote: >> As part of the legacy from the original driver design, we retain home-grown >> tracing infrastructure, complete with own ring buffer and timestamps. While >> it is useful for debugging certain cases, it's a l

Re: [PATCH 00/27] usb: chipidea: updates for v3.10

2013-03-30 Thread Alexander Shishkin
Greg KH writes: > On Sat, Mar 30, 2013 at 02:46:16AM +0200, Alexander Shishkin wrote: >> Hi Greg, >> >> This is an update for chipidea usb controller driver for >> usb-next. Some of these patches, though mostly mine, date as far back >> as november 2012. > > Why would you hold onto patches for t

Re: [PATCH v3 5/7] USB: EHCI: make ehci-atmel a separate driver

2013-03-30 Thread Nicolas Ferre
On 03/29/2013 09:02 PM, Alan Stern : > On Thu, 28 Mar 2013, Arnd Bergmann wrote: > >> From: Manjunath Goudar >> >> Separate the Atmel host controller driver from ehci-hcd host code >> so that it can be built as a separate driver module. >> This work is part of enabling multi-platform kernels on A