mirror of
https://github.com/Fishwaldo/build.git
synced 2025-03-16 03:41:26 +00:00
Merge UDOO next patches from development and add remaining ones
This commit is contained in:
parent
23038e35b5
commit
33722cdb15
21 changed files with 46619 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/arm 4.4.122 Kernel Configuration
|
||||
# Linux/arm 4.4.133 Kernel Configuration
|
||||
#
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARM_HAS_SG_CHAIN=y
|
||||
|
@ -4058,7 +4058,7 @@ CONFIG_PRINT_QUOTA_WARNING=y
|
|||
CONFIG_QUOTA_TREE=m
|
||||
# CONFIG_QFMT_V1 is not set
|
||||
# CONFIG_QFMT_V2 is not set
|
||||
CONFIG_QUOTACTL=m
|
||||
CONFIG_QUOTACTL=y
|
||||
CONFIG_AUTOFS4_FS=m
|
||||
CONFIG_FUSE_FS=m
|
||||
CONFIG_CUSE=m
|
||||
|
|
14
patch/kernel/odroidc1-dev/add_load_address.patch
Normal file
14
patch/kernel/odroidc1-dev/add_load_address.patch
Normal file
|
@ -0,0 +1,14 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index e811e0c..f1af403
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -11,6 +11,9 @@ NAME = Fearless Coyote
|
||||
# Comments in this file are targeted only to the developer, do not
|
||||
# expect to learn how to build the kernel reading this file.
|
||||
|
||||
+LOADADDR=0x00208000
|
||||
+export LOADADDR
|
||||
+
|
||||
# That's our default target when none is given on the command line
|
||||
PHONY := _all
|
||||
_all:
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c
|
||||
index 3216e09..21bce28
|
||||
--- a/arch/arm64/mm/dma-mapping.c
|
||||
+++ b/arch/arm64/mm/dma-mapping.c
|
||||
@@ -44,7 +44,7 @@ static pgprot_t __get_dma_pgprot(unsigned long attrs, pgprot_t prot,
|
||||
|
||||
static struct gen_pool *atomic_pool;
|
||||
|
||||
-#define DEFAULT_DMA_COHERENT_POOL_SIZE SZ_256K
|
||||
+#define DEFAULT_DMA_COHERENT_POOL_SIZE SZ_2M
|
||||
static size_t atomic_pool_size __initdata = DEFAULT_DMA_COHERENT_POOL_SIZE;
|
||||
|
||||
static int __init early_coherent_pool(char *p)
|
11
patch/kernel/odroidc1-dev/bash_to_afterinstall.patch
Normal file
11
patch/kernel/odroidc1-dev/bash_to_afterinstall.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- a/scripts/package/builddeb
|
||||
+++ b/scripts/package/builddeb
|
||||
@@ -218,7 +218,7 @@
|
||||
for script in postinst postrm preinst prerm ; do
|
||||
mkdir -p "$tmpdir$debhookdir/$script.d"
|
||||
cat <<EOF > "$tmpdir/DEBIAN/$script"
|
||||
-#!/bin/sh
|
||||
+#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
199
patch/kernel/odroidc1-dev/packaging-4.x-dev.patch
Normal file
199
patch/kernel/odroidc1-dev/packaging-4.x-dev.patch
Normal file
|
@ -0,0 +1,199 @@
|
|||
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
|
||||
index 90c9a8a..d64e047 100755
|
||||
--- a/scripts/package/builddeb
|
||||
+++ b/scripts/package/builddeb
|
||||
@@ -29,6 +29,27 @@ create_package() {
|
||||
# in case we are in a restrictive umask environment like 0077
|
||||
chmod -R a+rX "$pdir"
|
||||
|
||||
+ # Create preinstall and post install script to remove dtb
|
||||
+ if [[ "$1" == *dtb* ]]; then
|
||||
+ echo "if [ -d /boot/dtb-$version ]; then mv /boot/dtb-$version /boot/dtb-$version.old; fi" >> $pdir/DEBIAN/preinst
|
||||
+ echo "if [ -d /boot/dtb.old ]; then rm -rf /boot/dtb.old; fi" >> $pdir/DEBIAN/preinst
|
||||
+ echo "if [ -d /boot/dtb ]; then mv /boot/dtb /boot/dtb.old; fi" >> $pdir/DEBIAN/preinst
|
||||
+ echo "exit 0" >> $pdir/DEBIAN/preinst
|
||||
+ chmod 775 $pdir/DEBIAN/preinst
|
||||
+
|
||||
+ echo "if [ -d /boot/dtb-$version.old ]; then rm -rf /boot/dtb-$version.old; fi" >> $pdir/DEBIAN/postinst
|
||||
+ echo "ln -sf dtb-$version /boot/dtb > /dev/null 2>&1 || mv /boot/dtb-$version /boot/dtb" >> $pdir/DEBIAN/postinst
|
||||
+ echo "exit 0" >> $pdir/DEBIAN/postinst
|
||||
+ chmod 775 $pdir/DEBIAN/postinst
|
||||
+ fi
|
||||
+
|
||||
+ # Create postinstall script for headers
|
||||
+ if [[ "$1" == *headers* ]]; then
|
||||
+ echo "cd /usr/src/linux-headers-$version; echo \"Compiling headers - please wait ...\"; make -s scripts >/dev/null 2>&1" >> $pdir/DEBIAN/postinst
|
||||
+ echo "exit 0" >> $pdir/DEBIAN/postinst
|
||||
+ chmod 775 $pdir/DEBIAN/postinst
|
||||
+ fi
|
||||
+
|
||||
# Create the package
|
||||
dpkg-gencontrol -p$pname -P"$pdir"
|
||||
dpkg --build "$pdir" ..
|
||||
@@ -39,9 +60,11 @@ tmpdir="$objtree/debian/tmp"
|
||||
kernel_headers_dir="$objtree/debian/hdrtmp"
|
||||
libc_headers_dir="$objtree/debian/headertmp"
|
||||
dbg_dir="$objtree/debian/dbgtmp"
|
||||
-packagename=linux-image-$version
|
||||
-kernel_headers_packagename=linux-headers-$version
|
||||
-libc_headers_packagename=linux-libc-dev
|
||||
+dtb_dir="$objtree/debian/dtbtmp"
|
||||
+packagename=linux-image-dev"$LOCALVERSION"
|
||||
+kernel_headers_packagename=linux-headers-dev"$LOCALVERSION"
|
||||
+dtb_packagename=linux-dtb-dev"$LOCALVERSION"
|
||||
+libc_headers_packagename=linux-libc-dev-dev"$LOCALVERSION"
|
||||
dbg_packagename=$packagename-dbg
|
||||
|
||||
if [ "$ARCH" = "um" ] ; then
|
||||
@@ -52,6 +75,15 @@ fi
|
||||
# XXX: have each arch Makefile export a variable of the canonical image install
|
||||
# path instead
|
||||
case $ARCH in
|
||||
+aarch64|arm64)
|
||||
+ image_name=Image
|
||||
+ installed_image_path="boot/vmlinuz-$version"
|
||||
+
|
||||
+ ;;
|
||||
+arm*)
|
||||
+ image_name=zImage
|
||||
+ installed_image_path="boot/vmlinuz-$version"
|
||||
+ ;;
|
||||
um)
|
||||
installed_image_path="usr/bin/linux-$version"
|
||||
;;
|
||||
@@ -65,7 +97,9 @@ esac
|
||||
BUILD_DEBUG="$(grep -s '^CONFIG_DEBUG_INFO=y' $KCONFIG_CONFIG || true)"
|
||||
|
||||
# Setup the directory structure
|
||||
-rm -rf "$tmpdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" $objtree/debian/files
|
||||
+rm -rf "$tmpdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" "$dtb_dir" $objtree/debian/files
|
||||
+mkdir -m 755 -p "$dtb_dir/DEBIAN"
|
||||
+mkdir -p "$dtb_dir/boot/dtb-$version" "$dtb_dir/usr/share/doc/$dtb_packagename"
|
||||
mkdir -m 755 -p "$tmpdir/DEBIAN"
|
||||
mkdir -p "$tmpdir/lib" "$tmpdir/boot"
|
||||
mkdir -p "$kernel_headers_dir/lib/modules/$version/"
|
||||
@@ -118,6 +152,11 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then
|
||||
fi
|
||||
fi
|
||||
|
||||
+if grep -q '^CONFIG_OF=y' $KCONFIG_CONFIG ; then
|
||||
+ #mkdir -p "$tmpdir/boot/dtb"
|
||||
+ INSTALL_DTBS_PATH="$dtb_dir/boot/dtb-$version" $MAKE KBUILD_SRC= dtbs_install
|
||||
+fi
|
||||
+
|
||||
if [ "$ARCH" != "um" ]; then
|
||||
$MAKE headers_check KBUILD_SRC=
|
||||
$MAKE headers_install KBUILD_SRC= INSTALL_HDR_PATH="$libc_headers_dir/usr"
|
||||
@@ -153,9 +192,60 @@ EOF
|
||||
chmod 755 "$tmpdir/DEBIAN/$script"
|
||||
done
|
||||
|
||||
+##
|
||||
+## Create sym link to kernel image
|
||||
+##
|
||||
+sed -e "s/set -e//g" -i $tmpdir/DEBIAN/postinst
|
||||
+sed -e "s/exit 0//g" -i $tmpdir/DEBIAN/postinst
|
||||
+cat >> $tmpdir/DEBIAN/postinst <<EOT
|
||||
+if [ "\$(grep nand /proc/partitions)" != "" ] && [ "\$(grep mmc /proc/partitions)" = "" ]; then
|
||||
+ mkimage -A arm -O linux -T kernel -C none -a "0x40008000" -e "0x40008000" -n "Linux kernel" -d /$installed_image_path /boot/uImage > /dev/null 2>&1
|
||||
+ cp /boot/uImage /tmp/uImage
|
||||
+ sync
|
||||
+ mountpoint -q /boot || mount /boot
|
||||
+ cp /tmp/uImage /boot/uImage
|
||||
+ rm -f /$installed_image_path
|
||||
+else
|
||||
+ ln -sf $(basename $installed_image_path) /boot/$image_name || mv /$installed_image_path /boot/$image_name
|
||||
+fi
|
||||
+touch /boot/.next
|
||||
+exit 0
|
||||
+EOT
|
||||
+
|
||||
+##
|
||||
+## FAT install workaround
|
||||
+##
|
||||
+sed -e "s/set -e//g" -i $tmpdir/DEBIAN/preinst
|
||||
+sed -e "s/exit 0//g" -i $tmpdir/DEBIAN/preinst
|
||||
+cat >> $tmpdir/DEBIAN/preinst <<EOT
|
||||
+# exit if we are running chroot
|
||||
+if [ "\$(stat -c %d:%i /)" != "\$(stat -c %d:%i /proc/1/root/.)" ]; then exit 0; fi
|
||||
+
|
||||
+check_and_unmount (){
|
||||
+ boot_device=\$(mountpoint -d /boot)
|
||||
+
|
||||
+ for file in /dev/* ; do
|
||||
+ CURRENT_DEVICE=\$(printf "%d:%d" \$(stat --printf="0x%t 0x%T" \$file))
|
||||
+ if [[ "\$CURRENT_DEVICE" = "\$boot_device" ]]; then
|
||||
+ boot_partition=\$file
|
||||
+ break
|
||||
+ fi
|
||||
+ done
|
||||
+
|
||||
+ bootfstype=\$(blkid -s TYPE -o value \$boot_partition)
|
||||
+ if [ "\$bootfstype" = "vfat" ]; then
|
||||
+ umount /boot
|
||||
+ rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/$image_name /boot/uImage
|
||||
+ fi
|
||||
+}
|
||||
+mountpoint -q /boot && check_and_unmount
|
||||
+EOT
|
||||
+echo "exit 0" >> $tmpdir/DEBIAN/preinst
|
||||
+
|
||||
# Build kernel header package
|
||||
(cd $srctree; find . -name Makefile\* -o -name Kconfig\* -o -name \*.pl) > "$objtree/debian/hdrsrcfiles"
|
||||
(cd $srctree; find arch/*/include include scripts -type f -o -type l) >> "$objtree/debian/hdrsrcfiles"
|
||||
+(cd $srctree; find security/*/include -type f) >> "$objtree/debian/hdrsrcfiles"
|
||||
(cd $srctree; find arch/$SRCARCH -name module.lds -o -name Kbuild.platforms -o -name Platform) >> "$objtree/debian/hdrsrcfiles"
|
||||
(cd $srctree; find $(find arch/$SRCARCH -name include -o -name scripts -type d) -type f) >> "$objtree/debian/hdrsrcfiles"
|
||||
if grep -q '^CONFIG_STACK_VALIDATION=y' $KCONFIG_CONFIG ; then
|
||||
@@ -167,15 +257,19 @@ if grep -q '^CONFIG_GCC_PLUGINS=y' $KCONFIG_CONFIG ; then
|
||||
fi
|
||||
destdir=$kernel_headers_dir/usr/src/linux-headers-$version
|
||||
mkdir -p "$destdir"
|
||||
+(cd $destdir; patch -p1 < /tmp/headers-debian-byteshift.patch)
|
||||
(cd $srctree; tar -c -f - -T -) < "$objtree/debian/hdrsrcfiles" | (cd $destdir; tar -xf -)
|
||||
(cd $objtree; tar -c -f - -T -) < "$objtree/debian/hdrobjfiles" | (cd $destdir; tar -xf -)
|
||||
(cd $objtree; cp $KCONFIG_CONFIG $destdir/.config) # copy .config manually to be where it's expected to be
|
||||
ln -sf "/usr/src/linux-headers-$version" "$kernel_headers_dir/lib/modules/$version/build"
|
||||
rm -f "$objtree/debian/hdrsrcfiles" "$objtree/debian/hdrobjfiles"
|
||||
|
||||
+(cd $destdir; make M=scripts clean)
|
||||
+
|
||||
if [ "$ARCH" != "um" ]; then
|
||||
create_package "$kernel_headers_packagename" "$kernel_headers_dir"
|
||||
- create_package "$libc_headers_packagename" "$libc_headers_dir"
|
||||
+ # create_package "$libc_headers_packagename" "$libc_headers_dir"
|
||||
+ create_package "$dtb_packagename" "$dtb_dir"
|
||||
fi
|
||||
|
||||
create_package "$packagename" "$tmpdir"
|
||||
diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
|
||||
index 6adb3a1..00e12eb 100755
|
||||
--- a/scripts/package/mkdebian
|
||||
+++ b/scripts/package/mkdebian
|
||||
@@ -61,10 +61,12 @@ else
|
||||
packageversion=$version-$revision
|
||||
fi
|
||||
sourcename=$KDEB_SOURCENAME
|
||||
-packagename=linux-image-$version
|
||||
-kernel_headers_packagename=linux-headers-$version
|
||||
+packagename=linux-image-dev$LOCALVERSION
|
||||
+kernel_headers_packagename=linux-headers-dev$LOCALVERSION
|
||||
+dtb_packagename=linux-dtb-dev$LOCALVERSION
|
||||
dbg_packagename=$packagename-dbg
|
||||
debarch=
|
||||
+image_name=
|
||||
set_debarch
|
||||
|
||||
if [ "$ARCH" = "um" ] ; then
|
||||
@@ -168,6 +170,11 @@ Architecture: $debarch
|
||||
Description: Linux kernel debugging symbols for $version
|
||||
This package will come in handy if you need to debug the kernel. It provides
|
||||
all the necessary debug symbols for the kernel and its modules.
|
||||
+
|
||||
+Package: $dtb_packagename
|
||||
+Architecture: $debarch
|
||||
+Description: Linux DTB, version $version
|
||||
+ This package contains device blobs from the Linux kernel, version $version
|
||||
EOF
|
||||
|
||||
cat <<EOF > debian/rules
|
9662
patch/kernel/udoo-next/04-patch-4.4.117-118.patch
Normal file
9662
patch/kernel/udoo-next/04-patch-4.4.117-118.patch
Normal file
File diff suppressed because it is too large
Load diff
696
patch/kernel/udoo-next/04-patch-4.4.118-119.patch
Normal file
696
patch/kernel/udoo-next/04-patch-4.4.118-119.patch
Normal file
|
@ -0,0 +1,696 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index 1e01148744f3..87f925192c77 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 4
|
||||
-SUBLEVEL = 118
|
||||
+SUBLEVEL = 119
|
||||
EXTRAVERSION =
|
||||
NAME = Blurry Fish Butt
|
||||
|
||||
diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c
|
||||
index 9119722eb347..5d270ca76aec 100644
|
||||
--- a/arch/arm64/kernel/traps.c
|
||||
+++ b/arch/arm64/kernel/traps.c
|
||||
@@ -49,7 +49,7 @@ static const char *handler[]= {
|
||||
"Error"
|
||||
};
|
||||
|
||||
-int show_unhandled_signals = 1;
|
||||
+int show_unhandled_signals = 0;
|
||||
|
||||
/*
|
||||
* Dump out the contents of some memory nicely...
|
||||
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
|
||||
index df4a87eb8da4..9eb469bed22b 100644
|
||||
--- a/arch/powerpc/kernel/setup_64.c
|
||||
+++ b/arch/powerpc/kernel/setup_64.c
|
||||
@@ -835,6 +835,7 @@ static int __init disable_hardlockup_detector(void)
|
||||
return 0;
|
||||
}
|
||||
early_initcall(disable_hardlockup_detector);
|
||||
+#endif
|
||||
|
||||
#ifdef CONFIG_PPC_BOOK3S_64
|
||||
static enum l1d_flush_type enabled_flush_types;
|
||||
@@ -973,4 +974,3 @@ ssize_t cpu_show_meltdown(struct device *dev, struct device_attribute *attr, cha
|
||||
return sprintf(buf, "Vulnerable\n");
|
||||
}
|
||||
#endif /* CONFIG_PPC_BOOK3S_64 */
|
||||
-#endif
|
||||
diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c
|
||||
index 1d2e6392f5fa..f24bd7249536 100644
|
||||
--- a/arch/x86/oprofile/nmi_int.c
|
||||
+++ b/arch/x86/oprofile/nmi_int.c
|
||||
@@ -471,7 +471,7 @@ static int nmi_setup(void)
|
||||
goto fail;
|
||||
|
||||
for_each_possible_cpu(cpu) {
|
||||
- if (!cpu)
|
||||
+ if (!IS_ENABLED(CONFIG_SMP) || !cpu)
|
||||
continue;
|
||||
|
||||
memcpy(per_cpu(cpu_msrs, cpu).counters,
|
||||
diff --git a/drivers/android/binder.c b/drivers/android/binder.c
|
||||
index 55613f6f7c0e..260ce0e60187 100644
|
||||
--- a/drivers/android/binder.c
|
||||
+++ b/drivers/android/binder.c
|
||||
@@ -2622,8 +2622,10 @@ static unsigned int binder_poll(struct file *filp,
|
||||
binder_lock(__func__);
|
||||
|
||||
thread = binder_get_thread(proc);
|
||||
- if (!thread)
|
||||
+ if (!thread) {
|
||||
+ binder_unlock(__func__);
|
||||
return POLLERR;
|
||||
+ }
|
||||
|
||||
wait_for_proc_work = thread->transaction_stack == NULL &&
|
||||
list_empty(&thread->todo) && thread->return_error == BR_OK;
|
||||
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
|
||||
index fc9f14747f70..a36230d1331c 100644
|
||||
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
|
||||
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
|
||||
@@ -1467,8 +1467,6 @@ int amdgpu_device_init(struct amdgpu_device *adev,
|
||||
* ignore it */
|
||||
vga_client_register(adev->pdev, adev, NULL, amdgpu_vga_set_decode);
|
||||
|
||||
- if (amdgpu_runtime_pm == 1)
|
||||
- runtime = true;
|
||||
if (amdgpu_device_is_px(ddev))
|
||||
runtime = true;
|
||||
vga_switcheroo_register_client(adev->pdev, &amdgpu_switcheroo_ops, runtime);
|
||||
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
|
||||
index c0106fd9fae9..c641ed9470e1 100644
|
||||
--- a/drivers/gpu/drm/drm_edid.c
|
||||
+++ b/drivers/gpu/drm/drm_edid.c
|
||||
@@ -106,6 +106,9 @@ static struct edid_quirk {
|
||||
/* AEO model 0 reports 8 bpc, but is a 6 bpc panel */
|
||||
{ "AEO", 0, EDID_QUIRK_FORCE_6BPC },
|
||||
|
||||
+ /* CPT panel of Asus UX303LA reports 8 bpc, but is a 6 bpc panel */
|
||||
+ { "CPT", 0x17df, EDID_QUIRK_FORCE_6BPC },
|
||||
+
|
||||
/* Belinea 10 15 55 */
|
||||
{ "MAX", 1516, EDID_QUIRK_PREFER_LARGE_60 },
|
||||
{ "MAX", 0x77e, EDID_QUIRK_PREFER_LARGE_60 },
|
||||
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
|
||||
index 6861b74e2b61..d07fb967f92b 100644
|
||||
--- a/drivers/hid/hid-core.c
|
||||
+++ b/drivers/hid/hid-core.c
|
||||
@@ -2386,6 +2386,9 @@ static const struct hid_device_id hid_ignore_list[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MICROCASSYTIME) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MICROCASSYTEMPERATURE) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MICROCASSYPH) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_POWERANALYSERCASSY) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_CONVERTERCONTROLLERCASSY) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MACHINETESTCASSY) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_JWM) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_DMMP) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_UMIP) },
|
||||
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
|
||||
index b554d17c9156..b316ab7e8996 100644
|
||||
--- a/drivers/hid/hid-ids.h
|
||||
+++ b/drivers/hid/hid-ids.h
|
||||
@@ -570,6 +570,9 @@
|
||||
#define USB_DEVICE_ID_LD_MICROCASSYTIME 0x1033
|
||||
#define USB_DEVICE_ID_LD_MICROCASSYTEMPERATURE 0x1035
|
||||
#define USB_DEVICE_ID_LD_MICROCASSYPH 0x1038
|
||||
+#define USB_DEVICE_ID_LD_POWERANALYSERCASSY 0x1040
|
||||
+#define USB_DEVICE_ID_LD_CONVERTERCONTROLLERCASSY 0x1042
|
||||
+#define USB_DEVICE_ID_LD_MACHINETESTCASSY 0x1043
|
||||
#define USB_DEVICE_ID_LD_JWM 0x1080
|
||||
#define USB_DEVICE_ID_LD_DMMP 0x1081
|
||||
#define USB_DEVICE_ID_LD_UMIP 0x1090
|
||||
diff --git a/drivers/iio/imu/adis_trigger.c b/drivers/iio/imu/adis_trigger.c
|
||||
index f53e9a803a0e..93b99bd93738 100644
|
||||
--- a/drivers/iio/imu/adis_trigger.c
|
||||
+++ b/drivers/iio/imu/adis_trigger.c
|
||||
@@ -47,6 +47,10 @@ int adis_probe_trigger(struct adis *adis, struct iio_dev *indio_dev)
|
||||
if (adis->trig == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
+ adis->trig->dev.parent = &adis->spi->dev;
|
||||
+ adis->trig->ops = &adis_trigger_ops;
|
||||
+ iio_trigger_set_drvdata(adis->trig, adis);
|
||||
+
|
||||
ret = request_irq(adis->spi->irq,
|
||||
&iio_trigger_generic_data_rdy_poll,
|
||||
IRQF_TRIGGER_RISING,
|
||||
@@ -55,9 +59,6 @@ int adis_probe_trigger(struct adis *adis, struct iio_dev *indio_dev)
|
||||
if (ret)
|
||||
goto error_free_trig;
|
||||
|
||||
- adis->trig->dev.parent = &adis->spi->dev;
|
||||
- adis->trig->ops = &adis_trigger_ops;
|
||||
- iio_trigger_set_drvdata(adis->trig, adis);
|
||||
ret = iio_trigger_register(adis->trig);
|
||||
|
||||
indio_dev->trig = iio_trigger_get(adis->trig);
|
||||
diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c
|
||||
index 32bb036069eb..961afb5588be 100644
|
||||
--- a/drivers/iio/industrialio-buffer.c
|
||||
+++ b/drivers/iio/industrialio-buffer.c
|
||||
@@ -174,7 +174,7 @@ unsigned int iio_buffer_poll(struct file *filp,
|
||||
struct iio_dev *indio_dev = filp->private_data;
|
||||
struct iio_buffer *rb = indio_dev->buffer;
|
||||
|
||||
- if (!indio_dev->info)
|
||||
+ if (!indio_dev->info || rb == NULL)
|
||||
return 0;
|
||||
|
||||
poll_wait(filp, &rb->pollq, wait);
|
||||
diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
|
||||
index 5a1490b046ac..3f1c4dea8866 100644
|
||||
--- a/drivers/irqchip/irq-gic-v3.c
|
||||
+++ b/drivers/irqchip/irq-gic-v3.c
|
||||
@@ -604,7 +604,7 @@ static void gic_raise_softirq(const struct cpumask *mask, unsigned int irq)
|
||||
* Ensure that stores to Normal memory are visible to the
|
||||
* other CPUs before issuing the IPI.
|
||||
*/
|
||||
- smp_wmb();
|
||||
+ wmb();
|
||||
|
||||
for_each_cpu(cpu, mask) {
|
||||
unsigned long cluster_id = cpu_logical_map(cpu) & ~0xffUL;
|
||||
diff --git a/drivers/pci/host/pci-keystone.c b/drivers/pci/host/pci-keystone.c
|
||||
index 0aa81bd3de12..fb682e8af74d 100644
|
||||
--- a/drivers/pci/host/pci-keystone.c
|
||||
+++ b/drivers/pci/host/pci-keystone.c
|
||||
@@ -179,14 +179,16 @@ static int ks_pcie_get_irq_controller_info(struct keystone_pcie *ks_pcie,
|
||||
}
|
||||
|
||||
/* interrupt controller is in a child node */
|
||||
- *np_temp = of_find_node_by_name(np_pcie, controller);
|
||||
+ *np_temp = of_get_child_by_name(np_pcie, controller);
|
||||
if (!(*np_temp)) {
|
||||
dev_err(dev, "Node for %s is absent\n", controller);
|
||||
goto out;
|
||||
}
|
||||
temp = of_irq_count(*np_temp);
|
||||
- if (!temp)
|
||||
+ if (!temp) {
|
||||
+ of_node_put(*np_temp);
|
||||
goto out;
|
||||
+ }
|
||||
if (temp > max_host_irqs)
|
||||
dev_warn(dev, "Too many %s interrupts defined %u\n",
|
||||
(legacy ? "legacy" : "MSI"), temp);
|
||||
@@ -200,6 +202,9 @@ static int ks_pcie_get_irq_controller_info(struct keystone_pcie *ks_pcie,
|
||||
if (!host_irqs[temp])
|
||||
break;
|
||||
}
|
||||
+
|
||||
+ of_node_put(*np_temp);
|
||||
+
|
||||
if (temp) {
|
||||
*num_irqs = temp;
|
||||
ret = 0;
|
||||
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.h b/drivers/scsi/ibmvscsi/ibmvfc.h
|
||||
index 8fae03215a85..543c10266984 100644
|
||||
--- a/drivers/scsi/ibmvscsi/ibmvfc.h
|
||||
+++ b/drivers/scsi/ibmvscsi/ibmvfc.h
|
||||
@@ -366,7 +366,7 @@ enum ibmvfc_fcp_rsp_info_codes {
|
||||
};
|
||||
|
||||
struct ibmvfc_fcp_rsp_info {
|
||||
- __be16 reserved;
|
||||
+ u8 reserved[3];
|
||||
u8 rsp_code;
|
||||
u8 reserved2[4];
|
||||
}__attribute__((packed, aligned (2)));
|
||||
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
|
||||
index c05c4f877750..774c97bb1c08 100644
|
||||
--- a/drivers/usb/core/quirks.c
|
||||
+++ b/drivers/usb/core/quirks.c
|
||||
@@ -225,6 +225,9 @@ static const struct usb_device_id usb_quirk_list[] = {
|
||||
{ USB_DEVICE(0x1a0a, 0x0200), .driver_info =
|
||||
USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL },
|
||||
|
||||
+ /* Corsair K70 RGB */
|
||||
+ { USB_DEVICE(0x1b1c, 0x1b13), .driver_info = USB_QUIRK_DELAY_INIT },
|
||||
+
|
||||
/* Corsair Strafe RGB */
|
||||
{ USB_DEVICE(0x1b1c, 0x1b20), .driver_info = USB_QUIRK_DELAY_INIT },
|
||||
|
||||
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
|
||||
index d3bd1afd6302..b6037a0ae829 100644
|
||||
--- a/drivers/usb/dwc3/gadget.c
|
||||
+++ b/drivers/usb/dwc3/gadget.c
|
||||
@@ -2393,6 +2393,8 @@ static void dwc3_gadget_conndone_interrupt(struct dwc3 *dwc)
|
||||
break;
|
||||
}
|
||||
|
||||
+ dwc->eps[1]->endpoint.maxpacket = dwc->gadget.ep0->maxpacket;
|
||||
+
|
||||
/* Enable USB2 LPM Capability */
|
||||
|
||||
if ((dwc->revision > DWC3_REVISION_194A)
|
||||
diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c
|
||||
index eb298daf49c7..51c2b05b5dd9 100644
|
||||
--- a/drivers/usb/gadget/function/f_fs.c
|
||||
+++ b/drivers/usb/gadget/function/f_fs.c
|
||||
@@ -2756,10 +2756,8 @@ static int _ffs_func_bind(struct usb_configuration *c,
|
||||
struct ffs_data *ffs = func->ffs;
|
||||
|
||||
const int full = !!func->ffs->fs_descs_count;
|
||||
- const int high = gadget_is_dualspeed(func->gadget) &&
|
||||
- func->ffs->hs_descs_count;
|
||||
- const int super = gadget_is_superspeed(func->gadget) &&
|
||||
- func->ffs->ss_descs_count;
|
||||
+ const int high = !!func->ffs->hs_descs_count;
|
||||
+ const int super = !!func->ffs->ss_descs_count;
|
||||
|
||||
int fs_len, hs_len, ss_len, ret, i;
|
||||
struct ffs_ep *eps_ptr;
|
||||
diff --git a/drivers/usb/host/ohci-q.c b/drivers/usb/host/ohci-q.c
|
||||
index 641fed609911..24edb7674710 100644
|
||||
--- a/drivers/usb/host/ohci-q.c
|
||||
+++ b/drivers/usb/host/ohci-q.c
|
||||
@@ -1018,6 +1018,8 @@ skip_ed:
|
||||
* have modified this list. normally it's just prepending
|
||||
* entries (which we'd ignore), but paranoia won't hurt.
|
||||
*/
|
||||
+ *last = ed->ed_next;
|
||||
+ ed->ed_next = NULL;
|
||||
modified = 0;
|
||||
|
||||
/* unlink urbs as requested, but rescan the list after
|
||||
@@ -1076,21 +1078,22 @@ rescan_this:
|
||||
goto rescan_this;
|
||||
|
||||
/*
|
||||
- * If no TDs are queued, take ED off the ed_rm_list.
|
||||
+ * If no TDs are queued, ED is now idle.
|
||||
* Otherwise, if the HC is running, reschedule.
|
||||
- * If not, leave it on the list for further dequeues.
|
||||
+ * If the HC isn't running, add ED back to the
|
||||
+ * start of the list for later processing.
|
||||
*/
|
||||
if (list_empty(&ed->td_list)) {
|
||||
- *last = ed->ed_next;
|
||||
- ed->ed_next = NULL;
|
||||
ed->state = ED_IDLE;
|
||||
list_del(&ed->in_use_list);
|
||||
} else if (ohci->rh_state == OHCI_RH_RUNNING) {
|
||||
- *last = ed->ed_next;
|
||||
- ed->ed_next = NULL;
|
||||
ed_schedule(ohci, ed);
|
||||
} else {
|
||||
- last = &ed->ed_next;
|
||||
+ ed->ed_next = ohci->ed_rm_list;
|
||||
+ ohci->ed_rm_list = ed;
|
||||
+ /* Don't loop on the same ED */
|
||||
+ if (last == &ohci->ed_rm_list)
|
||||
+ last = &ed->ed_next;
|
||||
}
|
||||
|
||||
if (modified)
|
||||
diff --git a/drivers/usb/misc/ldusb.c b/drivers/usb/misc/ldusb.c
|
||||
index cce22ff1c2eb..e9113238d9e3 100644
|
||||
--- a/drivers/usb/misc/ldusb.c
|
||||
+++ b/drivers/usb/misc/ldusb.c
|
||||
@@ -46,6 +46,9 @@
|
||||
#define USB_DEVICE_ID_LD_MICROCASSYTIME 0x1033 /* USB Product ID of Micro-CASSY Time (reserved) */
|
||||
#define USB_DEVICE_ID_LD_MICROCASSYTEMPERATURE 0x1035 /* USB Product ID of Micro-CASSY Temperature */
|
||||
#define USB_DEVICE_ID_LD_MICROCASSYPH 0x1038 /* USB Product ID of Micro-CASSY pH */
|
||||
+#define USB_DEVICE_ID_LD_POWERANALYSERCASSY 0x1040 /* USB Product ID of Power Analyser CASSY */
|
||||
+#define USB_DEVICE_ID_LD_CONVERTERCONTROLLERCASSY 0x1042 /* USB Product ID of Converter Controller CASSY */
|
||||
+#define USB_DEVICE_ID_LD_MACHINETESTCASSY 0x1043 /* USB Product ID of Machine Test CASSY */
|
||||
#define USB_DEVICE_ID_LD_JWM 0x1080 /* USB Product ID of Joule and Wattmeter */
|
||||
#define USB_DEVICE_ID_LD_DMMP 0x1081 /* USB Product ID of Digital Multimeter P (reserved) */
|
||||
#define USB_DEVICE_ID_LD_UMIP 0x1090 /* USB Product ID of UMI P */
|
||||
@@ -88,6 +91,9 @@ static const struct usb_device_id ld_usb_table[] = {
|
||||
{ USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MICROCASSYTIME) },
|
||||
{ USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MICROCASSYTEMPERATURE) },
|
||||
{ USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MICROCASSYPH) },
|
||||
+ { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_POWERANALYSERCASSY) },
|
||||
+ { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_CONVERTERCONTROLLERCASSY) },
|
||||
+ { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MACHINETESTCASSY) },
|
||||
{ USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_JWM) },
|
||||
{ USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_DMMP) },
|
||||
{ USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_UMIP) },
|
||||
diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c
|
||||
index 8bb9367ada45..6f37966ea54b 100644
|
||||
--- a/drivers/usb/renesas_usbhs/fifo.c
|
||||
+++ b/drivers/usb/renesas_usbhs/fifo.c
|
||||
@@ -999,6 +999,10 @@ static int usbhsf_dma_prepare_pop_with_usb_dmac(struct usbhs_pkt *pkt,
|
||||
if ((uintptr_t)pkt->buf & (USBHS_USB_DMAC_XFER_SIZE - 1))
|
||||
goto usbhsf_pio_prepare_pop;
|
||||
|
||||
+ /* return at this time if the pipe is running */
|
||||
+ if (usbhs_pipe_is_running(pipe))
|
||||
+ return 0;
|
||||
+
|
||||
usbhs_pipe_config_change_bfre(pipe, 1);
|
||||
|
||||
ret = usbhsf_fifo_select(pipe, fifo, 0);
|
||||
@@ -1189,6 +1193,7 @@ static int usbhsf_dma_pop_done_with_usb_dmac(struct usbhs_pkt *pkt,
|
||||
usbhsf_fifo_clear(pipe, fifo);
|
||||
pkt->actual = usbhs_dma_calc_received_size(pkt, chan, rcv_len);
|
||||
|
||||
+ usbhs_pipe_running(pipe, 0);
|
||||
usbhsf_dma_stop(pipe, fifo);
|
||||
usbhsf_dma_unmap(pkt);
|
||||
usbhsf_fifo_unselect(pipe, pipe->fifo);
|
||||
diff --git a/include/net/ip_tunnels.h b/include/net/ip_tunnels.h
|
||||
index 86a7bdd61d1a..74bc08d82e14 100644
|
||||
--- a/include/net/ip_tunnels.h
|
||||
+++ b/include/net/ip_tunnels.h
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <net/netns/generic.h>
|
||||
#include <net/rtnetlink.h>
|
||||
#include <net/lwtunnel.h>
|
||||
+#include <net/dst_cache.h>
|
||||
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
#include <net/ipv6.h>
|
||||
@@ -85,11 +86,6 @@ struct ip_tunnel_prl_entry {
|
||||
struct rcu_head rcu_head;
|
||||
};
|
||||
|
||||
-struct ip_tunnel_dst {
|
||||
- struct dst_entry __rcu *dst;
|
||||
- __be32 saddr;
|
||||
-};
|
||||
-
|
||||
struct metadata_dst;
|
||||
|
||||
struct ip_tunnel {
|
||||
@@ -108,7 +104,7 @@ struct ip_tunnel {
|
||||
int tun_hlen; /* Precalculated header length */
|
||||
int mlink;
|
||||
|
||||
- struct ip_tunnel_dst __percpu *dst_cache;
|
||||
+ struct dst_cache dst_cache;
|
||||
|
||||
struct ip_tunnel_parm parms;
|
||||
|
||||
@@ -248,7 +244,6 @@ int ip_tunnel_changelink(struct net_device *dev, struct nlattr *tb[],
|
||||
int ip_tunnel_newlink(struct net_device *dev, struct nlattr *tb[],
|
||||
struct ip_tunnel_parm *p);
|
||||
void ip_tunnel_setup(struct net_device *dev, int net_id);
|
||||
-void ip_tunnel_dst_reset_all(struct ip_tunnel *t);
|
||||
int ip_tunnel_encap_setup(struct ip_tunnel *t,
|
||||
struct ip_tunnel_encap *ipencap);
|
||||
|
||||
diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig
|
||||
index 416dfa004cfb..93581bba8643 100644
|
||||
--- a/net/ipv4/Kconfig
|
||||
+++ b/net/ipv4/Kconfig
|
||||
@@ -186,6 +186,7 @@ config NET_IPGRE_DEMUX
|
||||
|
||||
config NET_IP_TUNNEL
|
||||
tristate
|
||||
+ select DST_CACHE
|
||||
default n
|
||||
|
||||
config NET_IPGRE
|
||||
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
|
||||
index 3a819d2cc04b..d35509212013 100644
|
||||
--- a/net/ipv4/ip_sockglue.c
|
||||
+++ b/net/ipv4/ip_sockglue.c
|
||||
@@ -1527,10 +1527,7 @@ int ip_getsockopt(struct sock *sk, int level,
|
||||
if (get_user(len, optlen))
|
||||
return -EFAULT;
|
||||
|
||||
- lock_sock(sk);
|
||||
- err = nf_getsockopt(sk, PF_INET, optname, optval,
|
||||
- &len);
|
||||
- release_sock(sk);
|
||||
+ err = nf_getsockopt(sk, PF_INET, optname, optval, &len);
|
||||
if (err >= 0)
|
||||
err = put_user(len, optlen);
|
||||
return err;
|
||||
@@ -1562,9 +1559,7 @@ int compat_ip_getsockopt(struct sock *sk, int level, int optname,
|
||||
if (get_user(len, optlen))
|
||||
return -EFAULT;
|
||||
|
||||
- lock_sock(sk);
|
||||
err = compat_nf_getsockopt(sk, PF_INET, optname, optval, &len);
|
||||
- release_sock(sk);
|
||||
if (err >= 0)
|
||||
err = put_user(len, optlen);
|
||||
return err;
|
||||
diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c
|
||||
index c18245e05d26..80e2d1b0c08c 100644
|
||||
--- a/net/ipv4/ip_tunnel.c
|
||||
+++ b/net/ipv4/ip_tunnel.c
|
||||
@@ -69,61 +69,6 @@ static unsigned int ip_tunnel_hash(__be32 key, __be32 remote)
|
||||
IP_TNL_HASH_BITS);
|
||||
}
|
||||
|
||||
-static void __tunnel_dst_set(struct ip_tunnel_dst *idst,
|
||||
- struct dst_entry *dst, __be32 saddr)
|
||||
-{
|
||||
- struct dst_entry *old_dst;
|
||||
-
|
||||
- dst_clone(dst);
|
||||
- old_dst = xchg((__force struct dst_entry **)&idst->dst, dst);
|
||||
- dst_release(old_dst);
|
||||
- idst->saddr = saddr;
|
||||
-}
|
||||
-
|
||||
-static noinline void tunnel_dst_set(struct ip_tunnel *t,
|
||||
- struct dst_entry *dst, __be32 saddr)
|
||||
-{
|
||||
- __tunnel_dst_set(raw_cpu_ptr(t->dst_cache), dst, saddr);
|
||||
-}
|
||||
-
|
||||
-static void tunnel_dst_reset(struct ip_tunnel *t)
|
||||
-{
|
||||
- tunnel_dst_set(t, NULL, 0);
|
||||
-}
|
||||
-
|
||||
-void ip_tunnel_dst_reset_all(struct ip_tunnel *t)
|
||||
-{
|
||||
- int i;
|
||||
-
|
||||
- for_each_possible_cpu(i)
|
||||
- __tunnel_dst_set(per_cpu_ptr(t->dst_cache, i), NULL, 0);
|
||||
-}
|
||||
-EXPORT_SYMBOL(ip_tunnel_dst_reset_all);
|
||||
-
|
||||
-static struct rtable *tunnel_rtable_get(struct ip_tunnel *t,
|
||||
- u32 cookie, __be32 *saddr)
|
||||
-{
|
||||
- struct ip_tunnel_dst *idst;
|
||||
- struct dst_entry *dst;
|
||||
-
|
||||
- rcu_read_lock();
|
||||
- idst = raw_cpu_ptr(t->dst_cache);
|
||||
- dst = rcu_dereference(idst->dst);
|
||||
- if (dst && !atomic_inc_not_zero(&dst->__refcnt))
|
||||
- dst = NULL;
|
||||
- if (dst) {
|
||||
- if (!dst->obsolete || dst->ops->check(dst, cookie)) {
|
||||
- *saddr = idst->saddr;
|
||||
- } else {
|
||||
- tunnel_dst_reset(t);
|
||||
- dst_release(dst);
|
||||
- dst = NULL;
|
||||
- }
|
||||
- }
|
||||
- rcu_read_unlock();
|
||||
- return (struct rtable *)dst;
|
||||
-}
|
||||
-
|
||||
static bool ip_tunnel_key_match(const struct ip_tunnel_parm *p,
|
||||
__be16 flags, __be32 key)
|
||||
{
|
||||
@@ -382,11 +327,12 @@ static int ip_tunnel_bind_dev(struct net_device *dev)
|
||||
|
||||
if (!IS_ERR(rt)) {
|
||||
tdev = rt->dst.dev;
|
||||
- tunnel_dst_set(tunnel, &rt->dst, fl4.saddr);
|
||||
ip_rt_put(rt);
|
||||
}
|
||||
if (dev->type != ARPHRD_ETHER)
|
||||
dev->flags |= IFF_POINTOPOINT;
|
||||
+
|
||||
+ dst_cache_reset(&tunnel->dst_cache);
|
||||
}
|
||||
|
||||
if (!tdev && tunnel->parms.link)
|
||||
@@ -733,7 +679,8 @@ void ip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev,
|
||||
if (ip_tunnel_encap(skb, tunnel, &protocol, &fl4) < 0)
|
||||
goto tx_error;
|
||||
|
||||
- rt = connected ? tunnel_rtable_get(tunnel, 0, &fl4.saddr) : NULL;
|
||||
+ rt = connected ? dst_cache_get_ip4(&tunnel->dst_cache, &fl4.saddr) :
|
||||
+ NULL;
|
||||
|
||||
if (!rt) {
|
||||
rt = ip_route_output_key(tunnel->net, &fl4);
|
||||
@@ -743,7 +690,8 @@ void ip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev,
|
||||
goto tx_error;
|
||||
}
|
||||
if (connected)
|
||||
- tunnel_dst_set(tunnel, &rt->dst, fl4.saddr);
|
||||
+ dst_cache_set_ip4(&tunnel->dst_cache, &rt->dst,
|
||||
+ fl4.saddr);
|
||||
}
|
||||
|
||||
if (rt->dst.dev == dev) {
|
||||
@@ -841,7 +789,7 @@ static void ip_tunnel_update(struct ip_tunnel_net *itn,
|
||||
if (set_mtu)
|
||||
dev->mtu = mtu;
|
||||
}
|
||||
- ip_tunnel_dst_reset_all(t);
|
||||
+ dst_cache_reset(&t->dst_cache);
|
||||
netdev_state_change(dev);
|
||||
}
|
||||
|
||||
@@ -980,7 +928,7 @@ static void ip_tunnel_dev_free(struct net_device *dev)
|
||||
struct ip_tunnel *tunnel = netdev_priv(dev);
|
||||
|
||||
gro_cells_destroy(&tunnel->gro_cells);
|
||||
- free_percpu(tunnel->dst_cache);
|
||||
+ dst_cache_destroy(&tunnel->dst_cache);
|
||||
free_percpu(dev->tstats);
|
||||
free_netdev(dev);
|
||||
}
|
||||
@@ -1174,15 +1122,15 @@ int ip_tunnel_init(struct net_device *dev)
|
||||
if (!dev->tstats)
|
||||
return -ENOMEM;
|
||||
|
||||
- tunnel->dst_cache = alloc_percpu(struct ip_tunnel_dst);
|
||||
- if (!tunnel->dst_cache) {
|
||||
+ err = dst_cache_init(&tunnel->dst_cache, GFP_KERNEL);
|
||||
+ if (err) {
|
||||
free_percpu(dev->tstats);
|
||||
- return -ENOMEM;
|
||||
+ return err;
|
||||
}
|
||||
|
||||
err = gro_cells_init(&tunnel->gro_cells, dev);
|
||||
if (err) {
|
||||
- free_percpu(tunnel->dst_cache);
|
||||
+ dst_cache_destroy(&tunnel->dst_cache);
|
||||
free_percpu(dev->tstats);
|
||||
return err;
|
||||
}
|
||||
@@ -1212,7 +1160,7 @@ void ip_tunnel_uninit(struct net_device *dev)
|
||||
if (itn->fb_tunnel_dev != dev)
|
||||
ip_tunnel_del(itn, netdev_priv(dev));
|
||||
|
||||
- ip_tunnel_dst_reset_all(tunnel);
|
||||
+ dst_cache_reset(&tunnel->dst_cache);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ip_tunnel_uninit);
|
||||
|
||||
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
|
||||
index ede9d0e20538..8d11a034ca3f 100644
|
||||
--- a/net/ipv6/ipv6_sockglue.c
|
||||
+++ b/net/ipv6/ipv6_sockglue.c
|
||||
@@ -1340,10 +1340,7 @@ int ipv6_getsockopt(struct sock *sk, int level, int optname,
|
||||
if (get_user(len, optlen))
|
||||
return -EFAULT;
|
||||
|
||||
- lock_sock(sk);
|
||||
- err = nf_getsockopt(sk, PF_INET6, optname, optval,
|
||||
- &len);
|
||||
- release_sock(sk);
|
||||
+ err = nf_getsockopt(sk, PF_INET6, optname, optval, &len);
|
||||
if (err >= 0)
|
||||
err = put_user(len, optlen);
|
||||
}
|
||||
@@ -1382,10 +1379,7 @@ int compat_ipv6_getsockopt(struct sock *sk, int level, int optname,
|
||||
if (get_user(len, optlen))
|
||||
return -EFAULT;
|
||||
|
||||
- lock_sock(sk);
|
||||
- err = compat_nf_getsockopt(sk, PF_INET6,
|
||||
- optname, optval, &len);
|
||||
- release_sock(sk);
|
||||
+ err = compat_nf_getsockopt(sk, PF_INET6, optname, optval, &len);
|
||||
if (err >= 0)
|
||||
err = put_user(len, optlen);
|
||||
}
|
||||
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
|
||||
index b7ea5eaa4fd1..d17d64edb718 100644
|
||||
--- a/net/ipv6/sit.c
|
||||
+++ b/net/ipv6/sit.c
|
||||
@@ -475,7 +475,7 @@ static void ipip6_tunnel_uninit(struct net_device *dev)
|
||||
ipip6_tunnel_unlink(sitn, tunnel);
|
||||
ipip6_tunnel_del_prl(tunnel, NULL);
|
||||
}
|
||||
- ip_tunnel_dst_reset_all(tunnel);
|
||||
+ dst_cache_reset(&tunnel->dst_cache);
|
||||
dev_put(dev);
|
||||
}
|
||||
|
||||
@@ -1098,7 +1098,7 @@ static void ipip6_tunnel_update(struct ip_tunnel *t, struct ip_tunnel_parm *p)
|
||||
t->parms.link = p->link;
|
||||
ipip6_tunnel_bind_dev(t->dev);
|
||||
}
|
||||
- ip_tunnel_dst_reset_all(t);
|
||||
+ dst_cache_reset(&t->dst_cache);
|
||||
netdev_state_change(t->dev);
|
||||
}
|
||||
|
||||
@@ -1129,7 +1129,7 @@ static int ipip6_tunnel_update_6rd(struct ip_tunnel *t,
|
||||
t->ip6rd.relay_prefix = relay_prefix;
|
||||
t->ip6rd.prefixlen = ip6rd->prefixlen;
|
||||
t->ip6rd.relay_prefixlen = ip6rd->relay_prefixlen;
|
||||
- ip_tunnel_dst_reset_all(t);
|
||||
+ dst_cache_reset(&t->dst_cache);
|
||||
netdev_state_change(t->dev);
|
||||
return 0;
|
||||
}
|
||||
@@ -1283,7 +1283,7 @@ ipip6_tunnel_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
|
||||
err = ipip6_tunnel_add_prl(t, &prl, cmd == SIOCCHGPRL);
|
||||
break;
|
||||
}
|
||||
- ip_tunnel_dst_reset_all(t);
|
||||
+ dst_cache_reset(&t->dst_cache);
|
||||
netdev_state_change(dev);
|
||||
break;
|
||||
|
||||
@@ -1344,7 +1344,7 @@ static void ipip6_dev_free(struct net_device *dev)
|
||||
{
|
||||
struct ip_tunnel *tunnel = netdev_priv(dev);
|
||||
|
||||
- free_percpu(tunnel->dst_cache);
|
||||
+ dst_cache_destroy(&tunnel->dst_cache);
|
||||
free_percpu(dev->tstats);
|
||||
free_netdev(dev);
|
||||
}
|
||||
@@ -1377,6 +1377,7 @@ static void ipip6_tunnel_setup(struct net_device *dev)
|
||||
static int ipip6_tunnel_init(struct net_device *dev)
|
||||
{
|
||||
struct ip_tunnel *tunnel = netdev_priv(dev);
|
||||
+ int err;
|
||||
|
||||
tunnel->dev = dev;
|
||||
tunnel->net = dev_net(dev);
|
||||
@@ -1387,11 +1388,11 @@ static int ipip6_tunnel_init(struct net_device *dev)
|
||||
if (!dev->tstats)
|
||||
return -ENOMEM;
|
||||
|
||||
- tunnel->dst_cache = alloc_percpu(struct ip_tunnel_dst);
|
||||
- if (!tunnel->dst_cache) {
|
||||
+ err = dst_cache_init(&tunnel->dst_cache, GFP_KERNEL);
|
||||
+ if (err) {
|
||||
free_percpu(dev->tstats);
|
||||
dev->tstats = NULL;
|
||||
- return -ENOMEM;
|
||||
+ return err;
|
||||
}
|
||||
|
||||
return 0;
|
||||
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
|
||||
index 19322c047386..00a8cc572a22 100644
|
||||
--- a/net/mac80211/cfg.c
|
||||
+++ b/net/mac80211/cfg.c
|
||||
@@ -2877,7 +2877,7 @@ cfg80211_beacon_dup(struct cfg80211_beacon_data *beacon)
|
||||
}
|
||||
if (beacon->probe_resp_len) {
|
||||
new_beacon->probe_resp_len = beacon->probe_resp_len;
|
||||
- beacon->probe_resp = pos;
|
||||
+ new_beacon->probe_resp = pos;
|
||||
memcpy(pos, beacon->probe_resp, beacon->probe_resp_len);
|
||||
pos += beacon->probe_resp_len;
|
||||
}
|
1104
patch/kernel/udoo-next/04-patch-4.4.119-120.patch
Normal file
1104
patch/kernel/udoo-next/04-patch-4.4.119-120.patch
Normal file
File diff suppressed because it is too large
Load diff
1085
patch/kernel/udoo-next/04-patch-4.4.120-121.patch
Normal file
1085
patch/kernel/udoo-next/04-patch-4.4.120-121.patch
Normal file
File diff suppressed because it is too large
Load diff
2177
patch/kernel/udoo-next/04-patch-4.4.121-122.patch
Normal file
2177
patch/kernel/udoo-next/04-patch-4.4.121-122.patch
Normal file
File diff suppressed because it is too large
Load diff
3500
patch/kernel/udoo-next/04-patch-4.4.122-123.patch
Normal file
3500
patch/kernel/udoo-next/04-patch-4.4.122-123.patch
Normal file
File diff suppressed because it is too large
Load diff
3077
patch/kernel/udoo-next/04-patch-4.4.123-124.patch
Normal file
3077
patch/kernel/udoo-next/04-patch-4.4.123-124.patch
Normal file
File diff suppressed because it is too large
Load diff
1326
patch/kernel/udoo-next/04-patch-4.4.124-125.patch
Normal file
1326
patch/kernel/udoo-next/04-patch-4.4.124-125.patch
Normal file
File diff suppressed because it is too large
Load diff
455
patch/kernel/udoo-next/04-patch-4.4.125-126.patch
Normal file
455
patch/kernel/udoo-next/04-patch-4.4.125-126.patch
Normal file
|
@ -0,0 +1,455 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index 7dcafa5dcd34..2b699c5f6de4 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 4
|
||||
-SUBLEVEL = 125
|
||||
+SUBLEVEL = 126
|
||||
EXTRAVERSION =
|
||||
NAME = Blurry Fish Butt
|
||||
|
||||
diff --git a/drivers/net/ethernet/arc/emac_rockchip.c b/drivers/net/ethernet/arc/emac_rockchip.c
|
||||
index c31c7407b753..425dae560322 100644
|
||||
--- a/drivers/net/ethernet/arc/emac_rockchip.c
|
||||
+++ b/drivers/net/ethernet/arc/emac_rockchip.c
|
||||
@@ -150,8 +150,10 @@ static int emac_rockchip_probe(struct platform_device *pdev)
|
||||
/* Optional regulator for PHY */
|
||||
priv->regulator = devm_regulator_get_optional(dev, "phy");
|
||||
if (IS_ERR(priv->regulator)) {
|
||||
- if (PTR_ERR(priv->regulator) == -EPROBE_DEFER)
|
||||
- return -EPROBE_DEFER;
|
||||
+ if (PTR_ERR(priv->regulator) == -EPROBE_DEFER) {
|
||||
+ err = -EPROBE_DEFER;
|
||||
+ goto out_clk_disable;
|
||||
+ }
|
||||
dev_err(dev, "no regulator found\n");
|
||||
priv->regulator = NULL;
|
||||
}
|
||||
diff --git a/drivers/net/ethernet/broadcom/bcmsysport.c b/drivers/net/ethernet/broadcom/bcmsysport.c
|
||||
index 027705117086..af9ec57bbebf 100644
|
||||
--- a/drivers/net/ethernet/broadcom/bcmsysport.c
|
||||
+++ b/drivers/net/ethernet/broadcom/bcmsysport.c
|
||||
@@ -729,37 +729,33 @@ static unsigned int __bcm_sysport_tx_reclaim(struct bcm_sysport_priv *priv,
|
||||
struct bcm_sysport_tx_ring *ring)
|
||||
{
|
||||
struct net_device *ndev = priv->netdev;
|
||||
- unsigned int c_index, last_c_index, last_tx_cn, num_tx_cbs;
|
||||
unsigned int pkts_compl = 0, bytes_compl = 0;
|
||||
+ unsigned int txbds_processed = 0;
|
||||
struct bcm_sysport_cb *cb;
|
||||
+ unsigned int txbds_ready;
|
||||
+ unsigned int c_index;
|
||||
u32 hw_ind;
|
||||
|
||||
/* Compute how many descriptors have been processed since last call */
|
||||
hw_ind = tdma_readl(priv, TDMA_DESC_RING_PROD_CONS_INDEX(ring->index));
|
||||
c_index = (hw_ind >> RING_CONS_INDEX_SHIFT) & RING_CONS_INDEX_MASK;
|
||||
- ring->p_index = (hw_ind & RING_PROD_INDEX_MASK);
|
||||
-
|
||||
- last_c_index = ring->c_index;
|
||||
- num_tx_cbs = ring->size;
|
||||
-
|
||||
- c_index &= (num_tx_cbs - 1);
|
||||
-
|
||||
- if (c_index >= last_c_index)
|
||||
- last_tx_cn = c_index - last_c_index;
|
||||
- else
|
||||
- last_tx_cn = num_tx_cbs - last_c_index + c_index;
|
||||
+ txbds_ready = (c_index - ring->c_index) & RING_CONS_INDEX_MASK;
|
||||
|
||||
netif_dbg(priv, tx_done, ndev,
|
||||
- "ring=%d c_index=%d last_tx_cn=%d last_c_index=%d\n",
|
||||
- ring->index, c_index, last_tx_cn, last_c_index);
|
||||
+ "ring=%d old_c_index=%u c_index=%u txbds_ready=%u\n",
|
||||
+ ring->index, ring->c_index, c_index, txbds_ready);
|
||||
|
||||
- while (last_tx_cn-- > 0) {
|
||||
- cb = ring->cbs + last_c_index;
|
||||
+ while (txbds_processed < txbds_ready) {
|
||||
+ cb = &ring->cbs[ring->clean_index];
|
||||
bcm_sysport_tx_reclaim_one(priv, cb, &bytes_compl, &pkts_compl);
|
||||
|
||||
ring->desc_count++;
|
||||
- last_c_index++;
|
||||
- last_c_index &= (num_tx_cbs - 1);
|
||||
+ txbds_processed++;
|
||||
+
|
||||
+ if (likely(ring->clean_index < ring->size - 1))
|
||||
+ ring->clean_index++;
|
||||
+ else
|
||||
+ ring->clean_index = 0;
|
||||
}
|
||||
|
||||
ring->c_index = c_index;
|
||||
@@ -1229,6 +1225,7 @@ static int bcm_sysport_init_tx_ring(struct bcm_sysport_priv *priv,
|
||||
netif_napi_add(priv->netdev, &ring->napi, bcm_sysport_tx_poll, 64);
|
||||
ring->index = index;
|
||||
ring->size = size;
|
||||
+ ring->clean_index = 0;
|
||||
ring->alloc_size = ring->size;
|
||||
ring->desc_cpu = p;
|
||||
ring->desc_count = ring->size;
|
||||
diff --git a/drivers/net/ethernet/broadcom/bcmsysport.h b/drivers/net/ethernet/broadcom/bcmsysport.h
|
||||
index f28bf545d7f4..8ace6ecb5f79 100644
|
||||
--- a/drivers/net/ethernet/broadcom/bcmsysport.h
|
||||
+++ b/drivers/net/ethernet/broadcom/bcmsysport.h
|
||||
@@ -638,7 +638,7 @@ struct bcm_sysport_tx_ring {
|
||||
unsigned int desc_count; /* Number of descriptors */
|
||||
unsigned int curr_desc; /* Current descriptor */
|
||||
unsigned int c_index; /* Last consumer index */
|
||||
- unsigned int p_index; /* Current producer index */
|
||||
+ unsigned int clean_index; /* Current clean index */
|
||||
struct bcm_sysport_cb *cbs; /* Transmit control blocks */
|
||||
struct dma_desc *desc_cpu; /* CPU view of the descriptor */
|
||||
struct bcm_sysport_priv *priv; /* private context backpointer */
|
||||
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
|
||||
index 458e2d97d096..ae8e4fc22e7b 100644
|
||||
--- a/drivers/net/ethernet/freescale/fec_main.c
|
||||
+++ b/drivers/net/ethernet/freescale/fec_main.c
|
||||
@@ -3539,6 +3539,8 @@ fec_drv_remove(struct platform_device *pdev)
|
||||
fec_enet_mii_remove(fep);
|
||||
if (fep->reg_phy)
|
||||
regulator_disable(fep->reg_phy);
|
||||
+ pm_runtime_put(&pdev->dev);
|
||||
+ pm_runtime_disable(&pdev->dev);
|
||||
of_node_put(fep->phy_node);
|
||||
free_netdev(ndev);
|
||||
|
||||
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
|
||||
index fc958067d10a..435466c17852 100644
|
||||
--- a/drivers/net/ethernet/ti/cpsw.c
|
||||
+++ b/drivers/net/ethernet/ti/cpsw.c
|
||||
@@ -878,7 +878,8 @@ static void _cpsw_adjust_link(struct cpsw_slave *slave,
|
||||
/* set speed_in input in case RMII mode is used in 100Mbps */
|
||||
if (phy->speed == 100)
|
||||
mac_control |= BIT(15);
|
||||
- else if (phy->speed == 10)
|
||||
+ /* in band mode only works in 10Mbps RGMII mode */
|
||||
+ else if ((phy->speed == 10) && phy_interface_is_rgmii(phy))
|
||||
mac_control |= BIT(18); /* In Band mode */
|
||||
|
||||
if (priv->rx_pause)
|
||||
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
|
||||
index 61cd53838360..9bca36e1fefd 100644
|
||||
--- a/drivers/net/team/team.c
|
||||
+++ b/drivers/net/team/team.c
|
||||
@@ -2380,7 +2380,7 @@ send_done:
|
||||
if (!nlh) {
|
||||
err = __send_and_alloc_skb(&skb, team, portid, send_func);
|
||||
if (err)
|
||||
- goto errout;
|
||||
+ return err;
|
||||
goto send_done;
|
||||
}
|
||||
|
||||
@@ -2660,7 +2660,7 @@ send_done:
|
||||
if (!nlh) {
|
||||
err = __send_and_alloc_skb(&skb, team, portid, send_func);
|
||||
if (err)
|
||||
- goto errout;
|
||||
+ return err;
|
||||
goto send_done;
|
||||
}
|
||||
|
||||
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
|
||||
index 75d37148c8cd..95c631125a20 100644
|
||||
--- a/drivers/s390/net/qeth_core_main.c
|
||||
+++ b/drivers/s390/net/qeth_core_main.c
|
||||
@@ -517,8 +517,7 @@ static inline int qeth_is_cq(struct qeth_card *card, unsigned int queue)
|
||||
queue == card->qdio.no_in_queues - 1;
|
||||
}
|
||||
|
||||
-
|
||||
-static int qeth_issue_next_read(struct qeth_card *card)
|
||||
+static int __qeth_issue_next_read(struct qeth_card *card)
|
||||
{
|
||||
int rc;
|
||||
struct qeth_cmd_buffer *iob;
|
||||
@@ -549,6 +548,17 @@ static int qeth_issue_next_read(struct qeth_card *card)
|
||||
return rc;
|
||||
}
|
||||
|
||||
+static int qeth_issue_next_read(struct qeth_card *card)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ spin_lock_irq(get_ccwdev_lock(CARD_RDEV(card)));
|
||||
+ ret = __qeth_issue_next_read(card);
|
||||
+ spin_unlock_irq(get_ccwdev_lock(CARD_RDEV(card)));
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
static struct qeth_reply *qeth_alloc_reply(struct qeth_card *card)
|
||||
{
|
||||
struct qeth_reply *reply;
|
||||
@@ -952,7 +962,7 @@ void qeth_clear_thread_running_bit(struct qeth_card *card, unsigned long thread)
|
||||
spin_lock_irqsave(&card->thread_mask_lock, flags);
|
||||
card->thread_running_mask &= ~thread;
|
||||
spin_unlock_irqrestore(&card->thread_mask_lock, flags);
|
||||
- wake_up(&card->wait_q);
|
||||
+ wake_up_all(&card->wait_q);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(qeth_clear_thread_running_bit);
|
||||
|
||||
@@ -1156,6 +1166,7 @@ static void qeth_irq(struct ccw_device *cdev, unsigned long intparm,
|
||||
}
|
||||
rc = qeth_get_problem(cdev, irb);
|
||||
if (rc) {
|
||||
+ card->read_or_write_problem = 1;
|
||||
qeth_clear_ipacmd_list(card);
|
||||
qeth_schedule_recovery(card);
|
||||
goto out;
|
||||
@@ -1174,7 +1185,7 @@ static void qeth_irq(struct ccw_device *cdev, unsigned long intparm,
|
||||
return;
|
||||
if (channel == &card->read &&
|
||||
channel->state == CH_STATE_UP)
|
||||
- qeth_issue_next_read(card);
|
||||
+ __qeth_issue_next_read(card);
|
||||
|
||||
iob = channel->iob;
|
||||
index = channel->buf_no;
|
||||
@@ -4969,8 +4980,6 @@ static void qeth_core_free_card(struct qeth_card *card)
|
||||
QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *));
|
||||
qeth_clean_channel(&card->read);
|
||||
qeth_clean_channel(&card->write);
|
||||
- if (card->dev)
|
||||
- free_netdev(card->dev);
|
||||
kfree(card->ip_tbd_list);
|
||||
qeth_free_qdio_buffers(card);
|
||||
unregister_service_level(&card->qeth_service_level);
|
||||
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
|
||||
index 58bcb3c9a86a..acdb5ccb0ab9 100644
|
||||
--- a/drivers/s390/net/qeth_l2_main.c
|
||||
+++ b/drivers/s390/net/qeth_l2_main.c
|
||||
@@ -1062,8 +1062,8 @@ static void qeth_l2_remove_device(struct ccwgroup_device *cgdev)
|
||||
qeth_l2_set_offline(cgdev);
|
||||
|
||||
if (card->dev) {
|
||||
- netif_napi_del(&card->napi);
|
||||
unregister_netdev(card->dev);
|
||||
+ free_netdev(card->dev);
|
||||
card->dev = NULL;
|
||||
}
|
||||
return;
|
||||
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
|
||||
index 0d6888cbd96e..bbdb3b6c54bb 100644
|
||||
--- a/drivers/s390/net/qeth_l3_main.c
|
||||
+++ b/drivers/s390/net/qeth_l3_main.c
|
||||
@@ -3243,8 +3243,8 @@ static void qeth_l3_remove_device(struct ccwgroup_device *cgdev)
|
||||
qeth_l3_set_offline(cgdev);
|
||||
|
||||
if (card->dev) {
|
||||
- netif_napi_del(&card->napi);
|
||||
unregister_netdev(card->dev);
|
||||
+ free_netdev(card->dev);
|
||||
card->dev = NULL;
|
||||
}
|
||||
|
||||
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
|
||||
index 4b43effbf4fc..cb19c9ad1b57 100644
|
||||
--- a/drivers/scsi/sg.c
|
||||
+++ b/drivers/scsi/sg.c
|
||||
@@ -2074,11 +2074,12 @@ sg_get_rq_mark(Sg_fd * sfp, int pack_id)
|
||||
if ((1 == resp->done) && (!resp->sg_io_owned) &&
|
||||
((-1 == pack_id) || (resp->header.pack_id == pack_id))) {
|
||||
resp->done = 2; /* guard against other readers */
|
||||
- break;
|
||||
+ write_unlock_irqrestore(&sfp->rq_list_lock, iflags);
|
||||
+ return resp;
|
||||
}
|
||||
}
|
||||
write_unlock_irqrestore(&sfp->rq_list_lock, iflags);
|
||||
- return resp;
|
||||
+ return NULL;
|
||||
}
|
||||
|
||||
/* always adds to end of list */
|
||||
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
|
||||
index 4889a8ab77ce..a079ed14f230 100644
|
||||
--- a/kernel/irq/manage.c
|
||||
+++ b/kernel/irq/manage.c
|
||||
@@ -1189,10 +1189,8 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
|
||||
* set the trigger type must match. Also all must
|
||||
* agree on ONESHOT.
|
||||
*/
|
||||
- unsigned int oldtype = irqd_get_trigger_type(&desc->irq_data);
|
||||
-
|
||||
if (!((old->flags & new->flags) & IRQF_SHARED) ||
|
||||
- (oldtype != (new->flags & IRQF_TRIGGER_MASK)) ||
|
||||
+ ((old->flags ^ new->flags) & IRQF_TRIGGER_MASK) ||
|
||||
((old->flags ^ new->flags) & IRQF_ONESHOT))
|
||||
goto mismatch;
|
||||
|
||||
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
|
||||
index 86b619501350..284370b61b8c 100644
|
||||
--- a/net/core/skbuff.c
|
||||
+++ b/net/core/skbuff.c
|
||||
@@ -3571,7 +3571,7 @@ int sock_queue_err_skb(struct sock *sk, struct sk_buff *skb)
|
||||
|
||||
skb_queue_tail(&sk->sk_error_queue, skb);
|
||||
if (!sock_flag(sk, SOCK_DEAD))
|
||||
- sk->sk_data_ready(sk);
|
||||
+ sk->sk_error_report(sk);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(sock_queue_err_skb);
|
||||
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
|
||||
index 9d43c1f40274..ff3b058cf58c 100644
|
||||
--- a/net/dccp/proto.c
|
||||
+++ b/net/dccp/proto.c
|
||||
@@ -789,6 +789,11 @@ int dccp_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
|
||||
if (skb == NULL)
|
||||
goto out_release;
|
||||
|
||||
+ if (sk->sk_state == DCCP_CLOSED) {
|
||||
+ rc = -ENOTCONN;
|
||||
+ goto out_discard;
|
||||
+ }
|
||||
+
|
||||
skb_reserve(skb, sk->sk_prot->max_header);
|
||||
rc = memcpy_from_msg(skb_put(skb, len), msg, len);
|
||||
if (rc != 0)
|
||||
diff --git a/net/ieee802154/6lowpan/core.c b/net/ieee802154/6lowpan/core.c
|
||||
index 20c49c724ba0..e8b279443d37 100644
|
||||
--- a/net/ieee802154/6lowpan/core.c
|
||||
+++ b/net/ieee802154/6lowpan/core.c
|
||||
@@ -206,9 +206,13 @@ static inline void lowpan_netlink_fini(void)
|
||||
static int lowpan_device_event(struct notifier_block *unused,
|
||||
unsigned long event, void *ptr)
|
||||
{
|
||||
- struct net_device *wdev = netdev_notifier_info_to_dev(ptr);
|
||||
+ struct net_device *ndev = netdev_notifier_info_to_dev(ptr);
|
||||
+ struct wpan_dev *wpan_dev;
|
||||
|
||||
- if (wdev->type != ARPHRD_IEEE802154)
|
||||
+ if (ndev->type != ARPHRD_IEEE802154)
|
||||
+ return NOTIFY_DONE;
|
||||
+ wpan_dev = ndev->ieee802154_ptr;
|
||||
+ if (!wpan_dev)
|
||||
goto out;
|
||||
|
||||
switch (event) {
|
||||
@@ -217,8 +221,8 @@ static int lowpan_device_event(struct notifier_block *unused,
|
||||
* also delete possible lowpan interfaces which belongs
|
||||
* to the wpan interface.
|
||||
*/
|
||||
- if (wdev->ieee802154_ptr->lowpan_dev)
|
||||
- lowpan_dellink(wdev->ieee802154_ptr->lowpan_dev, NULL);
|
||||
+ if (wpan_dev->lowpan_dev)
|
||||
+ lowpan_dellink(wpan_dev->lowpan_dev, NULL);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
diff --git a/net/ipv4/inet_fragment.c b/net/ipv4/inet_fragment.c
|
||||
index c5fb2f694ed0..b34fa1bb278f 100644
|
||||
--- a/net/ipv4/inet_fragment.c
|
||||
+++ b/net/ipv4/inet_fragment.c
|
||||
@@ -119,6 +119,9 @@ out:
|
||||
|
||||
static bool inet_fragq_should_evict(const struct inet_frag_queue *q)
|
||||
{
|
||||
+ if (!hlist_unhashed(&q->list_evictor))
|
||||
+ return false;
|
||||
+
|
||||
return q->net->low_thresh == 0 ||
|
||||
frag_mem_limit(q->net) >= q->net->low_thresh;
|
||||
}
|
||||
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
|
||||
index d35509212013..1b93ea766916 100644
|
||||
--- a/net/ipv4/ip_sockglue.c
|
||||
+++ b/net/ipv4/ip_sockglue.c
|
||||
@@ -241,7 +241,8 @@ int ip_cmsg_send(struct net *net, struct msghdr *msg, struct ipcm_cookie *ipc,
|
||||
src_info = (struct in6_pktinfo *)CMSG_DATA(cmsg);
|
||||
if (!ipv6_addr_v4mapped(&src_info->ipi6_addr))
|
||||
return -EINVAL;
|
||||
- ipc->oif = src_info->ipi6_ifindex;
|
||||
+ if (src_info->ipi6_ifindex)
|
||||
+ ipc->oif = src_info->ipi6_ifindex;
|
||||
ipc->addr = src_info->ipi6_addr.s6_addr32[3];
|
||||
continue;
|
||||
}
|
||||
@@ -264,7 +265,8 @@ int ip_cmsg_send(struct net *net, struct msghdr *msg, struct ipcm_cookie *ipc,
|
||||
if (cmsg->cmsg_len != CMSG_LEN(sizeof(struct in_pktinfo)))
|
||||
return -EINVAL;
|
||||
info = (struct in_pktinfo *)CMSG_DATA(cmsg);
|
||||
- ipc->oif = info->ipi_ifindex;
|
||||
+ if (info->ipi_ifindex)
|
||||
+ ipc->oif = info->ipi_ifindex;
|
||||
ipc->addr = info->ipi_spec_dst.s_addr;
|
||||
break;
|
||||
}
|
||||
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
|
||||
index 55810e4899f1..3db8d7d1a986 100644
|
||||
--- a/net/ipv6/ndisc.c
|
||||
+++ b/net/ipv6/ndisc.c
|
||||
@@ -1478,7 +1478,8 @@ static void ndisc_fill_redirect_hdr_option(struct sk_buff *skb,
|
||||
*(opt++) = (rd_len >> 3);
|
||||
opt += 6;
|
||||
|
||||
- memcpy(opt, ipv6_hdr(orig_skb), rd_len - 8);
|
||||
+ skb_copy_bits(orig_skb, skb_network_offset(orig_skb), opt,
|
||||
+ rd_len - 8);
|
||||
}
|
||||
|
||||
void ndisc_send_redirect(struct sk_buff *skb, const struct in6_addr *target)
|
||||
diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c
|
||||
index 20ab7b2ec463..aeffb65181f5 100644
|
||||
--- a/net/iucv/af_iucv.c
|
||||
+++ b/net/iucv/af_iucv.c
|
||||
@@ -2381,9 +2381,11 @@ static int afiucv_iucv_init(void)
|
||||
af_iucv_dev->driver = &af_iucv_driver;
|
||||
err = device_register(af_iucv_dev);
|
||||
if (err)
|
||||
- goto out_driver;
|
||||
+ goto out_iucv_dev;
|
||||
return 0;
|
||||
|
||||
+out_iucv_dev:
|
||||
+ put_device(af_iucv_dev);
|
||||
out_driver:
|
||||
driver_unregister(&af_iucv_driver);
|
||||
out_iucv:
|
||||
diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c
|
||||
index ec8f6a6485e3..92df832a1896 100644
|
||||
--- a/net/l2tp/l2tp_core.c
|
||||
+++ b/net/l2tp/l2tp_core.c
|
||||
@@ -1518,9 +1518,14 @@ int l2tp_tunnel_create(struct net *net, int fd, int version, u32 tunnel_id, u32
|
||||
encap = cfg->encap;
|
||||
|
||||
/* Quick sanity checks */
|
||||
+ err = -EPROTONOSUPPORT;
|
||||
+ if (sk->sk_type != SOCK_DGRAM) {
|
||||
+ pr_debug("tunl %hu: fd %d wrong socket type\n",
|
||||
+ tunnel_id, fd);
|
||||
+ goto err;
|
||||
+ }
|
||||
switch (encap) {
|
||||
case L2TP_ENCAPTYPE_UDP:
|
||||
- err = -EPROTONOSUPPORT;
|
||||
if (sk->sk_protocol != IPPROTO_UDP) {
|
||||
pr_err("tunl %hu: fd %d wrong protocol, got %d, expected %d\n",
|
||||
tunnel_id, fd, sk->sk_protocol, IPPROTO_UDP);
|
||||
@@ -1528,7 +1533,6 @@ int l2tp_tunnel_create(struct net *net, int fd, int version, u32 tunnel_id, u32
|
||||
}
|
||||
break;
|
||||
case L2TP_ENCAPTYPE_IP:
|
||||
- err = -EPROTONOSUPPORT;
|
||||
if (sk->sk_protocol != IPPROTO_L2TP) {
|
||||
pr_err("tunl %hu: fd %d wrong protocol, got %d, expected %d\n",
|
||||
tunnel_id, fd, sk->sk_protocol, IPPROTO_L2TP);
|
||||
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c
|
||||
index 30c46aaf4575..d681dbaf00c1 100644
|
||||
--- a/net/netlink/genetlink.c
|
||||
+++ b/net/netlink/genetlink.c
|
||||
@@ -1143,7 +1143,7 @@ static int genlmsg_mcast(struct sk_buff *skb, u32 portid, unsigned long group,
|
||||
if (!err)
|
||||
delivered = true;
|
||||
else if (err != -ESRCH)
|
||||
- goto error;
|
||||
+ return err;
|
||||
return delivered ? 0 : -ESRCH;
|
||||
error:
|
||||
kfree_skb(skb);
|
2344
patch/kernel/udoo-next/04-patch-4.4.126-127.patch
Normal file
2344
patch/kernel/udoo-next/04-patch-4.4.126-127.patch
Normal file
File diff suppressed because it is too large
Load diff
5333
patch/kernel/udoo-next/04-patch-4.4.127-128.patch
Normal file
5333
patch/kernel/udoo-next/04-patch-4.4.127-128.patch
Normal file
File diff suppressed because it is too large
Load diff
3460
patch/kernel/udoo-next/04-patch-4.4.128-129.patch
Normal file
3460
patch/kernel/udoo-next/04-patch-4.4.128-129.patch
Normal file
File diff suppressed because it is too large
Load diff
2698
patch/kernel/udoo-next/04-patch-4.4.129-130.patch
Normal file
2698
patch/kernel/udoo-next/04-patch-4.4.129-130.patch
Normal file
File diff suppressed because it is too large
Load diff
1558
patch/kernel/udoo-next/04-patch-4.4.130-131.patch
Normal file
1558
patch/kernel/udoo-next/04-patch-4.4.130-131.patch
Normal file
File diff suppressed because it is too large
Load diff
2948
patch/kernel/udoo-next/04-patch-4.4.131-132.patch
Normal file
2948
patch/kernel/udoo-next/04-patch-4.4.131-132.patch
Normal file
File diff suppressed because it is too large
Load diff
4957
patch/kernel/udoo-next/04-patch-4.4.132-133.patch
Normal file
4957
patch/kernel/udoo-next/04-patch-4.4.132-133.patch
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue