瀏覽代碼

ar71xx: fix max frame length of the QCA955x SoCs

Signed-off-by: Gabor Juhos <[email protected]>

SVN-Revision: 39161
Gabor Juhos 11 年之前
父節點
當前提交
05f8604e2e
共有 1 個文件被更改,包括 11 次插入0 次删除
  1. 11 0
      target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c

+ 11 - 0
target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c

@@ -981,6 +981,17 @@ void __init ath79_register_eth(unsigned int id)
 		pdata->has_gbit = 1;
 		pdata->is_ar724x = 1;
 
+		/*
+		 * Limit the maximum frame length to 4095 bytes.
+		 * Although the documentation says that the hardware
+		 * limit is 16383 bytes but that does not work in
+		 * practice. It seems that the hardware only updates
+		 * the lowest 12 bits of the packet length field
+		 * in the RX descriptor.
+		 */
+		pdata->max_frame_len = SZ_4K - 1;
+		pdata->desc_pktlen_mask = SZ_16K - 1;
+
 		if (!pdata->fifo_cfg1)
 			pdata->fifo_cfg1 = 0x0010ffff;
 		if (!pdata->fifo_cfg2)