diff options
author | Fabrice Gasnier <fabrice.gasnier@st.com> | 2016-02-29 14:27:36 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-03-02 14:21:32 -0500 |
commit | c363b6586cd424431e84d921267e101ec67207f5 (patch) | |
tree | 78247d9a960abf86967b209af0ba1c99b2384a79 /drivers/net/ethernet/stmicro/stmmac/common.h | |
parent | be434d5075d6be0cda996200b2a20035e1565215 (diff) |
stmmac: optimize tx clean function
This patch "inline" get_tx_owner and get_ls routines. It Results in a
unique read to tdes0, instead of three, to check TX_OWN and LS bits,
and other status bits.
It helps improve driver TX path by removing two uncached read/writes
inside TX clean loop for enhanced descriptors but not for normal ones
because the des1 must be read in any case.
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: Alexandre TORGUE <alexandre.torgue@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/common.h')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/common.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/common.h b/drivers/net/ethernet/stmicro/stmmac/common.h index 885c0f9808b6..7ccb147710fd 100644 --- a/drivers/net/ethernet/stmicro/stmmac/common.h +++ b/drivers/net/ethernet/stmicro/stmmac/common.h @@ -245,6 +245,14 @@ enum rx_frame_status { dma_own = 0x8, }; +/* Tx status */ +enum tx_frame_status { + tx_done = 0x0, + tx_not_ls = 0x1, + tx_err = 0x2, + tx_dma_own = 0x4, +}; + enum dma_irq_status { tx_hard_error = 0x1, tx_hard_error_bump_tc = 0x2, |