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 f79ea70..519eebf 100644
--- a
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 8891203..8bb8579 100644
--- a
Fetch modem status on carrier_raised and tiocmget.
This driver appeared to support modem-status but only read the modem
status registers once at open and then used that cached value for all
further enquires.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/spcp8x5.c | 27
Add generic get_icount implementation that subdrivers relying on the
port interrupt counters can use.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/generic.c | 27 +++
include/linux/usb/serial.h | 2 ++
2 files changed, 29 insertions(+)
diff --git a/drivers/usb
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/io_ti.c | 38 --
1 file changed, 4 insertions(+), 34 deletions
Switch to the generic get_icount implementation.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/ark3116.c | 49 +---
1 file changed, 14 insertions(+), 35 deletions(-)
diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c
index
Switch to the generic get_icount implementation.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/quatech2.c | 50 +++
1 file changed, 12 insertions(+), 38 deletions(-)
diff --git a/drivers/usb/serial/quatech2.c b/drivers/usb/serial/quatech2.c
index
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
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
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
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 |
Switch to the generic TIOCMIWAIT implementation.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/mct_u232.c | 60 ++-
1 file changed, 2 insertions(+), 58 deletions(-)
diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c
index
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/ark3116.c | 30 ++
1 file changed, 2 insertions(+), 28 deletions(-)
diff
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: Jo
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_ti.c | 39 ---
1 file
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(-)
d
support was added as it does not wait for the
modem status to change (does not use a work queue at all).
Signed-off-by: Johan Hovold
---
drivers/usb/serial/mos7720.c | 55
1 file changed, 55 deletions(-)
diff --git a/drivers/usb/serial/mos7720.c b
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
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
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
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
Switch to the generic TIOCMIWAIT implementation.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/mos7840.c | 48 ++--
1 file changed, 2 insertions(+), 46 deletions(-)
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
index
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
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 inserti
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
be decremented to a negative value,
effectively preventing the urb from being submitted.
Note that there are currently no in-kernel drivers affected by this.
Cc: Alan Stern
Acked-by: Alan Stern
Signed-off-by: Johan Hovold
---
drivers/usb/core/urb.c | 5 -
1 file changed, 4 insertions
also after the device has been unregistered. This is
handled in usb-serial core using the disconnected flag, which is
already set when usb-serial bus device remove is called.
Cc: Peter Hurley
Reported-by: Peter Hurley
Signed-off-by: Johan Hovold
---
drivers/usb/serial/bus.c | 5 +++--
1 file
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
Use the port-data icount for interrupt counters.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/ftdi_sio.c | 30 ++
1 file changed, 14 insertions(+), 16 deletions(-)
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index cbe439c
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 inserti
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
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
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 | 39 ++-
1 file changed, 2 insertions(+), 37 deletions
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
Rename port_release so that all usb_serial_port functions have a common
prefix.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/usb-serial.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 2c32f84
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
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/
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
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
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
non-private urb).
Signed-off-by: Johan Hovold
---
drivers/usb/serial/cyberjack.c | 12 ++--
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c
index de9253d..7814262 100644
--- a/drivers/usb/serial/cyberjack.c
+++ b
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
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
On Thu, Mar 14, 2013 at 01:39:39PM -0400, Peter Hurley wrote:
> On Thu, 2013-03-14 at 16:23 +0100, Johan Hovold wrote:
> > Make sure to unregister the tty-device before calling subdriver
> > port_remove.
> >
> > This way remove will reverse probe, and specifically an
On Thu, Mar 14, 2013 at 10:30:02PM +0400, Sergei Shtylyov wrote:
> Hello.
>
> On 14-03-2013 19:24, Johan Hovold wrote:
>
> > Always try to disable the uart on close.
>
> > Since the switch to tty ports, close will be called as part of shutdown
> > before disc
0 in system sleep context.
>
> Cc: Johan Hovold
> Signed-off-by: Ming Lei
> ---
> drivers/usb/serial/usb-serial.c |5 +
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
> index a19ed74..
On Wed, Mar 13, 2013 at 03:43:43PM -0400, Peter Hurley wrote:
> On Thu, 2013-03-07 at 15:55 +0100, Johan Hovold wrote:
> > Make sure to check ASYNC_INITIALISED before raising DTR when waking up
> > from blocked open in tty_port_block_til_ready.
> >
> > Currently DTR cou
On Wed, Mar 13, 2013 at 03:50:32PM -0400, Peter Hurley wrote:
> On Thu, 2013-03-07 at 15:55 +0100, Johan Hovold wrote:
> > These patches against 3.9-rc1 fix a few issues with tty-port hangup and
> > close.
> >
> > The first and fifth patch are essentially clean ups.
&g
On Fri, Mar 15, 2013 at 07:03:08AM -0400, Peter Hurley wrote:
> On Fri, 2013-03-15 at 10:24 +0100, Johan Hovold wrote:
> > On Wed, Mar 13, 2013 at 03:43:43PM -0400, Peter Hurley wrote:
> > > On Thu, 2013-03-07 at 15:55 +0100, Johan Hovold wrote:
> > > > Make sure to
On Fri, Mar 15, 2013 at 08:02:45AM -0400, Peter Hurley wrote:
> On Thu, 2013-03-14 at 19:30 +0100, Johan Hovold wrote:
> > On Thu, Mar 14, 2013 at 01:39:39PM -0400, Peter Hurley wrote:
> > > On Thu, 2013-03-14 at 16:23 +0100, Johan Hovold wrote:
> > > > Make sur
On Wed, Feb 27, 2013 at 01:52:27PM +0100, Johan Hovold wrote:
> Make sure to check the serial disconnected flag before accessing port
> private data after waking up.
>
> This fixes a use after free in the ftdi_sio introduced by commit
> 876ae50d94b ("USB: ftdi_sio: f
On Fri, Mar 15, 2013 at 12:04:34PM -0700, Greg KH wrote:
> On Fri, Mar 15, 2013 at 06:16:07PM +0100, Johan Hovold wrote:
> > On Wed, Feb 27, 2013 at 01:52:27PM +0100, Johan Hovold wrote:
> > > Make sure to check the serial disconnected flag before accessing port
> > > p
On Fri, Mar 15, 2013 at 12:05:58PM -0700, Greg KH wrote:
> On Thu, Mar 07, 2013 at 03:55:47PM +0100, Johan Hovold wrote:
> > These patches against 3.9-rc1 fix a few issues with tty-port hangup and
> > close.
>
> Are these for 3.9-final?
I'd say it can wait for 3.10
a may be gone when waking up after a
disconnect.
I decided to fix the use-after-free separately from the issue of
processes not waking up at disconnect, which I'm holding back until
3.10.
Thanks,
Johan
Johan Hovold (21):
USB: cdc-acm: fix device unregistration
USB: garmin_gps: fix memo
Use the port wait queue and make sure to check the serial disconnected
flag before accessing private port data after waking up.
This is is needed as the private port data (including the wait queue
itself) can be gone when waking up after a disconnect.
Cc: stable
Signed-off-by: Johan Hovold
Make sure waiting processes are woken on modem-status changes.
Currently processes are only woken on termios changes regardless of
whether the modem status has changed.
Cc: stable
Signed-off-by: Johan Hovold
---
drivers/usb/serial/mos7840.c | 5 +++--
1 file changed, 3 insertions(+), 2
flag. Specifically, further opens must be prevented and
this is already implemented.
Cc: stable
Cc: Oliver Neukum
Acked-by: Oliver Neukum
Signed-off-by: Johan Hovold
---
drivers/usb/class/cdc-acm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/class/cdc-acm.c
Add missing get_icount field to two-port driver.
The two-port driver was not updated when switching to the new icount
interface in commit 0bca1b913aff ("tty: Convert the USB drivers to the
new icount interface").
Cc: stable
Signed-off-by: Johan Hovold
---
drivers/usb/serial/io_ti.
Use the port wait queue and make sure to check the serial disconnected
flag before accessing private port data after waking up.
This is is needed as the private port data (including the wait queue
itself) can be gone when waking up after a disconnect.
Cc: stable
Signed-off-by: Johan Hovold
Use the port wait queue and make sure to check the serial disconnected
flag before accessing private port data after waking up.
This is is needed as the private port data (including the wait queue
itself) can be gone when waking up after a disconnect.
Cc: stable
Signed-off-by: Johan Hovold
e tty-port
one as we do not want to get woken up at hangup (yet).
Cc: stable
Signed-off-by: Johan Hovold
---
include/linux/usb/serial.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h
index ef9be7e..1819b59 100644
--- a/include/linu
Use the port wait queue and make sure to check the serial disconnected
flag before accessing private port data after waking up.
This is is needed as the private port data (including the wait queue
itself) can be gone when waking up after a disconnect.
Cc: stable
Signed-off-by: Johan Hovold
Remove bogus disconnect test introduced by 95bef012e ("USB: more serial
drivers writing after disconnect") which prevented queued data from
being freed on disconnect.
The possible IO it was supposed to prevent is long gone.
Cc: stable
Signed-off-by: Johan Hovold
---
drivers/
Use the port wait queue and make sure to check the serial disconnected
flag before accessing private port data after waking up.
This is is needed as the private port data (including the wait queue
itself) can be gone when waking up after a disconnect.
Cc: stable
Signed-off-by: Johan Hovold
pointer being NULL as it is
never assigned in the loop.
Cc: stable
Signed-off-by: Johan Hovold
---
drivers/usb/serial/cypress_m8.c | 14 --
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c
index 8efa19d
Use the port wait queue and make sure to check the serial disconnected
flag before accessing private port data after waking up.
This is is needed as the private port data (including the wait queue
itself) can be gone when waking up after a disconnect.
Cc: stable
Signed-off-by: Johan Hovold
Make sure the interface is not released before our serial device.
Note that drivers are still not allowed to access the interface in
any way that may interfere with another driver that may have gotten
bound to the same interface after disconnect returns.
Cc: stable
Signed-off-by: Johan Hovold
Use the port wait queue and make sure to check the serial disconnected
flag before accessing private port data after waking up.
This is is needed as the private port data (including the wait queue
itself) can be gone when waking up after a disconnect.
Cc: stable
Signed-off-by: Johan Hovold
Use the port wait queue and make sure to check the serial disconnected
flag before accessing private port data after waking up.
This is is needed as the private port data (including the wait queue
itself) can be gone when waking up after a disconnect.
Cc: stable
Signed-off-by: Johan Hovold
cannot be relied on to detect disconnects when woken up.
Cc: stable
Signed-off-by: Johan Hovold
---
drivers/usb/serial/ftdi_sio.c | 19 ---
1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index edd162d
Use the port wait queue and make sure to check the serial disconnected
flag before accessing private port data after waking up.
This is is needed as the private port data (including the wait queue
itself) can be gone when waking up after a disconnect.
Cc: stable
Signed-off-by: Johan Hovold
Use the port wait queue and make sure to check the serial disconnected
flag before accessing private port data after waking up.
This is is needed as the private port data (including the wait queue
itself) can be gone when waking up after a disconnect.
Cc: stable
Signed-off-by: Johan Hovold
Use the port wait queue and make sure to check the serial disconnected
flag before accessing private port data after waking up.
This is is needed as the private port data (including the wait queue
itself) can be gone when waking up after a disconnect.
Cc: stable
Signed-off-by: Johan Hovold
Use the port wait queue and make sure to check the serial disconnected
flag before accessing private port data after waking up.
This is is needed as the private port data (including the wait queue
itself) can be gone when waking up after a disconnect.
Cc: stable
Signed-off-by: Johan Hovold
Use the port wait queue and make sure to check the serial disconnected
flag before accessing private port data after waking up.
This is is needed as the private port data (including the wait queue
itself) can be gone when waking up after a disconnect.
Cc: stable
Signed-off-by: Johan Hovold
On Wed, Mar 20, 2013 at 11:04:14AM -0400, Alan Stern wrote:
> On Wed, 20 Mar 2013, Sergei Organov wrote:
>
> >
> > >> What is recomended driver to use for a USB device that provides just
> > >> 2 bulk end-points, in and out, to create a TTY to talk to it? Exact
> > >> data formats that are used a
On Wed, Mar 20, 2013 at 4:13 PM, Johan Hovold wrote:
> The reason why one shouldn't use the generic driver for a "real"
> usb-serial device is that you cannot control baudrates, etc, and of
> course that the device-driver matching isn't automatic.
>
> For
Please make sure to keep all parties CCed in your replies.
On Wed, Mar 20, 2013 at 07:18:16PM +0400, Sergei Organov wrote:
> Alan Stern
> writes:
>
> > On Wed, 20 Mar 2013, Sergei Organov wrote:
> >
> >>
> >> >> What is recomended driver to use for a USB device that provides just
> >> >> 2 bulk
On Wed, Mar 20, 2013 at 10:31:04PM +0400, Sergei Organov wrote:
> Johan Hovold writes:
>
> > Please make sure to keep all parties CCed in your replies.
>
> I've originally posted through gmane and continue to follow-up through
> gmane. Is there something wrong w
On Wed, Mar 20, 2013 at 10:42:50PM +0400, Sergei Organov wrote:
> Johan Hovold writes:
> [...]
> > Just for the record, there's really nothing wrong with the usb-serial
> > throughput. The days of a single read and write urb are long gone
> > (2.6.32 if I remember c
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
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
tation of kl5kusb105-close patch
v2:
- rebase on c41b3810c09 and two previously posted series
- expand usb-serial-bus-remove patch commit message
- fix typo in visor patch (already posted once)
Johan Hovold (94):
USB: ftdi_sio: remove obsolete port data refcounting
USB: kl5kusb105: remove unn
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
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
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
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
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
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
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
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 |
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
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
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
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
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
now
called as part of tty port shutdown, which can occur before the final
tty reference is dropped on device disconnect.
This means that the private port data refcounting is now completely
useless, as the last reference will always be dropped on port_remove.
Signed-off-by: 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
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
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
901 - 1000 of 3156 matches
Mail list logo