[PATCH v3 01/19] usb/gadget: configfs: add a method to unregister the gadget

2013-07-31 Thread Andrzej Pietrasiewicz
Add a method to unregister the gadget using its config_item. There can be functions (e.g. mass storage), which in some circumstances need the gadget stopped. Add a method of stopping the gadget. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Kyungmin Park --- drivers/usb/gadget/configfs.c

[PATCH v3 00/19] Equivalent of g_mass_storage with configfs

2013-07-31 Thread Andrzej Pietrasiewicz
This series aims at integrating configfs into mass storage, the way it has been done for acm, ncm, ecm, eem, ecm subset, rndis, obex and phonet. It contains everything that is required to provide the equivalent of g_mass_storage.ko with configfs. Mass storage itself is quite large, so the resultin

[PATCH v3 16/19] usb/gadget: mass_storage: convert to new interface of f_mass_storage

2013-07-31 Thread Andrzej Pietrasiewicz
Convert old mass_storage gadget to use the new interface of f_mass_storage so that later the compatibility layer in f_mass_storage can be removed. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Kyungmin Park --- drivers/usb/gadget/Kconfig|1 + drivers/usb/gadget/mass_storage.c

[PATCH v3 15/19] usb/gadget: f_mass_storage: convert to new function interface with backward compatibility

2013-07-31 Thread Andrzej Pietrasiewicz
Converting mass storage to the new function interface requires converting the USB mass storage's function code and its users. This patch converts the f_mass_storage.c to the new function interface. The file is now compiled into a separate usb_f_mass_storage.ko module. The old function interface is

[PATCH v3 07/19] usb/gadget: f_mass_storage: use fsg_common_setup in fsg_common_init

2013-07-31 Thread Andrzej Pietrasiewicz
fsg_common_init is a lengthy function. Now there are helper functions which cover all parts of it. Use them. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Kyungmin Park --- drivers/usb/gadget/f_mass_storage.c | 19 +++ 1 files changed, 3 insertions(+), 16 deletions(-) d

[PATCH v3 04/19] usb/gadget: f_mass_storage: add a level of indirection for luns storage

2013-07-31 Thread Andrzej Pietrasiewicz
This is needed to prepare for configfs integration. So far the luns have been allocated during gadget's initialization, based on the nluns module parameter's value; the exact number is known when the gadget is initialized and that number of luns is allocated in one go; they all will be used. When

[PATCH v3 19/19] usb/gadget: f_mass_storage: add configfs support

2013-07-31 Thread Andrzej Pietrasiewicz
>From this commit on f_mass_storage is available through configfs. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Kyungmin Park --- .../ABI/testing/configfs-usb-gadget-mass-storage | 31 ++ drivers/usb/gadget/Kconfig | 11 + drivers/usb/gadget/f_mass_storage.c

[PATCH v3 03/19] usb/gadget: f_mass_storage: factor out a header file

2013-07-31 Thread Andrzej Pietrasiewicz
In order to prepare for the new function interface the f_mass_storage.c needs to be compiled as a module, and so a header file will be required. This patch factors out some code to a new f_mass_storage.h. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Kyungmin Park --- drivers/usb/gadget/f

[PATCH v3 05/19] usb/gadget: f_mass_storage: use usb_gstrings_attach

2013-07-31 Thread Andrzej Pietrasiewicz
Prepare for handling with configfs. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Kyungmin Park --- drivers/usb/gadget/f_mass_storage.c | 25 - 1 files changed, 12 insertions(+), 13 deletions(-) diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gad

[PATCH v3 02/19] usb/gadget: create a utility module for mass_storage

2013-07-31 Thread Andrzej Pietrasiewicz
Converting to configfs requires making the f_mass_storage.c a module. But first we need to get rid of "#include "storage_common.c". This patch makes storage_common.c a separately compiled file, which is built as a utility module named u_ms.ko. After all mass storage users are converted to the new f

[PATCH v3 14/19] usb/gadget: f_mass_storage: use fsg_common_run_thread in fsg_common_init

2013-07-31 Thread Andrzej Pietrasiewicz
fsg_common_init is a lengthy function. Now there are helper functions which cover all parts of it. Use them. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Kyungmin Park --- drivers/usb/gadget/f_mass_storage.c | 14 +++--- 1 files changed, 3 insertions(+), 11 deletions(-) diff -

[PATCH v3 18/19] usb/gadget: storage_common: add methods to show/store 'cdrom' and 'removable'

2013-07-31 Thread Andrzej Pietrasiewicz
This will be required by configfs integration. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Kyungin Park --- drivers/usb/gadget/storage_common.c | 42 +++ drivers/usb/gadget/storage_common.h |5 2 files changed, 47 insertions(+), 0 deletions(-)

[PATCH v3 12/19] usb/gadget: f_mass_storage: use fsg_common_create_luns in fsg_common_init

2013-07-31 Thread Andrzej Pietrasiewicz
fsg_common_init is a lengthy function. Now there are helper functions which cover all parts of it. Use them. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Kyungmin Park --- drivers/usb/gadget/f_mass_storage.c | 101 ++- 1 files changed, 4 insertions(+), 97

[PATCH v3 17/19] usb/gadget: storage_common: make attribute operations more generic

2013-07-31 Thread Andrzej Pietrasiewicz
Show/store methods for sysfs attributes contain code which can be used also by configfs. Make them abstract the source the lun and rw_semaphore are taken from. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Kyungmin Park --- drivers/usb/gadget/f_mass_storage.c | 67 ++

[PATCH v3 11/19] usb/gadget: f_mass_storage: use fsg_common_set_cdev in fsg_common_init

2013-07-31 Thread Andrzej Pietrasiewicz
fsg_common_init is a lengthy function. Now there are helper functions which cover all parts of it. Use them. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Kyungmin Park --- drivers/usb/gadget/f_mass_storage.c | 23 ++- 1 files changed, 2 insertions(+), 21 deletions(-

[PATCH v3 10/19] usb/gadget: f_mass_storage: use fsg_common_set_ops/_private_data in fsg_common_init

2013-07-31 Thread Andrzej Pietrasiewicz
fsg_common_init is a lengthy function. Now there are helper functions which cover all parts of it. Use them. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Kyungmin Park --- drivers/usb/gadget/f_mass_storage.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dri

[PATCH v3 08/19] usb/gadget: f_mass_storage: use fsg_common_set_num_buffers in fsg_common_init

2013-07-31 Thread Andrzej Pietrasiewicz
fsg_common_init is a lengthy function. Now there are helper functions which cover all parts of it. Use them. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Kyungmin Park --- drivers/usb/gadget/f_mass_storage.c | 29 +++-- 1 files changed, 3 insertions(+), 26 delet

[PATCH v3 13/19] usb/gadget: f_mass_storage: use fsg_common_set_inquiry_string in fsg_common_init

2013-07-31 Thread Andrzej Pietrasiewicz
fsg_common_init is a lengthy function. Now there are helper functions which cover all parts of it. Use them. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Kyungmin Park --- drivers/usb/gadget/f_mass_storage.c | 13 +++-- 1 files changed, 3 insertions(+), 10 deletions(-) diff --

[PATCH v3 06/19] usb/gadget: f_mass_storage: split fsg_common initialization into a number of functions

2013-07-31 Thread Andrzej Pietrasiewicz
When configfs is in place, the things related to intialization of struct fsg_common will be split over a number of places. This patch adds several functions which together cover the former intialization routine fsg_common_init. When configfs is in place, the luns will not be represented in sysfs,

[PATCH v3 09/19] usb/gadget: f_mass_storage: use fsg_common_set_nluns in fsg_common_init

2013-07-31 Thread Andrzej Pietrasiewicz
fsg_common_init is a lengthy function. Now there are helper functions which cover all parts of it. Use them. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Kyungmin Park --- drivers/usb/gadget/f_mass_storage.c | 22 +- 1 files changed, 5 insertions(+), 17 deletions(-)

[PATCH v2 0/1] Equivalent of g_acm_ms.ko with configfs

2013-07-31 Thread Andrzej Pietrasiewicz
Here I present the conversion of everything that is required to provide the equivalent of g_acm_ms.ko with configfs. In fact this series consists of just one patch; everything required to provide the equivalent of g_acm_ms.ko with configfs has been done in the series related to the g_mass_storage.

[PATCH v2 1/1] usb/gadget: acm_ms: convert to new interface of f_mass_storage

2013-07-31 Thread Andrzej Pietrasiewicz
Convert the legacy acm_ms gadget to use the new function interface of f_mass_storage, so that later the compatibility layer in f_mass_storage can be removed. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Kyungmin Park --- drivers/usb/gadget/Kconfig |1 + drivers/usb/gadget/acm_ms.c |

[PATCH v2 2/5] usb/gadget: multi: convert to new interface of f_rndis

2013-07-31 Thread Andrzej Pietrasiewicz
Convert the legacy multi gadget to the new interface of f_rndis, so that later the compatibility layer in f_rndis can be removed. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Kyungmin Park --- drivers/usb/gadget/Kconfig |3 +- drivers/usb/gadget/multi.c | 73 +++

[PATCH v2 4/5] usb/gadget: f_mass_storage: remove compatibility layer

2013-07-31 Thread Andrzej Pietrasiewicz
There are no more old interface users left. Remove it. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Kyungmin Park --- drivers/usb/gadget/f_mass_storage.c | 154 +-- drivers/usb/gadget/f_mass_storage.h | 21 - 2 files changed, 1 insertions(+), 174 de

[PATCH v2 1/5] usb/gadget: multi: convert to new interface of f_ecm

2013-07-31 Thread Andrzej Pietrasiewicz
Convert the legacy multi gadget to the new interface of f_ecm, so that later the compatibility layer in f_ecm can be removed. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Kyungmin Park --- drivers/usb/gadget/Kconfig |1 + drivers/usb/gadget/multi.c | 68

[PATCH v2 3/5] usb/gadget: multi: convert to new interface of f_mass_storage

2013-07-31 Thread Andrzej Pietrasiewicz
Convert the legacy multi gadget to the new interface of f_mass_storage, so that later the compatibility layer in f_mass_storage can be removed. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Kyungmin Park --- drivers/usb/gadget/Kconfig |1 + drivers/usb/gadget/multi.c | 112 ++

[PATCH v2 0/5] Equivalent of g_multi.ko with configfs

2013-07-31 Thread Andrzej Pietrasiewicz
Here I present the conversion of everything that is required to provide the equivalent of g_multi.ko with configfs. v1..v2: - removed the cause of Felipe returning -ENOLOG - moved fsg_common_set_sysfs invocation after the lun number is set, so that the latter operation does not try freeing nonexi

[PATCH v2 5/5] usb/gadget: mass_storage: merge usb_f_mass_storage module with u_ms module

2013-07-31 Thread Andrzej Pietrasiewicz
u_ms.ko is needed only together with usb_f_mass_storage.ko. Merge them. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Kyungmin Park --- drivers/usb/gadget/Kconfig |7 --- drivers/usb/gadget/Makefile |4 +--- 2 files changed, 1 insertions(+), 10 deletions(-) diff --git a/driv

Re: [PATCH 1/2] usb: chipidea: move vbus regulator operation to core

2013-07-31 Thread Michael Grzeschik
Hi Peter, On Wed, Jul 31, 2013 at 09:39:50AM +0800, Peter Chen wrote: > On Tue, Jul 30, 2013 at 02:41:23PM +0200, Michael Grzeschik wrote: > > From: Michael Grzeschik > > > > This patch moves the regulator code from ci_hdrc_imx gluecode to the > > core layer. It also checks the errorpathes in ca

Re: [PATCH 1/2] usb: chipidea: move vbus regulator operation to core

2013-07-31 Thread Peter Chen
On Wed, Jul 31, 2013 at 09:23:56AM +0200, Michael Grzeschik wrote: > Hi Peter, > > On Wed, Jul 31, 2013 at 09:39:50AM +0800, Peter Chen wrote: > > On Tue, Jul 30, 2013 at 02:41:23PM +0200, Michael Grzeschik wrote: > > > From: Michael Grzeschik > > > > > > This patch moves the regulator code from

Re: [PATCH 2/2] chipidea: Use devm_request_irq()

2013-07-31 Thread Uwe Kleine-König
On Tue, Jul 30, 2013 at 10:04:29PM -0300, Fabio Estevam wrote: > From: Fabio Estevam > > By using devm_request_irq() we don't need to call free_irq(), which simplifies > the code a bit. > > Signed-off-by: Fabio Estevam > --- > drivers/usb/chipidea/core.c | 6 ++ > 1 file changed, 2 inserti

Re: [PATCH 2/2] chipidea: Use devm_request_irq()

2013-07-31 Thread Peter Chen
On Wed, Jul 31, 2013 at 09:33:06AM +0200, Uwe Kleine-König wrote: > On Tue, Jul 30, 2013 at 10:04:29PM -0300, Fabio Estevam wrote: > > From: Fabio Estevam > > > > By using devm_request_irq() we don't need to call free_irq(), which > > simplifies > > the code a bit. > > > > Signed-off-by: Fabio

Re: [PATCH 2/2] chipidea: Use devm_request_irq()

2013-07-31 Thread Uwe Kleine-König
On Wed, Jul 31, 2013 at 04:20:55PM +0800, Peter Chen wrote: > On Wed, Jul 31, 2013 at 09:33:06AM +0200, Uwe Kleine-König wrote: > > On Tue, Jul 30, 2013 at 10:04:29PM -0300, Fabio Estevam wrote: > > > From: Fabio Estevam > > > > > > By using devm_request_irq() we don't need to call free_irq(), wh

Re: [PATCH 2/2] chipidea: Use devm_request_irq()

2013-07-31 Thread Mark Brown
On Wed, Jul 31, 2013 at 10:46:45AM +0200, Uwe Kleine-König wrote: > OK, so the possible problem is that remove is called while the irq is > still active. That means you have to assert that all resources the irq > handler is using (e.g. ioremap, clk_prepare_enable) are only freed > *after* the irq

[PATCH v4 3/5] net/usb/r815x: change the return value for bind functions

2013-07-31 Thread Hayes Wang
Replace 0 with the result from usbnet_cdc_bind(). Signed-off-by: Hayes Wang --- drivers/net/usb/r815x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/r815x.c b/drivers/net/usb/r815x.c index 1a80e76..2df2f4f 100644 --- a/drivers/net/usb/r815x.c +++ b/driv

[PATCH v4 5/5] net/usb/r8152: adjust relative ocp function

2013-07-31 Thread Hayes Wang
- fix the conversion between cpu and __le32 - replace some pla_ocp and usb_ocp functions with generic_ocp function Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 66 + 1 file changed, 23 insertions(+), 43 deletions(-) diff --git a/drive

[PATCH v4 2/5] net/usb/r815x: avoid to call mdio functions for runtime-suspended device

2013-07-31 Thread Hayes Wang
Don't replace the usb_control_msg() with usbnet_{read,write}_cmd() which couldn't be called inside suspend/resume callback. Keep the basic functions unlimited. Instead, using usb_autopm_get_interface() and usb_autopm_put_interface() in r815x_mdio_{read,write}(). Signed-off-by: Hayes Wang --- dri

[PATCH v4 4/5] net/usb/r8152: make sure the USB buffer is DMA-able

2013-07-31 Thread Hayes Wang
Allocate the required memory before calling usb_control_msg. And the additional memory copy is necessary. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 60 - 1 file changed, 35 insertions(+), 25 deletions(-) diff --git a/drivers/net/usb/

[PATCH v4 1/5] net/usb/r815x: replace USB buffer from stack to DMA-able

2013-07-31 Thread Hayes Wang
Some USB buffers use stack which may not be DMA-able. Use the buffers from kmalloc to replace those one. Signed-off-by: Hayes Wang --- drivers/net/usb/r815x.c | 44 +++- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/drivers/net/usb/r815x.

Re: [PATCH 2/2] chipidea: Use devm_request_irq()

2013-07-31 Thread Peter Chen
On Wed, Jul 31, 2013 at 10:05:12AM +0100, Mark Brown wrote: > On Wed, Jul 31, 2013 at 10:46:45AM +0200, Uwe Kleine-König wrote: > > > OK, so the possible problem is that remove is called while the irq is > > still active. That means you have to assert that all resources the irq > > handler is usin

Re: [PATCH 1/2] usb: chipidea: move vbus regulator operation to core

2013-07-31 Thread Michael Grzeschik
On Wed, Jul 31, 2013 at 03:32:14PM +0800, Peter Chen wrote: > On Wed, Jul 31, 2013 at 09:23:56AM +0200, Michael Grzeschik wrote: > > Hi Peter, > > > > On Wed, Jul 31, 2013 at 09:39:50AM +0800, Peter Chen wrote: > > > On Tue, Jul 30, 2013 at 02:41:23PM +0200, Michael Grzeschik wrote: > > > > From:

Re: [PATCH 2/2] chipidea: Use devm_request_irq()

2013-07-31 Thread Uwe Kleine-König
[Expanded Cc: a bit] Hello, On Wed, Jul 31, 2013 at 10:05:12AM +0100, Mark Brown wrote: > On Wed, Jul 31, 2013 at 10:46:45AM +0200, Uwe Kleine-König wrote: We're discussing about devm_request_irq and wonder what happens at remove time when the irq is still active. > > OK, so the possible problem

Re: [PATCH 2/2] chipidea: Use devm_request_irq()

2013-07-31 Thread Tejun Heo
Hello, On Wed, Jul 31, 2013 at 11:44:34AM +0200, Uwe Kleine-König wrote: > > > OK, so the possible problem is that remove is called while the irq is > > > still active. That means you have to assert that all resources the irq If your driver destruction path is running while your irq handler is st

[PATCH V2] USB: EHCI: make ehci-w90X900 a separate driver

2013-07-31 Thread Manjunath Goudar
Separate the W90X900(W90P910) 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 W90X900(W90P910) can be booted with a multi

Re: [PATCH] musb: don't reset endpoint data toggle on blackfin

2013-07-31 Thread Scott Jiang
Hi Balbi, >> >> > On Thu, Jul 18, 2013 at 07:04:14PM -0400, Scott Jiang wrote: >> >> Reset endpoint data toggle would lead to failure for musb >> >> RTL version 1.9 on blackfin. >> > >> > is this specific to musb 1.9 or to blackfin ? >> > >> I'm not sure about this. It failed in musb 1.9 on bf527.

Re: [PATCH v2 26/42] USB: ohci-at91: add usb_clk for transition to common clk framework

2013-07-31 Thread boris brezillon
Hello Alan, I don't know if you remember but a few days back I sent a series which included this patch ("ARM: at91: prepare transition to common clk framework"). It was decided to move this patch out of the "prepare" series to avoid backward compatility handling. Things have changed a littl

Re: [PATCH 2/2] chipidea: Use devm_request_irq()

2013-07-31 Thread Uwe Kleine-König
On Wed, Jul 31, 2013 at 05:54:11AM -0400, Tejun Heo wrote: > Hello, > > On Wed, Jul 31, 2013 at 11:44:34AM +0200, Uwe Kleine-König wrote: > > > > OK, so the possible problem is that remove is called while the irq is > > > > still active. That means you have to assert that all resources the irq >

Re: [PATCH v3 1/3] net/usb/r815x: replace USB buffer from stack to DMA-able

2013-07-31 Thread Ming Lei
On Wed, Jul 31, 2013 at 2:49 AM, David Miller wrote: > From: Joe Perches > Date: Tue, 30 Jul 2013 11:41:17 -0700 > >> On Tue, 2013-07-30 at 11:33 -0700, David Miller wrote: >>> From: Greg KH >>> Date: Tue, 30 Jul 2013 07:00:59 -0700 >>> >>> > This call is so slow, you can afford to make a call t

Re: [PATCH 2/2] chipidea: Use devm_request_irq()

2013-07-31 Thread Tejun Heo
On Wed, Jul 31, 2013 at 12:28:53PM +0200, Uwe Kleine-König wrote: > Well, you cannot avoid assuming that the irq is still active when your > driver's remove callback is called. But I agree about crappyness at the > end of the destruction path. The problem is that crap is as easy as: > > prob

[PATCH 0/4] USB & USBNET: loose DMA SG check and support usbnet DMA SG

2013-07-31 Thread Ming Lei
Hi, This patchset allows drivers to pass sg buffers which size can't be divided by max packet size of endpoint if the host controllers support this kind of sg buffers. Previously we add check[1] on the situation and don't allow these sg buffers passed to USB HCD, looks the check is too strict bec

[PATCH 3/4] USBNET: support DMA SG

2013-07-31 Thread Ming Lei
This patch introduces support of DMA SG if the USB host controller attached by usbnet device is capable of building packet from discontinuous buffers. Firstly, one header for usb transfer is often needed for device, and this patch introduces one extra small buffer to hold the header, then we can a

[PATCH 2/4] USB: XHCI: mark no_sg_limit

2013-07-31 Thread Ming Lei
This patch marks all xHCI controllers as no_sg_limit since xHCI supports building packet from discontinuous buffers. Cc: Sarah Sharp Signed-off-by: Ming Lei --- drivers/usb/host/xhci.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c i

[PATCH 4/4] USBNET: ax88179_178a: enable tso if host supports sg dma

2013-07-31 Thread Ming Lei
This patch enables 'can_dma_sg' flag for ax88179_178a device if the attached host controller supports building packet from discontinuous buffers(DMA SG is possible), so both frame header and skb data buffers can be passed to usb stack via urb->sg, then skb data copy can be saved. With the patch, C

[PATCH 1/4] USB: introduce no_sg_limit field into usb_bus

2013-07-31 Thread Ming Lei
Some host controllers(such as xHCI) can support building packet from discontinuous buffers, so introduce the flag for this kind of host controllers, then the feature can help for some applications(such as, usbnet) Signed-off-by: Ming Lei --- drivers/usb/core/urb.c |3 ++- include/linux/usb.h

Re: [PATCH 0/4] USB & USBNET: loose DMA SG check and support usbnet DMA SG

2013-07-31 Thread Oliver Neukum
On Wed, 2013-07-31 at 18:51 +0800, Ming Lei wrote: > Hi, > > This patchset allows drivers to pass sg buffers which size can't be divided > by max packet size of endpoint if the host controllers support this kind > of sg buffers. Cool. One question though. It makes sense to use sg only if all elem

Re: [PATCH 2/2] chipidea: Use devm_request_irq()

2013-07-31 Thread Mark Brown
On Wed, Jul 31, 2013 at 05:54:11AM -0400, Tejun Heo wrote: > On Wed, Jul 31, 2013 at 11:44:34AM +0200, Uwe Kleine-König wrote: > > > > OK, so the possible problem is that remove is called while the irq is > > > > still active. That means you have to assert that all resources the irq > If your dri

Re: [PATCH 2/2] chipidea: Use devm_request_irq()

2013-07-31 Thread Tejun Heo
Hello, On Wed, Jul 31, 2013 at 12:18:53PM +0100, Mark Brown wrote: > I'm not sure I understand how this relates the problem. The main issue > here is that for the shared IRQ case quiescing the device doesn't make > any difference since one of the other users of the interrupt could cause > the int

Re: Ejected Nook (usb mass storage) prevents suspend

2013-07-31 Thread Oliver Neukum
On Mon, 2013-07-29 at 10:21 -0400, Alan Stern wrote: > On Mon, 29 Jul 2013, Oliver Neukum wrote: > > > On Fri, 2013-07-26 at 16:31 -0400, Alan Stern wrote: > > > > > In addition to my earlier comment, the patch below should be applied. > > > It will fix your immediate problem, although not in t

Re: [PATCH] musb: don't reset endpoint data toggle on blackfin

2013-07-31 Thread Felipe Balbi
Hi, On Wed, Jul 31, 2013 at 06:26:24PM +0800, Scott Jiang wrote: > >> > On Thu, Jul 18, 2013 at 07:04:14PM -0400, Scott Jiang wrote: > >> >> Reset endpoint data toggle would lead to failure for musb > >> >> RTL version 1.9 on blackfin. > >> > > >> > is this specific to musb 1.9 or to blackfin ? >

Re: [PATCH 2/2] chipidea: Use devm_request_irq()

2013-07-31 Thread Mark Brown
On Wed, Jul 31, 2013 at 07:32:44AM -0400, Tejun Heo wrote: > Yeah, if all resources are allocated using devm - note that you can > hook in non-devm resources using devres_alloc() - all resources which > would be necessary for the interrupt handler would have been allocated > before the irq was all

Re: [PATCH 0/4] USB & USBNET: loose DMA SG check and support usbnet DMA SG

2013-07-31 Thread Ming Lei
On Wed, Jul 31, 2013 at 7:12 PM, Oliver Neukum wrote: > On Wed, 2013-07-31 at 18:51 +0800, Ming Lei wrote: >> Hi, >> >> This patchset allows drivers to pass sg buffers which size can't be divided >> by max packet size of endpoint if the host controllers support this kind >> of sg buffers. > > Cool

Re: [PATCH 2/2] chipidea: Use devm_request_irq()

2013-07-31 Thread Tejun Heo
On Wed, Jul 31, 2013 at 12:50:27PM +0100, Mark Brown wrote: > Most things would work just fine - most of the uses of devm_ are just > resource allocations that can safely be freed in essentially any order. > It doesn't really matter if you free the driver's private structure > before you free the c

Re: [PATCH 4/4] USBNET: ax88179_178a: enable tso if host supports sg dma

2013-07-31 Thread Greg Kroah-Hartman
On Wed, Jul 31, 2013 at 06:51:49PM +0800, Ming Lei wrote: > This patch enables 'can_dma_sg' flag for ax88179_178a device > if the attached host controller supports building packet from > discontinuous buffers(DMA SG is possible), so both frame header > and skb data buffers can be passed to usb stac

Re: [PATCH v4 1/5] net/usb/r815x: replace USB buffer from stack to DMA-able

2013-07-31 Thread Greg KH
On Wed, Jul 31, 2013 at 05:21:22PM +0800, Hayes Wang wrote: > Some USB buffers use stack which may not be DMA-able. > Use the buffers from kmalloc to replace those one. > > Signed-off-by: Hayes Wang Acked-by: Greg Kroah-Hartman -- To unsubscribe from this list: send the line "unsubscribe linux-

Re: [PATCH v4 4/5] net/usb/r8152: make sure the USB buffer is DMA-able

2013-07-31 Thread Greg KH
On Wed, Jul 31, 2013 at 05:21:25PM +0800, Hayes Wang wrote: > Allocate the required memory before calling usb_control_msg. And > the additional memory copy is necessary. > > Signed-off-by: Hayes Wang Acked-by: Greg Kroah-Hartman -- To unsubscribe from this list: send the line "unsubscribe linux

Re: External HDD does not work with 3.11-rc2

2013-07-31 Thread Philipp Dreimann
On Tue, Jul 30, 2013 at 9:28 PM, Alan Stern wrote: > On Tue, 30 Jul 2013, Sarah Sharp wrote: > >> On Tue, Jul 30, 2013 at 12:52:40PM -0400, Alan Stern wrote: >> > Sarah, the usbmon trace shows that after doing a successful port reset >> > and clearing a bunch of port features, the system tells the

Re: [PATCH 2/2] chipidea: Use devm_request_irq()

2013-07-31 Thread Mark Brown
On Wed, Jul 31, 2013 at 07:55:27AM -0400, Tejun Heo wrote: > If you have DMA / IRQ / command engine deactivations in devm path > which often is the case with full conversions, freeing any resources > including DMA areas and host private data in the wrong order is a > horrible idea. It's worse as

Re: [PATCH] usb: dwc3: use dev_get_platdata()

2013-07-31 Thread Sergei Shtylyov
Hello. On 31-07-2013 10:22, Felipe Balbi wrote: Use the wrapper function for retrieving the platform_data instead of accessing dev->platform_data directly. Inspired-by: Jingoo Han Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 delet

Re: [PATCH 2/2] chipidea: Use devm_request_irq()

2013-07-31 Thread Tejun Heo
Hello, On Wed, Jul 31, 2013 at 02:27:08PM +0100, Mark Brown wrote: > It's really only interrupts that affect most devices - if there's DMA or > anything going on after the remove() then as you said earlier the driver > is probably doing something wrong. Hmmm... it depends on the specific driver i

Re: [PATCH 4/4] USBNET: ax88179_178a: enable tso if host supports sg dma

2013-07-31 Thread Ming Lei
On Wed, Jul 31, 2013 at 8:47 PM, Greg Kroah-Hartman wrote: > On Wed, Jul 31, 2013 at 06:51:49PM +0800, Ming Lei wrote: >> This patch enables 'can_dma_sg' flag for ax88179_178a device >> if the attached host controller supports building packet from >> discontinuous buffers(DMA SG is possible), so b

Re: [PATCH] usb: dwc3: use dev_get_platdata()

2013-07-31 Thread Felipe Balbi
On Wed, Jul 31, 2013 at 05:34:52PM +0400, Sergei Shtylyov wrote: > Hello. > > On 31-07-2013 10:22, Felipe Balbi wrote: > > >Use the wrapper function for retrieving the > >platform_data instead of accessing dev->platform_data > >directly. > > >Inspired-by: Jingoo Han > >Signed-off-by: Felipe Ba

Re: [PATCH 2/2] chipidea: Use devm_request_irq()

2013-07-31 Thread Peter Chen
On Wed, Jul 31, 2013 at 9:27 PM, Mark Brown wrote: > On Wed, Jul 31, 2013 at 07:55:27AM -0400, Tejun Heo wrote: > >> If you have DMA / IRQ / command engine deactivations in devm path >> which often is the case with full conversions, freeing any resources >> including DMA areas and host private dat

Re: [PATCH 2/2] chipidea: Use devm_request_irq()

2013-07-31 Thread Mark Brown
On Wed, Jul 31, 2013 at 09:42:15AM -0400, Tejun Heo wrote: > On Wed, Jul 31, 2013 at 02:27:08PM +0100, Mark Brown wrote: > > It's really only interrupts that affect most devices - if there's DMA or > > anything going on after the remove() then as you said earlier the driver > > is probably doing s

Re: [PATCH 4/4] USBNET: ax88179_178a: enable tso if host supports sg dma

2013-07-31 Thread Oliver Neukum
On Wed, 2013-07-31 at 21:50 +0800, Ming Lei wrote: > In the usbnet case, the driver already supports non-sg well. Actually, > all current drivers should support non-sg well because urb->sg wasn't > introduced for very long time. We can think it as a new feature or DMA > enhancement for xHCI contro

RE: Build regressions/improvements in v3.11-rc3

2013-07-31 Thread Chen Peter-B29397
My patches "usb: chipidea: fix the build error with randconfig" fixes chipidea problem. It has already at USB fixes for 3.11-rc4. On Tue, 30 Jul 2013, Geert Uytterhoeven wrote: > JFYI, when comparing v3.11-rc3 to v3.11-rc2[3], the summaries are: > - build errors: +38/-14 + arch/powerpc/kvm/b

Re: [PATCH 2/2] chipidea: Use devm_request_irq()

2013-07-31 Thread Tejun Heo
On Wed, Jul 31, 2013 at 02:57:51PM +0100, Mark Brown wrote: > That's the only API I've ever heard of doing that. Everything else is > just using it to do deallocation. I'm not sure why or what you're trying to argue here but take a look at devm_pwm_release() for example. It calls back into low l

RE: [PATCH v13 00/14] Add tested id switch and vbus connect detect support for Chipidea

2013-07-31 Thread Chen Peter-B29397
Hi Alex, any comments, now it finished 3.11-rc4, I don't want this patchset missed at 3.11. Please tell me which one is OK, and which one needs to be refined, thanks. Best regards, Peter From: linux-usb-ow...@vger.kernel.org [linux-usb-ow...@vger.kernel.

Re: [PATCH 2/2] chipidea: Use devm_request_irq()

2013-07-31 Thread Tejun Heo
hello, On Wed, Jul 31, 2013 at 09:55:26PM +0800, Peter Chen wrote: > I think the main point is we should allocate managed resource which is used > at interrupt handler before devm_request_irq, and all resources used > at interrupt > handler should be managed. > > If we use non-managed resource at

Re: [PATCH v2 26/42] USB: ohci-at91: add usb_clk for transition to common clk framework

2013-07-31 Thread Alan Stern
On Wed, 31 Jul 2013, boris brezillon wrote: > Hello Alan, > > I don't know if you remember but a few days back I sent a series which > included this patch ("ARM: at91: prepare transition to common clk > framework"). > > It was decided to move this patch out of the "prepare" series to avoid > b

[PATCH 3/4] usb: chipidea: don't clobber return value of ci_role_start()

2013-07-31 Thread Lothar Waßmann
Signed-off-by: Lothar Waßmann --- drivers/usb/chipidea/core.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index a5df24c..38b0a7a 100644 --- a/drivers/usb/chipidea/core.c +++ b/drivers/usb/chipidea/core.c @@ -4

[PATCH 2/4] usb: chipidea: ci_hdrc_imx: remove an unsolicited module_put() call from ci_hdrc_imx_remove()

2013-07-31 Thread Lothar Waßmann
This prevents the USB PHY refcount to be decremented below zero upon unloading the ci-hdrc-imx module. Signed-off-by: Lothar Waßmann --- drivers/usb/chipidea/ci_hdrc_imx.c |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/us

[PATCH 1/4] usb: chipidea: improve kconfig 2.0

2013-07-31 Thread Lothar Waßmann
This patch provides a cleaner solution to the problem described in commit 20a677fd. The goal to be achieved is to force USB_CHIPIDEA=m if either USB_EHCI_HCD=m or USB_GADGET=m. If both are 'y' USB_CHIPIDEA may be selected to be 'm' or 'y'. The old patch had the drawback, that USB_CHIPIDEA could b

[PATCH 4/4] usb: chipidea: Prevent endless loop registering platform_devices when ci_hdrc_probe() fails.

2013-07-31 Thread Lothar Waßmann
commit 40dcd0e introduced the following code to the ci_hdrc_probe() function: + if (!dev->of_node && dev->parent) + dev->of_node = dev->parent->of_node; This inadvertently associates the ci_hdrc device with the ci_hdrc_imx driver (which created the ci_hdrc device in the first

RE: USB Interrupt Transaction Scheduling

2013-07-31 Thread Alan Stern
On Tue, 30 Jul 2013, Stoddard, Nate (GE Healthcare) wrote: > > The driver has to set up the data structures for the transfers, which > > includes > > scheduling when the SSPLIT and CSPLIT transactions will occur and figuring > > out how much bandwidth they will consume. The transactions themselv

Re: [PATCH v2] usb: core: don't try to reset_device() a port that got just disconnected

2013-07-31 Thread Alan Stern
On Tue, 30 Jul 2013, Julius Werner wrote: > The USB hub driver's event handler contains a check to catch SuperSpeed > devices that transitioned into the SS.Inactive state and tries to fix > them with a reset. It decides whether to do a plain hub port reset or > call the usb_reset_device() function

Re: [PATCH] usb: core: don't try to reset_device() a port that got just disconnected

2013-07-31 Thread Alan Stern
On Tue, 30 Jul 2013, Julius Werner wrote: > > Wait a moment. Why does each of these attempts lead to a 5-second > > timeout? Why don't they fail immediately? > > Now that you mention it, that's a very good question. I have brought this up with Sarah on more than one occasion, but we never fou

Re: Kernel 3.10.3 "reset SuperSpeed USB device number 2 using xhci_hcd"

2013-07-31 Thread Alan Stern
On Tue, 30 Jul 2013, Martin K. Petersen wrote: > James? > > [PATCH] SCSI: Don't attempt to send extended INQUIRY command if > skip_vpd_pages is set > > If a device has the skip_vpd_pages flag set we should simply fail the > scsi_get_vpd_page() call. > > Signed-off-by: Martin K. Petersen > Ack

Re: Ejected Nook (usb mass storage) prevents suspend

2013-07-31 Thread Alan Stern
On Wed, 31 Jul 2013, Oliver Neukum wrote: > These errors should be handled cleanly. How about this patch? > From 76a377d9894dc8945e9afecc7f9864e6dc3156b1 Mon Sep 17 00:00:00 2001 > From: Oliver Neukum > Date: Wed, 31 Jul 2013 13:32:51 +0200 > Subject: [PATCH] sd: handle errors during suspend >

Re: [PATCH 4/4] USBNET: ax88179_178a: enable tso if host supports sg dma

2013-07-31 Thread Eric Dumazet
On Wed, 2013-07-31 at 16:02 +0200, Oliver Neukum wrote: > On Wed, 2013-07-31 at 21:50 +0800, Ming Lei wrote: > > > In the usbnet case, the driver already supports non-sg well. Actually, > > all current drivers should support non-sg well because urb->sg wasn't > > introduced for very long time. We

Re: [PATCH 2/2] chipidea: Use devm_request_irq()

2013-07-31 Thread Mark Brown
On Wed, Jul 31, 2013 at 10:07:58AM -0400, Tejun Heo wrote: > On Wed, Jul 31, 2013 at 02:57:51PM +0100, Mark Brown wrote: > > That's the only API I've ever heard of doing that. Everything else is > > just using it to do deallocation. > I'm not sure why or what you're trying to argue here but take

Re: [PATCH 4/4] USBNET: ax88179_178a: enable tso if host supports sg dma

2013-07-31 Thread Ming Lei
On Wed, Jul 31, 2013 at 11:15 PM, Eric Dumazet wrote: > On Wed, 2013-07-31 at 16:02 +0200, Oliver Neukum wrote: >> On Wed, 2013-07-31 at 21:50 +0800, Ming Lei wrote: >> >> > In the usbnet case, the driver already supports non-sg well. Actually, >> > all current drivers should support non-sg well b

Re: [PATCH 2/2] chipidea: Use devm_request_irq()

2013-07-31 Thread Tejun Heo
On Wed, Jul 31, 2013 at 04:25:23PM +0100, Mark Brown wrote: > What I'm saying is that in essentially all the users I've seen devm is > only being used for things like kfree() or clk_put() which aren't really > connected in any way and can happen in any order. This (coupled with > the lack of docum

Re: [PATCH 0/4] USB & USBNET: loose DMA SG check and support usbnet DMA SG

2013-07-31 Thread Eric Dumazet
On Wed, 2013-07-31 at 18:51 +0800, Ming Lei wrote: > Hi, > > This patchset allows drivers to pass sg buffers which size can't be divided > by max packet size of endpoint if the host controllers support this kind > of sg buffers. > > Previously we add check[1] on the situation and don't allow thes

Re: Audio I/O parameters

2013-07-31 Thread Alan Stern
On Tue, 30 Jul 2013, Alan Stern wrote: > I can try to ameliorate the situation. Although the 7-ms delay will > inevitably cause an underrun, it doesn't have to cause errors the way > it does now. I'll write a patch to handle this. It may take a few > days. James, see what happens with this pat

Re: issues with commit usbnet: mcs7830: apply usbnet_link_change

2013-07-31 Thread Ming Lei
On Wed, Jul 31, 2013 at 5:56 PM, Till Schmalmack wrote: > Hello Ming, > > I am experiencing issues with the usbnet commits you did for the 3.10 > kernel, in particular with > > 4be74c13 usbnet: mcs7830: apply usbnet_link_change > > I filed this bug > > https://bugzilla.kernel.org/show_bug.cgi?id=6

Re: issues with commit usbnet: mcs7830: apply usbnet_link_change

2013-07-31 Thread Ming Lei
On Wed, Jul 31, 2013 at 11:49 PM, Ming Lei wrote: > On Wed, Jul 31, 2013 at 5:56 PM, Till Schmalmack wrote: >> Hello Ming, >> >> I am experiencing issues with the usbnet commits you did for the 3.10 >> kernel, in particular with >> >> 4be74c13 usbnet: mcs7830: apply usbnet_link_change >> >> I fil

Re: [PATCH] usb: core: don't try to reset_device() a port that got just disconnected

2013-07-31 Thread Sarah Sharp
On Tue, Jul 30, 2013 at 07:33:46PM -0700, Julius Werner wrote: > > Wait a moment. Why does each of these attempts lead to a 5-second > > timeout? Why don't they fail immediately? > > Now that you mention it, that's a very good question. The kernel > enqueues a control transfer to the now disconn

Re: [PATCH 2/4] USB: XHCI: mark no_sg_limit

2013-07-31 Thread Sarah Sharp
On Wed, Jul 31, 2013 at 06:51:47PM +0800, Ming Lei wrote: > This patch marks all xHCI controllers as no_sg_limit since > xHCI supports building packet from discontinuous buffers. > > Cc: Sarah Sharp > Signed-off-by: Ming Lei Acked-by: Sarah Sharp > --- > drivers/usb/host/xhci.c |4 >

Re: [PATCH v2] usb: core: don't try to reset_device() a port that got just disconnected

2013-07-31 Thread Sarah Sharp
On Wed, Jul 31, 2013 at 10:43:30AM -0400, Alan Stern wrote: > On Tue, 30 Jul 2013, Julius Werner wrote: > > > The USB hub driver's event handler contains a check to catch SuperSpeed > > devices that transitioned into the SS.Inactive state and tries to fix > > them with a reset. It decides whether

Re: [PATCH 2/2] chipidea: Use devm_request_irq()

2013-07-31 Thread Mark Brown
On Wed, Jul 31, 2013 at 11:29:32AM -0400, Tejun Heo wrote: > Yeah, sure, thank you very much for your input. It is of course > strictly ordered and the documentation needs to be updated. While I note the way you're saying this given the widespread adoption I think there's a bit more effort neede

  1   2   >