ata5: SATA link down (SStatus 1 SControl 300)

So I was getting error messages like this:

Jun 15 02:56:45 trust kernel: [  127.165096] ata5: SATA link down (SStatus 1 SControl 300)
Jun 15 02:56:45 trust kernel: [  127.165105] ata5: EH complete
Jun 15 02:56:45 trust kernel: [  127.174488] ata5: exception Emask 0x10 SAct 0x0 SErr 0x4040000 action 0xe frozen
Jun 15 02:56:45 trust kernel: [  127.178637] ata5: irq_stat 0x00000040, connection status changed
Jun 15 02:56:45 trust kernel: [  127.182700] ata5: SError: { CommWake DevExch }
Jun 15 02:56:45 trust kernel: [  127.186842] ata5: hard resetting link

The ‘ata5’ indicated SATA disk 5, being /dev/sde. Depending on which disk is affected you might see ‘ata1’, ‘ata2’, ‘ata3’, ‘ata4’, etc.

The problem seemed to be a loose cable. I have removed that drive (and its cables) and the problem has gone away.