XHCI store pdevice configs, ifs and endpoints as static length arrays
Some checks are pending
Build ISO image / build-and-deploy (push) Successful in 3m28s
Build documentation / build-and-deploy (push) Has started running

This commit is contained in:
2026-04-03 16:19:32 +02:00
parent a8193797fa
commit 06a87207ff
3 changed files with 47 additions and 30 deletions

View File

@@ -69,21 +69,21 @@ struct xhci_ring {
struct xhci_pdevice_config {
struct usb_config_desc desc;
struct list_node_link configs_link;
};
struct xhci_pdevice_if {
struct usb_if_desc desc;
struct list_node_link ifs_link;
};
struct xhci_pdevice_endpoint {
struct usb_endpoint_desc desc;
struct list_node_link endpoints_link;
struct xhci_ring transfer_ring;
};
#define XHCI_PDEVICE_CONFIGS_MAX 16
#define XHCI_PDEVICE_IFS_MAX 16
#define XHCI_PDEVICE_ENDPOINTS_MAX 16
struct xhci_pdevice {
struct list_node_link pdevices_link;
struct xhci_port* xhci_port;
@@ -93,9 +93,15 @@ struct xhci_pdevice {
struct usb_device_desc device_desc;
struct usb_config_desc config_desc;
struct list_node_link* configs;
struct list_node_link* ifs;
struct list_node_link* endpoints;
struct xhci_pdevice_config configs[XHCI_PDEVICE_CONFIGS_MAX];
size_t configs_count;
struct xhci_pdevice_if ifs[XHCI_PDEVICE_IFS_MAX];
size_t ifs_count;
struct xhci_pdevice_endpoint endpoints[XHCI_PDEVICE_ENDPOINTS_MAX];
size_t endpoints_count;
};
struct xhci_port_status_change {