aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mpt2sas/mpt2sas_scsih.c
diff options
context:
space:
mode:
authorKashyap, Desai <kashyap.desai@lsi.com>2009-10-05 06:23:06 -0400
committerJames Bottomley <James.Bottomley@suse.de>2009-10-29 13:03:15 -0400
commit463217bfecbf5d17a30133a55553d94aa9fc255e (patch)
tree1e385db37b46584968c67be20396c5b905b12180 /drivers/scsi/mpt2sas/mpt2sas_scsih.c
parentec9472c74c3074541ea8389517f406b5c7ad0632 (diff)
[SCSI] mpt2sas : PPC (power pc) endian bug fix's
(1) EEDP(End to End data protection) was not working. This was due to not setting EEDP BlockSize and Flags to little endian format in the message frame. (2) Some expander sysfs attributes were not getting set properly. The sas format was not getting set due to endian issues with sas_format field in the struct rep_manu_reply. Since sas_format was not set properly, the component_vendor_id, component_revision_id, and component_id were not set. (3) In _transport_smp_handler: we don't need to convert the smid from little endian to cpu prior to calling mpt2sas_base_free_smid, because its allready in cpu format. (4) Some loginfos and ioc status were not xonverted from little endian to cpu. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: Eric Moore <Eric.moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/mpt2sas/mpt2sas_scsih.c')
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_scsih.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
index 6f5e2e471b4..d0d66726ff6 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
@@ -2775,8 +2775,6 @@ _scsih_setup_eedp(struct scsi_cmnd *scmd, Mpi2SCSIIORequest_t *mpi_request)
2775 else 2775 else
2776 return; 2776 return;
2777 2777
2778 mpi_request->EEDPBlockSize = scmd->device->sector_size;
2779
2780 switch (prot_type) { 2778 switch (prot_type) {
2781 case SCSI_PROT_DIF_TYPE1: 2779 case SCSI_PROT_DIF_TYPE1:
2782 2780
@@ -2784,8 +2782,7 @@ _scsih_setup_eedp(struct scsi_cmnd *scmd, Mpi2SCSIIORequest_t *mpi_request)
2784 * enable ref/guard checking 2782 * enable ref/guard checking
2785 * auto increment ref tag 2783 * auto increment ref tag
2786 */ 2784 */
2787 mpi_request->EEDPFlags = eedp_flags | 2785 eedp_flags |= MPI2_SCSIIO_EEDPFLAGS_INC_PRI_REFTAG |
2788 MPI2_SCSIIO_EEDPFLAGS_INC_PRI_REFTAG |
2789 MPI2_SCSIIO_EEDPFLAGS_CHECK_REFTAG | 2786 MPI2_SCSIIO_EEDPFLAGS_CHECK_REFTAG |
2790 MPI2_SCSIIO_EEDPFLAGS_CHECK_GUARD; 2787 MPI2_SCSIIO_EEDPFLAGS_CHECK_GUARD;
2791 mpi_request->CDB.EEDP32.PrimaryReferenceTag = 2788 mpi_request->CDB.EEDP32.PrimaryReferenceTag =
@@ -2798,11 +2795,11 @@ _scsih_setup_eedp(struct scsi_cmnd *scmd, Mpi2SCSIIORequest_t *mpi_request)
2798 /* 2795 /*
2799 * enable guard checking 2796 * enable guard checking
2800 */ 2797 */
2801 mpi_request->EEDPFlags = eedp_flags | 2798 eedp_flags |= MPI2_SCSIIO_EEDPFLAGS_CHECK_GUARD;
2802 MPI2_SCSIIO_EEDPFLAGS_CHECK_GUARD;
2803
2804 break; 2799 break;
2805 } 2800 }
2801 mpi_request->EEDPBlockSize = cpu_to_le32(scmd->device->sector_size);
2802 mpi_request->EEDPFlags = cpu_to_le16(eedp_flags);
2806} 2803}
2807 2804
2808/** 2805/**
@@ -4395,6 +4392,7 @@ _scsih_sas_broadcast_primative_event(struct MPT2SAS_ADAPTER *ioc,
4395#ifdef CONFIG_SCSI_MPT2SAS_LOGGING 4392#ifdef CONFIG_SCSI_MPT2SAS_LOGGING
4396 Mpi2EventDataSasBroadcastPrimitive_t *event_data = fw_event->event_data; 4393 Mpi2EventDataSasBroadcastPrimitive_t *event_data = fw_event->event_data;
4397#endif 4394#endif
4395 u16 ioc_status;
4398 dewtprintk(ioc, printk(MPT2SAS_DEBUG_FMT "broadcast primative: " 4396 dewtprintk(ioc, printk(MPT2SAS_DEBUG_FMT "broadcast primative: "
4399 "phy number(%d), width(%d)\n", ioc->name, event_data->PhyNum, 4397 "phy number(%d), width(%d)\n", ioc->name, event_data->PhyNum,
4400 event_data->PortWidth)); 4398 event_data->PortWidth));
@@ -4428,8 +4426,9 @@ _scsih_sas_broadcast_primative_event(struct MPT2SAS_ADAPTER *ioc,
4428 mpt2sas_scsih_issue_tm(ioc, handle, lun, 4426 mpt2sas_scsih_issue_tm(ioc, handle, lun,
4429 MPI2_SCSITASKMGMT_TASKTYPE_QUERY_TASK, smid, 30); 4427 MPI2_SCSITASKMGMT_TASKTYPE_QUERY_TASK, smid, 30);
4430 ioc->tm_cmds.status = MPT2_CMD_NOT_USED; 4428 ioc->tm_cmds.status = MPT2_CMD_NOT_USED;
4431 4429 ioc_status = le16_to_cpu(mpi_reply->IOCStatus)
4432 if ((mpi_reply->IOCStatus == MPI2_IOCSTATUS_SUCCESS) && 4430 & MPI2_IOCSTATUS_MASK;
4431 if ((ioc_status == MPI2_IOCSTATUS_SUCCESS) &&
4433 (mpi_reply->ResponseCode == 4432 (mpi_reply->ResponseCode ==
4434 MPI2_SCSITASKMGMT_RSP_TM_SUCCEEDED || 4433 MPI2_SCSITASKMGMT_RSP_TM_SUCCEEDED ||
4435 mpi_reply->ResponseCode == 4434 mpi_reply->ResponseCode ==