- 17 Sep, 2003 13 commits
-
-
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 16 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
-
Chas Williams authored
- introduction of the struct array 'atm_proc_ents': - removal of code duplication in atm_proc_cleanup(); - removal of code duplication in atm_proc_init(); - removal of the macros CREATE_SEQ_ENTRY() and CREATE_ENTRY(); - /proc/net/atm/vcc returns to /proc/net/atm/vc; - credits at the top of the file; - replaced proc_dev_atm_operations by proc_atm_dev_ops; - atm_proc_dev_register: removal of tasteless "fail0/fail1" labels.
-
Chas Williams authored
seq_file support for /proc/net/atm/lec: - lec_info(): seq_printf/seq_putc replaces sprintf; - traversal of the lec structure needs to walk: -> the lec interfaces -> the tables of arp tables(lec_arp_tables); -> the arp tables themselves -> the misc tables (lec_arp_empty_ones/lec_no_forward/mcast_fwds) Sum up of the call tree: atm_lec_seq_start()/atm_lec_seq_next() -> atm_lec_get_idx() -> atm_lec_itf_walk() (responsible for dev_lec/dev_put handling) -> atm_lec_priv_walk() (responsible for lec_priv locking) -> atm_lec_arp_walk() -> atm_lec_tbl_walk() -> atm_lec_misc_walk() -> atm_lec_tbl_walk() Each of the dedicated functions follows the same convention: return NULL as long as the seq_file cursor hasn't been digested (i.e. until < 0). Locking is only done when an entry (i.e. a lec_arp_table) is referenced. atm_lec_seq_stop()/atm_lec_itf_walk()/atm_lec_priv_walk() are responsible for getting this point right. - module refcounting is done in atm_lec_seq_open()/atm_lec_seq_release(); - atm_lec_info() is removed. Chas's suggestions applied since last version: - atm_seq_lec_fops renamed to lec_seq_fops; - change in state handling: it wasn't correctly set to its reset value after a complete interface walk; - lec_arp_get_status_string() bugfix.
-
Chas Williams authored
seq_file support for /proc/net/atm/arp: - svc_addr/atmarp_info(): seq_printf/seq_putc replace sprintf and friends; - arp_getidx/arp_vcc_walk() take care of the usual seq_file cursor positionning: they both return NULL until the cursor has reached its position. struct atm_arp_state is updated accordingly; - arp_seq_{stop/start} are responsible for clip_tbl_hook (un)locking; - module refcounting is done in arp_seq_open()/arp_seq_release(); - atm_lec_info() is removed. Chas's suggestions applied since last version: - atm_arp_xxx renamed to arp_xxx; - atm_seq_arp_fops renamed to arp_seq_fops. Chas didn't ask for it but I renamed arp_vc_walk to arp_vcc_walk.
-