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 Inactive

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 usb3phy for

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_hdrc

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 ba...@ti.com 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 +---

[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 manjunath.gou...@linaro.org Cc: Greg KH g...@kroah.com Cc: Alan Stern st...@rowland.harvard.edu Cc: Eric Miao eric.y.m...@gmail.com Cc: Haojian Zhuang

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.

[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

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 oli...@neukum.org 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

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. Some

[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

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 went into 3.8

[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 ---

[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

[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.

[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 +++

[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

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

[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_ old and

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, but they

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 connected

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 Hoffstätte

[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

[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

[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 svetos...@neykov.name --- drivers/usb/chipidea/udc.c | 24

[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 svetos...@neykov.name --- 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 svetos...@neykov.name --- 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

[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

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, Matthias

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

2013-02-13 Thread Bjørn Mork
Dan Williams d...@redhat.com writes: On Wed, 2013-02-13 at 08:53 +0100, Bjørn Mork wrote: Dan Williams d...@redhat.com 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 DTR/RTS

[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 index

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. 7usb 2-2: link

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 file.

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 kuninori.morimoto...@renesas.com 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

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)) + return; +