[PATCH 1/2] usb: chipidea: add CI_HDRC_TURN_VBUS_EARLY_ON for imx23

2015-12-29 Thread Stefan Wahren
Until now the imx23 uses the imx27 platform flag. But the imx23 needs the flag CI_HDRC_TURN_VBUS_EARLY_ON, too. So fix this by adding a separate platform flag. Suggested-by: Peter Chen Signed-off-by: Stefan Wahren ---

Re: [PATCH 5/5] usb: dwc2: gadget: free TX FIFO after killing requests

2015-12-29 Thread Sergei Shtylyov
Hello. On 12/28/2015 07:25 PM, Robert Baldyga wrote: As kill_all_requests() potentially flushes TX FIFO, we should should free FIFO after calling it. Otherwise FIFO could stay unflushed properly. Signed-off-by: Robert Baldyga --- drivers/usb/dwc2/gadget.c | 8

[PATCH 2/2] dt-bindings: ci-hdrc-usb2: add missing compatibles

2015-12-29 Thread Stefan Wahren
This patch adds the missing compatible strings from ci_hdrc_imx. Signed-off-by: Stefan Wahren --- .../devicetree/bindings/usb/ci-hdrc-usb2.txt |7 +++ 1 file changed, 7 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt

Re: [PATCH 2/2] dt-bindings: ci-hdrc-usb2: add missing compatibles

2015-12-29 Thread Rob Herring
On Tue, Dec 29, 2015 at 04:41:09PM +, Stefan Wahren wrote: > This patch adds the missing compatible strings from ci_hdrc_imx. > > Signed-off-by: Stefan Wahren > --- > .../devicetree/bindings/usb/ci-hdrc-usb2.txt |7 +++ > 1 file changed, 7 insertions(+)

[PATCH v2 1/1] usb: cdc-acm: handle unlinked urb in acm read callback

2015-12-29 Thread Lu Baolu
In current acm driver, the bulk-in callback function ignores the URBs unlinked in usb core. This causes unexpected data loss in some cases. For example, runtime suspend entry will unlinked all urbs and set urb->status to -ENOENT even those urbs might have data not processed yet. Hence, data loss

Re: [PATCH] usb: phy: mxs: Remove unused flags

2015-12-29 Thread Peter Chen
On Tue, Dec 29, 2015 at 09:19:29AM -0200, Fabio Estevam wrote: > On Tue, Dec 29, 2015 at 6:15 AM, Peter Chen wrote: > > > I prefer to keep it, and it let us know the existing issues although > > we have not implemented workaround for them. In future, we may have > >

Re: MX28 with hub cannot reset

2015-12-29 Thread Fabio Estevam
Hi Stefan, On Tue, Dec 29, 2015 at 9:44 AM, Stefan Wahren wrote: > i did some tests with a IMX233-Olinuxino Maxi and external 4 port usb hub, > but i > can't reproduce the problem. > > Could you provide more information about the hub? It is a USB2512. > I think we

Re: [PATCH v2 1/1] usb: cdc-acm: handle unlinked urb in acm read callback

2015-12-29 Thread Greg Kroah-Hartman
On Wed, Dec 30, 2015 at 08:42:01AM +0800, Lu Baolu wrote: > In current acm driver, the bulk-in callback function ignores the > URBs unlinked in usb core. > > This causes unexpected data loss in some cases. For example, > runtime suspend entry will unlinked all urbs and set urb->status > to

Re: [PATCH RESEND] xhci:Remove unused marco definitions from the file xhci-hub.c

2015-12-29 Thread Greg KH
On Tue, Dec 29, 2015 at 01:28:16PM -0500, Nicholas Krause wrote: > This removes the unneeded marco definitions for the marcos > of XHCI_PORT_RW1S, XHCI_PORT_RW1C, XHCI_PORT_RWand > XHCI_PORT_RZ due to no uses of these marcos in the file > xhci-hub.c or any other related kernel source code

[PATCH v5 09/11] usbip: deriving functions as libraries

2015-12-29 Thread Nobuo Iwata
To utilize core parts of USB/IP to application protocol implementations, this patch derives libraries by exposing some functions of utilities and removing some unnecessary portions. Following functions are exposed. For command: - usbip_attach_device() - usbip_detach_port() - usbip_bind_device()

[PATCH v5 00/11] usbip: features to USB over WebSocket

2015-12-29 Thread Nobuo Iwata
Dear all, This series of patches introduces WebSocket to USB/IP. 0. Version info v5) # Added vendor/pruduct name conversion to port command. # Put initial value to pool_head in name.c. # Fixed list command exception when host option is omitted. # Fixed exception in case gai_strerror() returns

[PATCH v1 1/2] usbip: vhci number of ports extension

2015-12-29 Thread Nobuo Iwata
This patch extends number of ports limitation in application (vhci) side. To do so, vhci driver supports multiple host controllers. The number of controllers can be specified as a module parameter 'num_controllers'. The default is 1. ex) # insmod vhci_hcd.ko num_controllers=4 Also, ports per

[PATCH v1 2/2] usbip: single thread event handler

2015-12-29 Thread Nobuo Iwata
This patch reduces number of event handling threads to one. In existing implementation, event kernel threads are created for each port. The functions of the threads are terminationg connection and error handling. It's too expensive to have to each port. With this patch, event handler is a

[PATCH v3 1/1] usb: cdc-acm: handle unlinked urb in acm read callback

2015-12-29 Thread Lu Baolu
In current acm driver, the bulk-in callback function ignores the URBs unlinked in usb core. This causes unexpected data loss in some cases. For example, runtime suspend entry will unlinked all urbs and set urb->status to -ENOENT even those urbs might have data not processed yet. Hence, data loss

Re: [PATCH v2 1/1] usb: cdc-acm: handle unlinked urb in acm read callback

2015-12-29 Thread Lu Baolu
On 12/30/2015 09:46 AM, Greg Kroah-Hartman wrote: > On Wed, Dec 30, 2015 at 08:42:01AM +0800, Lu Baolu wrote: >> In current acm driver, the bulk-in callback function ignores the >> URBs unlinked in usb core. >> >> This causes unexpected data loss in some cases. For example, >> runtime suspend

[PATCH v5 08/11] usbip: letting connection establishment replaceable

2015-12-29 Thread Nobuo Iwata
To introduce some application protocols like WebSocket, this patch allows to substitute connection establishment and termination. In combination with previous patch, both connection and transmission can be replaced. usbip_connection_operations_t includes open and close operation. Open method

[PATCH v5 06/11] usbip: readme about user space URBs transmission

2015-12-29 Thread Nobuo Iwata
Addition to README regarding user space URBs transmission. Signed-off-by: Nobuo Iwata --- tools/usb/usbip/README | 22 ++ 1 file changed, 22 insertions(+) diff --git a/tools/usb/usbip/README b/tools/usb/usbip/README index 74f4afb..6b61da5 100644

[PATCH v5 02/11] usbip: readme and manuals about exporting devices

2015-12-29 Thread Nobuo Iwata
This patch adds function and usage of export to README and manuals. The wording, 'server' and 'client' is changed also. For existing attach command, the daemon runs device side machine and attach command is executed in application side machine. Then 'server' is used for device side and

[PATCH v5 07/11] usbip: letting send and receive replaceable

2015-12-29 Thread Nobuo Iwata
This patch allows to substitute send, receive and shutdown routines for both a) request/response PDUs among utilities and b) user space URBs transmission. usbip_sock_t is introduced instead of sockfd. it includes function pointers of send/receive/shutdown routines, an argument for the

[PATCH v5 01/11] usbip: exporting devices

2015-12-29 Thread Nobuo Iwata
USB/IP supports a function to import USB devices from application-side machine by attach command. The usage is as following. dev:# (Physically attach your USB device.) dev:# insmod usbip-core.ko and usbip-host.ko dev:# usbipd -D // Start usbip daemon. dev:# usbip list -l // List local USB devices

Re: [PATCH 0/6] USB: mxu11x0: fixes and clean ups

2015-12-29 Thread Johan Hovold
On Tue, Dec 29, 2015 at 01:36:10PM +0100, Johan Hovold wrote: > Here are a few fixes and clean ups of issues found during a last review > of the new driver. > Johan Hovold (6): > USB: mxu11x0: fix memory leak in port-probe error path > USB: mxu11x0: fix memory leak on firmware download >

[PATCH v5 11/11] usbip: USB over WebSocket

2015-12-29 Thread Nobuo Iwata
This patch adds utilities transmit packets via WebSocket protocol. WebSocket version of utilities as following. usbws : command usbwsa : application-side daemon usbwsd : device-side daemon The command supports all sub-command (ie. list, connect, disconnect, port, bind, unbind, attach and

[PATCH v5 03/11] usbip: safe completion against usb_kill_urb()

2015-12-29 Thread Nobuo Iwata
stub_shutdown_connection() : drivers/usb/usbip/stub_dev.c stub_device_cleanup_urbs() : drivers/usb/usbip/stub_main.c requests to kill pending URBs and clears priv lists. stub_complete() : drivers/usb/usbip/stub_tx.c might be called with URBs to have been requested to kill. To avoid kernel

[PATCH v5 04/11] usbip: kernel module for userspace URBs transmission

2015-12-29 Thread Nobuo Iwata
Originally, USB/IP transmits requests and response PDUs for preparation to transfer URBs in user space, after the preparation, URBs are transmitted in kernel space. To make easy to introduce application network protocols like WebSocket and so on, the driver, usbip_ux.ko, forwards URBs to

[PATCH v5 10/11] usbip: added const qualifier to arguments of some functions

2015-12-29 Thread Nobuo Iwata
This patch adds 'const' qualifier to 'char*' arguments of library interfaces to make acceptable std::string.c_str(). Essentially, these qualifiers are better to be used even if not to use C++. Although, I just added to functions related to previous patch. Also, it changes C++ reserved words

[PATCH v5 05/11] usbip: tools for userspace URBs transmission

2015-12-29 Thread Nobuo Iwata
Originally, USB/IP transmits requests and response PDUs for preparation to transfer URBs in user space, after completion of the preparation, URBs are transmitted in kernel space. To make easy to introduce application network protocols like WebSocket, the driver, usbip_ux.ko, forwards URBs to

[PATCH v1 0/2] usbip: vhci number of ports extension

2015-12-29 Thread Nobuo Iwata
This series of patches extends number of ports limitaion in application (vhci) side. This series conatins 2 patches. 1/2: Extends number of ports using multiple host controllers. 'num_controllers=N' module parameter denotes the number. The default is 1. Number of ports per

Re: [PATCH] ehci-hcd: Cleanup memory resources when ehci_halt fails

2015-12-29 Thread Jia-Ju Bai
On 12/29/2015 12:04 AM, Alan Stern wrote: On Mon, 28 Dec 2015, Jia-Ju Bai wrote: Please add a changelog. Signed-off-by: Jia-Ju Bai --- drivers/usb/host/ehci-hcd.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/ehci-hcd.c

[PATCH] ehci-hcd: Cleanup memory resources when ehci_halt fails

2015-12-29 Thread Jia-Ju Bai
The driver calls ehci_mem_init to allocate memory resources. But these resources are not freed when ehci_halt fails. This patch adds "ehci_mem_cleanup" in error handling code to fix this problem. Signed-off-by: Jia-Ju Bai --- drivers/usb/host/ehci-hcd.c |4 +++- 1

[PATCH v2] ehci-hcd: Disable memory-write-invalidate when the driver is removed

2015-12-29 Thread Jia-Ju Bai
The driver calls pci_set_mwi to enable memory-write-invalidate when it is initialized, but does not call pci_clear_mwi when it is removed. Many other drivers calls pci_clear_mwi when pci_set_mwi is called, such as r8169, 8139cp and e1000. This patch adds a function "ehci_pci_remove" to remove

Re: [PATCH] usb: phy: mxs: Remove unused flags

2015-12-29 Thread Peter Chen
On Mon, Dec 28, 2015 at 11:03:03PM -0200, Fabio Estevam wrote: > From: Fabio Estevam > > MXS_PHY_ABNORMAL_IN_SUSPEND and MXS_PHY_SENDING_SOF_TOO_FAST flags > are never used, so let's get rid of them. > > Reported-by: Stefan Wahren >

Re: [PATCH] usb: phy: mxs: Remove unused flags

2015-12-29 Thread Fabio Estevam
On Tue, Dec 29, 2015 at 6:15 AM, Peter Chen wrote: > I prefer to keep it, and it let us know the existing issues although > we have not implemented workaround for them. In future, we may have > solutions for how to implement them. Ok, what about adding the recommendation

Re: [PATCH] usb: phy: mxs: Remove unused flags

2015-12-29 Thread Stefan Wahren
> Peter Chen hat am 29. Dezember 2015 um 09:15 > geschrieben: > > > On Mon, Dec 28, 2015 at 11:03:03PM -0200, Fabio Estevam wrote: > > From: Fabio Estevam > > > > MXS_PHY_ABNORMAL_IN_SUSPEND and MXS_PHY_SENDING_SOF_TOO_FAST flags > > are never used,

[PATCH 3/6] USB: mxu11x0: fix modem-control handling on B0-transitions

2015-12-29 Thread Johan Hovold
Make sure to raise DTR and RTS on transitions from B0 and leave the other bits unchanged. Signed-off-by: Johan Hovold --- drivers/usb/serial/mxu11x0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/serial/mxu11x0.c

[PATCH 1/6] USB: mxu11x0: fix memory leak in port-probe error path

2015-12-29 Thread Johan Hovold
Fix memory leak in port-probe error path by verifying the interrupt-in urb before allocating the private data. Signed-off-by: Johan Hovold --- drivers/usb/serial/mxu11x0.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git

[PATCH 3/6] USB: mxu11x0: fix modem-control handling on B0-transitions

2015-12-29 Thread Johan Hovold
Make sure to raise DTR and RTS on transitions from B0 and leave the other bits unchanged. Signed-off-by: Johan Hovold --- drivers/usb/serial/mxu11x0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/serial/mxu11x0.c

[PATCH 5/6] USB: mxu11x0: fix debug-message typos

2015-12-29 Thread Johan Hovold
Fix a couple of debug-message typos, and do some minor clean ups. Signed-off-by: Johan Hovold --- drivers/usb/serial/mxu11x0.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/usb/serial/mxu11x0.c b/drivers/usb/serial/mxu11x0.c

[PATCH 0/6] USB: mxu11x0: fixes and clean ups

2015-12-29 Thread Johan Hovold
Here are a few fixes and clean ups of issues found during a last review of the new driver. Johan Johan Hovold (6): USB: mxu11x0: fix memory leak in port-probe error path USB: mxu11x0: fix memory leak on firmware download USB: mxu11x0: fix modem-control handling on B0-transitions USB:

[PATCH 5/6] USB: mxu11x0: fix debug-message typos

2015-12-29 Thread Johan Hovold
Fix a couple of debug-message typos, and do some minor clean ups. Signed-off-by: Johan Hovold --- drivers/usb/serial/mxu11x0.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/usb/serial/mxu11x0.c b/drivers/usb/serial/mxu11x0.c

[PATCH 4/6] USB: mxu11x0: rename usb-serial driver

2015-12-29 Thread Johan Hovold
Rename the usb-serial driver "mxu11x0" to match the USB driver name. Signed-off-by: Johan Hovold --- drivers/usb/serial/mxu11x0.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/serial/mxu11x0.c b/drivers/usb/serial/mxu11x0.c index

[PATCH 2/6] USB: mxu11x0: fix memory leak on firmware download

2015-12-29 Thread Johan Hovold
Make sure to release the private data before returning -ENODEV after having downloaded the firmware during first probe. Clean up the error paths while at it. Signed-off-by: Johan Hovold --- drivers/usb/serial/mxu11x0.c | 25 ++--- 1 file changed, 14

[PATCH 6/6] USB: mxu11x0: drop redundant function name from error messages

2015-12-29 Thread Johan Hovold
Drop redundant function name from a few error messages. Drop redundant error message when generic open fails. Signed-off-by: Johan Hovold --- drivers/usb/serial/mxu11x0.c | 32 1 file changed, 12 insertions(+), 20 deletions(-) diff --git

[PATCH 4/6] USB: mxu11x0: rename usb-serial driver

2015-12-29 Thread Johan Hovold
Rename the usb-serial driver "mxu11x0" to match the USB driver name. Signed-off-by: Johan Hovold --- drivers/usb/serial/mxu11x0.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/serial/mxu11x0.c b/drivers/usb/serial/mxu11x0.c index

[PATCH 6/6] USB: mxu11x0: drop redundant function name from error messages

2015-12-29 Thread Johan Hovold
Drop redundant function name from a few error messages. Drop redundant error message when generic open fails. Signed-off-by: Johan Hovold --- drivers/usb/serial/mxu11x0.c | 32 1 file changed, 12 insertions(+), 20 deletions(-) diff --git

[PATCH 0/6] USB: mxu11x0: fixes and clean ups

2015-12-29 Thread Johan Hovold
Here are a few fixes and clean ups of issues found during a last review of the new driver. Johan Johan Hovold (6): USB: mxu11x0: fix memory leak in port-probe error path USB: mxu11x0: fix memory leak on firmware download USB: mxu11x0: fix modem-control handling on B0-transitions USB:

[PATCH 2/6] USB: mxu11x0: fix memory leak on firmware download

2015-12-29 Thread Johan Hovold
Make sure to release the private data before returning -ENODEV after having downloaded the firmware during first probe. Clean up the error paths while at it. Signed-off-by: Johan Hovold --- drivers/usb/serial/mxu11x0.c | 25 ++--- 1 file changed, 14

[PATCH 1/6] USB: mxu11x0: fix memory leak in port-probe error path

2015-12-29 Thread Johan Hovold
Fix memory leak in port-probe error path by verifying the interrupt-in urb before allocating the private data. Signed-off-by: Johan Hovold --- drivers/usb/serial/mxu11x0.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git

Re: MX28 with hub cannot reset

2015-12-29 Thread Stefan Wahren
Hi Fabio, > Fabio Estevam hat am 22. Dezember 2015 um 23:54 > geschrieben: > > > Hi, > > On a mx28 custom board with a USB hub I can get a USB stick to get > detected after applying this change: > http://marc.info/?l=linux-usb=145079935324339=2 > > Things work fine if I boot

Re: [PATCH 0/6] USB: mxu11x0: fixes and clean ups

2015-12-29 Thread Johan Hovold
On Tue, Dec 29, 2015 at 01:36:17PM +0100, Johan Hovold wrote: > Here are a few fixes and clean ups of issues found during a last review > of the new driver. Bah, sorry about the double post. Johan -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to

Re: [PATCH v6] USB: serial: add Moxa UPORT 11x0 driver

2015-12-29 Thread Johan Hovold
On Mon, Dec 28, 2015 at 09:21:25PM +0100, Mathieu OTHACEHE wrote: > Add a driver which supports : > > - UPort 1110 : 1 port RS-232 USB to Serial Hub. > - UPort 1130 : 1 port RS-422/485 USB to Serial Hub. > - UPort 1130I : 1 port RS-422/485 USB to Serial Hub with Isolation. > - UPort 1150 : 1

Re: [PATCH 1/1] usb: cdc-acm: handle unlinked urb in acm read callback

2015-12-29 Thread Oliver Neukum
On Tue, 2015-12-29 at 13:46 +0800, Lu Baolu wrote: > In current acm driver, the bulk-in callback function ignores the > URBs unlinked in usb core. > > This causes unexpected data loss in some cases. For example, > runtime suspend entry will unlinked all urbs and set urb->status > to -ENOENT even