diff options
author | Gregory CLEMENT <gregory.clement@free-electrons.com> | 2016-03-14 09:39:05 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-03-14 12:19:47 -0400 |
commit | baa11ebc0c7680861f74f8a11dca903e4b421262 (patch) | |
tree | 4b3579d7e2bd56b1c529fdd7620dd58826971997 /drivers/net/ethernet/marvell/mvneta_bm.h | |
parent | 8cb2d8bf57e6e004c37db2fb4ce74f4d032b7cd0 (diff) | |
download | linux-baa11ebc0c7680861f74f8a11dca903e4b421262.tar.gz linux-baa11ebc0c7680861f74f8a11dca903e4b421262.tar.bz2 linux-baa11ebc0c7680861f74f8a11dca903e4b421262.zip |
net: mvneta: Use the new hwbm framework
Now that the hardware buffer management framework had been introduced,
let's use it.
Tested-by: Sebastian Careba <nitroshift@yahoo.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/marvell/mvneta_bm.h')
-rw-r--r-- | drivers/net/ethernet/marvell/mvneta_bm.h | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/net/ethernet/marvell/mvneta_bm.h b/drivers/net/ethernet/marvell/mvneta_bm.h index db239e061ab0..e74fd44a92f7 100644 --- a/drivers/net/ethernet/marvell/mvneta_bm.h +++ b/drivers/net/ethernet/marvell/mvneta_bm.h @@ -108,20 +108,15 @@ struct mvneta_bm { }; struct mvneta_bm_pool { + struct hwbm_pool hwbm_pool; /* Pool number in the range 0-3 */ u8 id; enum mvneta_bm_type type; - /* Buffer Pointers Pool External (BPPE) size in number of bytes */ - int size; - /* Number of buffers used by this pool */ - int buf_num; - /* Pool buffer size */ - int buf_size; /* Packet size */ int pkt_size; - /* Single frag size */ - u32 frag_size; + /* Size of the buffer acces through DMA*/ + u32 buf_size; /* BPPE virtual base address */ u32 *virt_addr; @@ -143,8 +138,7 @@ void mvneta_bm_pool_destroy(struct mvneta_bm *priv, struct mvneta_bm_pool *bm_pool, u8 port_map); void mvneta_bm_bufs_free(struct mvneta_bm *priv, struct mvneta_bm_pool *bm_pool, u8 port_map); -int mvneta_bm_bufs_add(struct mvneta_bm *priv, struct mvneta_bm_pool *bm_pool, - int buf_num); +int mvneta_bm_construct(struct hwbm_pool *hwbm_pool, void *buf); int mvneta_bm_pool_refill(struct mvneta_bm *priv, struct mvneta_bm_pool *bm_pool); struct mvneta_bm_pool *mvneta_bm_pool_use(struct mvneta_bm *priv, u8 pool_id, @@ -170,8 +164,7 @@ void mvneta_bm_pool_destroy(struct mvneta_bm *priv, struct mvneta_bm_pool *bm_pool, u8 port_map) {} void mvneta_bm_bufs_free(struct mvneta_bm *priv, struct mvneta_bm_pool *bm_pool, u8 port_map) {} -int mvneta_bm_bufs_add(struct mvneta_bm *priv, struct mvneta_bm_pool *bm_pool, - int buf_num) { return 0; } +int mvneta_bm_construct(struct hwbm_pool *hwbm_pool, void *buf) { return 0; } int mvneta_bm_pool_refill(struct mvneta_bm *priv, struct mvneta_bm_pool *bm_pool) {return 0; } struct mvneta_bm_pool *mvneta_bm_pool_use(struct mvneta_bm *priv, u8 pool_id, |