aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/files/drivers/net/ethernet
Commit message (Collapse)AuthorAgeFilesLines
* ralink: init tx/rx vlan offload register for mt7621Felix Fietkau2015-01-242-5/+23
| | | | | | | | | | 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
* ralink: use fe_max_buf_size to get rx buffer sizeFelix Fietkau2015-01-241-7/+5
| | | | | | | | | | 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
* ramips: fix ethernet vlan tx offload support checkFelix Fietkau2015-01-241-1/+1
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44115 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ralink: fix ethernet rx buffer size breakageFelix Fietkau2015-01-181-2/+2
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44047 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ralink: improve check rx sg function. use check frags instead of function callFelix Fietkau2015-01-183-14/+8
| | | | | | Signed-off-by: michael lee <igvtee@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44046 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ralink: correct handle hardware rx 2bytes offsetFelix Fietkau2015-01-183-13/+25
| | | | | | Signed-off-by: michael lee <igvtee@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44045 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ralink: use fe_reset to control all resetFelix Fietkau2015-01-188-41/+28
| | | | | | Signed-off-by: michael lee <igvtee@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44044 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ralink: improve tx_timeout functionFelix Fietkau2015-01-184-15/+87
| | | | | | | | | | * 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
* ralink: reduce access to uncached tx/rx dma ring bufferFelix Fietkau2015-01-184-53/+81
| | | | | | Signed-off-by: michael lee <igvtee@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44041 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ramips: fix tx bql related race condition in the ethernet driverFelix Fietkau2015-01-171-4/+5
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43995 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ramips: use a larger number of rx descriptors on mt7621 to work around rx ↵Felix Fietkau2015-01-131-0/+4
| | | | | | | | 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
* ramips: remove interrupt coalescing, it is unnecessary with napi polling and ↵Felix Fietkau2015-01-137-78/+40
| | | | | | | | 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
* ramips: disable ethernet checksum offloads for mt7621, they are brokenFelix Fietkau2015-01-021-1/+10
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43811 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ramips: use netif_receive_skb instead of napi_gro_receive when rx csum ↵Felix Fietkau2015-01-021-1/+4
| | | | | | | | 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
* ralink: fix tx vlan offload and hardware statusJohn Crispin2014-11-192-27/+40
| | | | | | | | | | | | | 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
* ralink: support netconsoleJohn Crispin2014-11-191-0/+15
| | | | | | Signed-off-by: michael lee <igvtee@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43302 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ralink: improve tx vlan offloadJohn Crispin2014-11-192-0/+55
| | | | | | | | | | | 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
* ralink: update ethernet driver to use new ralink_soc variableJohn Crispin2014-11-142-42/+7
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43247 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ralink: fix the 10mbit bug on mt7621John Crispin2014-11-141-1/+1
| | | | | | | | 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
* ralink: improve mt7530 supportJohn Crispin2014-11-141-2/+16
| | | | | | | | 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
* ralink: mt7621 has a different base addr for PVIDJohn Crispin2014-11-141-1/+19
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43243 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ralink: add support for mt7621 ethernetJohn Crispin2014-11-128-36/+334
| | | | | | | | 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
* ralink: fix mdio polling of external phys if only 1 phy existsJohn Crispin2014-11-111-0/+3
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43235 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ralink: mt7628 does not actually need this fix for the ethernet driverJohn Crispin2014-11-071-3/+0
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43206 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ralink: improve r43200John Crispin2014-11-061-5/+8
| | | | | | | | | 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
* ralink: only apply ephy1 fixup if the phy is presentJohn Crispin2014-11-061-35/+40
| | | | | | | | 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
* ralink: add mt7628 support to the ethernet driverJohn Crispin2014-11-062-1/+85
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43196 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ralink: cleanup ethernet Makefile/KconfigJohn Crispin2014-11-062-9/+34
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43195 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ralink: move ethernet driver to files/John Crispin2014-11-0620-0/+5873
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43194 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [ramips] move files to files-3.7John Crispin2013-04-036-2856/+0
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36161 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [ramips] fix for non-blinking LAN LEDsJohn Crispin2013-01-281-0/+4
| | | | | | https://dev.openwrt.org/ticket/12830 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35359 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ramips: ramips_eth: use Kconfig definition to enable debugGabor Juhos2012-11-251-1/+1
| | | | | | | | | | The Kconfig identifier to enable debugging in the driver was different from the actually used one. Fix that. Signed-off-by: Paul Fertser <fercerpav@gmail.com> Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34332 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [ramips] move ethernet hw init to init/uninit functionsJohn Crispin2012-11-121-17/+29
| | | | | | | | | This should fix the stalled irq problem seen by several people. This is not the real fix, but rather moves the bug to the un/init patch of the driver. The real bug still needs to be fixed, but this workaround should be suffcient to make the ethernet stable. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34177 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [ramips] add ethernet support for rt5350John Crispin2012-09-252-18/+106
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33548 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [ramips] make ramips ethernet use a register mapping tableJohn Crispin2012-09-251-29/+79
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33547 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ramips: Add missing andmask to ramips_esw register read for recv_good value.Gabor Juhos2012-09-051-1/+3
| | | | | | | | | | | | | 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
* ramips: Use doubletagging to disable ramips_esw vlan by default, it seems ↵Gabor Juhos2012-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* ramips: Power down phy on disabled switch portsGabor Juhos2012-08-291-5/+67
| | | | | | | | | | | | | | 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
* ramips: Rename POC registersGabor Juhos2012-08-291-31/+31
| | | | | | | | | | | | | | | | | | 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
* ramips: Minor ramips_esw.c cleanupGabor Juhos2012-08-291-59/+3
| | | | | | | | | | | | 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
* ramips: Add swconfig support to ramips_esw.cGabor Juhos2012-08-292-35/+755
| | | | | | | | | | | | | | | | | | | 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
* ramips: ramips_esw.c indentation cleanupGabor Juhos2012-08-291-11/+11
| | | | | | | | | | 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
* ramips: Add byte queue limits support to net/ethernet/ramips_main.cGabor Juhos2012-05-231-0/+8
| | | | | | | | | | | | | | 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
* ramips: don't read RAMIPS_RX_CALC_IDX0 register in the loopGabor Juhos2012-02-261-1/+3
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30733 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ramips: raeth: add rx_info structureGabor Juhos2012-02-262-24/+57
| | | | | | | | | | | | | 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
* ramips: raeth: add tx_info structureGabor Juhos2012-02-262-19/+55
| | | | | | | | | | | | | | 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
* ramips: raeth: don't process disabled interruptsGabor Juhos2012-02-251-5/+11
| | | | | | Also rename the 'fe_int' variable. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30713 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ramips: raeth: show interrupt statistics in debugfsGabor Juhos2012-02-223-0/+105
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30681 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ramips: raeth: add debugfs supportGabor Juhos2012-02-225-1/+91
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30680 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ramips: raeth: rename main source fileGabor Juhos2012-02-222-0/+2
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30679 3c298f89-4303-0410-b956-a3cf2f4a3e73