Commit 8f8b0449 authored by Deepak Saxena's avatar Deepak Saxena Committed by Russell King

[ARM PATCH] 1559/1: updated include/asm-arm/checksum.h big-endian support

Patch from Deepak Saxena

This is an update to patch 1529/1 that cleans up the code so we don't need 
#ifdef's for little vs. big-endian systems. Tested on both systems with
various network apps (ping, ftp, tftp, ssh, telnet, NFS root, http) with no
issues.
parent a4b35e1f
......@@ -105,7 +105,7 @@ csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned short len,
adcs %0, %0, %5 \n\
adc %0, %0, #0"
: "=&r"(sum)
: "r" (sum), "r" (daddr), "r" (saddr), "r" (ntohs(len) << 16), "Ir" (proto << 8)
: "r" (sum), "r" (daddr), "r" (saddr), "r" (ntohs(len)), "Ir" (ntohs(proto))
: "cc");
return sum;
}
......@@ -127,7 +127,7 @@ csum_tcpudp_magic(unsigned long saddr, unsigned long daddr, unsigned short len,
addcs %0, %0, #0x10000 \n\
mvn %0, %0"
: "=&r"(sum)
: "r" (sum), "r" (daddr), "r" (saddr), "r" (ntohs(len)), "Ir" (proto << 8)
: "r" (sum), "r" (daddr), "r" (saddr), "r" (ntohs(len)), "Ir" (ntohs(proto))
: "cc");
return sum >> 16;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment