]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
drivers: net: xgene: fix: Disable coalescing on v1 hardware
authorIyappan Subramanian <isubramanian@apm.com>
Mon, 31 Oct 2016 23:00:26 +0000 (16:00 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Nov 2016 16:04:52 +0000 (12:04 -0400)
Since ethernet v1 hardware has a bug related to coalescing, disabling
this feature.

Signed-off-by: Iyappan Subramanian <isubramanian@apm.com>
Signed-off-by: Toan Le <toanle@apm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/apm/xgene/xgene_enet_hw.c
drivers/net/ethernet/apm/xgene/xgene_enet_main.c

index c481f104a8febc4acacf223ad2c3fd5f4147ef41..5390ae89136c6b7870c5d915655854707192b0d5 100644 (file)
@@ -204,17 +204,6 @@ static u32 xgene_enet_ring_len(struct xgene_enet_desc_ring *ring)
        return num_msgs;
 }
 
-static void xgene_enet_setup_coalescing(struct xgene_enet_desc_ring *ring)
-{
-       u32 data = 0x7777;
-
-       xgene_enet_ring_wr32(ring, CSR_PBM_COAL, 0x8e);
-       xgene_enet_ring_wr32(ring, CSR_PBM_CTICK1, data);
-       xgene_enet_ring_wr32(ring, CSR_PBM_CTICK2, data << 16);
-       xgene_enet_ring_wr32(ring, CSR_THRESHOLD0_SET1, 0x40);
-       xgene_enet_ring_wr32(ring, CSR_THRESHOLD1_SET1, 0x80);
-}
-
 void xgene_enet_parse_error(struct xgene_enet_desc_ring *ring,
                            struct xgene_enet_pdata *pdata,
                            enum xgene_enet_err_code status)
@@ -929,5 +918,4 @@ struct xgene_ring_ops xgene_ring1_ops = {
        .clear = xgene_enet_clear_ring,
        .wr_cmd = xgene_enet_wr_cmd,
        .len = xgene_enet_ring_len,
-       .coalesce = xgene_enet_setup_coalescing,
 };
index 429f18fc5503ddede288ff0203068a56ce9df3a8..8158d4698734dd76be6475d38d7f17800517362b 100644 (file)
@@ -1188,7 +1188,8 @@ static int xgene_enet_create_desc_rings(struct net_device *ndev)
                tx_ring->dst_ring_num = xgene_enet_dst_ring_num(cp_ring);
        }
 
-       pdata->ring_ops->coalesce(pdata->tx_ring[0]);
+       if (pdata->ring_ops->coalesce)
+               pdata->ring_ops->coalesce(pdata->tx_ring[0]);
        pdata->tx_qcnt_hi = pdata->tx_ring[0]->slots - 128;
 
        return 0;