All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: romieu@fr.zoreil.com
Cc: ben@decadent.org.uk, timo.teras@iki.fi, ivecera@redhat.com,
	netdev@vger.kernel.org
Subject: Re: [PATCH] r8169: fix broken register writes
Date: Sat, 27 Mar 2010 19:38:15 -0700 (PDT)	[thread overview]
Message-ID: <20100327.193815.242127373.davem@davemloft.net> (raw)
In-Reply-To: <20100328003143.GA8501@electric-eye.fr.zoreil.com>

From: François Romieu <romieu@fr.zoreil.com>
Date: Sun, 28 Mar 2010 01:31:43 +0100

> This is quite similar to b39fe41f481d20c201012e4483e76c203802dda7
> though said registers are not even documented as 64-bit registers
> - as opposed to the initial TxDescStartAddress ones - but as single
> bytes which must be combined into 32 bits at the MMIO read/write
> level before being merged into a 64 bit logical entity.
> 
> Credits go to Ben Hutchings <ben@decadent.org.uk> for the MAR
> registers (aka "multicast is broken for ages on ARM) and to
> Timo Teräs <timo.teras@iki.fi> for the MAC registers.
> 
> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>

Applied, thanks Francois.

Probably the rest of the driver should be audited for other
areas where we may end up having this problem.

Or, we should create readq/writeq macros (like other drivers do on
32-bit platforms, f.e. see drivers/net/niu.c) which write the two
32-bit parts in this required order.  Then access the registers using
readq/writeq entities throughout the driver.

This would have two benefits:

1) Coverage for all possible bug cases.

2) Real 64-bit accesses on 64-bit platforms.

Just some suggestions.

Thanks.

  parent reply	other threads:[~2010-03-28  2:37 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-27 10:28 r8169 mac reading/writing broken Timo Teräs
2010-03-27 11:40 ` François Romieu
2010-03-27 11:46   ` Timo Teräs
2010-03-27 12:03     ` François Romieu
2010-03-27 12:16       ` Timo Teräs
2010-03-27 12:25         ` Timo Teräs
2010-03-27 12:26         ` François Romieu
2010-03-27 12:32           ` Timo Teräs
2010-03-27 20:37             ` Timo Teräs
2010-03-27 21:11               ` François Romieu
2010-03-27 23:20                 ` Ben Hutchings
2010-03-27 23:30                   ` David Miller
2010-03-28  0:31                     ` [PATCH] r8169: fix broken register writes François Romieu
2010-03-28  0:47                       ` Ben Hutchings
2010-03-28 21:28                         ` François Romieu
2010-03-28 22:19                           ` Al Viro
2010-03-29  1:03                             ` Al Viro
2010-03-29  2:17                               ` Al Viro
2010-03-31 20:27                                 ` =?unknown-8bit?B?RnJhbsOnb2lz?= Romieu
2010-03-29 21:11                             ` François Romieu
2010-03-28  2:38                       ` David Miller [this message]
2010-03-28 22:04                         ` François Romieu

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=20100327.193815.242127373.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=ben@decadent.org.uk \
    --cc=ivecera@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=romieu@fr.zoreil.com \
    --cc=timo.teras@iki.fi \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.