[SCSI] mpt2sas: Send default descriptor for RAID pass through in mpt2ctl
authorKashyap, Desai <kashyap.desai@lsi.com>
Mon, 5 Apr 2010 08:49:21 +0000 (14:19 +0530)
committerJames Bottomley <James.Bottomley@suse.de>
Sun, 11 Apr 2010 18:41:51 +0000 (13:41 -0500)
RAID_SCSI_IO_PASSTHROUGH: Driver needs to be sending the default
descriptor for RAID Passthru, currently its sending SCSI_IO descriptor.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/mpt2sas/mpt2sas_ctl.c

index ddaa99cdce81c0314e53a0a0b7e9c730c9371d80..d88e9756d8f5259ce156ee434ca7d3b2303816e0 100644 (file)
@@ -744,8 +744,11 @@ _ctl_do_mpt_command(struct MPT2SAS_ADAPTER *ioc,
                    mpt2sas_base_get_sense_buffer_dma(ioc, smid);
                priv_sense = mpt2sas_base_get_sense_buffer(ioc, smid);
                memset(priv_sense, 0, SCSI_SENSE_BUFFERSIZE);
-               mpt2sas_base_put_smid_scsi_io(ioc, smid,
-                   le16_to_cpu(mpi_request->FunctionDependent1));
+               if (mpi_request->Function == MPI2_FUNCTION_SCSI_IO_REQUEST)
+                       mpt2sas_base_put_smid_scsi_io(ioc, smid,
+                           le16_to_cpu(mpi_request->FunctionDependent1));
+               else
+                       mpt2sas_base_put_smid_default(ioc, smid);
                break;
        }
        case MPI2_FUNCTION_SCSI_TASK_MGMT: