aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files/drivers/net
Commit message (Collapse)AuthorAgeFilesLines
* ar71xx: add v4.14 supportJohn Crispin2018-08-222-0/+26
| | | | | | adds v4.14 patches for testing but leaves v4.9 as default for now. Signed-off-by: John Crispin <john@phrozen.org>
* ar71xx: fix QCA955X SGMII link lossDavid Bauer2018-08-082-0/+81
| | | | | | | | | | | | | | | | | | | The QCA955X is affected by a hardware bug which causes link-loss of the SGMII link between SoC and PHY. This happens on change of link-state or speed. It is not really known what causes this bug. It definitely occurs when using a AR8033 Gigabit Ethernet PHY. Qualcomm solves this Bug in a similar fashion. We need to apply the fix on a per-device base via platform-data as performing the fixup work will break connectivity in case the SGMII interface is connected to a Switch. This bug was first proposed to be fixed by Sven Eckelmann in 2016. https://patchwork.ozlabs.org/patch/604782/ Based-on-patch-by: Sven Eckelmann <sven.eckelmann@open-mesh.com> Signed-off-by: David Bauer <mail@david-bauer.net>
* Revert "ar71xx: ag71xx: Prevent kernel oops for board def"Jo-Philipp Wich2018-08-011-15/+1
| | | | | | | | | | | This reverts commit 7a3e133751870a3431e2430386a77a002eb24117. This change reportedly breaks connectivity on some ar71xx devices, so revert it for now. Ref: https://github.com/openwrt/openwrt/pull/1217#issuecomment-409708087 Reported-by: Hannu Nyman <hannu.nyman@iki.fi> Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* Revert "ar71xx: ag71xx: Add connect message: fixed phy"Jo-Philipp Wich2018-08-011-7/+0
| | | | | | | | | | | This reverts commit 0b9f4e880807e3cfd22d12b929202e1edcdc577c. This change reportedly breaks connectivity on some ar71xx devices, so revert it for now. Ref: https://github.com/openwrt/openwrt/pull/1217#issuecomment-409708087 Reported-by: Hannu Nyman <hannu.nyman@iki.fi> Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* Revert "ar71xx: ag71xx_phy: Fix compilation for debug messages"Jo-Philipp Wich2018-08-011-4/+2
| | | | | | | | This reverts commit 2655fbe8efb2a596aa8db92cffa817e3bf0c64ea. The patch introduces syntax errors, revert it for now. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* ar71xx: ag71xx: Prevent kernel oops for board defDaniel F. Dickinson2018-07-301-1/+15
| | | | | | | | | | | The driver is written in such a way that with a board defintion that connects a fixed phy, mdio, and switch in a certain way, a kernel oops could result because of lack of previously probed mdio bus. This commit allows for easier debugging in this case by casting the correct blame with serial console messages. Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
* ar71xx: ag71xx: Add connect message: fixed phyDaniel F. Dickinson2018-07-301-0/+7
| | | | | | | | It's a little noisier but makes it obvious when the ar7240 switch was connected to the MDIO bus, and to which phy device (or the failure to do so). Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
* ar71xx: ag71xx_phy: Fix compilation for debug messagesDaniel F. Dickinson2018-07-301-2/+4
| | | | | | | | | | | NB: Error only appears with ag71xx debug messages and dynamic printk enabled. This is probably why no one has caught it before. Previously phy probe debug messages used old (now wrong) functions to get the phy name for printing. There was also the chance of a NULL pointer in the event no phy_device was found. Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
* ar71xx: fix mii bus irq assignmentFelix Fietkau2018-03-042-3/+3
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ar71xx: remove pdata->fifo_cfg*Felix Fietkau2018-03-041-3/+3
| | | | | | The values are the same for all chipsets that use it Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ar71xx: fix build with ag71xx debugfs support enabledFelix Fietkau2018-02-281-6/+4
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ag71xx: Move timestamp struct member outside of struct.Rosen Penev2018-02-282-4/+3
| | | | | | | | | | | | | | | With this change, the timestamp variable is only used in ag71xx_check_dma_stuck. Small tx speedup. Based on a Qualcomm commit. ag->timestamp = jiffies was not replaced with netif_trans_update(dev) because of this quote: It should be noted that after this series several instances of netif_trans_update() are useless (if they occur in .ndo_start_xmit and driver doesn't set LLTX flag -- stack already did an update). From: http://lists.openwall.net/netdev/2016/05/03/87 Signed-off-by: Rosen Penev <rosenp@gmail.com>
* ar71xx: use global timestamp for hang checkFelix Fietkau2018-02-052-6/+7
| | | | | | | Shrink the size of struct ag71xx_buf to 8 bytes, which improves cache footprint Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ar71xx: only access device stats in tx handler if packets were processedFelix Fietkau2018-02-051-3/+3
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ar71xx: allocate rx/tx descriptor/buffers in one chunkFelix Fietkau2018-02-051-47/+38
| | | | | | Reduces false sharing due to cache aliases Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ag71xx: Reorder ag71xx struct members for better cache performanceRosen Penev2018-02-051-10/+17
| | | | | | | | | | | | | | | Qualcomm claims this improves the D-cache footprint. Origina commit message below: From: Ben Menchaca <ben.menchaca@qca.qualcomm.com> Date: Fri, 7 Jun 2013 10:57:28 -0500 Subject: [ag71xx] cluster/align structs for cache perf Cluster the frequently used, per-packet structures in ag71xx near to each other, and cacheline-align them. Some other re-ordering occurred to move "warmer" structures near the per-packet structures. Signed-off-by: Ben Menchaca <ben.menchaca@qca.qualcomm.com> Signed-off-by: Rosen Penev <rosenp@gmail.com>
* ar71xx: remove obsolete '< KERNEL_VERSION(4, 2, 0)' checkGabor Juhos2018-01-091-7/+0
| | | | | | | | | Because the oldest supported kernel version on the ar71xx target is 4.4, the condition that the kernel version is smaller than 4.2.0 is always false. Remove the obsolete check from ag71xx_main.c to clean up the code a bit. Signed-off-by: Gabor Juhos <juhosg@freemail.hu>
* ag71xx: Fix rx ring buffer stall on small packets flood on qca956x and qca953x.Vittorio Gambaletta2017-12-291-0/+16
| | | | | | Backported from Code Aurora QSDK Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>
* ag71xx: Reduce NAPI weight to 32.Rosen Penev2017-12-081-1/+6
| | | | | | | | | | | | | | Qualcomm claims this reduces cache misses. Original commit message below: From: Ben Menchaca <ben.menchaca@qca.qualcomm.com> Date: Tue, 11 Jun 2013 12:18:46 -0500 Subject: [ag71xx] reduce NAPI weight In an attempt to increase our cache warmth, we are decreasing NAPI. This increases the warmth of the reused SKBs. Signed-off-by: Ben Menchaca <ben.menchaca@qca.qualcomm.com> Signed-off-by: Rosen Penev <rosenp@gmail.com>
* Revert "ag71xx: Switch from driver to kernel macro for NAPI_WEIGHT."Rosen Penev2017-12-083-6/+7
| | | | | | The motivation for this was misguided. It turns out tuning the NAPI weight could be useful for testing purposes. Therefore reverting. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* ag71xx: Switch from driver to kernel macro for NAPI_WEIGHT.Rosen Penev2017-11-063-7/+6
| | | | | | NAPI_POLL_WEIGHT was introduced in the kernel for exactly this purpose 5 years ago. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* Revert "ar71xx: Add GRO support to ag71xx"Felix Fietkau2017-10-171-3/+3
| | | | | | | | | | This reverts commit 13e5e473699b92f171205e0f5c57c9ebe7922492. 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>
* ar71xx: Add kernel 4.9 supportHauke Mehrtens2017-10-113-64/+72
| | | | | | | | | | | | | 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>
* ar71xx: Add GRO support to ag71xxRosen Penev2017-09-111-3/+3
| | | | | | 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>
* ag71xx: add support for port mirroringMilan Krstić2017-07-211-0/+153
| | | | | | | This exposes hardware port mirroring in ag71xx driver (e.g. TL-WR841ND) via swconfig API. Signed-off-by: Milan Krstić <milan.krstic@gmail.com>
* ar71xx/ag71xx_ethtool: don't return uninitialized return value on successAlexander Couzens2017-06-111-1/+1
| | | | | | | | ag71xx_ethtool_set_ringparam() will return an uninitialized value on success. Found-by: Coverity Scan #1330877 Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
* ar71xx/ag71xx_mdio_probe: fix a memory leak when probe failsAlexander Couzens2017-06-111-1/+1
| | | | | Found-by: Coverity Scan #1330233 Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
* ar71xx/ag71xx_ar7240_get_port_link: fix off-by-one check on argument `port`Alexander Couzens2017-06-111-2/+2
| | | | | Found-by: Coverity Scan #1329901 Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
* ar71xx: fix ethernet driver fast reset issue causing tx timeoutsFelix Fietkau2016-09-031-1/+2
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ar71xx: add software transmit timestamp supportStephen Walker2016-07-152-0/+3
| | | | | | Add software transmit timestamp and ethtool (-T) timestamp support Signed-off-by: Stephen Walker <stephendwalker+github@gmail.com>
* ar71xx: prevent spurious ethernet resets from dma hang check false positivesFelix Fietkau2016-07-022-6/+12
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ar71xx: rename ethernet pdata->builtin_switch to use_flow_controlFelix Fietkau2016-06-271-1/+1
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* Revert "ar71xx: prevent spurious ethernet resets from dma hang check false ↵Felix Fietkau2016-06-262-6/+5
| | | | | | positives" This reverts commit 3d58d7f053eae83b59baf5c8b8a58da78653f605.
* ar71xx: prevent spurious ethernet resets from dma hang check false positivesFelix Fietkau2016-06-262-5/+6
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ar71xx: enable flow control for ethernet MACs with built-in switchFelix Fietkau2016-06-261-1/+4
| | | | | | | | 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>
* Revert "ar71xx: enable flow control for ethernet MACs with built-in switch"Felix Fietkau2016-06-141-9/+1
| | | | | | | | This reverts commit 1beb5bec6453abb220c5be4ddb9e6dc02d08d735. It was found to cause the WAN port to fail on some AR934x devices Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ar71xx: enable flow control for ethernet MACs with built-in switchFelix Fietkau2016-06-131-1/+9
| | | | | | Should fix LAN speed issues on some devices Signed-off-by: Felix Fietkau <nbd@nbd.name>
* treewide: replace nbd@openwrt.org with nbd@nbd.nameFelix Fietkau2016-06-071-1/+1
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ar71xx: reset ethernet tx ring on fast reset to prevent packet loss / irq issuesFelix Fietkau2016-02-221-3/+11
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48753
* ag71xx: fix build error with debugfs codeFelix Fietkau2016-02-111-5/+7
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48695
* ag71xx: increase rx ring size to improve performanceFelix Fietkau2016-02-111-2/+2
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48694
* ag71xx: store ring size order instead of ring size to avoid div/modFelix Fietkau2016-02-113-41/+58
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48693
* ag71xx: increase tx ring size to improve performanceFelix Fietkau2016-02-111-2/+2
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48692
* ag71xx: optimize icache footprint of the receive poll functionFelix Fietkau2016-02-111-3/+10
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48691
* ar71xx: use page fragment API in the ethernet driverFelix Fietkau2016-01-311-10/+24
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48578
* ar71xx: fix ethernet MAC reset on DMA hangFelix Fietkau2016-01-131-38/+55
| | | | | | | | | 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
* ar71xx: extend ethernet DMA stuck check to all ar724x (and newer) chipsFelix Fietkau2016-01-131-1/+1
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48227
* ar71xx: clean up ethernet tx queue after reset, wake queues when done - ↵Felix Fietkau2015-12-141-3/+8
| | | | | | | | fixes hangs reported in #18922 Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 47892
* ar71xx: ag71xx remove IRQF_DISABLEDJohn Crispin2015-07-091-1/+1
| | | | | | | | | | 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
* ar71xx: return limit as number of processed frames when re-scheduling NAPI pollFelix Fietkau2015-06-141-1/+1
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 45971