[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090124192954.GB18522@linux-ox1b.qlogic.org>
Date: Sat, 24 Jan 2009 11:29:54 -0800
From: Ron Mercer <ron.mercer@...gic.com>
To: Ben Hutchings <bhutchings@...arflare.com>
Cc: "davem@...emloft.net" <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH 01/21] [next] qlge: Change to device ID 8000 and
corresponding flash access.
On Fri, Jan 23, 2009 at 03:28:59PM -0800, Ben Hutchings wrote:
> On Fri, 2009-01-23 at 07:16 -0800, Ron Mercer wrote:
> [...]
> > diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c
> > index 16eb9dd..a530f5b 100644
> > --- a/drivers/net/qlge/qlge_main.c
> > +++ b/drivers/net/qlge/qlge_main.c
> [...]
> > @@ -657,28 +680,38 @@ static int ql_read_flash_word(struct ql_adapter *qdev, int offset, u32 *data)
> > if (status)
> > goto exit;
> > /* get the data */
> > - *data = ql_read32(qdev, FLASH_DATA);
> > + *data = cpu_to_le32(ql_read32(qdev, FLASH_DATA));
> [...]
>
> Should be le32_to_cpu not cpu_to_le32.
>
> Ben.
Ben,
The flash_param is stored in flash as an array of __le32 elements. I tried this a number
of ways and what I came up with is the only combination (I could find)
that didn't generate compile or sparse warnings and that works on big
and little endian machines.
You'll note that I've defined the flash_param using little endian.
If I use cpu_to_le32 it would work fine but will produce sparse
warnings.
Would it be acceptable if I used a better comment about that I'm doing?
Ron
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists