ata: ahci: implement SCSI_SYNC_CACHE

The SCSI layer now issues a SYNC_CACHE command after every write to
ensure there is no data loss due to a board reset after write.

Implement support for this command and remove the same logic from the
ATA write path to be consistent with other SCSI backends.

Ranges are not supported and the whole cache will be flushed in all
cases.

This was done per iteration in ata_scsiop_read_write(), but it's not
clear why this was the case, calling it once for the entire write ought
to achieve the same result.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
1 file changed