aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mpt2sas/mpt2sas_base.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_base.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_base.c')
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_base.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c
index db5e36735e72..6422e258fd52 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_base.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_base.c
@@ -2949,6 +2949,7 @@ _base_send_ioc_init(struct MPT2SAS_ADAPTER *ioc, int sleep_flag)
2949 Mpi2IOCInitReply_t mpi_reply; 2949 Mpi2IOCInitReply_t mpi_reply;
2950 int r; 2950 int r;
2951 struct timeval current_time; 2951 struct timeval current_time;
2952 u16 ioc_status;
2952 2953
2953 dinitprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s\n", ioc->name, 2954 dinitprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s\n", ioc->name,
2954 __func__)); 2955 __func__));
@@ -3028,7 +3029,8 @@ _base_send_ioc_init(struct MPT2SAS_ADAPTER *ioc, int sleep_flag)
3028 return r; 3029 return r;
3029 } 3030 }
3030 3031
3031 if (mpi_reply.IOCStatus != MPI2_IOCSTATUS_SUCCESS || 3032 ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & MPI2_IOCSTATUS_MASK;
3033 if (ioc_status != MPI2_IOCSTATUS_SUCCESS ||
3032 mpi_reply.IOCLogInfo) { 3034 mpi_reply.IOCLogInfo) {
3033 printk(MPT2SAS_ERR_FMT "%s: failed\n", ioc->name, __func__); 3035 printk(MPT2SAS_ERR_FMT "%s: failed\n", ioc->name, __func__);
3034 r = -EIO; 3036 r = -EIO;