diff options
author | Kashyap, Desai <kashyap.desai@lsi.com> | 2010-02-17 05:38:36 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-02-17 18:49:25 -0500 |
commit | 3ed215259f2d8cd937abc833dc76e309173aaa52 (patch) | |
tree | 9728404b0eb064096c7053efca1014bd6d350291 /drivers/scsi/mpt2sas | |
parent | 34c2b712992540ca436e97432ffc57c84c8f8c18 (diff) |
[SCSI] mpt2sas: Do not call sas_is_tlr_enabled for RAID volumes.
For RAID volume sas_is_tlr_enabled call will hit BUG at
scsi_transport_sas.c:163, since raid volume
is not visible to sas transport layer.
Now Added check to make sure arg pass in sas_is_tlr_enabled() is not a volume.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/mpt2sas')
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_scsih.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c index 344a22ad2f33..c7ec3f174782 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c +++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c | |||
@@ -3062,8 +3062,9 @@ _scsih_qcmd(struct scsi_cmnd *scmd, void (*done)(struct scsi_cmnd *)) | |||
3062 | 3062 | ||
3063 | } else | 3063 | } else |
3064 | mpi_control |= MPI2_SCSIIO_CONTROL_SIMPLEQ; | 3064 | mpi_control |= MPI2_SCSIIO_CONTROL_SIMPLEQ; |
3065 | 3065 | /* Make sure Device is not raid volume */ | |
3066 | if (sas_is_tlr_enabled(scmd->device)) | 3066 | if (!_scsih_is_raid(&scmd->device->sdev_gendev) && |
3067 | sas_is_tlr_enabled(scmd->device)) | ||
3067 | mpi_control |= MPI2_SCSIIO_CONTROL_TLR_ON; | 3068 | mpi_control |= MPI2_SCSIIO_CONTROL_TLR_ON; |
3068 | 3069 | ||
3069 | smid = mpt2sas_base_get_smid_scsiio(ioc, ioc->scsi_io_cb_idx, scmd); | 3070 | smid = mpt2sas_base_get_smid_scsiio(ioc, ioc->scsi_io_cb_idx, scmd); |
@@ -3452,7 +3453,8 @@ _scsih_io_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 msix_index, u32 reply) | |||
3452 | le32_to_cpu(mpi_reply->ResponseInfo) & 0xFF; | 3453 | le32_to_cpu(mpi_reply->ResponseInfo) & 0xFF; |
3453 | if (!sas_device_priv_data->tlr_snoop_check) { | 3454 | if (!sas_device_priv_data->tlr_snoop_check) { |
3454 | sas_device_priv_data->tlr_snoop_check++; | 3455 | sas_device_priv_data->tlr_snoop_check++; |
3455 | if (sas_is_tlr_enabled(scmd->device) && | 3456 | if (!_scsih_is_raid(&scmd->device->sdev_gendev) && |
3457 | sas_is_tlr_enabled(scmd->device) && | ||
3456 | response_code == MPI2_SCSITASKMGMT_RSP_INVALID_FRAME) { | 3458 | response_code == MPI2_SCSITASKMGMT_RSP_INVALID_FRAME) { |
3457 | sas_disable_tlr(scmd->device); | 3459 | sas_disable_tlr(scmd->device); |
3458 | sdev_printk(KERN_INFO, scmd->device, "TLR disabled\n"); | 3460 | sdev_printk(KERN_INFO, scmd->device, "TLR disabled\n"); |