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)
committerDanny Wood <danwood76@gmail.com>
Tue, 29 Jan 2019 13:14:48 +0000 (13:14 +0000)
commitbc9a05bbdf8cfa46636e3b731ccfe3e2bb144f25
tree1ff0890346dc8dabcaf59c5ba022a4944487c989
parentcaa0bb68f469db866003c91bf3ae2c527f54038e
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: Willy Tarreau <w@1wt.eu>
drivers/scsi/arcmsr/arcmsr_hba.c