Re: [regression] external HDD in USB3 enclosure cannot be dynamically removed (Re: Linux 3.7.5)

2013-02-13 Thread Holger Hoffstätte
On 12.02.2013 21:42, Sarah Sharp wrote: > [..] > I think I see the issue. Your host controller reports the Inactive > state after a USB disconnect. My host controllers go to the RxDetect > state on a disconnect. > > The patches that went into 3.8 and the stable kernels to better handle > the Ina

Re: [PATCH v5 0/2] Adding USB 3.0 DRD-phy support for exynos5250

2013-02-13 Thread Felipe Balbi
On Tue, Feb 12, 2013 at 10:31:00PM -0800, kg...@kernel.org wrote: > Vivek Gautam wrote: > > > > Based on 'usb-next' > > > > Changes from v4: > > - Modifying function names and driver names to follow a common > >naming convention. > > "usb2phy" for samsung-usb2phy driver > > "

Re: [PATCH v8 8/8] usb: chipidea: udc: fix the oops when plugs in usb cable after rmmod gadget

2013-02-13 Thread Felipe Balbi
Hi, On Tue, Feb 05, 2013 at 04:00:15PM +0800, Peter Chen wrote: > When we rmmod gadget, the ci->driver needs to be cleared. > Otherwise, we plug in usb cable again, the driver will > consider gadget is there, in fact, it is removed. > Below is the oops this patch fixes. > > root@freescale ~$ ci_h

Re: [PATCH v5 0/2] Adding USB 3.0 DRD-phy support for exynos5250

2013-02-13 Thread Vivek Gautam
On Wed, Feb 13, 2013 at 2:02 PM, Felipe Balbi wrote: > On Tue, Feb 12, 2013 at 10:31:00PM -0800, kg...@kernel.org wrote: >> Vivek Gautam wrote: >> > >> > Based on 'usb-next' >> > >> > Changes from v4: >> > - Modifying function names and driver names to follow a common >> >naming convention. >

[PATCH V3] USB: ehci:mv bus glue as separate module

2013-02-13 Thread Manjunath Goudar
Separate the mv On-Chip host controller driver from ehci-hcd host code into its own static driver module Manjunath Goudar (1): USB: EHCI: make ehci-mv a separate driver drivers/usb/host/Kconfig|2 +- drivers/usb/host/Makefile |1 + drivers/usb/host/ehci-hcd.c |6 +--- drivers

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

2013-02-13 Thread Manjunath Goudar
Separate the mv host controller driver from ehci-hcd host code into its own driver module. Signed-off-by: Manjunath Goudar Cc: Greg KH Cc: Alan Stern Cc: Eric Miao Cc: Haojian Zhuang Cc: Russell King Cc: linux-usb@vger.kernel.org Cc: linux-ker...@vger.kernel.org --- drivers/usb/host/Kconfig

[help] How to detect USB "use"

2013-02-13 Thread Mylene Josserand
Hi all ! I need some help about USB. My company has a self-made board that we want to use as an USB peripheral. For some reasons, we are still in kernel version 2.6.31.14 and we use a ISP1504. To use the board in a peripheral mode, we use the module "fsl_usb2_udc" and "g_file_storage". It wo

Re: [PATCH V2] usb: ehci: ehci-vt8500 bus glue as separate module

2013-02-13 Thread Arnd Bergmann
On Wednesday 13 February 2013, manjunath.gou...@linaro.org wrote: > From: Manjunath Goudar > > Separate the vt8500 On-Chip host controller driver from ehci-hcd > host code into its own static driver module Hi Manjunath, I see you are getting better with the patch submission procedure. I don't k

Re: [REGRESSION] [nailed] USB boot failure: USB: EHCI: make ehci-pci a separate driver

2013-02-13 Thread Andreas Mohr
Indeed, adding ehci_pci to /etc/initramfs-tools/modules and running update-initramfs -u -k 3.7.0-rc5+ to get /boot/initrd.img-3.7.0-rc5+ of the formerly broken -rc5+ build corrected manages to fix boot. On Wed, Feb 13, 2013 at 08:44:09AM +0100, Andreas Mohr wrote: > (is there a way to cleanl

Re: [REGRESSION] [nailed] USB boot failure: USB: EHCI: make ehci-pci a separate driver

2013-02-13 Thread Colin Guthrie
'Twas brillig, and Andreas Mohr at 13/02/13 10:05 did gyre and gimble: > Indeed, > adding > > ehci_pci > > to /etc/initramfs-tools/modules and running > > update-initramfs -u -k 3.7.0-rc5+ > > to get /boot/initrd.img-3.7.0-rc5+ > of the formerly broken -rc5+ build corrected > manages to fix boo

Re: [PATCH 2/2 v2] sierra_net: fix issues with SYNC/RESTART messages and interrupt pipe setup

2013-02-13 Thread Bjørn Mork
Dan Williams writes: > It doesn't need to run exactly at probe, but it appears to need to be > the first thing the driver does when communicating with the firmware to > ensure clear state and whatnot. Possibly like the QMI SYNC message that > clears all the client IDs and resets the internal sta

Re: [PATCH] USB: option: add Yota / Megafon M100-1 4g modem

2013-02-13 Thread Dan Williams
On Wed, 2013-02-13 at 08:53 +0100, Bjørn Mork wrote: > Dan Williams writes: > > > On Tue, 2013-02-12 at 13:42 +0100, Bjørn Mork wrote: > >> Interface layout: > >> > >> 00 CD-ROM > >> 01 debug COM port > >> 02 AP control port > >> 03 modem > >> 04 usb-ethernet > > > > Any idea what AT comman

Re: USB Ooops PL2303 when unplug while use (linux v3.7.3)

2013-02-13 Thread Johan Hovold
On Fri, Feb 01, 2013 at 10:44:25AM +0800, Chris Ruehl wrote: > I file a report for you, please have a look when you have time. Thanks for the bug report, Chris. You have come across what looks like a known issue, which since it's discovery last summer has been made worse by an unrelated change.

Re: [RFC] USB: cdc-wdm: add msgsize sysfs attribute

2013-02-13 Thread Oliver Neukum
On Saturday 09 February 2013 20:16:20 Bjørn Mork wrote: > Oliver Neukum writes: > > On Saturday 09 February 2013 18:41:52 Bjørn Mork wrote: > Well, OK..., "generic" then. In the sense that the attribute stays the > same regardless of whether the value is hardcoded in the driver (QMI), > or parse

[PATCH] USB: serial: fix null-pointer dereferences on disconnect

2013-02-13 Thread Johan Hovold
Make sure serial-driver dtr_rts is called with disc_mutex held after checking the disconnected flag. Due to a bug in the tty layer, dtr_rts may get called after a device has been disconnected and the tty-device unregistered. Some drivers have had individual checks for disconnect to make sure the d

Re: [RFC] USB: cdc-wdm: add msgsize sysfs attribute

2013-02-13 Thread Dan Williams
On Wed, 2013-02-13 at 15:27 +0100, Oliver Neukum wrote: > On Saturday 09 February 2013 20:16:20 Bjørn Mork wrote: > > Oliver Neukum writes: > > > On Saturday 09 February 2013 18:41:52 Bjørn Mork wrote: > > > Well, OK..., "generic" then. In the sense that the attribute stays the > > same regardle

Re: [PATCH] USB: serial: fix null-pointer dereferences on disconnect

2013-02-13 Thread Felipe Balbi
On Wed, Feb 13, 2013 at 03:28:51PM +0100, Johan Hovold wrote: > Make sure serial-driver dtr_rts is called with disc_mutex held after > checking the disconnected flag. > > Due to a bug in the tty layer, dtr_rts may get called after a device has why don't you fix the bug in the tty layer instead ?

Re: [PATCH] USB: serial: fix null-pointer dereferences on disconnect

2013-02-13 Thread Johan Hovold
On Wed, Feb 13, 2013 at 04:34:36PM +0200, Felipe Balbi wrote: > On Wed, Feb 13, 2013 at 03:28:51PM +0100, Johan Hovold wrote: > > Make sure serial-driver dtr_rts is called with disc_mutex held after > > checking the disconnected flag. > > > > Due to a bug in the tty layer, dtr_rts may get called a

Re: [RFC] USB: cdc-wdm: add msgsize sysfs attribute

2013-02-13 Thread Bjørn Mork
Oliver Neukum writes: > On Saturday 09 February 2013 20:16:20 Bjørn Mork wrote: >> Oliver Neukum writes: >> > On Saturday 09 February 2013 18:41:52 Bjørn Mork wrote: > >> Well, OK..., "generic" then. In the sense that the attribute stays the >> same regardless of whether the value is hardcoded i

[PATCH v2] xhci - correct comp_mode_recovery_timer on return from hibernate

2013-02-13 Thread Tony Camuso
First version was created from RHEL. This one is created from 3.8 rc7 Commit 71c731a was a workaround for systems using the SN65LVPE502CP, controller, but it introduced a bug where resume from hibernate would add the comp_mode_recovery_timer to the timer queue while it was already active when save

Re: [PATCH 2/2 v2] sierra_net: fix issues with SYNC/RESTART messages and interrupt pipe setup

2013-02-13 Thread Dan Williams
On Wed, 2013-02-13 at 12:44 +0100, Bjørn Mork wrote: > Dan Williams writes: > > > It doesn't need to run exactly at probe, but it appears to need to be > > the first thing the driver does when communicating with the firmware to > > ensure clear state and whatnot. Possibly like the QMI SYNC messa

Re: [PATCH] USB: serial: fix null-pointer dereferences on disconnect

2013-02-13 Thread Greg KH
On Wed, Feb 13, 2013 at 03:28:51PM +0100, Johan Hovold wrote: > Make sure serial-driver dtr_rts is called with disc_mutex held after > checking the disconnected flag. > > Due to a bug in the tty layer, dtr_rts may get called after a device has > been disconnected and the tty-device unregistered. S

[PATCH resend] USB: serial: fix null-pointer dereferences on disconnect

2013-02-13 Thread Johan Hovold
Make sure serial-driver dtr_rts is called with disc_mutex held after checking the disconnected flag. Due to a bug in the tty layer, dtr_rts may get called after a device has been disconnected and the tty-device unregistered. Some drivers have had individual checks for disconnect to make sure the d

Re: [regression] external HDD in USB3 enclosure cannot be dynamically removed (Re: Linux 3.7.5)

2013-02-13 Thread Matthias Schniedermeyer
On 13.02.2013 09:28, Holger Hoffstätte wrote: > On 12.02.2013 21:42, Sarah Sharp wrote: > > [..] > > I think I see the issue. Your host controller reports the Inactive > > state after a USB disconnect. My host controllers go to the RxDetect > > state on a disconnect. > > > > The patches that wen

[RFC 1/4] tty: clean up port shutdown

2013-02-13 Thread Johan Hovold
Untangle port-shutdown logic and make sure the initialised flag is always cleared for non-console ports. --- drivers/tty/tty_port.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/tty/tty_port.c b/drivers/tty/tty_port.c index b7ff59d..57a061e 100644 --- a/drive

[RFC 0/4] tty: port hangup and close issues

2013-02-13 Thread Johan Hovold
As mentioned in a previous mail there is a problem in the tty layer which affects the USB-serial drivers. In summary, a call to dtr_rts() can be made even after the device has been disconnected and the tty device unregistered. This can be worked around in usb-serial core by checking the disconnect

[RFC 4/4] tty: fix close of uninitialised ports

2013-02-13 Thread Johan Hovold
Make sure we do not make tty driver callbacks or wait for port to drain on uninitialised ports (e.g. when open failed) in tty_port_close_start(). No callbacks should be made on a port that has never been opened. Neither does it make any sense to add drain delay for an uninitialised port. Currentl

[RFC 3/4] tty: clean up port drain-delay handling

2013-02-13 Thread Johan Hovold
Move port drain-delay handling to a separate function. --- drivers/tty/tty_port.c | 29 ++--- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/drivers/tty/tty_port.c b/drivers/tty/tty_port.c index ffe3689..0a5e955 100644 --- a/drivers/tty/tty_port.c +++ b/dri

[RFC 2/4] tty: fix DTR/RTS not being dropped on hang up

2013-02-13 Thread Johan Hovold
Move HUPCL handling to port shutdown so that DTR/RTS is dropped also on hang up. Currently a hung up port will return immediately from tty_port_close_start leaving DTR/RTS unchanged. --- drivers/tty/tty_port.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --

Re: [RFC 0/4] tty: port hangup and close issues

2013-02-13 Thread Alan Cox
> [ Note that this closing of an uninitialised port seems to be a bug in > itself, which these patches aim to fix. ] You don't want to be cc'ing me on these - not my problem any more. (but you might want to fix the fact you reference port->tty without the lock or refcounts 8)) Alan -- To unsub

Re: [RFC 0/4] tty: port hangup and close issues

2013-02-13 Thread Johan Hovold
On Wed, Feb 13, 2013 at 05:36:30PM +, Alan Cox wrote: > > [ Note that this closing of an uninitialised port seems to be a bug in > > itself, which these patches aim to fix. ] > > You don't want to be cc'ing me on these - not my problem any more. > > (but you might want to fix the fact you r

[RFC v2 2/4] tty: fix DTR/RTS not being dropped on hang up

2013-02-13 Thread Johan Hovold
Move HUPCL handling to port shutdown so that DTR/RTS is dropped also on hang up. Currently a hung up port will return immediately from tty_port_close_start leaving DTR/RTS unchanged. --- v2: fix tty refcounting in shutdown drivers/tty/tty_port.c | 23 +-- 1 file changed, 13

Re: USB Ooops PL2303 when unplug while use (linux v3.7.3)

2013-02-13 Thread Peter Hurley
On Wed, 2013-02-13 at 15:25 +0100, Johan Hovold wrote: > On Fri, Feb 01, 2013 at 10:44:25AM +0800, Chris Ruehl wrote: > > I file a report for you, please have a look when you have time. > > Thanks for the bug report, Chris. > > You have come across what looks like a known issue, which since it's

Re: [help] How to detect USB "use"

2013-02-13 Thread Greg KH
On Wed, Feb 13, 2013 at 10:29:22AM +0100, Mylene Josserand wrote: > Hi all ! > > > I need some help about USB. > > My company has a self-made board that we want to use as an USB peripheral. > > For some reasons, we are still in kernel version 2.6.31.14 and we use a > ISP1504. That's a _very_

Re: [regression] external HDD in USB3 enclosure cannot be dynamically removed (Re: Linux 3.7.5)

2013-02-13 Thread Sarah Sharp
On Wed, Feb 13, 2013 at 06:16:56PM +0100, Matthias Schniedermeyer wrote: > On 13.02.2013 09:28, Holger Hoffstätte wrote: > > On 12.02.2013 21:42, Sarah Sharp wrote: > > > [..] > > > There was a further set of patches queued for 3.9 to deal with connected > > > devices going to the Inactive state, b

Re: [RFC 2/4] tty: fix DTR/RTS not being dropped on hang up

2013-02-13 Thread Peter Hurley
On Wed, 2013-02-13 at 18:27 +0100, Johan Hovold wrote: > Move HUPCL handling to port shutdown so that DTR/RTS is dropped also on > hang up. > > Currently a hung up port will return immediately from > tty_port_close_start leaving DTR/RTS unchanged. > --- > drivers/tty/tty_port.c | 22 -

Re: [regression] external HDD in USB3 enclosure cannot be dynamically removed (Re: Linux 3.7.5)

2013-02-13 Thread Matthias Schniedermeyer
On 13.02.2013 11:33, Sarah Sharp wrote: > On Wed, Feb 13, 2013 at 06:16:56PM +0100, Matthias Schniedermeyer wrote: > > On 13.02.2013 09:28, Holger Hoffstätte wrote: > > > On 12.02.2013 21:42, Sarah Sharp wrote: > > > > [..] > > > > There was a further set of patches queued for 3.9 to deal with conn

Re: [regression] external HDD in USB3 enclosure cannot be dynamically removed (Re: Linux 3.7.5)

2013-02-13 Thread Sarah Sharp
On Wed, Feb 13, 2013 at 09:04:13PM +0100, Matthias Schniedermeyer wrote: > On 13.02.2013 11:33, Sarah Sharp wrote: > > On Wed, Feb 13, 2013 at 06:16:56PM +0100, Matthias Schniedermeyer wrote: > > > On 13.02.2013 09:28, Holger Hoffstätte wrote: > > > > On 12.02.2013 21:42, Sarah Sharp wrote: > > > >

Re: [regression] external HDD in USB3 enclosure cannot be dynamically removed (Re: Linux 3.7.5)

2013-02-13 Thread Greg KH
On Wed, Feb 13, 2013 at 01:08:46PM -0800, Sarah Sharp wrote: > On Wed, Feb 13, 2013 at 09:04:13PM +0100, Matthias Schniedermeyer wrote: > > On 13.02.2013 11:33, Sarah Sharp wrote: > > > On Wed, Feb 13, 2013 at 06:16:56PM +0100, Matthias Schniedermeyer wrote: > > > > On 13.02.2013 09:28, Holger Hoff

[PATCH 0/5] Chipidea driver support for the AR933x platform

2013-02-13 Thread Svetoslav Neykov
Add support for the usb controller in AR933x platform. The processor is big-endian so all multi-byte values of the usb descriptors must be converted explicitly. Another difference is that the controller supports both host and device modes but not OTG. The patches are tested on WR703n router runnin

[PATCH 1/5] usb: chipidea: big-endian support

2013-02-13 Thread 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-endian architectures.

[PATCH 2/5] usb: chipidea: flags to force usb mode (host/device)

2013-02-13 Thread Svetoslav Neykov
The chipidea controller in the AR933x SOC supports both host and device modes but not OTG. Which USB mode is used depends on a pin state (GIPO13) during boot - HIGH for host, LOW for device mode. Currently if both host and device modes are available, the code assumes OTG support. Add flags to al

[PATCH 3/5] usb: chipidea: Don't access OTG related registers

2013-02-13 Thread Svetoslav Neykov
According to the datasheet the chipidea controller in AR933x doesn't expose OTG and TEST registers. If no OTG support is detected don't call functions which access those registers. Signed-off-by: Svetoslav Neykov --- drivers/usb/chipidea/udc.c | 24 1 file changed, 16

[PATCH 4/5] usb: chipidea: AR933x platform support for the chipidea driver

2013-02-13 Thread Svetoslav Neykov
Support host and device usb modes for the chipidea controller in AR933x. The controller doesn't support OTG functionality so the platform code forces one of the modes based on the state of GPIO13 pin at startup. Signed-off-by: Svetoslav Neykov --- arch/mips/ath79/dev-usb.c |

[PATCH 5/5] usb: chipidea: Fix incorrect check of function return value

2013-02-13 Thread Svetoslav Neykov
Use the correct variable to check for the return value of the last function. Signed-off-by: Svetoslav Neykov --- drivers/usb/chipidea/core.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index 85c72e5..8442305 100

[PATCH] net: cdc_ncm: fix probing of devices with multiple control interface altsettings

2013-02-13 Thread Bjørn Mork
commit bd329e1 ("net: cdc_ncm: do not bind to NCM compatible MBIM devices") added a test for a CDC MBIM altsetting, implementing the cdc_ncm part of MBIM backward compatibility support. This intentionally made the driver behave differently for CDC NCM devices with 2 alternate settings for the Comm

Re: [regression] external HDD in USB3 enclosure cannot be dynamically removed (Re: Linux 3.7.5)

2013-02-13 Thread Sarah Sharp
On Wed, Feb 13, 2013 at 01:31:29PM -0800, Greg KH wrote: > On Wed, Feb 13, 2013 at 01:08:46PM -0800, Sarah Sharp wrote: > > On Wed, Feb 13, 2013 at 09:04:13PM +0100, Matthias Schniedermeyer wrote: > > > On 13.02.2013 11:33, Sarah Sharp wrote: > > > > On Wed, Feb 13, 2013 at 06:16:56PM +0100, Matthi

[PATCH] USB: option: add Huawei "ACM" devices using protocol = vendor

2013-02-13 Thread Bjørn Mork
The USB device descriptor of one identity presented by a few Huawei morphing devices have serial functions with class codes 02/02/ff, indicating CDC ACM with a vendor specific protocol. This combination is often used for MSFT RNDIS functions, and the CDC ACM class driver will therefore ignore such

Re: [PATCH] USB: option: add Yota / Megafon M100-1 4g modem

2013-02-13 Thread Bjørn Mork
Dan Williams writes: > On Wed, 2013-02-13 at 08:53 +0100, Bjørn Mork wrote: >> Dan Williams writes: >> > On Tue, 2013-02-12 at 13:42 +0100, Bjørn Mork wrote: >> >> Interface layout: >> >> >> >> 00 CD-ROM >> >> 01 debug COM port >> >> 02 AP control port >> >> 03 modem >> >> 04 usb-ethernet >

Re: [RFC 2/4] tty: fix DTR/RTS not being dropped on hang up

2013-02-13 Thread Peter Hurley
On Wed, 2013-02-13 at 14:32 -0500, Peter Hurley wrote: > On Wed, 2013-02-13 at 18:27 +0100, Johan Hovold wrote: > > Move HUPCL handling to port shutdown so that DTR/RTS is dropped also on > > hang up. > > > > Currently a hung up port will return immediately from > > tty_port_close_start leaving DT

[PATCH] USB: Add EHCI and OHCI for Renesas R-Mobile SoC (r8a7740)

2013-02-13 Thread Nobuhiro Iwamatsu
The Renesas R-Mobile SoC (r8a7740) has USB EHCI and OHCI controllers. The ehci and ohci blocks share a common register and clocking infrastructure. Initialization of the host controller and clocks is common between these and is factored out into the rmobile-common.c file. Signed-off-by: Nobuhiro

Re: [RFC 3/4] tty: clean up port drain-delay handling

2013-02-13 Thread Peter Hurley
On Wed, 2013-02-13 at 18:27 +0100, Johan Hovold wrote: > Move port drain-delay handling to a separate function. > --- > drivers/tty/tty_port.c | 29 ++--- > 1 file changed, 18 insertions(+), 11 deletions(-) > > diff --git a/drivers/tty/tty_port.c b/drivers/tty/tty_port.c >

Re: Webcam stops other USB devices (ehci_hcd: HC died; cleaning up)

2013-02-13 Thread Geoff Levand
Hi Alan, On Thu, 2012-05-17 at 11:40 -0400, Alan Stern wrote: > On Thu, 17 May 2012, Geoff Levand wrote: > > > I could just do some quick tests but found that with DEBUG > > defined and your change I see these with the port errors > > continuing on indefinitely. > > > > <7>usb 2-2: link qh0-00ff

Re: [PATCH] USB: Add EHCI and OHCI for Renesas R-Mobile SoC (r8a7740)

2013-02-13 Thread Kuninori Morimoto
Hi Iwamatsu-san > The Renesas R-Mobile SoC (r8a7740) has USB EHCI and OHCI controllers. > > The ehci and ohci blocks share a common register and clocking infrastructure. > Initialization of the host controller and clocks is common between these and > is factored out into the rmobile-common.c fil

Re: [PATCH] USB: Add EHCI and OHCI for Renesas R-Mobile SoC (r8a7740)

2013-02-13 Thread Nobuhiro Iwamatsu
On Thu, Feb 14, 2013 at 10:59 AM, Kuninori Morimoto wrote: > > Hi Iwamatsu-san > >> The Renesas R-Mobile SoC (r8a7740) has USB EHCI and OHCI controllers. >> >> The ehci and ohci blocks share a common register and clocking infrastructure. >> Initialization of the host controller and clocks is commo

Re: [PATCH] USB: Add EHCI and OHCI for Renesas R-Mobile SoC (r8a7740)

2013-02-13 Thread Kuninori Morimoto
Hi > >> +void rmobile_hc_start(struct usb_hcd *hcd, struct platform_device *pdev) > > ... > >> + data = SMODE_READY_CTR | MMODE_HBUSREQ | > >> + MMODE_WR_INCR | MMODE_BYTE_BURST | MMODE_HTRANS; > >> + > >> + if (data == __raw_readl(hci->base + AHB_BUS_CTR)) > >> +