aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@HansenPartnership.com>2016-10-27 11:37:29 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2016-10-27 11:37:29 -0400
commit49ce5b5f0371951c3ad751e71a63f487606738c3 (patch)
tree73db7056aa47a468009e484179e90b3c2cf03572
parent602432c150251f20fb4a41a5a6463b91e3d19053 (diff)
parent2bf7dc8443e113844d078fd6541b7f4aa544f92f (diff)
Merge remote-tracking branch 'mkp-scsi/4.9/scsi-fixes' into fixes
-rw-r--r--drivers/scsi/arcmsr/arcmsr_hba.c9
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_base.c13
-rw-r--r--drivers/scsi/scsi_debug.c1
3 files changed, 6 insertions, 17 deletions
diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c
index 3d53d636b17b..f0cfb0451757 100644
--- a/drivers/scsi/arcmsr/arcmsr_hba.c
+++ b/drivers/scsi/arcmsr/arcmsr_hba.c
@@ -2636,18 +2636,9 @@ static int arcmsr_queue_command_lck(struct scsi_cmnd *cmd,
2636 struct AdapterControlBlock *acb = (struct AdapterControlBlock *) host->hostdata; 2636 struct AdapterControlBlock *acb = (struct AdapterControlBlock *) host->hostdata;
2637 struct CommandControlBlock *ccb; 2637 struct CommandControlBlock *ccb;
2638 int target = cmd->device->id; 2638 int target = cmd->device->id;
2639 int lun = cmd->device->lun;
2640 uint8_t scsicmd = cmd->cmnd[0];
2641 cmd->scsi_done = done; 2639 cmd->scsi_done = done;
2642 cmd->host_scribble = NULL; 2640 cmd->host_scribble = NULL;
2643 cmd->result = 0; 2641 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 }
2651 if (target == 16) { 2642 if (target == 16) {
2652 /* virtual device for iop message transfer */ 2643 /* virtual device for iop message transfer */
2653 arcmsr_handle_virtual_command(acb, cmd); 2644 arcmsr_handle_virtual_command(acb, cmd);
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 9ff57dee72d7..d8b1fbd4c8aa 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -1700,16 +1700,13 @@ megasas_queue_command(struct Scsi_Host *shost, struct scsi_cmnd *scmd)
1700 goto out_done; 1700 goto out_done;
1701 } 1701 }
1702 1702
1703 switch (scmd->cmnd[0]) { 1703 /*
1704 case SYNCHRONIZE_CACHE: 1704 * FW takes care of flush cache on its own for Virtual Disk.
1705 /* 1705 * No need to send it down for VD. For JBOD send SYNCHRONIZE_CACHE to FW.
1706 * FW takes care of flush cache on its own 1706 */
1707 * No need to send it down 1707 if ((scmd->cmnd[0] == SYNCHRONIZE_CACHE) && MEGASAS_IS_LOGICAL(scmd)) {
1708 */
1709 scmd->result = DID_OK << 16; 1708 scmd->result = DID_OK << 16;
1710 goto out_done; 1709 goto out_done;
1711 default:
1712 break;
1713 } 1710 }
1714 1711
1715 return instance->instancet->build_and_issue_cmd(instance, scmd); 1712 return instance->instancet->build_and_issue_cmd(instance, scmd);
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index c905709707f0..cf04a364fd8b 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -5134,6 +5134,7 @@ static void __exit scsi_debug_exit(void)
5134 bus_unregister(&pseudo_lld_bus); 5134 bus_unregister(&pseudo_lld_bus);
5135 root_device_unregister(pseudo_primary); 5135 root_device_unregister(pseudo_primary);
5136 5136
5137 vfree(map_storep);
5137 vfree(dif_storep); 5138 vfree(dif_storep);
5138 vfree(fake_storep); 5139 vfree(fake_storep);
5139 kfree(sdebug_q_arr); 5140 kfree(sdebug_q_arr);