summaryrefslogtreecommitdiffstats
path: root/sys/dev/rt/if_rtvar.h
diff options
context:
space:
mode:
authorsgalabov <sgalabov@FreeBSD.org>2016-04-07 07:22:22 +0000
committersgalabov <sgalabov@FreeBSD.org>2016-04-07 07:22:22 +0000
commit50189484f0e997ff7e620cf0a89c1ebae481e8ec (patch)
tree45874855932db8a97d85cee854b892219661bd60 /sys/dev/rt/if_rtvar.h
parent018d7a211836a779a9658847a01b4972f5eded2f (diff)
downloadFreeBSD-src-50189484f0e997ff7e620cf0a89c1ebae481e8ec.zip
FreeBSD-src-50189484f0e997ff7e620cf0a89c1ebae481e8ec.tar.gz
This revision adds support to if_rt for more SoCs.
The SoCs I've tried the driver with include the following: RT3050, RT5350, RT3662, RT3883, MT7620, MT7621, MT7688. On boards, based on the above SoCs traffic is passing through correctly and the boards survive a flood ping with very little or no drops (drops may be caused elsewhere in my test setup, however). One issue still remains and needs to be fixed in the future: if_rt does not survive an ifconfig rt0 down/ifconfig rt0 up cycle. This issue existed before this commit as well, however. Reviewed by: ray Approved by: adrian (mentor) Sponsored by: Smartcom - Bulgaria AD Differential Revision: https://reviews.freebsd.org/D5864
Diffstat (limited to 'sys/dev/rt/if_rtvar.h')
-rw-r--r--sys/dev/rt/if_rtvar.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/dev/rt/if_rtvar.h b/sys/dev/rt/if_rtvar.h
index f46574f..b2869c5 100644
--- a/sys/dev/rt/if_rtvar.h
+++ b/sys/dev/rt/if_rtvar.h
@@ -115,12 +115,21 @@ struct rt_txdesc
} __packed;
#define RT_RXDESC_SDL0_DDONE (1 << 15)
+
+#define RT305X_RXD_SRC_L4_CSUM_FAIL (1 << 28)
+#define RT305X_RXD_SRC_IP_CSUM_FAIL (1 << 29)
+#define MT7620_RXD_SRC_L4_CSUM_FAIL (1 << 22)
+#define MT7620_RXD_SRC_IP_CSUM_FAIL (1 << 25)
+#define MT7621_RXD_SRC_L4_CSUM_FAIL (1 << 23)
+#define MT7621_RXD_SRC_IP_CSUM_FAIL (1 << 26)
+
struct rt_rxdesc
{
uint32_t sdp0;
uint16_t sdl1;
uint16_t sdl0;
uint32_t sdp1;
+#if 0
uint16_t foe;
#define RXDSXR_FOE_ENTRY_VALID 0x40
#define RXDSXR_FOE_ENTRY_MASK 0x3f
@@ -134,6 +143,8 @@ struct rt_rxdesc
#define RXDSXR_SRC_L4_CSUM_FAIL 0x10
#define RXDSXR_SRC_AIS 0x08
#define RXDSXR_SRC_PORT_MASK 0x07
+#endif
+ uint32_t word3;
} __packed;
struct rt_softc_rx_data
@@ -263,6 +274,8 @@ struct rt_softc
uint32_t rt_chipid;
/* chip specific registers config */
int rx_ring_count;
+ uint32_t csum_fail_l4;
+ uint32_t csum_fail_ip;
uint32_t int_rx_done_mask;
uint32_t int_tx_done_mask;
uint32_t delay_int_cfg;
OpenPOWER on IntegriCloud