diff options
Diffstat (limited to 'drivers/staging/octeon/ethernet-mem.c')
| -rw-r--r-- | drivers/staging/octeon/ethernet-mem.c | 20 | 
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/staging/octeon/ethernet-mem.c b/drivers/staging/octeon/ethernet-mem.c index 635bb86cdcf..bf666b02319 100644 --- a/drivers/staging/octeon/ethernet-mem.c +++ b/drivers/staging/octeon/ethernet-mem.c @@ -30,9 +30,10 @@  #include <asm/octeon/octeon.h> +#include "ethernet-mem.h"  #include "ethernet-defines.h" -#include "cvmx-fpa.h" +#include <asm/octeon/cvmx-fpa.h>  /**   * cvm_oct_fill_hw_skbuff - fill the supplied hardware pool with skbuffs @@ -48,13 +49,8 @@ static int cvm_oct_fill_hw_skbuff(int pool, int size, int elements)  	while (freed) {  		struct sk_buff *skb = dev_alloc_skb(size + 256); -		if (unlikely(skb == NULL)) { -			pr_warning -			    ("Failed to allocate skb for hardware pool %d\n", -			     pool); +		if (unlikely(skb == NULL))  			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)); @@ -84,10 +80,10 @@ static void cvm_oct_free_hw_skbuff(int pool, int size, int elements)  	} while (memory);  	if (elements < 0) -		pr_warning("Freeing of pool %u had too many skbuffs (%d)\n", +		pr_warn("Freeing of pool %u had too many skbuffs (%d)\n",  		     pool, elements);  	else if (elements > 0) -		pr_warning("Freeing of pool %u is missing %d skbuffs\n", +		pr_warn("Freeing of pool %u is missing %d skbuffs\n",  		       pool, elements);  } @@ -118,7 +114,7 @@ static int cvm_oct_fill_hw_memory(int pool, int size, int elements)  		 */  		memory = kmalloc(size + 256, GFP_ATOMIC);  		if (unlikely(memory == NULL)) { -			pr_warning("Unable to allocate %u bytes for FPA pool %d\n", +			pr_warn("Unable to allocate %u bytes for FPA pool %d\n",  				   elements * size, pool);  			break;  		} @@ -151,10 +147,10 @@ static void cvm_oct_free_hw_memory(int pool, int size, int elements)  	} while (fpa);  	if (elements < 0) -		pr_warning("Freeing of pool %u had too many buffers (%d)\n", +		pr_warn("Freeing of pool %u had too many buffers (%d)\n",  			pool, elements);  	else if (elements > 0) -		pr_warning("Warning: Freeing of pool %u is missing %d buffers\n", +		pr_warn("Warning: Freeing of pool %u is missing %d buffers\n",  			pool, elements);  }  | 
