Commit Graph

395 Commits (5a8e9846af689be7bc3b1fb4a356c3e3c711b94a)

Author SHA1 Message Date
Rosen Penev e555153807 ag71xx: Switch from driver to kernel macro for NAPI_WEIGHT.
NAPI_POLL_WEIGHT was introduced in the kernel for exactly this purpose 5 years ago.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
7 years ago
Felix Fietkau 7c09fa4a74 ar71xx: fix mikrotik routerboard nand driver issues with linux 4.9
The mtd device is now embedded inside the nand chip data structure

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 3db529d5cc Revert "ar71xx: Add GRO support to ag71xx"
This reverts commit 13e5e47369.
This commit causes a severe regression in LAN->WAN routing performance
for several devices. This appears to be caused by the extra requirement
to validate the SKB checksum early in the rx path, which the ethernet
hardware does not do

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Hauke Mehrtens 27f23bac8f ar71xx: fix section mismatches
Fix some section mismatches found with kernel 4.9.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Hauke Mehrtens 7bbf4117c6 ar71xx: Add kernel 4.9 support
This add support for kernel 4.9 to the ar71xx target.
It was compile tested with the generic, NAND and mikrotik subtarget.
Multiple members of the community tested it on their boards and did not
report any major problem so far.

Especially the NAND part received some changes to adapt to the new
kernel APIs. The serial driver hack used for the Arduino Yun was not
ported because the kernel changed there a lot.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Rosen Penev 13e5e47369 ar71xx: Add GRO support to ag71xx
On a TL-WN710N, this patch increases iperf performance from ~92.5 to ~93.5 mbps. Keep in mind the WN710N is a 100mbps device. I expect greater numbers from gigabit devices.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
7 years ago
Milan Krstić 4c1ce83548 ag71xx: add support for port mirroring
This exposes hardware port mirroring in ag71xx driver (e.g. TL-WR841ND) via
swconfig API.

Signed-off-by: Milan Krstić <milan.krstic@gmail.com>
7 years ago
Alexander Couzens 1025941662 ar71xx/ag71xx_ethtool: don't return uninitialized return value on success
ag71xx_ethtool_set_ringparam() will return an uninitialized value on
success.

Found-by: Coverity Scan #1330877
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
7 years ago
Alexander Couzens 64cd4b48e8 ar71xx/ag71xx_mdio_probe: fix a memory leak when probe fails
Found-by: Coverity Scan #1330233
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
7 years ago
Alexander Couzens d18cb142d5 ar71xx/ag71xx_ar7240_get_port_link: fix off-by-one check on argument `port`
Found-by: Coverity Scan #1329901
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
7 years ago
John Crispin bad2f9c4dc Revert "ar71xx: Add support for Teltonika RUT900"
This reverts commit 224e5f5efa.

pepe2k pointed out that this was not ready to merge

Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
Steffen Weinreich 224e5f5efa ar71xx: Add support for Teltonika RUT900
Teltonika RUT900 is a Router with LTE dual SIM, WiFi, 4x Ethernet
ports, I/O, RS232, RS485, GPS.

The device ist based on a Atheros AR9344 rev 3,

Specifications:
- 560/450/225 MHz (CPU/DDR/AHB)
- 128 MB of RAM
- 16 MB of FLASH
- Serial Console header on a Card Board edge connector
- 4x 10/100 Mbps Ethernet (3x LAN, 1x WAN)
- 2.4 GHz Wifi
- 2x external, detachable Wifi antennas
- LTE Modem Huawei ME909u-521 (Also other Modem seen)
- 2x LTE antennas
- 1x GPS antenna
- 7x LED, 1x button
- 1x USB Connector
- 1x Serial RS232
- 1x Serial RS485
- 1x MicroSD Card

The GPL sources of the device are available at www.teltonika.lt/gpl/
and are based on OpenWRT Barrier Breaker (14.07)

Running from tftp:

The Router starts into the uboot Webupdater if the Button ist pressed
more than 3 seconds, if no Network cable is attached it starts the
uboot serial console, from there the router loads the firmware image
via tftpboot from 192.168.1.2:firmware.bin (the router has the
192.168.1.1). With bootm the loaded image will be booted.

Signed-off-by: Steffen Weinreich <steve@weinreich.org>
7 years ago
Felix Fietkau 9db9072d67 ar71xx: convert mikrotik routerboard support to UBI
Remove the wget2nand script, drop the need for manual installation,
use sysupgrade instead.

There are now two different NAND images, one for 64 MiB flashes, the
other for >= 128 MiB

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau e21cb649a2 ar71xx: disable sub-page writes on routerboard nand drivers
They seem to fail in tests using UBI, and are not used by yaffs2

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 889272d92d ar71xx: fix RB4xx CPLD SPI device mode setup
Commit af79fdbe4a changed the code to use tx_nbits for dual SPI tx
transfers, however the SPI stack only allows this when the device mode
includes the relevant bit as well

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau c3a8b87773 ar71xx: fix RB4xx SPI driver mode bits
Accept SPI_TX_DUAL in device mode to fix the CPLD driver

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau af79fdbe4a ar71xx: remove a non-upstream spi core patch
- use standard flags instead
- remove dead code from the rb4xx spi drivers

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 441ee62931 ar71xx: remove AP83 reference design board support
This board is very old and unlikely to still be relevant today. Support
for it contains a significant amount of device specific baggage which is
worth getting rid of.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Paul Wassi 6e65576f2d ar71xx: fix drivers/mtd/nand/ar934x_nfc.c
Fix the incorrect usage of ar934x_nfc_write_page and ar934x_nfc_write_page_raw.
Add *page* in the argument list and remove the local variable.

Signed-off-by: Paul Wassi <p.wassi@gmx.at>
8 years ago
Felix Fietkau 02a9a74d17 ar71xx: fix ethernet driver fast reset issue causing tx timeouts
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Stephen Walker 900da27c91 ar71xx: add software transmit timestamp support
Add software transmit timestamp and ethtool (-T) timestamp support

Signed-off-by: Stephen Walker <stephendwalker+github@gmail.com>
8 years ago
Sergey Sergeev c312cef223 ar71xx: spi-rb4xx fix.
In new kernels we should use clk_prepare_enable instead of clk_enable
since clk_enable does not make proper initialization that leads
to rise WARN_ON messages and not working spi bus on the device.

Signed-off-by: Sergey Sergeev <adron@yapic.net>
8 years ago
Felix Fietkau f9e7ffe73b ar71xx: prevent spurious ethernet resets from dma hang check false positives
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 75b2105cd3 ar71xx: rename ethernet pdata->builtin_switch to use_flow_control
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 3bf3512673 Revert "ar71xx: prevent spurious ethernet resets from dma hang check false positives"
This reverts commit 3d58d7f053.
8 years ago
Felix Fietkau 3d58d7f053 ar71xx: prevent spurious ethernet resets from dma hang check false positives
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 26b8db2537 ar71xx: enable flow control for ethernet MACs with built-in switch
Should fix LAN speed issues on some devices. This is an updated version
of the previously reverted commit with the same name.
It improves the check for MACs connected to a built-in switch

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 7c02ecdd35 Revert "ar71xx: enable flow control for ethernet MACs with built-in switch"
This reverts commit 1beb5bec64.

It was found to cause the WAN port to fail on some AR934x devices

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 1beb5bec64 ar71xx: enable flow control for ethernet MACs with built-in switch
Should fix LAN speed issues on some devices

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 7eeb254cc4 treewide: replace nbd@openwrt.org with nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 29bbc6e6be ar71xx: reset ethernet tx ring on fast reset to prevent packet loss / irq issues
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48753
8 years ago
Felix Fietkau 376e3ade79 ag71xx: fix build error with debugfs code
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48695
8 years ago
Felix Fietkau 37dd95b772 ag71xx: increase rx ring size to improve performance
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48694
8 years ago
Felix Fietkau 11ca71cfdb ag71xx: store ring size order instead of ring size to avoid div/mod
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48693
8 years ago
Felix Fietkau 033fbb7778 ag71xx: increase tx ring size to improve performance
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48692
8 years ago
Felix Fietkau b7a2c533da ag71xx: optimize icache footprint of the receive poll function
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48691
8 years ago
Felix Fietkau 2067f7f1de ar71xx: use page fragment API in the ethernet driver
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48578
8 years ago
Felix Fietkau e5b5cce442 ar71xx: fix a few include errors
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48562
8 years ago
Felix Fietkau 5c5c60fec4 ar71xx: fix ethernet MAC reset on DMA hang
Fully reset the chip like on a full up/down, but without the PHY
statemachine restart.

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

SVN-Revision: 48228
8 years ago
Felix Fietkau cf2cf43717 ar71xx: extend ethernet DMA stuck check to all ar724x (and newer) chips
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48227
8 years ago
Felix Fietkau 6505dc3367 ar71xx: clean up ethernet tx queue after reset, wake queues when done - fixes hangs reported in #18922
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 47892
9 years ago
John Crispin 1dada3fc3c ar71xx: add LED driver NU801
The MR18 uses a 3-channel 16-bit PWM Constant Current Driver
for its status LED.

Signed-off-by: Chris R Blake <chrisrblake93@gmail.com>

SVN-Revision: 47848
9 years ago
John Crispin a2b38ebf77 ar71xx: add 64kb bootloader mtd parser for tplinkpart
Signed-off-by: Weijie Gao <hackpascal@gmail.com>

This patch adds flash layout parser for TP-Link firmwares which have a 64kb
bootloader.

This is used for TP-Link TL-WDR6500 v2.

SVN-Revision: 46662
9 years ago
Felix Fietkau 38dbf49b61 ar71xx: remove the use of the obsolete IRQF_DISABLED flag in the NAND flash driver (fixes #20125)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 46433
9 years ago
John Crispin 3b14473968 ar71xx: ag71xx remove IRQF_DISABLED
no-op since 2.6.35
removed in Kernel 4.1
see https://lwn.net/Articles/380931/

Signed-off-by: Dirk Neukirchen <dirkneukirchen@web.de>

SVN-Revision: 46280
9 years ago
Felix Fietkau a5cd02aec4 ar71xx: ar934x-nfc: allow ECC to be configured in software BCH mode
Some devices ship with NAND images that use BCH ECC. Let the driver know
about that ECC mode so that it can be selected by machine files.

Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>

SVN-Revision: 46022
9 years ago
Felix Fietkau a1b8ee0307 ar71xx: return limit as number of processed frames when re-scheduling NAPI poll
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45971
9 years ago
John Crispin 69955cf733 ar71xx: generalize cybertan partition parser
By removing the NL16 signature check, the parser can be
utilized by other devices like the WD My Net Wi-fi Range
Extender.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>

SVN-Revision: 44664
9 years ago
John Crispin e5373f2761 ar71xx: rename wrt160nl's trx partition parser
This patch renames the partition parser from
wrt160nl to more generic cybertan.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>

SVN-Revision: 44663
9 years ago
John Crispin daf2140192 ar71xx: fix gpio-latch driver
gpio api has changed. the remove call no longer returns a value.

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

SVN-Revision: 44650
9 years ago