Sata cables can get loose due to vibrations. So you might at least reseat them. Same applies to the power cables. If the drive was part of your computer when you bought it, and if that computer is still covered by warranty, then you might consider claiming your warranty towards the vendor or manufacturer.
Since this is not a firmware related issue, flashing another firmware version might probably not work. If your computer loses the connection to the drive during the flash procedure, the drive is toasted.