ar71xx: ag71xx: remove unused SIOCETHTOOL ioctl handling This ioctl is currently routed through generic interface code: dev_ioctl dev_ethtool __ethtool_get_link_ksettings phy_ethtool_ioctl Cc: Felix Fietkau <nbd@nbd.name> Signed-off-by: Petr Štetiar <ynezz@true.cz>
ar71xx: ag71xx: Replace duplicate debugging code with simple function call ag71xx_dump_regs is used in code several times, and is providing same output. Signed-off-by: Petr Štetiar <ynezz@true.cz>
ar71xx: fix QCA955X SGMII link loss 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>
ar71xx: remove pdata->fifo_cfg* The values are the same for all chipsets that use it Signed-off-by: Felix Fietkau <nbd@nbd.name>
ag71xx: Move timestamp struct member outside of struct. 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 check 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 processed Signed-off-by: Felix Fietkau <nbd@nbd.name>
ar71xx: allocate rx/tx descriptor/buffers in one chunk Reduces false sharing due to cache aliases Signed-off-by: Felix Fietkau <nbd@nbd.name>
ar71xx: remove obsolete '< KERNEL_VERSION(4, 2, 0)' check 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. Backported from Code Aurora QSDK Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>
Revert "ag71xx: Switch from driver to kernel macro for NAPI_WEIGHT." 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. 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" 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 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>
ar71xx: fix ethernet driver fast reset issue causing tx timeouts Signed-off-by: Felix Fietkau <nbd@nbd.name>
ar71xx: add software transmit timestamp support 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 positives Signed-off-by: Felix Fietkau <nbd@nbd.name>
ar71xx: rename ethernet pdata->builtin_switch to use_flow_control Signed-off-by: Felix Fietkau <nbd@nbd.name>
Revert "ar71xx: prevent spurious ethernet resets from dma hang check false positives" This reverts commit 3d58d7f053eae83b59baf5c8b8a58da78653f605.
ar71xx: prevent spurious ethernet resets from dma hang check false positives Signed-off-by: Felix Fietkau <nbd@nbd.name>