|
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. | |
| #define | USB_HUB_DESCRIPTOR 41 |
| A basic USB hub descriptor. | |
| #define | USB_HUB_DESCRIPTOR_ENHANCED 42 |
| An enhanced USB hub descriptor. | |
| #define | USB_HUB_PORT_CONNECTION 0 |
| Current connect status feature. | |
| #define | USB_HUB_PORT_ENABLE 1 |
| Port enabled/disabled feature. | |
| #define | USB_HUB_PORT_RESET 4 |
| Port reset feature. | |
| #define | USB_HUB_PORT_POWER 8 |
| Port power feature. | |
| #define | USB_HUB_PORT_LOW_SPEED 9 |
| Low-speed device attached. | |
| #define | USB_HUB_PORT_HIGH_SPEED 10 |
| High-speed device attached. | |
| #define | USB_HUB_C_PORT_CONNECTION 16 |
| Connect status changed. | |
| #define | USB_HUB_C_PORT_ENABLE 17 |
| Port enable/disable changed. | |
| #define | USB_HUB_C_PORT_SUSPEND 18 |
| Suspend changed. | |
| #define | USB_HUB_C_PORT_OVER_CURRENT 19 |
| Over-current indicator changed. | |
| #define | USB_HUB_C_PORT_RESET 20 |
| Reset changed. | |
| #define | USB_HUB_C_PORT_LINK_STATE 25 |
| Link state changed. | |
| #define | USB_HUB_C_PORT_CONFIG_ERROR 26 |
| Configuration error. | |
| #define | USB_HUB_C_FEATURE(bit) |
| Calculate feature from change bit number. | |
| #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 |
| Transaction translator port value for single-TT hubs. | |
| #define | USB_HUB_SLOW_START 0x0001 |
| Hub requires additional settling delay. | |
| #define | USB_HUB_SLOW_START_DELAY_MS 500 |
| Additional setting delay for out-of-spec hubs. | |
| #define | USB_HUB_INTR_FILL 4 |
| Interrupt ring fill level. | |
| #define | USB_HUB_ENABLE_MAX_WAIT_MS 100 |
| Maximum time to wait for port to become enabled. | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| FILE_SECBOOT (PERMITTED) | |
| static int | usb_hub_get_descriptor (struct usb_device *usb, int enhanced, union usb_hub_descriptor *data) |
| Get hub descriptor. | |
| static int | usb_hub_get_port_status (struct usb_device *usb, unsigned int port, struct usb_hub_port_status *status) |
| Get port status. | |
| static int | usb_hub_clear_port_feature (struct usb_device *usb, unsigned int port, unsigned int feature, unsigned int index) |
| Clear port feature. | |
| static int | usb_hub_set_port_feature (struct usb_device *usb, unsigned int port, unsigned int feature, unsigned int index) |
| Set port feature. | |
| static int | usb_hub_set_hub_depth (struct usb_device *usb, unsigned int depth) |
| Set hub depth. | |
| 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. | |
USB hubs.
Definition in file usbhub.h.
| #define USB_HUB_RECIP_PORT ( 3 << 0 ) |
Request recipient is a port.
Definition at line 18 of file usbhub.h.
Referenced by usb_hub_clear_port_feature(), usb_hub_get_port_status(), and usb_hub_set_port_feature().
| #define USB_HUB_DESCRIPTOR 41 |
A basic USB hub descriptor.
Definition at line 35 of file usbhub.h.
Referenced by usb_hub_get_descriptor().
| #define USB_HUB_DESCRIPTOR_ENHANCED 42 |
An enhanced USB hub descriptor.
Definition at line 50 of file usbhub.h.
Referenced by usb_hub_get_descriptor().
| #define USB_HUB_PORT_CONNECTION 0 |
| #define USB_HUB_PORT_ENABLE 1 |
Port enabled/disabled feature.
Definition at line 74 of file usbhub.h.
Referenced by hub_disable(), and hub_enable().
| #define USB_HUB_PORT_RESET 4 |
| #define USB_HUB_PORT_POWER 8 |
| #define USB_HUB_PORT_LOW_SPEED 9 |
| #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_C_FEATURE | ( | bit | ) |
Calculate feature from change bit number.
Definition at line 110 of file usbhub.h.
Referenced by hub_clear_changes().
| #define USB_HUB_FEATURES |
USB features.
Definition at line 113 of file usbhub.h.
Referenced by hub_probe().
| #define USB_HUB_FEATURES_ENHANCED |
USB features for enhanced hubs.
Definition at line 121 of file usbhub.h.
Referenced by hub_probe().
| #define USB_HUB_SET_HUB_DEPTH |
Set hub depth.
Definition at line 129 of file usbhub.h.
Referenced by usb_hub_set_hub_depth().
| #define USB_HUB_CLEAR_TT_BUFFER |
Clear transaction translator buffer.
Definition at line 134 of file usbhub.h.
Referenced by usb_hub_clear_tt_buffer().
| #define USB_HUB_TT_SINGLE 1 |
Transaction translator port value for single-TT hubs.
Definition at line 249 of file usbhub.h.
Referenced by hub_clear_tt().
| #define USB_HUB_SLOW_START 0x0001 |
Hub requires additional settling delay.
Definition at line 271 of file usbhub.h.
Referenced by hub_open().
| #define USB_HUB_SLOW_START_DELAY_MS 500 |
Additional setting delay for out-of-spec hubs.
Definition at line 274 of file usbhub.h.
Referenced by hub_open().
| #define USB_HUB_INTR_FILL 4 |
Interrupt ring fill level.
This is a policy decision.
Definition at line 280 of file usbhub.h.
Referenced by hub_probe().
| #define USB_HUB_ENABLE_MAX_WAIT_MS 100 |
Maximum time to wait for port to become enabled.
This is a policy decision.
Definition at line 286 of file usbhub.h.
Referenced by hub_enable().
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| FILE_SECBOOT | ( | PERMITTED | ) |
|
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 147 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 169 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 186 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 203 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 218 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 234 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().