[dev][usb] Add usb_reset_device and XHCI changes.
After usb-hub does the port reset, XHCI sends TRB_CMD_RESET_DEVICE. We also need to address the device again. I extracted part of xhci_handle_enumerate_device into a new function xhci_setup_slot, as it is the same thing as xhci_reset_device has to do after the reset. This is so we can load new firmware on the USB ML device. ZX-3155 #comment TEST= plugged in USB ML device, ran usb-fwloader -d -f firmware and verified the device descriptor changed. Also tried resetting in the usb audio driver and running audio -d 1 tone Change-Id: Id3bd748c0d40838d98e233ad1f01589cb1042021
Showing
- system/banjo/ddk-protocol-usb-bus/usb-bus.banjo 4 additions, 0 deletionssystem/banjo/ddk-protocol-usb-bus/usb-bus.banjo
- system/banjo/ddk-protocol-usb-hci/usb-hci.banjo 4 additions, 0 deletionssystem/banjo/ddk-protocol-usb-hci/usb-hci.banjo
- system/banjo/ddk-protocol-usb/usb.banjo 4 additions, 0 deletionssystem/banjo/ddk-protocol-usb/usb.banjo
- system/dev/usb/usb-bus/usb-bus.c 52 additions, 1 deletionsystem/dev/usb/usb-bus/usb-bus.c
- system/dev/usb/usb-bus/usb-device.c 44 additions, 0 deletionssystem/dev/usb/usb-bus/usb-device.c
- system/dev/usb/usb-bus/usb-device.h 6 additions, 0 deletionssystem/dev/usb/usb-bus/usb-device.h
- system/dev/usb/usb-composite/usb-interface.c 6 additions, 0 deletionssystem/dev/usb/usb-composite/usb-interface.c
- system/dev/usb/usb-dfu/usb-dfu.cpp 1 addition, 2 deletionssystem/dev/usb/usb-dfu/usb-dfu.cpp
- system/dev/usb/usb-hub/usb-hub.c 5 additions, 0 deletionssystem/dev/usb/usb-hub/usb-hub.c
- system/dev/usb/xhci/usb-xhci.cpp 22 additions, 0 deletionssystem/dev/usb/xhci/usb-xhci.cpp
- system/dev/usb/xhci/xhci-device-manager.cpp 166 additions, 65 deletionssystem/dev/usb/xhci/xhci-device-manager.cpp
- system/dev/usb/xhci/xhci-device-manager.h 1 addition, 0 deletionssystem/dev/usb/xhci/xhci-device-manager.h
Loading
Please register or sign in to comment