staging: octeon-ethernet: eliminate DONT_WRITEBACK
authorAaro Koskinen <aaro.koskinen@iki.fi>
Sat, 4 Apr 2015 19:51:19 +0000 (22:51 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Apr 2015 15:06:09 +0000 (17:06 +0200)
This feature is not used so eliminate it.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/octeon/ethernet-defines.h
drivers/staging/octeon/ethernet-mem.c
drivers/staging/octeon/ethernet-rx.c
drivers/staging/octeon/ethernet-tx.c
drivers/staging/octeon/ethernet.c

index 58ff9ba80d6989e8fb350bd4e47dc02c81ce5026..8a6f82fb3e2c8b6367106c24cc428fe6cca7c2e3 100644 (file)
 
 #define USE_ASYNC_IOBDMA            (CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE > 0)
 
-/*
- * Use this to have all FPA frees also tell the L2 not to write data
- * to memory.
- */
-#define DONT_WRITEBACK(x)           (x)
-/* Use this to not have FPA frees control L2 */
-/*#define DONT_WRITEBACK(x)         0   */
-
 /* Maximum number of SKBs to try to free per xmit packet. */
 #define MAX_OUT_QUEUE_DEPTH 1000
 
index ea1232cd1a33d2a90ed3a7c5af0f4a82eacd114d..55d921917125b841146f9f2c3943c639304e7456 100644 (file)
@@ -54,7 +54,7 @@ static int cvm_oct_fill_hw_skbuff(int pool, int size, int elements)
                        break;
                skb_reserve(skb, 256 - (((unsigned long)skb->data) & 0x7f));
                *(struct sk_buff **)(skb->data - sizeof(void *)) = skb;
-               cvmx_fpa_free(skb->data, pool, DONT_WRITEBACK(size / 128));
+               cvmx_fpa_free(skb->data, pool, size / 128);
                freed--;
        }
        return elements - freed;
index 91043ccc61db3dd82304b07dc28bbe7b709242b9..fbf5f946036abc0f81eb5098e61f9723fe45eafb 100644 (file)
@@ -400,8 +400,7 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
                        cvmx_fau_atomic_add32(FAU_NUM_PACKET_BUFFERS_TO_FREE,
                                              1);
 
-                       cvmx_fpa_free(work, CVMX_FPA_WQE_POOL,
-                                     DONT_WRITEBACK(1));
+                       cvmx_fpa_free(work, CVMX_FPA_WQE_POOL, 1);
                } else {
                        cvm_oct_free_work(work);
                }
index 94ba85ae7b50d8769d87dd85e4eea394acf77c85..25f89b6229b02aeecca075b3b49b641a002eb3b4 100644 (file)
@@ -576,7 +576,7 @@ int cvm_oct_xmit_pow(struct sk_buff *skb, struct net_device *dev)
        if (unlikely(packet_buffer == NULL)) {
                printk_ratelimited("%s: Failed to allocate a packet buffer\n",
                                   dev->name);
-               cvmx_fpa_free(work, CVMX_FPA_WQE_POOL, DONT_WRITEBACK(1));
+               cvmx_fpa_free(work, CVMX_FPA_WQE_POOL, 1);
                priv->stats.tx_dropped++;
                dev_kfree_skb_any(skb);
                return 0;
index afcdce4bce1cdc0003385ae6d35ef2aba94349e7..d05bdca37278583b87ed781e39797f213a02f32e 100644 (file)
@@ -203,11 +203,10 @@ int cvm_oct_free_work(void *work_queue_entry)
                if (unlikely(!segment_ptr.s.i))
                        cvmx_fpa_free(cvm_oct_get_buffer_ptr(segment_ptr),
                                      segment_ptr.s.pool,
-                                     DONT_WRITEBACK(CVMX_FPA_PACKET_POOL_SIZE /
-                                                    128));
+                                     CVMX_FPA_PACKET_POOL_SIZE / 128);
                segment_ptr = next_ptr;
        }
-       cvmx_fpa_free(work, CVMX_FPA_WQE_POOL, DONT_WRITEBACK(1));
+       cvmx_fpa_free(work, CVMX_FPA_WQE_POOL, 1);
 
        return 0;
 }