aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/files
Commit message (Collapse)AuthorAgeFilesLines
* ralink: drop old ethernet driverJohn Crispin2015-12-1721-6842/+0
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47899 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ralink: remove stray "+" from ethernet driverJohn Crispin2015-12-121-1/+1
| | | | | | | | this is what you get if you manually apply patches with c&p Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47877 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ralink: bump to the target to v4.3John Crispin2015-12-102-8/+11
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47831 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ramips: fix for kernel 4.0 napi repoll need return budgets numberFelix Fietkau2015-10-301-1/+4
| | | | | | Signed-off-by: Michael Lee <igvtee@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47306 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ramips: Enable rx of 1536 bytes ethernet frames on MT7621John Crispin2015-10-051-4/+4
| | | | | | | | | | | The default switch frame size (with FCS + header) is 1536 bytes. But the GMAC only accepted frames up to 1522 bytes. Setting it to 1536 allows to receive ethernet frames using the full of MTU 1500 + an extra VLAN header + VLAN header added by the switch. Signed-off-by: Sven Eckelmann <sven@open-mesh.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47117 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ramips: Fix too small rx bufferJohn Crispin2015-10-051-4/+12
| | | | | | | | | | | | | | | | | | The driver assumes that the maximum received buffer for non-jumbo frames is 1536 bytes. But the allocation of the rx fragment doesn't reflect that. It currently allocates fragments which will only be large enough to be used as rx buffer with the size of 1534 bytes. This is problematic because the GMAC will now try to write to 2 bytes which don't belong to its receive buffer when a large enough ethernet frame is received. This may already be a problem on existing chips but will at least become a problem when the 1536 byte rx modus is enabled on MT7621a. It is required on this SoC to receive ethernet frames which use their full 1500 bytes MTU and a VLAN header next to the switch VLAN tag. Signed-off-by: Sven Eckelmann <sven@open-mesh.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47116 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ramips: Fix setting of rx buffer lengthJohn Crispin2015-10-052-2/+3
| | | | | | | | | | | | | | The length of the DMA rx buffer was always set to 0 because the function for extracting the length was used to calculate the value for setting it. Instead the macro has to be split in a get and set function similar to the TX_DMA_(GET_|)PLEN(0|1) macro. No problem was noticed on MT7621a before this was changed and thus maybe it was hidden by different problem which is not yet fixed. Signed-off-by: Sven Eckelmann <sven@open-mesh.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47115 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ramips: Allow to receive vlan over untag ports on MT7530John Crispin2015-10-051-3/+33
| | | | | | | | | | | | | | | | | | | | The MT7530 switch driver with enable_vlan set will automatically set all ports to the user port mode. The hardware will remove the incoming vlan tag on these ports and use it for its internal vlan. This is usually not wanted and makes it impossible to communicate via vlan over the switch in both directions. It is possible to configure a switch port to "transparent mode" when this port is only used as untag in the switch VLANs. This will disable the VLAN untagging of packets when they were received on this port. The tagging on "tag" ports based on the vlan id is still working. The transparent port mode cannot be used when a port is both used in a VLAN as "tag" and in another one as "untag" port. Signed-off-by: Sven Eckelmann <sven@open-mesh.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47114 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ramips: collect rx related members to fe_rx_ring structFelix Fietkau2015-07-103-58/+69
| | | | | | Signed-off-by: michael lee <igvtee@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46295 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ramips: add xmit_more supportFelix Fietkau2015-07-102-20/+33
| | | | | | | | | | | | | | | use pktgen to verify on rt3662. can improve transmit rate. pkt_size 1500 burst 1 : 807Mb/sec burst 8 : 984Mb/sec pkt_size 60 burst 1 : 57Mb/sec burst 8 : 236Mb/sec Signed-off-by: michael lee <igvtee@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46294 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ralink: add support for mt7621 switch countersJohn Crispin2015-06-181-1/+187
| | | | | | Signed-off-by: Cristian Morales Vega <cristian@samknows.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46050 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ramips: improve tx clean up and add fe_tx_ring structFelix Fietkau2015-06-053-70/+83
| | | | | | | | | | if there is any new tx need to clean up. do it in next napi poll. collect tx related members to fe_tx_ring struct. for better cache usage and more readable. Signed-off-by: michael lee <igvtee@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45895 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ramips: change ethernet napi interrupt sequenceFelix Fietkau2015-06-051-5/+4
| | | | | | | | | | when open device. first ready napi software rx. then enable hardware interrupt. final start software tx queue to send data. Signed-off-by: michael lee <igvtee@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45894 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ramips: fix ethernet vlan tx offload support check when deleteFelix Fietkau2015-06-051-1/+1
| | | | | | Signed-off-by: michael lee <igvtee@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45893 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ramips: make ethernet register map u16 instead of u32Felix Fietkau2015-03-224-6/+6
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44940 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ramips: increase NAPI weight for mt7621 to improve routing performance a bit ↵Felix Fietkau2015-03-211-3/+3
| | | | | | | | more Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44918 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ralink: support change tx/rx ring sizeJohn Crispin2015-03-133-31/+52
| | | | | | Signed-off-by: michael lee <igvtee@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44741 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ralink: use random generate mac address instead of default one.John Crispin2015-03-136-10/+6
| | | | | | Signed-off-by: michael lee <igvtee@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44740 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ralink: fix when tx done is 0 also need to clean interrupt statusJohn Crispin2015-02-111-3/+3
| | | | | | | 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
* ralink: fix hw status almost full not work on mt7620 and mt7621John Crispin2015-02-096-6/+31
| | | | | | | | | | | | | | 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
* ralink: add 3.18 supportJohn Crispin2015-02-093-5/+11
| | | | | | | | 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
* ramips: fix ethernet driver tx completion pollingFelix Fietkau2015-02-011-2/+2
| | | | | | | | | | | - 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
* ralink: check ethernet MAC address whether it is validJohn Crispin2015-01-281-1/+3
| | | | | | | | | 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
* ralink: fix ethernet feature TSO not workFelix Fietkau2015-01-247-155/+197
| | | | | | | | | | | | | | | | * 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
* 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