Re: question on possible deadlock with devices with multiple interfaces

2015-01-20 Thread Oliver Neukum
On Fri, 2015-01-16 at 10:33 -0500, Alan Stern wrote: Yes, that could happen. It seems unlikely but it is possible. Thanks. I am pushing out a fix. Regards Oliver -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to

Re: Control message failures kill entire XHCI stack

2015-01-20 Thread Mathias Nyman
On 19.01.2015 22:02, Devin Heitmueller wrote: Hi Mathias, Thanks for getting back to me. There are a couple of xhci bugs triggered by dvb devices: https://bugzilla.kernel.org/show_bug.cgi?id=75521 https://bugzilla.kernel.org/show_bug.cgi?id=65021 The first one (75521) I believe is

[PATCH 2/3] usb: dwc3: add ULPI interface support

2015-01-20 Thread Heikki Krogerus
Registers ULPI interface with the ULPI bus if HSPHY type is ULPI. Signed-off-by: Heikki Krogerus heikki.kroge...@linux.intel.com Cc: Felipe Balbi ba...@ti.com --- drivers/usb/dwc3/Kconfig | 7 drivers/usb/dwc3/Makefile | 4 ++ drivers/usb/dwc3/core.c | 9 +++-

Re: [PATCH 5/5] ARM: omap2plus_defconfig: Enable PCF857X and EXTCON_GPIO_USB

2015-01-20 Thread Roger Quadros
On 19/01/15 21:38, Tony Lindgren wrote: * Tony Lindgren t...@atomide.com [150119 10:52]: * Roger Quadros rog...@ti.com [150119 09:55]: Both are needed for USB cable type detection on dra7-evm. Signed-off-by: Roger Quadros rog...@ti.com --- arch/arm/configs/omap2plus_defconfig | 2 ++ 1

Re: [PATCHv3 1/2] USB: gadget: atmel_usba_udc: Fixed vbus_prev initial state

2015-01-20 Thread Nicolas Ferre
Le 20/01/2015 12:02, Sylvain Rochet a écrit : Hello, On Mon, Jan 19, 2015 at 12:55:47PM -0600, Felipe Balbi wrote: On Mon, Jan 19, 2015 at 03:09:44PM +0100, Nicolas Ferre wrote: Le 18/01/2015 18:24, Sylvain Rochet a écrit : If vbus gpio is high at init, we should set vbus_prev to true

[PATCH 01/11] hso: remove useless header file timer.h

2015-01-20 Thread Olivier Sobrie
No timer related function is used in this driver. Signed-off-by: Olivier Sobrie oliv...@sobrie.be --- drivers/net/usb/hso.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index babda7d..cb0bcc1 100644 --- a/drivers/net/usb/hso.c +++

[PATCH 04/11] hso: fix memory leak in hso_create_rfkill()

2015-01-20 Thread Olivier Sobrie
When the rfkill interface was created, a buffer containing the name of the rfkill node was allocated. This buffer was never freed when the device disappears. To fix the problem, we put the name given to rfkill_alloc() in the hso_net structure. Signed-off-by: Olivier Sobrie oliv...@sobrie.be ---

[PATCH 03/11] hso: fix memory leak when device disconnects

2015-01-20 Thread Olivier Sobrie
In the disconnect path, tx_buffer should freed like tx_data to avoid a memory leak when the device disconnects. Signed-off-by: Olivier Sobrie oliv...@sobrie.be --- drivers/net/usb/hso.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index

[PATCH 05/11] hso: fix small indentation error

2015-01-20 Thread Olivier Sobrie
Simply remove the useless extra tab. Signed-off-by: Olivier Sobrie oliv...@sobrie.be --- drivers/net/usb/hso.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index a49ac2e..2f2343d 100644 --- a/drivers/net/usb/hso.c +++

[PATCH 10/11] hso: add missing cancel_work_sync in disconnect()

2015-01-20 Thread Olivier Sobrie
For hso serial devices, two cancel_work_sync were missing in the disconnect method. Signed-off-by: Olivier Sobrie oliv...@sobrie.be --- drivers/net/usb/hso.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index c916ab5..c14fc80 100644 ---

[PATCH 02/11] hso: fix crash when device disappears while serial port is open

2015-01-20 Thread Olivier Sobrie
When the device disappear, the function hso_disconnect() is called to perform cleanup. In the cleanup function, hso_free_interface() calls tty_port_tty_hangup() in view of scheduling a work to hang up the tty if needed. If the port was not open then hso_serial_ref_free() is called directly to

Re: [PATCHv3 1/2] USB: gadget: atmel_usba_udc: Fixed vbus_prev initial state

2015-01-20 Thread Sylvain Rochet
Hello, On Mon, Jan 19, 2015 at 12:55:47PM -0600, Felipe Balbi wrote: On Mon, Jan 19, 2015 at 03:09:44PM +0100, Nicolas Ferre wrote: Le 18/01/2015 18:24, Sylvain Rochet a écrit : If vbus gpio is high at init, we should set vbus_prev to true accordingly to the current vbus state. Without

[PATCH 09/11] hso: update serial_table in usb disconnect method

2015-01-20 Thread Olivier Sobrie
The serial_table is used to map the minor number of the usb serial device to its associated context. The table is updated in the probe method and in hso_serial_ref_free() which is called either from the tty cleanup method or from the usb disconnect method. This patch ensures that the serial_table

[PATCH 11/11] usb: core: fix a race with usb_queue_reset_device()

2015-01-20 Thread Olivier Sobrie
When usb_queue_reset() is called it schedules a work in view of resetting the usb interface. When the reset work is running, it can be scheduled again (e.g. by the usb disconnect method of the driver). Consider that the reset work is queued again while the reset work is running and that this work

[PATCH 08/11] hso: move tty_unregister outside hso_serial_common_free()

2015-01-20 Thread Olivier Sobrie
The function hso_serial_common_free() is called either by the cleanup method of the tty or by the usb disconnect method. In the former case, the usb_disconnect() has been already called and the sysfs group associated to the device has been removed. By calling tty_unregister directly from the

[PATCH 07/11] hso: replace reset_device work by usb_queue_reset_device()

2015-01-20 Thread Olivier Sobrie
There is no need for a dedicated reset work in the hso driver since there is already a reset work foreseen in usb_interface that does the same. Signed-off-by: Olivier Sobrie oliv...@sobrie.be --- drivers/net/usb/hso.c | 25 + 1 file changed, 1 insertion(+), 24

Re: [PATCHv6 0/6] USB: host: Atmel OHCI and EHCI drivers improvements

2015-01-20 Thread Nicolas Ferre
Le 19/01/2015 12:06, Sylvain Rochet a écrit : USB: host: Atmel OHCI and EHCI drivers improvements Suspend/resume support for EHCI. struct dev_pm_ops for OHCI. Removed global variables from both. Fixed OHCI wake up support for STANDBY(wake-up enabled) and MEM(wake-up disabled) sleep

Re: [PATCHv6 0/6] USB: host: Atmel OHCI and EHCI drivers improvements

2015-01-20 Thread Boris Brezillon
On Mon, 19 Jan 2015 12:06:01 +0100 Sylvain Rochet sylvain.roc...@finsecur.com wrote: USB: host: Atmel OHCI and EHCI drivers improvements Suspend/resume support for EHCI. struct dev_pm_ops for OHCI. Removed global variables from both. Fixed OHCI wake up support for STANDBY(wake-up enabled)

Re: [PATCH v2 0/4] toshiba_acpi: Add support for USB Sleep functions

2015-01-20 Thread Oliver Neukum
On Sun, 2015-01-18 at 18:30 -0700, Azael Avalos wrote: The following patches add support to several USB Sleep functions found on newer Toshiba laptops, allowing to use the USB ports while the laptop is asleep or turned off. Hi, this is most interesting. But the interface is terrible. If

[PATCH 06/11] hso: rename hso_dev into serial in hso_free_interface()

2015-01-20 Thread Olivier Sobrie
In other functions of the driver, variables of type struct hso_serial are denoted by serial and variables of type struct hso_device are denoted by hso_dev. This patch makes the hso_free_interface() consistent with these notations. Signed-off-by: Olivier Sobrie oliv...@sobrie.be ---

Re: [PATCH v3 2/2] mfd: dln2: add suspend/resume functionality

2015-01-20 Thread Lee Jones
On Mon, 19 Jan 2015, Octavian Purdila wrote: Without suspend/resume functionality in the USB driver the USB core will disconnect and reconnect the DLN2 port and because the GPIO framework does not yet support removal of an in-use controller a suspend/resume operation will result in a crash.

Re: [PATCH v3 1/2] mfd: dln2: add start/stop RX URBs helpers

2015-01-20 Thread Lee Jones
On Mon, 19 Jan 2015, Octavian Purdila wrote: This is in preparation for adding suspend / resume support. Signed-off-by: Octavian Purdila octavian.purd...@intel.com Reviewed-by: Johan Hovold jo...@kernel.org --- drivers/mfd/dln2.c | 51 +--

[PATCH 00/11] hso: fix some problems with reset/disconnect path

2015-01-20 Thread Olivier Sobrie
These patches attempt to fix some problems I observed when the hso device is disconnected or when a usb reset is queued by the hso driver Several patches of this serie are fixing crashes or memleaks in hso. The last patch of this serie fix a race condition occurring when multiple usb resets are

Re: [PATCHv2 3/4] usb: gadget: uvc: use explicit type instead of void *

2015-01-20 Thread Laurent Pinchart
Hi Andrzej, On Tuesday 20 January 2015 08:56:47 Andrzej Pietrasiewicz wrote: W dniu 19.01.2015 o 22:30, Laurent Pinchart pisze: On Monday 19 January 2015 23:27:28 Laurent Pinchart wrote: On Monday 19 January 2015 13:52:57 Andrzej Pietrasiewicz wrote: The first parameter of

Maximum bitrate for CDC ECM

2015-01-20 Thread Paul Jones
I am trying to use g_ether with a USB 3 gadget (PLX 3380). During testing I noticed that the transfer speed is much lower than expected at 42MB/s vs a 95Mb/s for a gigabit connection between the same machines. The same gadget is capable of transferring 170MB/s via USB 3 when reading from a

[PATCHv7 6/6] USB: host: ohci-at91: Fix wake-up support

2015-01-20 Thread Sylvain Rochet
This device needs to be continuously clocked to provide wake up support, previously, if STANDBY target were chosen the device were enable_irq_wake()-prepared and clock still active and if MEM target were chosen the device were also enable_irq_wake()-prepared but not clocked anymore, which is

[PATCHv7 4/6] USB: host: ohci-at91: Move global variables to private struct

2015-01-20 Thread Sylvain Rochet
This patch move AT91 OHCI global variables (clocks ptr and clocked boolean) to private struct ohci_at91_priv, stored in ohci-priv. Signed-off-by: Sylvain Rochet sylvain.roc...@finsecur.com Acked-by: Boris Brezillon boris.brezil...@free-electrons.com Acked-by: Alan Stern st...@rowland.harvard.edu

[PATCHv7 0/6] USB: host: Atmel OHCI and EHCI drivers improvements

2015-01-20 Thread Sylvain Rochet
USB: host: Atmel OHCI and EHCI drivers improvements Suspend/resume support for EHCI. struct dev_pm_ops for OHCI. Removed global variables from both. Fixed OHCI wake up support for STANDBY(wake-up enabled) and MEM(wake-up disabled) sleep targets. Changes since v6: * Collected Acked-by tags

[PATCHv7 1/6] USB: host: ehci-atmel: Add suspend/resume support

2015-01-20 Thread Sylvain Rochet
This patch add suspend/resume support for Atmel EHCI, mostly about disabling and unpreparing clocks so USB PLL is stopped before entering sleep state. Signed-off-by: Sylvain Rochet sylvain.roc...@finsecur.com Acked-by: Boris Brezillon boris.brezil...@free-electrons.com Acked-by: Alan Stern

[PATCHv7 5/6] USB: host: ohci-at91: usb_hcd_at91_probe(), remove useless stack initialisation

2015-01-20 Thread Sylvain Rochet
struct usb_hcd *hcd = NULL; ... hcd = usb_create_hcd(driver, dev, at91); This patch remove *hcd useless initialisation Signed-off-by: Sylvain Rochet sylvain.roc...@finsecur.com Acked-by: Boris Brezillon boris.brezil...@free-electrons.com Acked-by: Alan Stern st...@rowland.harvard.edu Acked-by:

[PATCHv7 2/6] USB: host: ohci-at91: Use struct dev_pm_ops instead of struct platform_driver

2015-01-20 Thread Sylvain Rochet
This patch replace struct platform_driver.{resume,suspend} PM bindings to a new struct dev_pm_ops. Signed-off-by: Sylvain Rochet sylvain.roc...@finsecur.com Acked-by: Boris Brezillon boris.brezil...@free-electrons.com Acked-by: Alan Stern st...@rowland.harvard.edu Acked-by: Nicolas Ferre

[PATCHv7 3/6] USB: host: ehci-atmel: Move global variables to private struct

2015-01-20 Thread Sylvain Rochet
This patch move Atmel EHCI global variables (clocks ptr and clocked boolean) to private struct atmel_ehci_priv, stored in ehci-priv. Signed-off-by: Sylvain Rochet sylvain.roc...@finsecur.com Acked-by: Boris Brezillon boris.brezil...@free-electrons.com Acked-by: Alan Stern

Re: [PATCH 11/11] usb: core: fix a race with usb_queue_reset_device()

2015-01-20 Thread Oliver Neukum
On Tue, 2015-01-20 at 13:29 +0100, Olivier Sobrie wrote: When usb_queue_reset() is called it schedules a work in view of resetting the usb interface. When the reset work is running, it can be scheduled again (e.g. by the usb disconnect method of the driver). Consider that the reset work is

Re: [PATCH 001/001] usbhid: Fix initialisation and force effect modifications for the Microsoft Sidewinder Force Feedback Pro 2 joystick

2015-01-20 Thread Benjamin Tissoires
Hi, Jim, in addition to what Alan said, here are some comments that I would like to be fixed in the v2. On Sun, Jan 18, 2015 at 11:07 AM, Jim Keir jimk...@oracledbadirect.com wrote: From: Jim Keir jimk...@yahoo.co.uk Signed-off-by: Jim Keir jimk...@yahoo.co.uk The Signed-off-by line is

Re: [PATCH 11/11] usb: core: fix a race with usb_queue_reset_device()

2015-01-20 Thread Olivier Sobrie
Hi Oliver, On Tue, Jan 20, 2015 at 02:48:37PM +0100, Oliver Neukum wrote: On Tue, 2015-01-20 at 13:29 +0100, Olivier Sobrie wrote: When usb_queue_reset() is called it schedules a work in view of resetting the usb interface. When the reset work is running, it can be scheduled again (e.g. by

Re: [PATCH 04/11] hso: fix memory leak in hso_create_rfkill()

2015-01-20 Thread Olivier Sobrie
On Tue, Jan 20, 2015 at 02:13:17PM +0100, Oliver Neukum wrote: On Tue, 2015-01-20 at 13:29 +0100, Olivier Sobrie wrote: When the rfkill interface was created, a buffer containing the name of the rfkill node was allocated. This buffer was never freed when the device disappears. To fix

Re: XHCI, brain-dead scanner, and microframe rounding

2015-01-20 Thread Hans-Peter Jansen
Mathias Nyman mathias.nyman@... writes: Many changes were done in 3.18 and 3.19-rc release regarding to how we handle halted and stopped endpoints, Can you test if that fixes your issues? preferably with a 3.19-rc kernel Here's the result of 3.19-rc4: 2015-01-20T15:26:41.242455+01:00 xrated

Re: XHCI, brain-dead scanner, and microframe rounding

2015-01-20 Thread steve
Mathias Nyman mathias.nyman@... writes: Many changes were done in 3.18 and 3.19-rc release regarding to how we handle halted and stopped endpoints, Can you test if that fixes your issues? preferably with a 3.19-rc kernel Here's the result of 3.19-rc4: 2015-01-20T15:26:41.242455+01:00 xrated

Re: XHCI, senseless logging

2015-01-20 Thread Hans-Peter Jansen
Mathias Nyman mathias.nyman@... writes: Many changes were done in 3.18 and 3.19-rc release regarding to how we handle halted and stopped endpoints, Can you test if that fixes your issues? preferably with a 3.19-rc kernel BTW: something regressed between 3.16.7 and 3.18.2 My logs get

Re: [PATCH v4 00/11] scsi: fix module reference mismatch for scsi host

2015-01-20 Thread Akinobu Mita
2015-01-19 23:22 GMT+09:00 Tejun Heo t...@kernel.org: On Mon, Jan 19, 2015 at 12:05:58AM +0900, Akinobu Mita wrote: While accessing a scsi_device, the use count of the underlying LLDD module is incremented. The module reference is retrieved through .module field of struct scsi_host_template.

Re: [PATCH 04/11] hso: fix memory leak in hso_create_rfkill()

2015-01-20 Thread Oliver Neukum
On Tue, 2015-01-20 at 13:29 +0100, Olivier Sobrie wrote: When the rfkill interface was created, a buffer containing the name of the rfkill node was allocated. This buffer was never freed when the device disappears. To fix the problem, we put the name given to rfkill_alloc() in the hso_net

[PATCH] usb: hid: Do not bind to Microchip Pick16F1454

2015-01-20 Thread Kristian Evensen
The Microchip Pick16F1454 is exported as a HID device and is used by for example the Yepkit YKUSH three-port switchable USB hub. However, it is not an actual HID-device. On the Yepkit, it is used to power up/down the ports on the hub. The HID driver should ignore this device. Signed-off-by:

Re: Suspected (out of tree) HCI issue

2015-01-20 Thread Alan Stern
On Sun, 18 Jan 2015, Vincent Pelletier wrote: Hello, (please keep me cc'ed, I'm not subscribed) On Thu, 27 Nov 2014 13:00:28 -0500 (EST), Alan Stern st...@rowland.harvard.edu wrote: If your hardware resembles, say, the DWC2 hardware then maybe the DWC2 driver (drivers/usb/dwc2/) can

Re: [PATCH 2/3] usb: dwc3: add ULPI interface support

2015-01-20 Thread Felipe Balbi
Hi, On Tue, Jan 20, 2015 at 11:18:21AM +0200, Heikki Krogerus wrote: Registers ULPI interface with the ULPI bus if HSPHY type is ULPI. Signed-off-by: Heikki Krogerus heikki.kroge...@linux.intel.com Cc: Felipe Balbi ba...@ti.com you're doing quite a bit in a single patch... ---

Re: [PATCH 11/11] usb: core: fix a race with usb_queue_reset_device()

2015-01-20 Thread Alan Stern
On Tue, 20 Jan 2015, Olivier Sobrie wrote: When usb_queue_reset() is called it schedules a work in view of resetting the usb interface. When the reset work is running, it can be scheduled again (e.g. by the usb disconnect method of the driver). Consider that the reset work is queued again

Re: [PATCH v4 00/11] scsi: fix module reference mismatch for scsi host

2015-01-20 Thread Tejun Heo
Hello, Akinobu. On Tue, Jan 20, 2015 at 11:57:37PM +0900, Akinobu Mita wrote: The reason I didn't move sht from the core driver to the LLDDs for fixing ufs and ums-* in the first place is to avoid exporting many symbols for callbacks in sht. But I realized that we can do it without that many

Re: ohci: sporadic crash/lockup in ohci-hcd io_watchdog_func()

2015-01-20 Thread Alan Stern
On Mon, 19 Jan 2015, Heiko Przybyl wrote: On Monday 19 January 2015 11:17:59 Alan Stern wrote: On Mon, 19 Jan 2015, Heiko Przybyl wrote: It seems to be related to keyboard input (at least it happens when using the keyboard), without relation to system load. Can happen within a day

Re: [PATCH 11/11] usb: core: fix a race with usb_queue_reset_device()

2015-01-20 Thread Olivier Sobrie
On Tue, Jan 20, 2015 at 10:26:30AM -0500, Alan Stern wrote: On Tue, 20 Jan 2015, Olivier Sobrie wrote: When usb_queue_reset() is called it schedules a work in view of resetting the usb interface. When the reset work is running, it can be scheduled again (e.g. by the usb disconnect method

Re: USB autosuspend causing trouble with bluetooth

2015-01-20 Thread Oliver Neukum
On Tue, 2015-01-20 at 18:58 +0400, Kirill Elagin wrote: On Tue, Jan 20, 2015 at 5:06 PM, Oliver Neukum oneu...@suse.de wrote: On Tue, 2015-01-20 at 16:18 +0400, Kirill Elagin wrote: I use a Logitech wireless keyboard (with a Unifying receiver) and it keeps working fine even with `auto`.

Re: [PATCH 04/11] hso: fix memory leak in hso_create_rfkill()

2015-01-20 Thread Dan Williams
On Tue, 2015-01-20 at 14:13 +0100, Oliver Neukum wrote: On Tue, 2015-01-20 at 13:29 +0100, Olivier Sobrie wrote: When the rfkill interface was created, a buffer containing the name of the rfkill node was allocated. This buffer was never freed when the device disappears. To fix the

Re: [PATCH 1/5] extcon: gpio-usb: Introduce gpio usb extcon driver

2015-01-20 Thread Felipe Balbi
On Mon, Jan 19, 2015 at 07:52:18PM +0200, Roger Quadros wrote: This driver observes the USB ID pin connected over a GPIO and updates the USB cable extcon states accordingly. The existing GPIO extcon driver is not suitable for this purpose as it needs to be taught to understand USB cable

Re: [PATCH 4/5] ARM: dts: dra72-evm: Add extcon nodes for USB

2015-01-20 Thread Felipe Balbi
On Mon, Jan 19, 2015 at 07:52:21PM +0200, Roger Quadros wrote: On this EVM, the USB cable state has to be determined via the ID pin tied to a GPIO line. We use the gpio-usb-extcon driver to read the ID pin and the extcon framework to forward the USB cable state information to the USB driver so

Re: [PATCH 2/5] usb: extcon: Fix USB-Host cable name

2015-01-20 Thread Felipe Balbi
On Mon, Jan 19, 2015 at 07:52:19PM +0200, Roger Quadros wrote: The recommended name for USB-Host cable state is USB-Host and not USB-HOST as per drivers/extcon/extcon-class.c extcon_cable_name. Change all instances of USB-HOST to USB-Host. Signed-off-by: Roger Quadros rog...@ti.com I

Re: [PATCH v4 00/11] scsi: fix module reference mismatch for scsi host

2015-01-20 Thread Alan Stern
On Tue, 20 Jan 2015, Akinobu Mita wrote: 2015-01-19 23:22 GMT+09:00 Tejun Heo t...@kernel.org: On Mon, Jan 19, 2015 at 12:05:58AM +0900, Akinobu Mita wrote: While accessing a scsi_device, the use count of the underlying LLDD module is incremented. The module reference is retrieved through

Re: [PATCH 3/4] mfd: dln2: add support for ACPI

2015-01-20 Thread Lee Jones
I need an ACPI Ack on this. This patch adds support to load a custom ACPI table that describes devices connected via the DLN2 USB to I2C/SPI/GPIO bridge. The ACPI table can be loaded either externally (from QEMU or with CONFIG_ACPI_CUSTOM_DSDT) or it can be loaded as firmware file with the

Re: [PATCH 3/3] phy: ulpi: add driver for TI TUSB1210

2015-01-20 Thread Felipe Balbi
Hi, On Tue, Jan 20, 2015 at 11:18:22AM +0200, Heikki Krogerus wrote: TUSB1210 ULPI PHY has vendor specific register for eye diagram tuning. On some platforms the system firmware has set optimized value to it. In order to not loose the optimized value, the driver stores it during probe and

Re: [PATCH 3/5] ARM: dts: dra7-evm: Add extcon nodes for USB

2015-01-20 Thread Felipe Balbi
On Mon, Jan 19, 2015 at 07:52:20PM +0200, Roger Quadros wrote: On this EVM, the USB cable state has to be determined via the ID pin tied to a GPIO line. We use the gpio-usb-extcon driver to read the ID pin and the extcon framework to forward the USB cable state information to the USB driver so

Re: [PATCH 0/5] extcon: usb: Introduce USB GPIO extcon driver. Fix DRA7 USB.

2015-01-20 Thread Felipe Balbi
On Mon, Jan 19, 2015 at 07:52:17PM +0200, Roger Quadros wrote: Hi, On DRA7 EVMs the USB ID pin is connected to a GPIO line. The USB drivers (dwc3 + dwc3-omap) depend on extcon framework to get the USB cable state (USB or USB-Host) to put the controller in the right mode. There were

Re: ohci: sporadic crash/lockup in ohci-hcd io_watchdog_func()

2015-01-20 Thread Heiko Przybyl
On Tuesday 20 January 2015 10:49:29 Alan Stern wrote: On Mon, 19 Jan 2015, Heiko Przybyl wrote: On Monday 19 January 2015 11:17:59 Alan Stern wrote: That's easy enough to test. All you have to do is change the spin_lock/unlock statements to their irq_save/restore variants. Well,

Re: [PATCH v3 00/20] Add UDC support to the isp1760 driver

2015-01-20 Thread Felipe Balbi
On Tue, Jan 20, 2015 at 09:29:04PM +0200, Laurent Pinchart wrote: Hi Felipe, On Friday 09 January 2015 11:34:25 Felipe Balbi wrote: On Fri, Jan 09, 2015 at 11:30:31AM -0600, Felipe Balbi wrote: This patch set adds UDC support to the isp1760 driver, to be used with the ISP1761 dual-role

[PATCH v4 02/26] usb: isp1760: Remove isp1760 glue structure

2015-01-20 Thread Laurent Pinchart
The structure is allocated for the sole purpose of holding a pointer to the HCD and being stored in platform device driver data. Store the HCD pointer directly instead. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Signed-off-by: Felipe Balbi ba...@ti.com ---

[PATCH v4 05/26] usb: isp1760: Merge platform and OF glue codes

2015-01-20 Thread Laurent Pinchart
Both handle platform devices, merge them. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- drivers/usb/host/isp1760-if.c | 190 -- 1 file changed, 55 insertions(+), 135 deletions(-) diff --git a/drivers/usb/host/isp1760-if.c

[PATCH v4 01/26] usb: isp1760: Use the gpio descriptor API

2015-01-20 Thread Laurent Pinchart
Switching to the managed gpio descriptor API simplifies both error and cleanup code paths (by removing the need to free the gpio) and runtime code (by removing manual handling of the active low flag). It also permits handling the reset gpio entirely from within the HCD code, sharing it between the

[PATCH v4 00/26] Add UDC support to the isp1760 driver

2015-01-20 Thread Laurent Pinchart
Hello, This patch set adds UDC support to the isp1760 driver, to be used with the ISP1761 dual-role USB controller. The first 21 patches rework the isp1760 driver to prepare it for UDC support. In particular they removes the direct HCD dependencies from the glue code (01/26 to 08/26), creates

[PATCHv4 0/3] USB: gadget: atmel_usba_udc: Start clocks on rising edge of the Vbus signal, stop clocks on falling edge of the Vbus signal

2015-01-20 Thread Sylvain Rochet
If USB PLL is not necessary for other USB drivers (e.g. OHCI and EHCI) reduce power consumption by switching off the USB PLL if no USB Host is currently connected to this USB Device. Changes since v3: * Added stable tag for the first patch * As suggested, removed the unused check for

[PATCHv4 2/3] USB: gadget: atmel_usba_udc: Enable Vbus signal IRQ in UDC start instead of UDC probe

2015-01-20 Thread Sylvain Rochet
Vbus IRQ handler needs a started UDC driver to work because it uses udc-driver, which is set by the UDC start handler. The previous way chosen was to return from interrupt if udc-driver is NULL using a spinlock. This patch now request the Vbus signal IRQ in UDC start instead of UDC probe and

[PATCHv4 3/3] USB: gadget: atmel_usba_udc: Start clocks on rising edge of the Vbus signal, stop clocks on falling edge of the Vbus signal

2015-01-20 Thread Sylvain Rochet
If USB PLL is not necessary for other USB drivers (e.g. OHCI and EHCI) it will reduce power consumption by switching off the USB PLL if no USB Host is currently connected to this USB Device. We are using Vbus GPIO signal to detect Host presence. If Vbus signal is not available then the device

[PATCHv4 1/3] USB: gadget: atmel_usba_udc: Fixed vbus_prev initial state

2015-01-20 Thread Sylvain Rochet
If vbus gpio is high at init, we should set vbus_prev to true accordingly to the current vbus state. Without that, we skip the first vbus interrupt because the saved vbus state is not consistent. Signed-off-by: Sylvain Rochet sylvain.roc...@finsecur.com Acked-by: Nicolas Ferre

[PATCH v4 16/26] usb: isp1760: Prefix driver data structures with isp1760_

2015-01-20 Thread Laurent Pinchart
The slotinfo and memory_chunk structures are specific to the driver and defined in a header file. Prefix them with isp1760_ to avoid namespace clashes. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Reviewed-by: Felipe Balbi ba...@ti.com --- drivers/usb/host/isp1760-hcd.c | 15

[PATCH v4 11/26] usb: isp1760: Remove busname argument to isp1760_register

2015-01-20 Thread Laurent Pinchart
The argument is unused, remove it. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Reviewed-by: Felipe Balbi ba...@ti.com --- drivers/usb/host/isp1760-hcd.c | 2 +- drivers/usb/host/isp1760-hcd.h | 2 +- drivers/usb/host/isp1760-if.c | 6 ++ 3 files changed, 4

[PATCH v4 17/26] usb: isp1760: Reorganize header files

2015-01-20 Thread Laurent Pinchart
The isp1760-rhcd.h header contains PTD constants and structures only useful for the HCD implementation. It also contains register definitions that will be needed by common code when implementing support for the ISP1761 device controller, but doesn't contain the isp1760_hcd structure definition

[PATCH v4 22/26] usb: isp1760: Add device controller support

2015-01-20 Thread Laurent Pinchart
The ISP1761 is a dual-mode host and device controller backward compatible on the host side with the ISP1760. Add support for the device controller. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- Changes since v2: - Update .udc_stop API Changes since v1: - Reject

[PATCH v4 19/26] usb: isp1760: Set IRQF_SHARED flag in core code

2015-01-20 Thread Laurent Pinchart
The IRQF_SHARED flag needs to be set regardless of the bus type. Don't require glue code to set it manually. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Reviewed-by: Felipe Balbi ba...@ti.com --- drivers/usb/host/isp1760-core.c | 4 ++-- drivers/usb/host/isp1760-if.c | 9

[PATCH v4 15/26] usb: isp1760: Decouple usb_hdc and isp1760_priv

2015-01-20 Thread Laurent Pinchart
Allocate the driver private data structure manually instead of using the usb_hcd private space. This will allow skipping hcd registration for the isp1761 when used in device mode only. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Reviewed-by: Felipe Balbi ba...@ti.com ---

[PATCH v4 13/26] usb: isp1760: Use the managed devm_ioremap_resource() API

2015-01-20 Thread Laurent Pinchart
This simplifies error and remove code paths. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- drivers/usb/host/isp1760-hcd.c | 20 +++- drivers/usb/host/isp1760-if.c | 37 + 2 files changed, 16 insertions(+), 41

[PATCH v4 25/26] usb: isp1760: Remove duplicate usb_disabled() check

2015-01-20 Thread Laurent Pinchart
Both isp1760_register() and isp1761_pci_probe() check whether USB is disabled by calling usb_disabled(), and bail out with an error if it is. One check is enough, remove the PCI-specific check. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- drivers/usb/isp1760/isp1760-if.c

[PATCH v4 07/26] usb: isp1760: Manage device driver data in common code

2015-01-20 Thread Laurent Pinchart
Don't duplicate *_set_drvdata calls in glue code. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Reviewed-by: Felipe Balbi ba...@ti.com --- drivers/usb/host/isp1760-hcd.c | 2 ++ drivers/usb/host/isp1760-if.c | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff

[PATCH v4 08/26] usb: isp1760: Don't expose hcd to glue code from isp1760_register

2015-01-20 Thread Laurent Pinchart
The glue code probe functions don't need to access the hcd structure anymore. Modify isp1760_register to return an integer error code instead of the hcd pointer. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Reviewed-by: Felipe Balbi ba...@ti.com ---

[PATCH v4 24/26] usb: isp1760: Make HCD support optional

2015-01-20 Thread Laurent Pinchart
Enable compilation of the isp1760 driver in pure host mode, pure device mode, or dual-role mode. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- drivers/usb/isp1760/Kconfig | 47 ++- drivers/usb/isp1760/Makefile | 3 ++-

[PATCH v4 09/26] usb: isp1760: Fix indentation in probe error path

2015-01-20 Thread Laurent Pinchart
Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Reviewed-by: Felipe Balbi ba...@ti.com --- drivers/usb/host/isp1760-hcd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/isp1760-hcd.c b/drivers/usb/host/isp1760-hcd.c index

[PATCH v4 20/26] usb: isp1760: Initialize the bus interface in core code

2015-01-20 Thread Laurent Pinchart
Although the corresponding register is part of the HCD register space, processor bus initialization is not specific to the HCD. To prepare for device controller support, move bus interface initialization to core code. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Reviewed-by:

[PATCH v4 21/26] usb: isp1760: Move PORT1 configuration to core code

2015-01-20 Thread Laurent Pinchart
Configuring the mode of operation of port 1 doesn't belong to the HCD code, as it's related to the soon to come UDC support. Move the configuration to core code. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- drivers/usb/host/isp1760-core.c | 8

[PATCH v4 03/26] usb: isp1760: Retrieve pdev memory resource from hcd at remove time

2015-01-20 Thread Laurent Pinchart
The platform driver remove function needs to release the memory resource requested at probe time. Instead of retrieving the resource from the platform device, retrieve it from the usb_hcd. This mimics the behaviour of the PCI and OF glues, and will make it easier to share code between all three

[PATCH v4 18/26] usb: isp1760: Move core code to isp1760-core.c

2015-01-20 Thread Laurent Pinchart
Move core device initialization to a central location in order to share it with the device mode implementation. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- drivers/usb/host/Makefile | 2 +- drivers/usb/host/isp1760-core.c | 65

[PATCH v4 06/26] usb: isp1760: Move removal cleanup code to isp1760-hcd.c

2015-01-20 Thread Laurent Pinchart
The removal cleanup code is duplicated between the different bus glues. Move it to a central location. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- Changes since v1: - Call release_mem_region() after iounmap() --- drivers/usb/host/isp1760-hcd.c | 10 ++

[PATCH v4 14/26] usb: isp1760: Refactor PCI initialization code

2015-01-20 Thread Laurent Pinchart
Move the initialization code out of the PCI probe function to a new function in order to simplify and fix error handling. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- drivers/usb/host/isp1760-if.c | 134 ++ 1 file changed, 69

[PATCH v4 26/26] usb: isp1760: Fix USB disabled check

2015-01-20 Thread Laurent Pinchart
The isp1760 driver registration function returns an error if USB is disabled. This made sense when the driver only supported host controllers, but now that it supports peripheral controllers host support isn't mandatory anymore. Fix this by returning an error only when both the HCD and UDC

[PATCH v4 04/26] usb: isp1760: Unmap I/O registers at platform device removal

2015-01-20 Thread Laurent Pinchart
The I/O registers are mapped in the HCD code but must be unmapped by glue code. The OF and PCI glue code unmap them correctly but the platform glue code is missing an iounmap() call. Fix it. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Signed-off-by: Felipe Balbi ba...@ti.com

[PATCH v4 12/26] usb: isp1760: Pass resource pointer to isp1760_register

2015-01-20 Thread Laurent Pinchart
The function takes quite a few arguments, passing the resource pointer instead of the start address and length simplifies it a bit. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Reviewed-by: Felipe Balbi ba...@ti.com --- drivers/usb/host/isp1760-hcd.c | 11 +--

[PATCH v4 10/26] usb: isp1760: Prefix init_kmem_once and deinit_kmem_cache with isp1760_

2015-01-20 Thread Laurent Pinchart
The two functions are specific to the driver but have very generic names, subject to collisions. Rename them. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Reviewed-by: Felipe Balbi ba...@ti.com --- drivers/usb/host/isp1760-hcd.c | 4 ++-- drivers/usb/host/isp1760-hcd.h | 4

Re: [PATCH 1/5] extcon: gpio-usb: Introduce gpio usb extcon driver

2015-01-20 Thread Chanwoo Choi
Hi Roger, On 01/20/2015 02:52 AM, Roger Quadros wrote: This driver observes the USB ID pin connected over a GPIO and updates the USB cable extcon states accordingly. The existing GPIO extcon driver is not suitable for this purpose as it needs to be taught to understand USB cable states and

Re: USB autosuspend causing trouble with bluetooth

2015-01-20 Thread Oliver Neukum
On Tue, 2015-01-20 at 23:25 +0400, Kirill Elagin wrote: Hm, I'm pretty sure I never touched anything with `port` in its name, all the ports are set to `auto` (that's what laptop-mode-tools does). Here we go. Right now I think I see three possibly unrelated issues: Issue #1. BT trackpad

Re: [PATCH v2 0/3] ARM: mvebu: Enable XHCI on the Armada 385 AP

2015-01-20 Thread Maxime Ripard
Hi Andrew, On Mon, Jan 19, 2015 at 10:35:07PM +0100, Andrew Lunn wrote: On Mon, Jan 19, 2015 at 02:01:11PM +0100, Maxime Ripard wrote: Hi all, This serie enables the Armada 385 AP XHCI controller. Since the controller uses a GPIO-controlled VBUS, we used the phy-generic driver, and

Re: [PATCH v2 0/3] ARM: mvebu: Enable XHCI on the Armada 385 AP

2015-01-20 Thread Andrew Lunn
On Tue, Jan 20, 2015 at 09:30:28PM +0100, Maxime Ripard wrote: Hi Andrew, On Mon, Jan 19, 2015 at 10:35:07PM +0100, Andrew Lunn wrote: On Mon, Jan 19, 2015 at 02:01:11PM +0100, Maxime Ripard wrote: Hi all, This serie enables the Armada 385 AP XHCI controller. Since the

Re: USB autosuspend causing trouble with bluetooth

2015-01-20 Thread Kirill Elagin
On Tue, Jan 20, 2015 at 8:41 PM, Oliver Neukum oneu...@suse.de wrote: On Tue, 2015-01-20 at 18:58 +0400, Kirill Elagin wrote: On Tue, Jan 20, 2015 at 5:06 PM, Oliver Neukum oneu...@suse.de wrote: On Tue, 2015-01-20 at 16:18 +0400, Kirill Elagin wrote: I use a Logitech wireless keyboard (with

Re: [PATCH v3 00/20] Add UDC support to the isp1760 driver

2015-01-20 Thread Laurent Pinchart
Hi Felipe, On Friday 09 January 2015 11:34:25 Felipe Balbi wrote: On Fri, Jan 09, 2015 at 11:30:31AM -0600, Felipe Balbi wrote: This patch set adds UDC support to the isp1760 driver, to be used with the ISP1761 dual-role USB controller. The first 17 patches rework the isp1760 driver to

Re: [PATCH] usb: hid: Do not bind to Microchip Pick16F1454

2015-01-20 Thread Jiri Kosina
On Tue, 20 Jan 2015, Kristian Evensen wrote: The Microchip Pick16F1454 is exported as a HID device and is used by for example the Yepkit YKUSH three-port switchable USB hub. However, it is not an actual HID-device. On the Yepkit, it is used to power up/down the ports on the hub. The HID