Skip to content

Expose usb3_reset in sysfs #5

Description

@bluecmd

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions