patch-2.3.26 linux/arch/ppc/lib/checksum.S

Next file: linux/arch/ppc/mm/init.c
Previous file: linux/arch/ppc/kernel/traps.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.25/linux/arch/ppc/lib/checksum.S linux/arch/ppc/lib/checksum.S
@@ -24,6 +24,8 @@
  * len is in words and is always >= 5.
  */
 _GLOBAL(ip_fast_csum)
+	cmpi	0,r4,0
+	beq	10f
 	lwz	r0,0(r3)
 	lwzu	r5,4(r3)
 	addi	r4,r4,-2
@@ -38,6 +40,8 @@
 	not	r3,r3
 	srwi	r3,r3,16
 	blr
+10:	li	r3,0
+	blr	
 
 /*
  * Compute checksum of TCP or UDP pseudo-header:

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)