Author: nbd
Date: 2014-09-06 19:51:44 +0200 (Sat, 06 Sep 2014)
New Revision: 42428

Modified:
   
trunk/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
Log:
ar71xx: fix off-by-one error in packet descriptor splitting (patch from #13072)

Signed-off-by: Felix Fietkau <[email protected]>

Modified: 
trunk/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
===================================================================
--- 
trunk/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
   2014-09-06 17:51:39 UTC (rev 42427)
+++ 
trunk/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
   2014-09-06 17:51:44 UTC (rev 42428)
@@ -704,7 +704,12 @@
 
                if (cur_len > split) {
                        cur_len = split;
-                       if (len < split + 4)
+
+                       /*
+                        * TX will hang if DMA transfers <= 4 bytes,
+                        * make sure next segment is more than 4 bytes long.
+                        */
+                       if (len <= split + 4)
                                cur_len -= 4;
                }
 
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to