descriptors in reverse order.
Signed-off-by: Johan Hovold
---
drivers/usb/core/usb.c | 116 ++---
include/linux/usb.h| 35 +++
2 files changed, 115 insertions(+), 36 deletions(-)
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
.
Signed-off-by: Johan Hovold
---
drivers/usb/core/usb.c | 83 ++
include/linux/usb.h| 35 +
2 files changed, 118 insertions(+)
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index a2ccc69fb45c..4d074233d526
to avoid any
regressions.
Signed-off-by: Johan Hovold
---
drivers/usb/misc/adutux.c | 38 +++---
1 file changed, 11 insertions(+), 27 deletions(-)
diff --git a/drivers/usb/misc/adutux.c b/drivers/usb/misc/adutux.c
index db9a9e6ff6be..42f5f94adf3c 100644
--- a
Use the new endpoint helpers to lookup the required bulk-in and bulk-out
endpoints.
Signed-off-by: Johan Hovold
---
drivers/usb/misc/usblcd.c | 47 ++-
1 file changed, 18 insertions(+), 29 deletions(-)
diff --git a/drivers/usb/misc/usblcd.c b/drivers
: Johan Hovold
---
drivers/usb/misc/lvstest.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/misc/lvstest.c b/drivers/usb/misc/lvstest.c
index d3d124753266..b3bd32f0f202 100644
--- a/drivers/usb/misc/lvstest.c
+++ b/drivers/usb/misc/lvstest.c
@@ -367,10 +367,9
On Mon, Mar 06, 2017 at 04:56:31PM +0100, Johan Hovold wrote:
> On Mon, Mar 06, 2017 at 04:01:36PM +0100, Johan Hovold wrote:
> > On Mon, Mar 06, 2017 at 02:14:51PM +0100, Oliver Neukum wrote:
> > > Am Montag, den 06.03.2017, 12:27 +0100 schrieb Johan Hovold:
> > > >
On Wed, Mar 15, 2017 at 04:58:47PM +0100, Bjørn Mork wrote:
> Johan Hovold writes:
>
> > + if ((!bulk_in || *bulk_in) && (!bulk_out || *bulk_out) &&
> > + (!int_in || *int_in) && (!int_out || *int_out)) {
> > + r
On Thu, Mar 02, 2017 at 12:51:13PM +0100, Johan Hovold wrote:
> This series refactors the endpoint sanity checks by allowing subdrivers
> to specify a minimum number of endpoints required per type and letting
> core verify this during probe.
>
> Note that the checks are minimum
This driver have treated the interrupt endpoint as optional despite it
always being present (according to the datasheet). Let's consider it
mandatory instead.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/mos7720.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --
Use the calc_num_ports rather than probe callback to determine which
interface to bind to.
This allows us to remove some duplicate code.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/aircable.c | 36
1 file changed, 8 insertions(+), 28 deletions
Use the new endpoint-remap functionality to configure the ports for
treo devices instead of poking around in the port structures after the
ports have been setup.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/visor.c | 82 ++
1 file changed, 24
resources for unused endpoints, and specifically
a port is no longer registered for the unused first endpoint pair when
there are more than three endpoints.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/ipaq.c | 41 +++--
1 file changed, 15 insertions(+), 26
Add a probe callback to the generic driver and print the
only-for-testing message there.
This is a first step in getting rid of the CONFIG_USB_SERIAL_GENERIC
ifdef from usb-serial core.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/generic.c| 12
drivers/usb/serial/usb
Setup each port to use the first bulk-out endpoint in calc_num_ports so
that core allocates the corresponding port resources for us.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/mxuport.c | 103 +--
1 file changed, 12 insertions(+), 91 deletions
drivers as part of probe. This
allows for clean ups in USB-serial core as well as in several
subdrivers.
Note that this also enables the omninet driver to use the generic write
implementation.
Johan
Johan Hovold (29):
USB: serial: allow subdrivers to modify port-endpoint mapping
USB: serial: add
port count can be
retrieved, for example:
echo 0 0x110A 0x1410 > new_id
Signed-off-by: Johan Hovold
---
drivers/usb/serial/mxuport.c | 27 ---
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/drivers/usb/serial/mxuport.c b/drivers/usb/ser
Setup each port to use the first bulk-out endpoint in calc_num_ports so
that core allocates the corresponding port resources for us.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/f81534.c | 62 -
1 file changed, 11 insertions(+), 51 deletions
Implement the "horrible endpoint hack" for some legacy devices as a
quirk and clean up the code somewhat.
Note that the bulk-endpoint check can be removed as core will already
have verified this.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/pl2
Add a calc_num_ports callback to the generic driver and verify that the
device has the required endpoints there instead of in core.
Note that the generic driver num_ports field was never used.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/generic.c| 18 --
drivers/usb
modifying the port-endpoint mapping (or aborting probe due to
missing endpoints), but only after the port structures have been setup.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/f81534.c | 3 ++-
drivers/usb/serial/ipaq.c | 6 --
drivers/usb/serial/mos7720.c| 3
We can now abort probe early after an error in calc_num_ports by
returning an errno instead of attempting to continue probing but not
register any ports.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/f81534.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers
is missing, and an
attempt to write to a port whose device lack a bulk-out endpoint would
fail with -ENODEV.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/mxuport.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/serial/mxuport.c b/drivers/usb/serial/mxuport.c
index
interrupt-in endpoint in calc_num_ports for all
devices so that the hack can first be applied.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/pl2303.c | 57 +++--
drivers/usb/serial/usb-serial.c | 40 -
2 files changed, 55
Use the calc_num_ports rather than attach callback to determine which
interface to bind to in order to avoid allocating port-resources for
interfaces that won't be bound.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/ipaq.c | 18 ++
1 file changed, 10 insertions(
Simplify the endpoint sanity check by letting core verify that the
required endpoints are present and moving the max-packet check to
calc_num_ports.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/f81534.c | 55 +
1 file changed, 11 insertions
Relax the generic driver bulk-endpoint requirement. The driver handles
devices without bulk-out endpoints just fine these days.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/generic.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/serial/generic.c b
Use the calc_num_ports rather than attach callback to verify that the
required endpoints are present when in download mode.
This avoids allocating port resources for interfaces that won't be bound.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/io_ti.c | 25 +++
).
Signed-off-by: Johan Hovold
---
drivers/usb/serial/mos7840.c | 23 +++
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
index 326d6c5055ef..770b3a470232 100644
--- a/drivers/usb/serial/mos7840.c
+++ b
that the disconnect callback was always redundant as all URBs would
have been killed by USB core on disconnect.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/omninet.c | 47
1 file changed, 21 insertions(+), 26 deletions(-)
diff --git a/drivers
Use the new endpoint-remap functionality to configure the ports for
clie_5 devices.
Note that the same bulk-out endpoint is being used for both ports.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/visor.c | 57 +++---
1 file changed, 23 insertions
Verify that the required interrupt endpoint is present at probe rather
than at open to avoid allocating resources for an unusable device.
Note that the endpoint is only required when in download mode.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/io_ti.c | 10 ++
1 file changed, 2
Drop the redundant calc_num_ports callback from the clie_5 type, for
which the callback always returns zero and hence falls back to the type
num_ports value (2).
Signed-off-by: Johan Hovold
---
drivers/usb/serial/visor.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/usb/serial
These devices always require at least one bulk-out endpoint so let core
verify that.
This avoids attempting to send bulk data to the default pipe when
downloading firmware in boot mode.
Note that further endpoints are still needed when not in boot mode.
Signed-off-by: Johan Hovold
---
drivers
need to override the default interrupt completion
handler.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/mos7720.c | 52 +---
1 file changed, 20 insertions(+), 32 deletions(-)
diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c
index
Clean up calc_num_ports with respect to handling older chips that lack
config data.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/f81534.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/serial/f81534.c b/drivers/usb/serial/f81534.c
index
.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/omninet.c | 93
1 file changed, 17 insertions(+), 76 deletions(-)
diff --git a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c
index 558a620d8868..efcd7feed6f4 100644
--- a/drivers/usb
Drop the redundant read-urb check from open. The presence of a bulk-in
endpoint is now verified during probe and core has allocated the
corresponding resources.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/io_ti.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/drivers/usb/serial
These devices always require at least one bulk-out endpoint so let core
verify that.
This avoids attempting to send bulk data to the default pipe when
downloading firmware in boot mode.
Note that further endpoints are still needed when not in boot mode.
Signed-off-by: Johan Hovold
---
drivers
, usb-storage and usblp (last
three patches)
- s/lookup/look up/ in kerneldoc comments
- simplify match_endpoint helper (Bjørn Mork)
- add the chaoskey and legousbtower maintainers on CC
- add temporary variables to avoid reinitialising return-value
variables where approporiate
Johan H
Use the new endpoint helpers to lookup the required interrupt-in and
interrupt-out endpoints.
Note that the descriptors are searched in reverse order to avoid any
regressions.
Cc: Juergen Stuber
Cc: legousb-de...@lists.sourceforge.net
Signed-off-by: Johan Hovold
---
drivers/usb/misc
descriptors in reverse order.
Signed-off-by: Johan Hovold
---
drivers/usb/core/usb.c | 112 +
include/linux/usb.h| 35
2 files changed, 111 insertions(+), 36 deletions(-)
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
Use the new endpoint helpers to lookup the required bulk-in endpoint.
Cc: Keith Packard
Signed-off-by: Johan Hovold
---
drivers/usb/misc/chaoskey.c | 22 ++
1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/drivers/usb/misc/chaoskey.c b/drivers/usb/misc
Drop a redundant sanity check for a NULL parent usb device, which is
never true.
Signed-off-by: Johan Hovold
---
drivers/usb/misc/adutux.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/drivers/usb/misc/adutux.c b/drivers/usb/misc/adutux.c
index db9a9e6ff6be..f0116d120468 100644
--- a
Make sure to return -ENOMEM on all allocation failures and -EIO on a
string-retrieval error (instead of returning -ENODEV for some such
errors).
Signed-off-by: Johan Hovold
---
drivers/usb/misc/adutux.c | 23 ++-
1 file changed, 10 insertions(+), 13 deletions(-)
diff --git
Use the new endpoint helpers to lookup the required bulk-out endpoint
and the depending on protocol likewise required bulk-in endpoint.
Cc: Pete Zaitcev
Signed-off-by: Johan Hovold
---
drivers/usb/class/usblp.c | 35 +--
1 file changed, 13 insertions(+), 22
Use the new endpoint helpers to lookup the required interrupt-in and
interrupt-out endpoints.
Note that the descriptors are searched in reverse order to avoid any
regressions.
Signed-off-by: Johan Hovold
---
drivers/usb/misc/adutux.c | 31 ---
1 file changed, 8
Use the new endpoint helpers to lookup the required interrupt-in
endpoint.
IOWarror56 devices also requires an interrupt-out endpoint, which is
looked up in a second call.
Note that the descriptors are searched in reverse order to avoid any
regressions.
Signed-off-by: Johan Hovold
---
drivers
Use the new endpoint helpers to lookup the required bulk-in endpoint.
Note that we now pick the first bulk-in endpoint regardless of whether
it happens to be the first descriptor.
Signed-off-by: Johan Hovold
---
drivers/usb/misc/idmouse.c | 31 ---
1 file changed
Use the new endpoint helpers to lookup the required bulk-in and bulk-out
endpoints.
Signed-off-by: Johan Hovold
---
drivers/usb/misc/ftdi-elan.c | 42 +-
1 file changed, 17 insertions(+), 25 deletions(-)
diff --git a/drivers/usb/misc/ftdi-elan.c b
Use the new endpoint helpers to lookup the required bulk-in and bulk-out
endpoints and the (typically) optional interrupt-in endpoint.
Cc: Alan Stern
Cc: usb-stor...@lists.one-eyed-alien.net
Signed-off-by: Johan Hovold
---
drivers/usb/storage/usb.c | 40
Use the new endpoint helpers to lookup the required bulk-in and bulk-out
endpoints.
Signed-off-by: Johan Hovold
---
drivers/usb/usb-skeleton.c | 59 --
1 file changed, 25 insertions(+), 34 deletions(-)
diff --git a/drivers/usb/usb-skeleton.c b
Use the new endpoint helpers to lookup the required interrupt-in
endpoint and optional interrupt-out endpoint.
Note that the descriptors are searched in reverse order to avoid any
regressions.
Signed-off-by: Johan Hovold
---
drivers/usb/misc/ldusb.c | 23 +--
1 file changed
: Johan Hovold
---
drivers/usb/misc/lvstest.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/misc/lvstest.c b/drivers/usb/misc/lvstest.c
index d3d124753266..b3bd32f0f202 100644
--- a/drivers/usb/misc/lvstest.c
+++ b/drivers/usb/misc/lvstest.c
@@ -367,10 +367,9
Use the new endpoint helpers to lookup the required bulk-in and bulk-out
endpoints.
Signed-off-by: Johan Hovold
---
drivers/usb/misc/usblcd.c | 47 ++-
1 file changed, 18 insertions(+), 29 deletions(-)
diff --git a/drivers/usb/misc/usblcd.c b/drivers
Use the new endpoint helpers to lookup the interrupt-in endpoint,
and only print the corresponding debugging information in case it is
found.
Note that the descriptors are searched in reverse order to avoid any
regressions.
Signed-off-by: Johan Hovold
---
drivers/usb/misc/uss720.c | 10
ver Neukum
Signed-off-by: Johan Hovold
---
drivers/usb/class/cdc-acm.c | 24 +++-
1 file changed, 7 insertions(+), 17 deletions(-)
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index d5388938bc7a..00d55ba8983f 100644
--- a/drivers/usb/class/cdc-acm.c
+++
Use the new endpoint helpers to lookup the required interrupt-in
endpoint.
Signed-off-by: Johan Hovold
---
drivers/usb/misc/yurex.c | 16 +---
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/drivers/usb/misc/yurex.c b/drivers/usb/misc/yurex.c
index 54e53ac4c08f
Use the new endpoint helpers to lookup the required interrupt-in
endpoint.
Note that the default retval was never used.
Signed-off-by: Johan Hovold
---
drivers/usb/misc/appledisplay.c | 19 ++-
1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/drivers/usb/misc
Use the new endpoint helpers to lookup the required bulk-in and bulk-out
endpoints, and the optional interrupt-in endpoint.
Signed-off-by: Johan Hovold
---
drivers/usb/class/usbtmc.c | 56 +++---
1 file changed, 18 insertions(+), 38 deletions(-)
diff
On Thu, Mar 16, 2017 at 03:37:28PM -0700, Dmitry Torokhov wrote:
> On Mon, Mar 13, 2017 at 04:45:52PM +0100, Johan Hovold wrote:
> > On Mon, Mar 13, 2017 at 04:15:18PM +0100, Oliver Neukum wrote:
> > > Am Montag, den 13.03.2017, 13:35 +0100 schrieb Johan Hovold:
> > > &
.
Signed-off-by: Johan Hovold
---
drivers/usb/core/usb.c | 83 ++
include/linux/usb.h| 35 +
2 files changed, 118 insertions(+)
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index a2ccc69fb45c..235438919671
On Sat, Mar 18, 2017 at 02:38:00AM +0300, Alexey Khoroshilov wrote:
> usbtmc_probe() returns zero in case of allocation failures.
>
> The patch fixes that. By the way it rearranges error lables just to improve
> readability of quite complex dependencies in error handling code.
This was in fact fi
On Fri, Mar 17, 2017 at 05:21:28PM +0100, Bjørn Mork wrote:
> This is a Dell branded Sierra Wireless EM7455.
>
> Cc:
> Signed-off-by: Bjørn Mork
Applied, thanks.
Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
On Fri, Mar 17, 2017 at 02:03:15PM -0700, Dmitry Torokhov wrote:
> On Fri, Mar 17, 2017 at 11:53:37AM +0100, Johan Hovold wrote:
> > On Thu, Mar 16, 2017 at 03:37:28PM -0700, Dmitry Torokhov wrote:
> > > On Mon, Mar 13, 2017 at 04:45:52PM +0100, Johan Hovold wrote:
> > >
On Wed, Mar 22, 2017 at 09:04:15AM +, Kalle Valo wrote:
> Johan Hovold wrote:
> > Make sure to check the number of endpoints to avoid dereferencing a
> > NULL-pointer or accessing memory beyond the endpoint array should a
> > malicious device lack the expected endp
On Wed, Mar 22, 2017 at 03:02:12PM +0200, Kalle Valo wrote:
> Johan Hovold writes:
>
> > On Wed, Mar 22, 2017 at 09:04:15AM +, Kalle Valo wrote:
> >> Johan Hovold wrote:
> >> > Make sure to check the number of endpoints to avoid dereferencing a
> >>
On Thu, Mar 23, 2017 at 01:56:35PM +0100, Greg Kroah-Hartman wrote:
> On Fri, Mar 17, 2017 at 11:35:29AM +0100, Johan Hovold wrote:
> > Many USB drivers iterate over the available endpoints to find required
> > endpoints of a specific type and direction. Typically the endpoints a
436ecf5519d892397af133a79ccd38a17c25fa51:
USB: serial: qcserial: add Dell DW5811e (2017-03-18 09:57:14 +0100)
USB-serial fixes for v4.11-rc4
Some more device ids for option and qcserial.
Signed-off-by: Johan Hovold
On Thu, Mar 23, 2017 at 10:57:05PM +0800, kbuild test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
> usb-testing
> head: 5370860a1f0e6b4197982dc1d323f988f7b1b11d
> commit: 279daf4e053470f22c9421a4ab05f8e5a9e9eeec [41/58] USB: core: add
> helpers to retri
On Thu, Mar 23, 2017 at 09:33:06PM +0100, Greg Kroah-Hartman wrote:
> On Thu, Mar 23, 2017 at 06:06:45PM +0100, Johan Hovold wrote:
> > On Thu, Mar 23, 2017 at 10:57:05PM +0800, kbuild test robot wrote:
> > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
Make the kerneldoc comment for usb_find_common_endpoints_reverse()
self-contained by adding a full description and removing the reference
to usb_find_common_endpoints().
Reported-by: kbuild test robot
Signed-off-by: Johan Hovold
---
drivers/usb/core/usb.c | 15 +--
1 file changed
approporiate
Johan Hovold (2):
USB: lvstest: tighten endpoint sanity check
USB: usbtmc: refactor endpoint retrieval
drivers/usb/class/usbtmc.c | 56 +++---
drivers/usb/misc/lvstest.c | 7 +++---
2 files changed, 21 insertions(+), 42 deletions
Use the new endpoint helpers to lookup the required bulk-in and bulk-out
endpoints, and the optional interrupt-in endpoint.
Signed-off-by: Johan Hovold
---
drivers/usb/class/usbtmc.c | 56 +++---
1 file changed, 18 insertions(+), 38 deletions(-)
diff
: Johan Hovold
---
drivers/usb/misc/lvstest.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/misc/lvstest.c b/drivers/usb/misc/lvstest.c
index 6d075cdb6ed1..2142132a1f82 100644
--- a/drivers/usb/misc/lvstest.c
+++ b/drivers/usb/misc/lvstest.c
@@ -367,10 +367,9
tterhoeven
Signed-off-by: Johan Hovold
---
drivers/usb/serial/io_edgeport.c | 5 -
drivers/usb/serial/io_ti.c| 8
drivers/usb/serial/mos7720.c | 11 ---
drivers/usb/serial/mos7840.c | 10 --
drivers/usb/serial/ti_usb_3410_5
On Wed, Mar 29, 2017 at 11:56:24AM +0200, Greg Kroah-Hartman wrote:
> On Tue, Mar 28, 2017 at 12:13:50PM +0200, Johan Hovold wrote:
> > Drop some unnecessary termios-flag debugging that have been faithfully
> > reproduced in a few old drivers, including the "clfag" typo an
after user space had
been notified of a new tty device.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/usb-serial.c | 8
1 file changed, 8 deletions(-)
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 0fa2030c275c..c7ca95f64edc 100644
--- a/driver
On Tue, Jul 12, 2016 at 10:18:05AM +0200, Jan Kundrát wrote:
> On Tuesday, 12 July 2016 01:50:59 CEST, Greg KH wrote:
> > There is, as far as I can tell, no set of "default" termios values for
> > any type of serial port, so the "last" set of them is as good as any,
> > right?
>
> Each driver spec
On Sun, Apr 02, 2017 at 10:12:38AM -0700, Joe Perches wrote:
> On Sun, 2017-04-02 at 18:57 +0200, Leif Neland wrote:
> > There is a patch
> > https://github.com/karlp/ch341-linux/blob/master/0001-usb-serial-ch341-Add-parity-support.patch
> > which enables parity selection for the ch341 USB-RS485 ad
On Mon, Mar 13, 2017 at 01:44:20PM +0100, Johan Hovold wrote:
> Make sure to check the number of endpoints to avoid dereferencing a
> NULL-pointer or accessing memory beyond the endpoint array should a
> malicious device lack the expected endpoints.
>
> Fixes: 36bcce430657 (&qu
The transfer buffers and URBs are allocated and initialised by USB
serial core during probe, and there's no need to check for NULL transfer
buffers in the bulk-in completion handlers.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/iuu_phoenix.c | 9 +++--
1 file changed, 3 inser
Drop redundant calls to tty_buffer_request_room and use the more
efficient tty_insert_flip_char when inserting single characters.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/quatech2.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/usb/serial/quatech2.c b
On Mon, Apr 03, 2017 at 01:02:28PM +, Kalle Valo wrote:
> Kalle Valo writes:
>
> > Johan Hovold writes:
> >
> >> On Mon, Mar 13, 2017 at 01:44:20PM +0100, Johan Hovold wrote:
> >>> Make sure to check the number of endpoints to avoid dereferencing a
On Mon, Apr 03, 2017 at 01:21:08PM +, Kalle Valo wrote:
> Johan Hovold writes:
>
> > On Mon, Apr 03, 2017 at 01:02:28PM +, Kalle Valo wrote:
> >> Kalle Valo writes:
> >>
> >> > Johan Hovold writes:
> >> >
> >>
On Tue, Apr 04, 2017 at 12:36:00PM +0200, Alexander Kozyrev wrote:
> Hi all!
>
> Have troubles with Ragentek chip in Mediatek Leagoo Android phone. It's
> tries to connect as ttyACM0 device and ttyUSB0 - unsuccessful.
>
> [2.219806] usb 1-1: new high-speed USB device number 36 using xhci_hcd
> [2
On Tue, Apr 04, 2017 at 03:26:41PM +0200, Alexander Kozyrev wrote:
> On Tue, 2017-04-04 at 15:06 +0200, Johan Hovold wrote:
> > How did you get the generic driver to bind to 0e8d:2000? You need to
> > tell the generic driver to bind also to 0bb4:0c01, for example,
> >
>
On Wed, Apr 05, 2017 at 11:14:49AM +0200, Paul Menzel wrote:
> On 04/05/17 10:31, Oliver Neukum wrote:
> > but did anything come out of this? Do we need to add a quirk?
>
> Dell said they tried to reproduce this, and couldn’t. Maybe it’s mouse
> dependent, there are different revisions, and the
On Fri, Feb 01, 2013 at 10:44:25AM +0800, Chris Ruehl wrote:
> I file a report for you, please have a look when you have time.
Thanks for the bug report, Chris.
You have come across what looks like a known issue, which since it's
discovery last summer has been made worse by an unrelated change.
Make sure serial-driver dtr_rts is called with disc_mutex held after
checking the disconnected flag.
Due to a bug in the tty layer, dtr_rts may get called after a device has
been disconnected and the tty-device unregistered. Some drivers have had
individual checks for disconnect to make sure the d
On Wed, Feb 13, 2013 at 04:34:36PM +0200, Felipe Balbi wrote:
> On Wed, Feb 13, 2013 at 03:28:51PM +0100, Johan Hovold wrote:
> > Make sure serial-driver dtr_rts is called with disc_mutex held after
> > checking the disconnected flag.
> >
> > Due to a bug in the tty la
s the
port data is now also NULL when dtr_rts is called resulting in further
oopses.
Reported-by: Chris Ruehl
Cc: sta...@vger.kernel.org
Signed-off-by: Johan Hovold
---
Resend with missing Signed-off-by added...
drivers/usb/serial/ftdi_sio.c | 20 +---
drivers/usb/serial/
Untangle port-shutdown logic and make sure the initialised flag is
always cleared for non-console ports.
---
drivers/tty/tty_port.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/tty_port.c b/drivers/tty/tty_port.c
index b7ff59d..57a061e 100644
--- a/drive
while the second patch fixes HUPCL handling and the last fixes the
closing of uninitialised ports.
Johan
Johan Hovold (4):
tty: clean up port shutdown
tty: fix DTR/RTS not being dropped on hang up
tty: clean up port drain-delay handling
tty: fix close of uninitialised ports
d
Make sure we do not make tty driver callbacks or wait for port to drain
on uninitialised ports (e.g. when open failed) in
tty_port_close_start().
No callbacks should be made on a port that has never been opened.
Neither does it make any sense to add drain delay for an uninitialised
port.
Currentl
Move port drain-delay handling to a separate function.
---
drivers/tty/tty_port.c | 29 ++---
1 file changed, 18 insertions(+), 11 deletions(-)
diff --git a/drivers/tty/tty_port.c b/drivers/tty/tty_port.c
index ffe3689..0a5e955 100644
--- a/drivers/tty/tty_port.c
+++ b/dri
Move HUPCL handling to port shutdown so that DTR/RTS is dropped also on
hang up.
Currently a hung up port will return immediately from
tty_port_close_start leaving DTR/RTS unchanged.
---
drivers/tty/tty_port.c | 22 --
1 file changed, 12 insertions(+), 10 deletions(-)
diff --
On Wed, Feb 13, 2013 at 05:36:30PM +, Alan Cox wrote:
> > [ Note that this closing of an uninitialised port seems to be a bug in
> > itself, which these patches aim to fix. ]
>
> You don't want to be cc'ing me on these - not my problem any more.
>
> (but you might want to fix the fact you r
Move HUPCL handling to port shutdown so that DTR/RTS is dropped also on
hang up.
Currently a hung up port will return immediately from
tty_port_close_start leaving DTR/RTS unchanged.
---
v2: fix tty refcounting in shutdown
drivers/tty/tty_port.c | 23 +--
1 file changed, 13
On Wed, Feb 13, 2013 at 08:11:13PM -0500, Peter Hurley wrote:
> On Wed, 2013-02-13 at 14:32 -0500, Peter Hurley wrote:
> > On Wed, 2013-02-13 at 18:27 +0100, Johan Hovold wrote:
> > > Move HUPCL handling to port shutdown so that DTR/RTS is dropped also on
> > > hang u
On Wed, Feb 13, 2013 at 08:39:31PM -0500, Peter Hurley wrote:
> On Wed, 2013-02-13 at 18:27 +0100, Johan Hovold wrote:
> > Move port drain-delay handling to a separate function.
> > ---
> > drivers/tty/tty_port.c | 29 ++---
> > 1 file ch
601 - 700 of 3156 matches
Mail list logo