Greg Kroah-Hartman
bab5417f5f
USB: misc: iowarrior: add support for the 100 device
...
Add a new device id for the 100 devie. It has 4 interfaces like the 28
and 28L devices but a larger endpoint so more I/O pins.
Cc: Christoph Jung <jung@codemercs.com >
Cc: stable <stable@vger.kernel.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Link: https://lore.kernel.org/r/20200214161148.GA3963518@kroah.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-02-17 10:44:43 +01:00
Greg Kroah-Hartman
5f6f8da2d7
USB: misc: iowarrior: add support for the 28 and 28L devices
...
Add new device ids for the 28 and 28L devices. These have 4 interfaces
instead of 2, but the driver binds the same, so the driver changes are
minimal.
Cc: Christoph Jung <jung@codemercs.com >
Cc: stable <stable@vger.kernel.org >
Link: https://lore.kernel.org/r/20200212040422.2991-2-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-02-12 09:54:26 -08:00
Greg Kroah-Hartman
461d8deb26
USB: misc: iowarrior: add support for 2 OEMed devices
...
Add support for two OEM devices that are identical to existing
IO-Warrior devices, except for the USB device id.
Cc: Christoph Jung <jung@codemercs.com >
Cc: stable <stable@vger.kernel.org >
Link: https://lore.kernel.org/r/20200212040422.2991-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-02-12 09:54:23 -08:00
Linus Walleij
51d22e855e
usb: usb3503: Convert to use GPIO descriptors
...
This converts the USB3503 to pick GPIO descriptors from the
device tree instead of iteratively picking out GPIO number
references and then referencing these from the global GPIO
numberspace.
The USB3503 is only used from device tree among the in-tree
platforms. If board files would still desire to use it they can
provide machine descriptor tables.
Make sure to preserve semantics such as the reset delay
introduced by Stefan.
Cc: Chunfeng Yun <chunfeng.yun@mediatek.com >
Cc: Marek Szyprowski <m.szyprowski@samsung.com >
Cc: Stefan Agner <stefan@agner.ch >
Cc: Krzysztof Kozlowski <krzk@kernel.org >
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
[mszyprow: invert the logic behind reset GPIO line]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com >
Link: https://lore.kernel.org/r/20191211145226.25074-1-m.szyprowski@samsung.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-12-30 20:40:19 +01:00
Johan Hovold
3c11c4bed0
USB: adutux: fix interface sanity check
...
Make sure to use the current alternate setting when verifying the
interface descriptors to avoid binding to an invalid interface.
Failing to do so could cause the driver to misbehave or trigger a WARN()
in usb_submit_urb() that kernels with panic_on_warn set would choke on.
Fixes: 03270634e2 ("USB: Add ADU support for Ontrak ADU devices")
Cc: stable <stable@vger.kernel.org > # 2.6.19
Signed-off-by: Johan Hovold <johan@kernel.org >
Link: https://lore.kernel.org/r/20191210112601.3561-3-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-12-10 13:11:22 +01:00
Johan Hovold
59920635b8
USB: idmouse: fix interface sanity checks
...
Make sure to use the current alternate setting when verifying the
interface descriptors to avoid binding to an invalid interface.
Failing to do so could cause the driver to misbehave or trigger a WARN()
in usb_submit_urb() that kernels with panic_on_warn set would choke on.
Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Cc: stable <stable@vger.kernel.org >
Signed-off-by: Johan Hovold <johan@kernel.org >
Link: https://lore.kernel.org/r/20191210112601.3561-4-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-12-10 13:11:22 +01:00
Krzysztof Kozlowski
6aad39f639
usb: misc: Fix Kconfig indentation
...
Adjust indentation from spaces to tab (+optional two spaces) as in
coding style with command like:
$ sed -e 's/^ /\t/' -i */Kconfig
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org >
Link: https://lore.kernel.org/r/20191121132901.29186-1-krzk@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-11-21 14:39:40 +01:00
Oliver Neukum
92aa5986f4
USB: chaoskey: fix error case of a timeout
...
In case of a timeout or if a signal aborts a read
communication with the device needs to be ended
lest we overwrite an active URB the next time we
do IO to the device, as the URB may still be active.
Signed-off-by: Oliver Neukum <oneukum@suse.de >
Cc: stable <stable@vger.kernel.org >
Link: https://lore.kernel.org/r/20191107142856.16774-1-oneukum@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-11-11 14:29:39 +01:00
Oliver Neukum
91feb01596
appledisplay: fix error handling in the scheduled work
...
The work item can operate on
1. stale memory left over from the last transfer
the actual length of the data transfered needs to be checked
2. memory already freed
the error handling in appledisplay_probe() needs
to cancel the work in that case
Reported-and-tested-by: syzbot+495dab1f175edc9c2f13@syzkaller.appspotmail.com
Signed-off-by: Oliver Neukum <oneukum@suse.com >
Cc: stable <stable@vger.kernel.org >
Link: https://lore.kernel.org/r/20191106124902.7765-1-oneukum@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-11-07 11:19:23 +01:00
Johan Hovold
c1f602da92
USB: legousbtower: drop superfluous newlines
...
Drop some superfluous newlines before conditionals which made the code
harder to read.
Signed-off-by: Johan Hovold <johan@kernel.org >
Link: https://lore.kernel.org/r/20191105084152.16322-15-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-11-07 11:17:55 +01:00
Johan Hovold
3c84f4bbe3
USB: legousbtower: drop superfluous brackets
...
Drop superfluous brackets around single-line blocks.
Also add missing white space around operators in a for-expression being
modified.
Signed-off-by: Johan Hovold <johan@kernel.org >
Link: https://lore.kernel.org/r/20191105084152.16322-14-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-11-07 11:17:55 +01:00
Johan Hovold
a0cd1df9d3
USB: legousbtower: clean up runaway white space
...
Drop space between function identifiers and opening parenthesis, which
was no longer even used consistently within the driver.
Signed-off-by: Johan Hovold <johan@kernel.org >
Link: https://lore.kernel.org/r/20191105084152.16322-13-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-11-07 11:17:54 +01:00
Johan Hovold
728772489d
USB: legousbtower: drop redundant endianness comments
...
The endianness is already encoded in the type specifier so drop the
redundant little-endian comments from the message structs.
Signed-off-by: Johan Hovold <johan@kernel.org >
Link: https://lore.kernel.org/r/20191105084152.16322-12-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-11-07 11:17:54 +01:00
Johan Hovold
a76c234faf
USB: legousbtower: drop unnecessary packed attributes
...
Drop the packed attributes from the two message structs whose fields
are naturally aligned and do not have any padding.
Signed-off-by: Johan Hovold <johan@kernel.org >
Link: https://lore.kernel.org/r/20191105084152.16322-11-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-11-07 11:17:53 +01:00
Johan Hovold
7cfa11a573
USB: legousbtower: clean up pointer declarations in driver data
...
Clean up the pointer declarations in the driver data, whose style wasn't
even consistent with the rest of the driver.
Signed-off-by: Johan Hovold <johan@kernel.org >
Link: https://lore.kernel.org/r/20191105084152.16322-10-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-11-07 11:17:52 +01:00
Johan Hovold
aa6f383245
USB: legousbtower: remove tower_abort_transfers()
...
Drop the tower_abort_transfers() function which is now only called from
release and instead explicitly kill the two URBs.
This incidentally also fixes the outdated comment about freeing memory.
Signed-off-by: Johan Hovold <johan@kernel.org >
Link: https://lore.kernel.org/r/20191105084152.16322-9-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-11-07 11:17:52 +01:00
Johan Hovold
bafd1b1c2c
USB: legousbtower: stop interrupt-out URB unconditionally
...
Stop also the interrupt-out URB unconditionally in
tower_abort_transfers() which is called from release() (for connected
devices). Calling usb_kill_urb() for an idle URB is perfectly fine.
Signed-off-by: Johan Hovold <johan@kernel.org >
Link: https://lore.kernel.org/r/20191105084152.16322-8-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-11-07 11:17:51 +01:00
Johan Hovold
728fcd55e9
USB: legousbtower: drop redundant interrupt-in running flag
...
Drop the redundant interrupt-in-running flag, which tried to keep track
of when the interrupt-in URB was in flight. This isn't needed since we
can stop the URB unconditionally in tower_abort_transfers() and the URB
can not be submitted while usb_kill_urb() is running anyway.
Signed-off-by: Johan Hovold <johan@kernel.org >
Link: https://lore.kernel.org/r/20191105084152.16322-7-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-11-07 11:17:51 +01:00
Johan Hovold
835bd2b567
USB: legousbtower: drop noisy disconnect messages
...
User space already sees -ENODEV in case it tries to do I/O post
disconnect, no need to spam the logs with printk messages that don't
even include any device-id information.
Signed-off-by: Johan Hovold <johan@kernel.org >
Link: https://lore.kernel.org/r/20191105084152.16322-6-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-11-07 11:17:50 +01:00
Johan Hovold
b5a80252e0
USB: legousbtower: drop redundant open_count check
...
Drop redundant open_count check in release; the open count is used as a
flag and is only set to 0 or 1.
Signed-off-by: Johan Hovold <johan@kernel.org >
Link: https://lore.kernel.org/r/20191105084152.16322-5-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-11-07 11:17:50 +01:00
Johan Hovold
30da837a49
USB: legousbtower: zero driver data at allocation
...
Zero the driver data at allocation rather than depend on explicit
zeroing, which easy to miss.
Also drop an unnecessary driver-data pointer initialisation.
Signed-off-by: Johan Hovold <johan@kernel.org >
Link: https://lore.kernel.org/r/20191105084152.16322-4-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-11-07 11:17:49 +01:00
Johan Hovold
07efa87388
USB: legousbtower: drop redundant NULL check
...
Drop redundant NULL check from tower_abort_transfers(), which is never
called with a NULL argument.
Signed-off-by: Johan Hovold <johan@kernel.org >
Link: https://lore.kernel.org/r/20191105084152.16322-3-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-11-07 11:17:49 +01:00
Johan Hovold
fa5e146eec
USB: legousbtower: drop redundant MODULE_LICENSE ifdef
...
The MODULE_LICENSE macro is unconditionally defined in module.h, no need
to ifdef its use.
Signed-off-by: Johan Hovold <johan@kernel.org >
Link: https://lore.kernel.org/r/20191105084152.16322-2-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-11-07 11:17:48 +01:00
Johan Hovold
d3db9c4dc1
USB: idmouse: clean up runaway white space
...
Drop space between function identifiers and opening parenthesis, which
was no longer even used consistently within the driver.
Signed-off-by: Johan Hovold <johan@kernel.org >
Link: https://lore.kernel.org/r/20191105103638.4929-4-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-11-07 11:16:49 +01:00
Johan Hovold
6710f773b5
USB: idmouse: drop redundant open-count check from release
...
The open count will always be exactly one when release is called, so
drop the redundant sanity check.
Signed-off-by: Johan Hovold <johan@kernel.org >
Link: https://lore.kernel.org/r/20191105103638.4929-3-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-11-07 11:16:49 +01:00