diff options
author | Vittorio Gambaletta <openwrt@vittgam.net> | 2017-03-25 18:08:02 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2018-01-09 15:08:28 +0100 |
commit | c3cdc53164f14fce729b4a5b32a63b6cc79aa5e0 (patch) | |
tree | 8d279e71cc4bafb0340005120cae30096cb37ac0 /target/linux/ar71xx/files/drivers | |
parent | e07ee06aad412fe417c6b50bba8ba2f723cd1433 (diff) | |
download | upstream-c3cdc53164f14fce729b4a5b32a63b6cc79aa5e0.tar.gz upstream-c3cdc53164f14fce729b4a5b32a63b6cc79aa5e0.tar.bz2 upstream-c3cdc53164f14fce729b4a5b32a63b6cc79aa5e0.zip |
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>
Diffstat (limited to 'target/linux/ar71xx/files/drivers')
-rw-r--r-- | target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c index 566e9513d8..72dd654a69 100644 --- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c +++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c @@ -629,6 +629,22 @@ __ag71xx_link_adjust(struct ag71xx *ag, bool update) ag71xx_wr(ag, AG71XX_REG_MAC_CFG2, cfg2); ag71xx_wr(ag, AG71XX_REG_FIFO_CFG5, fifo5); ag71xx_wr(ag, AG71XX_REG_MAC_IFCTL, ifctl); + + if (pdata->disable_inline_checksum_engine) { + /* + * The rx ring buffer can stall on small packets on QCA953x and + * QCA956x. Disabling the inline checksum engine fixes the stall. + * The wr, rr functions cannot be used since this hidden register + * is outside of the normal ag71xx register block. + */ + void __iomem *dam = ioremap_nocache(0xb90001bc, 0x4); + if (dam) { + __raw_writel(__raw_readl(dam) & ~BIT(27), dam); + (void)__raw_readl(dam); + iounmap(dam); + } + } + ag71xx_hw_start(ag); netif_carrier_on(ag->dev); |