The usbdev->slotid field is xhci specific and on xhci it is always
reachable from usbdev->defpipe->slotid.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
free(dev);
goto fail;
}
- pipe->slotid = usbdev->slotid = slotid;
+ pipe->slotid = slotid;
} else {
- pipe->slotid = usbdev->slotid;
+ struct xhci_pipe *defpipe = container_of(
+ usbdev->defpipe, struct xhci_pipe, pipe);
+ pipe->slotid = defpipe->slotid;
// Send configure command.
int cc = xhci_cmd_configure_endpoint(xhci, pipe->slotid, in);
if (cc != CC_SUCCESS) {
struct usbdevice_s {
struct usbhub_s *hub;
struct usb_pipe *defpipe;
- u32 slotid;
u32 port;
struct usb_config_descriptor *config;
struct usb_interface_descriptor *iface;