Dealing with WRITE FPDMA QUEUED hard disk trouble

Recently, on one of my servers, I had the main hard disk being set to failsafe read-only with the following ATA errors logged in /var/log/kern.log:

ata1.00: failed command: WRITE FPDMA QUEUED
ata1.00: cmd 61/00:90:40:7e:85/04:00:ea:00:00/40 tag 18 ncq 524288 out
res 40/00:0c:40:b6:85/00:00: ea:00:00/40 Emask 0x10 (ATA bus error)
ata1.00: status: { DRDY }
ata1.00: failed command: WRITE FPDMA QUEUED
ata1.00: cmd 61/00:98:40:82:85/04:00:ea:00:00/40 tag 19 ncq 524288 out
res 40/00:0c:40:b6:85/00:00:ea:00:00/40 Emask 0x10 (ATA bus error)
ata1.00: status: { DRDY }
ata1.00: failed command: WRITE FPDMA QUEUED

It looks like a physical issue with the drive. Though there was no specific error reported by  smartctl -a /dev/sdX, and the disk was quite new (just one year old), a Western Digital Red (SATA 3 model WDC WD40EFRX-68WT0N0). The mainboard being only SATA 2, the drive is not at all pushed to its limits.

The SATA cables were the same age and SATA 3 and not in bad apparent condition except it looks like they did not stayed perfectly plugged in over time.

I switched the apparently faulty disk to the SATA connector used by the secondary hard disk and made sure they are both  properly plugged: so far, it fixed it. It really looks like a SATA cable issue.