linux-mips
[Top] [All Lists]

[PATCH 1/2] netdev: octeon_mgmt: Correct tx IFG workaround.

To: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>
Subject: [PATCH 1/2] netdev: octeon_mgmt: Correct tx IFG workaround.
From: David Daney <ddaney.cavm@gmail.com>
Date: Wed, 19 Jun 2013 17:40:19 -0700
Cc: linux-mips@linux-mips.org, David Daney <david.daney@cavium.com>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=hZb+EeUbCnvsNZ1NG9mxvuKiYeJzbVLTcYM84n0SLh0=; b=BGbMwbMAybnOuKxeGQ09Is5KqHpvo4+htthsVn6o3IfXE8uTCfOCaKuvDIynu4P3ma +yNTNkPRcEVX5Kj2TVDpKVyodizUaoy8cRU2ct3fKXV6FcYzKZQmwsZTD13qH+2Y03nk OY49hmmNp0hN28D9IWLqRonkeA+YDeI1QxO5pagucjPt83LEBN4F6HjPOWIBeUmaRV/Q bmmOeK//fO/r89IQc4TKMoRAQOKBAAdpptLwC2qt8hWWHqj+pX3gTenHVKCEm34YlcnM UMhAWJNYi8X6yN5yQMHs4rgsOg7GUrLD9BM2SM7Ko2ovuLPd6oB9scUhc/MewdjN8VMy w+yA==
In-reply-to: <1371688820-4585-1-git-send-email-ddaney.cavm@gmail.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1371688820-4585-1-git-send-email-ddaney.cavm@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
From: David Daney <david.daney@cavium.com>

The previous fix was still too agressive to meet ieee specs.  Increase
to (14, 10).

Signed-off-by: David Daney <david.daney@cavium.com>
---
 drivers/net/ethernet/octeon/octeon_mgmt.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/octeon/octeon_mgmt.c 
b/drivers/net/ethernet/octeon/octeon_mgmt.c
index e6e0292..1ef4148 100644
--- a/drivers/net/ethernet/octeon/octeon_mgmt.c
+++ b/drivers/net/ethernet/octeon/octeon_mgmt.c
@@ -1141,10 +1141,13 @@ static int octeon_mgmt_open(struct net_device *netdev)
                /* For compensation state to lock. */
                ndelay(1040 * NS_PER_PHY_CLK);
 
-               /* Some Ethernet switches cannot handle standard
-                * Interframe Gap, increase to 16 bytes.
+               /* Default Interframe Gaps are too small.  Recommended
+                * workaround is.
+                *
+                * AGL_GMX_TX_IFG[IFG1]=14
+                * AGL_GMX_TX_IFG[IFG2]=10
                 */
-               cvmx_write_csr(CVMX_AGL_GMX_TX_IFG, 0x88);
+               cvmx_write_csr(CVMX_AGL_GMX_TX_IFG, 0xae);
        }
 
        octeon_mgmt_rx_fill_ring(netdev);
-- 
1.7.11.7


<Prev in Thread] Current Thread [Next in Thread>