Re: about possible port reset when disconnect

2014-04-13 Thread vichy
hi Alan: 2014-04-09 6:58 GMT+08:00 Alan Stern st...@rowland.harvard.edu: On Tue, 8 Apr 2014, vichy wrote: That's a different bit. USB_PORT_FEAT_C_RESET isn't the same as USB_PORT_FEAT_RESET. what I am curious is, if port reset bit will clear to 0 within 2ms, why we still need to

error handing for usb3.0 devices

2014-04-13 Thread vichy
hi all: When I plug in usb3.0 device for stressing test, once usb_get_device_descriptor fail in hub_port_init. we will call hub_port_disable(hub, port1, 0); And usb3.0 device may not recover successfully only with below function retval = hub_port_reset(hub, port1, udev, delay, false); when we

Re: i.MX51 ChipIdea USB device endpoints questions

2014-04-13 Thread Peter Chen
On Fri, Apr 11, 2014 at 12:16:17PM +, Ebright, Dave wrote: Peter, Thanks for your response. I understand that currently for the i.MX51 in the ChipIdea drivers that the DEN value is 8 which results in defining endpoints ep[0-7]in and ep[0-7]out. I am looking to develop a piece of

Re: [PATCH] [media] Prefer gspca_sonixb over sn9c102 for all devices

2014-04-13 Thread Hans de Goede
Hi, On 04/11/2014 09:15 AM, Jean Delvare wrote: The sn9c102 driver is deprecated. It was moved to staging in anticipation of its removal in a future kernel version. However, USB devices 0C45:6024 and 0C45:6025 are still handled by sn9c102 when both sn9c102 and gspca_sonixb are enabled. We

Re: error handing for usb3.0 devices

2014-04-13 Thread Greg KH
On Sun, Apr 13, 2014 at 03:43:47PM +0800, vichy wrote: hi all: When I plug in usb3.0 device for stressing test, once usb_get_device_descriptor fail in hub_port_init. we will call hub_port_disable(hub, port1, 0); And usb3.0 device may not recover successfully only with below function

what HCD_FLAG_POLL_RH used for

2014-04-13 Thread vichy
hi all: When I grep HCD_FLAG_POLL_RH, I ave some questions: 1. why this flag only seems used by xhci, uhci, ohci except ehci? 2. it seems to setup when pcd happen and need to poll port status. And clear it when hcd_died, hcd_remove, hcd_suspend and no port change in hub_status_data 3. if we once

Re: error handing for usb3.0 devices

2014-04-13 Thread vichy
hi Greg: Allways run your patches through checkpatch.pl so someone doesn't point out the formatting issues in it when you send it to the mailing list :) Here it is diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 090469e..2192776 100644 --- a/drivers/usb/core/hub.c +++

Re: error handing for usb3.0 devices

2014-04-13 Thread Greg KH
On Sun, Apr 13, 2014 at 10:06:15PM +0800, vichy wrote: hi Greg: Allways run your patches through checkpatch.pl so someone doesn't point out the formatting issues in it when you send it to the mailing list :) Here it is You didn't actually use checkpatch.pl :( -- To unsubscribe from this

Re: error handing for usb3.0 devices

2014-04-13 Thread Sergei Shtylyov
Hello. On 04/13/2014 06:06 PM, vichy wrote: Allways run your patches through checkpatch.pl so someone doesn't point out the formatting issues in it when you send it to the mailing list :) Well, I didn't want to complain about the example patch but now I'll just have to... :-) Here it

[PATCH] add alcatel devices PIDVID

2014-04-13 Thread treeui . old
From: shu.suo treeui@gmail.com Signed-off-by: shu.suo treeui@gmail.com --- linux-3.14/drivers/usb/serial/option.c | 47 +++--- 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/linux-3.14/drivers/usb/serial/option.c

EHCI hotplug kernel crash in kernel 3.14 and 3.13

2014-04-13 Thread Stefani Seibold
A hot plug of an USB 2.0 EHCI controller cardbus card will result in a kernel crash. This is the kernel log of a vanilla 3.14 x86_64 kernel. I will attach my kernel config. [ 70.418181] pcmcia_socket pcmcia_socket0: pccard: CardBus card inserted into slot 0 [ 70.418209] pci :04:00.0:

Missing USB XHCI and EHCI reset for kexec

2014-04-13 Thread Stefani Seibold
When executing a kexec kernel on a PowerPC board the new started kernel will not find already enumerated USB devices due a missing reset on the USB bus. As a work around a echo 1 /sys/bus/pci/drivers/[ex]hci-pci/BUS-ADDRESS-OF-THE-HCD/reset will solve this. But this is far from beauty. My

stk1160 / ehci-pci 0000:00:0a.0: DMA-API: device driver maps memory fromstack [addr=ffff88003d0b56bf]

2014-04-13 Thread Sander Eikelenboom
-security-20140413-v4lall+ #1 [5.611042] Hardware name: Xen HVM domU, BIOS 4.5-unstable 04/10/2014 [5.615314] 0009 88003d0b5348 81c516fe 88003d0b5390 [5.622147] 88003d0b5380 810e4aa3 88003ceae898 88003cf14070 [5.628926

[PATCH] USB: cp210x: Add 8281 (Nanotec Plug Drive)

2014-04-13 Thread Tristan Bruns
Signed-off-by: Tristan Bruns tris...@tristanbruns.de --- drivers/usb/serial/cp210x.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index 95fa121..762e4a5 100644 --- a/drivers/usb/serial/cp210x.c +++ b/drivers/usb/serial/cp210x.c @@

Re: xhci: non-superspeed enumeration failure (was: Re: medtronic usb productId 0x8001: usbserial support, xhci enumeration)

2014-04-13 Thread Benjamin West
On Thu, Apr 3, 2014 at 9:32 AM, Johan Hovold jo...@hovold.com wrote: Hi Mathias and Benjamin, Mathias, I understand you've got quite a lot on your plate with xhci at the moment, but have you had a change to look at this issue yet? It's an xhci-issue (possibly due to buggy hw) which seems

Driver CH341 USB Adapter Serial Port not Works in Linux

2014-04-13 Thread Kijam López
Hi!, I'm having trouble with this adapter, and lately I think it's the driver. Here I leave a link where I report the problem: http://stackoverflow.com/questions/23040820/driver-ch341-usb-adapter-serial-port-or-qserialport-not-works-in-linux -- To unsubscribe from this list: send the line

Re: xhci: non-superspeed enumeration failure

2014-04-13 Thread Benjamin West
On Tue, Apr 8, 2014 at 12:52 AM, Johan Hovold jo...@hovold.com wrote: On Mon, Apr 07, 2014 at 07:26:01PM +0300, Mathias Nyman wrote: On 04/03/2014 07:32 PM, Johan Hovold wrote: Hi Mathias and Benjamin, Mathias, I understand you've got quite a lot on your plate with xhci at the moment,

Re: Driver CH341 USB Adapter Serial Port not Works in Linux

2014-04-13 Thread Greg KH
On Sun, Apr 13, 2014 at 08:19:11PM -0430, Kijam López wrote: Hi!, I'm having trouble with this adapter, and lately I think it's the driver. Here I leave a link where I report the problem:

Re: Driver CH341 USB Adapter Serial Port not Works in Linux

2014-04-13 Thread Kijam López
The following code works for me correctly in Windows, but Linux does not work. I am using the same PC, both operating systems are installed native. I do not use virtual machine. I need to work on Linux. I have tried in different linux distributions and does not work anywhere. // In the main

Re: Driver CH341 USB Adapter Serial Port not Works in Linux

2014-04-13 Thread Greg KH
On Sun, Apr 13, 2014 at 08:51:56PM -0430, Kijam López wrote: The following code works for me correctly in Windows, but Linux does not work. I am using the same PC, both operating systems are installed native. I do not use virtual machine. I need to work on Linux. I have tried in different

Re: what HCD_FLAG_POLL_RH used for

2014-04-13 Thread Alan Stern
On Sun, 13 Apr 2014, vichy wrote: hi all: When I grep HCD_FLAG_POLL_RH, I ave some questions: 1. why this flag only seems used by xhci, uhci, ohci except ehci? ehci-hcd doesn't need to use the flag, because it has well behaved interrupts. The other drivers do need to use it. 2. it seems

Re: Missing USB XHCI and EHCI reset for kexec

2014-04-13 Thread Alan Stern
On Sun, 13 Apr 2014, Stefani Seibold wrote: When executing a kexec kernel on a PowerPC board the new started kernel will not find already enumerated USB devices due a missing reset on the USB bus. How do you know the problem is caused by a missing reset? Can you post the dmesg log from the

Re: stk1160 / ehci-pci 0000:00:0a.0: DMA-API: device driver maps memory fromstack [addr=ffff88003d0b56bf]

2014-04-13 Thread Alan Stern
] [5.602548] Modules linked in: [5.605380] CPU: 0 PID: 1376 Comm: khubd Not tainted 3.14.0-security-20140413-v4lall+ #1 [5.611042] Hardware name: Xen HVM domU, BIOS 4.5-unstable 04/10/2014 [5.615314] 0009 88003d0b5348 81c516fe 88003d0b5390

Re: error handing for usb3.0 devices

2014-04-13 Thread vichy
hi Greg and Sergei: Well, I didn't want to complain about the example patch but now I'll just have to... :-) Here it is diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 090469e..2192776 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -4316,6

[PATCH v10 00/11] Add USB OTG HNP and SRP support on Chipidea usb driver

2014-04-13 Thread Li Jun
From: Li Jun b47...@freescale.com This patchset adds USB OTG HNP and SRP support on chipidea usb driver, existing OTG port role swtich function by ID pin status kept unchanged, based on that, if select CONFIG_USB_OTG_FSM, OTG HNP and SRP will be supported. Reference to: On-The-Go and Embedded

[PATCH v10 06/11] usb: chipidea: OTG fsm timers initialization.

2014-04-13 Thread Li Jun
From: Li Jun b47...@freescale.com This patch adds OTG fsm timers initialization, which use controller's 1ms interrupt as timeout counter, also adds some local timers which are not in otg_fsm_timer list. Signed-off-by: Li Jun b47...@freescale.com --- drivers/usb/chipidea/bits.h|1 +

[PATCH v10 05/11] usb: chipidea: add OTG fsm operation functions implemenation.

2014-04-13 Thread Li Jun
Add OTG HNP and SRP operation functions implementation: - charge vbus - drive vbus - connection signaling - drive sof - start data pulse - add fsm timer - delete fsm timer - start host - start gadget Signed-off-by: Li Jun b47...@freescale.com --- drivers/usb/chipidea/bits.h|9 ++

[PATCH v10 10/11] Documentation: ABI: usb: sysfs Description for chipidea USB OTG HNP and SRP

2014-04-13 Thread Li Jun
From: Li Jun b47...@freescale.com This patch adds sysfs interface description for chipidea USB OTG HNP and SRP. Signed-off-by: Li Jun b47...@freescale.com --- .../ABI/testing/sysfs-platform-chipidea-usb-otg| 56 1 file changed, 56 insertions(+) diff --git

[PATCH v10 02/11] usb: chipidea: host: vbus control change for OTG HNP.

2014-04-13 Thread Li Jun
Leave vbus on/off hanlded by OTG fsm if in OTG mode. Signed-off-by: Li Jun b47...@freescale.com --- drivers/usb/chipidea/host.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c index a8ac6c1..ffb4168 100644

[PATCH v10 08/11] usb: chipidea: add sys inputs for OTG fsm input.

2014-04-13 Thread Li Jun
From: Li Jun b47...@freescale.com This patch adds sys input to control and show OTG fsm inputs by application, user can do host and preipheral role switch by change these inputs. Signed-off-by: Li Jun b47...@freescale.com --- drivers/usb/chipidea/otg.c |2 +

[PATCH v10 11/11] Documentation: usb: add chipidea.txt for how to demo usb OTG HNP and SRP

2014-04-13 Thread Li Jun
From: Li Jun b47...@freescale.com This patch adds a file chipidea.txt for how to demo chipidea usb OTG HNP and SRP functions via sysfs input files, any other possible information should be documented for chipidea usb driver in future can be added into this file. Signed-off-by: Li Jun

[PATCH v10 01/11] usb: chipidea: usb OTG fsm initialization.

2014-04-13 Thread Li Jun
This patch adds OTG fsm related initialization when do otg init, add a seperate file for OTG fsm related utilities. Signed-off-by: Li Jun b47...@freescale.com --- drivers/usb/chipidea/Makefile |1 + drivers/usb/chipidea/ci.h | 17 +++ drivers/usb/chipidea/otg.c |4 +++

[PATCH v10 04/11] usb: chipidea: udc: driver update for OTG HNP.

2014-04-13 Thread Li Jun
Add b_hnp_enable request handling and enable gadget-is_otg Acked-by: Peter Chen peter.c...@freescale.com Signed-off-by: Li Jun b47...@freescale.com --- drivers/usb/chipidea/udc.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/usb/chipidea/udc.c

[PATCH v10 03/11] usb: chipidea: host: init otg port number.

2014-04-13 Thread Li Jun
Init otg_port number of otg capable host to be 1 at host start. Signed-off-by: Li Jun b47...@freescale.com --- drivers/usb/chipidea/host.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c index

[PATCH v10 09/11] usb: chipidea: debug: add debug file for OTG variables

2014-04-13 Thread Li Jun
From: Li Jun b47...@freescale.com This patch adds a debug file for OTG vairables show. Signed-off-by: Li Jun b47...@freescale.com --- drivers/usb/chipidea/debug.c | 84 ++ 1 file changed, 84 insertions(+) diff --git a/drivers/usb/chipidea/debug.c

[PATCH v10 07/11] usb: chipidea: OTG HNP and SRP fsm implementation.

2014-04-13 Thread Li Jun
From: Li Jun b47...@freescale.com USB OTG interrupt handling and fsm transitions according to USB OTG and EH 2.0. Signed-off-by: Li Jun b47...@freescale.com --- drivers/usb/chipidea/core.c| 25 - drivers/usb/chipidea/otg.c |9 +- drivers/usb/chipidea/otg_fsm.c | 242

[PATCH V2] Gadget: race between ffs_epfile_io() and ffs_func_eps_disable()

2014-04-13 Thread Chao Bi
ffs_epfile_io() is called from userspace, while ffs_func_esp_disable() might be called from USB disconnect interrupt, the two functions would run in parallel but they are not well protected, that epfile-ep would be removed by ffs_func_esp_disable() during ffs_epfile_io() is referring this

Re: [PATCH v10 00/11] Add USB OTG HNP and SRP support on Chipidea usb driver

2014-04-13 Thread Li Jun
On Mon, Apr 14, 2014 at 09:37:50AM +0800, Li Jun wrote: From: Li Jun b47...@freescale.com This patchset adds USB OTG HNP and SRP support on chipidea usb driver, existing OTG port role swtich function by ID pin status kept unchanged, based on that, if select CONFIG_USB_OTG_FSM, OTG HNP and

Re: [RFC 1/4] dwc3: dts: Binding information for an optional property lpm_capable

2014-04-13 Thread Pratyush Anand
Hi Paul, On Sat, Apr 12, 2014 at 02:25:27AM +0800, Paul Zimmerman wrote: From: Pratyush Anand [mailto:pratyush.an...@gmail.com] Sent: Friday, April 11, 2014 11:06 AM On Fri, Apr 11, 2014 at 11:24 PM, Felipe Balbi ba...@ti.com wrote: On Fri, Apr 11, 2014 at 03:50:03PM +0530, Pratyush

Re: [RFC 3/4] xhci: A default implementation for Ux timeout calculation and tier policy check

2014-04-13 Thread Pratyush Anand
On Sat, Apr 12, 2014 at 02:54:22AM +0800, Felipe Balbi wrote: Hi, On Sat, Apr 12, 2014 at 12:04:27AM +0530, Pratyush Anand wrote: +static u16 xhci_calculate_default_u1_timeout(struct usb_device *udev, + struct usb_endpoint_descriptor *desc) +{ + unsigned long long

Re: Driver CH341 USB Adapter Serial Port not Works in Linux

2014-04-13 Thread Kijam López
I reported here: https://bugreports.qt-project.org/browse/QTBUG-38305 But just migrate my APP to ANSI C and is exactly the same. My code test in ANSI C: #include sys/types.h #include sys/stat.h #include fcntl.h #include termios.h #include unistd.h #include

Re: Driver CH341 USB Adapter Serial Port not Works in Linux

2014-04-13 Thread Greg KH
On Mon, Apr 14, 2014 at 12:16:40AM -0430, Kijam López wrote: I reported here: https://bugreports.qt-project.org/browse/QTBUG-38305 But just migrate my APP to ANSI C and is exactly the same. My code test in ANSI C: #include sys/types.h #include sys/stat.h #include

Re: Driver CH341 USB Adapter Serial Port not Works in Linux

2014-04-13 Thread Kijam López
All commands and responses are formatted: STX data ETX LRC (I replace No printable Char for [space]0xXX[space]) If I sent a ENQ answers his state, which is 2 bytes, so replies: 0x02 `@ 0x03 # (`@ is a two-byte mask representing the internal state of the device) If sending the S1 command, which