Skip to contentSkip to conversation

metag architecture fix

GIT PULL James Hogan 1 participant 1 message Jul 10, 2013

lore
Share & tools
lore
#0 lore raw

Hi Linus,

Please pull this single arch/metag fix for a network checksum bug (discovered after you merged the other metag changes).

Thanks
James

The following changes since commit 8bb495e3f02401ee6f76d1b1d77f3ac9f079e376:

Linux 3.10 (2013-06-30 15:13:29 -0700)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag.git tags/metag-fixes-for-v3.11-1

for you to fetch changes up to d903bca9bc542bd6d60019f9f761be15ad79c956:

metag: checksum.h: fix carry in csum_tcpudp_nofold (2013-07-09 11:09:17 +0100)

----------------------------------------------------------------
arch/metag fixes for v3.11

This is just a single fix to fix bad UDP checksums sometimes being generated to IP addresses *.*.255.255.

----------------------------------------------------------------
James Hogan (1):
metag: checksum.h: fix carry in csum_tcpudp_nofold

 arch/metag/include/asm/checksum.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/metag/include/asm/checksum.h +2 -1
index 999bf76..08dd1cc 100644
@@ -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"