Right now we can reset the whole USB 3 controller by doing:
echo '0000:01:00.0' > /sys/bus/pci/drivers/xhci_hcd/unbind
echo 1 > /sys/bus/pci/devices/0000:01:00.0/remove
echo '04 02' > /sys/kernel/debug/regmap/dummy-cpld@0x000000001e000000/registers
sleep 5
echo '04 00' > /sys/kernel/debug/regmap/dummy-cpld@0x000000001e000000/registers
sleep 1
echo 1 > /sys/bus/pci/rescan
This works really well, but is pretty hacky and requires setting the REGMAP_ALLOW_WRITE_DEBUGFS define in the kernel.
It would be nice to surface this as a 1/0 device in /sys/bus/platform/devices/1e000000.cpld/usb3_reset
Right now we can reset the whole USB 3 controller by doing:
This works really well, but is pretty hacky and requires setting the
REGMAP_ALLOW_WRITE_DEBUGFSdefine in the kernel.It would be nice to surface this as a 1/0 device in
/sys/bus/platform/devices/1e000000.cpld/usb3_reset