From: "Guo-Fu Tseng" <cooldavid@cooldavid.org>
To: "David Miller" <davem@davemloft.net>
Cc: Guo-Fu Tseng <cooldavid@cooldavid.org>,
"linux-netdev" <netdev@vger.kernel.org>,
"Steven Chen" <stevenchen@jmicron.com>,
"Devinchiu" <devinchiu@jmicron.com>,
angelli@jmicron.com,
"Federico Quagliata" <federico@quagliata.org>,
stable@kernel.org
Subject: [PATCH] jme: Fix FIFO flush issue
Date: Thu, 23 Feb 2012 02:58:10 +0800 [thread overview]
Message-ID: <1329937090-20779-1-git-send-email-cooldavid@cooldavid.org> (raw)
From: Guo-Fu Tseng <cooldavid@cooldavid.org>
Set the RX FIFO flush watermark lower.
According to Federico and JMicron's reply,
setting it to 16QW would be stable on most platforms.
Otherwise, user might experience packet drop issue.
CC: stable@kernel.org
Reported-by: Federico Quagliata <federico@quagliata.org>
Fixed-by: Federico Quagliata <federico@quagliata.org>
Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
---
drivers/net/ethernet/jme.c | 10 +---------
drivers/net/ethernet/jme.h | 2 +-
2 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/net/ethernet/jme.c b/drivers/net/ethernet/jme.c
index 1b86d0b..4ea6580 100644
--- a/drivers/net/ethernet/jme.c
+++ b/drivers/net/ethernet/jme.c
@@ -2328,19 +2328,11 @@ jme_change_mtu(struct net_device *netdev, int new_mtu)
((new_mtu) < IPV6_MIN_MTU))
return -EINVAL;
- if (new_mtu > 4000) {
- jme->reg_rxcs &= ~RXCS_FIFOTHNP;
- jme->reg_rxcs |= RXCS_FIFOTHNP_64QW;
- jme_restart_rx_engine(jme);
- } else {
- jme->reg_rxcs &= ~RXCS_FIFOTHNP;
- jme->reg_rxcs |= RXCS_FIFOTHNP_128QW;
- jme_restart_rx_engine(jme);
- }
netdev->mtu = new_mtu;
netdev_update_features(netdev);
+ jme_restart_rx_engine(jme);
jme_reset_link(jme);
return 0;
diff --git a/drivers/net/ethernet/jme.h b/drivers/net/ethernet/jme.h
index 4304072..3efc897 100644
--- a/drivers/net/ethernet/jme.h
+++ b/drivers/net/ethernet/jme.h
@@ -730,7 +730,7 @@ enum jme_rxcs_values {
RXCS_RETRYCNT_60 = 0x00000F00,
RXCS_DEFAULT = RXCS_FIFOTHTP_128T |
- RXCS_FIFOTHNP_128QW |
+ RXCS_FIFOTHNP_16QW |
RXCS_DMAREQSZ_128B |
RXCS_RETRYGAP_256ns |
RXCS_RETRYCNT_32,
--
1.7.3.4
next reply other threads:[~2012-02-22 19:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-22 18:58 Guo-Fu Tseng [this message]
2012-02-22 20:26 ` [PATCH] jme: Fix FIFO flush issue 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=1329937090-20779-1-git-send-email-cooldavid@cooldavid.org \
--to=cooldavid@cooldavid.org \
--cc=angelli@jmicron.com \
--cc=davem@davemloft.net \
--cc=devinchiu@jmicron.com \
--cc=federico@quagliata.org \
--cc=netdev@vger.kernel.org \
--cc=stable@kernel.org \
--cc=stevenchen@jmicron.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).