From: David Miller <davem@davemloft.net>
To: ron.mercer@qlogic.com
Cc: jeff@garzik.org, netdev@vger.kernel.org, linux-driver@qlogic.com,
bhutchings@solarflare.com, hch@infradead.org
Subject: Re: [PATCH 3/5] qlge: bugfix: Fix shadow register endian issue.
Date: Sun, 04 Jan 2009 17:09:38 -0800 (PST) [thread overview]
Message-ID: <20090104.170938.210170335.davem@davemloft.net> (raw)
In-Reply-To: <1230671545-19084-3-git-send-email-ron.mercer@qlogic.com>
From: Ron Mercer <ron.mercer@qlogic.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@qlogic.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.
next prev parent reply other threads:[~2009-01-05 1:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-30 21:11 [PATCH 0/5] qlge: Fixes from PPC bringup Ron Mercer
2008-12-30 21:12 ` [PATCH 1/5] qlge: bugfix: Add missing pci_mapping_err checking Ron Mercer
2009-01-05 1:08 ` David Miller
2008-12-30 21:12 ` [PATCH 2/5] qlge: bugfix: Add missing pci_unmap_page call in receive path Ron Mercer
2009-01-05 1:08 ` David Miller
2008-12-30 21:12 ` [PATCH 3/5] qlge: bugfix: Fix shadow register endian issue Ron Mercer
2009-01-05 1:09 ` David Miller [this message]
2008-12-30 21:12 ` [PATCH 4/5] qlge: bugfix: Fix ring length setting for rx ring, large/small Ron Mercer
2009-01-05 1:09 ` David Miller
2008-12-30 21:12 ` [PATCH 5/5] qlge: bugfix: Fix register access error checking Ron Mercer
2009-01-05 1:09 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090104.170938.210170335.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=bhutchings@solarflare.com \
--cc=hch@infradead.org \
--cc=jeff@garzik.org \
--cc=linux-driver@qlogic.com \
--cc=netdev@vger.kernel.org \
--cc=ron.mercer@qlogic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).