diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | arch/mips/include/asm/elf.h | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/sgi/ioc3-eth.c | 6 |
3 files changed, 4 insertions, 8 deletions
diff --git a/Makefile b/Makefile index 32c83a163544f..789cdf41093ab 100644 --- a/Makefile +++ b/Makefile @@ -320,7 +320,7 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \ # "make" in the configured kernel build directory always uses that. # Default value for CROSS_COMPILE is not to prefix executables # Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile -ARCH ?= $(SUBARCH) +ARCH ?= mips CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%) # Architecture as present in compile.h diff --git a/arch/mips/include/asm/elf.h b/arch/mips/include/asm/elf.h index 0eb1a75be1058..8f4ac12247393 100644 --- a/arch/mips/include/asm/elf.h +++ b/arch/mips/include/asm/elf.h @@ -282,7 +282,7 @@ void mips_dump_regs64(u64 *uregs, const struct pt_regs *regs); #define elfo32_check_arch(hdr) \ ({ \ int __res = 1; \ - struct elfhdr *__h = (hdr); \ + typeof(*(hdr)) *__h = (hdr); \ \ if (!mips_elf_check_machine(__h)) \ __res = 0; \ @@ -305,7 +305,7 @@ void mips_dump_regs64(u64 *uregs, const struct pt_regs *regs); #define elfn64_check_arch(hdr) \ ({ \ int __res = 1; \ - struct elfhdr *__h = (hdr); \ + typeof(*(hdr)) *__h = (hdr); \ \ if (!mips_elf_check_machine(__h)) \ __res = 0; \ diff --git a/drivers/net/ethernet/sgi/ioc3-eth.c b/drivers/net/ethernet/sgi/ioc3-eth.c index 18d533fdf14c4..b58c89fdc3484 100644 --- a/drivers/net/ethernet/sgi/ioc3-eth.c +++ b/drivers/net/ethernet/sgi/ioc3-eth.c @@ -1422,15 +1422,11 @@ static int ioc3_start_xmit(struct sk_buff *skb, struct net_device *dev) /* Sum up dest addr, src addr and protocol */ ehsum = eh[0] + eh[1] + eh[2] + eh[3] + eh[4] + eh[5] + eh[6]; - /* Fold ehsum. can't use csum_fold which negates also ... */ - ehsum = (ehsum & 0xffff) + (ehsum >> 16); - ehsum = (ehsum & 0xffff) + (ehsum >> 16); - /* Skip IP header; it's sum is always zero and was already filled in by ip_output.c */ csum = csum_tcpudp_nofold(ih->saddr, ih->daddr, ih->tot_len - (ih->ihl << 2), - proto, 0xffff ^ ehsum); + proto, csum_fold(ehsum)); csum = (csum & 0xffff) + (csum >> 16); /* Fold again */ csum = (csum & 0xffff) + (csum >> 16); |