1
0
Fork 0
Commit Graph

15 Commits (877d03105d04b2c13e241130277fa69c8d2564f0)

Author SHA1 Message Date
David Brownell caa9ef672a USB: ehci tolerates some buggy devices
This teaches EHCI how to to work around bugs in certain high speed
devices, by accomodating "bulk" packets that exceed the 512 byte
constant value required by the USB 2.0 specification.  (Have a
look at section 5.8.3, paragraphs 1 and 3.)

It also makes the descriptor parsing code warn when it encounters
such bugs.  (We've had reports of maybe two or three such devices,
all pretty recent.)

Such devices are nonconformant.  The proper fix is have the vendors
of those devices do the simple, obvious, and correct thing ... which
will let them be used with USB hosts that don't have workarounds for
this particular vendor bug.  But unless/until they do, we can at least
have one of the high speed HCDs work with such buggy devices.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24 21:16:35 -07:00
Greg Kroah-Hartman 2c044a4803 USB: fix codingstyle issues in drivers/usb/core/*.c
Fixes a number of coding style issues in the remaining .c files in
drivers/usb/core/

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:35:08 -08:00
Inaky Perez-Gonzalez 1145065cd0 usb: usb_get_configuration() obeys authorization
If called and the device is not authorized to be used, then we don't
allow reading the configurations.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-12 14:55:06 -07:00
Craig W. Nadler 165fe97ed6 USB: add IAD support to usbfs and sysfs
USB_IAD: Adds support for USB Interface Association Descriptors.

This patch adds support to the USB host stack for parsing, storing, and
displaying Interface Association Descriptors. In /proc/bus/usb/devices
lines starting with A: show the fields in an IAD. In sysfs if an
interface on a USB device is referenced by an IAD the following files
will be added to the sysfs directory for that interface:
iad_bFirstInterface, iad_bInterfaceCount, iad_bFunctionClass, and
iad_bFunctionSubClass, iad_bFunctionProtocol

Signed-off-by: Craig W. Nadler <craig@nadler.us>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:40 -07:00
Laurent Pinchart 300871cd96 USB: Fix up full-speed bInterval values in high-speed interrupt descriptor
Many device manufacturers are using full-speed bInterval values in high-speed
interrupt endpoint descriptors. If the bInterval value is greater than 16,
assume the device uses full-speed descriptors and fix the value accordingly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:37 -07:00
Alan Stern 60aac1ec26 USB: Handle bogus low-speed Bulk endpoints
A noticeable number of low-speed devices mistakenly include
descriptors for Bulk endpoints, which is forbidden by the USB spec.
In an attempt to make such devices more usable, this patch (as924)
converts the descriptors to Interrupt with an interval of 1 ms.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:31 -07:00
Alan Stern 615ae11b3b USB: Fix up bogus bInterval values in endpoint descriptors
This patch (as904) adds code to check for endpoint descriptor bInterval
values outside the legal limits.  Illegal values are set to 32 ms, which
seems like a reasonable default.

This fixes Bugzilla #8432.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-06-08 16:24:31 -07:00
Alan Stern 57a21c1b92 USB: don't try to kzalloc 0 bytes
This patch (as907) prevents us from trying to allocate 0 bytes
when an interface has no endpoint descriptors.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22 23:45:50 -07:00
Inaky Perez-Gonzalez cb4c8fe57c usb: deal with broken config descriptors
Change usb_get_configuration() so that it is more tolerant to devices
with bad configuration descriptors (it'll make it ignore
configurations that fail to load).

Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:55 -07:00
Jörn Engel 6ab3d5624e Remove obsolete #include <linux/config.h>
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-30 19:25:36 +02:00
Greg Kroah-Hartman 654f31189e [PATCH] USB: move CONFIG_USB_DEBUG checks into the Makefile
This lets us remove a lot of code in the drivers that were all checking
the same thing.  It also found some bugs in a few of the drivers, which
has been fixed up.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-17 11:29:55 -08:00
Alan Stern 4f62efe67f [PATCH] usbcore: Fix handling of sysfs strings and other attributes
This patch (as592) makes a few small improvements to the way device
strings are handled, and it fixes some bugs in a couple of other sysfs
attribute routines.  (Look at show_configuration_string() to see what I
mean.)

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 16:47:51 -07:00
Alan Stern 0a1ef3b5a7 [PATCH] usbcore: Use kzalloc instead of kmalloc/memset
This patch (as590) fixes up all the remaining places where usbcore can
use kzalloc rather than kmalloc/memset.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 16:47:51 -07:00
Greg KH 6d5e8254bf [PATCH] USB: fix up some sparse warnings about static functions that aren't static.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


Index: gregkh-2.6/drivers/usb/core/usb.h
===================================================================
2005-04-18 17:39:24 -07:00
Linus Torvalds 1da177e4c3 Linux-2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!
2005-04-16 15:20:36 -07:00