In your case two drives seems to disconnect and connect again.
This may be caused by loose cable. Make sure that your drive is properly connected to the motherboard. If it's notebook you should be able to disassemble its cover, unplug the drive and plug it again. If it's PC you can try to replace sata cable.
Another thing that may cause this is power saving, especially on laptops. In most cases you can disable such options in your BIOS.
If the problem persists: use SMART monitoring tools to analyze your disk drives.
You can install it with:
sudo apt-get install smartmontools
Then use it with your drive name.
sudo smartctl --all /dev/sda
sudo smartctl --all /dev/sdb
In most cases ata1 is the first sata device and its block device name is /dev/sda, ata2 is /dev/sdb and so on.
But you can list your drives using:
sudo fdisk -l
In SMART results look especially for attributes:
sudo smartctl --attributes /dev/sda
sudo smartctl --attributes /dev/sdb
can idicate your disk drives failing, if their
RAW_VALUE is above
0. Basicly this means that your drive have badsectors. Then it's up to you to decide if you want to use it or replace it. It doesn't mean that your drive will stop working right away, but it may eventually - so in this case do your backups.
But it's unlikely that two drives are failing at the same time. So in case of soft resetting link it's rather something with cables, or PC/notebook itself. This might be also caused by failing motherboard or power supply.