Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: ftgmac100: Fix Aspeed ast2600 TX hang issue

The new HW arbitration feature on Aspeed ast2600 will cause MAC TX to
hang when handling scatter-gather DMA. Disable the problematic feature
by setting MAC register 0x58 bit28 and bit27.

Fixes: 39bfab8844a0 ("net: ftgmac100: Add support for DT phy-handle property")
Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Dylan Hung and committed by
Jakub Kicinski
137d23ce ec78e318

+13
+5
drivers/net/ethernet/faraday/ftgmac100.c
··· 1817 1817 priv->rxdes0_edorr_mask = BIT(30); 1818 1818 priv->txdes0_edotr_mask = BIT(30); 1819 1819 priv->is_aspeed = true; 1820 + /* Disable ast2600 problematic HW arbitration */ 1821 + if (of_device_is_compatible(np, "aspeed,ast2600-mac")) { 1822 + iowrite32(FTGMAC100_TM_DEFAULT, 1823 + priv->base + FTGMAC100_OFFSET_TM); 1824 + } 1820 1825 } else { 1821 1826 priv->rxdes0_edorr_mask = BIT(15); 1822 1827 priv->txdes0_edotr_mask = BIT(15);
+8
drivers/net/ethernet/faraday/ftgmac100.h
··· 170 170 #define FTGMAC100_MACCR_SW_RST (1 << 31) 171 171 172 172 /* 173 + * test mode control register 174 + */ 175 + #define FTGMAC100_TM_RQ_TX_VALID_DIS (1 << 28) 176 + #define FTGMAC100_TM_RQ_RR_IDLE_PREV (1 << 27) 177 + #define FTGMAC100_TM_DEFAULT \ 178 + (FTGMAC100_TM_RQ_TX_VALID_DIS | FTGMAC100_TM_RQ_RR_IDLE_PREV) 179 + 180 + /* 173 181 * PHY control register 174 182 */ 175 183 #define FTGMAC100_PHYCR_MDC_CYCTHR_MASK 0x3f