diff options
author | Rayagond Kokatanur <rayagond@vayavyalabs.com> | 2013-03-26 08:43:09 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-26 20:53:37 +0400 |
commit | cf32deec16e4e8d47305bdc638fd108c88e06081 (patch) | |
tree | 1ea6ae2de2f92f18fff9332410f403f923e6cb99 /drivers/net/ethernet/stmicro/stmmac/stmmac.h | |
parent | e58bb43f5e438c9e003100a13a168aa90a651faa (diff) | |
download | linux-cf32deec16e4e8d47305bdc638fd108c88e06081.tar.xz |
stmmac: add tx_skbuff_dma to save descriptors used by PTP
This patch adds a new pointer variable called "tx_skbuff_dma" to private
data structure. This variable will holds the physical address of packet
to be transmitted & same will be used to free/unmap the memory once the
corresponding packet is transmitted by device.
Prior to this patch the descriptor buffer pointer(ie des2) itself was
being used for freeing/unmapping the buffer memory. But in case PTP v1
with normal descriptor the field(des2) will be overwritten by device
with timestamp value, hence driver will loose the buffer pointer to be
freed/unmapped.
Signed-off-by: Rayagond Kokatanur <rayagond@vayavyalabs.com>
Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac.h')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h index 182a83802aa2..5176cae44b03 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h @@ -38,6 +38,7 @@ struct stmmac_priv { struct dma_extended_desc *dma_etx; /* Extended TX descriptor */ dma_addr_t dma_tx_phy; struct sk_buff **tx_skbuff; + dma_addr_t *tx_skbuff_dma; unsigned int cur_tx; unsigned int dirty_tx; unsigned int dma_tx_size; |