aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorinaky@linux.intel.com <inaky@linux.intel.com>2006-10-11 23:05:58 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-12-01 17:23:26 -0500
commit437052516779fea608261a50682b124315f48f01 (patch)
tree19d172d8c306f6a2e20b110066ba6e8d25e76cd5 /include
parent0215ffb08ce99e2bb59eca114a99499a4d06e704 (diff)
usb/hub: allow hubs up to 31 children
Current Wireless USB host hardware (Intel i1480 for example) allows up to 22 devices to connect, thus bringing up the max number of children in the WUSB Host Controller to 22 'fake' ports. Upcoming hardware might raise that limit. Makes almost no difference to go to 31, as the bit arrays are byte-aligned (plus an extra bit in general), so 22 bits fit in 4 bytes as 31 do. As well, the only other array that depends on USB_MAXCHILDREN is 'struct usb_hub->indicator'. By declaring it 'u8' instead of 'enum hub_led_mode', we reduce the size of each entry from 4 bytes (in i386) to 1, which will add as we when are doubling USB_MAXCHILDREN (with 16 the size of that array is 64 bytes, with 31 would be 128; by using u8 that goes down to 31 bytes). Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/usb.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 5482bfb3303d..e5cb1690975a 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -313,8 +313,13 @@ struct usb_bus {
313/* This is arbitrary. 313/* This is arbitrary.
314 * From USB 2.0 spec Table 11-13, offset 7, a hub can 314 * From USB 2.0 spec Table 11-13, offset 7, a hub can
315 * have up to 255 ports. The most yet reported is 10. 315 * have up to 255 ports. The most yet reported is 10.
316 *
317 * Current Wireless USB host hardware (Intel i1480 for example) allows
318 * up to 22 devices to connect. Upcoming hardware might raise that
319 * limit. Because the arrays need to add a bit for hub status data, we
320 * do 31, so plus one evens out to four bytes.
316 */ 321 */
317#define USB_MAXCHILDREN (16) 322#define USB_MAXCHILDREN (31)
318 323
319struct usb_tt; 324struct usb_tt;
320 325