Skip to content

Commit

Permalink
Merge remote-tracking branch 'mkp-scsi/4.9/scsi-fixes' into fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
James Bottomley authored and James Bottomley committed Oct 27, 2016
2 parents 602432c + 2bf7dc8 commit 49ce5b5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 17 deletions.
9 changes: 0 additions & 9 deletions drivers/scsi/arcmsr/arcmsr_hba.c
Original file line number Diff line number Diff line change
Expand Up @@ -2636,18 +2636,9 @@ static int arcmsr_queue_command_lck(struct scsi_cmnd *cmd,
struct AdapterControlBlock *acb = (struct AdapterControlBlock *) host->hostdata;
struct CommandControlBlock *ccb;
int target = cmd->device->id;
int lun = cmd->device->lun;
uint8_t scsicmd = cmd->cmnd[0];
cmd->scsi_done = done;
cmd->host_scribble = NULL;
cmd->result = 0;
if ((scsicmd == SYNCHRONIZE_CACHE) ||(scsicmd == SEND_DIAGNOSTIC)){
if(acb->devstate[target][lun] == ARECA_RAID_GONE) {
cmd->result = (DID_NO_CONNECT << 16);
}
cmd->scsi_done(cmd);
return 0;
}
if (target == 16) {
/* virtual device for iop message transfer */
arcmsr_handle_virtual_command(acb, cmd);
Expand Down
13 changes: 5 additions & 8 deletions drivers/scsi/megaraid/megaraid_sas_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1700,16 +1700,13 @@ megasas_queue_command(struct Scsi_Host *shost, struct scsi_cmnd *scmd)
goto out_done;
}

switch (scmd->cmnd[0]) {
case SYNCHRONIZE_CACHE:
/*
* FW takes care of flush cache on its own
* No need to send it down
*/
/*
* FW takes care of flush cache on its own for Virtual Disk.
* No need to send it down for VD. For JBOD send SYNCHRONIZE_CACHE to FW.
*/
if ((scmd->cmnd[0] == SYNCHRONIZE_CACHE) && MEGASAS_IS_LOGICAL(scmd)) {
scmd->result = DID_OK << 16;
goto out_done;
default:
break;
}

return instance->instancet->build_and_issue_cmd(instance, scmd);
Expand Down
1 change: 1 addition & 0 deletions drivers/scsi/scsi_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -5134,6 +5134,7 @@ static void __exit scsi_debug_exit(void)
bus_unregister(&pseudo_lld_bus);
root_device_unregister(pseudo_primary);

vfree(map_storep);
vfree(dif_storep);
vfree(fake_storep);
kfree(sdebug_q_arr);
Expand Down

0 comments on commit 49ce5b5

Please sign in to comment.