diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1998-07-10 01:14:47 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1998-07-10 01:14:47 +0000 |
commit | cf00b9f677c32c4f0ad187bed33e7bf2209db3b8 (patch) | |
tree | 6091370501637f7d42c529bc35454aa0719f35d6 /arch/mips/lib/csum_partial_copy.c | |
parent | 683c16eb00d32d749c1038f5fd9032d8543e5697 (diff) |
o Support for the front panel on the Indy. The panel work now as a
user would expect it to work, like under IRIX with the exception
that the machine doesn't freeze solid as long as the button is
pressed.
o Realtime clock driver (CONFIG_SGI_DS1286) for the Indy. Includes
/proc/rtc interface which tells you everything about your RTC which
you never wanted to know. You have to configure this driver into
your kernel or you won't be able to set your RTC.
o Some cleanup of the RTC interfaces in Linux, RTC does no longer mean
PC-style RTC. The userland interface definitions are now in
<linux/rtc.h>. We still need some more cleanup until we can enable
several RTC drivers.
o Virtual aliasing fixes for ptrace(2).
o Add ptrace(2) interface definitions needed to build GDB to
<asm/ptrace.h>.
o Revert to some older routines, the newer optimized ones are buggy.
o On panic the Indy LED will be blinking fast crying to the admin
passing by [music from Rocky Horror show] ``fix me, fix me, fix
me''.
o On panic the power button will only reboot the machine, not power it
down. That's probably more what people want it to do.
o Remove some old files.
o Did I tell you that CVS is buggy?
Diffstat (limited to 'arch/mips/lib/csum_partial_copy.c')
-rw-r--r-- | arch/mips/lib/csum_partial_copy.c | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/arch/mips/lib/csum_partial_copy.c b/arch/mips/lib/csum_partial_copy.c new file mode 100644 index 000000000..ec731b800 --- /dev/null +++ b/arch/mips/lib/csum_partial_copy.c @@ -0,0 +1,59 @@ +/* + * INET An implementation of the TCP/IP protocol suite for the LINUX + * operating system. INET is implemented using the BSD Socket + * interface as the means of communication with the user level. + * + * MIPS specific IP/TCP/UDP checksumming routines + * + * Authors: Ralf Baechle, <ralf@waldorf-gmbh.de> + * Lots of code moved from tcp.c and ip.c; see those files + * for more names. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * + * $Id: csum_partial_copy.c,v 1.1 1996/07/03 14:03:47 ralf Exp $ + */ +#include <net/checksum.h> +#include <linux/types.h> +#include <asm/byteorder.h> +#include <asm/string.h> +#include <asm/uaccess.h> + +/* + * copy while checksumming, otherwise like csum_partial + */ +unsigned int csum_partial_copy(const char *src, char *dst, + int len, unsigned int sum) +{ + /* + * It's 2:30 am and I don't feel like doing it real ... + * This is lots slower than the real thing (tm) + */ + sum = csum_partial(src, len, sum); + memcpy(dst, src, len); + + return sum; +} + +/* + * Copy from userspace and compute checksum. If we catch an exception + * then zero the rest of the buffer. + */ +unsigned int csum_partial_copy_from_user (const char *src, char *dst, + int len, unsigned int sum, + int *err_ptr) +{ + int *dst_err_ptr=NULL; + int missing; + + missing = copy_from_user(dst, src, len); + if (missing) { + memset(dst + len - missing, 0, missing); + *err_ptr = -EFAULT; + } + + return csum_partial(dst, len, sum); +} |