1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-09-23 19:24:44 +03:00
Commit Graph

19 Commits

Author SHA1 Message Date
blogic
e9a777ed10 [ramips] add ethernet support for rt5350
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33548 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-09-25 14:47:08 +00:00
blogic
90960d25b1 [ramips] make ramips ethernet use a register mapping table
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33547 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-09-25 14:46:58 +00:00
juhosg
dddb52eedf ramips: Add missing andmask to ramips_esw register read for recv_good value.
Add missing andmask to ramips_esw register read for recv_good value.

Without the mask, recv_bad leaks into the recv_good packet count.
Didn't notice the bug before since you don't usually get bad
packets, so I only saw it when I was playing with overlength packets
earlier...

Signed-off-by: Tobias Diedrich <ranma+openwrt@tdiedrich.de>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33322 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-09-05 20:08:43 +00:00
juhosg
07073dcb27 ramips: Use doubletagging to disable ramips_esw vlan by default, it seems more reliable.
Use doubletagging to disable ramips_esw vlan by default, it seems
more reliable.

Daniel Golle found an issue where sometimes (possibly only for
RT3352) the default vlan disable method (clearing en_vlan, untag,
doubletag and putting all ports into vlan 0) doesn't work and the
packets get sent out vlan-tagged with vlan 0.

Instead switch to using the doubletagging method (allow doubletagged
packets, put all ports into vlan 0 with untag enabled) by default.

Unless someone figures out a way to really globally disable vlan for
this switch, this seems like the best (most reliable) option.

I did some tests regarding maximum packet size and did not see any

difference between the two methods, both allow for slightly bigger packets
than the ramips_main.c ethernet driver (ping stops going through
above "ping -s 1472" (1514 bytes), on the switch packets are recv_good until
"ping -s 1490", or about 1532 bytes).

Signed-off-by: Tobias Diedrich <ranma+openwrt@tdiedrich.de>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33321 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-09-05 20:08:42 +00:00
juhosg
2a86045d51 ramips: Power down phy on disabled switch ports
Power down phy on disabled switch ports.

Haven't measured this myself yet, but according to this
http://www.8devices.com/community/viewtopic.php?f=6&t=156
it can save about 300mW of power.

[juhosg: fix checkpatch warning]

Signed-off-by: Tobias Diedrich <ranma+openwrt@tdiedrich.de>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33304 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-08-29 10:37:45 +00:00
juhosg
4cf75bc115 ramips: Rename POC registers
Rename POC registers.

The current code uses POC1-POC3.

The datasheet uses:
POC1: Port Control 0
POC1: Port Control 1
POC2: Port Control 2

So the first POC1 is a typo that should have been POC0, rename the
registers to POC0-POC2 accordingly.

Signed-off-by: Tobias Diedrich <ranma+openwrt@tdiedrich.de>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33302 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-08-29 10:37:41 +00:00
juhosg
1bac05a581 ramips: Minor ramips_esw.c cleanup
Stop handling VLAN setup in the kernel.
Removes the obsolete RT305X_ESW_VLAN_CONFIG_BYPASS option I added for
WL-351 and add some extra comments.
Also removes the en_vlan per-port flag that isn't very useful really, it now
is only controlled by the global enable_vlan flag.

Signed-off-by: Tobias Diedrich <ranma+openwrt@tdiedrich.de>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33301 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-08-29 10:37:40 +00:00
juhosg
746f915308 ramips: Add swconfig support to ramips_esw.c
Add swconfig support to ramips_esw.c

This patch adds swconfig support for ramips_esw:

Tested on both D-LINK DIR-300 B1 and Sitecom WL-351 (external
rtl8366rb on internal port 5).
I've made sure that in the enable_vlan=0 case it behaves like a dumb
switch, so external switches should work fine with vlans and
verified this on the WL-351.

The current state shown by swconfig is always read directly from HW
registers, new settings only show after 'swconfig dev rt305x set apply'.

Signed-off-by: Tobias Diedrich <ranma+openwrt@tdiedrich.de>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33299 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-08-29 10:37:36 +00:00
juhosg
d6de6b1e83 ramips: ramips_esw.c indentation cleanup
Minor indentation cleanup.

Prepare for the main swconfig patch by cleaning up indentation a bit.

Signed-off-by: Tobias Diedrich <ranma+openwrt@tdiedrich.de>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33298 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-08-29 10:37:35 +00:00
juhosg
4a1bbe457a ramips: Add byte queue limits support to net/ethernet/ramips_main.c
Add byte queue limits support to net/ethernet/ramips_main.c

"Byte queue limits are a mechanism to limit the size of the transmit
hardware queue on a NIC by number of bytes. The goal of these byte
limits is too reduce latency (HOL blocking) caused by excessive
queuing in hardware (aka buffer bloat) without sacrificing
throughput."

Signed-off-by: Tobias Diedrich <ranma+openwrt@tdiedrich.de>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31844 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-05-23 21:05:23 +00:00
juhosg
c369186781 ramips: don't read RAMIPS_RX_CALC_IDX0 register in the loop
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30733 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-02-26 10:54:13 +00:00
juhosg
bcc8770afa ramips: raeth: add rx_info structure
This helps to reduce code size on RX path:

add/remove: 0/0 grow/shrink: 3/1 up/down: 68/-56 (12)
function                                     old     new   delta
ramips_eth_open                             1104    1144     +40
ramips_ring_free                             212     232     +20
ramips_eth_stop                              400     408      +8
ramips_eth_rx_hw                             648     592     -56

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30732 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-02-26 10:54:12 +00:00
juhosg
c3157bd40e ramips: raeth: add tx_info structure
This helps to reduce code size on TX path:

add/remove: 0/0 grow/shrink: 1/4 up/down: 56/-92 (-36)
function                                     old     new   delta
ramips_eth_open                             1048    1104     +56
ramips_eth_tx_housekeeping                   156     148      -8
ramips_ring_free                             224     212     -12
ramips_eth_stop                              420     400     -20
ramips_eth_hard_start_xmit                   480     428     -52

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30731 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-02-26 10:54:10 +00:00
juhosg
b83545fa99 ramips: raeth: don't process disabled interrupts
Also rename the 'fe_int' variable.

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30713 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-02-25 11:59:19 +00:00
juhosg
edd0b0744e ramips: raeth: show interrupt statistics in debugfs
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30681 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-02-22 13:06:44 +00:00
juhosg
fe2aef1465 ramips: raeth: add debugfs support
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30680 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-02-22 13:06:42 +00:00
juhosg
487e30dc6b ramips: raeth: rename main source file
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30679 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-02-22 13:06:41 +00:00
juhosg
8b52220866 ramips: raeth: add missing Kconfig and Makefile
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30671 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-02-21 09:44:30 +00:00
juhosg
3ac2b4e29a ramips: move the ethernet driver into a separate directory
Also clean up the Kconfig symbols.

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30670 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-02-21 09:26:43 +00:00