- 18 Sep, 2003 2 commits
-
-
Alan Stern authored
This patch changes the usb_parse_interface() routine so that it only handles a single interface/altsetting descriptor at a time, rather than trying to handle all the altsettings for an interface at once. Besides shrinking the code slightly, this has the advantage of not requiring the interfaces to be listed in order or all the altsetting descriptors for an interface to be contiguous. While there probably aren't any devices that have _discontiguous_ altsetting descriptors, there's no harm in allowing it -- particularly since doing so provides an overall simplification. This is another of those hard-to-read patches. It moves most of the body of the usb_parse_interface() function out of a loop, thereby changing the indentation level without actually altering the code.
-
Greg Kroah-Hartman authored
-
- 17 Sep, 2003 14 commits
-
-
Alan Stern authored
This patch removes the home-brewed resizeable arrays used to store altsetting structures, along with the now-unneeded max_altsetting field. Since we are already making a preliminary pass through all the descriptors to check their lengths, we take the opportunity to also count the number of altsetting descriptors for each interface. Then exactly the right number can be allocated all at once. This also moves the code that allocates the altsettings outside the usb_parse_interface() routine. Though not important now, this change will come in handy in the next patch.
-
Alan Stern authored
This patch centralizes the error checking for invalid descriptor lengths and unexpected descriptor types. Instead of doing it in three different places -- while parsing configuration, interface, and endpoint descriptors -- the new code does it all at once. Not surprisingly, this yields a net savings in code size.
-
Alan Stern authored
Although it's hard to tell from reading the patch, this just moves one section of code to a slightly different spot. Currently the code that skips over the extra class- and vendor-specific configuration-related descriptors is part of the loop that parses interface descriptors. The patch moves it outside, immediately before that loop -- where it belongs.
-
Alan Stern authored
This patch includes a bunch of little local improvements to the code, listed in the patch comments. There are only two notable changes. If a device has more configurations than our maximum, the code doesn't reject the device but simply parses as many configurations as it can and ignores the rest. Likewise, if a configuration contains too many interfaces, the code parses as many as it can and skips the excess. That way such devices will be at least partially useable. Since these limits are arbitrary and set by the implementation (not part of the USB spec), it doesn't make sense to reject a device that violates them. Numerous local programming improvements: Don't initialize to 0 fields in structures that have been memset to 0. Don't constantly keep track of how many bytes are parsed. Use local variables to hold unwieldy values. Remove redundant tests. Allow devices to have more configurations or interfaces than we can handle.
-
Alan Stern authored
This patch fixes the most blatant problems that can happen when an error is encountered during descriptor parsing. The struct device embedded within a struct usb_interface is initialized as soon as the structure is allocated, so that when put_device() is called it will contain valid data. put_device() is not called for unallocated interfaces. The pointers in config->extra are freed when the struct usb_host_config is freed. rawdescriptor pointers are initialized to 0 so that they can be freed without error. Partially parsed configurations are remembered so that they will be deallocated when the entire struct usb_device is freed.
-
David Brownell authored
It updates the "gadget" kerneldoc, removing some (new) warnings, and showing some fields it hadn't previously been showing (due to limitations in docproc). Plus it adds a bit of information about recent changes (new drivers).
-
Daniel Drake authored
-
Greg Kroah-Hartman authored
-
Alan Stern authored
This first patch makes only trivial changes. Excess whitespace at the end of lines is removed and return codes are altered from -1 to symbolic error values. The only significant difference is that in one spot a valid return is changed to an error return, when a descriptor does not have the correct type. - Remove excess whitespace at the ends of lines. - Change return codes to symbolic values. - Return an error when an invalid endpoint descriptor is found.
-
Randy Hron authored
Remove unneeded version.h and doubley included header. Test compiled on 2.6.0-test5-bk3.
-
Daniel Drake authored
When compiling usblp with debug info, a compile error occurs. I presume this is because this part of the code has not been updated since the 2.4 kernels. This patch fixes this. I also enhanced the debug output a little, as suggested by Randy Dunlap.
-
Daniel Drake authored
When compiling vicam with debug info, a compile error occurs. I presume this is because this part of the code has not been updated since the 2.4 kernels. This patch fixes this.
-
Nicolas Kaiser authored
-
Nicolas Kaiser authored
-
- 16 Sep, 2003 11 commits
-
-
Alan Stern authored
This patch fixes usbnet and usbtest. When checking endpoints, they iterate through all interfaces out to intf->max_altsetting, but they should only go up to intf->num_altsetting. The max_altsetting value refers to the amount of space _allocated_ for usb_host_interface structures, not the number that are really in use.
-
Greg Kroah-Hartman authored
This fixes build problem.
-
Daniel A. Nobuto authored
The `make pdfdocs' target still fails for me on the `writing_usb_drivers' document. There's one small bug in it, and one problem I haven't figured out yet. There is a malformed <literal>blah<literal> sequence, where the closing tag is instead an opening tag. Patch for that below.
-
David Brownell authored
I just noticed that Linus' tree is using the wrong CONFIG_* symbols for kicking in the PXA 2xx support (except for "gadgetfs"). It should use USB_PXA2XX not USB_PXA250, since it handles PXA 255, PXA 210, PXA 263, and others.
-
Pete Zaitcev authored
This seems to work well enough, we do not need the printout anymore.
-
Duncan Sands authored
-
Duncan Sands authored
Biscuit for Greg.
-
Duncan Sands authored
-
Duncan Sands authored
-
Greg Kroah-Hartman authored
Should fix bug number 1227
-
Greg Kroah-Hartman authored
Thanks to Pavel for the original version of this patch.
-
- 11 Sep, 2003 13 commits
-
-
bk://kernel.bkbits.net/davem/sparc-2.5Linus Torvalds authored
into home.osdl.org:/home/torvalds/v2.5/linux
-
David S. Miller authored
into kernel.bkbits.net:/home/davem/sparc-2.5
-
David S. Miller authored
-
Meelis Roos authored
-
Keith M. Wesolowski authored
-
Rob Radez authored
-
Ricky Beam authored
-
David S. Miller authored
into kernel.bkbits.net:/home/davem/net-2.5
-
Rusty Russell authored
Harald synced up ipt_REJECT.c from 2.4 route fixes, but it had changed a fair bit because of the nonlinear fixes. This repairs it. 1) Copying of tcp header onto stack. 2) ...which also checks length requirement. 3) Skip checksum check: requires linear packet.
-
Rusty Russell authored
Herve Eychenne noted that many ADSL connections get the same address when the interface comes back up, so some users use SNAT instead of masquerade. The answer is that MASQUERADE should only drop connections when the interface comes up, and then only if the interface address has actually changed.
-
David Woodhouse authored
-
Dave Jones authored
-
Chas Williams authored
-