Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1509919

Re: [PATCH] drivers/net/usb/r8152 fix broken rx checksums

From Mark Lord <mlord@pobox.com>
Newsgroups linux.kernel
Subject Re: [PATCH] drivers/net/usb/r8152 fix broken rx checksums
Date 2016-10-27 01:00 +0200
Message-ID <swFkR-1JB-19@gated-at.bofh.it> (permalink)
References <swFbb-1Gb-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 16-10-26 06:36 PM, Mark Lord wrote:
> The r8152 driver has been broken since (approx) 3.6.16,

Correction:  broken since 3.16.xx.

> when support was added for hardware rx checksum on newer chip versions.
> Symptoms include random segfaults and silent data corruption over NFS.
>
> This does not work on the VER_02 dongle I have here
> when used with a slow embedded system CPU.
> Google reveals others reporting similar issues on Raspberry Pi.
>
> So, disable hardware rx checksum for VER_02, and fix
> an obvious coding error for IPV6 checksums in the same function.
>
> Because this bug results in silent data corruption,
> it is a good candidate for back-porting to -stable >= 3.16.xx.
> Patch attached (to deal with buggy mailer) and also below for review.
>
> Signed-off-by: Mark Lord <mlord@pobox.com>
>
> --- old/drivers/net/usb/r8152.c    2016-09-30 04:20:43.000000000 -0400
> +++ linux/drivers/net/usb/r8152.c    2016-10-26 14:15:44.932517676 -0400
> @@ -1645,7 +1645,7 @@
>      u8 checksum = CHECKSUM_NONE;
>      u32 opts2, opts3;
>
> -    if (tp->version == RTL_VER_01)
> +    if (tp->version == RTL_VER_01 || tp->version == RTL_VER_02)
>          goto return_result;
>
>      opts2 = le32_to_cpu(rx_desc->opts2);
> @@ -1660,7 +1660,7 @@
>              checksum = CHECKSUM_NONE;
>          else
>              checksum = CHECKSUM_UNNECESSARY;
> -    } else if (RD_IPV6_CS) {
> +    } else if (opts2 & RD_IPV6_CS) {
>          if ((opts2 & RD_UDP_CS) && !(opts3 & UDPF))
>              checksum = CHECKSUM_UNNECESSARY;
>          else if ((opts2 & RD_TCP_CS) && !(opts3 & TCPF))


-- 
Mark Lord
Real-Time Remedies Inc.
mlord@pobox.com

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] drivers/net/usb/r8152 fix broken rx checksums Mark Lord <mlord@pobox.com> - 2016-10-27 00:50 +0200
  Re: [PATCH] drivers/net/usb/r8152 fix broken rx checksums Mark Lord <mlord@pobox.com> - 2016-10-27 01:00 +0200
  Re: [PATCH] drivers/net/usb/r8152 fix broken rx checksums David Miller <davem@davemloft.net> - 2016-10-30 22:30 +0100
    Re: [PATCH] drivers/net/usb/r8152 fix broken rx checksums Paul Bolle <pebolle@tiscali.nl> - 2016-10-31 00:50 +0100
  [PATCH net] r8152: Fix broken RX checksums. Mark Lord <mlord@pobox.com> - 2016-10-31 00:30 +0100
    Re: [PATCH net] r8152: Fix broken RX checksums. David Miller <davem@davemloft.net> - 2016-10-31 02:00 +0100
      Re: [PATCH net] r8152: Fix broken RX checksums. Mark Lord <mlord@pobox.com> - 2016-10-31 03:10 +0100
        Re: [PATCH net] r8152: Fix broken RX checksums. David Miller <davem@davemloft.net> - 2016-10-31 05:00 +0100
          RE: [PATCH net] r8152: Fix broken RX checksums. Hayes Wang <hayeswang@realtek.com> - 2016-10-31 09:20 +0100
            Re: [PATCH net] r8152: Fix broken RX checksums. Mark Lord <mlord@pobox.com> - 2016-10-31 14:30 +0100
            Re: [PATCH net] r8152: Fix broken RX checksums. Mark Lord <mlord@pobox.com> - 2016-11-02 19:50 +0100
              Re: [PATCH net] r8152: Fix broken RX checksums. Mark Lord <mlord@pobox.com> - 2016-11-04 13:20 +0100
            RE: [PATCH net] r8152: Fix broken RX checksums. Hayes Wang <hayeswang@realtek.com> - 2016-11-03 10:00 +0100
              Re: [PATCH net] r8152: Fix broken RX checksums. Mark Lord <mlord@pobox.com> - 2016-11-03 12:50 +0100
                Re: [PATCH net] r8152: Fix broken RX checksums. Mark Lord <mlord@pobox.com> - 2016-11-04 15:00 +0100
                Re: [PATCH net] r8152: Fix broken RX checksums. Mark Lord <mlord@pobox.com> - 2016-11-04 21:30 +0100
                RE: [PATCH net] r8152: Fix broken RX checksums. Hayes Wang <hayeswang@realtek.com> - 2016-11-09 14:20 +0100
                Re: [PATCH net] r8152: Fix broken RX checksums. Mark Lord <mlord@pobox.com> - 2016-11-09 14:20 +0100

csiph-web