Topic: Hot-Plugging SATA

When I boot my Novena without a SATA device plugged in, and plug in a SSD later on, it does not seem to get recognized.
I tried
echo "- - -" >/sys/class/scsi_host/host0/scan
to rescan the bus, but that does not help.
Since the module is compiled into the kernl, I cannot unload and reload the module.
Is it possible to powercycle the ahci_imx ?
Any other ideas to get the SATA port up and running again later on?

Re: Hot-Plugging SATA

Try passing "ahci_imx.hotplug=1" to the kernel as a parameter.  It's disabled by default to save a few mA of current.

Re: Hot-Plugging SATA

Yes, that seems to work:
cat /boot/uEnv.txt
bootargs=init=/lib/systemd/systemd rootwait rw ahci_imx.hotplug=1

(Perhaps it would be nice to have that as an option in the Novena EEPROM GUI in the future?)

Re: Hot-Plugging SATA

Hmm, the iMX6 SATA PHY is really very extremely hopeful compared to other SATA PHYs I have been using. It has a timeout between 10 and 20 seconds to think that the SATA device might come up again, so I have to unpower the SATA device for at least 20 seconds for the iMX6 to forget it correctly and restart the communication properly. Any ideas to improve that?
Is there a way to programmatically stop the power supply to the SATA port, so that I can powercycle a SSD?