[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090104.170938.210170335.davem@davemloft.net>
Date: Sun, 04 Jan 2009 17:09:38 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: ron.mercer@...gic.com
Cc: jeff@...zik.org, netdev@...r.kernel.org, linux-driver@...gic.com,
bhutchings@...arflare.com, hch@...radead.org
Subject: Re: [PATCH 3/5] qlge: bugfix: Fix shadow register endian issue.
From: Ron Mercer <ron.mercer@...gic.com>
Date: Tue, 30 Dec 2008 13:12:23 -0800
> Shadow registers are consistent memory locations to which the chip
> echos ring indexes in little endian format. These values need to
> be endian swapped before referencing.
>
> Note:
> The register pointer declaration uses the volatile modifier which
> causes warnings in checkpatch.
> Per Documentation/volatile-considered-harmful.txt:
> - Pointers to data structures in coherent memory which might be modified
> by I/O devices can, sometimes, legitimately be volatile. A ring buffer
> used by a network adapter, where that adapter changes pointers to
> indicate which descriptors have been processed, is an example of this
> type of situation.
>
> Signed-off-by: Ron Mercer <ron.mercer@...gic.com>
Applied, but still kill the volatile and use proper memory
barriers around accesses to this value instead.
Many other drivers handle exactly this situation without
having to resort to volatile.
--
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