Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose usb3_reset in sysfs #5

Open
bluecmd opened this issue Aug 3, 2024 · 0 comments
Open

Expose usb3_reset in sysfs #5

bluecmd opened this issue Aug 3, 2024 · 0 comments

Comments

@bluecmd
Copy link
Contributor

bluecmd commented Aug 3, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant