PATCH: Re: 2.6.0-test3+sk98lin driver with hardware bug make eth unusable

From: Ricardo Galli (gallir_at_uib.es)
Date: 08/12/03

  • Next message: Måns Rullgård: "Re: [PATCH]O15int for interactivity"
    To: Alan Cox <alan@redhat.com>, linux-kernel@vger.kernel.org
    Date:	Tue, 12 Aug 2003 14:31:22 +0200
    
    

    On Tuesday 12 August 2003 13:54, Alan Cox shaped the electrons to shout:
    > > There is a ASIC bug in several popular motherboards (including ASUS ones)
    > > related to TX hardware checksum.
    >
    > The checksum comes off the SK hardware
    >
    > > For packets smaller that 56 bytes (payload), as UDP dns queries, the asic
    > > generates a bad checksum making the drivers unusable for "normal"
    > > Internet usage:
    >
    > Sounds like broken padding handling for small frames, if so let the sw
    > checksum handle them.

    Find enclosed the patch to make it a Kconfig option. Just tested,
    at least it works as a workaround.

    Regards,

    -- 
      ricardo galli       GPG id C8114D34
      http://mnm.uib.es/~gallir/
    Patch against 2.6.0-test3
    diff -r -u linux-2.6.0-test3/drivers/net/Kconfig linux-2.6.0-test3-new/drivers/net/Kconfig
    --- linux-2.6.0-test3/drivers/net/Kconfig	2003-08-10 17:34:29.000000000 +0200
    +++ linux-2.6.0-test3-new/drivers/net/Kconfig	2003-08-12 13:47:50.000000000 +0200
    @@ -2107,6 +2107,13 @@
     	  say M here and read Documentation/modules.txt. This is recommended.
     	  The module will be called sk98lin.o.
    +config SK98LIN_TX_CHECKSUM
    +	bool "Use hardware TX checksum"
    +	depends on SK98LIN
    +	help
    +	  Some chips have a hardware bugs that generate wrong
    +	  checksums in small packets. If unsure, say No.
    +
     config CONFIG_SK98LIN_T1
     	bool "3Com 3C940/3C941 Gigabit Ethernet Adapter"
     	depends on SK98LIN
    diff -r -u linux-2.6.0-test3/drivers/net/sk98lin/skge.c linux-2.6.0-test3-new/drivers/net/sk98lin/skge.c
    --- linux-2.6.0-test3/drivers/net/sk98lin/skge.c	2003-08-10 17:33:18.000000000 +0200
    +++ linux-2.6.0-test3-new/drivers/net/sk98lin/skge.c	2003-08-12 13:50:41.000000000 +0200
    @@ -422,8 +422,12 @@
     /* for debuging on x86 only */
     /* #define BREAKPOINT() asm(" int $3"); */
    +#ifdef CONFIG_SK98LIN_TX_CHECKSUM
     /* use the transmit hw checksum driver functionality */
    -#define USE_SK_TX_CHECKSUM
    + #define USE_SK_TX_CHECKSUM
    +#else
    + #undef USE_SK_TX_CHECKSUM
    +#endif
     /* use the receive hw checksum driver functionality */
     #define USE_SK_RX_CHECKSUM
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Måns Rullgård: "Re: [PATCH]O15int for interactivity"

    Relevant Pages

    • Re: kern/118879: [bge] [patch] bge has checksum problems on the 5703 chipset
      ... State-Changed-By: kris ... When hardware checksum ... See the tcpdump manpage. ...
      (freebsd-net)
    • Check for TCP checksum of Network Interface
      ... SUN box uses hardware checksum. ... Through various postings I have read on the NET, they seem to elude to the ... running snoop to check the checksum value. ...
      (comp.unix.solaris)
    • Re: [PATCH] cowlinks v2
      ... So you need a checksum for each block and a ... > blocks, that's 1% memory overhead. ... When do you have a heart between your knees? ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: UDP recvmsg blocks after select(), 2.6 bug?
      ... might not conform to POSIX in its handling of select on sockets. ... >> and receive the errored frame, eliminating the case where errored frames ... We do the copy into userspace and checksum ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • RE: UDP recvmsg blocks after select(), 2.6 bug?
      ... > nonblocking socket. ... But it's better than blocking the call, ... > Would it be so bad to do the checksum before marking the ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)