diff options
author | Christoph Hellwig <hch@lst.de> | 2005-08-18 10:25:44 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-09-04 20:51:25 -0400 |
commit | 637fa99b86a00a0b5767a982b83a512ff48ad6d2 (patch) | |
tree | cb3f063b83163cfcb53c85e0fd411fe11f766a1f /drivers/message | |
parent | ccf3b7bd26b242b39d54148ea2117295721681d3 (diff) |
[SCSI] fusion: endianess fixes
Assorted endianess fixes. I'll work on full endianess annotations
later.
Acked by: Moore, Eric Dean <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/message')
-rw-r--r-- | drivers/message/fusion/mptbase.c | 6 | ||||
-rw-r--r-- | drivers/message/fusion/mptctl.c | 2 | ||||
-rw-r--r-- | drivers/message/fusion/mptscsih.c | 24 |
3 files changed, 16 insertions, 16 deletions
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index 284202766804..35444ba4e78a 100644 --- a/drivers/message/fusion/mptbase.c +++ b/drivers/message/fusion/mptbase.c | |||
@@ -2185,7 +2185,7 @@ GetIocFacts(MPT_ADAPTER *ioc, int sleepFlag, int reason) | |||
2185 | facts->IOCExceptions = le16_to_cpu(facts->IOCExceptions); | 2185 | facts->IOCExceptions = le16_to_cpu(facts->IOCExceptions); |
2186 | facts->IOCStatus = le16_to_cpu(facts->IOCStatus); | 2186 | facts->IOCStatus = le16_to_cpu(facts->IOCStatus); |
2187 | facts->IOCLogInfo = le32_to_cpu(facts->IOCLogInfo); | 2187 | facts->IOCLogInfo = le32_to_cpu(facts->IOCLogInfo); |
2188 | status = facts->IOCStatus & MPI_IOCSTATUS_MASK; | 2188 | status = le16_to_cpu(facts->IOCStatus) & MPI_IOCSTATUS_MASK; |
2189 | /* CHECKME! IOCStatus, IOCLogInfo */ | 2189 | /* CHECKME! IOCStatus, IOCLogInfo */ |
2190 | 2190 | ||
2191 | facts->ReplyQueueDepth = le16_to_cpu(facts->ReplyQueueDepth); | 2191 | facts->ReplyQueueDepth = le16_to_cpu(facts->ReplyQueueDepth); |
@@ -4823,8 +4823,8 @@ mpt_toolbox(MPT_ADAPTER *ioc, CONFIGPARMS *pCfg) | |||
4823 | pReq->Reserved3 = 0; | 4823 | pReq->Reserved3 = 0; |
4824 | pReq->NumAddressBytes = 0x01; | 4824 | pReq->NumAddressBytes = 0x01; |
4825 | pReq->Reserved4 = 0; | 4825 | pReq->Reserved4 = 0; |
4826 | pReq->DataLength = 0x04; | 4826 | pReq->DataLength = cpu_to_le16(0x04); |
4827 | pdev = (struct pci_dev *) ioc->pcidev; | 4827 | pdev = ioc->pcidev; |
4828 | if (pdev->devfn & 1) | 4828 | if (pdev->devfn & 1) |
4829 | pReq->DeviceAddr = 0xB2; | 4829 | pReq->DeviceAddr = 0xB2; |
4830 | else | 4830 | else |
diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c index e63a3fd6b706..7577c2417e2e 100644 --- a/drivers/message/fusion/mptctl.c +++ b/drivers/message/fusion/mptctl.c | |||
@@ -242,7 +242,7 @@ mptctl_reply(MPT_ADAPTER *ioc, MPT_FRAME_HDR *req, MPT_FRAME_HDR *reply) | |||
242 | /* Set the command status to GOOD if IOC Status is GOOD | 242 | /* Set the command status to GOOD if IOC Status is GOOD |
243 | * OR if SCSI I/O cmd and data underrun or recovered error. | 243 | * OR if SCSI I/O cmd and data underrun or recovered error. |
244 | */ | 244 | */ |
245 | iocStatus = reply->u.reply.IOCStatus & MPI_IOCSTATUS_MASK; | 245 | iocStatus = le16_to_cpu(reply->u.reply.IOCStatus) & MPI_IOCSTATUS_MASK; |
246 | if (iocStatus == MPI_IOCSTATUS_SUCCESS) | 246 | if (iocStatus == MPI_IOCSTATUS_SUCCESS) |
247 | ioc->ioctl->status |= MPT_IOCTL_STATUS_COMMAND_GOOD; | 247 | ioc->ioctl->status |= MPT_IOCTL_STATUS_COMMAND_GOOD; |
248 | 248 | ||
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c index b774f45dfde4..cd4e8c0853d0 100644 --- a/drivers/message/fusion/mptscsih.c +++ b/drivers/message/fusion/mptscsih.c | |||
@@ -3447,7 +3447,7 @@ mptscsih_scandv_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr) | |||
3447 | * some type of error occurred. | 3447 | * some type of error occurred. |
3448 | */ | 3448 | */ |
3449 | MpiRaidActionReply_t *pr = (MpiRaidActionReply_t *)mr; | 3449 | MpiRaidActionReply_t *pr = (MpiRaidActionReply_t *)mr; |
3450 | if (pr->ActionStatus == MPI_RAID_ACTION_ASTATUS_SUCCESS) | 3450 | if (le16_to_cpu(pr->ActionStatus) == MPI_RAID_ACTION_ASTATUS_SUCCESS) |
3451 | completionCode = MPT_SCANDV_GOOD; | 3451 | completionCode = MPT_SCANDV_GOOD; |
3452 | else | 3452 | else |
3453 | completionCode = MPT_SCANDV_SOME_ERROR; | 3453 | completionCode = MPT_SCANDV_SOME_ERROR; |
@@ -3996,9 +3996,9 @@ mptscsih_synchronize_cache(MPT_SCSI_HOST *hd, int portnum) | |||
3996 | dnegoprintk(("syncronize cache: id=%d width=0 factor=MPT_ASYNC " | 3996 | dnegoprintk(("syncronize cache: id=%d width=0 factor=MPT_ASYNC " |
3997 | "offset=0 negoFlags=%x request=%x config=%x\n", | 3997 | "offset=0 negoFlags=%x request=%x config=%x\n", |
3998 | id, flags, requested, configuration)); | 3998 | id, flags, requested, configuration)); |
3999 | pcfg1Data->RequestedParameters = le32_to_cpu(requested); | 3999 | pcfg1Data->RequestedParameters = cpu_to_le32(requested); |
4000 | pcfg1Data->Reserved = 0; | 4000 | pcfg1Data->Reserved = 0; |
4001 | pcfg1Data->Configuration = le32_to_cpu(configuration); | 4001 | pcfg1Data->Configuration = cpu_to_le32(configuration); |
4002 | cfg.pageAddr = (bus<<8) | id; | 4002 | cfg.pageAddr = (bus<<8) | id; |
4003 | mpt_config(hd->ioc, &cfg); | 4003 | mpt_config(hd->ioc, &cfg); |
4004 | } | 4004 | } |
@@ -5248,7 +5248,7 @@ mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVPARAMETERS *dv,void *pPage) | |||
5248 | /* Update tmax values with those from Device Page 0.*/ | 5248 | /* Update tmax values with those from Device Page 0.*/ |
5249 | pPage0 = (SCSIDevicePage0_t *) pPage; | 5249 | pPage0 = (SCSIDevicePage0_t *) pPage; |
5250 | if (pPage0) { | 5250 | if (pPage0) { |
5251 | val = cpu_to_le32(pPage0->NegotiatedParameters); | 5251 | val = le32_to_cpu(pPage0->NegotiatedParameters); |
5252 | dv->max.width = val & MPI_SCSIDEVPAGE0_NP_WIDE ? 1 : 0; | 5252 | dv->max.width = val & MPI_SCSIDEVPAGE0_NP_WIDE ? 1 : 0; |
5253 | dv->max.offset = (val&MPI_SCSIDEVPAGE0_NP_NEG_SYNC_OFFSET_MASK) >> 16; | 5253 | dv->max.offset = (val&MPI_SCSIDEVPAGE0_NP_NEG_SYNC_OFFSET_MASK) >> 16; |
5254 | dv->max.factor = (val&MPI_SCSIDEVPAGE0_NP_NEG_SYNC_PERIOD_MASK) >> 8; | 5254 | dv->max.factor = (val&MPI_SCSIDEVPAGE0_NP_NEG_SYNC_PERIOD_MASK) >> 8; |
@@ -5276,12 +5276,12 @@ mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVPARAMETERS *dv,void *pPage) | |||
5276 | dv->now.offset, &val, &configuration, dv->now.flags); | 5276 | dv->now.offset, &val, &configuration, dv->now.flags); |
5277 | dnegoprintk(("Setting Max: id=%d width=%d factor=%x offset=%x negoFlags=%x request=%x config=%x\n", | 5277 | dnegoprintk(("Setting Max: id=%d width=%d factor=%x offset=%x negoFlags=%x request=%x config=%x\n", |
5278 | id, dv->now.width, dv->now.factor, dv->now.offset, dv->now.flags, val, configuration)); | 5278 | id, dv->now.width, dv->now.factor, dv->now.offset, dv->now.flags, val, configuration)); |
5279 | pPage1->RequestedParameters = le32_to_cpu(val); | 5279 | pPage1->RequestedParameters = cpu_to_le32(val); |
5280 | pPage1->Reserved = 0; | 5280 | pPage1->Reserved = 0; |
5281 | pPage1->Configuration = le32_to_cpu(configuration); | 5281 | pPage1->Configuration = cpu_to_le32(configuration); |
5282 | } | 5282 | } |
5283 | 5283 | ||
5284 | ddvprintk(("id=%d width=%d factor=%x offset=%x flags=%x request=%x configuration=%x\n", | 5284 | ddvprintk(("id=%d width=%d factor=%x offset=%x negoFlags=%x request=%x configuration=%x\n", |
5285 | id, dv->now.width, dv->now.factor, dv->now.offset, dv->now.flags, val, configuration)); | 5285 | id, dv->now.width, dv->now.factor, dv->now.offset, dv->now.flags, val, configuration)); |
5286 | break; | 5286 | break; |
5287 | 5287 | ||
@@ -5301,9 +5301,9 @@ mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVPARAMETERS *dv,void *pPage) | |||
5301 | offset, &val, &configuration, negoFlags); | 5301 | offset, &val, &configuration, negoFlags); |
5302 | dnegoprintk(("Setting Min: id=%d width=%d factor=%x offset=%x negoFlags=%x request=%x config=%x\n", | 5302 | dnegoprintk(("Setting Min: id=%d width=%d factor=%x offset=%x negoFlags=%x request=%x config=%x\n", |
5303 | id, width, factor, offset, negoFlags, val, configuration)); | 5303 | id, width, factor, offset, negoFlags, val, configuration)); |
5304 | pPage1->RequestedParameters = le32_to_cpu(val); | 5304 | pPage1->RequestedParameters = cpu_to_le32(val); |
5305 | pPage1->Reserved = 0; | 5305 | pPage1->Reserved = 0; |
5306 | pPage1->Configuration = le32_to_cpu(configuration); | 5306 | pPage1->Configuration = cpu_to_le32(configuration); |
5307 | } | 5307 | } |
5308 | ddvprintk(("id=%d width=%d factor=%x offset=%x request=%x config=%x negoFlags=%x\n", | 5308 | ddvprintk(("id=%d width=%d factor=%x offset=%x request=%x config=%x negoFlags=%x\n", |
5309 | id, width, factor, offset, val, configuration, negoFlags)); | 5309 | id, width, factor, offset, val, configuration, negoFlags)); |
@@ -5377,12 +5377,12 @@ mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVPARAMETERS *dv,void *pPage) | |||
5377 | if (pPage1) { | 5377 | if (pPage1) { |
5378 | mptscsih_setDevicePage1Flags (width, factor, offset, &val, | 5378 | mptscsih_setDevicePage1Flags (width, factor, offset, &val, |
5379 | &configuration, dv->now.flags); | 5379 | &configuration, dv->now.flags); |
5380 | dnegoprintk(("Finish: id=%d width=%d offset=%d factor=%x flags=%x request=%x config=%x\n", | 5380 | dnegoprintk(("Finish: id=%d width=%d offset=%d factor=%x negoFlags=%x request=%x config=%x\n", |
5381 | id, width, offset, factor, dv->now.flags, val, configuration)); | 5381 | id, width, offset, factor, dv->now.flags, val, configuration)); |
5382 | 5382 | ||
5383 | pPage1->RequestedParameters = le32_to_cpu(val); | 5383 | pPage1->RequestedParameters = cpu_to_le32(val); |
5384 | pPage1->Reserved = 0; | 5384 | pPage1->Reserved = 0; |
5385 | pPage1->Configuration = le32_to_cpu(configuration); | 5385 | pPage1->Configuration = cpu_to_le32(configuration); |
5386 | } | 5386 | } |
5387 | 5387 | ||
5388 | ddvprintk(("Finish: id=%d offset=%d factor=%x width=%d request=%x config=%x\n", | 5388 | ddvprintk(("Finish: id=%d offset=%d factor=%x width=%d request=%x config=%x\n", |