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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Nov 2016 15:36:35 +0000 (16:36 +0100)
commitc77a2346226e77e3f1d243810eb2bb75b407f2b4
tree9aedee4c126edce3ee3277ed14eaf442610651e0
parent69ee0ed0c6f96eb7182b2dd83393e6fca5ade81c
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/arcmsr/arcmsr_hba.c