Re: [PATCH v2 Resend 9/9] usb: add usb_device_allow_power_off() function.

2013-01-07 Thread Oliver Neukum
On Tuesday 08 January 2013 14:38:27 Lan Tianyu wrote: > On 2013年01月07日 15:43, Oliver Neukum wrote: > > Please change the name. It looks like a contradiction in itself and would > > thereby almost beg for misuse. > > > Hi Oliver: > how about "usb_device_control_power_off(struct usb_device *u

Re: [PATCH 11/16] usb/gadget: fix error path in uvc_function_bind()

2013-01-07 Thread Laurent Pinchart
Hi Bhupesh, On Tuesday 08 January 2013 12:00:43 Bhupesh SHARMA wrote: > On Tuesday, January 08, 2013 2:13 AM Laurent Pinchart wrote: > > On Wednesday 31 October 2012 15:06:54 Felipe Balbi wrote: > > > On Mon, Oct 22, 2012 at 10:15:05PM +0200, Sebastian Andrzej Siewior > > wrote: > > > > The "video

Re: Linux USB redirection

2013-01-07 Thread David Chang
Hi Anil, 2013/1/4 Anil Nair : > Hello Abhijit, > >> I have used the USBIP source for 2.6.30 kernel and tested it. The >> modules are loaded correctly and I was able to export the device as >> virtual USB device to another machine and perform operations on the device. >> You may want to look at the

Re: [PATCH v2 Resend 9/9] usb: add usb_device_allow_power_off() function.

2013-01-07 Thread Lan Tianyu
On 2013年01月07日 15:43, Oliver Neukum wrote: > On Saturday 05 January 2013 13:58:27 Alan Stern wrote: >>> static int inline usb_device_prevent_power_off(struct usb_device *udev) >>> { >>> struct device *dev = usb_get_port_dev(udev); >>> >>> if(!dev) >>> return -ENODEV; >>> >

Re: [PATCH 0/2] staging: usbip: refine the lock

2013-01-07 Thread Greg Kroah-Hartman
On Tue, Jan 08, 2013 at 01:49:00PM +0800, Harvey Yang wrote: > This patchset refines some spinlocks which maybe not used properly. > > [PATCH 1/2]: The function 'usbip_event_add()' may be called in interrupt > context on the stub side: > 'stub_complete'->'stub_enqueue_ret_unlink'->'usbip_event

Re: [PATCH 1/2] staging: usbip: use interrupt safe spinlock to avoid potential deadlock.

2013-01-07 Thread Greg Kroah-Hartman
On Tue, Jan 08, 2013 at 01:49:01PM +0800, Harvey Yang wrote: > > Signed-off-by: Harvey Yang You need to describe _why_ you did this, not just what you did. Why is this needed? What are you fixing by doing this? Is this something that older kernels need? Is it something that others are seeing

[PATCH 0/2] staging: usbip: refine the lock

2013-01-07 Thread Harvey Yang
This patchset refines some spinlocks which maybe not used properly. [PATCH 1/2]: The function 'usbip_event_add()' may be called in interrupt context on the stub side: 'stub_complete'->'stub_enqueue_ret_unlink'->'usbip_event_add'. In this function it tries to get the lock 'ud->lock', so we shou

[PATCH 1/2] staging: usbip: use interrupt safe spinlock to avoid potential deadlock.

2013-01-07 Thread Harvey Yang
Signed-off-by: Harvey Yang --- drivers/staging/usbip/stub_dev.c| 34 +- drivers/staging/usbip/stub_rx.c |4 ++-- drivers/staging/usbip/usbip_event.c |6 -- 3 files changed, 23 insertions(+), 21 deletions(-) diff --git a/drivers/staging/usbip

[PATCH 2/2] staging: usbip: replace the interrupt safe spinlocks with common ones.

2013-01-07 Thread Harvey Yang
Signed-off-by: Harvey Yang --- drivers/staging/usbip/vhci_hcd.c | 76 -- drivers/staging/usbip/vhci_rx.c | 10 ++--- drivers/staging/usbip/vhci_tx.c | 14 +++ 3 files changed, 42 insertions(+), 58 deletions(-) diff --git a/drivers/staging/usbip/vh

RE: [PATCH 11/16] usb/gadget: fix error path in uvc_function_bind()

2013-01-07 Thread Bhupesh SHARMA
Hi Laurent, > -Original Message- > From: Laurent Pinchart [mailto:laurent.pinch...@ideasonboard.com] > Sent: Tuesday, January 08, 2013 2:13 AM > To: ba...@ti.com > Cc: Sebastian Andrzej Siewior; linux-usb@vger.kernel.org; Bhupesh SHARMA > Subject: Re: [PATCH 11/16] usb/gadget: fix error pa

[PATCH] drivers: xhci: fix incorrect bit test

2013-01-07 Thread Nickolai Zeldovich
Fix incorrect bit test that originally showed up in 4ee823b83bc9851743fab756c76b27d6a1e2472b: use '&' instead of '&&'. Signed-off-by: Nickolai Zeldovich --- drivers/usb/host/xhci-ring.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/

Re: [PATCH v3 8/9] usb: expose usb port's pm qos flags to user space

2013-01-07 Thread Lan Tianyu
On 2013年01月08日 02:44, Alan Stern wrote: > On Sun, 6 Jan 2013, Lan Tianyu wrote: > >> This patch is to expose usb port's pm qos flags(pm_qos_no_power_off, >> pm_qos_remote_wakeup) to user space. User can set pm_qos_no_power_off >> flag to prohibit the port from being power off. > >> @@ -165,8 +166

[PATCH] sisusbvga: use proper device for dev_err() during probe

2013-01-07 Thread Nickolai Zeldovich
If kzalloc returns NULL, do not dereference the said NULL pointer as the first argument to dev_err(); use &dev->dev instead. Similarly, before sisusb->sisusb_dev has been initialized to dev, use dev_err(&dev->dev) instead. Signed-off-by: Nickolai Zeldovich --- drivers/usb/misc/sisusbvga/sisusb.

Re: usb serial driver: private data already deallocated when release function is called

2013-01-07 Thread Tilman
I added an addition port_probe, and port_remove function that do nothing but a "return 0". The bahavior is unchanged. The private data is already deallocated once the release function is called Now, i have 2 follow up questions: 1) When I load and unload the kernel model, I get an error message De

USB autosuspend vs. URB submission

2013-01-07 Thread Josh Boyer
Hi, We've had a few reports in Fedora of users hitting the WARN_ONCE in drivers/usb/core/urb.c that prints a warning about a usb_submit_urb being called on an active URB. One of them[1] is from the ums_realtek driver and the other[2] is from the uvcvideo driver. However, I noticed that in both i

Re: [PATCH 11/16] usb/gadget: fix error path in uvc_function_bind()

2013-01-07 Thread Laurent Pinchart
Hi Felipe, On Wednesday 31 October 2012 15:06:54 Felipe Balbi wrote: > On Mon, Oct 22, 2012 at 10:15:05PM +0200, Sebastian Andrzej Siewior wrote: > > The "video->minor = -1" assigment is done in V4L2 by > > video_register_device() so it is removed here. > > Now. uvc_function_bind() calls in error

[RFC PATCH 3/6] HCD descriptor DMA support for the DWC2 driver

2013-01-07 Thread Paul Zimmerman
Signed-off-by: Paul Zimmerman --- drivers/usb/dwc2/hcd_ddma.c | 1168 +++ 1 files changed, 1168 insertions(+), 0 deletions(-) create mode 100644 drivers/usb/dwc2/hcd_ddma.c diff --git a/drivers/usb/dwc2/hcd_ddma.c b/drivers/usb/dwc2/hcd_ddma.c new file m

[RFC PATCH 6/6] Hook the DWC2 driver into the build system

2013-01-07 Thread Paul Zimmerman
Signed-off-by: Paul Zimmerman --- drivers/usb/Kconfig |2 ++ drivers/usb/Makefile |2 ++ 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig index 4c90b51..4f1c6fe 100644 --- a/drivers/usb/Kconfig +++ b/drivers/usb/Kconfig @@ -125,6 +

[RFC PATCH 6/6] Hook the DWC2 driver into the build system

2013-01-07 Thread Paul Zimmerman
Signed-off-by: Paul Zimmerman --- drivers/usb/Kconfig |2 ++ drivers/usb/Makefile |2 ++ 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig index 4c90b51..4f1c6fe 100644 --- a/drivers/usb/Kconfig +++ b/drivers/usb/Kconfig @@ -125,6 +

[RFC PATCH 5/6] Kconfig and Makefile for the DWC2 driver

2013-01-07 Thread Paul Zimmerman
Signed-off-by: Paul Zimmerman --- drivers/usb/dwc2/Kconfig | 25 + drivers/usb/dwc2/Makefile | 13 + 2 files changed, 38 insertions(+), 0 deletions(-) create mode 100644 drivers/usb/dwc2/Kconfig create mode 100644 drivers/usb/dwc2/Makefile diff --git a

[RFC PATCH 4/6] PCI bus interface for the DWC2 driver

2013-01-07 Thread Paul Zimmerman
Signed-off-by: Paul Zimmerman --- drivers/usb/dwc2/pci.c | 591 1 files changed, 591 insertions(+), 0 deletions(-) create mode 100644 drivers/usb/dwc2/pci.c diff --git a/drivers/usb/dwc2/pci.c b/drivers/usb/dwc2/pci.c new file mode 100644 index

[RFC PATCH 3/6] HCD descriptor DMA support for the DWC2 driver

2013-01-07 Thread Paul Zimmerman
Signed-off-by: Paul Zimmerman --- drivers/usb/dwc2/hcd_ddma.c | 1168 +++ 1 files changed, 1168 insertions(+), 0 deletions(-) create mode 100644 drivers/usb/dwc2/hcd_ddma.c diff --git a/drivers/usb/dwc2/hcd_ddma.c b/drivers/usb/dwc2/hcd_ddma.c new file m

[RFC PATCH 4/6] PCI bus interface for the DWC2 driver

2013-01-07 Thread Paul Zimmerman
Signed-off-by: Paul Zimmerman --- drivers/usb/dwc2/pci.c | 591 1 files changed, 591 insertions(+), 0 deletions(-) create mode 100644 drivers/usb/dwc2/pci.c diff --git a/drivers/usb/dwc2/pci.c b/drivers/usb/dwc2/pci.c new file mode 100644 index

[RFC PATCH 0/6] DWC2 DesignWare HS OTG driver

2013-01-07 Thread Paul Zimmerman
Hi Felipe, Ben, This is a host-mode driver for the Synopsys DesignWare HS OTG controller. This is the same controller whose peripheral mode is implemented by the existing s3c-hsotg driver. The idea is to add a dwc2/ directory alongside the existing dwc3/ directory, initially to contain just this

[RFC PATCH 0/6] DWC2 DesignWare HS OTG driver

2013-01-07 Thread Paul Zimmerman
Resending due to screwup in To: address line Hi Felipe, Ben, This is a host-mode driver for the Synopsys DesignWare HS OTG controller. This is the same controller whose peripheral mode is implemented by the existing s3c-hsotg driver. The idea is to add a dwc2/ directory alongside the existing d

[RFC PATCH 5/6] Kconfig and Makefile for the DWC2 driver

2013-01-07 Thread Paul Zimmerman
Signed-off-by: Paul Zimmerman --- drivers/usb/dwc2/Kconfig | 25 + drivers/usb/dwc2/Makefile | 13 + 2 files changed, 38 insertions(+), 0 deletions(-) create mode 100644 drivers/usb/dwc2/Kconfig create mode 100644 drivers/usb/dwc2/Makefile diff --git a

Re: [PATCH v3 8/9] usb: expose usb port's pm qos flags to user space

2013-01-07 Thread Alan Stern
On Sun, 6 Jan 2013, Lan Tianyu wrote: > This patch is to expose usb port's pm qos flags(pm_qos_no_power_off, > pm_qos_remote_wakeup) to user space. User can set pm_qos_no_power_off > flag to prohibit the port from being power off. > @@ -165,8 +166,12 @@ int usb_hub_create_port_device(struct usb_h

Re: [PATCH v3 7/9] usb: add usb port auto power off mechanism

2013-01-07 Thread Alan Stern
On Sun, 6 Jan 2013, Lan Tianyu wrote: > This patch is to add usb port auto power off mechanism. > When usb device is suspending, usb core will suspend usb port and > usb port runtime pm callback will clear PORT_POWER feature to > power off port if all conditions were met. These conditions are > re

Re: [Pull Request] usb-next: Further warm reset improvements

2013-01-07 Thread Sarah Sharp
On Mon, Jan 07, 2013 at 10:16:00AM -0800, Greg Kroah-Hartman wrote: > On Thu, Jan 03, 2013 at 02:28:30PM -0800, Sarah Sharp wrote: > > The following changes since commit c52804a472649b2e5005342308739434cbd51119: > > > > xhci: Avoid "dead ports", add roothub port polling. (2013-01-03 14:10:29 >

Re: [Pull Request] usb-next: Further warm reset improvements

2013-01-07 Thread Greg Kroah-Hartman
On Thu, Jan 03, 2013 at 02:28:30PM -0800, Sarah Sharp wrote: > The following changes since commit c52804a472649b2e5005342308739434cbd51119: > > xhci: Avoid "dead ports", add roothub port polling. (2013-01-03 14:10:29 > -0800) > > are available in the git repository at: > > git://git.kernel.

Re: [Pull Request] usb-linus: USB core fixes for warm reset

2013-01-07 Thread Greg Kroah-Hartman
On Thu, Jan 03, 2013 at 02:28:08PM -0800, Sarah Sharp wrote: > The following changes since commit a49f0d1ea3ec94fc7cf33a7c36a16343b74bd565: > > Linux 3.8-rc1 (2012-12-21 17:19:00 -0800) > > are available in the git repository at: > > git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci.g

Re: [GIT PULL] USB fixes for v3.8-rc2

2013-01-07 Thread Greg KH
On Thu, Dec 13, 2012 at 04:58:36PM +0200, Felipe Balbi wrote: > Hi Greg, > > Here's my first set of fixes for this -rc cycle. Let me > know if you want any changes to this pull request. > > I'm basing it off of Linus' current master as there are no > tags yet. If you want to wait until -rc1 is ta

Re: [PATCH v4 0/6] support other fsl SoCs with usbmisc + small fixes

2013-01-07 Thread Fabio Estevam
Hi Alexander, On Wed, Nov 28, 2012 at 12:52 AM, Peter Chen wrote: > I have tested it at i.mx6q sabrelite board, it works good. > > I have pushed your commit to my git, please cc me > your coming chipidea patches, thanks. > > Alex, please add: > > Reviewed-by: Peter Chen > Tested-by: Peter Chen

[PATCH] usb: musb: ux500: use clk_prepare_enable and clk_disable_unprepare

2013-01-07 Thread Fabio Baltieri
This patch converts the module to use clk_prepare_enable and clk_disable_unprepare variants as required by common clock framework. Without this the system crash during probe function. Signed-off-by: Fabio Baltieri --- drivers/usb/musb/ux500.c | 10 +- 1 file changed, 5 insertions(+), 5

Re: [PATCH 2/2] USB: gadget: at91_adc: fix pullup pin validity check

2013-01-07 Thread Nicolas Ferre
On 12/23/2012 07:08 PM, Jean-Christophe PLAGNIOL-VILLARD : > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD Acked-by: Nicolas Ferre > Cc: linux-usb@vger.kernel.org > --- > drivers/usb/gadget/at91_udc.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/g

Re: [PATCH 22/25] usb/at91_udc: don't use [delayed_]work_pending()

2013-01-07 Thread Nicolas Ferre
On 12/22/2012 02:57 AM, Tejun Heo : > There's no need to test whether a (delayed) work item in pending > before queueing, flushing or cancelling it. Most uses are unnecessary > and quite a few of them are buggy. > > Remove unnecessary pending tests from at91_udc. Only compile tested. > > Signed

Re: [PATCH 1/1] USB: OHCI: Fix definition overriding while registering Exynos OHCI driver

2013-01-07 Thread Alan Stern
On Mon, 7 Jan 2013, Sachin Kamat wrote: > On Monday, 7 January 2013, Alan Stern wrote: > > On Mon, 7 Jan 2013, Sachin Kamat wrote: > > > >> Exynos OHCI driver does not get registered if generic OHCI driver > >> is also selected as the macro PLATFORM_DRIVER gets re-defined to > >> 'ohci_platform_d

Re: [PATCH 1/1] USB: OHCI: Fix definition overriding while registering Exynos OHCI driver

2013-01-07 Thread Alan Stern
On Mon, 7 Jan 2013, Sachin Kamat wrote: > Exynos OHCI driver does not get registered if generic OHCI driver > is also selected as the macro PLATFORM_DRIVER gets re-defined to > 'ohci_platform_driver' instead of 'exynos_ohci_driver'. Hence define > it separately. > > Also, silences the following c

Re: usb serial driver: private data already deallocated when release function is called

2013-01-07 Thread Alan Stern
On Mon, 7 Jan 2013, Tilman wrote: > Hello > > I am porting a usb test driver from kernel version 3.0.8 to > kernel version 3.7.1. > > The release function was working on V3.0.0. On V3.7.1, the > private data stored in serial->port.device->p->driver_data > seems already to be deallocated (or

Re: [PATCH 1/2] usbnet: allow status interrupt URB to always be active

2013-01-07 Thread Dan Williams
On Sat, 2013-01-05 at 12:01 +0100, Oliver Neukum wrote: > On Friday 04 January 2013 19:26:33 Dan Williams wrote: > > On Fri, 2013-01-04 at 23:16 +0100, Oliver Neukum wrote: > > > On Friday 04 January 2013 10:48:16 Dan Williams wrote: > > > > Some drivers (ex sierra_net) need the status interrupt UR

Re: Linux USB file storage gadget with new UDC

2013-01-07 Thread Alan Stern
On Mon, 7 Jan 2013, victor yeo wrote: > Yes, usbmon requires usb host side support (i enable them both to use > usbmon). So i disable the usbmon and usb host side support in > menuconfig. Then i rebuild linux again. Subsequently, the /sys/bus > does not contain usb folder. > > # ls /sys/bus/ > cl

Re: [PATCH 1/2] usbnet: allow status interrupt URB to always be active

2013-01-07 Thread Dan Williams
On Sat, 2013-01-05 at 11:59 +0100, Bjørn Mork wrote: > Dan Williams writes: > > On Fri, 2013-01-04 at 23:16 +0100, Oliver Neukum wrote: > >> On Friday 04 January 2013 10:48:16 Dan Williams wrote: > >> > Some drivers (ex sierra_net) need the status interrupt URB > >> > active even when the device i

Re: usb: multi phy support

2013-01-07 Thread kishon
Hi, On Monday 07 January 2013 05:30 PM, Felipe Balbi wrote: Hi, On Mon, Jan 07, 2013 at 12:57:15PM +0100, Mohammed, Afzal wrote: AM335x SoC's used in boards like beagle bone has two instances of USB modules (2.0) at the hardware level, each having a dedicated phy. Currently in mainline, only o

Re: usb: multi phy support

2013-01-07 Thread Felipe Balbi
Hi, On Mon, Jan 07, 2013 at 12:57:15PM +0100, Mohammed, Afzal wrote: > AM335x SoC's used in boards like beagle bone has two instances of USB > modules (2.0) at the hardware level, each having a dedicated phy. > Currently in mainline, only one instance of USB is supported > (including a fix in your

usb: multi phy support

2013-01-07 Thread Mohammed, Afzal
Hi Felipe, AM335x SoC's used in boards like beagle bone has two instances of USB modules (2.0) at the hardware level, each having a dedicated phy. Currently in mainline, only one instance of USB is supported (including a fix in your latest pull request). To support multi instance, the biggest obst

Re: Is it possible to load usb gadget mass storage driver as module(.ko)

2013-01-07 Thread Sebastian Andrzej Siewior
On 12/31/2012 07:36 AM, Greg KH wrote: i am using cypress mass storage driver (in path /drivers/staging/westbridge/ben../gadget/cywbgadget.c ) That driver is very strange, and I don't even know if it works or not. You should contact the authors of it for any help you need with it, as no one el

Re: [PATCH 1/2] usbnet: allow status interrupt URB to always be active

2013-01-07 Thread Oliver Neukum
On Saturday 05 January 2013 11:59:16 Bjørn Mork wrote: Hi, > You can still use a trick similar to what qmi_wwan and cdc_mbim does to > take over the status endpoint from usbnet: By not implementing .status, > and possibly setting dev->status to NULL in .bind, you are free to > handle the status e

Re: [PATCH v2 Resend 9/9] usb: add usb_device_allow_power_off() function.

2013-01-07 Thread Oliver Neukum
On Saturday 05 January 2013 13:58:27 Alan Stern wrote: > > static int inline usb_device_prevent_power_off(struct usb_device *udev) > > { > > struct device *dev = usb_get_port_dev(udev); > > > > if(!dev) > > return -ENODEV; > > > > return pm_runtime_get_sync(dev); >