diff options
| -rw-r--r-- | include/linux/usb/hcd.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h index 66fc13705ab7..40edf6a8533e 100644 --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h | |||
| @@ -566,21 +566,22 @@ extern void usb_ep0_reinit(struct usb_device *); | |||
| 566 | ((USB_DIR_OUT|USB_TYPE_STANDARD|USB_RECIP_INTERFACE)<<8) | 566 | ((USB_DIR_OUT|USB_TYPE_STANDARD|USB_RECIP_INTERFACE)<<8) |
| 567 | 567 | ||
| 568 | /* class requests from the USB 2.0 hub spec, table 11-15 */ | 568 | /* class requests from the USB 2.0 hub spec, table 11-15 */ |
| 569 | #define HUB_CLASS_REQ(dir, type, request) ((((dir) | (type)) << 8) | (request)) | ||
| 569 | /* GetBusState and SetHubDescriptor are optional, omitted */ | 570 | /* GetBusState and SetHubDescriptor are optional, omitted */ |
| 570 | #define ClearHubFeature (0x2000 | USB_REQ_CLEAR_FEATURE) | 571 | #define ClearHubFeature HUB_CLASS_REQ(USB_DIR_OUT, USB_RT_HUB, USB_REQ_CLEAR_FEATURE) |
| 571 | #define ClearPortFeature (0x2300 | USB_REQ_CLEAR_FEATURE) | 572 | #define ClearPortFeature HUB_CLASS_REQ(USB_DIR_OUT, USB_RT_PORT, USB_REQ_CLEAR_FEATURE) |
| 572 | #define GetHubDescriptor (0xa000 | USB_REQ_GET_DESCRIPTOR) | 573 | #define GetHubDescriptor HUB_CLASS_REQ(USB_DIR_IN, USB_RT_HUB, USB_REQ_GET_DESCRIPTOR) |
| 573 | #define GetHubStatus (0xa000 | USB_REQ_GET_STATUS) | 574 | #define GetHubStatus HUB_CLASS_REQ(USB_DIR_IN, USB_RT_HUB, USB_REQ_GET_STATUS) |
| 574 | #define GetPortStatus (0xa300 | USB_REQ_GET_STATUS) | 575 | #define GetPortStatus HUB_CLASS_REQ(USB_DIR_IN, USB_RT_PORT, USB_REQ_GET_STATUS) |
| 575 | #define SetHubFeature (0x2000 | USB_REQ_SET_FEATURE) | 576 | #define SetHubFeature HUB_CLASS_REQ(USB_DIR_OUT, USB_RT_HUB, USB_REQ_SET_FEATURE) |
| 576 | #define SetPortFeature (0x2300 | USB_REQ_SET_FEATURE) | 577 | #define SetPortFeature HUB_CLASS_REQ(USB_DIR_OUT, USB_RT_PORT, USB_REQ_SET_FEATURE) |
| 577 | 578 | ||
| 578 | 579 | ||
| 579 | /*-------------------------------------------------------------------------*/ | 580 | /*-------------------------------------------------------------------------*/ |
| 580 | 581 | ||
| 581 | /* class requests from USB 3.1 hub spec, table 10-7 */ | 582 | /* class requests from USB 3.1 hub spec, table 10-7 */ |
| 582 | #define SetHubDepth (0x2000 | HUB_SET_DEPTH) | 583 | #define SetHubDepth HUB_CLASS_REQ(USB_DIR_OUT, USB_RT_HUB, HUB_SET_DEPTH) |
| 583 | #define GetPortErrorCount (0xa300 | HUB_GET_PORT_ERR_COUNT) | 584 | #define GetPortErrorCount HUB_CLASS_REQ(USB_DIR_IN, USB_RT_PORT, HUB_GET_PORT_ERR_COUNT) |
| 584 | 585 | ||
| 585 | /* | 586 | /* |
| 586 | * Generic bandwidth allocation constants/support | 587 | * Generic bandwidth allocation constants/support |
