I have an ZTC Thunder usb-to-M.2 SSD enclosure with a 500GB Samsung EVO850-500GB-SSD, which I use for backup and misc storage. From here on I will refer to this combination of hardware as my usb-ssd.
When I plug the usb-ssd into a linux machine (fedora 25 and fedora 27 tested), the usb-ssd blue LED lights up, I can mount file systems, etc. But after a few minutes (<30min I think), the usb-ssd will become unresponsive. Operations accessing the usb-ssd will hang until reboot: Say, it will hang if I try to (a) umount /dev/usb-ssd, or (b) ls -R /mnt/usb-ssd. When I say HANG I really mean hang: I cannot kill the process using any kill operation known to me. Note that a non-recursive non-exhaustive ls /mnt/usb-ssd may work, probably because the directory is cached and the usb-ssd is not really accessed.
So: what is going on here? There is no sign of problems in dmesg. I have tried a number of things, such as the "billauer" usbreset script, but that hangs, too. I should mention that I have tested both on a desktop and laptop, and the desktop definitely is not sleeping when the problem occurs, and I don't think the laptop had been sleeping at all, either.
If there is no "real" fix, what might be a good method to keep the usb-ssd awake? I assume it would have to be some looped operation that would not be sidetracked by the disk (file) cache.