From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH RFC 24/30] net: fec: better implementation of iMX6 ERR006358 quirk
Date: Sun, 22 Jun 2014 09:49:11 +0100 [thread overview]
Message-ID: <20140622084911.GD32514@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <56f5e44adf0b41a0bbf52c38b755afbd@BLUPR03MB373.namprd03.prod.outlook.com>
On Sun, Jun 22, 2014 at 08:38:49AM +0000, fugang.duan at freescale.com wrote:
> From: Russell King - ARM Linux <linux@arm.linux.org.uk> Data: Sunday, June 22, 2014 4:13 PM
> >To: Duan Fugang-B38611
> >Cc: linux-arm-kernel at lists.infradead.org; netdev at vger.kernel.org
> >Subject: Re: [PATCH RFC 24/30] net: fec: better implementation of iMX6
> >ERR006358 quirk
> >
> >On Sun, Jun 22, 2014 at 07:49:11AM +0000, fugang.duan at freescale.com wrote:
> >> From: Russell King <rmk@arm.linux.org.uk> Data: Friday, June 20, 2014
> >> 8:14 PM
> >> >To: linux-arm-kernel at lists.infradead.org
> >> >Cc: Duan Fugang-B38611; netdev at vger.kernel.org
> >> >Subject: [PATCH RFC 24/30] net: fec: better implementation of iMX6
> >> >ERR006358 quirk
> >> >
> >> >+
> >> >+ /* ERR006538: Keep the transmitter going */
> >> >+ if (fep->dirty_tx != fep->cur_tx &&
> >> >+ readl(fep->hwp + FEC_X_DES_ACTIVE) == 0)
> >> >+ writel(0, fep->hwp + FEC_X_DES_ACTIVE);
> >> > }
> >> >
...
> >While I agree that we can read back to check whether the device indicates
> >that transmit is active, there's no point to the other tests. If there
> >are entries in the transmit ring but the transmitter indicates that it is
> >not active, then it is obvious that the bug has been hit. This is exactly
> >what my implementation above does.
> >
> The condition "fep->dirty_tx != fep->cur_tx" is not only limited for the errata.
> I mean only add extra trigger TDAR for the issue.
Yes, I agree that test is wrong (that's what comes from shuffling the
patches... subsequent patches modify the indexing mechanism). It should
be:
if (bdp != fep->cur_tx &&
readl(fep->hwp + FEC_X_DES_ACTIVE) == 0)
writel(0, fep->hwp + FEC_X_DES_ACTIVE);
Since "bdp" is the post-incremented dirty_tx pointer, which, when it is
equal to fep->cur_tx means that the ring is empty.
--
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.
next prev parent reply other threads:[~2014-06-22 8:49 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-20 12:11 [PATCH RFC 00/30] Initial round of Freescale FEC ethernet patches Russell King - ARM Linux
2014-06-20 12:11 ` [PATCH RFC 01/30] net: fec: Don't clear IPV6 header checksum field when IP accelerator enable Russell King
2014-06-20 12:11 ` [PATCH RFC 02/30] net: fec: iMX6 FEC does not support half-duplex gigabit Russell King
2014-06-20 12:11 ` [PATCH RFC 03/30] net: fec: fix ethtool set_pauseparam duplex bug Russell King
2014-06-20 12:12 ` [PATCH RFC 04/30] net: fec: fix interrupt handling races Russell King
2014-06-20 12:39 ` David Laight
2014-06-20 15:36 ` Russell King - ARM Linux
2014-06-20 16:00 ` David Laight
2014-06-22 6:38 ` fugang.duan at freescale.com
2014-06-20 12:12 ` [PATCH RFC 05/30] net: fec: use netif_tx_disable() rather than netif_stop_queue() Russell King
2014-06-20 12:12 ` [PATCH RFC 06/30] net: fec: remove checking for NULL phy_dev in fec_enet_close() Russell King
2014-06-20 12:12 ` [PATCH RFC 07/30] net: fec: ensure that a disconnected phy isn't configured Russell King
2014-06-20 12:12 ` [PATCH RFC 08/30] net: fec: stop the phy before shutting down the MAC Russell King
2014-06-20 12:12 ` [PATCH RFC 09/30] net: fec: remove useless fep->opened Russell King
2014-06-20 12:12 ` [PATCH RFC 10/30] net: fec: make rx skb handling more robust Russell King
2014-06-20 12:12 ` [PATCH RFC 11/30] net: fec: clean up transmit descriptor setup Russell King
2014-06-20 12:12 ` [PATCH RFC 12/30] net: fec: ensure fec_enet_free_buffers() properly cleans the rings Russell King
2014-06-20 12:12 ` [PATCH RFC 13/30] net: fec: fix missing kmalloc() failure check in fec_enet_alloc_buffers() Russell King
2014-06-20 12:12 ` [PATCH RFC 14/30] net: fec: improve safety of suspend/resume/transmit timeout paths Russell King
2014-06-20 12:12 ` [PATCH RFC 15/30] net: fec: ensure fec_enet_close() copes with resume failure Russell King
2014-06-20 12:13 ` [PATCH RFC 16/30] net: fec: only restart or stop the device if it is present and running Russell King
2014-06-20 12:13 ` [PATCH RFC 17/30] net: fec: move calls to quiesce/resume packet processing out of fec_restart() Russell King
2014-06-20 12:13 ` [PATCH RFC 18/30] net: fec: remove inappropriate calls around fec_restart() Russell King
2014-06-22 6:54 ` fugang.duan at freescale.com
2014-06-22 7:55 ` Russell King - ARM Linux
2014-06-22 8:07 ` fugang.duan at freescale.com
2014-06-20 12:13 ` [PATCH RFC 19/30] net: fec: quiesce packet processing before stopping device in fec_suspend() Russell King
2014-06-20 12:13 ` [PATCH RFC 20/30] net: fec: quiesce packet processing before stopping device in fec_set_features() Russell King
2014-06-20 12:13 ` [PATCH RFC 21/30] net: fec: quiesce packet processing before changing features Russell King
2014-06-20 12:13 ` [PATCH RFC 22/30] net: fec: quiesce packet processing when taking link down in fec_enet_adjust_link() Russell King
2014-06-20 12:13 ` [PATCH RFC 23/30] net: fec: clean up duplex mode handling Russell King
2014-06-20 12:13 ` [PATCH RFC 24/30] net: fec: better implementation of iMX6 ERR006358 quirk Russell King
2014-06-22 7:49 ` fugang.duan at freescale.com
2014-06-22 8:12 ` Russell King - ARM Linux
2014-06-22 8:24 ` Russell King - ARM Linux
2014-06-22 8:38 ` fugang.duan at freescale.com
2014-06-22 8:49 ` Russell King - ARM Linux [this message]
2014-06-24 10:29 ` Russell King - ARM Linux
2014-06-25 1:41 ` fugang.duan at freescale.com
2014-06-20 12:13 ` [PATCH RFC 25/30] net: fec: replace delayed work with standard work Russell King
2014-06-20 12:13 ` [PATCH RFC 26/30] net: fec: clear receive interrupts before processing a packet Russell King
2014-06-20 12:14 ` [PATCH RFC 27/30] net: fec: reorder ethtool ops to match order in struct declaration Russell King
2014-06-20 12:14 ` [PATCH RFC 28/30] net: fec: add support for dumping transmit ring on timeout Russell King
2014-06-20 12:14 ` [PATCH RFC 29/30] net: fec: remove useless status check in tx reap path Russell King
2014-06-20 12:14 ` [PATCH RFC 30/30] net: fec: consolidate hwtstamp implementation Russell King
2014-06-21 6:11 ` Richard Cochran
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=20140622084911.GD32514@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
/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).