netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joshua Kinard <kumba@gentoo.org>
To: Stephen Hemminger <shemminger@vyatta.com>
Cc: netdev@vger.kernel.org, Linux MIPS List <linux-mips@linux-mips.org>
Subject: Re: [PATCH] net: meth: Add set_rx_mode hook to fix ICMPv6 neighbor discovery
Date: Tue, 27 Dec 2011 16:29:57 -0500	[thread overview]
Message-ID: <4EFA38D5.1000602@gentoo.org> (raw)
In-Reply-To: <20111227103408.01aad10e@nehalam.linuxnetplumber.net>

On 12/27/2011 13:34, Stephen Hemminger wrote:

> On Tue, 27 Dec 2011 00:06:15 -0500
> Joshua Kinard <kumba@gentoo.org> wrote:
> 
>> @@ -95,7 +95,7 @@ struct mace_video {
>>   * Ethernet interface
>>   */
>>  struct mace_ethernet {
>> -	volatile unsigned long mac_ctrl;
>> +	volatile u64 mac_ctrl;
>>  	volatile unsigned long int_stat;
>>  	volatile unsigned long dma_ctrl;
>>  	volatile unsigned long timer;
> 
> 
> This device driver writer needs to read:
>   Documentation/volatile-considered-harmful.txt

MIPS I/O registers are always memory-mapped, and to prevent the compiler
from trying to over-optimize, volatile is used to make sure we always read a
value from the hardware and not from some cached value.

See MIPS Run (2nd Ed), pp 307, section 10.5.2 highlights an example of this,
which is viewable here:
http://books.google.com/books?id=kk8G2gK4Tw8C&pg=PA307&lpg=PA308#v=onepage&q&f=false

But other than that, yeah, this driver needs to pretty much be stripped down
to the nuts and bolts and re-written.  Maybe something to tackle in the
future.  I still haven't gotten around to submitting the RTC driver for O2's
(that I re-wrote from a patch sent into LKML years ago) upstream yet.

-- 
Joshua Kinard
Gentoo/MIPS
kumba@gentoo.org
4096R/D25D95E3 2011-03-28

"The past tempts us, the present confuses us, the future frightens us.  And
our lives slip away, moment by moment, lost in that vast, terrible in-between."

--Emperor Turhan, Centauri Republic

  parent reply	other threads:[~2011-12-27 21:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-18  0:56 [PATCH] net: meth: Add set_rx_mode hook to fix ICMPv6 neighbor discovery Joshua Kinard
2011-12-18  2:56 ` David Miller
2011-12-18  4:37   ` Joshua Kinard
2011-12-18  5:19     ` David Miller
2011-12-18 14:40       ` Joshua Kinard
2011-12-18 15:13   ` Joshua Kinard
2011-12-18 13:26 ` Sergei Shtylyov
2011-12-18 14:35   ` Joshua Kinard
2011-12-25  1:45 ` Joshua Kinard
2011-12-26 20:17   ` David Miller
2011-12-27  4:54     ` Joshua Kinard
2011-12-27  5:06 ` Joshua Kinard
2011-12-27 18:17   ` David Miller
2011-12-27 18:34   ` Stephen Hemminger
2011-12-27 18:52     ` David Miller
2011-12-27 21:29     ` Joshua Kinard [this message]
2011-12-27 22:34       ` Stephen Hemminger
2011-12-27 22:48         ` Joshua Kinard
2011-12-28  0:29           ` Stephen Hemminger

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=4EFA38D5.1000602@gentoo.org \
    --to=kumba@gentoo.org \
    --cc=linux-mips@linux-mips.org \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@vyatta.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).