Commit Graph

39 Commits (6f2f59573ff1ea1d7c17c4552561bbfc375f8dfd)

Author SHA1 Message Date
Felix Fietkau 1645c84c49 ramips: make ethernet register map u16 instead of u32
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44940 3c298f89-4303-0410-b956-a3cf2f4a3e73
2015-03-22 15:11:14 +00:00
Felix Fietkau 7b1f9665a3 ramips: increase NAPI weight for mt7621 to improve routing performance a bit more
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44918 3c298f89-4303-0410-b956-a3cf2f4a3e73
2015-03-21 12:08:07 +00:00
John Crispin 5985d3b8f4 ralink: support change tx/rx ring size
Signed-off-by: michael lee <igvtee@gmail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44741 3c298f89-4303-0410-b956-a3cf2f4a3e73
2015-03-13 08:38:08 +00:00
John Crispin e8d734c637 ralink: use random generate mac address instead of default one.
Signed-off-by: michael lee <igvtee@gmail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44740 3c298f89-4303-0410-b956-a3cf2f4a3e73
2015-03-13 08:38:01 +00:00
John Crispin 6343ae89b9 ralink: fix when tx done is 0 also need to clean interrupt status
Signed-off-by: michael lee <igvtee@gmail.com>
Signed-off-by: John Crispin <blogic@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44401 3c298f89-4303-0410-b956-a3cf2f4a3e73
2015-02-11 13:05:14 +00:00
John Crispin d8e190575f ralink: fix hw status almost full not work on mt7620 and mt7621
the old FE_INT_STATUS register becomes two registers.
FE_INT_STATUS and INT_STATUS. so the hw status almost full
must change to read from FE_INT_STATUS register.
tx/rx done read from INT_STATUS register.

mt7620 datasheet define CNT_GDM1_AF at BIT(29).
but after test it should be BIT(13). why?

Signed-off-by: michael lee <igvtee@gmail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44371 3c298f89-4303-0410-b956-a3cf2f4a3e73
2015-02-09 19:34:49 +00:00
John Crispin d7139c52f2 ralink: add 3.18 support
keep default as 3.14, mt7621 gic need to be ported to 3.18

Signed-off-by: John Crispin <blogic@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44349 3c298f89-4303-0410-b956-a3cf2f4a3e73
2015-02-09 12:13:55 +00:00
Felix Fietkau 9763f432cf ramips: fix ethernet driver tx completion polling
- budget is decremented with completed frames, so don't check if done is
smaller
- ACK the interrupt before processing further frames to fix a small race
condition.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44234 3c298f89-4303-0410-b956-a3cf2f4a3e73
2015-02-01 08:20:37 +00:00
John Crispin 3e6b801eb4 ralink: check ethernet MAC address whether it is valid
The mac address usually write in factory block. but sometime user erase this block , the mac address will change to ff:ff:ff:ff:ff:ff.
This patch is purpose to fix this issue.

Signed-off-by: wengbj <linux.c@foxmail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44166 3c298f89-4303-0410-b956-a3cf2f4a3e73
2015-01-28 12:06:22 +00:00
Felix Fietkau 2921fef744 ralink: fix ethernet feature TSO not work
* fix TSO features verify on mt7621 firewrt board
* improve tx clean up. no need to access uncached
  memory. also use TX_DTX register instead of
  read tx ring DONE bit
* mt7621 need napi weight 64 to get more performance
* remove netif_receive_skb, after kernel version
  3.7 tcp4_gro_receive can handle tcp checksum.
  on rt2880 use iperf tcp LAN to WAN throughput test.
  with gro 135 Mbits/sec. without gro 80.4Mbits/sec.

Signed-off-by: michael lee <igvtee@gmail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44118 3c298f89-4303-0410-b956-a3cf2f4a3e73
2015-01-24 22:45:28 +00:00
Felix Fietkau 1ff6e9aef8 ralink: init tx/rx vlan offload register for mt7621
on mt7621 don't have tx vlan vid registers.
so set FE_REG_FE_DMA_VID_BASE to 0.
set rx vlan offload register to disable.

Signed-off-by: michael lee <igvtee@gmail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44117 3c298f89-4303-0410-b956-a3cf2f4a3e73
2015-01-24 22:45:23 +00:00
Felix Fietkau 2bc783064d ralink: use fe_max_buf_size to get rx buffer size
the rx_buf_size now is 1534 when mtu is 1500.
the ethernet frame with vlan tag and FCS is 1522.
so the buffer is enough.

Signed-off-by: michael lee <igvtee@gmail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44116 3c298f89-4303-0410-b956-a3cf2f4a3e73
2015-01-24 22:45:16 +00:00
Felix Fietkau ff3864e8a4 ramips: fix ethernet vlan tx offload support check
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44115 3c298f89-4303-0410-b956-a3cf2f4a3e73
2015-01-24 22:45:10 +00:00
Felix Fietkau 311b20a71c ralink: fix ethernet rx buffer size breakage
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44047 3c298f89-4303-0410-b956-a3cf2f4a3e73
2015-01-18 20:17:41 +00:00
Felix Fietkau 7e7a5831f7 ralink: improve check rx sg function. use check frags instead of function call
Signed-off-by: michael lee <igvtee@gmail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44046 3c298f89-4303-0410-b956-a3cf2f4a3e73
2015-01-18 20:17:28 +00:00
Felix Fietkau 2a76888e3f ralink: correct handle hardware rx 2bytes offset
Signed-off-by: michael lee <igvtee@gmail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44045 3c298f89-4303-0410-b956-a3cf2f4a3e73
2015-01-18 20:17:18 +00:00
Felix Fietkau 8b61d50feb ralink: use fe_reset to control all reset
Signed-off-by: michael lee <igvtee@gmail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44044 3c298f89-4303-0410-b956-a3cf2f4a3e73
2015-01-18 20:17:07 +00:00
Felix Fietkau 71a43766c2 ralink: improve tx_timeout function
* use default timeout value
* print more debug ring info
* move timeout reset function to workqueue

Signed-off-by: michael lee <igvtee@gmail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44043 3c298f89-4303-0410-b956-a3cf2f4a3e73
2015-01-18 20:16:50 +00:00
Felix Fietkau 31fa24e3e3 ralink: reduce access to uncached tx/rx dma ring buffer
Signed-off-by: michael lee <igvtee@gmail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44041 3c298f89-4303-0410-b956-a3cf2f4a3e73
2015-01-18 20:16:35 +00:00
Felix Fietkau 8ce6953097 ramips: fix tx bql related race condition in the ethernet driver
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43995 3c298f89-4303-0410-b956-a3cf2f4a3e73
2015-01-17 13:13:55 +00:00
Felix Fietkau 980e0502ce ramips: use a larger number of rx descriptors on mt7621 to work around rx overrun related packet loss
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43953 3c298f89-4303-0410-b956-a3cf2f4a3e73
2015-01-13 00:34:45 +00:00
Felix Fietkau bc68bea2e7 ramips: remove interrupt coalescing, it is unnecessary with napi polling and could reduce throughput
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43952 3c298f89-4303-0410-b956-a3cf2f4a3e73
2015-01-13 00:34:38 +00:00
Felix Fietkau 1e66f2e231 ramips: disable ethernet checksum offloads for mt7621, they are broken
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43811 3c298f89-4303-0410-b956-a3cf2f4a3e73
2015-01-02 21:53:24 +00:00
Felix Fietkau 79b56eb3e4 ramips: use netif_receive_skb instead of napi_gro_receive when rx csum offload is unavailable
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43810 3c298f89-4303-0410-b956-a3cf2f4a3e73
2015-01-02 21:53:18 +00:00
John Crispin 5cd69085ed ralink: fix tx vlan offload and hardware status
hardware status and tx vlan offload support on all targets
except rt5350. so i modify the IS_ENABLE condition only for
mt7621.
support mt7621 hardware status reference by SDK. but i don't
have mt7621. if not work just set mt7621 FE_REG_FE_COUNTER_BASE
to 0 to let software count.

Signed-off-by: michael lee <igvtee@gmail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43303 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-11-19 09:19:57 +00:00
John Crispin 0f47bf20de ralink: support netconsole
Signed-off-by: michael lee <igvtee@gmail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43302 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-11-19 09:19:49 +00:00
John Crispin 2825bdda9f ralink: improve tx vlan offload
hardware tx vlan offload only support max 16 vids
now use add/delete vlan interface to update vlan id table
when duplicate vlan id index detect.
disable hardware tx vlan offload support.

Signed-off-by: michael lee <igvtee@gmail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43301 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-11-19 09:19:43 +00:00
John Crispin 170c9f6bb6 ralink: update ethernet driver to use new ralink_soc variable
Signed-off-by: John Crispin <blogic@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43247 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-11-14 16:52:52 +00:00
John Crispin 2983053813 ralink: fix the 10mbit bug on mt7621
a missing "val =" caused the AN bit in the phy0 reg to be flushed.

Signed-off-by: John Crispin <blogic@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43246 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-11-14 16:52:47 +00:00
John Crispin 7741062f9b ralink: improve mt7530 support
the SDK does a bit of extra init that we did not do yet when using an external mt7530.

Signed-off-by: John Crispin <blogic@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43245 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-11-14 16:52:42 +00:00
John Crispin 48fdd908ac ralink: mt7621 has a different base addr for PVID
Signed-off-by: John Crispin <blogic@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43243 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-11-14 16:52:30 +00:00
John Crispin addf7b958d ralink: add support for mt7621 ethernet
somehow all switch ports still come up as 10mbit.

Signed-off-by: John Crispin <blogic@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43237 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-11-12 14:54:50 +00:00
John Crispin bec227fc64 ralink: fix mdio polling of external phys if only 1 phy exists
Signed-off-by: John Crispin <blogic@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43235 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-11-11 11:46:09 +00:00
John Crispin c59e6ee48d ralink: mt7628 does not actually need this fix for the ethernet driver
Signed-off-by: John Crispin <blogic@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43206 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-11-07 10:51:00 +00:00
John Crispin 7a875b6831 ralink: improve r43200
r43200 tries to detect if the fixup is needed or not. control the behaviour via
OF instead and disable unused ports.

Signed-off-by: John Crispin <blogic@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43201 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-11-06 12:19:53 +00:00
John Crispin 7996c754bd ralink: only apply ephy1 fixup if the phy is present
this broke e1700 lan2 as the fixup was applied to the phy inside the mt7530.

Signed-off-by: John Crispin <blogic@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43200 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-11-06 11:11:44 +00:00
John Crispin e6a6d7d6d1 ralink: add mt7628 support to the ethernet driver
Signed-off-by: John Crispin <blogic@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43196 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-11-06 09:31:19 +00:00
John Crispin 0f6eebbe44 ralink: cleanup ethernet Makefile/Kconfig
Signed-off-by: John Crispin <blogic@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43195 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-11-06 09:31:09 +00:00
John Crispin c4a31fe958 ralink: move ethernet driver to files/
Signed-off-by: John Crispin <blogic@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43194 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-11-06 09:31:03 +00:00