From eef25d3004c011e970322c4b3214f67282192b0e Mon Sep 17 00:00:00 2001 From: xj Date: Tue, 18 Jun 2024 23:21:44 -0700 Subject: [PATCH] Modify xhci functions for USB core --- .../drivers/usb/components/port/xhci/usb_hc_xhci.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/xhci/usb_hc_xhci.c b/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/xhci/usb_hc_xhci.c index 85813ae0f..4573a80e6 100644 --- a/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/xhci/usb_hc_xhci.c +++ b/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/xhci/usb_hc_xhci.c @@ -776,8 +776,17 @@ int xhci_usbh_roothub_control(struct usbh_bus *usb, struct usb_setup_packet *set } -int xhci_usbh_ep_pipe_reconfigure(struct usbh_bus *usb, usbh_pipe_t pipe, uint8_t dev_addr, uint8_t ep_mps, uint8_t mult){ - return 0; +int xhci_usbh_ep_pipe_reconfigure(struct usbh_bus *usb, usbh_pipe_t pipe, uint8_t dev_addr, uint8_t mtu, uint8_t speed){ + struct xhci_endpoint *ppipe = (struct xhci_endpoint *)pipe; + size_t old_mtu = ppipe->mtu; + int rc = 0; + + if (mtu != old_mtu) { + ppipe->mtu = mtu; + rc = xhci_endpoint_mtu(ppipe); + } + + return rc; }