SATA hotplug on TX2

So far as I know a hot-plug carrier provides the equivalent of a power switch which cuts power without surge prior to actually pulling the data cable (electronics modifying the connect/disconnect sequence). Unlocking the drive for removal provides a surge-free unpower prior to pulling the drive/data cable out. Possibly something in the host system can detect power connect/disconnect as well. I believe the connector on the dev board does not directly support connecting/disconnecting on a powered live system.

It does seem you should be able to rmmod ahci_tegra if nothing depends on it, but I’m wondering (just speculating) if module format is fully supported (it could be that you are able to select this in module format, but if there is a bug in this then it might work only when integrated into the kernel). By default this is integrated, not a module. Someone at NVIDIA may be able to verify if CONFIG_SATA_AHCI_TEGRA fully supports kernel module format before trying to debug further.