External HDD not detected after reboot

Hello DietPi community,

I am having an issue with external HDD (it has external power supply) with Raspberry Pi 4. Namely, it works fine when connected and mounted for the first time, but after reboot it is not detected at all. When I power it off, then on it gets detected again.
I tried booting Pi 4 from the drive, it works fine for the first boot, but after reboot I am always getting error:

usb2-port2: Cannot enable. Maybe the USB cable is bad?

and something about port indexing.
Again, when I power external drive off, then on booting process continues.

The same drive has been used for a long time with Raspberry Pi 3 Model B without any issue - I have been booting Pi 3 from one of the partitions.

Any idea what can I try to fix the issue?

Kind regards!

Looks like I found a solution: https://www.raspberrypi.org/forums/viewtopic.php?p=1503598#p1503598

I have HDD enclosure with 152d:0578 JMicron chip. Chip firmware had to be updated. Now it works fine.