| Age | Commit message (Collapse) | Author | Files | Lines |
|
Uninitialised Apple iSight drivers present with a distinctive USB ID.
Once firmware has been uploaded, they disconnect and reconnect with a
new ID. At this point they can be driven by the uvcvideo driver. As this
is unique to the Apple cameras and not functionality shared by any other
UVC devices, it makes sense to provide the firmware loading
functionality in a separate driver. This driver will read an isight.fw
file extracted from the Apple driver using the tools at
http://bersace03.free.fr/ift/ and upload it to the camera. It will also
handle the case where the device loses its firmware during hibernation
and must have it reloaded.
Signed-off-by: Matthew Garrett <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
There is a race from when a device is created with device_create() and
then the drvdata is set with a call to dev_set_drvdata() in which a
sysfs file could be open, yet the drvdata will be NULL, causing all
sorts of bad things to happen.
This patch fixes the problem by using the new function,
device_create_drvdata(). It fixes all 3 phidget drivers, which all have
the same problem.
Cc: Kay Sievers <[email protected]>
Cc: Sean Young <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
On Mon, May 12, 2008 at 01:02:22AM -0700, David Brownell wrote:
> On Sunday 11 May 2008, Marcin Slusarz wrote:
> >
> > test_ctrl_queue expects (?) positive and negative errnos.
> > what is going on here?
>
> The sign is just a way to flag something:
>
> /* some faults are allowed, not required */
>
> The negative ones are required. Positive codes are optional,
> in the sense that, depending on how the peripheral happens
> to be implemented, they won't necessarily be triggered.
>
> For example, the test to fetch a device qualifier desriptor
> must succeed if the device is running at high speed. So that
> test is marked as negative. But when it's full speed, it
> could legitimately fail; marked as positive. And so on for
> other tests.
>
> Look at how the codes are *interpreted* to see it work.
Lets document it.
Based on comment from David Brownell <[email protected]>.
Signed-off-by: Marcin Slusarz <[email protected]>
Cc: David Brownell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Microchip has changed the PICDEM FS USB demo device (0x04d8:000c)
to use bulk transfer and not interrupt transfer. So I've updated the libusb
based program here (Post #31).
http://forum.microchip.com/tm.aspx?m=106426&mpage=2
So I believe that the in-kernel ldusb driver will no longer work with the
demo firmware. It should be removed.
Signed-off-by: Xiaofan Chen <[email protected]>
Cc: Michael Hund <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Minor cleanup to the "usbtest" driver, mostly to resolve a regression:
all the important diagnostics were at KERN_DEBUG, so that when the
"#define DEBUG" was removed from the top of that file it stopped
providing diagnostics. Fix by using KERN_ERROR. Also:
- Stop using the legacy dbg() calls
- Simplify the internal debug macros
- Correct some test descriptions:
* Test #10 subcase 7 should *always* stall
* Test #10 subcase 8 *may* stall
- Diagnostic about control queue test failures is more informative
- Fix some whitespace "bugs"
And add a warning about the rude interaction between usbfs ioctl()
and khubd during device disconnect ... don't unplug a device under
test, that will wedge.
Signed-off-by: David Brownell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Signed-off-by: Daniel Walker <[email protected]>
Acked-by: Matthew Wilcox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
urb->context code cleanup
Signed-off-by: Ming Lei <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
__FUNCTION__ is gcc-specific, use __func__
Signed-off-by: Harvey Harrison <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Since nothing under the USB misc/ seems to be obviously experimental,
remove the EXPERIMENTAL dependency from those Kconfig entries.
Signed-off-by: Robert P. J. Day <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
power.power_state is scheduled for removal. This patch (as1053)
removes all uses of that field from drivers/usb. Almost all of them
were write-only, the most significant exceptions being sl811-hcd.c and
u132-hcd.c.
Part of this patch was written by Pavel Machek.
Signed-off-by: Alan Stern <[email protected]>
Cc: David Brownell <[email protected]>
Acked-by: Pavel Machek <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /
(d)) but is perhaps more readable.
An extract of the semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@haskernel@
@@
#include <linux/kernel.h>
@depends on haskernel@
expression n,d;
@@
(
- (n + d - 1) / d
+ DIV_ROUND_UP(n,d)
|
- (n + (d - 1)) / d
+ DIV_ROUND_UP(n,d)
)
@depends on haskernel@
expression n,d;
@@
- DIV_ROUND_UP((n),d)
+ DIV_ROUND_UP(n,d)
@depends on haskernel@
expression n,d;
@@
- DIV_ROUND_UP(n,(d))
+ DIV_ROUND_UP(n,d)
// </smpl>
Signed-off-by: Julia Lawall <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The semaphore ccp->mutex is used as mutex, convert it to the mutex API
Signed-off-by: Matthias Kaehlcke <[email protected]>
Cc: Wolfgang Mües <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The semaphore ccp->readmutex is used as mutex, convert it to the mutex API
Signed-off-by: Matthias Kaehlcke <[email protected]>
Cc: Wolfgang Mües <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The semaphore cp->mutex is used as mutex, convert it to the mutex API
Signed-off-by: Matthias Kaehlcke <[email protected]>
Cc: Wolfgang Mües <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
None of these files use any of the functionality promised by
asm/semaphore.h. It's possible that they rely on it dragging in some
unrelated header file, but I can't build all these files, so we'll have
fix any build failures as they come up.
Signed-off-by: Matthew Wilcox <[email protected]>
|
|
This patch (as1062) fixes a bug in the scatter-gather initialization
code in the usbtest driver. When the sg-helper conversion was
performed, it wasn't done correctly.
Signed-off-by: Alan Stern <[email protected]>
CC: Jens Axboe <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
I have a new ldusb device to go into the device table. Jiri has merged
the change for hiddev quirks already.
From: Stephen Ware <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
trancevibrator should not pretend success if it returns an error.
Signed-off-by: Oliver Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Signed-off-by: Jan Engelhardt <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The dev->sem conforms to mutex style usage. This patch converts it to use
the struct mutex type, and new API.
There is also a small style fix around this comment,
/* unlock here as tower_delete frees dev */
Where I broke the line up to meet the 80 char limit.
Signed-off-by: Daniel Walker <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Dopey thing to do and lockdep will (or should) warn.
Spotted by Daniel Walker.
Cc: Matthias Kaehlcke <[email protected]>
Cc: Daniel Walker <[email protected]>
Cc: Ingo Molnar <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
USB testing driver: convert semaphore dev->sem to the mutex API
Signed-off-by: Matthias Kaehlcke <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
here's a minor update to the cypress_cy7c63 driver
providing new contact and usage information.
From: Oliver Bock <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
kernels
Remove dead code while at it.
Signed-off-by: Fernando Luis Vazquez Cao <[email protected]>
Cc: Thomas Winischhofer <[email protected]>
Cc: Greg KH <[email protected]>
Cc: "Antonino A. Daplas" <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
usbtest did not swap the received status information when checking for
a non-zero value and failed to discover halted endpoints on big endian
systems.
Cc: stable <[email protected]>
Signed-off-by: Jan Andersson <[email protected]>
Acked-by: David Brownell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Two main issues fixed here are:
- An improper use of in-struct lock to protect an open count
- Use of urb status for -EINPROGRESS
Also, along the way:
- Change usb_unlink_urb to usb_kill_urb. Apparently there's no need
to use usb_unlink_urb whatsoever in this driver, and the old use of
usb_kill_urb was outright racy (it unlinked and immediately freed).
- Fix indentation in adu_write. Looks like it was damaged by a script.
- Vitaly wants -EBUSY on multiply opens.
- bInterval was taken from a wrong endpoint.
Signed-off-by: Pete Zaitcev <[email protected]>
Signed-off-by: Vitaliy Ivanov <[email protected]>
Tested-by: Vitaliy Ivanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
usbled has a race where show methods for attributes in sysfs can
follow a NULL pointer during disconnect. The correct ordering fixes
it.
Signed-off-by: Oliver Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
this driver has a possible use after free due to a race when disconnect
and open handle intfdata without a lock.
Signed-off-by: Oliver Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
again, possible use after free due to touching intfdata without lock.
Signed-off-by: Oliver Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
the driver sets intfdata to NULL without lock. Data structures can be
freed and accessed.
Signed-off-by: Oliver Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
the emi62 also lacks an error check.
Signed-off-by: Oliver Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
this drivers lacks an error check.
Signed-off-by: Oliver Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
the disconnect method of this driver set intfdata to NULL before
removing attribute files. The attributes' read methods will happily
follow the NULL pointer. Here's the correct ordering.
Signed-off-by : Oliver Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Pete caused me to lock at buggy drivers in this respect. The idmouse has
a race between open and disconnect. This patch
- solves the open/disconnect race
- switches locking to mutexes
Signed-off-by: Oliver Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The Coverity checker spotted that we have already oops'ed if "dev"
was NULL in these places.
Since "dev" being NULL isn't possible at these places this patch removes
the NULL checks.
Additionally, I've fixed the formatting of the if's.
Signed-off-by: Adrian Bunk <[email protected]>
Acked-by: Oliver Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The Coverity checker spotted that we have already oops'ed if "dev"
was NULL.
Since "dev" being NULL doesn't seem to be possible here this patch
removes the NULL check.
Signed-off-by: Adrian Bunk <[email protected]>
Acked-by: Oliver Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
FTDI Elan driver: Convert the semaphore ftdi->u132_lock to the mutex
API
Signed-off-by: Matthias Kaehlcke <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
parport_ieee1284_interrupt() was not using its first arg at all.
Delete.
parport_generic_irq()'s second arg makes its first arg completely
redundant. Delete, and use port->irq in the one place where we actually
need it.
Also, s/__inline__/inline/ to make the code look nicer.
Signed-off-by: Jeff Garzik <[email protected]>
|
|
Signed-off-by: Jens Axboe <[email protected]>
|
|
* Convert files to UTF-8.
* Also correct some people's names
(one example is Eißfeldt, which was found in a source file.
Given that the author used an ß at all in a source file
indicates that the real name has in fact a 'ß' and not an 'ss',
which is commonly used as a substitute for 'ß' when limited to
7bit.)
* Correct town names (Goettingen -> Göttingen)
* Update Eberhard Mönkeberg's address (http://lkml.org/lkml/2007/1/8/313)
Signed-off-by: Jan Engelhardt <[email protected]>
Signed-off-by: Adrian Bunk <[email protected]>
|
|
Found these while looking at printk uses.
Add missing newlines to dev_<level> uses
Add missing KERN_<level> prefixes to multiline dev_<level>s
Fixed a wierd->weird spelling typo
Added a newline to a printk
Signed-off-by: Joe Perches <[email protected]>
Cc: "Luck, Tony" <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: Mark M. Hoffman <[email protected]>
Cc: Roland Dreier <[email protected]>
Cc: Tilman Schmidt <[email protected]>
Cc: David Woodhouse <[email protected]>
Cc: Jeff Garzik <[email protected]>
Cc: Stephen Hemminger <[email protected]>
Cc: Greg KH <[email protected]>
Cc: Jeremy Fitzhardinge <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Cc: David Brownell <[email protected]>
Cc: James Smart <[email protected]>
Cc: Andrew Vasquez <[email protected]>
Cc: "Antonino A. Daplas" <[email protected]>
Cc: Evgeniy Polyakov <[email protected]>
Cc: Russell King <[email protected]>
Cc: Jaroslav Kysela <[email protected]>
Cc: Takashi Iwai <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
Various console drivers are able to resize the screen via the con_resize()
hook. This hook is also visible in userspace via the TIOCWINSZ, VT_RESIZE and
VT_RESIZEX ioctl's. One particular utility, SVGATextMode, expects that
con_resize() of the VGA console will always return success even if the
resulting screen is not compatible with the hardware. However, this
particular behavior of the VGA console, as reported in Kernel Bugzilla Bug
7513, can cause undefined behavior if the user starts with a console size
larger than 80x25.
To work around this problem, add an extra parameter to con_resize(). This
parameter is ignored by drivers except for vgacon. If this parameter is
non-zero, then the resize request came from a VT_RESIZE or VT_RESIZEX ioctl
and vgacon will always return success. If this parameter is zero, vgacon will
return -EINVAL if the requested size is not compatible with the hardware. The
latter is the more correct behavior.
With this change, SVGATextMode should still work correctly while in-kernel and
stty resize calls can expect correct behavior from vgacon.
Signed-off-by: Antonino Daplas <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
Kill two unused variables in drivers/usb/misc/sisusbvga/sisusb.c.
Signed-off-by: WANG Cong <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
drivers/usb/misc/sisusbvga/sisusb.c: In function 'sisusb_open':
drivers/usb/misc/sisusbvga/sisusb.c:2444: warning: 'sisusb' is used uninitialized in this function
I can tell that'll oops just by looking at it.
How come this code assume a 7,000 column xterm? :(
Cc: Felipe Balbi <[email protected]>
Cc: Thomas <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
drivers/usb/misc/sisusbvga/sisusb.c: In function sisusb_open
drivers/usb/misc/sisusbvga/sisusb.c:2444: warning: sisusb is used uninitialized in this function
is a genuine bug (which will cause oops). We cannot use "sisusb" in
error path for (!interface), because sisusb will itself be derived
from "interface" later.
Signed-off-by: Satyam Sharma <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This fixes a small memory leak that happens every time the device is
plugged in.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
this driver lacks a test for unlink due to ESHUTDOWN
Signed-off-by: Oliver Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
drivers/usb/misc/ftdi-elan.c | 121253 -> 121196 (-57 bytes)
drivers/usb/misc/ftdi-elan.o | 209425 -> 209265 (-160 bytes)
Signed-off-by: Mariusz Kozlowski <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch convert printk entries to dev_* macros, this provide better
debugging and better readability to the code.
Signed-off-by: Felipe Balbi <[email protected]>
Cc: Thomas <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|