Re: qmi wwan interface does not work in this version 3.5.rc7.next.20120720

2012-07-24 Thread Bjørn Mork
Bjørn Mork writes: > Alan Stern writes: > >> I suspect that answer is to make usb_wwan_disconnect a .port_remove >> callback instead of a .disconnect callback. By the time the disconnect >> method runs, the ports have been unregistered and are basically gone. > > I have a hard time trying to fig

Re: g_serial and cdc_acm communications

2012-07-24 Thread Felipe Balbi
Hi, On Mon, Jul 23, 2012 at 02:34:33PM +, Dipen Patel wrote: > Can anyone help me with this? How my application should detect device > plugout/plugin and SET_CONFIGURATION events? > > Is my current solution of generating input event on SET_CONFIGURATION call for > application to close and re

Re: Discussion about implementation of usb port power off mechanism for port with device

2012-07-24 Thread Lan Tianyu
On 2012年07月23日 23:27, Alan Stern wrote: On Mon, 23 Jul 2012, Lan Tianyu wrote: @@ -3027,6 +3070,24 @@ int usb_port_resume(struct usb_device *u int status; u16 portchange, portstatus; + if (hub->ports[port1 - 1]->port_power_policy == USB_PORT_POWER_

[RFC PATCH] usb: Change persist_enabled when attribute avoid_reset_quirk is changed

2012-07-24 Thread Lan Tianyu
The quirk USB_QUIRK_RESET_MORPHS means the device can't be reset and reset-resume. So persist_enabled also should be set simultaneously with USB_QUIRK_RESET_MORPHS flag. But Currently in the attribute avoid_reset_quirk store callback just set USB_QUIRK_RESET_MORPHS. The persist_enabled will only be

Re: [PATCH 2/2] xhci: EHCI/XHCI ports switching on Intense-PC.

2012-07-24 Thread Denis Turischev
On 07/23/2012 08:44 PM, Sarah Sharp wrote: > Did you try disabling the wake on bits in the port status registers? I > would prefer that solution if it works. No, I didn't. Why we need to disable wake on capabilities? > > Otherwise this patchset looks fine. I'll work with the hardware folks > and

Re: [RFC PATCH] usb: Change persist_enabled when attribute avoid_reset_quirk is changed

2012-07-24 Thread Oliver Neukum
On Tuesday 24 July 2012 16:39:37 Lan Tianyu wrote: > The quirk USB_QUIRK_RESET_MORPHS means the device can't be reset > and reset-resume. So persist_enabled also should be set simultaneously Set? Why bother? If anything reset_resume() is hopeless, so why delay the resume by trying? Regard

Re: controlling record light on camera

2012-07-24 Thread Laurent Pinchart
Hi Adam, On Monday 23 July 2012 16:26:16 Adam Wozniak wrote: > I'm trying to control the "recording" light on a Logitech C270 webcam > from a linux userspace app. > > There is a windows app that does this, so I know it is possible. > > Running the app in a VM, and looking at usbmon output, the f

Re: g_serial and cdc_acm communications

2012-07-24 Thread Dipen Patel
Hi Felipe, In my device application I am not receiving SIGHUP when HOST sends SET_CONFIGURATION or my device is replugged into HOST. Signals are another mechanism for application to know that either device is reattached or SET_CONFIGURATION is called by HOST apart from my custom solution of

Re: [RFC PATCH for v3.5 0/2] usb: gadget: at91_udc: fix oops regression

2012-07-24 Thread Fabio Porcedda
On Mon, Jul 23, 2012 at 12:53 PM, Felipe Balbi wrote: > On Fri, Jul 20, 2012 at 10:33:24AM +0200, Fabio Porcedda wrote: >> On Fri, Jul 20, 2012 at 12:50 AM, Greg Kroah-Hartman >> wrote: >> > On Thu, Jul 19, 2012 at 07:16:54PM +0200, Sebastian Andrzej Siewior wrote: >> >> On Thu, Jul 19, 2012 at 0

[PATCH v2] usb: gadget: composite: parse dt values

2012-07-24 Thread Alexandre Pereira da Silva
Grab the devicetree node properties to set VendorId, ProductId, bcdDevice, Manucacturer, Product and SerialNumber Signed-off-by: Alexandre Pereira da Silva Acked-by: Michal Nazarewicz Acked-by: Rob Herring --- Applies to v3.5 Changes since V1: * Minor patch description and code comments update

Re: [RFC PATCH] usb: Change persist_enabled when attribute avoid_reset_quirk is changed

2012-07-24 Thread Lan Tianyu
于 2012/7/24 16:57, Oliver Neukum 写道: On Tuesday 24 July 2012 16:39:37 Lan Tianyu wrote: The quirk USB_QUIRK_RESET_MORPHS means the device can't be reset and reset-resume. So persist_enabled also should be set simultaneously Set? Why bother? If anything reset_resume() is hopeless, so why delay

Re: [RFC PATCH] usb: Change persist_enabled when attribute avoid_reset_quirk is changed

2012-07-24 Thread Oliver Neukum
On Tuesday 24 July 2012 21:28:30 Lan Tianyu wrote: > Current only in the usb_detect_quirks(), persist_enabled will > be set to 0 depending on whether the dev's flag USB_QUIRK_RESET_MORPHS > is set or not. And usb_detect_quirks() is only called in the > hub_port_connect_change() when a new device

Re: [RFC PATCH] usb: Change persist_enabled when attribute avoid_reset_quirk is changed

2012-07-24 Thread Lan Tianyu
于 2012/7/24 21:35, Oliver Neukum 写道: On Tuesday 24 July 2012 21:28:30 Lan Tianyu wrote: Current only in the usb_detect_quirks(), persist_enabled will be set to 0 depending on whether the dev's flag USB_QUIRK_RESET_MORPHS is set or not. And usb_detect_quirks() is only called in the hub_port_conn

Re: [RFC PATCH] usb: Change persist_enabled when attribute avoid_reset_quirk is changed

2012-07-24 Thread Oliver Neukum
On Tuesday 24 July 2012 21:48:37 Lan Tianyu wrote: > 于 2012/7/24 21:35, Oliver Neukum 写道: > > On Tuesday 24 July 2012 21:28:30 Lan Tianyu wrote: > >> Current only in the usb_detect_quirks(), persist_enabled will > >> be set to 0 depending on whether the dev's flag USB_QUIRK_RESET_MORPHS > >> is se

Re: [RFC PATCH] usb: Change persist_enabled when attribute avoid_reset_quirk is changed

2012-07-24 Thread Alan Stern
On Tue, 24 Jul 2012, Lan Tianyu wrote: > The quirk USB_QUIRK_RESET_MORPHS means the device can't be reset > and reset-resume. So persist_enabled also should be set simultaneously > with USB_QUIRK_RESET_MORPHS flag. But Currently in the attribute > avoid_reset_quirk store callback just set USB_QUIR

Re: g_serial and cdc_acm communications

2012-07-24 Thread Dipen Patel
Hi Felipe, I think I know why my application is not receiving SIGHUP. When HOST sends SET_CONFIGURATION the set_config() in composite.c calls acm_set_alt(). Now acm_set_alt() calls gserial_connect() and it will create new port. But it never called gserial_disconnect() to close previously calle

Re: qmi wwan interface does not work in this version 3.5.rc7.next.20120720

2012-07-24 Thread Alan Stern
On Tue, 24 Jul 2012, Bjørn Mork wrote: > Bjørn Mork writes: > > Alan Stern writes: > > > >> I suspect that answer is to make usb_wwan_disconnect a .port_remove > >> callback instead of a .disconnect callback. By the time the disconnect > >> method runs, the ports have been unregistered and are

Re: [RFC PATCH] usb: Change persist_enabled when attribute avoid_reset_quirk is changed

2012-07-24 Thread Lan Tianyu
于 2012/7/24 22:21, Alan Stern 写道: On Tue, 24 Jul 2012, Lan Tianyu wrote: @@ -209,10 +209,13 @@ set_avoid_reset_quirk(struct device *dev, struct device_attribute *attr, if (sscanf(buf, "%d", &config) != 1 || config < 0 || config > 1) Please do me a favor: Rename the "config" variable t

Re: [RFC PATCH] usb: Change persist_enabled when attribute avoid_reset_quirk is changed

2012-07-24 Thread Alan Stern
On Tue, 24 Jul 2012, Lan Tianyu wrote: > 于 2012/7/24 22:21, Alan Stern 写道: > > On Tue, 24 Jul 2012, Lan Tianyu wrote: > >> @@ -209,10 +209,13 @@ set_avoid_reset_quirk(struct device *dev, struct > >> device_attribute *attr, > >>if (sscanf(buf, "%d", &config) != 1 || config < 0 || config > 1) >

[PATCH 2/2] drivers/mmc/host/vub300.c: add missing usb_free_urb

2012-07-24 Thread Julia Lawall
From: Julia Lawall Add missing usb_free_urb on failure path after usb_alloc_urb. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @km exists@ local idexpression e; expression e1,e2,e3; type T,T1; identifier f; @@ * e = usb_alloc

Re: [RFC PATCH] usb: Change persist_enabled when attribute avoid_reset_quirk is changed

2012-07-24 Thread Lan Tianyu
于 2012/7/24 22:59, Alan Stern 写道: On Tue, 24 Jul 2012, Lan Tianyu wrote: 于 2012/7/24 22:21, Alan Stern 写道: On Tue, 24 Jul 2012, Lan Tianyu wrote: @@ -209,10 +209,13 @@ set_avoid_reset_quirk(struct device *dev, struct device_attribute *attr, if (sscanf(buf, "%d", &config) != 1 || conf

Re: [RFC PATCH] usb: Change persist_enabled when attribute avoid_reset_quirk is changed

2012-07-24 Thread Lan Tianyu
于 2012/7/24 22:59, Alan Stern 写道: Yes, good idea. When you do this, you should also add another little paragraph to Documentation/usb/persist.txt. At the end of the "What is the solution?" section, explain why the persist attribute cannot be set if the avoid_reset_quirk attribute is on. Hmmm,

Re: [RFC PATCH] usb: Change persist_enabled when attribute avoid_reset_quirk is changed

2012-07-24 Thread Alan Stern
On Tue, 24 Jul 2012, Lan Tianyu wrote: > 于 2012/7/24 22:59, Alan Stern 写道: > > Yes, good idea. > > > > When you do this, you should also add another little paragraph to > > Documentation/usb/persist.txt. At the end of the "What is the > > solution?" section, explain why the persist attribute cann

Re: Serious problems with empty port power management in linux-next

2012-07-24 Thread Alan Stern
On Mon, 23 Jul 2012, Bjørn Mork wrote: > Alan Stern writes: > > On Mon, 23 Jul 2012, Bjørn Mork wrote: > > > >> Hello, > >> > >> I have no idea where to start debugging this. But USB hotplug does not > >> seem to work at all in linux-next if autosuspend is enabled. > >> > >> I am running next-

[PATCH] omap: usb: host: remove deprecated flag 'es2_compatibility'

2012-07-24 Thread Ruslan Bilovol
Currently this flag is not used anywhere and may be safely removed. Signed-off-by: Ruslan Bilovol --- arch/arm/mach-omap2/usb-host.c|1 - arch/arm/plat-omap/include/plat/usb.h |4 2 files changed, 0 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-omap2/usb-host.c b

[PATCH] cdc-ncm: tag Ericsson WWAN devices (eg F5521gw) with FLAG_WWAN

2012-07-24 Thread Dan Williams
Tag Ericsson NCM devices as WWAN modems, since they almost certainly all are. This way userspace clients know that the device requires further setup on the AT-capable serial ports before connectivity is available. Signed-off-by: Dan Williams --- NOTE: it seems unlikely that all NCM devices are

[PATCH] Fixup mos7840 timeout

2012-07-24 Thread Mark Ferrell
* mos7840 driver was using multiple of HZ for the timeout handed off to usb_control_msg(). Changed the timeout to use msecs instead. * Remove unused WAIT_FOR_EVER definition Signed-off-by: Mark Ferrell --- drivers/usb/serial/mos7840.c |7 +++ 1 file changed, 3 insertions(+), 4 delet

[PATCH] usb: serial: mos7840: Fixup mos7840_chars_in_buffer()

2012-07-24 Thread Mark Ferrell
* Use the buffer content length as opposed to the total buffer size. This can be a real problem when using the mos7840 as a usb serial-console as all kernel output is truncated during boot. Signed-off-by: Mark Ferrell --- drivers/usb/serial/mos7840.c |9 ++--- 1 file changed, 6

[PATCH] usb: serial: mos7840: Avoid kfree() on bad pointer

2012-07-24 Thread Mark Ferrell
* mos7840_startup() blindly calls kfree() on memory that may have never been allocated. Signed-off-by: Mark Ferrell --- drivers/usb/serial/mos7840.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c

Re: [PATCH] usb: serial: mos7840: Avoid kfree() on bad pointer

2012-07-24 Thread Sergei Shtylyov
Hello. On 07/24/2012 11:17 PM, Mark Ferrell wrote: > * mos7840_startup() blindly calls kfree() on memory that may have never been > allocated. Calling kfree() on a NULL pointers is perfectly valid. > Signed-off-by: Mark Ferrell > --- > drivers/usb/serial/mos7840.c | 13 + >

Re: [PATCH] usb: serial: mos7840: Avoid kfree() on bad pointer

2012-07-24 Thread Oliver Neukum
On Tuesday 24 July 2012 14:17:31 Mark Ferrell wrote: > * mos7840_startup() blindly calls kfree() on memory that may have never been > allocated. kfree() includes a check for NULL. Regards Oliver -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in

Re: [PATCH 2/2] xhci: EHCI/XHCI ports switching on Intense-PC.

2012-07-24 Thread Sarah Sharp
On Tue, Jul 24, 2012 at 11:50:42AM +0300, Denis Turischev wrote: > On 07/23/2012 08:44 PM, Sarah Sharp wrote: > > Did you try disabling the wake on bits in the port status registers? I > > would prefer that solution if it works. > No, I didn't. Why we need to disable wake on capabilities? My theo

Re: [RFT] xhci: Increase reset timeout for renesas 720201 host.

2012-07-24 Thread Sarah Sharp
On Tue, Jul 24, 2012 at 01:24:07PM +0200, Edwin Klein Mentink wrote: > Hallo Sarah, > > Thanks for the fast reply! > I've applied the patch. It seems to work now :-) Excellent! I'll send that patch upstream then. > I have a fairly old computer (AMD Athlon(tm) 64 X2 Dual Core Processor > 3800+),

Re: [PATCH] ene_ub6250: Use macros for firmware names

2012-07-24 Thread Greg Kroah-Hartman
On Tue, Jul 24, 2012 at 02:31:09PM -0600, Tim Gardner wrote: > Advertise firmware files using MODULE_FIRMWARE macros. > > Cc: Greg Kroah-Hartman > Cc: linux-usb@vger.kernel.org > Cc: usb-stor...@lists.one-eyed-alien.net > Signed-off-by: Tim Gardner > --- > drivers/usb/storage/ene_ub6250.c | 2

Re: Serious problems with empty port power management in linux-next

2012-07-24 Thread Bjørn Mork
Alan Stern writes: > On Mon, 23 Jul 2012, Bjørn Mork wrote: > >> uhci_hcd + ehci_hcd. Really standard intel based laptop from 2008/2009: > > I tried reproducing this without success. But I wasn't using the same > kernel as you; I used 3.5 plus Greg's usb-next branch. So it looks > like the prob

Re: [PATCH] cdc-ncm: tag Ericsson WWAN devices (eg F5521gw) with FLAG_WWAN

2012-07-24 Thread David Miller
From: Dan Williams Date: Tue, 24 Jul 2012 13:43:22 -0500 > Tag Ericsson NCM devices as WWAN modems, since they almost certainly all > are. This way userspace clients know that the device requires further > setup on the AT-capable serial ports before connectivity is available. > > Signed-off-by:

[PATCH] ene_ub6250: Use macros for firmware names

2012-07-24 Thread Tim Gardner
Advertise firmware files using MODULE_FIRMWARE macros. Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Cc: usb-stor...@lists.one-eyed-alien.net Signed-off-by: Tim Gardner --- drivers/usb/storage/ene_ub6250.c | 26 +++--- 1 file changed, 19 insertions(+), 7 deletions(-

Re: [PATCH] ene_ub6250: Use macros for firmware names

2012-07-24 Thread Greg Kroah-Hartman
On Tue, Jul 24, 2012 at 03:00:06PM -0600, Tim Gardner wrote: > On 07/24/2012 02:34 PM, Greg Kroah-Hartman wrote: > >On Tue, Jul 24, 2012 at 02:31:09PM -0600, Tim Gardner wrote: > >>Advertise firmware files using MODULE_FIRMWARE macros. > >> > >>Cc: Greg Kroah-Hartman > >>Cc: linux-usb@vger.kernel.

Re: [PATCH] ene_ub6250: Use macros for firmware names

2012-07-24 Thread Tim Gardner
On 07/24/2012 02:34 PM, Greg Kroah-Hartman wrote: On Tue, Jul 24, 2012 at 02:31:09PM -0600, Tim Gardner wrote: Advertise firmware files using MODULE_FIRMWARE macros. Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Cc: usb-stor...@lists.one-eyed-alien.net Signed-off-by: Tim Gardner ---

Re: [PATCH] ene_ub6250: Use macros for firmware names

2012-07-24 Thread Betty Dall
Hi Tim, I reviewed this patch and it looks good. Once small suggestion you can take or leave... On Tue, 2012-07-24 at 14:31 -0600, Tim Gardner wrote: > Advertise firmware files using MODULE_FIRMWARE macros. > > Cc: Greg Kroah-Hartman > Cc: linux-usb@vger.kernel.org > Cc: usb-stor...@lists.one-e

bisected regression, v3.5 -> next-20120724: PCI PM causes USB hotplug failure

2012-07-24 Thread Bjørn Mork
Enabling autosuspend for USB causes hotplug failure in the current linux-next. Newly plugged devices are not detected at all until the port/controller is manually powered on by writing "on" to power/control. Testing is pretty simple: 1) for f in /sys/bus/usb/devices/*/power/control; do echo auto

Re: bisected regression, v3.5 -> next-20120724: PCI PM causes USB hotplug failure

2012-07-24 Thread Huang Ying
Hi, Bjorn, On Wed, 2012-07-25 at 06:08 +0200, Bjørn Mork wrote: > Enabling autosuspend for USB causes hotplug failure in the current > linux-next. Newly plugged devices are not detected at all until the > port/controller is manually powered on by writing "on" to power/control. > Testing is pretty

Re: g_serial and cdc_acm communications

2012-07-24 Thread Felipe Balbi
(please use reply to all and keep the previous mail) On Tue, Jul 24, 2012 at 02:29:57PM +, Dipen Patel wrote: > Hi Felipe, > > I think I know why my application is not receiving SIGHUP. > > When HOST sends SET_CONFIGURATION the set_config() in composite.c calls > acm_set_alt(). Now acm_set_