public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Nicolas Ferre <nicolas.ferre@atmel•com>
To: Steffen Trumtrar <s.trumtrar@pengutronix•de>,
	Hein Tibosch <hein_tibosch@yahoo•es>, <netdev@vger•kernel.org>,
	David Miller <davem@davemloft•net>
Cc: Ludovic Desroches <ludovic.desroches@atmel•com>
Subject: Re: net/macb: clear tx/rx completion flags in ISR
Date: Fri, 19 Apr 2013 09:48:43 +0200	[thread overview]
Message-ID: <5170F6DB.6030500@atmel.com> (raw)
In-Reply-To: <20130419073058.GA660@pengutronix.de>

On 04/19/2013 09:30 AM, Steffen Trumtrar :
> Hi Hein,
> 
> On Fri, Apr 19, 2013 at 01:13:26PM +0800, Hein Tibosch wrote:
>> Hi Steffen,
>>
>>> At least in the cadence IP core on the Xilinx Zynq SoC the TCOMP/RCOMP flags
>>> are not auto-cleaned. As these flags are evaluated, they need to be cleaned.
>>
>> This patch does not work for at least the AVR32 platform. Both RCOMP/RCOMP
>> are cleared by *reading* the ISR and writing them would be fatal.
>>
> 
> :-(
> 
>> Could you tell me the version of the macb of Xilinx Zynq?
>>
>>     u32 version = (macb_readl(bp, MID) & ((1 << MACB_REV_SIZE) - 1))
>>             | MACB_GREGS_VERSION;
>>
>> On an AP7000 it reads as 0x0000010D
>>
> 
> This gives me 0x00000119. The TRM says it is version r1p23.
> 
>> I am thinking of making a patch like:
>>
>>     if (bp->version >= xxx)
>>         macb_writel(bp, ISR, MACB_BIT(TCOMP));
>>
>>     if (bp->version >= xxx)
>>         macb_writel(bp, ISR, MACB_BIT(RCOMP));
>>
>> which would make it work on both platforms.

Well, keep in mind that it is the hot path: It can harm the performance
if too much tests are performed...

> The documentation I have is a little bit confusing in that regard.
> The cadence datasheet says, this register is R/W, the Xilinx datasheet says,
> it is "normaly RO", but the programming guide explicitely mentions clearing
> the bit by writing to it.
> It seems, that something like your patch is inevitable.

I also had bad feedbacks concerning this patch. Maybe we should take
more time to validate this change: event it is in net-next, maybe we
should revert it for the moment...

Best regards,
-- 
Nicolas Ferre

  reply	other threads:[~2013-04-19  7:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-19  5:13 net/macb: clear tx/rx completion flags in ISR Hein Tibosch
2013-04-19  7:30 ` Steffen Trumtrar
2013-04-19  7:48   ` Nicolas Ferre [this message]
2013-04-19  9:21     ` Hein Tibosch
2013-04-19  9:38       ` Steffen Trumtrar

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=5170F6DB.6030500@atmel.com \
    --to=nicolas.ferre@atmel$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=hein_tibosch@yahoo$(echo .)es \
    --cc=ludovic.desroches@atmel$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=s.trumtrar@pengutronix$(echo .)de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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