]> Pileus Git - ~andy/linux/commit
stmmac: add tx_skbuff_dma to save descriptors used by PTP
authorRayagond Kokatanur <rayagond@vayavyalabs.com>
Tue, 26 Mar 2013 04:43:09 +0000 (04:43 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Mar 2013 16:53:37 +0000 (12:53 -0400)
commitcf32deec16e4e8d47305bdc638fd108c88e06081
tree1ea6ae2de2f92f18fff9332410f403f923e6cb99
parente58bb43f5e438c9e003100a13a168aa90a651faa
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>
drivers/net/ethernet/stmicro/stmmac/chain_mode.c
drivers/net/ethernet/stmicro/stmmac/ring_mode.c
drivers/net/ethernet/stmicro/stmmac/stmmac.h
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c