scsi: arcmsr: Send SYNCHRONIZE_CACHE command to firmware
authorChing Huang <ching2048@areca.com.tw>
Wed, 19 Oct 2016 09:50:26 +0000 (17:50 +0800)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 23 Feb 2017 03:50:55 +0000 (03:50 +0000)
commit6d27a313c1ebb27f08074774f0e1366d55b3ddaa
tree1340abb9612aeff81affa14e0e8e41a1d9dd1f26
parent2171f0dc7707bcccd61c254dd60fc2aaa0b487bc
scsi: arcmsr: Send SYNCHRONIZE_CACHE command to firmware

commit 2bf7dc8443e113844d078fd6541b7f4aa544f92f upstream.

The arcmsr driver failed to pass SYNCHRONIZE CACHE to controller
firmware. Depending on how drive caches are handled internally by
controller firmware this could potentially lead to data integrity
problems.

Ensure that cache flushes are passed to the controller.

[mkp: applied by hand and removed unused vars]

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Reported-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/scsi/arcmsr/arcmsr_hba.c