|
iPXE
|
USB hubs. More...
Go to the source code of this file.
Data Structures | |
| struct | usb_hub_descriptor_basic |
| A basic USB hub descriptor. More... | |
| struct | usb_hub_descriptor_enhanced |
| An enhanced USB hub descriptor. More... | |
| union | usb_hub_descriptor |
| A USB hub descriptor. More... | |
| struct | usb_hub_port_status |
| Port status. More... | |
| struct | usb_hub_device |
| A USB hub device. More... | |
Macros | |
| #define | USB_HUB_RECIP_PORT ( 3 << 0 ) |
| Request recipient is a port. More... | |
| #define | USB_HUB_DESCRIPTOR 41 |
| A basic USB hub descriptor. More... | |
| #define | USB_HUB_DESCRIPTOR_ENHANCED 42 |
| An enhanced USB hub descriptor. More... | |
| #define | USB_HUB_PORT_CONNECTION 0 |
| Current connect status feature. More... | |
| #define | USB_HUB_PORT_ENABLE 1 |
| Port enabled/disabled feature. More... | |
| #define | USB_HUB_PORT_RESET 4 |
| Port reset feature. More... | |
| #define | USB_HUB_PORT_POWER 8 |
| Port power feature. More... | |
| #define | USB_HUB_PORT_LOW_SPEED 9 |
| Low-speed device attached. More... | |
| #define | USB_HUB_PORT_HIGH_SPEED 10 |
| High-speed device attached. More... | |
| #define | USB_HUB_C_PORT_CONNECTION 16 |
| Connect status changed. More... | |
| #define | USB_HUB_C_PORT_ENABLE 17 |
| Port enable/disable changed. More... | |
| #define | USB_HUB_C_PORT_SUSPEND 18 |
| Suspend changed. More... | |
| #define | USB_HUB_C_PORT_OVER_CURRENT 19 |
| Over-current indicator changed. More... | |
| #define | USB_HUB_C_PORT_RESET 20 |
| Reset changed. More... | |
| #define | USB_HUB_C_PORT_LINK_STATE 25 |
| Link state changed. More... | |
| #define | USB_HUB_C_PORT_CONFIG_ERROR 26 |
| Configuration error. More... | |
| #define | USB_HUB_C_FEATURE(bit) ( 16 + (bit) ) |
| Calculate feature from change bit number. More... | |
| #define | USB_HUB_FEATURES |
| USB features. More... | |
| #define | USB_HUB_FEATURES_ENHANCED |
| USB features for enhanced hubs. More... | |
| #define | USB_HUB_SET_HUB_DEPTH |
| Set hub depth. More... | |
| #define | USB_HUB_CLEAR_TT_BUFFER |
| Clear transaction translator buffer. More... | |
| #define | USB_HUB_TT_SINGLE 1 |
| Transaction translator port value for single-TT hubs. More... | |
| #define | USB_HUB_SLOW_START 0x0001 |
| Hub requires additional settling delay. More... | |
| #define | USB_HUB_SLOW_START_DELAY_MS 500 |
| Additional setting delay for out-of-spec hubs. More... | |
| #define | USB_HUB_INTR_FILL 4 |
| Interrupt ring fill level. More... | |
| #define | USB_HUB_ENABLE_MAX_WAIT_MS 100 |
| Maximum time to wait for port to become enabled. More... | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| static int | usb_hub_get_descriptor (struct usb_device *usb, int enhanced, union usb_hub_descriptor *data) |
| Get hub descriptor. More... | |
| static int | usb_hub_get_port_status (struct usb_device *usb, unsigned int port, struct usb_hub_port_status *status) |
| Get port status. More... | |
| static int | usb_hub_clear_port_feature (struct usb_device *usb, unsigned int port, unsigned int feature, unsigned int index) |
| Clear port feature. More... | |
| static int | usb_hub_set_port_feature (struct usb_device *usb, unsigned int port, unsigned int feature, unsigned int index) |
| Set port feature. More... | |
| static int | usb_hub_set_hub_depth (struct usb_device *usb, unsigned int depth) |
| Set hub depth. More... | |
| static int | usb_hub_clear_tt_buffer (struct usb_device *usb, unsigned int device, unsigned int endpoint, unsigned int attributes, unsigned int tt_port) |
| Clear transaction translator buffer. More... | |
USB hubs.
Definition in file usbhub.h.
| #define USB_HUB_RECIP_PORT ( 3 << 0 ) |
| #define USB_HUB_DESCRIPTOR_ENHANCED 42 |
| #define USB_HUB_PORT_CONNECTION 0 |
| #define USB_HUB_PORT_ENABLE 1 |
| #define USB_HUB_PORT_HIGH_SPEED 10 |
| #define USB_HUB_C_PORT_CONNECTION 16 |
| #define USB_HUB_C_PORT_ENABLE 17 |
| #define USB_HUB_C_PORT_OVER_CURRENT 19 |
| #define USB_HUB_C_PORT_CONFIG_ERROR 26 |
| #define USB_HUB_FEATURES |
USB features.
| #define USB_HUB_FEATURES_ENHANCED |
USB features for enhanced hubs.
| #define USB_HUB_SET_HUB_DEPTH |
Set hub depth.
| #define USB_HUB_CLEAR_TT_BUFFER |
Clear transaction translator buffer.
| #define USB_HUB_TT_SINGLE 1 |
| #define USB_HUB_SLOW_START 0x0001 |
| #define USB_HUB_SLOW_START_DELAY_MS 500 |
| #define USB_HUB_INTR_FILL 4 |
| #define USB_HUB_ENABLE_MAX_WAIT_MS 100 |
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
inlinestatic |
Get hub descriptor.
| usb | USB device |
| enhanced | Hub is an enhanced hub |
| data | Hub descriptor to fill in |
| rc | Return status code |
Definition at line 146 of file usbhub.h.
References data, desc, len, usb_get_descriptor(), USB_HUB_DESCRIPTOR, USB_HUB_DESCRIPTOR_ENHANCED, and USB_TYPE_CLASS.
Referenced by hub_probe().
|
inlinestatic |
Get port status.
| usb | USB device |
| port | Port address |
| status | Port status descriptor to fill in |
| rc | Return status code |
Definition at line 168 of file usbhub.h.
References port, status, usb_get_status(), USB_HUB_RECIP_PORT, and USB_TYPE_CLASS.
Referenced by hub_enable(), and hub_speed().
|
inlinestatic |
Clear port feature.
| usb | USB device |
| port | Port address |
| feature | Feature to clear |
| index | Index (when clearing a port indicator) |
| rc | Return status code |
Definition at line 185 of file usbhub.h.
References index, port, usb_clear_feature(), USB_HUB_RECIP_PORT, and USB_TYPE_CLASS.
Referenced by hub_clear_changes(), and hub_disable().
|
inlinestatic |
Set port feature.
| usb | USB device |
| port | Port address |
| feature | Feature to clear |
| index | Index (when clearing a port indicator) |
| rc | Return status code |
Definition at line 202 of file usbhub.h.
References index, port, USB_HUB_RECIP_PORT, usb_set_feature(), and USB_TYPE_CLASS.
Referenced by hub_enable(), and hub_open().
|
inlinestatic |
Set hub depth.
| usb | USB device |
| depth | Hub depth |
| rc | Return status code |
Definition at line 217 of file usbhub.h.
References NULL, usb_control(), and USB_HUB_SET_HUB_DEPTH.
Referenced by hub_probe().
|
inlinestatic |
Clear transaction translator buffer.
| usb | USB device |
| device | Device address |
| endpoint | Endpoint address |
| attributes | Endpoint attributes |
| tt_port | Transaction translator port (or 1 for single-TT hubs) |
| rc | Return status code |
Definition at line 233 of file usbhub.h.
References NULL, usb_control(), USB_ENDPOINT_ATTR_TYPE_MASK, USB_ENDPOINT_IN, USB_ENDPOINT_MAX, USB_HUB_CLEAR_TT_BUFFER, and value.
Referenced by hub_clear_tt().
1.8.15