Skip to content

Commit 2bf7dc8

Browse files
Ching Huangmartinkpetersen
authored andcommitted
scsi: arcmsr: Send SYNCHRONIZE_CACHE command to firmware
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] Cc: <stable@vger.kernel.org> 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>
1 parent 4d2b496 commit 2bf7dc8

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

drivers/scsi/arcmsr/arcmsr_hba.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2636,18 +2636,9 @@ static int arcmsr_queue_command_lck(struct scsi_cmnd *cmd,
26362636
struct AdapterControlBlock *acb = (struct AdapterControlBlock *) host->hostdata;
26372637
struct CommandControlBlock *ccb;
26382638
int target = cmd->device->id;
2639-
int lun = cmd->device->lun;
2640-
uint8_t scsicmd = cmd->cmnd[0];
26412639
cmd->scsi_done = done;
26422640
cmd->host_scribble = NULL;
26432641
cmd->result = 0;
2644-
if ((scsicmd == SYNCHRONIZE_CACHE) ||(scsicmd == SEND_DIAGNOSTIC)){
2645-
if(acb->devstate[target][lun] == ARECA_RAID_GONE) {
2646-
cmd->result = (DID_NO_CONNECT << 16);
2647-
}
2648-
cmd->scsi_done(cmd);
2649-
return 0;
2650-
}
26512642
if (target == 16) {
26522643
/* virtual device for iop message transfer */
26532644
arcmsr_handle_virtual_command(acb, cmd);

0 commit comments

Comments
 (0)