diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0225a8a78272f8d9cf9860838a9cdeab06094669..881db41693aaedf8fd603cd4774fb7a3212324a0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,7 +11,7 @@ build: - docker-amd64 stage: build script: - - sed -i -e 's:gcc_8_arm:gcc_10_arm:g' version.sh + - sed -i -e 's:gcc_8_arm:gcc_11_arm:g' version.sh - . version.sh && echo $BRANCH - mkdir -p /root/.cache/ccache/ || true - ccache -s diff --git a/patch.sh b/patch.sh index 06a099416100a31037fa1a9b0f147df7ac55767c..31d3b0ddb2f88c1b9579b8f8f05ee81a4dec6e43 100644 --- a/patch.sh +++ b/patch.sh @@ -103,46 +103,6 @@ external_git () { ${git_bin} describe } -can_isotp () { - #regenerate="enable" - if [ "x${regenerate}" = "xenable" ] ; then - cd ../ - if [ -d ./can-isotp ] ; then - rm -rf ./can-isotp || true - fi - - ${git_bin} clone https://github.com/hartkopp/can-isotp --depth=1 - cd ./can-isotp - isotp_hash=$(git rev-parse HEAD) - cd - - - cd ./KERNEL/ - - cp -v ../can-isotp/include/uapi/linux/can/isotp.h include/uapi/linux/can/ - cp -v ../can-isotp/net/can/isotp.c net/can/ - - ${git_bin} add . - ${git_bin} commit -a -m 'merge: can-isotp: https://github.com/hartkopp/can-isotp' -m "https://github.com/hartkopp/can-isotp/commit/${isotp_hash}" -s - ${git_bin} format-patch -1 -o ../patches/external/can_isotp/ - echo "CAN-ISOTP: https://github.com/hartkopp/can-isotp/commit/${isotp_hash}" > ../patches/external/git/CAN-ISOTP - - rm -rf ../can-isotp/ || true - - ${git_bin} reset --hard HEAD~1 - - start_cleanup - - ${git} "${DIR}/patches/external/can_isotp/0001-merge-can-isotp-https-github.com-hartkopp-can-isotp.patch" - - wdir="external/can_isotp" - number=1 - cleanup - - exit 2 - fi - dir 'external/can_isotp' -} - wpanusb () { #regenerate="enable" if [ "x${regenerate}" = "xenable" ] ; then @@ -413,7 +373,6 @@ local_patch () { } #external_git -can_isotp wpanusb bcfserial rt @@ -682,7 +641,6 @@ drivers () { #https://github.com/raspberrypi/linux/branches #exit 2 dir 'RPi' - dir 'boris' dir 'drivers/ar1021_i2c' dir 'drivers/sound' dir 'drivers/spi' diff --git a/patches/boris/0001-bb.org-Boris-on-Tux.patch b/patches/boris/0001-bb.org-Boris-on-Tux.patch deleted file mode 100644 index 089eb4bdefb726df02b6d06e9c304f8a85dfb999..0000000000000000000000000000000000000000 --- a/patches/boris/0001-bb.org-Boris-on-Tux.patch +++ /dev/null @@ -1,1200 +0,0 @@ -From 53913a6510cc86dc6330e39caa29414b3a684e1a Mon Sep 17 00:00:00 2001 -From: Jason Kridner <jkridner@beagleboard.org> -Date: Tue, 18 Jan 2022 23:06:21 -0500 -Subject: [PATCH] bb.org: Boris on Tux - ---- - drivers/video/logo/Kconfig | 4 + - drivers/video/logo/Makefile | 1 + - drivers/video/logo/logo.c | 4 + - drivers/video/logo/logo_beagle_clut224.ppm | 1123 ++++++++++++++++++++ - include/linux/linux_logo.h | 1 + - 5 files changed, 1133 insertions(+) - create mode 100644 drivers/video/logo/logo_beagle_clut224.ppm - -diff --git a/drivers/video/logo/Kconfig b/drivers/video/logo/Kconfig -index 6d6f8c08792d..ca7dde5c8298 100644 ---- a/drivers/video/logo/Kconfig -+++ b/drivers/video/logo/Kconfig -@@ -28,6 +28,10 @@ config LOGO_LINUX_CLUT224 - bool "Standard 224-color Linux logo" - default y - -+config LOGO_BEAGLE_CLUT224 -+ bool "224-color Linux logo with BeagleBoard.org mascot Boris" -+ default y -+ - config LOGO_DEC_CLUT224 - bool "224-color Digital Equipment Corporation Linux logo" - depends on MACH_DECSTATION || ALPHA -diff --git a/drivers/video/logo/Makefile b/drivers/video/logo/Makefile -index 895c60b8402e..cb7233c192be 100644 ---- a/drivers/video/logo/Makefile -+++ b/drivers/video/logo/Makefile -@@ -5,6 +5,7 @@ obj-$(CONFIG_LOGO) += logo.o - obj-$(CONFIG_LOGO_LINUX_MONO) += logo_linux_mono.o - obj-$(CONFIG_LOGO_LINUX_VGA16) += logo_linux_vga16.o - obj-$(CONFIG_LOGO_LINUX_CLUT224) += logo_linux_clut224.o -+obj-$(CONFIG_LOGO_BEAGLE_CLUT224) += logo_beagle_clut224.o - obj-$(CONFIG_LOGO_DEC_CLUT224) += logo_dec_clut224.o - obj-$(CONFIG_LOGO_MAC_CLUT224) += logo_mac_clut224.o - obj-$(CONFIG_LOGO_PARISC_CLUT224) += logo_parisc_clut224.o -diff --git a/drivers/video/logo/logo.c b/drivers/video/logo/logo.c -index 141f15a9a459..19d537b060fa 100644 ---- a/drivers/video/logo/logo.c -+++ b/drivers/video/logo/logo.c -@@ -99,6 +99,10 @@ const struct linux_logo * __ref fb_find_logo(int depth) - #ifdef CONFIG_LOGO_SUPERH_CLUT224 - /* SuperH Linux logo */ - logo = &logo_superh_clut224; -+#endif -+#ifdef CONFIG_LOGO_BEAGLE_CLUT224 -+ /* Generic Linux logo */ -+ logo = &logo_beagle_clut224; - #endif - } - return logo; -diff --git a/drivers/video/logo/logo_beagle_clut224.ppm b/drivers/video/logo/logo_beagle_clut224.ppm -new file mode 100644 -index 000000000000..dd0f7bf9997e ---- /dev/null -+++ b/drivers/video/logo/logo_beagle_clut224.ppm -@@ -0,0 +1,1123 @@ -+P3 -+80 80 -+255 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+6 6 6 6 6 6 10 10 10 10 10 10 10 10 10 6 6 6 -+6 6 6 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 6 6 6 10 10 10 14 14 14 -+22 22 22 26 26 26 30 30 30 34 34 34 30 30 30 30 30 30 -+26 26 26 18 18 18 14 14 14 10 10 10 6 6 6 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 -+0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 6 6 6 14 14 14 26 26 26 42 42 42 -+54 54 54 66 66 66 78 78 78 78 78 78 78 78 78 74 74 74 -+66 66 66 54 54 54 42 42 42 26 26 26 18 18 18 10 10 10 -+6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 10 10 10 22 22 22 42 42 42 66 66 66 86 86 86 -+66 66 66 38 38 38 38 38 38 22 22 22 26 26 26 34 34 34 -+54 54 54 66 66 66 86 86 86 70 70 70 46 46 46 26 26 26 -+14 14 14 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 -+0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+10 10 10 26 26 26 50 50 50 82 82 82 58 58 58 6 6 6 -+2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 -+2 2 6 2 2 6 6 6 6 54 54 54 86 86 86 66 66 66 -+38 38 38 18 18 18 6 6 6 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 6 6 -+22 22 22 50 50 50 78 78 78 34 34 34 2 2 6 2 2 6 -+2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 -+2 2 6 2 2 6 2 2 6 2 2 6 6 6 6 70 70 70 -+78 78 78 46 46 46 22 22 22 6 6 6 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 -+0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 6 6 6 18 18 18 -+42 42 42 82 82 82 26 26 26 2 2 6 2 2 6 2 2 6 -+2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 -+2 2 6 14 14 14 46 46 46 34 34 34 6 6 6 2 2 6 -+42 42 42 78 78 78 42 42 42 18 18 18 6 6 6 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 -+0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 10 10 10 30 30 30 -+66 66 66 58 58 58 2 2 6 2 2 6 2 2 6 2 2 6 -+2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 -+2 2 6 26 26 26 86 86 86 101 101 101 46 46 46 10 10 10 -+2 2 6 58 58 58 70 70 70 34 34 34 10 10 10 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 -+0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 14 14 14 42 42 42 -+86 86 86 10 10 10 2 2 6 2 2 6 2 2 6 2 2 6 -+2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 -+2 2 6 30 30 30 94 94 94 94 94 94 58 58 58 26 26 26 -+2 2 6 6 6 6 78 78 78 54 54 54 22 22 22 6 6 6 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 6 6 6 22 22 22 62 62 62 -+62 62 62 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 -+2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 -+2 2 6 26 26 26 54 54 54 38 38 38 18 18 18 10 10 10 -+2 2 6 2 2 6 34 34 34 82 82 82 38 38 38 14 14 14 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 -+0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 6 6 6 30 30 30 78 78 78 -+30 30 30 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 -+2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 -+2 2 6 10 10 10 10 10 10 2 2 6 2 2 6 2 2 6 -+2 2 6 2 2 6 2 2 6 78 78 78 50 50 50 18 18 18 -+6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 10 10 10 38 38 38 86 86 86 -+14 14 14 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 -+2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 -+2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 -+2 2 6 2 2 6 2 2 6 54 54 54 66 66 66 26 26 26 -+6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 -+0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 14 14 14 42 42 42 82 82 82 -+2 2 6 2 2 6 2 2 6 6 6 6 10 10 10 2 2 6 -+2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 -+2 2 6 6 6 6 14 14 14 10 10 10 2 2 6 2 2 6 -+2 2 6 2 2 6 2 2 6 18 18 18 82 82 82 34 34 34 -+10 10 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 14 14 14 46 46 46 86 86 86 -+2 2 6 2 2 6 6 6 6 6 6 6 22 22 22 34 34 34 -+6 6 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 -+18 18 18 34 34 34 10 10 10 50 50 50 22 22 22 2 2 6 -+2 2 6 2 2 6 2 2 6 10 10 10 86 86 86 42 42 42 -+14 14 14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 -+0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 14 14 14 46 46 46 86 86 86 -+2 2 6 2 2 6 38 38 38 116 116 116 94 94 94 22 22 22 -+22 22 22 2 2 6 2 2 6 2 2 6 14 14 14 86 86 86 -+138 138 138 162 162 162 158 155 152 38 38 38 26 26 26 6 6 6 -+2 2 6 2 2 6 2 2 6 2 2 6 86 86 86 46 46 46 -+14 14 14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 14 14 14 46 46 46 86 86 86 -+2 2 6 14 14 14 138 138 138 198 198 198 195 195 195 116 116 116 -+10 10 10 2 2 6 2 2 6 6 6 6 101 98 89 187 187 187 -+210 210 210 218 218 218 218 218 218 138 138 138 14 14 14 6 6 6 -+2 2 6 2 2 6 2 2 6 2 2 6 86 86 86 50 50 50 -+18 18 18 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 -+0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 14 14 14 46 46 46 86 86 86 -+2 2 6 54 54 54 218 218 218 195 195 195 226 226 226 246 246 246 -+58 58 58 2 2 6 2 2 6 30 30 30 210 210 210 253 253 253 -+171 170 170 123 123 123 221 221 221 234 234 234 74 74 74 2 2 6 -+2 2 6 2 2 6 2 2 6 2 2 6 70 70 70 58 58 58 -+22 22 22 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 14 14 14 46 46 46 82 82 82 -+2 2 6 106 106 106 171 170 170 26 26 26 86 86 86 226 226 226 -+123 123 123 10 10 10 14 14 14 46 46 46 231 231 231 190 190 190 -+6 6 6 70 70 70 90 90 90 238 238 238 158 158 158 2 2 6 -+2 2 6 2 2 6 2 2 6 2 2 6 70 70 70 58 58 58 -+22 22 22 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 -+0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 14 14 14 42 42 42 86 86 86 -+6 6 6 116 116 116 106 106 106 6 6 6 70 70 70 144 144 144 -+128 128 128 18 18 18 38 38 38 54 54 54 221 221 221 106 106 106 -+2 2 6 14 14 14 46 46 46 190 190 190 198 198 198 2 2 6 -+2 2 6 2 2 6 2 2 6 2 2 6 74 74 74 62 62 62 -+22 22 22 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 -+0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 14 14 14 42 42 42 94 94 94 -+14 14 14 101 101 101 128 128 128 2 2 6 18 18 18 116 116 116 -+118 98 46 121 92 8 121 92 8 98 77 21 162 162 162 106 106 106 -+2 2 6 2 2 6 2 2 6 195 195 195 195 195 195 6 6 6 -+2 2 6 2 2 6 2 2 6 2 2 6 74 74 74 62 62 62 -+22 22 22 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 -+0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 10 10 10 38 38 38 90 90 90 -+14 14 14 58 58 58 210 210 210 26 26 26 61 42 6 156 107 11 -+226 170 11 236 186 11 225 175 15 184 144 12 225 175 15 175 146 61 -+37 26 9 2 2 6 70 70 70 246 246 246 138 138 138 2 2 6 -+2 2 6 2 2 6 2 2 6 2 2 6 70 70 70 66 66 66 -+26 26 26 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 10 10 10 38 38 38 86 86 86 -+14 14 14 10 10 10 195 195 195 188 164 115 192 133 9 225 175 15 -+239 182 13 236 186 11 232 195 16 232 195 16 246 215 20 241 208 19 -+232 195 16 184 144 12 218 194 134 219 214 185 42 42 42 2 2 6 -+2 2 6 2 2 6 2 2 6 2 2 6 50 50 50 74 74 74 -+30 30 30 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 10 10 10 34 34 34 86 86 86 -+14 14 14 2 2 6 121 87 25 192 133 9 219 162 10 239 182 13 -+236 186 11 232 195 16 241 208 19 246 215 20 246 215 20 246 215 20 -+246 215 20 241 208 19 241 208 19 226 184 13 121 87 25 2 2 6 -+2 2 6 2 2 6 2 2 6 2 2 6 50 50 50 82 82 82 -+34 34 34 10 10 10 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 10 10 10 34 34 34 82 82 82 -+30 30 30 61 42 6 180 123 7 206 145 10 230 174 11 239 182 13 -+236 186 11 238 202 15 241 208 19 235 218 115 246 215 20 246 215 20 -+246 215 20 246 215 20 226 184 13 225 175 15 184 144 12 6 6 6 -+2 2 6 2 2 6 2 2 6 2 2 6 26 26 26 94 94 94 -+42 42 42 14 14 14 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 10 10 10 30 30 30 78 78 78 -+50 50 50 104 69 6 192 133 9 216 158 10 236 178 12 236 186 11 -+232 195 16 241 208 19 246 215 20 246 215 20 246 215 20 246 215 20 -+241 208 19 200 144 11 200 144 11 216 158 10 163 110 8 2 2 6 -+2 2 6 2 2 6 2 2 6 2 2 6 6 6 6 90 90 90 -+54 54 54 18 18 18 6 6 6 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 10 10 10 30 30 30 78 78 78 -+46 46 46 22 22 22 137 92 6 210 162 10 239 182 13 236 186 11 -+238 202 15 241 208 19 246 215 20 246 215 20 241 208 19 210 162 10 -+185 133 11 210 150 10 216 158 10 210 150 10 104 69 6 2 2 6 -+6 6 6 54 54 54 14 14 14 2 2 6 2 2 6 62 62 62 -+74 74 74 30 30 30 10 10 10 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 10 10 10 34 34 34 78 78 78 -+50 50 50 6 6 6 92 69 23 138 101 21 190 146 13 226 184 13 -+232 195 16 232 195 16 225 175 15 190 146 13 167 114 7 192 133 9 -+210 150 10 213 154 11 190 142 34 188 164 115 101 98 89 2 2 6 -+2 2 6 78 78 78 116 116 116 58 58 58 2 2 6 22 22 22 -+90 90 90 46 46 46 18 18 18 6 6 6 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 10 10 10 38 38 38 86 86 86 -+50 50 50 6 6 6 128 128 128 172 154 116 156 107 11 167 114 7 -+200 144 11 184 144 12 197 138 11 200 144 11 206 145 10 206 145 10 -+197 138 11 188 164 115 195 195 195 198 198 198 171 170 170 14 14 14 -+2 2 6 22 22 22 116 116 116 116 116 116 22 22 22 2 2 6 -+74 74 74 70 70 70 30 30 30 10 10 10 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 6 6 6 18 18 18 50 50 50 101 101 101 -+26 26 26 10 10 10 138 138 138 190 190 190 172 154 116 156 107 11 -+197 138 11 200 144 11 197 138 11 192 133 9 180 123 7 190 142 34 -+181 170 141 187 187 187 202 202 202 221 221 221 218 218 218 66 66 66 -+2 2 6 2 2 6 50 50 50 62 62 62 6 6 6 2 2 6 -+10 10 10 90 90 90 50 50 50 18 18 18 6 6 6 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 10 10 10 34 34 34 74 74 74 74 74 74 -+2 2 6 6 6 6 144 144 144 198 198 198 190 190 190 181 170 141 -+150 121 62 156 107 11 156 107 11 166 123 43 172 154 116 187 187 187 -+190 190 190 210 210 210 246 246 246 253 253 253 253 253 253 182 182 182 -+6 6 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 -+2 2 6 62 62 62 74 74 74 34 34 34 14 14 14 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 10 10 10 22 22 22 54 54 54 94 94 94 18 18 18 -+2 2 6 46 46 46 234 234 234 221 221 221 190 190 190 190 190 190 -+190 190 190 187 187 187 187 187 187 190 190 190 190 190 190 195 195 195 -+218 218 218 242 242 242 253 253 253 253 253 253 253 253 253 253 253 253 -+82 82 82 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 -+2 2 6 14 14 14 86 86 86 54 54 54 22 22 22 6 6 6 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+6 6 6 18 18 18 46 46 46 90 90 90 46 46 46 18 18 18 -+6 6 6 182 182 182 253 253 253 246 246 246 206 206 206 190 190 190 -+190 190 190 190 190 190 190 190 190 190 190 190 206 206 206 231 231 231 -+250 250 250 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+202 202 202 14 14 14 2 2 6 2 2 6 2 2 6 2 2 6 -+2 2 6 2 2 6 42 42 42 86 86 86 42 42 42 18 18 18 -+6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 6 6 -+14 14 14 38 38 38 74 74 74 66 66 66 2 2 6 6 6 6 -+90 90 90 250 250 250 253 253 253 253 253 253 238 238 238 138 138 138 -+97 87 74 110 93 64 119 103 79 103 95 84 108 105 106 238 238 238 -+253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+253 253 253 82 82 82 2 2 6 2 2 6 2 2 6 2 2 6 -+2 2 6 2 2 6 2 2 6 78 78 78 70 70 70 34 34 34 -+14 14 14 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14 14 14 -+34 34 34 66 66 66 78 78 78 6 6 6 2 2 6 18 18 18 -+218 218 218 253 253 253 253 253 253 210 210 210 80 72 61 103 75 39 -+169 127 44 169 127 44 167 127 47 207 184 137 167 127 47 104 86 63 -+234 234 234 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+253 253 253 182 182 182 2 2 6 2 2 6 2 2 6 2 2 6 -+2 2 6 2 2 6 2 2 6 18 18 18 90 90 90 62 62 62 -+30 30 30 10 10 10 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 10 10 10 26 26 26 -+58 58 58 90 90 90 18 18 18 2 2 6 2 2 6 108 105 106 -+253 253 253 253 253 253 218 218 218 103 75 39 169 127 44 143 114 43 -+118 84 23 169 127 44 169 127 44 188 164 115 183 152 86 169 127 44 -+97 87 74 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+253 253 253 231 231 231 18 18 18 2 2 6 2 2 6 2 2 6 -+2 2 6 2 2 6 2 2 6 2 2 6 18 18 18 94 94 94 -+54 54 54 26 26 26 10 10 10 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 6 6 6 22 22 22 50 50 50 -+90 90 90 26 26 26 2 2 6 2 2 6 14 14 14 195 195 195 -+250 250 250 253 253 253 89 81 69 166 123 43 169 127 44 169 127 44 -+98 77 21 163 123 43 120 94 48 156 118 43 225 216 182 161 124 51 -+80 72 61 171 170 170 253 253 253 253 253 253 253 253 253 253 253 253 -+250 250 250 242 242 242 54 54 54 2 2 6 2 2 6 2 2 6 -+2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 38 38 38 -+86 86 86 50 50 50 22 22 22 6 6 6 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 6 6 6 14 14 14 38 38 38 82 82 82 -+34 34 34 2 2 6 2 2 6 2 2 6 42 42 42 195 195 195 -+246 246 246 231 231 231 104 86 51 169 127 44 169 127 44 169 127 44 -+121 87 25 105 82 38 72 65 62 105 82 38 211 190 148 239 232 219 -+154 139 110 89 81 69 210 210 210 250 250 250 246 246 246 238 238 238 -+226 226 226 231 231 231 101 101 101 6 6 6 2 2 6 2 2 6 -+2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 -+38 38 38 82 82 82 42 42 42 14 14 14 6 6 6 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 10 10 10 26 26 26 62 62 62 66 66 66 -+2 2 6 2 2 6 2 2 6 6 6 6 70 70 70 171 170 170 -+206 206 206 101 98 89 157 117 39 169 127 44 169 127 44 169 127 44 -+163 123 43 105 82 38 163 123 43 169 127 44 211 190 148 255 255 255 -+255 255 255 253 253 253 144 144 144 90 90 90 190 190 190 202 202 202 -+198 198 198 202 202 202 182 182 182 18 18 18 2 2 6 2 2 6 -+2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 -+2 2 6 62 62 62 66 66 66 30 30 30 10 10 10 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 14 14 14 42 42 42 82 82 82 18 18 18 -+2 2 6 2 2 6 2 2 6 10 10 10 94 94 94 182 182 182 -+210 210 210 99 81 49 169 127 44 169 127 44 169 127 44 169 127 44 -+169 127 44 98 77 21 169 127 44 188 164 115 252 252 252 255 255 255 -+255 255 255 255 255 255 255 255 255 158 155 152 108 105 106 138 138 138 -+195 195 195 195 195 195 210 210 210 158 158 158 6 6 6 14 14 14 -+50 50 50 14 14 14 2 2 6 2 2 6 2 2 6 2 2 6 -+2 2 6 6 6 6 86 86 86 46 46 46 18 18 18 6 6 6 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 6 6 6 22 22 22 54 54 54 70 70 70 2 2 6 -+2 2 6 10 10 10 2 2 6 22 22 22 169 168 166 231 231 231 -+128 128 128 143 114 43 169 127 44 169 127 44 169 127 44 169 127 44 -+169 127 44 118 84 23 167 127 47 247 245 242 255 255 255 255 255 255 -+255 255 255 255 255 255 182 182 182 116 116 116 128 128 128 38 38 38 -+206 206 206 206 206 206 198 198 198 226 226 226 94 94 94 2 2 6 -+6 6 6 38 38 38 30 30 30 2 2 6 2 2 6 2 2 6 -+2 2 6 2 2 6 62 62 62 66 66 66 26 26 26 10 10 10 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 10 10 10 30 30 30 74 74 74 50 50 50 2 2 6 -+26 26 26 26 26 26 2 2 6 106 106 106 238 238 238 253 253 253 -+89 81 66 169 127 44 169 127 44 169 127 44 169 127 44 169 127 44 -+169 127 44 157 117 39 138 113 67 255 255 255 255 255 255 255 255 255 -+255 255 255 255 255 255 202 202 202 50 50 50 34 34 34 50 50 50 -+231 231 231 246 246 246 218 218 218 202 202 202 210 210 210 14 14 14 -+2 2 6 2 2 6 30 30 30 22 22 22 2 2 6 2 2 6 -+2 2 6 2 2 6 18 18 18 86 86 86 42 42 42 14 14 14 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 14 14 14 42 42 42 90 90 90 22 22 22 2 2 6 -+42 42 42 2 2 6 18 18 18 218 218 218 253 253 253 253 253 253 -+104 86 63 169 127 44 169 127 44 169 127 44 169 127 44 169 127 44 -+166 123 43 156 118 43 105 82 38 255 255 255 255 255 255 255 255 255 -+255 255 255 255 255 255 255 255 255 221 221 221 182 182 182 90 90 90 -+232 232 232 253 253 253 248 248 248 221 221 221 218 218 218 101 101 101 -+2 2 6 14 14 14 18 18 18 38 38 38 10 10 10 2 2 6 -+2 2 6 2 2 6 2 2 6 78 78 78 58 58 58 22 22 22 -+6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+6 6 6 18 18 18 54 54 54 82 82 82 2 2 6 26 26 26 -+22 22 22 2 2 6 123 123 123 253 253 253 253 253 253 253 253 253 -+89 81 66 169 127 44 169 127 44 169 127 44 169 127 44 166 123 43 -+141 109 45 157 117 39 118 84 23 240 237 231 255 255 255 255 255 255 -+255 255 255 255 255 255 255 255 255 226 226 226 97 87 74 72 54 38 -+253 253 253 253 253 253 251 251 250 250 250 250 238 238 238 198 198 198 -+6 6 6 38 38 38 58 58 58 26 26 26 38 38 38 2 2 6 -+2 2 6 2 2 6 2 2 6 46 46 46 78 78 78 30 30 30 -+10 10 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+10 10 10 30 30 30 74 74 74 58 58 58 2 2 6 42 42 42 -+2 2 6 22 22 22 231 231 231 253 253 253 253 253 253 253 253 253 -+162 161 160 104 86 51 169 127 44 169 127 44 156 118 43 141 109 45 -+145 111 45 105 82 38 157 117 39 216 197 160 255 255 255 203 202 203 -+158 155 152 116 116 116 72 65 62 95 51 32 175 118 6 145 90 47 -+250 250 250 253 253 253 252 252 252 253 253 253 253 253 253 246 246 246 -+46 46 46 38 38 38 42 42 42 14 14 14 38 38 38 14 14 14 -+2 2 6 2 2 6 2 2 6 6 6 6 86 86 86 46 46 46 -+14 14 14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 6 6 -+14 14 14 42 42 42 90 90 90 18 18 18 18 18 18 26 26 26 -+2 2 6 116 116 116 253 253 253 253 253 253 253 253 253 253 253 253 -+248 248 248 138 138 138 99 81 49 105 82 38 125 96 44 121 87 25 -+98 77 21 125 96 44 169 127 44 216 197 160 255 255 255 190 190 190 -+108 105 106 70 70 70 58 58 58 72 54 38 192 133 9 120 94 48 -+250 250 250 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+94 94 94 6 6 6 2 2 6 2 2 6 10 10 10 34 34 34 -+2 2 6 2 2 6 2 2 6 2 2 6 74 74 74 58 58 58 -+22 22 22 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10 10 10 -+26 26 26 66 66 66 82 82 82 2 2 6 38 38 38 6 6 6 -+14 14 14 210 210 210 253 253 253 253 253 253 253 253 253 253 253 253 -+101 101 101 90 90 90 244 244 244 89 81 69 145 111 45 161 124 51 -+197 178 128 207 184 137 216 197 160 218 218 218 171 170 170 151 148 137 -+141 130 107 80 72 61 169 168 166 226 226 226 109 101 93 187 187 187 -+253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+144 144 144 2 2 6 2 2 6 2 2 6 2 2 6 46 46 46 -+2 2 6 2 2 6 2 2 6 2 2 6 42 42 42 74 74 74 -+30 30 30 10 10 10 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 6 6 6 14 14 14 -+42 42 42 90 90 90 26 26 26 6 6 6 42 42 42 2 2 6 -+74 74 74 250 250 250 253 253 253 253 253 253 253 253 253 253 253 253 -+106 106 106 131 116 91 210 209 209 110 93 64 169 127 44 233 229 220 -+255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 239 232 219 -+169 127 44 120 94 48 244 244 244 253 253 253 253 253 253 253 253 253 -+253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+182 182 182 2 2 6 2 2 6 2 2 6 2 2 6 46 46 46 -+2 2 6 2 2 6 2 2 6 2 2 6 10 10 10 86 86 86 -+38 38 38 10 10 10 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 10 10 10 26 26 26 -+66 66 66 82 82 82 2 2 6 22 22 22 18 18 18 2 2 6 -+144 144 144 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+171 170 170 125 96 44 103 95 84 110 93 64 175 146 61 255 255 255 -+255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 -+183 152 86 145 111 45 195 195 194 253 253 253 253 253 253 253 253 253 -+253 253 253 253 253 253 252 252 252 253 253 253 253 253 253 253 253 253 -+206 206 206 2 2 6 2 2 6 2 2 6 2 2 6 38 38 38 -+2 2 6 2 2 6 2 2 6 2 2 6 6 6 6 86 86 86 -+46 46 46 14 14 14 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 6 6 6 18 18 18 46 46 46 -+86 86 86 18 18 18 2 2 6 34 34 34 10 10 10 6 6 6 -+210 210 210 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+246 246 246 100 88 68 145 111 45 120 94 48 159 135 84 249 249 249 -+255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 -+152 137 111 156 118 43 158 158 158 253 253 253 253 253 253 253 253 253 -+253 253 253 253 253 253 251 251 250 253 253 253 253 253 253 253 253 253 -+221 221 221 6 6 6 2 2 6 2 2 6 6 6 6 30 30 30 -+2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 82 82 82 -+54 54 54 18 18 18 6 6 6 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 10 10 10 26 26 26 66 66 66 -+62 62 62 2 2 6 2 2 6 38 38 38 10 10 10 26 26 26 -+238 238 238 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+253 253 253 144 144 144 138 113 67 166 123 43 138 119 85 246 246 246 -+255 255 255 242 242 242 255 255 255 255 255 255 234 234 234 255 255 255 -+152 137 111 156 118 43 162 161 160 253 253 253 253 253 253 253 253 253 -+253 253 253 253 253 253 250 250 250 253 253 253 253 253 253 253 253 253 -+231 231 231 6 6 6 2 2 6 2 2 6 10 10 10 30 30 30 -+2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 66 66 66 -+58 58 58 22 22 22 6 6 6 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 10 10 10 38 38 38 78 78 78 -+6 6 6 2 2 6 2 2 6 46 46 46 14 14 14 42 42 42 -+246 246 246 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+253 253 253 250 250 250 94 90 86 154 122 46 138 119 85 253 253 253 -+244 243 244 195 195 194 255 255 255 244 244 244 182 182 182 255 255 255 -+147 140 128 145 111 45 187 187 187 253 253 253 253 253 253 253 253 253 -+253 253 253 253 253 253 249 249 249 249 249 249 253 253 253 253 253 253 -+234 234 234 10 10 10 2 2 6 2 2 6 22 22 22 14 14 14 -+2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 66 66 66 -+62 62 62 22 22 22 6 6 6 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 6 6 6 18 18 18 50 50 50 74 74 74 -+2 2 6 2 2 6 14 14 14 70 70 70 34 34 34 62 62 62 -+250 250 250 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+253 253 253 253 253 253 231 231 231 104 86 63 141 130 107 255 255 255 -+246 246 246 182 182 182 255 255 255 231 231 231 196 195 196 255 255 255 -+147 140 128 119 100 63 242 242 242 253 253 253 253 253 253 253 253 253 -+253 253 253 253 253 253 253 253 253 242 242 242 253 253 253 253 253 253 -+234 234 234 14 14 14 2 2 6 2 2 6 30 30 30 2 2 6 -+2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 66 66 66 -+62 62 62 22 22 22 6 6 6 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 6 6 6 18 18 18 54 54 54 62 62 62 -+2 2 6 2 2 6 2 2 6 30 30 30 46 46 46 70 70 70 -+250 250 250 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+253 253 253 253 253 253 210 210 210 89 81 66 152 137 111 255 255 255 -+254 254 254 171 170 170 255 255 255 218 218 218 210 209 209 255 255 255 -+151 148 137 123 99 54 169 168 166 253 253 253 253 253 253 253 253 253 -+253 253 253 253 253 253 253 253 253 252 252 252 253 253 253 253 253 253 -+226 226 226 10 10 10 2 2 6 6 6 6 30 30 30 2 2 6 -+2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 66 66 66 -+58 58 58 22 22 22 6 6 6 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 6 6 6 22 22 22 58 58 58 62 62 62 -+2 2 6 2 2 6 2 2 6 2 2 6 30 30 30 78 78 78 -+250 250 250 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+253 253 253 249 249 249 97 87 74 169 127 44 152 137 111 255 255 255 -+255 255 255 171 170 170 255 255 255 203 202 203 226 226 226 255 255 255 -+158 155 152 169 127 44 120 94 48 234 234 234 253 253 253 253 253 253 -+253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+206 206 206 2 2 6 22 22 22 34 34 34 18 14 6 22 22 22 -+26 26 26 18 18 18 6 6 6 2 2 6 2 2 6 82 82 82 -+54 54 54 18 18 18 6 6 6 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 6 6 6 26 26 26 62 62 62 106 106 106 -+78 53 15 185 133 11 210 162 10 121 92 8 6 6 6 62 62 62 -+238 238 238 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+253 253 253 238 238 238 110 93 64 166 123 43 162 161 160 255 255 255 -+255 255 255 108 105 106 94 94 94 82 82 82 244 244 244 255 255 255 -+202 202 202 150 121 62 141 109 45 202 202 202 253 253 253 253 253 253 -+253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+158 158 158 18 18 18 14 14 14 2 2 6 2 2 6 2 2 6 -+6 6 6 18 18 18 66 66 66 38 38 38 6 6 6 94 94 94 -+50 50 50 18 18 18 6 6 6 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 6 6 -+10 10 10 10 10 10 18 18 18 38 38 38 78 78 78 141 130 107 -+216 158 10 242 186 14 246 190 14 246 190 14 163 110 8 10 10 10 -+90 90 90 238 238 238 253 253 253 253 253 253 253 253 253 253 253 253 -+253 253 253 252 252 252 144 144 144 80 72 61 218 218 218 255 255 255 -+206 206 206 123 123 123 253 253 253 128 128 128 169 168 166 254 254 254 -+254 254 254 101 98 89 128 128 128 252 252 252 253 253 253 253 253 253 -+253 253 253 253 253 253 253 253 253 225 216 182 219 191 94 219 191 94 -+180 133 36 37 26 9 2 2 6 2 2 6 2 2 6 2 2 6 -+2 2 6 2 2 6 38 38 38 46 46 46 26 26 26 106 106 106 -+54 54 54 18 18 18 6 6 6 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 6 6 6 14 14 14 22 22 22 -+30 30 30 38 38 38 50 50 50 70 70 70 106 106 106 190 142 34 -+226 170 11 242 186 14 246 190 14 246 190 14 246 190 14 156 107 11 -+6 6 6 74 74 74 226 226 226 253 253 253 253 253 253 253 253 253 -+253 253 253 253 253 253 253 253 253 182 182 182 108 105 106 116 116 116 -+123 123 123 244 244 244 253 253 253 244 244 244 128 128 128 116 116 116 -+116 116 116 169 168 166 253 253 253 253 253 253 253 253 253 253 253 253 -+253 253 253 253 253 253 253 253 253 201 174 68 241 196 14 241 208 19 -+232 195 16 38 30 10 2 2 6 2 2 6 2 2 6 2 2 6 -+2 2 6 6 6 6 30 30 30 26 26 26 210 162 10 159 135 84 -+66 66 66 26 26 26 6 6 6 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 6 6 6 18 18 18 38 38 38 58 58 58 -+78 78 78 86 86 86 101 101 101 123 123 123 175 146 61 210 150 10 -+234 174 13 246 186 14 246 190 14 246 190 14 246 190 14 236 186 11 -+104 69 6 2 2 6 46 46 46 198 198 198 253 253 253 253 253 253 -+253 253 253 253 253 253 253 253 253 253 253 253 234 234 234 242 242 242 -+253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+253 253 253 253 253 253 253 253 253 201 174 68 242 186 14 241 196 14 -+210 162 10 22 18 6 2 2 6 2 2 6 2 2 6 2 2 6 -+2 2 6 2 2 6 6 6 6 121 92 8 238 202 15 232 195 16 -+82 82 82 34 34 34 10 10 10 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 14 14 14 38 38 38 70 70 70 154 122 46 -+190 142 34 200 144 11 197 138 11 197 138 11 213 154 11 226 170 11 -+242 186 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 -+225 175 15 45 32 11 2 2 6 22 22 22 158 158 158 250 250 250 -+253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+253 253 253 250 250 250 242 242 242 201 174 68 239 182 13 236 186 11 -+213 154 11 45 32 11 2 2 6 2 2 6 2 2 6 2 2 6 -+2 2 6 2 2 6 61 42 6 225 175 15 236 186 11 236 186 11 -+119 103 79 42 42 42 14 14 14 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 6 6 6 22 22 22 54 54 54 154 122 46 213 154 11 -+226 170 11 230 174 11 226 170 11 226 170 11 236 178 12 242 186 14 -+246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 -+241 196 14 184 144 12 10 10 10 2 2 6 6 6 6 116 116 116 -+242 242 242 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+253 253 253 231 231 231 198 198 198 201 174 68 236 178 12 236 178 12 -+210 150 10 137 92 6 18 14 6 2 2 6 2 2 6 2 2 6 -+6 6 6 61 42 6 200 144 11 236 178 12 239 182 13 239 182 13 -+124 112 88 58 58 58 22 22 22 6 6 6 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 10 10 10 30 30 30 70 70 70 180 133 36 226 170 11 -+239 182 13 242 186 14 242 186 14 246 186 14 246 190 14 246 190 14 -+246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 -+246 190 14 232 195 16 104 69 6 2 2 6 2 2 6 2 2 6 -+66 66 66 221 221 221 253 253 253 253 253 253 253 253 253 253 253 253 -+253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+253 253 253 206 206 206 198 198 198 201 174 68 230 174 11 230 174 11 -+216 158 10 192 133 9 163 110 8 116 81 8 104 69 6 116 81 8 -+167 114 7 197 138 11 226 170 11 239 182 13 242 186 14 242 186 14 -+165 145 105 78 78 78 34 34 34 14 14 14 6 6 6 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 6 6 6 30 30 30 78 78 78 190 142 34 226 170 11 -+239 182 13 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 -+246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 -+246 190 14 241 196 14 210 162 10 22 18 6 2 2 6 2 2 6 -+2 2 6 38 38 38 218 218 218 253 253 253 253 253 253 253 253 253 -+253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+250 250 250 206 206 206 198 198 198 201 174 68 226 170 11 236 178 12 -+224 166 10 210 150 10 200 144 11 197 138 11 192 133 9 197 138 11 -+210 150 10 226 170 11 242 186 14 246 190 14 246 190 14 246 186 14 -+225 175 15 124 112 88 62 62 62 30 30 30 14 14 14 6 6 6 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 10 10 10 30 30 30 78 78 78 167 127 47 224 166 10 -+239 182 13 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 -+246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 -+246 190 14 246 190 14 241 196 14 138 101 21 2 2 6 2 2 6 -+2 2 6 2 2 6 78 78 78 250 250 250 253 253 253 253 253 253 -+253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+250 250 250 218 218 218 198 198 198 190 142 34 219 162 10 236 178 12 -+234 174 13 224 166 10 216 158 10 213 154 11 213 154 11 216 158 10 -+226 170 11 239 182 13 246 190 14 246 190 14 246 190 14 246 190 14 -+242 186 14 197 166 45 101 101 101 58 58 58 30 30 30 14 14 14 -+6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 10 10 10 30 30 30 74 74 74 167 127 47 216 158 10 -+236 178 12 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 -+246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 -+246 190 14 246 190 14 241 196 14 226 184 13 61 42 6 2 2 6 -+2 2 6 2 2 6 22 22 22 238 238 238 253 253 253 253 253 253 -+253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+253 253 253 226 226 226 187 187 187 180 133 36 216 158 10 236 178 12 -+239 182 13 236 178 12 230 174 11 226 170 11 226 170 11 230 174 11 -+236 178 12 242 186 14 246 190 14 246 190 14 246 190 14 246 190 14 -+246 186 14 239 182 13 197 166 45 106 106 106 66 66 66 34 34 34 -+14 14 14 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 6 6 6 26 26 26 70 70 70 163 133 67 213 154 11 -+236 178 12 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 -+246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 -+246 190 14 246 190 14 246 190 14 241 196 14 190 146 13 18 14 6 -+2 2 6 2 2 6 46 46 46 246 246 246 253 253 253 253 253 253 -+253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+253 253 253 221 221 221 86 86 86 156 107 11 216 158 10 236 178 12 -+242 186 14 246 186 14 242 186 14 239 182 13 239 182 13 242 186 14 -+242 186 14 246 186 14 246 190 14 246 190 14 246 190 14 246 190 14 -+246 190 14 246 190 14 242 186 14 225 175 15 142 114 66 66 66 66 -+30 30 30 10 10 10 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 6 6 6 26 26 26 70 70 70 163 133 67 210 150 10 -+236 178 12 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 -+246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 -+246 190 14 246 190 14 246 190 14 246 190 14 232 195 16 121 92 8 -+34 34 34 106 106 106 221 221 221 253 253 253 253 253 253 253 253 253 -+253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+242 242 242 82 82 82 18 14 6 163 110 8 216 158 10 236 178 12 -+242 186 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 -+246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 -+246 190 14 246 190 14 246 190 14 246 190 14 242 186 14 163 133 67 -+46 46 46 18 18 18 6 6 6 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 10 10 10 30 30 30 78 78 78 163 133 67 210 150 10 -+236 178 12 246 186 14 246 190 14 246 190 14 246 190 14 246 190 14 -+246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 -+246 190 14 246 190 14 246 190 14 246 190 14 241 196 14 225 175 15 -+181 170 141 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 218 218 218 -+58 58 58 2 2 6 22 18 6 167 114 7 216 158 10 236 178 12 -+246 186 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 -+246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 -+246 190 14 246 190 14 246 190 14 246 186 14 242 186 14 190 142 34 -+54 54 54 22 22 22 6 6 6 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 14 14 14 38 38 38 86 86 86 180 133 36 213 154 11 -+236 178 12 246 186 14 246 190 14 246 190 14 246 190 14 246 190 14 -+246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 -+246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 232 195 16 -+190 146 13 218 218 218 253 253 253 253 253 253 253 253 253 253 253 253 -+253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+253 253 253 253 253 253 253 253 253 250 250 250 171 170 170 26 26 26 -+2 2 6 2 2 6 37 26 9 163 110 8 219 162 10 239 182 13 -+246 186 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 -+246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 -+246 190 14 246 190 14 246 186 14 236 178 12 224 166 10 142 114 66 -+46 46 46 18 18 18 6 6 6 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+6 6 6 18 18 18 50 50 50 109 101 93 192 133 9 224 166 10 -+242 186 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 -+246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 -+246 190 14 246 190 14 246 190 14 246 190 14 242 186 14 226 184 13 -+210 162 10 141 109 45 226 226 226 253 253 253 253 253 253 253 253 253 -+253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 -+253 253 253 253 253 253 198 198 198 66 66 66 2 2 6 2 2 6 -+2 2 6 2 2 6 45 32 11 156 107 11 219 162 10 239 182 13 -+246 186 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 -+246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 -+246 190 14 242 186 14 234 174 13 213 154 11 154 122 46 66 66 66 -+30 30 30 10 10 10 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+6 6 6 22 22 22 58 58 58 150 121 62 206 145 10 234 174 13 -+242 186 14 246 186 14 246 190 14 246 190 14 246 190 14 246 190 14 -+246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 -+246 190 14 246 190 14 246 190 14 246 190 14 246 186 14 236 178 12 -+210 162 10 163 110 8 61 42 6 138 138 138 218 218 218 250 250 250 -+253 253 253 253 253 253 253 253 253 250 250 250 242 242 242 210 210 210 -+144 144 144 66 66 66 6 6 6 2 2 6 2 2 6 2 2 6 -+2 2 6 2 2 6 61 42 6 163 110 8 216 158 10 236 178 12 -+246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 -+246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 239 182 13 -+230 174 11 216 158 10 190 142 34 124 112 88 70 70 70 38 38 38 -+18 18 18 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+6 6 6 22 22 22 62 62 62 166 123 43 206 145 10 224 166 10 -+236 178 12 239 182 13 242 186 14 242 186 14 246 186 14 246 190 14 -+246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 -+246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 236 178 12 -+216 158 10 175 118 6 78 53 15 2 2 6 6 6 6 30 30 30 -+54 54 54 62 62 62 50 50 50 38 38 38 14 14 14 2 2 6 -+2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 -+2 2 6 6 6 6 78 53 15 167 114 7 213 154 11 236 178 12 -+246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 -+246 190 14 242 186 14 239 182 13 239 182 13 230 174 11 210 150 10 -+167 127 47 124 112 88 82 82 82 54 54 54 34 34 34 18 18 18 -+6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+6 6 6 18 18 18 50 50 50 157 117 39 192 133 9 200 144 11 -+216 158 10 219 162 10 224 166 10 226 170 11 230 174 11 236 178 12 -+239 182 13 239 182 13 242 186 14 246 186 14 246 190 14 246 190 14 -+246 190 14 246 190 14 246 190 14 246 190 14 246 186 14 230 174 11 -+210 150 10 163 110 8 104 69 6 10 10 10 2 2 6 2 2 6 -+2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 -+2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 -+2 2 6 6 6 6 85 60 19 167 114 7 206 145 10 230 174 11 -+242 186 14 246 190 14 246 190 14 246 190 14 246 186 14 242 186 14 -+239 182 13 230 174 11 224 166 10 213 154 11 180 133 36 124 112 88 -+86 86 86 58 58 58 38 38 38 22 22 22 10 10 10 6 6 6 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 14 14 14 34 34 34 70 70 70 141 109 45 157 117 39 -+167 114 7 180 123 7 192 133 9 197 138 11 200 144 11 206 145 10 -+213 154 11 219 162 10 224 166 10 230 174 11 239 182 13 242 186 14 -+246 186 14 246 186 14 246 186 14 246 186 14 239 182 13 216 158 10 -+185 133 11 152 99 6 104 69 6 18 14 6 2 2 6 2 2 6 -+2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 -+2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 -+2 2 6 6 6 6 78 53 15 152 99 6 192 133 9 219 162 10 -+236 178 12 239 182 13 246 186 14 242 186 14 239 182 13 236 178 12 -+224 166 10 206 145 10 192 133 9 150 121 62 94 94 94 62 62 62 -+42 42 42 22 22 22 14 14 14 6 6 6 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 6 6 6 18 18 18 34 34 34 58 58 58 78 78 78 -+101 98 89 124 112 88 141 109 45 156 107 11 163 110 8 167 114 7 -+175 118 6 180 123 7 185 133 11 197 138 11 210 150 10 219 162 10 -+226 170 11 236 178 12 236 178 12 234 174 13 219 162 10 197 138 11 -+163 110 8 137 92 6 85 60 19 10 10 10 2 2 6 2 2 6 -+18 18 18 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 -+38 38 38 38 38 38 38 38 38 38 38 38 26 26 26 2 2 6 -+2 2 6 6 6 6 61 42 6 137 92 6 175 118 6 200 144 11 -+219 162 10 230 174 11 234 174 13 230 174 11 219 162 10 210 150 10 -+192 133 9 163 110 8 124 112 88 82 82 82 50 50 50 30 30 30 -+14 14 14 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 6 6 6 14 14 14 22 22 22 34 34 34 -+42 42 42 58 58 58 74 74 74 86 86 86 101 98 89 119 100 63 -+125 96 44 121 87 25 137 92 6 152 99 6 163 110 8 180 123 7 -+185 133 11 197 138 11 206 145 10 200 144 11 180 123 7 156 107 11 -+137 92 6 104 69 6 45 32 11 54 54 54 108 105 106 101 98 89 -+86 86 86 82 82 82 78 78 78 78 78 78 78 78 78 78 78 78 -+78 78 78 78 78 78 78 78 78 82 82 82 86 86 86 94 94 94 -+106 106 106 101 101 101 86 66 32 116 81 8 156 107 11 180 123 7 -+192 133 9 200 144 11 206 145 10 200 144 11 192 133 9 175 118 6 -+138 101 21 109 101 93 70 70 70 42 42 42 22 22 22 10 10 10 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 6 6 6 10 10 10 -+14 14 14 22 22 22 30 30 30 38 38 38 50 50 50 62 62 62 -+74 74 74 90 90 90 101 98 89 119 103 79 121 87 25 116 81 8 -+137 92 6 152 99 6 152 99 6 152 99 6 137 92 6 116 81 8 -+104 69 6 86 66 32 101 98 89 82 82 82 58 58 58 46 46 46 -+38 38 38 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 -+34 34 34 34 34 34 34 34 34 34 34 34 38 38 38 42 42 42 -+54 54 54 82 82 82 97 87 74 85 60 19 137 92 6 156 107 11 -+167 114 7 175 118 6 175 118 6 167 114 7 152 99 6 121 87 25 -+101 98 89 62 62 62 34 34 34 18 18 18 6 6 6 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 6 6 6 6 6 6 10 10 10 18 18 18 22 22 22 -+30 30 30 42 42 42 50 50 50 66 66 66 86 86 86 101 98 89 -+104 86 63 104 69 6 104 69 6 104 69 6 104 69 6 85 60 19 -+86 66 32 90 90 90 62 62 62 38 38 38 22 22 22 14 14 14 -+10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 -+6 6 6 10 10 10 10 10 10 10 10 10 10 10 10 14 14 14 -+22 22 22 42 42 42 70 70 70 89 81 66 78 53 15 104 69 6 -+116 81 8 137 92 6 137 92 6 116 81 8 99 81 49 86 86 86 -+58 58 58 30 30 30 14 14 14 6 6 6 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 6 6 -+10 10 10 14 14 14 18 18 18 26 26 26 38 38 38 54 54 54 -+70 70 70 86 86 86 97 87 74 89 81 66 89 81 66 86 86 86 -+74 74 74 50 50 50 30 30 30 14 14 14 6 6 6 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+6 6 6 18 18 18 34 34 34 58 58 58 82 82 82 89 81 66 -+89 81 66 89 81 66 100 88 68 97 87 74 74 74 74 50 50 50 -+26 26 26 14 14 14 6 6 6 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 6 6 6 6 6 6 14 14 14 18 18 18 -+30 30 30 38 38 38 46 46 46 54 54 54 50 50 50 42 42 42 -+30 30 30 18 18 18 10 10 10 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 6 6 6 14 14 14 26 26 26 38 38 38 50 50 50 -+58 58 58 58 58 58 54 54 54 42 42 42 30 30 30 18 18 18 -+10 10 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 6 6 -+6 6 6 10 10 10 14 14 14 18 18 18 18 18 18 14 14 14 -+10 10 10 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 6 6 6 14 14 14 18 18 18 -+22 22 22 22 22 22 18 18 18 14 14 14 10 10 10 6 6 6 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -+0 0 0 0 0 0 -diff --git a/include/linux/linux_logo.h b/include/linux/linux_logo.h -index d4d5b93efe84..a9560bb676cb 100644 ---- a/include/linux/linux_logo.h -+++ b/include/linux/linux_logo.h -@@ -45,6 +45,7 @@ extern const struct linux_logo logo_superh_mono; - extern const struct linux_logo logo_superh_vga16; - extern const struct linux_logo logo_superh_clut224; - extern const struct linux_logo logo_spe_clut224; -+extern const struct linux_logo logo_beagle_clut224; - - extern const struct linux_logo *fb_find_logo(int depth); - #ifdef CONFIG_FB_LOGO_EXTRA --- -2.30.2 - diff --git a/patches/defconfig b/patches/defconfig index 7c9a65a88eddadabd2fe3bcad8ecec5e2bc896af..18215aa707e3d9e2d41f271bf24128f2bb445a56 100644 --- a/patches/defconfig +++ b/patches/defconfig @@ -1649,7 +1649,6 @@ CONFIG_CAN_RAW=m CONFIG_CAN_BCM=m CONFIG_CAN_GW=m CONFIG_CAN_J1939=m -CONFIG_CAN_ISOTP=m # # CAN Device Drivers @@ -4868,7 +4867,6 @@ CONFIG_LOGO=y CONFIG_LOGO_LINUX_MONO=y CONFIG_LOGO_LINUX_VGA16=y CONFIG_LOGO_LINUX_CLUT224=y -CONFIG_LOGO_BEAGLE_CLUT224=y # end of Graphics support CONFIG_SOUND=m diff --git a/patches/external/can_isotp/0001-merge-can-isotp-https-github.com-hartkopp-can-isotp.patch b/patches/external/can_isotp/0001-merge-can-isotp-https-github.com-hartkopp-can-isotp.patch deleted file mode 100644 index 126359e1215b405f0c9ecb6dd6c65d1763ba0b6d..0000000000000000000000000000000000000000 --- a/patches/external/can_isotp/0001-merge-can-isotp-https-github.com-hartkopp-can-isotp.patch +++ /dev/null @@ -1,1856 +0,0 @@ -From c041e3fba86b742743acc058f2f3b2c1e329a20c Mon Sep 17 00:00:00 2001 -From: Robert Nelson <robertcnelson@gmail.com> -Date: Fri, 17 Nov 2023 15:56:19 -0600 -Subject: [PATCH] merge: can-isotp: https://github.com/hartkopp/can-isotp - -https://github.com/hartkopp/can-isotp/commit/7626d0a0707391970080d493ce69638719938da7 -Signed-off-by: Robert Nelson <robertcnelson@gmail.com> ---- - include/uapi/linux/can/isotp.h | 151 +++ - net/can/isotp.c | 1676 ++++++++++++++++++++++++++++++++ - 2 files changed, 1827 insertions(+) - create mode 100644 include/uapi/linux/can/isotp.h - create mode 100644 net/can/isotp.c - -diff --git a/include/uapi/linux/can/isotp.h b/include/uapi/linux/can/isotp.h -new file mode 100644 -index 000000000000..209d707d2773 ---- /dev/null -+++ b/include/uapi/linux/can/isotp.h -@@ -0,0 +1,151 @@ -+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ -+/* -+ * socketcan/can/isotp.h -+ * -+ * Definitions for isotp CAN sockets -+ * -+ * Author: Oliver Hartkopp <oliver.hartkopp@volkswagen.de> -+ * Copyright (c) 2008 Volkswagen Group Electronic Research -+ * All rights reserved. -+ * -+ * Send feedback to <socketcan-users@lists.berlios.de> -+ * -+ */ -+ -+#ifndef CAN_ISOTP_H -+#define CAN_ISOTP_H -+ -+#include <linux/can.h> -+ -+#define SOL_CAN_ISOTP (SOL_CAN_BASE + CAN_ISOTP) -+ -+/* for socket options affecting the socket (not the global system) */ -+ -+#define CAN_ISOTP_OPTS 1 /* pass struct can_isotp_options */ -+ -+#define CAN_ISOTP_RECV_FC 2 /* pass struct can_isotp_fc_options */ -+ -+/* sockopts to force stmin timer values for protocol regression tests */ -+ -+#define CAN_ISOTP_TX_STMIN 3 /* pass __u32 value in nano secs */ -+ /* use this time instead of value */ -+ /* provided in FC from the receiver */ -+ -+#define CAN_ISOTP_RX_STMIN 4 /* pass __u32 value in nano secs */ -+ /* ignore received CF frames which */ -+ /* timestamps differ less than val */ -+ -+#define CAN_ISOTP_LL_OPTS 5 /* pass struct can_isotp_ll_options */ -+ -+struct can_isotp_options { -+ -+ __u32 flags; /* set flags for isotp behaviour. */ -+ /* __u32 value : flags see below */ -+ -+ __u32 frame_txtime; /* frame transmission time (N_As/N_Ar) */ -+ /* __u32 value : time in nano secs */ -+ -+ __u8 ext_address; /* set address for extended addressing */ -+ /* __u8 value : extended address */ -+ -+ __u8 txpad_content; /* set content of padding byte (tx) */ -+ /* __u8 value : content on tx path */ -+ -+ __u8 rxpad_content; /* set content of padding byte (rx) */ -+ /* __u8 value : content on rx path */ -+ -+ __u8 rx_ext_address; /* set address for extended addressing */ -+ /* __u8 value : extended address (rx) */ -+}; -+ -+struct can_isotp_fc_options { -+ -+ __u8 bs; /* blocksize provided in FC frame */ -+ /* __u8 value : blocksize. 0 = off */ -+ -+ __u8 stmin; /* separation time provided in FC frame */ -+ /* __u8 value : */ -+ /* 0x00 - 0x7F : 0 - 127 ms */ -+ /* 0x80 - 0xF0 : reserved */ -+ /* 0xF1 - 0xF9 : 100 us - 900 us */ -+ /* 0xFA - 0xFF : reserved */ -+ -+ __u8 wftmax; /* max. number of wait frame transmiss. */ -+ /* __u8 value : 0 = omit FC N_PDU WT */ -+}; -+ -+struct can_isotp_ll_options { -+ -+ __u8 mtu; /* generated & accepted CAN frame type */ -+ /* __u8 value : */ -+ /* CAN_MTU (16) -> standard CAN 2.0 */ -+ /* CANFD_MTU (72) -> CAN FD frame */ -+ -+ __u8 tx_dl; /* tx link layer data length in bytes */ -+ /* (configured maximum payload length) */ -+ /* __u8 value : 8,12,16,20,24,32,48,64 */ -+ /* => rx path supports all LL_DL values */ -+ -+ __u8 tx_flags; /* set into struct canfd_frame.flags */ -+ /* at frame creation: e.g. CANFD_BRS */ -+ /* Obsolete when the BRS flag is fixed */ -+ /* by the CAN netdriver configuration */ -+}; -+ -+/* flags for isotp behaviour */ -+ -+#define CAN_ISOTP_LISTEN_MODE 0x001 /* listen only (do not send FC) */ -+#define CAN_ISOTP_EXTEND_ADDR 0x002 /* enable extended addressing */ -+#define CAN_ISOTP_TX_PADDING 0x004 /* enable CAN frame padding tx path */ -+#define CAN_ISOTP_RX_PADDING 0x008 /* enable CAN frame padding rx path */ -+#define CAN_ISOTP_CHK_PAD_LEN 0x010 /* check received CAN frame padding */ -+#define CAN_ISOTP_CHK_PAD_DATA 0x020 /* check received CAN frame padding */ -+#define CAN_ISOTP_HALF_DUPLEX 0x040 /* half duplex error state handling */ -+#define CAN_ISOTP_FORCE_TXSTMIN 0x080 /* ignore stmin from received FC */ -+#define CAN_ISOTP_FORCE_RXSTMIN 0x100 /* ignore CFs depending on rx stmin */ -+#define CAN_ISOTP_RX_EXT_ADDR 0x200 /* different rx extended addressing */ -+#define CAN_ISOTP_WAIT_TX_DONE 0x400 /* wait for tx completion */ -+#define CAN_ISOTP_SF_BROADCAST 0x800 /* 1-to-N functional addressing */ -+ -+/* protocol machine default values */ -+ -+#define CAN_ISOTP_DEFAULT_FLAGS 0 -+#define CAN_ISOTP_DEFAULT_EXT_ADDRESS 0x00 -+#define CAN_ISOTP_DEFAULT_PAD_CONTENT 0xCC /* prevent bit-stuffing */ -+#define CAN_ISOTP_DEFAULT_FRAME_TXTIME 50000 /* 50 micro seconds */ -+#define CAN_ISOTP_DEFAULT_RECV_BS 0 -+#define CAN_ISOTP_DEFAULT_RECV_STMIN 0x00 -+#define CAN_ISOTP_DEFAULT_RECV_WFTMAX 0 -+ -+/* -+ * Remark on CAN_ISOTP_DEFAULT_RECV_* values: -+ * -+ * We can strongly assume, that the Linux Kernel implementation of -+ * CAN_ISOTP is capable to run with BS=0, STmin=0 and WFTmax=0. -+ * But as we like to be able to behave as a commonly available ECU, -+ * these default settings can be changed via sockopts. -+ * For that reason the STmin value is intentionally _not_ checked for -+ * consistency and copied directly into the flow control (FC) frame. -+ */ -+ -+/* link layer default values => make use of Classical CAN frames */ -+ -+#define CAN_ISOTP_DEFAULT_LL_MTU CAN_MTU -+#define CAN_ISOTP_DEFAULT_LL_TX_DL CAN_MAX_DLEN -+#define CAN_ISOTP_DEFAULT_LL_TX_FLAGS 0 -+ -+/* -+ * The CAN_ISOTP_DEFAULT_FRAME_TXTIME has become a non-zero value as -+ * it only makes sense for isotp implementation tests to run without -+ * a N_As value. As user space applications usually do not set the -+ * frame_txtime element of struct can_isotp_options the new in-kernel -+ * default is very likely overwritten with zero when the sockopt() -+ * CAN_ISOTP_OPTS is invoked. -+ * To make sure that a N_As value of zero is only set intentional the -+ * value '0' is now interpreted as 'do not change the current value'. -+ * When a frame_txtime of zero is required for testing purposes this -+ * CAN_ISOTP_FRAME_TXTIME_ZERO u32 value has to be set in frame_txtime. -+ */ -+#define CAN_ISOTP_FRAME_TXTIME_ZERO 0xFFFFFFFF -+ -+#endif -diff --git a/net/can/isotp.c b/net/can/isotp.c -new file mode 100644 -index 000000000000..09ab810d7bc5 ---- /dev/null -+++ b/net/can/isotp.c -@@ -0,0 +1,1676 @@ -+// SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) -+/* isotp.c - ISO 15765-2 CAN transport protocol for protocol family CAN -+ * -+ * WARNING: This is ALPHA code for discussions and first tests that should -+ * not be used in production environments. -+ * -+ * In the discussion the Socket-API to the userspace or the ISO-TP socket -+ * options or the return values we may change! Current behaviour: -+ * -+ * - no ISO-TP specific return values are provided to the userspace -+ * - when a transfer (tx) is on the run the next write() blocks until it's done -+ * - no support for sending wait frames to the data source in the rx path -+ * -+ * Copyright (c) 2020 Volkswagen Group Electronic Research -+ * All rights reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * 1. Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * 2. Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in the -+ * documentation and/or other materials provided with the distribution. -+ * 3. Neither the name of Volkswagen nor the names of its contributors -+ * may be used to endorse or promote products derived from this software -+ * without specific prior written permission. -+ * -+ * Alternatively, provided that this notice is retained in full, this -+ * software may be distributed under the terms of the GNU General -+ * Public License ("GPL") version 2, in which case the provisions of the -+ * GPL apply INSTEAD OF those given above. -+ * -+ * The provided data structures and external interfaces from this code -+ * are not restricted to be used by modules with a GPL compatible license. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -+ * DAMAGE. -+ */ -+ -+#include <linux/module.h> -+#include <linux/version.h> -+#include <linux/init.h> -+#include <linux/interrupt.h> -+#include <linux/spinlock.h> -+#include <linux/hrtimer.h> -+#include <linux/wait.h> -+#include <linux/uio.h> -+#include <linux/net.h> -+#include <linux/netdevice.h> -+#include <linux/socket.h> -+#include <linux/if_arp.h> -+#include <linux/skbuff.h> -+#include <linux/can.h> -+#include <linux/can/core.h> -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0) -+#include <linux/can/skb.h> -+#define CAN_SKBRES sizeof(struct can_skb_priv) -+#else -+#define CAN_SKBRES 0 -+#endif -+#include <linux/can/isotp.h> -+#include <net/sock.h> -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) -+#include <net/net_namespace.h> -+#endif -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25) -+#include "compat.h" -+#endif -+ -+#define CAN_ISOTP_VERSION "20220520 - out-of-tree" -+ -+MODULE_DESCRIPTION("PF_CAN isotp 15765-2:2016 protocol"); -+MODULE_LICENSE("Dual BSD/GPL"); -+MODULE_AUTHOR("Oliver Hartkopp <socketcan@hartkopp.net>"); -+MODULE_ALIAS("can-proto-6"); -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22) -+#error This modules needs hrtimers (available since Kernel 2.6.22) -+#endif -+ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0) -+#error No need to compile this out-of-tree driver! ISO-TP is part of Linux Mainline kernel since Linux 5.10. -+#endif -+ -+#define DBG(fmt, args...) (printk( KERN_DEBUG "can-isotp: %s: " fmt, \ -+ __func__, ##args)) -+#undef DBG -+#define DBG(fmt, args...) -+ -+#define ISOTP_REQUIRED_SIZE(struct_type, member) \ -+ (offsetof(typeof(struct_type), member) + \ -+ sizeof(((typeof(struct_type) *)(NULL))->member)) -+ -+#define ISOTP_MIN_NAMELEN ISOTP_REQUIRED_SIZE(struct sockaddr_can, can_addr.tp) -+ -+#define SINGLE_MASK(id) (((id) & CAN_EFF_FLAG) ? \ -+ (CAN_EFF_MASK | CAN_EFF_FLAG | CAN_RTR_FLAG) : \ -+ (CAN_SFF_MASK | CAN_EFF_FLAG | CAN_RTR_FLAG)) -+ -+/* ISO 15765-2:2016 supports more than 4095 byte per ISO PDU as the FF_DL can -+ * take full 32 bit values (4 Gbyte). We would need some good concept to handle -+ * this between user space and kernel space. For now increase the static buffer -+ * to something about 64 kbyte to be able to test this new functionality. -+ */ -+#define MAX_MSG_LENGTH 66000 -+ -+/* N_PCI type values in bits 7-4 of N_PCI bytes */ -+#define N_PCI_SF 0x00 /* single frame */ -+#define N_PCI_FF 0x10 /* first frame */ -+#define N_PCI_CF 0x20 /* consecutive frame */ -+#define N_PCI_FC 0x30 /* flow control */ -+ -+#define N_PCI_SZ 1 /* size of the PCI byte #1 */ -+#define SF_PCI_SZ4 1 /* size of SingleFrame PCI including 4 bit SF_DL */ -+#define SF_PCI_SZ8 2 /* size of SingleFrame PCI including 8 bit SF_DL */ -+#define FF_PCI_SZ12 2 /* size of FirstFrame PCI including 12 bit FF_DL */ -+#define FF_PCI_SZ32 6 /* size of FirstFrame PCI including 32 bit FF_DL */ -+#define FC_CONTENT_SZ 3 /* flow control content size in byte (FS/BS/STmin) */ -+ -+#define ISOTP_CHECK_PADDING (CAN_ISOTP_CHK_PAD_LEN | CAN_ISOTP_CHK_PAD_DATA) -+ -+/* Flow Status given in FC frame */ -+#define ISOTP_FC_CTS 0 /* clear to send */ -+#define ISOTP_FC_WT 1 /* wait */ -+#define ISOTP_FC_OVFLW 2 /* overflow */ -+ -+enum { -+ ISOTP_IDLE = 0, -+ ISOTP_WAIT_FIRST_FC, -+ ISOTP_WAIT_FC, -+ ISOTP_WAIT_DATA, -+ ISOTP_SENDING -+}; -+ -+struct tpcon { -+ unsigned int idx; -+ unsigned int len; -+ u32 state; -+ u8 bs; -+ u8 sn; -+ u8 ll_dl; -+ u8 buf[MAX_MSG_LENGTH + 1]; -+}; -+ -+struct isotp_sock { -+ struct sock sk; -+ int bound; -+ int ifindex; -+ canid_t txid; -+ canid_t rxid; -+ ktime_t tx_gap; -+ ktime_t lastrxcf_tstamp; -+ struct hrtimer rxtimer, txtimer; -+ struct tasklet_struct txtsklet; -+ struct can_isotp_options opt; -+ struct can_isotp_fc_options rxfc, txfc; -+ struct can_isotp_ll_options ll; -+ u32 frame_txtime; -+ u32 force_tx_stmin; -+ u32 force_rx_stmin; -+ struct tpcon rx, tx; -+ struct list_head notifier; -+ wait_queue_head_t wait; -+ spinlock_t rx_lock; /* protect single thread state machine */ -+}; -+ -+static LIST_HEAD(isotp_notifier_list); -+static DEFINE_SPINLOCK(isotp_notifier_lock); -+static struct isotp_sock *isotp_busy_notifier; -+ -+static inline struct isotp_sock *isotp_sk(const struct sock *sk) -+{ -+ return (struct isotp_sock *)sk; -+} -+ -+static enum hrtimer_restart isotp_rx_timer_handler(struct hrtimer *hrtimer) -+{ -+ struct isotp_sock *so = container_of(hrtimer, struct isotp_sock, -+ rxtimer); -+ if (so->rx.state == ISOTP_WAIT_DATA) { -+ DBG("we did not get new data frames in time.\n"); -+ -+ /* reset tx state */ -+ so->rx.state = ISOTP_IDLE; -+ } -+ -+ return HRTIMER_NORESTART; -+} -+ -+static void isotp_skb_reserve(struct sk_buff *skb, struct net_device *dev) -+{ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0) -+ can_skb_reserve(skb); -+ can_skb_prv(skb)->ifindex = dev->ifindex; -+#endif -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,5) -+ can_skb_prv(skb)->skbcnt = 0; -+#endif -+} -+ -+static void isotp_skb_destructor(struct sk_buff *skb) -+{ -+ sock_put(skb->sk); -+} -+ -+static inline void isotp_skb_set_owner(struct sk_buff *skb, struct sock *sk) -+{ -+ if (sk) { -+ sock_hold(sk); -+ skb->destructor = isotp_skb_destructor; -+ skb->sk = sk; -+ } -+} -+ -+static int isotp_send_fc(struct sock *sk, int ae, u8 flowstatus) -+{ -+ struct net_device *dev; -+ struct sk_buff *nskb; -+ struct canfd_frame *ncf; -+ struct isotp_sock *so = isotp_sk(sk); -+ -+ nskb = alloc_skb(so->ll.mtu + CAN_SKBRES, gfp_any()); -+ if (!nskb) -+ return 1; -+ -+ dev = dev_get_by_index(sock_net(sk), so->ifindex); -+ if (!dev) { -+ kfree_skb(nskb); -+ return 1; -+ } -+ isotp_skb_reserve(nskb, dev); -+ nskb->dev = dev; -+ isotp_skb_set_owner(nskb, sk); -+ ncf = (struct canfd_frame *) nskb->data; -+ skb_put(nskb, so->ll.mtu); -+ memset(ncf, 0, so->ll.mtu); -+ -+ /* create & send flow control reply */ -+ ncf->can_id = so->txid; -+ -+ if (so->opt.flags & CAN_ISOTP_TX_PADDING) { -+ memset(ncf->data, so->opt.txpad_content, CAN_MAX_DLEN); -+ ncf->len = CAN_MAX_DLEN; -+ } else { -+ ncf->len = ae + FC_CONTENT_SZ; -+ } -+ -+ ncf->data[ae] = N_PCI_FC | flowstatus; -+ ncf->data[ae + 1] = so->rxfc.bs; -+ ncf->data[ae + 2] = so->rxfc.stmin; -+ -+ if (ae) -+ ncf->data[0] = so->opt.ext_address; -+ -+ ncf->flags = so->ll.tx_flags; -+ -+ can_send(nskb, 1); -+ dev_put(dev); -+ -+ /* reset blocksize counter */ -+ so->rx.bs = 0; -+ -+ /* reset last CF frame rx timestamp for rx stmin enforcement */ -+ so->lastrxcf_tstamp = ktime_set(0, 0); -+ -+ /* start rx timeout watchdog */ -+ hrtimer_start(&so->rxtimer, ktime_set(1, 0), HRTIMER_MODE_REL); -+ return 0; -+} -+ -+static void isotp_rcv_skb(struct sk_buff *skb, struct sock *sk) -+{ -+ struct sockaddr_can *addr = (struct sockaddr_can *)skb->cb; -+ -+ BUILD_BUG_ON(sizeof(skb->cb) < sizeof(struct sockaddr_can)); -+ -+ memset(addr, 0, sizeof(*addr)); -+ addr->can_family = AF_CAN; -+ addr->can_ifindex = skb->dev->ifindex; -+ -+ if (sock_queue_rcv_skb(sk, skb) < 0) -+ kfree_skb(skb); -+} -+ -+static u8 padlen(u8 datalen) -+{ -+ const u8 plen[] = {8, 8, 8, 8, 8, 8, 8, 8, 8, /* 0 - 8 */ -+ 12, 12, 12, 12, /* 9 - 12 */ -+ 16, 16, 16, 16, /* 13 - 16 */ -+ 20, 20, 20, 20, /* 17 - 20 */ -+ 24, 24, 24, 24, /* 21 - 24 */ -+ 32, 32, 32, 32, 32, 32, 32, 32, /* 25 - 32 */ -+ 48, 48, 48, 48, 48, 48, 48, 48, /* 33 - 40 */ -+ 48, 48, 48, 48, 48, 48, 48, 48}; /* 41 - 48 */ -+ -+ if (datalen > 48) -+ return 64; -+ -+ return plen[datalen]; -+} -+ -+/* check for length optimization and return 1/true when the check fails */ -+static int check_optimized(struct canfd_frame *cf, int start_index) -+{ -+ /* for CAN_DL <= 8 the start_index is equal to the CAN_DL as the -+ * padding would start at this point. E.g. if the padding would -+ * start at cf.data[7] cf->len has to be 7 to be optimal. -+ * Note: The data[] index starts with zero. -+ */ -+ if (cf->len <= CAN_MAX_DLEN) -+ return (cf->len != start_index); -+ -+ /* This relation is also valid in the non-linear DLC range, where -+ * we need to take care of the minimal next possible CAN_DL. -+ * The correct check would be (padlen(cf->len) != padlen(start_index)). -+ * But as cf->len can only take discrete values from 12, .., 64 at this -+ * point the padlen(cf->len) is always equal to cf->len. -+ */ -+ return (cf->len != padlen(start_index)); -+} -+ -+/* check padding and return 1/true when the check fails */ -+static int check_pad(struct isotp_sock *so, struct canfd_frame *cf, -+ int start_index, u8 content) -+{ -+ int i; -+ -+ /* no RX_PADDING value => check length of optimized frame length */ -+ if (!(so->opt.flags & CAN_ISOTP_RX_PADDING)) { -+ if (so->opt.flags & CAN_ISOTP_CHK_PAD_LEN) -+ return check_optimized(cf, start_index); -+ -+ /* no valid test against empty value => ignore frame */ -+ return 1; -+ } -+ -+ /* check datalength of correctly padded CAN frame */ -+ if ((so->opt.flags & CAN_ISOTP_CHK_PAD_LEN) && -+ cf->len != padlen(cf->len)) -+ return 1; -+ -+ /* check padding content */ -+ if (so->opt.flags & CAN_ISOTP_CHK_PAD_DATA) { -+ for (i = start_index; i < cf->len; i++) -+ if (cf->data[i] != content) -+ return 1; -+ } -+ return 0; -+} -+ -+static int isotp_rcv_fc(struct isotp_sock *so, struct canfd_frame *cf, int ae) -+{ -+ if (so->tx.state != ISOTP_WAIT_FC && -+ so->tx.state != ISOTP_WAIT_FIRST_FC) -+ return 0; -+ -+ hrtimer_cancel(&so->txtimer); -+ -+ if ((cf->len < ae + FC_CONTENT_SZ) || -+ ((so->opt.flags & ISOTP_CHECK_PADDING) && -+ check_pad(so, cf, ae + FC_CONTENT_SZ, so->opt.rxpad_content))) { -+ so->tx.state = ISOTP_IDLE; -+ wake_up_interruptible(&so->wait); -+ return 1; -+ } -+ -+ /* get communication parameters only from the first FC frame */ -+ if (so->tx.state == ISOTP_WAIT_FIRST_FC) { -+ so->txfc.bs = cf->data[ae + 1]; -+ so->txfc.stmin = cf->data[ae + 2]; -+ -+ /* fix wrong STmin values according spec */ -+ if (so->txfc.stmin > 0x7F && -+ (so->txfc.stmin < 0xF1 || so->txfc.stmin > 0xF9)) -+ so->txfc.stmin = 0x7F; -+ -+ so->tx_gap = ktime_set(0, 0); -+ /* add transmission time for CAN frame N_As */ -+ so->tx_gap = ktime_add_ns(so->tx_gap, so->frame_txtime); -+ /* add waiting time for consecutive frames N_Cs */ -+ if (so->opt.flags & CAN_ISOTP_FORCE_TXSTMIN) -+ so->tx_gap = ktime_add_ns(so->tx_gap, -+ so->force_tx_stmin); -+ else if (so->txfc.stmin < 0x80) -+ so->tx_gap = ktime_add_ns(so->tx_gap, -+ so->txfc.stmin * 1000000); -+ else -+ so->tx_gap = ktime_add_ns(so->tx_gap, -+ (so->txfc.stmin - 0xF0) -+ * 100000); -+ so->tx.state = ISOTP_WAIT_FC; -+ } -+ -+ DBG("FC frame: FS %d, BS %d, STmin 0x%02X, tx_gap %lld\n", -+ cf->data[ae] & 0x0F & 0x0F, so->txfc.bs, so->txfc.stmin, -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0) -+ (long long)so->tx_gap); -+#else -+ (long long)so->tx_gap.tv64); -+#endif -+ -+ switch (cf->data[ae] & 0x0F) { -+ case ISOTP_FC_CTS: -+ so->tx.bs = 0; -+ so->tx.state = ISOTP_SENDING; -+ DBG("starting txtimer for sending\n"); -+ /* start cyclic timer for sending CF frame */ -+ hrtimer_start(&so->txtimer, so->tx_gap, -+ HRTIMER_MODE_REL); -+ break; -+ -+ case ISOTP_FC_WT: -+ DBG("starting waiting for next FC\n"); -+ /* start timer to wait for next FC frame */ -+ hrtimer_start(&so->txtimer, ktime_set(1,0), -+ HRTIMER_MODE_REL); -+ break; -+ -+ case ISOTP_FC_OVFLW: -+ DBG("overflow in receiver side\n"); -+ -+ default: -+ /* stop this tx job */ -+ so->tx.state = ISOTP_IDLE; -+ wake_up_interruptible(&so->wait); -+ } -+ return 0; -+} -+ -+static int isotp_rcv_sf(struct sock *sk, struct canfd_frame *cf, int pcilen, -+ struct sk_buff *skb, int len) -+{ -+ struct isotp_sock *so = isotp_sk(sk); -+ struct sk_buff *nskb; -+ -+ hrtimer_cancel(&so->rxtimer); -+ so->rx.state = ISOTP_IDLE; -+ -+ if (!len || len > cf->len - pcilen) -+ return 1; -+ -+ if ((so->opt.flags & ISOTP_CHECK_PADDING) && -+ check_pad(so, cf, pcilen + len, so->opt.rxpad_content)) { -+ return 1; -+ } -+ -+ nskb = alloc_skb(len, gfp_any()); -+ if (!nskb) -+ return 1; -+ -+ memcpy(skb_put(nskb, len), &cf->data[pcilen], len); -+ -+ nskb->tstamp = skb->tstamp; -+ nskb->dev = skb->dev; -+ isotp_rcv_skb(nskb, sk); -+ return 0; -+} -+ -+static int isotp_rcv_ff(struct sock *sk, struct canfd_frame *cf, int ae) -+{ -+ struct isotp_sock *so = isotp_sk(sk); -+ int i; -+ int off; -+ int ff_pci_sz; -+ -+ hrtimer_cancel(&so->rxtimer); -+ so->rx.state = ISOTP_IDLE; -+ -+ /* get the used sender LL_DL from the (first) CAN frame data length */ -+ so->rx.ll_dl = padlen(cf->len); -+ -+ /* the first frame has to use the entire frame up to LL_DL length */ -+ if (cf->len != so->rx.ll_dl) -+ return 1; -+ -+ /* get the FF_DL */ -+ so->rx.len = (cf->data[ae] & 0x0F) << 8; -+ so->rx.len += cf->data[ae + 1]; -+ -+ /* Check for FF_DL escape sequence supporting 32 bit PDU length */ -+ if (so->rx.len) { -+ ff_pci_sz = FF_PCI_SZ12; -+ } else { -+ /* FF_DL = 0 => get real length from next 4 bytes */ -+ so->rx.len = cf->data[ae + 2] << 24; -+ so->rx.len += cf->data[ae + 3] << 16; -+ so->rx.len += cf->data[ae + 4] << 8; -+ so->rx.len += cf->data[ae + 5]; -+ ff_pci_sz = FF_PCI_SZ32; -+ } -+ -+ /* take care of a potential SF_DL ESC offset for TX_DL > 8 */ -+ off = (so->rx.ll_dl > CAN_MAX_DLEN) ? 1 : 0; -+ -+ if (so->rx.len + ae + off + ff_pci_sz < so->rx.ll_dl) -+ return 1; -+ -+ if (so->rx.len > MAX_MSG_LENGTH) { -+ /* send FC frame with overflow status */ -+ isotp_send_fc(sk, ae, ISOTP_FC_OVFLW); -+ return 1; -+ } -+ -+ /* copy the first received data bytes */ -+ so->rx.idx = 0; -+ for (i = ae + ff_pci_sz; i < so->rx.ll_dl; i++) -+ so->rx.buf[so->rx.idx++] = cf->data[i]; -+ -+ /* initial setup for this pdu reception */ -+ so->rx.sn = 1; -+ so->rx.state = ISOTP_WAIT_DATA; -+ -+ /* no creation of flow control frames */ -+ if (so->opt.flags & CAN_ISOTP_LISTEN_MODE) -+ return 0; -+ -+ /* send our first FC frame */ -+ isotp_send_fc(sk, ae, ISOTP_FC_CTS); -+ return 0; -+} -+ -+static int isotp_rcv_cf(struct sock *sk, struct canfd_frame *cf, int ae, -+ struct sk_buff *skb) -+{ -+ struct isotp_sock *so = isotp_sk(sk); -+ struct sk_buff *nskb; -+ int i; -+ -+ if (so->rx.state != ISOTP_WAIT_DATA) -+ return 0; -+ -+ /* drop if timestamp gap is less than force_rx_stmin nano secs */ -+ if (so->opt.flags & CAN_ISOTP_FORCE_RXSTMIN) { -+ if (ktime_to_ns(ktime_sub(skb->tstamp, so->lastrxcf_tstamp)) < -+ so->force_rx_stmin) -+ return 0; -+ -+ so->lastrxcf_tstamp = skb->tstamp; -+ } -+ -+ hrtimer_cancel(&so->rxtimer); -+ -+ /* CFs are never longer than the FF */ -+ if (cf->len > so->rx.ll_dl) -+ return 1; -+ -+ /* CFs have usually the LL_DL length */ -+ if (cf->len < so->rx.ll_dl) { -+ /* this is only allowed for the last CF */ -+ if (so->rx.len - so->rx.idx > so->rx.ll_dl - ae - N_PCI_SZ) -+ return 1; -+ } -+ -+ if ((cf->data[ae] & 0x0F) != so->rx.sn) { -+ DBG("wrong sn %d. expected %d.\n", -+ cf->data[ae] & 0x0F, so->rx.sn); -+ /* some error reporting? */ -+ so->rx.state = ISOTP_IDLE; -+ return 1; -+ } -+ so->rx.sn++; -+ so->rx.sn %= 16; -+ -+ for (i = ae + N_PCI_SZ; i < cf->len; i++) { -+ so->rx.buf[so->rx.idx++] = cf->data[i]; -+ if (so->rx.idx >= so->rx.len) -+ break; -+ } -+ -+ if (so->rx.idx >= so->rx.len) { -+ /* we are done */ -+ so->rx.state = ISOTP_IDLE; -+ -+ if ((so->opt.flags & ISOTP_CHECK_PADDING) && -+ check_pad(so, cf, i + 1, so->opt.rxpad_content)) { -+ return 1; -+ } -+ -+ nskb = alloc_skb(so->rx.len, gfp_any()); -+ if (!nskb) -+ return 1; -+ -+ memcpy(skb_put(nskb, so->rx.len), so->rx.buf, -+ so->rx.len); -+ -+ nskb->tstamp = skb->tstamp; -+ nskb->dev = skb->dev; -+ isotp_rcv_skb(nskb, sk); -+ return 0; -+ } -+ -+ /* perform blocksize handling, if enabled */ -+ if (!so->rxfc.bs || ++so->rx.bs < so->rxfc.bs) { -+ /* start rx timeout watchdog */ -+ hrtimer_start(&so->rxtimer, ktime_set(1, 0), -+ HRTIMER_MODE_REL); -+ return 0; -+ } -+ -+ /* no creation of flow control frames */ -+ if (so->opt.flags & CAN_ISOTP_LISTEN_MODE) -+ return 0; -+ -+ /* we reached the specified blocksize so->rxfc.bs */ -+ isotp_send_fc(sk, ae, ISOTP_FC_CTS); -+ return 0; -+} -+ -+static void isotp_rcv(struct sk_buff *skb, void *data) -+{ -+ struct sock *sk = (struct sock *)data; -+ struct isotp_sock *so = isotp_sk(sk); -+ struct canfd_frame *cf; -+ int ae = (so->opt.flags & CAN_ISOTP_EXTEND_ADDR) ? 1 : 0; -+ u8 n_pci_type, sf_dl; -+ -+ /* Strictly receive only frames with the configured MTU size -+ * => clear separation of CAN2.0 / CAN FD transport channels -+ */ -+ if (skb->len != so->ll.mtu) -+ return; -+ -+ cf = (struct canfd_frame *)skb->data; -+ -+ /* if enabled: check reception of my configured extended address */ -+ if (ae && cf->data[0] != so->opt.rx_ext_address) -+ return; -+ -+ n_pci_type = cf->data[ae] & 0xF0; -+ -+ /* Make sure the state changes and data structures stay consistent at -+ * CAN frame reception time. This locking is not needed in real world -+ * use cases but the inconsistency can be triggered with syzkaller. -+ */ -+ spin_lock(&so->rx_lock); -+ -+ if (so->opt.flags & CAN_ISOTP_HALF_DUPLEX) { -+ /* check rx/tx path half duplex expectations */ -+ if ((so->tx.state != ISOTP_IDLE && n_pci_type != N_PCI_FC) || -+ (so->rx.state != ISOTP_IDLE && n_pci_type == N_PCI_FC)) -+ goto out_unlock; -+ } -+ -+ switch (n_pci_type) { -+ case N_PCI_FC: -+ /* tx path: flow control frame containing the FC parameters */ -+ isotp_rcv_fc(so, cf, ae); -+ break; -+ -+ case N_PCI_SF: -+ /* rx path: single frame -+ * -+ * As we do not have a rx.ll_dl configuration, we can only test -+ * if the CAN frames payload length matches the LL_DL == 8 -+ * requirements - no matter if it's CAN 2.0 or CAN FD -+ */ -+ -+ /* get the SF_DL from the N_PCI byte */ -+ sf_dl = cf->data[ae] & 0x0F; -+ -+ if (cf->len <= CAN_MAX_DLEN) { -+ isotp_rcv_sf(sk, cf, SF_PCI_SZ4 + ae, skb, sf_dl); -+ } else { -+ if (skb->len == CANFD_MTU) { -+ /* We have a CAN FD frame and CAN_DL is greater than 8: -+ * Only frames with the SF_DL == 0 ESC value are valid. -+ * -+ * If so take care of the increased SF PCI size -+ * (SF_PCI_SZ8) to point to the message content behind -+ * the extended SF PCI info and get the real SF_DL -+ * length value from the formerly first data byte. -+ */ -+ if (sf_dl == 0) -+ isotp_rcv_sf(sk, cf, SF_PCI_SZ8 + ae, skb, -+ cf->data[SF_PCI_SZ4 + ae]); -+ } -+ } -+ break; -+ -+ case N_PCI_FF: -+ /* rx path: first frame */ -+ isotp_rcv_ff(sk, cf, ae); -+ break; -+ -+ case N_PCI_CF: -+ /* rx path: consecutive frame */ -+ isotp_rcv_cf(sk, cf, ae, skb); -+ break; -+ } -+ -+out_unlock: -+ spin_unlock(&so->rx_lock); -+} -+ -+static void isotp_fill_dataframe(struct canfd_frame *cf, struct isotp_sock *so, -+ int ae, int off) -+{ -+ int pcilen = N_PCI_SZ + ae + off; -+ int space = so->tx.ll_dl - pcilen; -+ int num = min_t(int, so->tx.len - so->tx.idx, space); -+ int i; -+ -+ cf->can_id = so->txid; -+ cf->len = num + pcilen; -+ -+ if (num < space) { -+ if (so->opt.flags & CAN_ISOTP_TX_PADDING) { -+ /* user requested padding */ -+ cf->len = padlen(cf->len); -+ memset(cf->data, so->opt.txpad_content, cf->len); -+ } else if (cf->len > CAN_MAX_DLEN) { -+ /* mandatory padding for CAN FD frames */ -+ cf->len = padlen(cf->len); -+ memset(cf->data, CAN_ISOTP_DEFAULT_PAD_CONTENT, -+ cf->len); -+ } -+ } -+ -+ for (i = 0; i < num; i++) -+ cf->data[pcilen + i] = so->tx.buf[so->tx.idx++]; -+ -+ if (ae) -+ cf->data[0] = so->opt.ext_address; -+} -+ -+static void isotp_create_fframe(struct canfd_frame *cf, struct isotp_sock *so, -+ int ae) -+{ -+ int i; -+ int ff_pci_sz; -+ -+ cf->can_id = so->txid; -+ cf->len = so->tx.ll_dl; -+ if (ae) -+ cf->data[0] = so->opt.ext_address; -+ -+ /* create N_PCI bytes with 12/32 bit FF_DL data length */ -+ if (so->tx.len > 4095) { -+ /* use 32 bit FF_DL notation */ -+ cf->data[ae] = N_PCI_FF; -+ cf->data[ae + 1] = 0; -+ cf->data[ae + 2] = (u8)(so->tx.len >> 24) & 0xFFU; -+ cf->data[ae + 3] = (u8)(so->tx.len >> 16) & 0xFFU; -+ cf->data[ae + 4] = (u8)(so->tx.len >> 8) & 0xFFU; -+ cf->data[ae + 5] = (u8)so->tx.len & 0xFFU; -+ ff_pci_sz = FF_PCI_SZ32; -+ } else { -+ /* use 12 bit FF_DL notation */ -+ cf->data[ae] = (u8)(so->tx.len >> 8) | N_PCI_FF; -+ cf->data[ae + 1] = (u8)so->tx.len & 0xFFU; -+ ff_pci_sz = FF_PCI_SZ12; -+ } -+ -+ /* add first data bytes depending on ae */ -+ for (i = ae + ff_pci_sz; i < so->tx.ll_dl; i++) -+ cf->data[i] = so->tx.buf[so->tx.idx++]; -+ -+ so->tx.sn = 1; -+ so->tx.state = ISOTP_WAIT_FIRST_FC; -+} -+ -+static void isotp_tx_timer_tsklet(unsigned long data) -+{ -+ struct isotp_sock *so = (struct isotp_sock *)data; -+ struct sock *sk = &so->sk; -+ struct sk_buff *skb; -+ struct net_device *dev; -+ struct canfd_frame *cf; -+ int ae = (so->opt.flags & CAN_ISOTP_EXTEND_ADDR) ? 1 : 0; -+ -+ switch (so->tx.state) { -+ case ISOTP_WAIT_FC: -+ case ISOTP_WAIT_FIRST_FC: -+ -+ /* we did not get any flow control frame in time */ -+ -+ DBG("we did not get FC frame in time.\n"); -+ -+ /* reset tx state */ -+ so->tx.state = ISOTP_IDLE; -+ wake_up_interruptible(&so->wait); -+ break; -+ -+ case ISOTP_SENDING: -+ -+ /* push out the next segmented pdu */ -+ -+ DBG("next pdu to send.\n"); -+ -+ dev = dev_get_by_index(sock_net(sk), so->ifindex); -+ if (!dev) -+ break; -+ -+isotp_tx_burst: -+ skb = alloc_skb(so->ll.mtu + CAN_SKBRES, GFP_ATOMIC); -+ if (!skb) { -+ dev_put(dev); -+ break; -+ } -+ -+ isotp_skb_reserve(skb, dev); -+ cf = (struct canfd_frame *)skb->data; -+ skb_put(skb, so->ll.mtu); -+ memset(cf, 0, so->ll.mtu); -+ -+ /* create consecutive frame */ -+ isotp_fill_dataframe(cf, so, ae, 0); -+ -+ /* place consecutive frame N_PCI in appropriate index */ -+ cf->data[ae] = N_PCI_CF | so->tx.sn++; -+ so->tx.sn %= 16; -+ so->tx.bs++; -+ -+ cf->flags = so->ll.tx_flags; -+ -+ skb->dev = dev; -+ isotp_skb_set_owner(skb, sk); -+ can_send(skb, 1); -+ -+ if (so->tx.idx >= so->tx.len) { -+ /* we are done */ -+ DBG("we are done\n"); -+ so->tx.state = ISOTP_IDLE; -+ dev_put(dev); -+ wake_up_interruptible(&so->wait); -+ break; -+ } -+ -+ if (so->txfc.bs && so->tx.bs >= so->txfc.bs) { -+ /* stop and wait for FC */ -+ DBG("BS stop and wait for FC\n"); -+ so->tx.state = ISOTP_WAIT_FC; -+ dev_put(dev); -+ hrtimer_start(&so->txtimer, -+ ktime_add(ktime_get(), ktime_set(1,0)), -+ HRTIMER_MODE_ABS); -+ break; -+ } -+ -+ /* no gap between data frames needed => use burst mode */ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0) -+ if (!so->tx_gap) -+ goto isotp_tx_burst; -+#else -+ if (!so->tx_gap.tv64) -+ goto isotp_tx_burst; -+#endif -+ -+ /* start timer to send next data frame with correct delay */ -+ dev_put(dev); -+ hrtimer_start(&so->txtimer, -+ ktime_add(ktime_get(), so->tx_gap), -+ HRTIMER_MODE_ABS); -+ break; -+ -+ default: -+ WARN_ON_ONCE(1); -+ } -+} -+ -+static enum hrtimer_restart isotp_tx_timer_handler(struct hrtimer *hrtimer) -+{ -+ struct isotp_sock *so = container_of(hrtimer, struct isotp_sock, -+ txtimer); -+ tasklet_schedule(&so->txtsklet); -+ -+ return HRTIMER_NORESTART; -+} -+ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0) -+static int isotp_sendmsg(struct socket *sock, struct msghdr *msg, size_t size) -+#else -+static int isotp_sendmsg(struct kiocb *iocb, struct socket *sock, -+ struct msghdr *msg, size_t size) -+#endif -+{ -+ struct sock *sk = sock->sk; -+ struct isotp_sock *so = isotp_sk(sk); -+ u32 old_state = so->tx.state; -+ struct sk_buff *skb; -+ struct net_device *dev; -+ struct canfd_frame *cf; -+ int ae = (so->opt.flags & CAN_ISOTP_EXTEND_ADDR) ? 1 : 0; -+ int wait_tx_done = (so->opt.flags & CAN_ISOTP_WAIT_TX_DONE) ? 1 : 0; -+ s64 hrtimer_sec = 0; -+ int off; -+ int err; -+ -+ if (!so->bound) -+ return -EADDRNOTAVAIL; -+ -+ /* we do not support multiple buffers - for now */ -+ if (cmpxchg(&so->tx.state, ISOTP_IDLE, ISOTP_SENDING) != ISOTP_IDLE || -+ wq_has_sleeper(&so->wait)) { -+ if (msg->msg_flags & MSG_DONTWAIT) { -+ err = -EAGAIN; -+ goto err_out; -+ } -+ -+ /* wait for complete transmission of current pdu */ -+ err = wait_event_interruptible(so->wait, so->tx.state == ISOTP_IDLE); -+ if (err) -+ goto err_out; -+ } -+ -+ if (!size || size > MAX_MSG_LENGTH) { -+ err = -EINVAL; -+ goto err_out_drop; -+ } -+ -+ /* take care of a potential SF_DL ESC offset for TX_DL > 8 */ -+ off = (so->tx.ll_dl > CAN_MAX_DLEN) ? 1 : 0; -+ -+ /* does the given data fit into a single frame for SF_BROADCAST? */ -+ if ((so->opt.flags & CAN_ISOTP_SF_BROADCAST) && -+ (size > so->tx.ll_dl - SF_PCI_SZ4 - ae - off)) { -+ err = -EINVAL; -+ goto err_out_drop; -+ } -+ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) -+ err = memcpy_from_msg(so->tx.buf, msg, size); -+#else -+ err = memcpy_fromiovec(so->tx.buf, msg->msg_iov, size); -+#endif -+ if (err < 0) -+ goto err_out_drop; -+ -+ dev = dev_get_by_index(sock_net(sk), so->ifindex); -+ if (!dev) { -+ err = -ENXIO; -+ goto err_out_drop; -+ } -+ -+ skb = sock_alloc_send_skb(sk, so->ll.mtu + CAN_SKBRES, -+ msg->msg_flags & MSG_DONTWAIT, &err); -+ if (!skb) { -+ dev_put(dev); -+ goto err_out_drop; -+ } -+ -+ isotp_skb_reserve(skb, dev); -+ -+ so->tx.len = size; -+ so->tx.idx = 0; -+ -+ cf = (struct canfd_frame *)skb->data; -+ skb_put(skb, so->ll.mtu); -+ memset(cf, 0, so->ll.mtu); -+ -+ /* check for single frame transmission depending on TX_DL */ -+ if (size <= so->tx.ll_dl - SF_PCI_SZ4 - ae - off) { -+ /* The message size generally fits into a SingleFrame - good. -+ * -+ * SF_DL ESC offset optimization: -+ * -+ * When TX_DL is greater 8 but the message would still fit -+ * into a 8 byte CAN frame, we can omit the offset. -+ * This prevents a protocol caused length extension from -+ * CAN_DL = 8 to CAN_DL = 12 due to the SF_SL ESC handling. -+ */ -+ if (size <= CAN_MAX_DLEN - SF_PCI_SZ4 - ae) -+ off = 0; -+ -+ isotp_fill_dataframe(cf, so, ae, off); -+ -+ /* place single frame N_PCI w/o length in appropriate index */ -+ cf->data[ae] = N_PCI_SF; -+ -+ /* place SF_DL size value depending on the SF_DL ESC offset */ -+ if (off) -+ cf->data[SF_PCI_SZ4 + ae] = size; -+ else -+ cf->data[ae] |= size; -+ -+ so->tx.state = ISOTP_IDLE; -+ wake_up_interruptible(&so->wait); -+ -+ /* don't enable wait queue for a single frame transmission */ -+ wait_tx_done = 0; -+ } else { -+ /* send first frame and wait for FC */ -+ -+ isotp_create_fframe(cf, so, ae); -+ -+ DBG("starting txtimer for fc\n"); -+ /* start timeout for FC */ -+ hrtimer_sec = 1; -+ hrtimer_start(&so->txtimer, ktime_set(hrtimer_sec,0), -+ HRTIMER_MODE_REL); -+ } -+ -+ /* send the first or only CAN frame */ -+ cf->flags = so->ll.tx_flags; -+ -+ skb->dev = dev; -+ skb->sk = sk; -+ err = can_send(skb, 1); -+ dev_put(dev); -+ if (err) { -+ printk_once(KERN_NOTICE "can-isotp: %s: can_send_ret %d\n", -+ __func__, err); -+ -+ /* no transmission -> no timeout monitoring */ -+ if (hrtimer_sec) -+ hrtimer_cancel(&so->txtimer); -+ -+ goto err_out_drop; -+ } -+ -+ if (wait_tx_done) { -+ /* wait for complete transmission of current pdu */ -+ wait_event_interruptible(so->wait, so->tx.state == ISOTP_IDLE); -+ -+ if (sk->sk_err) -+ return -sk->sk_err; -+ } -+ -+ return size; -+ -+err_out_drop: -+ /* drop this PDU and unlock a potential wait queue */ -+ old_state = ISOTP_IDLE; -+err_out: -+ so->tx.state = old_state; -+ if (so->tx.state == ISOTP_IDLE) -+ wake_up_interruptible(&so->wait); -+ -+ return err; -+} -+ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0) -+static int isotp_recvmsg(struct socket *sock, struct msghdr *msg, size_t size, -+ int flags) -+#else -+static int isotp_recvmsg(struct kiocb *iocb, struct socket *sock, -+ struct msghdr *msg, size_t size, int flags) -+#endif -+{ -+ struct sock *sk = sock->sk; -+ struct sk_buff *skb; -+ struct isotp_sock *so = isotp_sk(sk); -+ int noblock = flags & MSG_DONTWAIT; -+ int ret = 0; -+ -+ if (flags & ~(MSG_DONTWAIT | MSG_TRUNC | MSG_PEEK)) -+ return -EINVAL; -+ -+ if (!so->bound) -+ return -EADDRNOTAVAIL; -+ -+ flags &= ~MSG_DONTWAIT; -+ skb = skb_recv_datagram(sk, flags, noblock, &ret); -+ if (!skb) -+ return ret; -+ -+ if (size < skb->len) -+ msg->msg_flags |= MSG_TRUNC; -+ else -+ size = skb->len; -+ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) -+ ret = memcpy_to_msg(msg, skb->data, size); -+#else -+ ret = memcpy_toiovec(msg->msg_iov, skb->data, size); -+#endif -+ if (ret < 0) -+ goto out_err; -+ -+ sock_recv_timestamp(msg, sk, skb); -+ -+ if (msg->msg_name) { -+ msg->msg_namelen = ISOTP_MIN_NAMELEN; -+ memcpy(msg->msg_name, skb->cb, msg->msg_namelen); -+ } -+ -+ /* set length of return value */ -+ ret = (flags & MSG_TRUNC) ? skb->len : size; -+ -+out_err: -+ skb_free_datagram(sk, skb); -+ -+ return ret; -+} -+ -+static int isotp_release(struct socket *sock) -+{ -+ struct sock *sk = sock->sk; -+ struct isotp_sock *so; -+ struct net *net; -+ -+ if (!sk) -+ return 0; -+ -+ so = isotp_sk(sk); -+ net = sock_net(sk); -+ -+ /* wait for complete transmission of current pdu */ -+ wait_event_interruptible(so->wait, so->tx.state == ISOTP_IDLE); -+ -+ spin_lock(&isotp_notifier_lock); -+ while (isotp_busy_notifier == so) { -+ spin_unlock(&isotp_notifier_lock); -+ schedule_timeout_uninterruptible(1); -+ spin_lock(&isotp_notifier_lock); -+ } -+ list_del(&so->notifier); -+ spin_unlock(&isotp_notifier_lock); -+ -+ lock_sock(sk); -+ -+ /* remove current filters & unregister */ -+ if (so->bound && (!(so->opt.flags & CAN_ISOTP_SF_BROADCAST))) { -+ if (so->ifindex) { -+ struct net_device *dev; -+ -+ dev = dev_get_by_index(net, so->ifindex); -+ if (dev) { -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0) -+ can_rx_unregister(net, dev, so->rxid, -+#else -+ can_rx_unregister(dev, so->rxid, -+#endif -+ SINGLE_MASK(so->rxid), -+ isotp_rcv, sk); -+ dev_put(dev); -+ synchronize_rcu(); -+ } -+ } -+ } -+ -+ hrtimer_cancel(&so->txtimer); -+ hrtimer_cancel(&so->rxtimer); -+ tasklet_kill(&so->txtsklet); -+ -+ so->ifindex = 0; -+ so->bound = 0; -+ -+ sock_orphan(sk); -+ sock->sk = NULL; -+ -+ release_sock(sk); -+ sock_put(sk); -+ -+ return 0; -+} -+ -+static int isotp_bind(struct socket *sock, struct sockaddr *uaddr, int len) -+{ -+ struct sockaddr_can *addr = (struct sockaddr_can *)uaddr; -+ struct sock *sk = sock->sk; -+ struct isotp_sock *so = isotp_sk(sk); -+ struct net *net = sock_net(sk); -+ int ifindex; -+ struct net_device *dev; -+ canid_t tx_id = addr->can_addr.tp.tx_id; -+ canid_t rx_id = addr->can_addr.tp.rx_id; -+ int err = 0; -+ int notify_enetdown = 0; -+ int do_rx_reg = 1; -+ -+ if (len < ISOTP_MIN_NAMELEN) -+ return -EINVAL; -+ -+ /* do not register frame reception for functional addressing */ -+ if (so->opt.flags & CAN_ISOTP_SF_BROADCAST) -+ do_rx_reg = 0; -+ -+ /* sanitize tx CAN identifiers */ -+ if (tx_id & CAN_EFF_FLAG) -+ tx_id &= (CAN_EFF_FLAG | CAN_EFF_MASK); -+ else -+ tx_id &= CAN_SFF_MASK; -+ -+ /* give feedback on wrong CAN-ID value */ -+ if (tx_id != addr->can_addr.tp.tx_id) -+ return -EINVAL; -+ -+ /* sanitize rx CAN identifier (if needed) */ -+ if (do_rx_reg) { -+ if (rx_id & CAN_EFF_FLAG) -+ rx_id &= (CAN_EFF_FLAG | CAN_EFF_MASK); -+ else -+ rx_id &= CAN_SFF_MASK; -+ -+ /* give feedback on wrong CAN-ID value */ -+ if (rx_id != addr->can_addr.tp.rx_id) -+ return -EINVAL; -+ } -+ -+ if (!addr->can_ifindex) -+ return -ENODEV; -+ -+ lock_sock(sk); -+ -+ if (so->bound) { -+ err = -EINVAL; -+ goto out; -+ } -+ -+ /* do not validate rx address for functional addressing */ -+ if (do_rx_reg && rx_id == tx_id) { -+ err = -EADDRNOTAVAIL; -+ goto out; -+ } -+ -+ dev = dev_get_by_index(net, addr->can_ifindex); -+ if (!dev) { -+ err = -ENODEV; -+ goto out; -+ } -+ if (dev->type != ARPHRD_CAN) { -+ dev_put(dev); -+ err = -ENODEV; -+ goto out; -+ } -+ if (dev->mtu < so->ll.mtu) { -+ dev_put(dev); -+ err = -EINVAL; -+ goto out; -+ } -+ if (!(dev->flags & IFF_UP)) -+ notify_enetdown = 1; -+ -+ ifindex = dev->ifindex; -+ -+ if (do_rx_reg) -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0) -+ can_rx_register(net, dev, rx_id, -+#else -+ can_rx_register(dev, rx_id, -+#endif -+ SINGLE_MASK(rx_id), isotp_rcv, sk, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,11)) || \ -+ ((LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,50)) && (LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0))) || \ -+ ((LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,49)) && (LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0))) || \ -+ ((LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,42)) && (LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0))) -+ "isotp", sk); -+#else -+ "isotp"); -+#endif -+ dev_put(dev); -+ -+ /* switch to new settings */ -+ so->ifindex = ifindex; -+ so->rxid = rx_id; -+ so->txid = tx_id; -+ so->bound = 1; -+ -+out: -+ release_sock(sk); -+ -+ if (notify_enetdown) { -+ sk->sk_err = ENETDOWN; -+ if (!sock_flag(sk, SOCK_DEAD)) -+ sk->sk_error_report(sk); -+ } -+ -+ return err; -+} -+ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0) -+static int isotp_getname(struct socket *sock, struct sockaddr *uaddr, int peer) -+#else -+static int isotp_getname(struct socket *sock, struct sockaddr *uaddr, -+ int *len, int peer) -+#endif -+{ -+ struct sockaddr_can *addr = (struct sockaddr_can *)uaddr; -+ struct sock *sk = sock->sk; -+ struct isotp_sock *so = isotp_sk(sk); -+ -+ if (peer) -+ return -EOPNOTSUPP; -+ -+ memset(addr, 0, ISOTP_MIN_NAMELEN); -+ addr->can_family = AF_CAN; -+ addr->can_ifindex = so->ifindex; -+ addr->can_addr.tp.rx_id = so->rxid; -+ addr->can_addr.tp.tx_id = so->txid; -+ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0) -+ return ISOTP_MIN_NAMELEN; -+#else -+ *len = ISOTP_MIN_NAMELEN; -+ -+ return 0; -+#endif -+} -+ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0) -+#define copy_from_user copy_from_sockptr -+static int isotp_setsockopt_locked(struct socket *sock, int level, int optname, -+ sockptr_t optval, unsigned int optlen) -+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32) -+static int isotp_setsockopt_locked(struct socket *sock, int level, int optname, -+ char __user *optval, unsigned int optlen) -+#else -+static int isotp_setsockopt_locked(struct socket *sock, int level, int optname, -+ char __user *optval, int optlen) -+#endif -+{ -+ struct sock *sk = sock->sk; -+ struct isotp_sock *so = isotp_sk(sk); -+ int ret = 0; -+ -+ if (so->bound) -+ return -EISCONN; -+ -+ switch (optname) { -+ case CAN_ISOTP_OPTS: -+ if (optlen != sizeof(struct can_isotp_options)) -+ return -EINVAL; -+ -+ if (copy_from_user(&so->opt, optval, optlen)) -+ return -EFAULT; -+ -+ /* no separate rx_ext_address is given => use ext_address */ -+ if (!(so->opt.flags & CAN_ISOTP_RX_EXT_ADDR)) -+ so->opt.rx_ext_address = so->opt.ext_address; -+ -+ /* check for frame_txtime changes (0 => no changes) */ -+ if (so->opt.frame_txtime) { -+ if (so->opt.frame_txtime == CAN_ISOTP_FRAME_TXTIME_ZERO) -+ so->frame_txtime = 0; -+ else -+ so->frame_txtime = so->opt.frame_txtime; -+ } -+ break; -+ -+ case CAN_ISOTP_RECV_FC: -+ if (optlen != sizeof(struct can_isotp_fc_options)) -+ return -EINVAL; -+ -+ if (copy_from_user(&so->rxfc, optval, optlen)) -+ return -EFAULT; -+ break; -+ -+ case CAN_ISOTP_TX_STMIN: -+ if (optlen != sizeof(__u32)) -+ return -EINVAL; -+ -+ if (copy_from_user(&so->force_tx_stmin, optval, optlen)) -+ return -EFAULT; -+ break; -+ -+ case CAN_ISOTP_RX_STMIN: -+ if (optlen != sizeof(__u32)) -+ return -EINVAL; -+ -+ if (copy_from_user(&so->force_rx_stmin, optval, optlen)) -+ return -EFAULT; -+ break; -+ -+ case CAN_ISOTP_LL_OPTS: -+ if (optlen == sizeof(struct can_isotp_ll_options)) { -+ struct can_isotp_ll_options ll; -+ -+ if (copy_from_user(&ll, optval, optlen)) -+ return -EFAULT; -+ -+ /* check for correct ISO 11898-1 DLC data length */ -+ if (ll.tx_dl != padlen(ll.tx_dl)) -+ return -EINVAL; -+ -+ if (ll.mtu != CAN_MTU && ll.mtu != CANFD_MTU) -+ return -EINVAL; -+ -+ if (ll.mtu == CAN_MTU && -+ (ll.tx_dl > CAN_MAX_DLEN || ll.tx_flags != 0)) -+ return -EINVAL; -+ -+ memcpy(&so->ll, &ll, sizeof(ll)); -+ -+ /* set ll_dl for tx path to similar place as for rx */ -+ so->tx.ll_dl = ll.tx_dl; -+ } else { -+ return -EINVAL; -+ } -+ break; -+ -+ default: -+ ret = -ENOPROTOOPT; -+ } -+ -+ return ret; -+} -+ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0) -+static int isotp_setsockopt(struct socket *sock, int level, int optname, -+ sockptr_t optval, unsigned int optlen) -+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32) -+static int isotp_setsockopt(struct socket *sock, int level, int optname, -+ char __user *optval, unsigned int optlen) -+#else -+static int isotp_setsockopt(struct socket *sock, int level, int optname, -+ char __user *optval, int optlen) -+#endif -+{ -+ struct sock *sk = sock->sk; -+ int ret; -+ -+ if (level != SOL_CAN_ISOTP) -+ return -EINVAL; -+ -+ lock_sock(sk); -+ ret = isotp_setsockopt_locked(sock, level, optname, optval, optlen); -+ release_sock(sk); -+ return ret; -+} -+ -+static int isotp_getsockopt(struct socket *sock, int level, int optname, -+ char __user *optval, int __user *optlen) -+{ -+ struct sock *sk = sock->sk; -+ struct isotp_sock *so = isotp_sk(sk); -+ int len; -+ void *val; -+ -+ if (level != SOL_CAN_ISOTP) -+ return -EINVAL; -+ if (get_user(len, optlen)) -+ return -EFAULT; -+ if (len < 0) -+ return -EINVAL; -+ -+ switch (optname) { -+ case CAN_ISOTP_OPTS: -+ len = min_t(int, len, sizeof(struct can_isotp_options)); -+ val = &so->opt; -+ break; -+ -+ case CAN_ISOTP_RECV_FC: -+ len = min_t(int, len, sizeof(struct can_isotp_fc_options)); -+ val = &so->rxfc; -+ break; -+ -+ case CAN_ISOTP_TX_STMIN: -+ len = min_t(int, len, sizeof(u32)); -+ val = &so->force_tx_stmin; -+ break; -+ -+ case CAN_ISOTP_RX_STMIN: -+ len = min_t(int, len, sizeof(u32)); -+ val = &so->force_rx_stmin; -+ break; -+ -+ case CAN_ISOTP_LL_OPTS: -+ len = min_t(int, len, sizeof(struct can_isotp_ll_options)); -+ val = &so->ll; -+ break; -+ -+ default: -+ return -ENOPROTOOPT; -+ } -+ -+ if (put_user(len, optlen)) -+ return -EFAULT; -+ if (copy_to_user(optval, val, len)) -+ return -EFAULT; -+ return 0; -+} -+ -+static void isotp_notify(struct isotp_sock *so, unsigned long msg, -+ struct net_device *dev) -+{ -+ struct sock *sk = &so->sk; -+ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0) -+ if (!net_eq(dev_net(dev), sock_net(sk))) -+ return; -+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) -+ if (dev_net(dev) != &init_net) -+ return; -+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) -+ if (dev->nd_net != &init_net) -+ return; -+#endif -+ -+ if (so->ifindex != dev->ifindex) -+ return; -+ -+ switch (msg) { -+ -+ case NETDEV_UNREGISTER: -+ lock_sock(sk); -+ /* remove current filters & unregister */ -+ if (so->bound && (!(so->opt.flags & CAN_ISOTP_SF_BROADCAST))) -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0) -+ can_rx_unregister(dev_net(dev), dev, so->rxid, -+#else -+ can_rx_unregister(dev, so->rxid, -+#endif -+ SINGLE_MASK(so->rxid), -+ isotp_rcv, sk); -+ -+ so->ifindex = 0; -+ so->bound = 0; -+ release_sock(sk); -+ -+ sk->sk_err = ENODEV; -+ if (!sock_flag(sk, SOCK_DEAD)) -+ sk->sk_error_report(sk); -+ break; -+ -+ case NETDEV_DOWN: -+ sk->sk_err = ENETDOWN; -+ if (!sock_flag(sk, SOCK_DEAD)) -+ sk->sk_error_report(sk); -+ break; -+ } -+} -+ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0) -+static int isotp_notifier(struct notifier_block *nb, unsigned long msg, -+ void *ptr) -+{ -+ struct net_device *dev = netdev_notifier_info_to_dev(ptr); -+#else -+static int isotp_notifier(struct notifier_block *nb, unsigned long msg, -+ void *data) -+{ -+ struct net_device *dev = (struct net_device *)data; -+#endif -+ -+ if (dev->type != ARPHRD_CAN) -+ return NOTIFY_DONE; -+ if (msg != NETDEV_UNREGISTER && msg != NETDEV_DOWN) -+ return NOTIFY_DONE; -+ if (unlikely(isotp_busy_notifier)) /* Check for reentrant bug. */ -+ return NOTIFY_DONE; -+ -+ spin_lock(&isotp_notifier_lock); -+ list_for_each_entry(isotp_busy_notifier, &isotp_notifier_list, notifier) { -+ spin_unlock(&isotp_notifier_lock); -+ isotp_notify(isotp_busy_notifier, msg, dev); -+ spin_lock(&isotp_notifier_lock); -+ } -+ isotp_busy_notifier = NULL; -+ spin_unlock(&isotp_notifier_lock); -+ return NOTIFY_DONE; -+} -+ -+static int isotp_init(struct sock *sk) -+{ -+ struct isotp_sock *so = isotp_sk(sk); -+ -+ so->ifindex = 0; -+ so->bound = 0; -+ -+ so->opt.flags = CAN_ISOTP_DEFAULT_FLAGS; -+ so->opt.ext_address = CAN_ISOTP_DEFAULT_EXT_ADDRESS; -+ so->opt.rx_ext_address = CAN_ISOTP_DEFAULT_EXT_ADDRESS; -+ so->opt.rxpad_content = CAN_ISOTP_DEFAULT_PAD_CONTENT; -+ so->opt.txpad_content = CAN_ISOTP_DEFAULT_PAD_CONTENT; -+ so->opt.frame_txtime = CAN_ISOTP_DEFAULT_FRAME_TXTIME; -+ so->frame_txtime = CAN_ISOTP_DEFAULT_FRAME_TXTIME; -+ so->rxfc.bs = CAN_ISOTP_DEFAULT_RECV_BS; -+ so->rxfc.stmin = CAN_ISOTP_DEFAULT_RECV_STMIN; -+ so->rxfc.wftmax = CAN_ISOTP_DEFAULT_RECV_WFTMAX; -+ so->ll.mtu = CAN_ISOTP_DEFAULT_LL_MTU; -+ so->ll.tx_dl = CAN_ISOTP_DEFAULT_LL_TX_DL; -+ so->ll.tx_flags = CAN_ISOTP_DEFAULT_LL_TX_FLAGS; -+ -+ /* set ll_dl for tx path to similar place as for rx */ -+ so->tx.ll_dl = so->ll.tx_dl; -+ -+ so->rx.state = ISOTP_IDLE; -+ so->tx.state = ISOTP_IDLE; -+ -+ hrtimer_init(&so->rxtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); -+ so->rxtimer.function = isotp_rx_timer_handler; -+ hrtimer_init(&so->txtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); -+ so->txtimer.function = isotp_tx_timer_handler; -+ -+ tasklet_init(&so->txtsklet, isotp_tx_timer_tsklet, (unsigned long)so); -+ -+ init_waitqueue_head(&so->wait); -+ spin_lock_init(&so->rx_lock); -+ -+ spin_lock(&isotp_notifier_lock); -+ list_add_tail(&so->notifier, &isotp_notifier_list); -+ spin_unlock(&isotp_notifier_lock); -+ -+ return 0; -+} -+ -+static int isotp_sock_no_ioctlcmd(struct socket *sock, unsigned int cmd, -+ unsigned long arg) -+{ -+ /* no ioctls for socket layer -> hand it down to NIC layer */ -+ return -ENOIOCTLCMD; -+} -+ -+static const struct proto_ops isotp_ops = { -+ .family = PF_CAN, -+ .release = isotp_release, -+ .bind = isotp_bind, -+ .connect = sock_no_connect, -+ .socketpair = sock_no_socketpair, -+ .accept = sock_no_accept, -+ .getname = isotp_getname, -+ .poll = datagram_poll, -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,2,0) -+ .ioctl = isotp_sock_no_ioctlcmd, -+ .gettstamp = sock_gettstamp, -+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39) -+ .ioctl = can_ioctl, /* use can_ioctl() from af_can.c */ -+#else -+ .ioctl = NULL, /* use can_ioctl() from af_can.c */ -+#endif -+ .listen = sock_no_listen, -+ .shutdown = sock_no_shutdown, -+ .setsockopt = isotp_setsockopt, -+ .getsockopt = isotp_getsockopt, -+ .sendmsg = isotp_sendmsg, -+ .recvmsg = isotp_recvmsg, -+ .mmap = sock_no_mmap, -+ .sendpage = sock_no_sendpage, -+}; -+ -+static struct proto isotp_proto __read_mostly = { -+ .name = "CAN_ISOTP", -+ .owner = THIS_MODULE, -+ .obj_size = sizeof(struct isotp_sock), -+ .init = isotp_init, -+}; -+ -+static const struct can_proto isotp_can_proto = { -+ .type = SOCK_DGRAM, -+ .protocol = CAN_ISOTP, -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33) -+ .capability = -1, -+#endif -+ .ops = &isotp_ops, -+ .prot = &isotp_proto, -+}; -+ -+static struct notifier_block canisotp_notifier = { -+ .notifier_call = isotp_notifier -+}; -+ -+static __init int isotp_module_init(void) -+{ -+ int err; -+ -+ printk(KERN_INFO "can: isotp protocol (rev " CAN_ISOTP_VERSION ")\n"); -+ -+ err = can_proto_register(&isotp_can_proto); -+ if (err < 0) -+ printk(KERN_ERR "can: registration of isotp protocol failed\n"); -+ else -+ register_netdevice_notifier(&canisotp_notifier); -+ -+ return err; -+} -+ -+static __exit void isotp_module_exit(void) -+{ -+ can_proto_unregister(&isotp_can_proto); -+ unregister_netdevice_notifier(&canisotp_notifier); -+} -+ -+module_init(isotp_module_init); -+module_exit(isotp_module_exit); --- -2.39.2 - diff --git a/patches/external/can_isotp/0002-CAN_ISOTP-wire-up-to-kconfig-makefile.patch b/patches/external/can_isotp/0002-CAN_ISOTP-wire-up-to-kconfig-makefile.patch deleted file mode 100644 index 1948be8dd7ee701ff2700d270073090f13df6562..0000000000000000000000000000000000000000 --- a/patches/external/can_isotp/0002-CAN_ISOTP-wire-up-to-kconfig-makefile.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 0bb6bbf6e15ec955c812f1792e243f11cfcc1bdf Mon Sep 17 00:00:00 2001 -From: Robert Nelson <robertcnelson@gmail.com> -Date: Mon, 29 Jul 2019 11:58:09 -0500 -Subject: [PATCH 2/2] CAN_ISOTP: wire up to kconfig/makefile - -Signed-off-by: Robert Nelson <robertcnelson@gmail.com> ---- - net/can/Kconfig | 10 ++++++++++ - net/can/Makefile | 3 +++ - 2 files changed, 13 insertions(+) - -diff --git a/net/can/Kconfig b/net/can/Kconfig -index d77042752457..9e2f196f0423 100644 ---- a/net/can/Kconfig -+++ b/net/can/Kconfig -@@ -55,6 +55,16 @@ config CAN_GW - - source "net/can/j1939/Kconfig" - -+config CAN_ISOTP -+ tristate "ISO 15765-2:2016 CAN transport protocol" -+ default y -+ ---help--- -+ ISO 15765-2 CAN transport protocol for protocol family CAN -+ -+ This implementation is already widely used in automotive use-cases, e.g. -+ for UDS based OBD diagnosis. Although some small adaptions may be applied -+ to make it ready for Linux Mainline. Feedback is welcome. -+ - source "drivers/net/can/Kconfig" - - endif -diff --git a/net/can/Makefile b/net/can/Makefile -index 08bd217fc051..cfa1024369cf 100644 ---- a/net/can/Makefile -+++ b/net/can/Makefile -@@ -16,4 +16,7 @@ can-bcm-y := bcm.o - obj-$(CONFIG_CAN_GW) += can-gw.o - can-gw-y := gw.o - -+obj-$(CONFIG_CAN_ISOTP) += can-isotp.o -+can-isotp-y := isotp.o -+ - obj-$(CONFIG_CAN_J1939) += j1939/ --- -2.23.0 - diff --git a/patches/external/git/CAN-ISOTP b/patches/external/git/CAN-ISOTP deleted file mode 100644 index f2d4d9e1c17ecd95844364b355b9dfb30c1ccbbd..0000000000000000000000000000000000000000 --- a/patches/external/git/CAN-ISOTP +++ /dev/null @@ -1 +0,0 @@ -CAN-ISOTP: https://github.com/hartkopp/can-isotp/commit/7626d0a0707391970080d493ce69638719938da7 diff --git a/patches/ref_multi_v7_defconfig b/patches/ref_multi_v7_defconfig index fc7e0fc1e44462e959d902bf436068954c107048..106fb529e7c63691bd65c994b9acc215fedc7181 100644 --- a/patches/ref_multi_v7_defconfig +++ b/patches/ref_multi_v7_defconfig @@ -1220,7 +1220,6 @@ CONFIG_CAN_RAW=y CONFIG_CAN_BCM=y CONFIG_CAN_GW=y # CONFIG_CAN_J1939 is not set -CONFIG_CAN_ISOTP=y # # CAN Device Drivers diff --git a/repo_maintenance/push-kernel-n-test.sh b/repo_maintenance/push-kernel-n-test.sh index 69f8548c9ac3eb3c830696fab24f337f4f961f99..caaf987b4ebf0779a95d83ca4c819065598a46c0 100755 --- a/repo_maintenance/push-kernel-n-test.sh +++ b/repo_maintenance/push-kernel-n-test.sh @@ -33,10 +33,6 @@ cat_files () { if [ -f ./patches/external/git/BCFSERIAL ] ; then cat ./patches/external/git/BCFSERIAL >> ${wfile} fi - - if [ -f ./patches/external/git/CAN-ISOTP ] ; then - cat ./patches/external/git/CAN-ISOTP >> ${wfile} - fi } DIR=$PWD diff --git a/repo_maintenance/push-n-tag-release.sh b/repo_maintenance/push-n-tag-release.sh index 11a19893cc0138ff20b6253eefef603bc40a355b..e18fa622d8aed4e975b6782095a7aa2953e607bb 100755 --- a/repo_maintenance/push-n-tag-release.sh +++ b/repo_maintenance/push-n-tag-release.sh @@ -33,10 +33,6 @@ cat_files () { if [ -f ./patches/external/git/BCFSERIAL ] ; then cat ./patches/external/git/BCFSERIAL >> ${wfile} fi - - if [ -f ./patches/external/git/CAN-ISOTP ] ; then - cat ./patches/external/git/CAN-ISOTP >> ${wfile} - fi } DIR=$PWD diff --git a/version.sh b/version.sh index 997f2ba94a70290089bec5d125ce2fe07e67efc2..b7cba584a0ac83dee3225638a9dc6d124c72c7d0 100644 --- a/version.sh +++ b/version.sh @@ -47,7 +47,7 @@ KERNEL_REL=5.4 KERNEL_TAG=${KERNEL_REL}.257 kernel_rt=".257-rt87" #Kernel Build -BUILD=${build_prefix}66.1 +BUILD=${build_prefix}66.2 #v6.X-rcX + upto SHA #prev_KERNEL_SHA=""