aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ti/davinci_cpdma.h
diff options
context:
space:
mode:
authorIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>2016-06-17 13:25:39 +0300
committerDavid S. Miller <davem@davemloft.net>2016-06-17 21:27:57 -0700
commit1793331e0943f1ddd8649dd1ccea11f3f267d371 (patch)
tree88647e5114ccf28c90709879635e332d22e571fe /drivers/net/ethernet/ti/davinci_cpdma.h
parenttipc: potential shift wrapping bug in map_set() (diff)
downloadlinux-dev-1793331e0943f1ddd8649dd1ccea11f3f267d371.tar.xz
linux-dev-1793331e0943f1ddd8649dd1ccea11f3f267d371.zip
net: ethernet: ti: cpsw: remove rx_descs property
There is no reason in rx_descs property because davinici_cpdma driver splits pool of descriptors equally between tx and rx channels. That is, if number of descriptors 256, 128 of them are for rx channels. While receiving, the descriptor is freed to the pool and then allocated with new skb. And if in DT the "rx_descs" is set to 64, then 128 - 64 = 64 descriptors are always in the pool and cannot be used, for tx, for instance. It's not correct resource usage, better to set it to half of pool, then the rx pool can be used in full. It will not have any impact on performance, as anyway, the "redundant" descriptors were unused. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ti/davinci_cpdma.h')
-rw-r--r--drivers/net/ethernet/ti/davinci_cpdma.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ti/davinci_cpdma.h b/drivers/net/ethernet/ti/davinci_cpdma.h
index 86dee487f2f0..80c015cbbce5 100644
--- a/drivers/net/ethernet/ti/davinci_cpdma.h
+++ b/drivers/net/ethernet/ti/davinci_cpdma.h
@@ -81,6 +81,7 @@ int cpdma_ctlr_dump(struct cpdma_ctlr *ctlr);
struct cpdma_chan *cpdma_chan_create(struct cpdma_ctlr *ctlr, int chan_num,
cpdma_handler_fn handler);
+int cpdma_chan_get_rx_buf_num(struct cpdma_ctlr *ctlr);
int cpdma_chan_destroy(struct cpdma_chan *chan);
int cpdma_chan_start(struct cpdma_chan *chan);
int cpdma_chan_stop(struct cpdma_chan *chan);