aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r--include/linux/usb.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 73c7df489607..6f49a1b39fa6 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -292,6 +292,16 @@ struct usb_host_config {
292 int extralen; 292 int extralen;
293}; 293};
294 294
295/* USB2.0 and USB3.0 device BOS descriptor set */
296struct usb_host_bos {
297 struct usb_bos_descriptor *desc;
298
299 /* wireless cap descriptor is handled by wusb */
300 struct usb_ext_cap_descriptor *ext_cap;
301 struct usb_ss_cap_descriptor *ss_cap;
302 struct usb_ss_container_id_descriptor *ss_id;
303};
304
295int __usb_get_extra_descriptor(char *buffer, unsigned size, 305int __usb_get_extra_descriptor(char *buffer, unsigned size,
296 unsigned char type, void **ptr); 306 unsigned char type, void **ptr);
297#define usb_get_extra_descriptor(ifpoint, type, ptr) \ 307#define usb_get_extra_descriptor(ifpoint, type, ptr) \
@@ -381,6 +391,7 @@ struct usb_tt;
381 * @ep0: endpoint 0 data (default control pipe) 391 * @ep0: endpoint 0 data (default control pipe)
382 * @dev: generic device interface 392 * @dev: generic device interface
383 * @descriptor: USB device descriptor 393 * @descriptor: USB device descriptor
394 * @bos: USB device BOS descriptor set
384 * @config: all of the device's configs 395 * @config: all of the device's configs
385 * @actconfig: the active configuration 396 * @actconfig: the active configuration
386 * @ep_in: array of IN endpoints 397 * @ep_in: array of IN endpoints
@@ -399,6 +410,9 @@ struct usb_tt;
399 * FIXME -- complete doc 410 * FIXME -- complete doc
400 * @authenticated: Crypto authentication passed 411 * @authenticated: Crypto authentication passed
401 * @wusb: device is Wireless USB 412 * @wusb: device is Wireless USB
413 * @lpm_capable: device supports LPM
414 * @usb2_hw_lpm_capable: device can perform USB2 hardware LPM
415 * @usb2_hw_lpm_enabled: USB2 hardware LPM enabled
402 * @string_langid: language ID for strings 416 * @string_langid: language ID for strings
403 * @product: iProduct string, if present (static) 417 * @product: iProduct string, if present (static)
404 * @manufacturer: iManufacturer string, if present (static) 418 * @manufacturer: iManufacturer string, if present (static)
@@ -442,6 +456,7 @@ struct usb_device {
442 struct device dev; 456 struct device dev;
443 457
444 struct usb_device_descriptor descriptor; 458 struct usb_device_descriptor descriptor;
459 struct usb_host_bos *bos;
445 struct usb_host_config *config; 460 struct usb_host_config *config;
446 461
447 struct usb_host_config *actconfig; 462 struct usb_host_config *actconfig;
@@ -460,6 +475,9 @@ struct usb_device {
460 unsigned authorized:1; 475 unsigned authorized:1;
461 unsigned authenticated:1; 476 unsigned authenticated:1;
462 unsigned wusb:1; 477 unsigned wusb:1;
478 unsigned lpm_capable:1;
479 unsigned usb2_hw_lpm_capable:1;
480 unsigned usb2_hw_lpm_enabled:1;
463 int string_langid; 481 int string_langid;
464 482
465 /* static strings from the device */ 483 /* static strings from the device */
@@ -1574,7 +1592,7 @@ usb_maxpacket(struct usb_device *udev, int pipe, int is_out)
1574 return 0; 1592 return 0;
1575 1593
1576 /* NOTE: only 0x07ff bits are for packet size... */ 1594 /* NOTE: only 0x07ff bits are for packet size... */
1577 return le16_to_cpu(ep->desc.wMaxPacketSize); 1595 return usb_endpoint_maxp(&ep->desc);
1578} 1596}
1579 1597
1580/* ----------------------------------------------------------------------- */ 1598/* ----------------------------------------------------------------------- */