[PATCH V4 1/2] usb: gadget/uvc: Port UVC webcam gadget to use videobuf2 framework

2013-03-21 Thread Bhupesh Sharma
This patch reworks the videobuffer management logic present in the UVC webcam gadget and ports it to use the "more apt" videobuf2 framework for video buffer management. To support routing video data captured from a real V4L2 video capture device with a "zero copy" operation on videobuffers (as the

[PATCH V4 2/2] usb: gadget/uvc: Add support for 'get_unmapped_area' for MMUless architectures

2013-03-21 Thread Bhupesh Sharma
This patch adds the support for 'get_unmapped_area' in UVC gadget which is called when the 'mmap' system call is executed on MMUless architectures. Signed-off-by: Bhupesh Sharma --- drivers/usb/gadget/uvc_queue.c | 18 ++ drivers/usb/gadget/uvc_v4l2.c | 15 +++ 2

[PATCH V4 0/2] UVC webcam gadget related changes

2013-03-21 Thread Bhupesh Sharma
This patchset tries to enhance the UVC webcam gadget driver and is based on Laurent's git tree available here (head uvc-gadget): git://linuxtv.org/pinchartl/uvcvideo.git Note that to ease review and integration of these patches, I have rebased them on Laurent's repo and all the relevant patches af

[RFC PATCH] usb: register usb port to usb_bus_type

2013-03-21 Thread Lan Tianyu
Usb port isn't assigned to any bus_type. This seems not good from Greg's comments. http://marc.info/?l=linux-usb&m=136200364929942&w=2 This patch is to register usb port to usb_bus_type. The usb port's original name is "portX". This will cause name confilct after adding usb port to usb_bus

Re: [BUG] bisected: PandaBoard smsc95xx ethernet driver error from USB timeout

2013-03-21 Thread Ming Lei
Hi Frank, On Thu, Mar 21, 2013 at 11:29 AM, Frank Rowand wrote: > > I found the problem on 3.6.11, but have not replicated it on 3.9-rcX > yet because my config fails to build on 3.9-rc1 and 3.9-rc2. I'll try > to work on that issue tomorrow. I play upstream kernel on Pandaboard A1 frequently,

Re: [PATCH 2/6] usb: otg: mv_otg: remove unused clock

2013-03-21 Thread Chao Xie
On Wed, Mar 20, 2013 at 9:09 PM, Felipe Balbi wrote: > On Mon, Mar 18, 2013 at 03:55:29AM -0400, Chao Xie wrote: >> The origianl understanding of clock is wrong. The OTG controller >> only have one clock input. >> Passing clock name by pdata is wrong. The clock is defined by device >> iteself. >>

Re: [PATCH 2/6] usb: otg: mv_otg: remove unused clock

2013-03-21 Thread Kishon Vijay Abraham I
Hi, On Thursday 21 March 2013 02:46 PM, Chao Xie wrote: On Wed, Mar 20, 2013 at 9:09 PM, Felipe Balbi wrote: On Mon, Mar 18, 2013 at 03:55:29AM -0400, Chao Xie wrote: The origianl understanding of clock is wrong. The OTG controller only have one clock input. Passing clock name by pdata is wro

Re: [PATCH 2/6] usb: otg: mv_otg: remove unused clock

2013-03-21 Thread Felipe Balbi
On Thu, Mar 21, 2013 at 05:16:15PM +0800, Chao Xie wrote: > On Wed, Mar 20, 2013 at 9:09 PM, Felipe Balbi wrote: > > On Mon, Mar 18, 2013 at 03:55:29AM -0400, Chao Xie wrote: > >> The origianl understanding of clock is wrong. The OTG controller > >> only have one clock input. > >> Passing clock na

[PATCH] usb: gadget: net2272: fix sparse warnings

2013-03-21 Thread Felipe Balbi
Fix the following sparse warnings: drivers/usb/gadget/net2272.c:916:13: warning: Using plain integer as NULL pointer drivers/usb/gadget/net2272.c:1624:9: warning: Using plain integer as NULL pointer drivers/usb/gadget/net2272.c:1552:30: warning: right shift by bigger than source value Note tha

[GIT PULL] usb: fixes for v3.9-rc4

2013-03-21 Thread Felipe Balbi
Hi Greg, Hopefully, this is my last round of fixes for v3.9-rc. Things seem to be calming down. Patches have been in my fixes branch for quite a while and I haven't heard anything from Fengguang's 0-day kernel build. I have also built this branch with the following defconfigs: omap2plus

[PATCH v3 07/94] USB: serial: remove redundant comments

2013-03-21 Thread Johan Hovold
Remove redundant comments and fix some minor coding style issues. Signed-off-by: Johan Hovold --- drivers/usb/serial/usb-serial.c | 20 +--- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index a5e8

[PATCH v3 05/94] USB: pl2303: make set_control_lines a port operation

2013-03-21 Thread Johan Hovold
Pass usb-serial port rather than usb device to set_control_lines, and make sure port device is used for all port related debugging. Signed-off-by: Johan Hovold --- drivers/usb/serial/pl2303.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/usb/serial/pl230

[PATCH v3 00/94] USB: serial: disconnect-related patches for 3.10

2013-03-21 Thread Johan Hovold
This is v3 of the USB-disconnect series rebased on Linus tree of last week (c41b3810c09) and the recently submitted fixes-series: USB: fixes for 3.9-final I retained Alan's ACK on the urb-poison patch. This series fixes a bunch of issues related to device disconnect. As the diffstat sho

[PATCH v3 88/94] USB: pl2303: remove disconnect test from tiocmset

2013-03-21 Thread Johan Hovold
Remove unnecessary disconnect test in tiocmset. No ioctls will be made after disconnect returns. Signed-off-by: Johan Hovold --- drivers/usb/serial/pl2303.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl230

[PATCH v3 82/94] USB: kl5kusb105: always disable uart on close

2013-03-21 Thread Johan Hovold
Always try to disable the uart on close. Since the switch to tty ports, close will be called as part of shutdown before disconnect returns. Hence there is no need to check the disconnected flag, and we can put devices in disabled states also on driver unbind. Signed-off-by: Johan Hovold --- dri

[PATCH v3 84/94] USB: mos7720: always disable uart on close

2013-03-21 Thread Johan Hovold
Always try to disable the uart on close. Since the switch to tty ports, close will be called as part of shutdown before disconnect returns. Hence there is no need to check the disconnected flag, and we can put devices in disabled states also on driver unbind. Signed-off-by: Johan Hovold --- dri

[PATCH v3 06/94] USB: serial: rename tty-port callbacks

2013-03-21 Thread Johan Hovold
Rename the tty-port callbacks using a common prefix to more clearly separate them from the tty and usb driver callbacks. Rename serial_down to serial_port_shutdown to match the callback name. Signed-off-by: Johan Hovold --- drivers/usb/serial/usb-serial.c | 18 +- 1 file changed

[PATCH v3 81/94] USB: io_ti: always disable uart on close

2013-03-21 Thread Johan Hovold
Always try to disable the uart on close. Since the switch to tty ports, close will be called as part of shutdown before disconnect returns. Hence there is no need to check the disconnected flag, and we can put devices in disabled states also on driver unbind. Signed-off-by: Johan Hovold --- dri

[PATCH v3 83/94] USB: metro-usb: always disable uart on close

2013-03-21 Thread Johan Hovold
Always try to disable the uart on close. Since the switch to tty ports, close will be called as part of shutdown before disconnect returns. Hence there is no need to check the disconnected flag, and we can put devices in disabled states also on driver unbind. Signed-off-by: Johan Hovold --- dri

[PATCH v3 53/94] USB: io_ti: switch to generic TIOCMIWAIT implementation

2013-03-21 Thread Johan Hovold
Switch to the generic TIOCMIWAIT implementation which does not suffer from the races involved when using the deprecated sleep_on functions. This also fixes the issue with processes waiting for modem-status-changes not being woken up at disconnect. Signed-off-by: Johan Hovold --- drivers/usb/ser

[PATCH v3 15/94] USB: keyspan: remove bogus disconnect test in close

2013-03-21 Thread Johan Hovold
Remove bogus (and unnecessary) test for serial->dev being NULL in close. The device is never cleared, and close is never called after a completed disconnect anyway. Remove some out-commented bogus code while at it. Signed-off-by: Johan Hovold --- drivers/usb/serial/keyspan.c | 26 +++--

[PATCH v3 03/94] USB: iuu_phoenix: remove unnecessary urb kill on close

2013-03-21 Thread Johan Hovold
Remove kill of interrupt-in urb on close as it has never been submitted. Signed-off-by: Johan Hovold --- drivers/usb/serial/iuu_phoenix.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c index ff77027..a3bfcb3 100644 --- a/dri

[PATCH v3 02/94] USB: kl5kusb105: remove unnecessary urb kill on close

2013-03-21 Thread Johan Hovold
Remove kill of interrupt-in urb on close as it has never been submitted. Signed-off-by: Johan Hovold --- drivers/usb/serial/kl5kusb105.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/usb/serial/kl5kusb105.c b/drivers/usb/serial/kl5kusb105.c index 769d910..57fd001 100644 --- a/dri

[PATCH v3 04/94] USB: pl2303: use interface device for debug

2013-03-21 Thread Johan Hovold
Use interface rather than usb-serial device for debugging interface related operations. This gives more descriptive messages, such as [ 905.669436] pl2303 1-4.1:1.0: 0x40:0x1:0x8:0x0 0 rather than [ 341.943535] usb 1-4.1: 0x40:0x1:0x8:0x0 0 Signed-off-by: Johan Hovold --- drivers/usb/seri

[PATCH v3 09/94] USB: serial: remove redundant allocation error messages

2013-03-21 Thread Johan Hovold
Failed allocations already get an OOM message and a stack dump. Signed-off-by: Johan Hovold --- drivers/usb/serial/usb-serial.c | 37 + 1 file changed, 9 insertions(+), 28 deletions(-) diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-seri

[PATCH v3 10/94] USB: serial: remove port number from generic-driver debug

2013-03-21 Thread Johan Hovold
Remove redundant port number from debug output (already printed as part of device name). Signed-off-by: Johan Hovold --- drivers/usb/serial/generic.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index 4

[PATCH v3 01/94] USB: ftdi_sio: remove obsolete port data refcounting

2013-03-21 Thread Johan Hovold
Remove the port data refcounting and release the private data explicitly at port remove. The port data refcounting was used to make sure the port data was not freed until the last tty reference was closed. Since moving over to tty ports, the underlying assumptions are no longer valid as close is n

[PATCH v3 08/94] USB: serial: clean up debug info

2013-03-21 Thread Johan Hovold
Remove redundant port number from debug output (already printed as part of device name). Signed-off-by: Johan Hovold --- drivers/usb/serial/usb-serial.c | 39 --- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/drivers/usb/serial/usb-serial.c b

Newbie question: how the kernel determine usb device has been connected - handling some interrupt or pooling loop?

2013-03-21 Thread Dmitry Bolshakov
Hi! Where could I read about it? and where is the code? I've found something looks like a pooling loop - drivers/usb/core/hub.c in the "hub_events" function is this it? -- with best regards Dmitry Bolshakov -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a

[PATCH v3 34/94] USB: serial: add tiocmiwait subdriver operation

2013-03-21 Thread Johan Hovold
Add tiocmiwait operation to struct usb_serial_driver. Signed-off-by: Johan Hovold --- drivers/usb/serial/usb-serial.c | 15 +++ include/linux/usb/serial.h | 1 + 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial

[PATCH v3 91/94] USB: garmin_gps: remove bogus disconnect test in close

2013-03-21 Thread Johan Hovold
Remove bogus disconnect test for serial device being NULL in close. This can never happen as close is guaranteed to be called before the last tty reference is dropped (and port->serial is cleared). Signed-off-by: Johan Hovold --- drivers/usb/serial/garmin_gps.c | 4 1 file changed, 4 deleti

[PATCH v3 51/94] USB: io_edgeport: switch to generic TIOCMIWAIT implementation

2013-03-21 Thread Johan Hovold
Switch to the generic TIOCMIWAIT implementation. This also fixes the issue with processes waiting for modem-status-changes not being woken up at disconnect. Signed-off-by: Johan Hovold --- drivers/usb/serial/io_edgeport.c | 35 +-- drivers/usb/serial/io_tables.h

[PATCH v3 72/94] USB: spcp8x5: reimplement device type detection

2013-03-21 Thread Johan Hovold
Reimplement device type detection using the device id table and quirks. Device type was used to detect one device type which did not support to control functions. Add quirks to the device table and store them in the private port data at probe instead. Signed-off-by: Johan Hovold --- drivers/usb

[PATCH v3 46/94] USB: cypress_m8: fix TIOCMIWAIT and disconnect

2013-03-21 Thread Johan Hovold
Use tty-port modem-status-change wait queue on which processes are woken up at hangup and disconnect. Currently a process waiting on modem-status changes will not be woken on device disconnect. Signed-off-by: Johan Hovold --- drivers/usb/serial/cypress_m8.c | 4 ++-- 1 file changed, 2 insertion

[PATCH v3 63/94] USB: pl2303: add custom tiocmiwait operation

2013-03-21 Thread Johan Hovold
Break out TIOCMIWAIT handling from custom ioctl operation and use tiocmiwait operation field instead. Signed-off-by: Johan Hovold --- drivers/usb/serial/pl2303.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c

[PATCH v3 40/94] USB: ftdi_sio: switch to generic get_icount implementation

2013-03-21 Thread Johan Hovold
Switch to the generic get_icount implementation. Signed-off-by: Johan Hovold --- drivers/usb/serial/ftdi_sio.c | 24 +--- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index fa3077f..1199dc5 100644

[PATCH v3 36/94] USB: serial: wake up MSR-wait queue on disconnect

2013-03-21 Thread Johan Hovold
Make sure processes waiting for modem-status changes are woken up at disconnect. This is needed for custom subdriver TIOCMIWAIT-implementations which do not yet handle hangup. Even though processes on the tty-port wait queue are woken up at hangup the wake-up call in usb-serial disconnect is stil

[PATCH v3 69/94] USB: spcp8x5: clean up code

2013-03-21 Thread Johan Hovold
Clean up this driver somewhat. Signed-off-by: Johan Hovold --- drivers/usb/serial/spcp8x5.c | 72 +++- 1 file changed, 37 insertions(+), 35 deletions(-) diff --git a/drivers/usb/serial/spcp8x5.c b/drivers/usb/serial/spcp8x5.c index f34930c..a5c3a36 100644

[PATCH v3 76/94] USB: ti_usb_3410_5052: switch to generic get_icount implementation

2013-03-21 Thread Johan Hovold
Switch to the generic get_icount implementation. Signed-off-by: Johan Hovold --- drivers/usb/serial/ti_usb_3410_5052.c | 44 ++- 1 file changed, 7 insertions(+), 37 deletions(-) diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_

[PATCH v3 61/94] USB: oti6858: replace custom ioctl operation with tiocmiwait

2013-03-21 Thread Johan Hovold
Replace custom ioctl operation with tiocmiwait. Signed-off-by: Johan Hovold --- drivers/usb/serial/oti6858.c | 26 -- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/drivers/usb/serial/oti6858.c b/drivers/usb/serial/oti6858.c index 87c71cc..fd5dcb8 100644 -

[PATCH v3 17/94] USB: keyspan_pda: remove bogus disconnect test in close

2013-03-21 Thread Johan Hovold
Remove bogus (and unnecessary) test for serial->dev being NULL in close. The device is never cleared, and close is never called after a completed disconnect anyway. Signed-off-by: Johan Hovold --- drivers/usb/serial/keyspan_pda.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) d

[PATCH v3 56/94] USB: mct_u232: switch to generic TIOCMIWAIT implementation

2013-03-21 Thread Johan Hovold
Switch to the generic TIOCMIWAIT implementation. This also fixes the issue with processes waiting for modem-status-changes not being woken up at disconnect. Signed-off-by: Johan Hovold --- drivers/usb/serial/mct_u232.c | 58 ++- 1 file changed, 2 insertio

[PATCH v3 74/94] USB: ssu100: switch to generic get_icount implementation

2013-03-21 Thread Johan Hovold
Switch to the generic get_icount implementation. Signed-off-by: Johan Hovold --- drivers/usb/serial/ssu100.c | 55 + 1 file changed, 15 insertions(+), 40 deletions(-) diff --git a/drivers/usb/serial/ssu100.c b/drivers/usb/serial/ssu100.c index 45b8c29

[PATCH v3 13/94] USB: digi_acceleport: remove bogus disconnect test in close

2013-03-21 Thread Johan Hovold
Remove bogus (and unnecessary) test for serial->dev being NULL in close. The device is never cleared, and close is never called after a completed disconnect anyway. Signed-off-by: Johan Hovold --- drivers/usb/serial/digi_acceleport.c | 92 ++-- 1 file changed, 45

[PATCH v3 16/94] USB: keyspan_pda: remove bogus disconnect test from dtr_rts

2013-03-21 Thread Johan Hovold
Remove bogus (and unnecessary) test for serial->dev being NULL in dtr_rts. The device is never cleared, and disconnect is handled for dtr_rts in usb-serial core anyway. Signed-off-by: Johan Hovold --- drivers/usb/serial/keyspan_pda.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions

[PATCH v3 49/94] USB: f81232: fix TIOCMIWAIT and disconnect

2013-03-21 Thread Johan Hovold
Use tty-port modem-status-change wait queue on which processes are woken up at hangup and disconnect. Currently a process waiting on modem-status changes will not be woken on device disconnect. Signed-off-by: Johan Hovold --- drivers/usb/serial/f81232.c | 4 ++-- 1 file changed, 2 insertions(+)

[PATCH v3 64/94] USB: pl2303: fix TIOCMIWAIT and disconnect

2013-03-21 Thread Johan Hovold
Use tty-port modem-status-change wait queue on which processes are woken up at hangup and disconnect. Currently a process waiting on modem-status changes will not be woken on device disconnect. Signed-off-by: Johan Hovold --- drivers/usb/serial/pl2303.c | 6 +++--- 1 file changed, 3 insertions(

[PATCH v3 67/94] USB: spcp8x5: remove broken TIOCMIWAIT support

2013-03-21 Thread Johan Hovold
Remove broken TIOCMIWAIT support. This drivers appears to implement TIOCMIWAIT but has no means of receiving modem-status interrupts. Signed-off-by: Johan Hovold --- drivers/usb/serial/spcp8x5.c | 68 1 file changed, 68 deletions(-) diff --git a/dri

[PATCH v3 80/94] USB: cypress_m8: remove bogus disconnect test from close

2013-03-21 Thread Johan Hovold
Remove disconnected test from close which did not protect any device IO at all. Signed-off-by: Johan Hovold --- drivers/usb/serial/cypress_m8.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index e4a62cf..d341555 10064

[PATCH v3 62/94] USB: oti6858: fix TIOCMIWAIT and disconnect

2013-03-21 Thread Johan Hovold
Use tty-port modem-status-change wait queue on which processes are woken up at hangup and disconnect. Currently a process waiting on modem-status changes will not be woken on device disconnect. Signed-off-by: Johan Hovold --- drivers/usb/serial/oti6858.c | 4 ++-- 1 file changed, 2 insertions(+

[PATCH v3 66/94] USB: quatech2: switch to generic TIOCMIWAIT implementation

2013-03-21 Thread Johan Hovold
Switch to the generic TIOCMIWAIT implementation. This also fixes the issue with processes waiting for modem-status-changes not being woken up at disconnect. Signed-off-by: Johan Hovold --- drivers/usb/serial/quatech2.c | 50 ++- 1 file changed, 2 insertio

[PATCH v3 59/94] USB: mos7840: switch to generic get_icount implementation

2013-03-21 Thread Johan Hovold
Switch to the generic get_icount implementation. Note that the interrupt counters will no longer be reset at open which is in accordance with which how the other drivers work. Signed-off-by: Johan Hovold --- drivers/usb/serial/mos7840.c | 56 +++- 1 file

[PATCH v3 24/94] USB: serial: fix generic disconnect implementation

2013-03-21 Thread Johan Hovold
There is no need for the generic disconnect callback to stop the read and write urbs a second time as this has already been taken care of by close (which is called from hangup as part of disconnect). Signed-off-by: Johan Hovold --- drivers/usb/serial/generic.c | 12 +--- 1 file changed,

[PATCH v3 79/94] USB: cp210x: always disable uart on close

2013-03-21 Thread Johan Hovold
Always try to disable the uart on close. Since the switch to tty ports, close will be called as part of shutdown before disconnect returns. Hence there is no need to check the disconnected flag, and we can put devices in disabled states also on driver unbind. Signed-off-by: Johan Hovold --- dri

[PATCH v3 50/94] USB: io_edgeport: switch to generic get_icount implementation

2013-03-21 Thread Johan Hovold
Switch to the generic get_icount implementation. Note that the interrupt counters will no longer be reset at open which is in accordance with which how the other drivers work. Signed-off-by: Johan Hovold --- drivers/usb/serial/io_edgeport.c | 45 +++- drivers

[PATCH v3 57/94] USB: mos7720: remove broken get_icount and TIOCMIWAIT

2013-03-21 Thread Johan Hovold
Remove broken get_icount and TIOCMIWAIT support. The driver has an icount structure but it is never been updated which makes get_icount rather pointless and causes TIOCMIWAIT to always return -EIO. Note that the TIOCMIWAIT implementation has always been broken and would not work even if icount su

[PATCH v3 71/94] USB: spcp8x5: clean up modem status retrieval

2013-03-21 Thread Johan Hovold
Clean up modem status retrieval. Signed-off-by: Johan Hovold --- drivers/usb/serial/spcp8x5.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/drivers/usb/serial/spcp8x5.c b/drivers/usb/serial/spcp8x5.c index 5779dd8..e0093dd 100644 --- a/drivers/usb/serial

[PATCH v3 89/94] USB: quatech2: always disable uart on close

2013-03-21 Thread Johan Hovold
Always try to disable the uart on close. Since the switch to tty ports, close will be called as part of shutdown before disconnect returns. Hence there is no need to check the disconnected flag, and we can put devices in disabled states also on driver unbind. Signed-off-by: Johan Hovold --- dri

[PATCH v3 94/94] USB: serial: update copyright information

2013-03-21 Thread Johan Hovold
Update copyright information. Signed-off-by: Johan Hovold --- drivers/usb/serial/ftdi_sio.c | 2 +- drivers/usb/serial/generic.c| 2 +- drivers/usb/serial/usb-serial.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/f

[PATCH v3 43/94] USB: ch341: replace custom ioctl operation with tiocmiwait

2013-03-21 Thread Johan Hovold
Replace custom ioctl operation with tiocmiwait. Signed-off-by: Johan Hovold --- drivers/usb/serial/ch341.c | 25 +++-- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c index 07d4650..1a97985 100644 --- a/dr

[PATCH v3 93/94] USB: iuu_phoenix: remove bogus disconnect test in close

2013-03-21 Thread Johan Hovold
Remove bogus disconnect test for serial device being NULL in close. This can never happen as close is guaranteed to be called before the last tty reference is dropped (and port->serial is cleared). Signed-off-by: Johan Hovold --- drivers/usb/serial/iuu_phoenix.c | 5 - 1 file changed, 5 dele

[PATCH v3 39/94] USB: ftdi_sio: switch to generic TIOCMIWAIT implementation

2013-03-21 Thread Johan Hovold
Switch to the generic TIOCMIWAIT implementation which does not suffer from the races involved when using the deprecated sleep_on functions. Signed-off-by: Johan Hovold --- drivers/usb/serial/ftdi_sio.c | 36 ++-- 1 file changed, 2 insertions(+), 34 deletions(-) d

[PATCH v3 58/94] USB: mos7840: remove smp barriers from icount handling

2013-03-21 Thread Johan Hovold
Remove SMP memory barriers from icount handling and rely on the barriers implied by wait_event, sleep and locks, while using the port lock to guarantee atomicity. This is a step in moving over to the generic icount implementations. Signed-off-by: Johan Hovold --- drivers/usb/serial/mos7840.c |

[PATCH v3 38/94] USB: ftdi_sio: use port icount

2013-03-21 Thread Johan Hovold
Use the port-data icount for interrupt counters. Signed-off-by: Johan Hovold --- drivers/usb/serial/ftdi_sio.c | 31 ++- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index c575738..ea7433

[PATCH v3 86/94] USB: opticon: remove disconnect test from tiocmset

2013-03-21 Thread Johan Hovold
Remove unnecessary disconnect test in tiocmset. No ioctls will be made after disconnect returns. Signed-off-by: Johan Hovold --- drivers/usb/serial/opticon.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/usb/serial/opticon.c b/drivers/usb/serial/op

[PATCH v3 19/94] USB: sierra: remove bogus disconnect test in close

2013-03-21 Thread Johan Hovold
Remove bogus (and unnecessary) test for serial->dev being NULL in close. The device is never cleared, and close is never called after a completed disconnect anyway. Signed-off-by: Johan Hovold --- drivers/usb/serial/sierra.c | 39 +-- 1 file changed, 17 inser

[PATCH v3 54/94] USB: iuu_phoenix: remove unused MSR-wait queue

2013-03-21 Thread Johan Hovold
Remove unused, private modem-status wait queue from driver. If TIOCMIWAIT is ever implemented it must not rely on a private wait queue which may have been released when woken up. Signed-off-by: Johan Hovold --- drivers/usb/serial/iuu_phoenix.c | 2 -- 1 file changed, 2 deletions(-) diff --git a

[PATCH v3 60/94] USB: mos7840: switch to generic TIOCMIWAIT implementation

2013-03-21 Thread Johan Hovold
Switch to the generic TIOCMIWAIT implementation. This also fixes the issue with processes waiting for modem-status-changes not being woken up at disconnect. Signed-off-by: Johan Hovold --- drivers/usb/serial/mos7840.c | 48 ++-- 1 file changed, 2 insertio

[PATCH v3 55/94] USB: mct_u232: switch to generic get_icount implementation

2013-03-21 Thread Johan Hovold
Switch to the generic get_icount implementation. Signed-off-by: Johan Hovold --- drivers/usb/serial/mct_u232.c | 40 1 file changed, 4 insertions(+), 36 deletions(-) diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c index 06d5a60

[PATCH v3 42/94] USB: ark3116: switch to generic TIOCMIWAIT implementation

2013-03-21 Thread Johan Hovold
Switch to the generic TIOCMIWAIT implementation which does not suffer from the races involved when using the deprecated sleep_on functions. This also fixes the issue with processes waiting for modem-status-changes not being woken up at disconnect. Signed-off-by: Johan Hovold --- drivers/usb/ser

[PATCH v3 14/94] USB: iuu_phoenix: remove bogus disconnect test in close

2013-03-21 Thread Johan Hovold
Remove bogus (and unnecessary) test for serial->dev being NULL in close. The device is never cleared, and close is never called after a completed disconnect anyway. Signed-off-by: Johan Hovold --- drivers/usb/serial/iuu_phoenix.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(

[PATCH v3 25/94] USB: serial: remove generic disconnect callback

2013-03-21 Thread Johan Hovold
Remove the now empty generic disconnect callback and make the disconnect callback non-mandatory. Signed-off-by: Johan Hovold --- drivers/usb/serial/generic.c| 6 -- drivers/usb/serial/usb-serial.c | 4 ++-- include/linux/usb/serial.h | 1 - 3 files changed, 2 insertions(+), 9 deleti

[PATCH v3 47/94] USB: digi_acceleport: remove unused MSR-wait queue

2013-03-21 Thread Johan Hovold
Remove unused, private modem-status wait queue from driver. If TIOCMIWAIT is ever implemented it must not rely on a private wait queue which may have been released when woken up. Signed-off-by: Johan Hovold --- drivers/usb/serial/digi_acceleport.c | 3 --- 1 file changed, 3 deletions(-) diff --

[PATCH v3 87/94] USB: pl2303: fix return value of tiocmset

2013-03-21 Thread Johan Hovold
Make sure we return 0 or a negative error number appropriate for userspace on errors. Signed-off-by: Johan Hovold --- drivers/usb/serial/pl2303.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index 997eba4..4d

[PATCH v3 35/94] USB: serial: add generic TIOCMIWAIT implementation

2013-03-21 Thread Johan Hovold
Add generic TIOCMIWAIT implementation which correctly handles hangup, USB-device disconnect, does not rely on the deprecated sleep_on functions and hence does not suffer from the races currently affecting several usb-serial drivers. This makes it much easier to add TIOCMIWAIT support to subdrivers

[PATCH v3 18/94] USB: mos7840: remove bogus disconnect test in close

2013-03-21 Thread Johan Hovold
Remove bogus (and unnecessary) test for serial->dev being NULL in close. The device is never cleared, and close is never called after a completed disconnect anyway. Simplify urb killing, and remove some related debug and dead code while at it. Signed-off-by: Johan Hovold --- drivers/usb/serial

[PATCH v3 44/94] USB: ch341: fix TIOCMIWAIT and disconnect

2013-03-21 Thread Johan Hovold
Use tty-port modem-status-change wait queue on which processes are woken up at hangup and disconnect. Currently a process waiting on modem-status changes will not be woken on device disconnect as wake up was only done in dtr_rts which isn't guaranteed to be called (e.g. if HUPCL is not set). Also

[PATCH v3 65/94] USB: quatech2: switch to generic get_icount implementation

2013-03-21 Thread Johan Hovold
Switch to the generic get_icount implementation. Signed-off-by: Johan Hovold --- drivers/usb/serial/quatech2.c | 51 ++- 1 file changed, 12 insertions(+), 39 deletions(-) diff --git a/drivers/usb/serial/quatech2.c b/drivers/usb/serial/quatech2.c index 75f

[PATCH v3 26/94] USB: serial: remove generic release callback

2013-03-21 Thread Johan Hovold
Remove empty generic release implementation and make the release callback non-mandatory (like attach, probe and disconnect). Signed-off-by: Johan Hovold --- drivers/usb/serial/generic.c| 5 - drivers/usb/serial/usb-serial.c | 3 +-- include/linux/usb/serial.h | 1 - 3 files changed,

[PATCH v3 70/94] USB: spcp8x5: pass usb-serial port to control functions

2013-03-21 Thread Johan Hovold
Pass usb-serial port to the control functions for uart status and work mode. Use port device for debugging and use dev_err to report errors. Signed-off-by: Johan Hovold --- drivers/usb/serial/spcp8x5.c | 54 +++- 1 file changed, 28 insertions(+), 26 delet

[PATCH v3 28/94] USB: cyberjack: fix disconnect handling

2013-03-21 Thread Johan Hovold
Make sure the interrupt urb submitted in port_probe is killed in port_remove. The interrupt-urb completion handler references the port and may get called after port_remove has returned and the port has been unregistered (although this is currently prevented by usb-serial core as we are using a non

[PATCH v3 11/94] USB: ark3116: remove bogus disconnect test in close

2013-03-21 Thread Johan Hovold
Remove bogus (and unnecessary) test for serial->dev being NULL in close. The device is never cleared, and close is never called after a completed disconnect anyway. Signed-off-by: Johan Hovold --- drivers/usb/serial/ark3116.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions

[PATCH v3 77/94] USB: ti_usb_3410_5052: switch to generic TIOCMIWAIT implementation

2013-03-21 Thread Johan Hovold
Switch to the generic TIOCMIWAIT implementation which does not suffer from the races involved when using the deprecated sleep_on functions. This also fixes the issue with processes waiting for modem-status-changes not being woken up at disconnect. Signed-off-by: Johan Hovold --- drivers/usb/ser

[PATCH v3 29/94] USB: serial: fix port release

2013-03-21 Thread Johan Hovold
We should not call kill_traffic (and usb_kill_urb) once disconnect returns. Any pending urbs are killed at disconnect and new submissions are prevented by usb_unbind_interface (and usb_disable_interface). Signed-off-by: Johan Hovold --- drivers/usb/serial/usb-serial.c | 7 --- 1 file changed

[PATCH v3 20/94] USB: usb_wwan: remove bogus disconnect test in close

2013-03-21 Thread Johan Hovold
Remove bogus (and unnecessary) test for serial->dev being NULL in close. The device is never cleared, and close is never called after a completed disconnect anyway. Signed-off-by: Johan Hovold --- drivers/usb/serial/usb_wwan.c | 25 - 1 file changed, 12 insertions(+), 13

[PATCH v3 21/94] USB: serial: remove bogus disconnect test in cleanup

2013-03-21 Thread Johan Hovold
Remove bogus (and unnecessary) test for serial->dev being NULL in cleanup. The device is never cleared, and cleanup is never called after a completed disconnect anyway. Signed-off-by: Johan Hovold --- drivers/usb/serial/generic.c | 24 ++-- 1 file changed, 10 insertions(+),

[PATCH v3 22/94] USB: ssu100: remove explicit initialisation of disconnect

2013-03-21 Thread Johan Hovold
The disconnect callback is set to the generic implementation by usb-serial core if NULL. Signed-off-by: Johan Hovold --- drivers/usb/serial/ssu100.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/serial/ssu100.c b/drivers/usb/serial/ssu100.c index 4b2a197..97aca3f 100644 --- a/dr

[PATCH v3 33/94] USB: serial: clean up usb-serial bus device removal

2013-03-21 Thread Johan Hovold
Make sure to unregister the tty-device before calling subdriver port_remove. This way remove will reverse probe, and specifically any port data released in port_remove will be available throughout tty unregister. Note that the order currently does not matter as the tty-layer can make callbacks al

[PATCH v3 31/94] USB: fix urb-poison imbalance

2013-03-21 Thread Johan Hovold
The calls to usb_poison_urb and usb_unpoison_urb are expected to be balanced. However, if an urb that has not yet been submitted is poisoned, its reject counter will not be increased as its ep-field is NULL. A consecutive call to unpoison will thus in fact poison the urb as its reject counter will

[PATCH v3 48/94] USB: f81232: add custom tiocmiwait operation

2013-03-21 Thread Johan Hovold
Break out TIOCMIWAIT handling from custom ioctl operation and use tiocmiwait operation field instead. Signed-off-by: Johan Hovold --- drivers/usb/serial/f81232.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c

[PATCH v3 68/94] USB: spcp8x5: remove broken uart-error handling

2013-03-21 Thread Johan Hovold
Remove broken uart-error handling. This driver appears to implement uart-error handling but does not receive status interrupts or status information with bulk in transfers. Instead status was retrieved at open and used to flag only the first bulk in transfer. Signed-off-by: Johan Hovold --- dr

[PATCH v3 75/94] USB: ssu100: switch to generic TIOCMIWAIT implementation

2013-03-21 Thread Johan Hovold
Switch to the generic TIOCMIWAIT implementation. This also fixes the issue with processes waiting for modem-status-changes not being woken up at disconnect. Signed-off-by: Johan Hovold --- drivers/usb/serial/ssu100.c | 50 ++--- 1 file changed, 2 insertio

[PATCH v3 41/94] USB: ark3116: switch to generic get_icount implementation

2013-03-21 Thread Johan Hovold
Switch to the generic get_icount implementation. Signed-off-by: Johan Hovold --- drivers/usb/serial/ark3116.c | 58 ++-- 1 file changed, 18 insertions(+), 40 deletions(-) diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c index 3b811

[PATCH v3 90/94] USB: visor: always disable uart on close

2013-03-21 Thread Johan Hovold
Always try to disable the uart on close. Since the switch to tty ports, close will be called as part of shutdown before disconnect returns. Hence there is no need to check the disconnected flag, and we can put devices in disabled states also on driver unbind. Signed-off-by: Johan Hovold --- dri

[PATCH v3 85/94] USB: opticon: fix return value of tiocmset

2013-03-21 Thread Johan Hovold
Make sure we return 0 or a negative error number appropriate for userspace on errors. Currently 1 rather than 0 is returned on successful operation. Signed-off-by: Johan Hovold --- drivers/usb/serial/opticon.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/driv

[PATCH v3 32/94] USB: serial: use urb poison to reliably kill traffic

2013-03-21 Thread Johan Hovold
Use usb_poison_urb to reliably kill all urbs on disconnect and suspend. This way there will be no question that the urbs cannot be resubmitted by buggy subdrivers. Signed-off-by: Johan Hovold --- drivers/usb/serial/usb-serial.c | 55 +++-- 1 file changed, 37

[PATCH v3 92/94] USB: garmin_gps: remove bogus disconnect test in bulk callback

2013-03-21 Thread Johan Hovold
Remove bogus disconnect test for serial device being NULL in read bulk callback. This can never happen as the port read urb is killed (and poisoned) at close, which in turn is guaranteed to be called before the last tty reference is dropped (and port->serial is cleared). Signed-off-by: Johan Hovol

[PATCH v3 27/94] USB: serial: clean up generic-operation handling

2013-03-21 Thread Johan Hovold
Most USB serial drivers are, and should be, using as much of the generic implementation as possible. Rename the fixup_generic function to a more descriptive name. Reword the related debug message in a more neutral tone (and remember to add the missing newline). Finally, move the operations initial

[PATCH v3 78/94] USB: serial: remove unused MSR-wait queue

2013-03-21 Thread Johan Hovold
Remove the port MSR-wait queue now that all drivers have been migrated to the tty-port queue. Signed-off-by: Johan Hovold --- include/linux/usb/serial.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index c786ee7..b9b0f7b4 100644 ---

[PATCH v3 12/94] USB: cyberjack: remove bogus disconnect test in close

2013-03-21 Thread Johan Hovold
Remove bogus (and unnecessary) test for serial->dev being NULL in close. The device is never cleared, and close is never called after a completed disconnect anyway. Signed-off-by: Johan Hovold --- drivers/usb/serial/cyberjack.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff

  1   2   >