19 Mar, 2016
1 commit
-
The iowarrior driver expects at least one valid endpoint. If given
malicious descriptors that specify 0 for the number of endpoints,
it will crash in the probe function. Ensure there is at least
one endpoint on the interface before using it.The full report of this issue can be found here:
http://seclists.org/bugtraq/2016/Mar/87Reported-by: Ralf Spenneberg
Cc: stable
Signed-off-by: Josh Boyer
Signed-off-by: Greg Kroah-Hartman
04 Mar, 2016
1 commit
-
usb_autopm_put_interface() should be called regardless of what
idmouse_create_image() returns.Signed-off-by: Junjie Mao
Signed-off-by: Greg Kroah-Hartman
21 Feb, 2016
3 commits
-
To allow for and clean handling of signals an URB is introduced.
Signed-off-by: Oliver Neukum
Signed-off-by: Keith Packard
Signed-off-by: Greg Kroah-Hartman -
Shares the cleanup code between all probe failure paths, instead of
having per-failure cleanup at each point in the function.Signed-off-by: Oliver Neukum
Signed-off-by: Keith Packard
Signed-off-by: Greg Kroah-Hartman -
This reverts commit 4b61b4f205eabfc9f863f805858aa5b32deb3de5.
As reported by Oliver, this change was unnecessary.
Reported-by: Oliver Neukum
Cc: Vegard Nossum
Signed-off-by: Greg Kroah-Hartman
15 Feb, 2016
1 commit
-
warning: (USB_APPLEDISPLAY) selects BACKLIGHT_LCD_SUPPORT which has unmet direct dependencies (HAS_IOMEM)
Signed-off-by: Vegard Nossum
Signed-off-by: Greg Kroah-Hartman
25 Jan, 2016
7 commits
-
Remove a call to dev_err() that was reporting an unsuccesful call to
kmalloc(), as reporting memory allocation failures is redundant. Instead
of logging the error, clean up previously allocated resources and abort
the probe with -ENOMEM. Before this change sisusb->SiS_Pr could be
dereferenced even if null after failure of memory allocation.Signed-off-by: Peter Senna Tschudin
Signed-off-by: Greg Kroah-Hartman -
This patch remove three calls to dev_err() from sisusb_probe() as
reporting memory allocation failures is redundant:- Remove a call to dev_err() that was reporting unsuccesful call to
kzalloc().- Remove two calls to dev_err() that were reporting unsuccesful calls
to kmalloc().One call to dev_err() reporting memory allocation is left unchanged as
the last patch of the series removes it.Signed-off-by: Peter Senna Tschudin
Signed-off-by: Greg Kroah-Hartman -
This patch removes null test before calls to kfree() as kfree() can
handle null pointers safely.Signed-off-by: Peter Senna Tschudin
Signed-off-by: Greg Kroah-Hartman -
The file drivers/usb/misc/sisusbvga/sisusb.c had 6 assignments inside if
tests. This patch move the assignment outside the test. The changes
also fix the remaining 2 lines that were over 80 characters.Signed-off-by: Peter Senna Tschudin
Signed-off-by: Greg Kroah-Hartman -
The file drivers/usb/misc/sisusbvga/sisusb.c contained coding style
issues reported by checkpatch. This patch fixes the following
errors:
- 12 WARNING: braces {} are not necessary for single statement blocks
- 04 ERROR: return is not a function, parentheses are not required
- 03 ERROR: do not initialise statics to 0
- 1 WARNING: else is not generally useful after a break or return
- 1 WARNING: braces {} are not necessary for any arm of this statement
- 1 WARNING: Block comments use * on subsequent linesOne case in which braces are not necessary is left unchanged as other
patch of the series will fix it.Signed-off-by: Peter Senna Tschudin
Signed-off-by: Greg Kroah-Hartman -
This patch fixes whitespace coding style issues that can't be fixed
without adding newlines. This patch fixes the following checkpatch
warnings:
- 20 ERROR: trailing statements should be on next line
- 15 WARNING: line over 80 characters
- 03 WARNING: Missing a blank line after declarations
- 01 ERROR: space required after that ','Five lines over 80 characters are left. The first three wont change as
the fix would require split the cast and variable name in different
lines which makes the code less readable. The last two will be fixed by
other patch in the series.Signed-off-by: Peter Senna Tschudin
Signed-off-by: Greg Kroah-Hartman -
This patch fixes whitespace coding style issues that can be fixed
within a single line. This patch fixes the following checkpatch
warnings:
- 83 ERROR: space required after that ','
- 13 ERROR: switch and case should be at the same indent
- 08 WARNING: please, no spaces at the start of a line
- 03 ERROR: space required before the open parenthesis '('
- 04 WARNING: suspect code indent for conditional statements
- 01 WARNING: space prohibited between function name and open parenthesis
- 01 ERROR: spaces required around that '='
- 01 ERROR: code indent should use tabs where possibleSigned-off-by: Peter Senna Tschudin
Signed-off-by: Greg Kroah-Hartman
14 Jan, 2016
1 commit
-
Pull USB updates from Greg KH:
"Here is the big USB drivers update for 4.5-rc1.Lots of gadget driver updates and fixes, like usual, and a mix of
other USB driver updates as well. Full details in the shortlog. All
of these have been in linux-next for a while"* tag 'usb-4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (191 commits)
MAINTAINERS: change my email address
USB: usbmon: remove assignment from IS_ERR argument
USB: mxu11x0: drop redundant function name from error messages
USB: mxu11x0: fix debug-message typos
USB: mxu11x0: rename usb-serial driver
USB: mxu11x0: fix modem-control handling on B0-transitions
USB: mxu11x0: fix memory leak on firmware download
USB: mxu11x0: fix memory leak in port-probe error path
USB: serial: add Moxa UPORT 11x0 driver
USB: cp210x: add ID for ELV Marble Sound Board 1
usb: chipidea: otg: use usb autosuspend to suspend bus for HNP
usb: chipidea: host: set host to be null after hcd is freed
usb: chipidea: removing of_find_property
usb: chipidea: implement platform shutdown callback
usb: chipidea: clean up CONFIG_USB_CHIPIDEA_DEBUG reference
usb: chipidea: delete static debug support
usb: chipidea: support debugfs without CONFIG_USB_CHIPIDEA_DEBUG
usb: chipidea: udc: improve error handling on _hardware_enqueue
usb: chipidea: udc: _ep_queue and _hw_queue cleanup
usb: dwc3: of-simple: fix build warning on !PM
...
23 Dec, 2015
1 commit
-
Signed-off-by: Al Viro
02 Dec, 2015
2 commits
-
timeval is deprecated and not y2038 safe. Its size also changes according
to 32 bit/ 64 bit compilation. Replace it with 32 and 64 bit versions of
its individual fields, giving two ioctls with different code values.
The two ioctls are necessary to maintain the 32 bit and 64 bit userspace
compatibility with a 64/32 bit kernel.Change unsigned to __u32 types for a definitive userspace interface.
This is in accordance with the psABI that the unsigned type is always
32 bits.Also use motonic timer instead of real time to ensure positive delta
values.Refactor usbtest_ioctl for readability to isolate the handling of the
testing timing measurement.The official testusb userspace tool can be changed in a separate patch
to reflect the __u32 changes as well. It can use the usbtest_param_32
struct, since 32 bit seconds is long enough for test durations.Signed-off-by: Deepa Dinamani
Reviewed-by: Arnd Bergmann
Signed-off-by: Greg Kroah-Hartman -
Now the function of complicated_callback is not only used for iso
transfer, improve the error message to reflect it.Signed-off-by: Peter Chen
Signed-off-by: Greg Kroah-Hartman
25 Oct, 2015
1 commit
-
Use i2c_add_driver as it will add THIS_MODULE for us.
Signed-off-by: Andrew F. Davis
Signed-off-by: Greg Kroah-Hartman
23 Oct, 2015
1 commit
-
Felipe writes:
usb: patches for v4.4 merge window
This pull request is large with a total of 136 non-merge
commits. Because of its size, we will only describe the big things in
broad terms.Many will be happy to know that dwc3 is now almost twice as fast after
some profiling and speed improvements. Also in dwc3, John Youn from
Synopsys added support for their new DWC USB3.1 IP Core and the HAPS
platform which can be used to validate it.A series of patches from Robert Baldyga cleaned up uses of
ep->driver_data as a flag for "claimed endpoint" in favor of the new
ep->claimed flag.Sudip Mukherjee fixed a ton of really old problems on the amd5536udc
driver. That should make a few people happy.Heikki Krogerus worked on converting dwc3 to the unified device property
interface.Together with these, there's a ton of non-critical fixes, typos and
stuff like that.Signed-off-by: Felipe Balbi
14 Oct, 2015
1 commit
-
The bulk queue tests are used to show 'best performance' for bulk
transfer, we are often asked this question by users. The implementation
is the same with iso test, that is queue request at interrupt completion,
so we reuse the iso structures, and rename them as common one.It's result should be very close to IC simulation, in order
to get that, the device side should also need to prepare enough
queue.We have got the 'best performance' (IN: 41MB, OUT: 39MB) at i.mx platform
(USB2, ARM Cortex A9, stream mode need to enable) with below command:Host side:
modprobe usbtest
./testusb -a -t 27 -g 64 -s 16384
./testusb -a -t 28 -g 64 -s 16384
Gadget side:
modprobe g_zero loopdefault=1 qlen=64 buflen=16384Signed-off-by: Peter Chen
Cc: Greg KH
Cc: Alan Stern
Signed-off-by: Felipe Balbi
04 Oct, 2015
1 commit
-
Rng reads in chaoskey driver could return the same data under
the certain conditions.Signed-off-by: Alexander Inyukhin
Cc: stable
Signed-off-by: Greg Kroah-Hartman
27 Sep, 2015
4 commits
-
With this change, the host and gadget doesn't need to agree with transfer
length for comparing the data, since they doesn't know each other's
transfer size, but know max packet size.Signed-off-by: Peter Chen
Acked-by: Michal Nazarewicz
(Fixed the 'line over 80 characters warning' by Peter Chen)
Tested-by: Peter Chen
Signed-off-by: Alan Stern
Signed-off-by: Felipe Balbi -
Using the same data format "buf[j] = (u8)(i + j)" among
write, compare buf, and console output stage.Acked-by: Michal Nazarewicz
Signed-off-by: Peter Chen
Signed-off-by: Felipe Balbi -
The element of urbs array will be initialized at below code
at once.for (i = 0; i < param->sglen; i++) {
urbs[i] = iso_alloc_urb(udev, pipe, desc,
param->length, offset);Acked-by: Michal Nazarewicz
Signed-off-by: Peter Chen
Signed-off-by: Felipe Balbi -
Allocate the size of urb pointer array according to testusb's
parameter sglen, and limits the length of sglen as MAX_SGLEN
(128 currently).Acked-by: Michal Nazarewicz
Signed-off-by: Peter Chen
Signed-off-by: Felipe Balbi
19 Aug, 2015
1 commit
-
The current code prints all wMaxPacketSize content at endpoint
descriptor, if there is a high speed, high bandwidth endpoint,
it may confuse the users, eg, if there are 3 transactions during
microframe, it will print "wMaxPacket 1400" for packet content.
This commit splits wMaxpacketSize and transaction numbers for
output messages.Signed-off-by: Peter Chen
Signed-off-by: Greg Kroah-Hartman
06 Aug, 2015
1 commit
-
Replace redundant variable use in return statement.
Signed-off-by: Saurabh Karajgaonkar
Signed-off-by: Greg Kroah-Hartman
27 Jun, 2015
1 commit
-
Pull USB updates from Greg KH:
"Here's the big USB patchset for 4.2-rc1. As is normal these days, the
majority of changes are in the gadget drivers, with a bunch of other
small driver changes.All of these have been in linux-next with no reported issues"
* tag 'usb-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (175 commits)
usb: dwc3: Use ASCII space in Kconfig
usb: chipidea: add work-around for Marvell HSIC PHY startup
usb: chipidea: allow multiple instances to use default ci_default_pdata
dt-bindings: Consolidate ChipIdea USB ci13xxx bindings
phy: add Marvell HSIC 28nm PHY
phy: Add Marvell USB 2.0 OTG 28nm PHY
dt-bindings: Add Marvell PXA1928 USB and HSIC PHY bindings
USB: ssb: use devm_kzalloc
USB: ssb: fix error handling in ssb_hcd_create_pdev()
usb: isp1760: check for null return from kzalloc
cdc-acm: Add support of ATOL FPrint fiscal printers
usb: chipidea: usbmisc_imx: Remove unneeded semicolon
USB: usbtmc: add device quirk for Rigol DS6104
USB: serial: mos7840: Use setup_timer
phy: twl4030-usb: add ABI documentation
phy: twl4030-usb: remove incorrect pm_runtime_get_sync() in probe function.
phy: twl4030-usb: remove pointless 'suspended' test in 'suspend' callback.
phy: twl4030-usb: make runtime pm more reliable.
drivers:usb:fsl: Fix compilation error for fsl ehci drv
usb: renesas_usbhs: Don't disable the pipe if Control write status stage
...
26 Jun, 2015
1 commit
-
pratyush.anand@st.com email-id doesn't exist anymore as I have left the
company. Replace ST's id with pratyush.anand@gmail.com.Signed-off-by: Pratyush Anand
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
01 Jun, 2015
1 commit
-
Removes Vernier Software & Technology devices from the ldusb
driver and the hid_ignore_list table of the usbhid driver in the
Linux tree. These devices will now be supported via the hidraw
driver.A user space driver for these devices will be found in the
Go! Software Development Kit from Vernier at
http://www.vernier.com/downloads/software-development-kits/go-sdk/.
These devices are also be supported by the LabQuest2 standalone
interface shown at http://www.vernier.com/products/interfaces/labq2/
and the LoggerPro for Linux software shown at
http://www.vernier.com/downloads/logger-pro-linux/.Signed-off-by: Dennis O'Brien
Acked-by: Greg Kroah-Hartman
Signed-off-by: Jiri Kosina
10 May, 2015
3 commits
-
We should not be doing assignments within an if () block
so fix up the code to not do this.change was created using Coccinelle.
CC: Andy Shevchenko
Signed-off-by: Greg Kroah-Hartman
Reviewed-by: Felipe Balbi -
We should not be doing assignments within an if () block
so fix up the code to not do this.change was created using Coccinelle.
CC: Thomas Winischhofer
Signed-off-by: Greg Kroah-Hartman
Reviewed-by: Felipe Balbi -
We should not be doing assignments within an if () block
so fix up the code to not do this.change was created using Coccinelle.
CC: Thomas Winischhofer
Signed-off-by: Greg Kroah-Hartman
Reviewed-by: Felipe Balbi
04 Apr, 2015
1 commit
-
Fix build errors when HW_RANDOM is not enabled:
drivers/built-in.o: In function `chaoskey_disconnect':
chaoskey.c:(.text+0x5f3f00): undefined reference to `hwrng_unregister'
drivers/built-in.o: In function `chaoskey_probe':
chaoskey.c:(.text+0x5f42a6): undefined reference to `hwrng_register'Signed-off-by: Randy Dunlap
Signed-off-by: Greg Kroah-Hartman
01 Apr, 2015
1 commit
-
> drivers/usb/misc/chaoskey.c: In function 'chaoskey_read':
> >> drivers/usb/misc/chaoskey.c:412:3: error: implicit declaration of function 'copy_to_user'
> >> [-Werror=implicit-function-declaration]
> remain = copy_to_user(buffer, dev->buf + dev->used, this_time);I was unable to reproduce this locally, but added an explicit
#include
which should ensure the definition on all architectures.
> sparse warnings: (new ones prefixed by >>)
>
> >> drivers/usb/misc/chaoskey.c:117:30: sparse: incorrect type in assignment (different base types)
> drivers/usb/misc/chaoskey.c:117:30: expected int [signed] size
> drivers/usb/misc/chaoskey.c:117:30: got restricted __le16 [usertype] wMaxPacketSizeSwitched the code to using the USB descriptor accessor functions.
Signed-off-by: Keith Packard
Signed-off-by: Greg Kroah-Hartman
26 Mar, 2015
2 commits
-
This is necessary to set REF_SEL appropriately in uses where refclk is
always available.Signed-off-by: Ben Gamari
Acked-by: Marek Szyprowski
Signed-off-by: Greg Kroah-Hartman -
This is a hardware random number generator. The driver provides both a
/dev/chaoskeyX entry and hooks the entropy source up to the kernel
hwrng interface. More information about the device can be found at
http://chaoskey.orgThe USB ID for ChaosKey was allocated from the OpenMoko USB vendor
space and is visible as 'USBtrng' here:http://wiki.openmoko.org/wiki/USB_Product_IDs
v2: Respond to review from Oliver Neukum
* Delete extensive debug infrastructure and replace it with calls to
dev_dbg.* Allocate I/O buffer separately from device structure to obey
requirements for non-coherant architectures.* Initialize mutexes before registering device to ensure that open
cannot be invoked before the device is ready to proceed.* Return number of bytes read instead of -EINTR when partial read
operation is aborted due to a signal.* Make sure device mutex is unlocked in read error paths.
* Add MAINTAINERS entry for the driver
Signed-off-by: Keith Packard
Cc: Oliver Neukum
Signed-off-by: Greg Kroah-Hartman
18 Mar, 2015
2 commits
-
The backlight_device_unregister() function tests whether its argument is NULL
and then returns immediately. Thus the test around the call is not needed.This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
Signed-off-by: Greg Kroah-Hartman -
This is only an API consolidation and should make things more readable
it replaces var * HZ / 1000 by msecs_to_jiffies(var).Signed-off-by: Nicholas Mc Guire
Signed-off-by: Greg Kroah-Hartman
10 Jan, 2015
1 commit
-
There is a %*ph specifier that allows to dump small buffers. This patch
converts the code to use the specifier.Signed-off-by: Andy Shevchenko
Signed-off-by: Greg Kroah-Hartman