summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid/commsup.c
diff options
context:
space:
mode:
authorSalyzyn, Mark <Mark_Salyzyn@adaptec.com>2008-01-08 12:48:25 -0800
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-01-23 11:29:19 -0600
commita3940da5e6fe8b833eecdbca3fac9456b4204d6e (patch)
treee7254ab5376f92b427e283eba55e2f66a7ce1c19 /drivers/scsi/aacraid/commsup.c
parent06a43d1725f59a0f5e043bd06081c44ae528098e (diff)
[SCSI] aacraid: fix big endian issues
Big endian systems issues discovered in the aacraid driver. Somewhat reverses a patch from November 7th of last year that removed swap operations because they formerly were being assigned to an u8 array when they should have been assigned to an le32 array. This patch is largely inert for any little endian processor architecture. It resolves a bug in delivering the BlinkLED AIF event to registered applications when the adapter or associated hardware was reset due to ill health. A rare corner case occurrence, also largely unnoticed by any as it was a new (untested!) feature. Signed-off-by: Mark Salyzyn <aacraid@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/aacraid/commsup.c')
-rw-r--r--drivers/scsi/aacraid/commsup.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c
index 81cdac166d4..e82d89ccaf1 100644
--- a/drivers/scsi/aacraid/commsup.c
+++ b/drivers/scsi/aacraid/commsup.c
@@ -1343,11 +1343,11 @@ int aac_check_health(struct aac_dev * aac)
fib->data = hw_fib->data;
aif = (struct aac_aifcmd *)hw_fib->data;
aif->command = cpu_to_le32(AifCmdEventNotify);
- aif->seqnum = cpu_to_le32(0xFFFFFFFF);
- aif->data[0] = AifEnExpEvent;
- aif->data[1] = AifExeFirmwarePanic;
- aif->data[2] = AifHighPriority;
- aif->data[3] = BlinkLED;
+ aif->seqnum = cpu_to_le32(0xFFFFFFFF);
+ ((__le32 *)aif->data)[0] = cpu_to_le32(AifEnExpEvent);
+ ((__le32 *)aif->data)[1] = cpu_to_le32(AifExeFirmwarePanic);
+ ((__le32 *)aif->data)[2] = cpu_to_le32(AifHighPriority);
+ ((__le32 *)aif->data)[3] = cpu_to_le32(BlinkLED);
/*
* Put the FIB onto the
@@ -1377,10 +1377,9 @@ int aac_check_health(struct aac_dev * aac)
printk(KERN_ERR "%s: Host adapter BLINK LED 0x%x\n", aac->name, BlinkLED);
- if (!aac_check_reset ||
- ((aac_check_reset != 1) &&
- (aac->supplement_adapter_info.SupportedOptions2 &
- cpu_to_le32(AAC_OPTION_IGNORE_RESET))))
+ if (!aac_check_reset || ((aac_check_reset != 1) &&
+ (aac->supplement_adapter_info.SupportedOptions2 &
+ AAC_OPTION_IGNORE_RESET)))
goto out;
host = aac->scsi_host_ptr;
if (aac->thread->pid != current->pid)