Good point, thanks. The intent of the management applications utilization of this AIF report is to observe the LSB of the value of integer value in BlinkLED. The actions of the cpu_to_le32 actually breaks this and reports the wrong content in swapped architectures. This attached follow-up patch is against current scsi-misc-2.6 *after* the application of the 'don't assign cpu_to_le32(constant) to u8' patch submitted by Stephen Rothwell which has already been taken by the -mm tree. Inspection of other areas of the aacraid driver came up blank for similar style bugs. ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments (inline gets damaged, use attachment). Signed-off-by: Mark Salyzyn <[email protected]> drivers/scsi/aacraid/commsup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -ru a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c --- a/drivers/scsi/aacraid/commsup.c 2007-11-07 10:35:16.603727464 -0500 +++ b/drivers/scsi/aacraid/commsup.c 2007-11-07 10:37:50.540311107 -0500 @@ -1342,7 +1342,7 @@ aif->data[0] = AifEnExpEvent; aif->data[1] = AifExeFirmwarePanic; aif->data[2] = AifHighPriority; - aif->data[3] = cpu_to_le32(BlinkLED); + aif->data[3] = BlinkLED; /* * Put the FIB onto the Sincerely -- Mark Salyzyn > -----Original Message----- > From: Andreas Schwab [mailto:[email protected]] > Sent: Thursday, November 01, 2007 9:31 AM > To: Stephen Rothwell > Cc: AACRAID; [email protected]; LKML > Subject: Re: [PATCHv2] aacraid: don't assign > cpu_to_le32(constant) to u8 > > Stephen Rothwell <[email protected]> writes: > > > diff --git a/drivers/scsi/aacraid/commsup.c > b/drivers/scsi/aacraid/commsup.c > > index 240a0bb..3c2dbc0 100644 > > --- a/drivers/scsi/aacraid/commsup.c > > +++ b/drivers/scsi/aacraid/commsup.c > > @@ -1339,9 +1339,9 @@ int aac_check_health(struct aac_dev * aac) > > aif = (struct aac_aifcmd *)hw_fib->data; > > aif->command = cpu_to_le32(AifCmdEventNotify); > > aif->seqnum = cpu_to_le32(0xFFFFFFFF); > > - aif->data[0] = cpu_to_le32(AifEnExpEvent); > > - aif->data[1] = cpu_to_le32(AifExeFirmwarePanic); > > - aif->data[2] = cpu_to_le32(AifHighPriority); > > + aif->data[0] = AifEnExpEvent; > > + aif->data[1] = AifExeFirmwarePanic; > > + aif->data[2] = AifHighPriority; > > aif->data[3] = cpu_to_le32(BlinkLED); > > What about the last line? > > Andreas.
Attachment:
aacraid_BlinkLED.patch
Description: aacraid_BlinkLED.patch
- Follow-Ups:
- Re: [PATCH 1/1] aacraid: don't assign cpu_to_le32(int) to u8
- From: Christoph Hellwig <[email protected]>
- Re: [PATCH 1/1] aacraid: don't assign cpu_to_le32(int) to u8
- References:
- [PATCH] aacraid: don't assign cpu_to_le32(constant) to u8
- From: Stephen Rothwell <[email protected]>
- [PATCHv2] aacraid: don't assign cpu_to_le32(constant) to u8
- From: Stephen Rothwell <[email protected]>
- Re: [PATCHv2] aacraid: don't assign cpu_to_le32(constant) to u8
- From: Andreas Schwab <[email protected]>
- [PATCH] aacraid: don't assign cpu_to_le32(constant) to u8
- Prev by Date: Re: SC1200 failure in 2.6.23 and 2.6.24-rc1-git10
- Next by Date: Re: [PATCH] x86: unification of cfufreq/Kconfig
- Previous by thread: Re: [PATCHv2] aacraid: don't assign cpu_to_le32(constant) to u8
- Next by thread: Re: [PATCH 1/1] aacraid: don't assign cpu_to_le32(int) to u8
- Index(es):