summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/stmicro/stmmac/common.h
diff options
context:
space:
mode:
authorFabrice Gasnier2016-02-29 14:27:34 +0100
committerDavid S. Miller2016-03-02 20:21:32 +0100
commitc1fa3212be5503d802a5c4c451dd4e673fdc603a (patch)
treedf0200388853f5d98b595c1ed34e82565d89666d /drivers/net/ethernet/stmicro/stmmac/common.h
parentstmmac: add is_jumbo field to dma data (diff)
downloadkernel-qcow2-linux-c1fa3212be5503d802a5c4c451dd4e673fdc603a.tar.gz
kernel-qcow2-linux-c1fa3212be5503d802a5c4c451dd4e673fdc603a.tar.xz
kernel-qcow2-linux-c1fa3212be5503d802a5c4c451dd4e673fdc603a.zip
stmmac: merge get_rx_owner into rx_status routine.
The RDES0 register can be read several times while doing RX of a packet. This patch slightly improves RX path performance by reading rdes0 once for two operation: check rx owner, get rx status bits. 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.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/common.h b/drivers/net/ethernet/stmicro/stmmac/common.h
index 09291af19039..3ba268e93bc9 100644
--- a/drivers/net/ethernet/stmicro/stmmac/common.h
+++ b/drivers/net/ethernet/stmicro/stmmac/common.h
@@ -238,10 +238,11 @@ struct stmmac_extra_stats {
/* Rx IPC status */
enum rx_frame_status {
- good_frame = 0,
- discard_frame = 1,
- csum_none = 2,
- llc_snap = 4,
+ good_frame = 0x0,
+ discard_frame = 0x1,
+ csum_none = 0x2,
+ llc_snap = 0x4,
+ dma_own = 0x8,
};
enum dma_irq_status {
@@ -356,7 +357,6 @@ struct stmmac_desc_ops {
/* Get the buffer size from the descriptor */
int (*get_tx_len) (struct dma_desc *p);
/* Handle extra events on specific interrupts hw dependent */
- int (*get_rx_owner) (struct dma_desc *p);
void (*set_rx_owner) (struct dma_desc *p);
/* Get the receive frame size */
int (*get_rx_frame_len) (struct dma_desc *p, int rx_coe_type);