Browse Source

Merge tag 'metag-fixes-for-v3.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag

Pull arch/metag fixes from James Hogan:
 "This is just a single fix to fix bad UDP checksums sometimes being
  generated to IP addresses *.*.255.255"

* tag 'metag-fixes-for-v3.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag:
  metag: checksum.h: fix carry in csum_tcpudp_nofold
Linus Torvalds 12 years ago
parent
commit
2d6244b3cc
1 changed files with 2 additions and 1 deletions
  1. 2 1
      arch/metag/include/asm/checksum.h

+ 2 - 1
arch/metag/include/asm/checksum.h

@@ -64,7 +64,8 @@ static inline __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr,
 					__wsum sum)
 {
 	unsigned long len_proto = (proto + len) << 8;
-	asm ("ADD    %0, %0, %1\n"
+	asm ("ADDS   %0, %0, %1\n"
+	     "ADDCS  %0, %0, #1\n"
 	     "ADDS   %0, %0, %2\n"
 	     "ADDCS  %0, %0, #1\n"
 	     "ADDS   %0, %0, %3\n"