linux/arch/sh
Guenter Roeck b5319c9629 Revert "sh: Handle calling csum_partial with misaligned data"
This reverts commit cadc4e1a2b.

Commit cadc4e1a2b ("sh: Handle calling csum_partial with misaligned
data") causes bad checksum calculations on unaligned data. Reverting
it fixes the problem.

    # Subtest: checksum
    # module: checksum_kunit
    1..5
    # test_csum_fixed_random_inputs: ASSERTION FAILED at lib/checksum_kunit.c:500
    Expected ( u64)result == ( u64)expec, but
        ( u64)result == 53378 (0xd082)
        ( u64)expec == 33488 (0x82d0)
    # test_csum_fixed_random_inputs: pass:0 fail:1 skip:0 total:1
    not ok 1 test_csum_fixed_random_inputs
    # test_csum_all_carry_inputs: ASSERTION FAILED at lib/checksum_kunit.c:525
    Expected ( u64)result == ( u64)expec, but
        ( u64)result == 65281 (0xff01)
        ( u64)expec == 65280 (0xff00)
    # test_csum_all_carry_inputs: pass:0 fail:1 skip:0 total:1
    not ok 2 test_csum_all_carry_inputs
    # test_csum_no_carry_inputs: ASSERTION FAILED at lib/checksum_kunit.c:573
    Expected ( u64)result == ( u64)expec, but
        ( u64)result == 65535 (0xffff)
        ( u64)expec == 65534 (0xfffe)
    # test_csum_no_carry_inputs: pass:0 fail:1 skip:0 total:1
    not ok 3 test_csum_no_carry_inputs
    # test_ip_fast_csum: pass:1 fail:0 skip:0 total:1
    ok 4 test_ip_fast_csum
    # test_csum_ipv6_magic: pass:1 fail:0 skip:0 total:1
    ok 5 test_csum_ipv6_magic
 # checksum: pass:2 fail:3 skip:0 total:5
 # Totals: pass:2 fail:3 skip:0 total:5
not ok 22 checksum

Fixes: cadc4e1a2b ("sh: Handle calling csum_partial with misaligned data")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Link: https://lore.kernel.org/r/20240324231804.841099-1-linux@roeck-us.net
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
2024-05-02 12:02:38 +02:00
..
boards sh: sh7785lcr: Make init_sh7785lcr_IRQ() static 2024-05-02 12:01:32 +02:00
boot sh: j2: Drop incorrect SPI controller spi-max-frequency property 2024-05-02 12:02:29 +02:00
cchips sh: hd64461: Make setup_hd64461() static 2024-03-21 12:17:35 +01:00
configs vfs-6.8.netfs 2024-01-19 09:10:23 -08:00
drivers sh: push-switch: Convert to platform remove callback returning void 2024-05-02 12:02:22 +02:00
include sh: cache: Move forward declarations to <asm/cacheflush.h> 2024-05-02 12:01:31 +02:00
kernel sh: sh7757: Add missing #include <asm/mmzone.h> 2024-05-02 12:01:31 +02:00
lib Revert "sh: Handle calling csum_partial with misaligned data" 2024-05-02 12:02:38 +02:00
math-emu sh: math-emu: Add missing #include <asm/fpu.h> 2024-05-02 12:01:24 +02:00
mm sh: cache: Move forward declarations to <asm/cacheflush.h> 2024-05-02 12:01:31 +02:00
tools sh: Remove SH5-based Cayman platform 2020-08-14 22:05:06 -04:00
Kbuild sh: Move build rule for cchips/hd6446x/ to arch/sh/Kbuild 2023-07-05 18:55:18 +02:00
Kconfig Introduce cpu_dcache_is_aliasing() across all architectures 2024-02-22 15:27:19 -08:00
Kconfig.cpu docs: move superh documentation under Documentation/arch/ 2023-03-30 13:00:35 -06:00
Kconfig.debug sh: bios: Revive earlyprintk support 2023-10-25 16:50:30 +02:00
Makefile sh: Remove compiler flag duplication 2023-07-05 18:55:25 +02:00