[PATCH] 2.3.99pre5-6 token ring and csum_partial_copy

From: François romieu (romieu@ensta.fr)
Date: Sat Apr 22 2000 - 18:41:44 EDT

  • Next message: Miguel Freitas: "[2.3.99-pre5/pre6] Serious kswapd or kflushd bug"

    Problem :
    - csum_partial_copy appears as an unresolved symbol in ibmtr_cs.o

    Fix :
    - the culprit is in drivers/net/tokenring/ibmtr.c. The big FIXME in
    arch/i386/lib/old-checksum.c indicates the function to be obsolete (at
    least on x86). ibmtr.c didn't check wether the copy went right or not, thus
    it now uses the same csum_partial_copy_generic as ./net/ethernet/eth.c does
    FWIW, 1) it shouldn't need any check here, 2) the dest arg looks right
    (following the src one is more penible), 3) I hope it was supposed to work
    before :o)

    Checks done :
    - make bzImage; make modules -> ok
    - depmod no longer protests about it

    Question :
    Would it be welcome to suppress the occurences of csum_partial_copy on
    architectures where csum_partial_copy_generic is available ?
    Some #include may be modified this way.

    diff -u --recursive --new-file --expand-tabs linux-2.3.99pre6-5.orig/arch/i386/lib/Makefile linux-2.3.99pre6-5/arch/i386/lib/Makefile
    --- linux-2.3.99pre6-5.orig/arch/i386/lib/Makefile Sat Apr 22 10:12:54 2000
    +++ linux-2.3.99pre6-5/arch/i386/lib/Makefile Sat Apr 22 22:22:14 2000
    @@ -6,8 +6,7 @@
             $(CC) $(AFLAGS) -traditional -c $< -o $*.o
     
     L_TARGET = lib.a
    -L_OBJS = checksum.o old-checksum.o delay.o \
    - usercopy.o getuser.o putuser.o iodebug.o
    +L_OBJS = checksum.o delay.o usercopy.o getuser.o putuser.o iodebug.o
     
     ifdef CONFIG_X86_USE_3DNOW
     L_OBJS += mmx.o
    diff -u --recursive --new-file --expand-tabs linux-2.3.99pre6-5.orig/arch/i386/lib/old-checksum.c linux-2.3.99pre6-5/arch/i386/lib/old-checksum.c
    --- linux-2.3.99pre6-5.orig/arch/i386/lib/old-checksum.c Sun Dec 27 13:32:09 1998
    +++ linux-2.3.99pre6-5/arch/i386/lib/old-checksum.c Wed Dec 31 19:00:00 1969
    @@ -1,19 +0,0 @@
    -/*
    - * FIXME: old compatibility stuff, will be removed soon.
    - */
    -
    -#include <net/checksum.h>
    -
    -unsigned int csum_partial_copy( const char *src, char *dst, int len, int sum)
    -{
    - int src_err=0, dst_err=0;
    -
    - sum = csum_partial_copy_generic ( src, dst, len, sum, &src_err, &dst_err);
    -
    - if (src_err || dst_err)
    - printk("old csum_partial_copy_fromuser(), tell mingo to convert me.\n");
    -
    - return sum;
    -}
    -
    -
    diff -u --recursive --new-file --expand-tabs linux-2.3.99pre6-5.orig/drivers/net/Config.in linux-2.3.99pre6-5/drivers/net/Config.in
    diff -u --recursive --new-file --expand-tabs linux-2.3.99pre6-5.orig/drivers/net/tokenring/ibmtr.c linux-2.3.99pre6-5/drivers/net/tokenring/ibmtr.c
    --- linux-2.3.99pre6-5.orig/drivers/net/tokenring/ibmtr.c Sat Apr 22 10:12:59 2000
    +++ linux-2.3.99pre6-5/drivers/net/tokenring/ibmtr.c Sat Apr 22 21:12:23 2000
    @@ -1750,7 +1750,7 @@
             /* Copy the payload... */
             for (;;) {
                     if (IPv4_p)
    - chksum = csum_partial_copy(bus_to_virt(rbufdata), data,
    + chksum = csum_partial_copy_nocheck(bus_to_virt(rbufdata), data,
                                                        length < rbuffer_len ? length : rbuffer_len,
                                                        chksum);
                     else

    -- 
    Ueimor
    

    - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



    This archive was generated by hypermail 2b29 : Sat Apr 22 2000 - 17:38:35 EDT