mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
Add Odroid C4 legacy build (#1983)
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
BOARD_NAME="Odroid C4"
|
||||
BOARDFAMILY="meson-sm1"
|
||||
BOOTCONFIG="odroid-c4_defconfig"
|
||||
KERNEL_TARGET="current,dev"
|
||||
KERNEL_TARGET="legacy,current,dev"
|
||||
FULL_DESKTOP="yes"
|
||||
SERIALCON="ttyAML0"
|
||||
ASOUND_STATE="asound.state.meson64"
|
||||
FORCE_BOOTSCRIPT_UPDATE="yes"
|
||||
|
||||
120
config/bootscripts/boot-odroid-c4.ini
Normal file
120
config/bootscripts/boot-odroid-c4.ini
Normal file
@@ -0,0 +1,120 @@
|
||||
ODROIDC4-UBOOT-CONFIG
|
||||
|
||||
setenv rootdev "/dev/mmcblk0p1"
|
||||
setenv rootfstype "ext4"
|
||||
|
||||
# Default Console Device Setting
|
||||
setenv condev "console=ttyS0,115200n8 console=tty1 loglevel=1" # on both
|
||||
|
||||
# Auto Detection of Monitor settings based on your Screen information
|
||||
setenv display_autodetect "true"
|
||||
|
||||
# HDMI Mode
|
||||
# Resolution Configuration
|
||||
# Symbol | Resolution
|
||||
# ----------------------+-------------
|
||||
# "480x272p60hz" | 480x272 Progressive 60Hz
|
||||
# "480x320p60hz" | 480x320 Progressive 60Hz
|
||||
# "480p60hz" | 720x480 Progressive 60Hz
|
||||
# "576p50hz" | 720x576 Progressive 50Hz
|
||||
# "720p60hz" | 1280x720 Progressive 60Hz
|
||||
# "720p50hz" | 1280x720 Progressive 50Hz
|
||||
# "1080p60hz" | 1920x1080 Progressive 60Hz
|
||||
# "1080p50hz" | 1920x1080 Progressive 50Hz
|
||||
# "1080p30hz" | 1920x1080 Progressive 30Hz
|
||||
# "1080p24hz" | 1920x1080 Progressive 24Hz
|
||||
# "1080i60hz" | 1920x1080 Interlaced 60Hz
|
||||
# "1080i50hz" | 1920x1080 Interlaced 50Hz
|
||||
# "2160p60hz" | 3840x2160 Progressive 60Hz
|
||||
# "2160p50hz" | 3840x2160 Progressive 50Hz
|
||||
# "2160p30hz" | 3840x2160 Progressive 30Hz
|
||||
# "2160p25hz" | 3840x2160 Progressive 25Hz
|
||||
# "2160p24hz" | 3840x2160 Progressive 24Hz
|
||||
# "smpte24hz" | 3840x2160 Progressive 24Hz SMPTE
|
||||
# "2160p60hz420" | 3840x2160 Progressive 60Hz YCbCr 4:2:0
|
||||
# "2160p50hz420" | 3840x2160 Progressive 50Hz YCbCr 4:2:0
|
||||
# "640x480p60hz" | 640x480 Progressive 60Hz
|
||||
# "800x480p60hz" | 800x480 Progressive 60Hz
|
||||
# "800x600p60hz" | 800x600 Progressive 60Hz
|
||||
# "1024x600p60hz" | 1024x600 Progressive 60Hz
|
||||
# "1024x768p60hz" | 1024x768 Progressive 60Hz
|
||||
# "1280x800p60hz" | 1280x800 Progressive 60Hz
|
||||
# "1280x1024p60hz" | 1280x1024 Progressive 60Hz
|
||||
# "1360x768p60hz" | 1360x768 Progressive 60Hz
|
||||
# "1440x900p60hz" | 1440x900 Progressive 60Hz
|
||||
# "1600x900p60hz" | 1600x900 Progressive 60Hz
|
||||
# "1600x1200p60hz" | 1600x1200 Progressive 60Hz
|
||||
# "1680x1050p60hz" | 1680x1050 Progressive 60Hz
|
||||
# "1920x1200p60hz" | 1920x1200 Progressive 60Hz
|
||||
# "2560x1080p60hz" | 2560x1080 Progressive 60Hz
|
||||
# "2560x1440p60hz" | 2560x1440 Progressive 60Hz
|
||||
# "2560x1600p60hz" | 2560x1600 Progressive 60Hz
|
||||
# "3440x1440p60hz" | 3440x1440 Progressive 60Hz
|
||||
setenv hdmimode "1080p60hz"
|
||||
|
||||
# Monitor output
|
||||
# Controls if HDMI PHY should output anything to the monitor
|
||||
setenv monitor_onoff "false" # true or false
|
||||
|
||||
# Overscan percentage
|
||||
# This value scales down the actual screen size by the percentage below
|
||||
# valid range is 80 to 100
|
||||
setenv overscan "100"
|
||||
|
||||
# SDR/HDR Configuration
|
||||
# This forces SDR or HDR modes
|
||||
# valid options are: sdr hdr auto
|
||||
setenv sdrmode "auto"
|
||||
|
||||
### voutmode : hdmi or dvi
|
||||
setenv voutmode "hdmi"
|
||||
# setenv voutmode "dvi"
|
||||
|
||||
# HPD enable/disable option
|
||||
setenv disablehpd "false"
|
||||
|
||||
# Enable/Disable CEC
|
||||
setenv cec "false"
|
||||
|
||||
# Hardkernel ODROID-VU7 support
|
||||
# By default VU7 support is disabled
|
||||
setenv disable_vu7 "true"
|
||||
# setenv disable_vu7 "false"
|
||||
|
||||
# max cpu frequency for little core, A55 in MHz unit
|
||||
# setenv max_freq_a55 "2016" # 2.016 Ghz
|
||||
setenv max_freq_a55 "1908" # 1.908 GHz, default value
|
||||
# setenv max_freq_a55 "1800" # 1.8 Ghz
|
||||
# setenv max_freq_a55 "1704" # 1.704 GHz
|
||||
|
||||
# max cpu-cores
|
||||
setenv maxcpus "4"
|
||||
|
||||
### Normal HDMI Monitors
|
||||
if test "${display_autodetect}" = "true"; then hdmitx edid; fi
|
||||
if test "${hdmimode}" = "custombuilt"; then setenv cmode "modeline=${modeline}"; fi
|
||||
if test "${cec}" = "true"; then setenv cec_enable "hdmitx=cec3f"; fi
|
||||
|
||||
# VU7 Settings
|
||||
if test "${disable_vu7}" = "false"; then setenv hid_quirks "usbhid.quirks=0x0eef:0x0005:0x0004"; fi
|
||||
|
||||
# Boot Args
|
||||
setenv bootargs "root=${rootdev} rootwait rootflags=data=writeback rw rootfstype=${rootfstype} ${condev} ${amlogic} no_console_suspend fsck.repair=yes net.ifnames=0 elevator=noop hdmimode=${hdmimode} cvbsmode=576cvbs maxcpus=${maxcpus} voutmode=${voutmode} ${cmode} disablehpd=${disablehpd} cvbscable=${cvbscable} overscan=${overscan} ${hid_quirks} monitor_onoff=${monitor_onoff} logo=osd0,loaded ${cec_enable} sdrmode=${sdrmode}"
|
||||
|
||||
# Set load addresses
|
||||
setenv dtb_loadaddr "0x1000000"
|
||||
setenv k_addr "0x1100000"
|
||||
setenv loadaddr "0x1B00000"
|
||||
setenv initrd_loadaddr "0x3700000"
|
||||
|
||||
# Load kernel, dtb and initrd
|
||||
fatload mmc ${devno}:1 ${k_addr} zImage
|
||||
fatload mmc ${devno}:1 ${dtb_loadaddr} dtb/amlogic/meson64_odroidc4.dtb
|
||||
fatload mmc ${devno}:1 ${initrd_loadaddr} uInitrd
|
||||
fdt addr ${dtb_loadaddr}
|
||||
|
||||
# unzip the kernel
|
||||
unzip ${k_addr} ${loadaddr}
|
||||
|
||||
# boot
|
||||
booti ${loadaddr} ${initrd_loadaddr} ${dtb_loadaddr}
|
||||
6797
config/kernel/linux-odroidc4-legacy.config
Normal file
6797
config/kernel/linux-odroidc4-legacy.config
Normal file
File diff suppressed because it is too large
Load Diff
@@ -4,6 +4,37 @@ CPUMIN=667000
|
||||
CPUMAX=2016000
|
||||
GOVERNOR=ondemand
|
||||
|
||||
if [[ $BRANCH == legacy ]]; then
|
||||
|
||||
BOOTCONFIG="odroidc4_defconfig"
|
||||
BOOTSOURCE='https://github.com/hardkernel/u-boot.git'
|
||||
BOOTBRANCH='branch:odroidg12-v2015.01'
|
||||
BOOTPATCHDIR='u-boot-odroidn2'
|
||||
BOOTDIR='u-boot-odroidc2'
|
||||
UBOOT_USE_GCC='< 4.9'
|
||||
UBOOT_TOOLCHAIN2="arm-none-eabi-:< 5.0"
|
||||
UBOOT_COMPILER="aarch64-none-elf-"
|
||||
UBOOT_TARGET_MAP=';;sd_fuse/u-boot.bin'
|
||||
BOOTSCRIPT="boot-odroid-c4.ini:boot.ini"
|
||||
SERIALCON=ttyS0
|
||||
ATF_COMPILE="no"
|
||||
LINUXFAMILY=odroidc4
|
||||
KERNELSOURCE='https://github.com/hardkernel/linux'
|
||||
KERNELBRANCH='branch:odroidg12-4.9.y'
|
||||
KERNELDIR='linux-odroid'
|
||||
KERNEL_COMPILER='aarch64-linux-gnu-'
|
||||
KERNEL_USE_GCC='< 7.0'
|
||||
# unstable EXT4 support
|
||||
BOOTSIZE="200"
|
||||
BOOTFS_TYPE="fat"
|
||||
|
||||
write_uboot_platform()
|
||||
{
|
||||
dd if=$1/u-boot.bin of=$2 bs=512 seek=1 conv=fsync > /dev/null 2>&1
|
||||
}
|
||||
|
||||
fi
|
||||
|
||||
family_tweaks()
|
||||
{
|
||||
:
|
||||
@@ -11,7 +42,7 @@ family_tweaks()
|
||||
|
||||
uboot_custom_postprocess()
|
||||
{
|
||||
if [[ $BOARD == odroidc4 ]]; then
|
||||
if [[ $BOARD == odroidc4 && $BRANCH != legacy ]]; then
|
||||
uboot_g12_postprocess $SRC/cache/sources/amlogic-boot-fip/odroid-c4 g12a
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -456,19 +456,21 @@ odroidn2 current buster cli stable yes
|
||||
odroidn2 current buster desktop stable yes
|
||||
odroidn2 current stretch cli stable yes
|
||||
odroidn2 current bionic desktop stable yes
|
||||
odroidn2 current bullseye cli stable yes
|
||||
odroidn2 current bullseye cli stable yes
|
||||
odroidn2 current focal cli stable yes
|
||||
odroidn2 dev focal minimal beta yes
|
||||
odroidn2 dev focal minimal beta yes
|
||||
|
||||
# Odroid C4
|
||||
|
||||
odroidc4 legacy focal cli stable yes
|
||||
odroidc4 legacy focal desktop stable yes
|
||||
odroidc4 current buster cli stable yes
|
||||
odroidc4 current buster desktop stable yes
|
||||
odroidc4 current stretch cli stable yes
|
||||
odroidc4 current bionic desktop stable yes
|
||||
odroidc4 current bullseye cli stable yes
|
||||
odroidc4 current bullseye cli stable yes
|
||||
odroidc4 current focal cli stable yes
|
||||
odroidc4 dev focal minimal beta yes
|
||||
odroidc4 dev focal minimal beta yes
|
||||
|
||||
# Odroid XU4
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ compilation_prepare()
|
||||
process_patch_file "${SRC}/patch/misc/general-packaging-4.4.y.patch" "applying"
|
||||
fi
|
||||
|
||||
if [[ $version == "4.9."* ]] && [[ "$LINUXFAMILY" == meson64 ]]; then
|
||||
if [[ $version == "4.9."* ]] && [[ "$LINUXFAMILY" == meson64 || "$LINUXFAMILY" == odroidc4 ]]; then
|
||||
display_alert "Adjustin" "packaging" "info"
|
||||
cd ${SRC}/cache/sources/${LINUXSOURCEDIR}
|
||||
process_patch_file "${SRC}/patch/misc/general-packaging-4.9.y.patch" "applying"
|
||||
|
||||
1099
patch/kernel/odroidc4-legacy/patch-4.9.218-219.patch
Normal file
1099
patch/kernel/odroidc4-legacy/patch-4.9.218-219.patch
Normal file
File diff suppressed because it is too large
Load Diff
3296
patch/kernel/odroidc4-legacy/patch-4.9.219-220.patch
Normal file
3296
patch/kernel/odroidc4-legacy/patch-4.9.219-220.patch
Normal file
File diff suppressed because it is too large
Load Diff
2303
patch/kernel/odroidc4-legacy/patch-4.9.220-221.patch
Normal file
2303
patch/kernel/odroidc4-legacy/patch-4.9.220-221.patch
Normal file
File diff suppressed because it is too large
Load Diff
632
patch/kernel/odroidc4-legacy/patch-4.9.221-222.patch
Normal file
632
patch/kernel/odroidc4-legacy/patch-4.9.221-222.patch
Normal file
@@ -0,0 +1,632 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index b919a66788b5..67c9106594be 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 9
|
||||
-SUBLEVEL = 221
|
||||
+SUBLEVEL = 222
|
||||
EXTRAVERSION =
|
||||
NAME = Roaring Lionus
|
||||
|
||||
diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c
|
||||
index c76e4527620c..245bcdb44c64 100644
|
||||
--- a/drivers/acpi/device_pm.c
|
||||
+++ b/drivers/acpi/device_pm.c
|
||||
@@ -226,13 +226,13 @@ int acpi_device_set_power(struct acpi_device *device, int state)
|
||||
end:
|
||||
if (result) {
|
||||
dev_warn(&device->dev, "Failed to change power state to %s\n",
|
||||
- acpi_power_state_string(state));
|
||||
+ acpi_power_state_string(target_state));
|
||||
} else {
|
||||
device->power.state = target_state;
|
||||
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
|
||||
"Device [%s] transitioned to %s\n",
|
||||
device->pnp.bus_id,
|
||||
- acpi_power_state_string(state)));
|
||||
+ acpi_power_state_string(target_state)));
|
||||
}
|
||||
|
||||
return result;
|
||||
diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
|
||||
index 7dd46cf5ed84..7a028b57a7ef 100644
|
||||
--- a/drivers/dma/dmatest.c
|
||||
+++ b/drivers/dma/dmatest.c
|
||||
@@ -505,8 +505,8 @@ static int dmatest_func(void *data)
|
||||
flags = DMA_CTRL_ACK | DMA_PREP_INTERRUPT;
|
||||
|
||||
ktime = ktime_get();
|
||||
- while (!kthread_should_stop()
|
||||
- && !(params->iterations && total_tests >= params->iterations)) {
|
||||
+ while (!(kthread_should_stop() ||
|
||||
+ (params->iterations && total_tests >= params->iterations))) {
|
||||
struct dma_async_tx_descriptor *tx = NULL;
|
||||
struct dmaengine_unmap_data *um;
|
||||
dma_addr_t srcs[src_cnt];
|
||||
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
|
||||
index a9bf02ea0a3b..5b5970f0e91d 100644
|
||||
--- a/drivers/gpu/drm/drm_edid.c
|
||||
+++ b/drivers/gpu/drm/drm_edid.c
|
||||
@@ -3970,7 +3970,7 @@ static struct drm_display_mode *drm_mode_displayid_detailed(struct drm_device *d
|
||||
struct drm_display_mode *mode;
|
||||
unsigned pixel_clock = (timings->pixel_clock[0] |
|
||||
(timings->pixel_clock[1] << 8) |
|
||||
- (timings->pixel_clock[2] << 16));
|
||||
+ (timings->pixel_clock[2] << 16)) + 1;
|
||||
unsigned hactive = (timings->hactive[0] | timings->hactive[1] << 8) + 1;
|
||||
unsigned hblank = (timings->hblank[0] | timings->hblank[1] << 8) + 1;
|
||||
unsigned hsync = (timings->hsync[0] | (timings->hsync[1] & 0x7f) << 8) + 1;
|
||||
diff --git a/drivers/gpu/drm/qxl/qxl_cmd.c b/drivers/gpu/drm/qxl/qxl_cmd.c
|
||||
index 04270f5d110c..3e6fd393da15 100644
|
||||
--- a/drivers/gpu/drm/qxl/qxl_cmd.c
|
||||
+++ b/drivers/gpu/drm/qxl/qxl_cmd.c
|
||||
@@ -500,9 +500,10 @@ int qxl_hw_surface_alloc(struct qxl_device *qdev,
|
||||
return ret;
|
||||
|
||||
ret = qxl_release_reserve_list(release, true);
|
||||
- if (ret)
|
||||
+ if (ret) {
|
||||
+ qxl_release_free(qdev, release);
|
||||
return ret;
|
||||
-
|
||||
+ }
|
||||
cmd = (struct qxl_surface_cmd *)qxl_release_map(qdev, release);
|
||||
cmd->type = QXL_SURFACE_CMD_CREATE;
|
||||
cmd->flags = QXL_SURF_FLAG_KEEP_DATA;
|
||||
@@ -528,8 +529,8 @@ int qxl_hw_surface_alloc(struct qxl_device *qdev,
|
||||
/* no need to add a release to the fence for this surface bo,
|
||||
since it is only released when we ask to destroy the surface
|
||||
and it would never signal otherwise */
|
||||
- qxl_push_command_ring_release(qdev, release, QXL_CMD_SURFACE, false);
|
||||
qxl_release_fence_buffer_objects(release);
|
||||
+ qxl_push_command_ring_release(qdev, release, QXL_CMD_SURFACE, false);
|
||||
|
||||
surf->hw_surf_alloc = true;
|
||||
spin_lock(&qdev->surf_id_idr_lock);
|
||||
@@ -571,9 +572,8 @@ int qxl_hw_surface_dealloc(struct qxl_device *qdev,
|
||||
cmd->surface_id = id;
|
||||
qxl_release_unmap(qdev, release, &cmd->release_info);
|
||||
|
||||
- qxl_push_command_ring_release(qdev, release, QXL_CMD_SURFACE, false);
|
||||
-
|
||||
qxl_release_fence_buffer_objects(release);
|
||||
+ qxl_push_command_ring_release(qdev, release, QXL_CMD_SURFACE, false);
|
||||
|
||||
return 0;
|
||||
}
|
||||
diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
|
||||
index a61c0d460ec2..f8a1f84c8838 100644
|
||||
--- a/drivers/gpu/drm/qxl/qxl_display.c
|
||||
+++ b/drivers/gpu/drm/qxl/qxl_display.c
|
||||
@@ -292,8 +292,8 @@ qxl_hide_cursor(struct qxl_device *qdev)
|
||||
cmd->type = QXL_CURSOR_HIDE;
|
||||
qxl_release_unmap(qdev, release, &cmd->release_info);
|
||||
|
||||
- qxl_push_cursor_ring_release(qdev, release, QXL_CMD_CURSOR, false);
|
||||
qxl_release_fence_buffer_objects(release);
|
||||
+ qxl_push_cursor_ring_release(qdev, release, QXL_CMD_CURSOR, false);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -333,8 +333,8 @@ static int qxl_crtc_apply_cursor(struct drm_crtc *crtc)
|
||||
cmd->u.set.visible = 1;
|
||||
qxl_release_unmap(qdev, release, &cmd->release_info);
|
||||
|
||||
- qxl_push_cursor_ring_release(qdev, release, QXL_CMD_CURSOR, false);
|
||||
qxl_release_fence_buffer_objects(release);
|
||||
+ qxl_push_cursor_ring_release(qdev, release, QXL_CMD_CURSOR, false);
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -436,8 +436,8 @@ static int qxl_crtc_cursor_set2(struct drm_crtc *crtc,
|
||||
cmd->u.set.visible = 1;
|
||||
qxl_release_unmap(qdev, release, &cmd->release_info);
|
||||
|
||||
- qxl_push_cursor_ring_release(qdev, release, QXL_CMD_CURSOR, false);
|
||||
qxl_release_fence_buffer_objects(release);
|
||||
+ qxl_push_cursor_ring_release(qdev, release, QXL_CMD_CURSOR, false);
|
||||
|
||||
/* finish with the userspace bo */
|
||||
ret = qxl_bo_reserve(user_bo, false);
|
||||
@@ -497,8 +497,8 @@ static int qxl_crtc_cursor_move(struct drm_crtc *crtc,
|
||||
cmd->u.position.y = qcrtc->cur_y + qcrtc->hot_spot_y;
|
||||
qxl_release_unmap(qdev, release, &cmd->release_info);
|
||||
|
||||
- qxl_push_cursor_ring_release(qdev, release, QXL_CMD_CURSOR, false);
|
||||
qxl_release_fence_buffer_objects(release);
|
||||
+ qxl_push_cursor_ring_release(qdev, release, QXL_CMD_CURSOR, false);
|
||||
|
||||
return 0;
|
||||
}
|
||||
diff --git a/drivers/gpu/drm/qxl/qxl_draw.c b/drivers/gpu/drm/qxl/qxl_draw.c
|
||||
index 9b728edf1b49..d1407d162877 100644
|
||||
--- a/drivers/gpu/drm/qxl/qxl_draw.c
|
||||
+++ b/drivers/gpu/drm/qxl/qxl_draw.c
|
||||
@@ -241,8 +241,8 @@ void qxl_draw_opaque_fb(const struct qxl_fb_image *qxl_fb_image,
|
||||
qxl_bo_physical_address(qdev, dimage->bo, 0);
|
||||
qxl_release_unmap(qdev, release, &drawable->release_info);
|
||||
|
||||
- qxl_push_command_ring_release(qdev, release, QXL_CMD_DRAW, false);
|
||||
qxl_release_fence_buffer_objects(release);
|
||||
+ qxl_push_command_ring_release(qdev, release, QXL_CMD_DRAW, false);
|
||||
|
||||
out_free_palette:
|
||||
if (palette_bo)
|
||||
@@ -348,9 +348,10 @@ void qxl_draw_dirty_fb(struct qxl_device *qdev,
|
||||
goto out_release_backoff;
|
||||
|
||||
rects = drawable_set_clipping(qdev, num_clips, clips_bo);
|
||||
- if (!rects)
|
||||
+ if (!rects) {
|
||||
+ ret = -EINVAL;
|
||||
goto out_release_backoff;
|
||||
-
|
||||
+ }
|
||||
drawable = (struct qxl_drawable *)qxl_release_map(qdev, release);
|
||||
|
||||
drawable->clip.type = SPICE_CLIP_TYPE_RECTS;
|
||||
@@ -381,8 +382,8 @@ void qxl_draw_dirty_fb(struct qxl_device *qdev,
|
||||
}
|
||||
qxl_bo_kunmap(clips_bo);
|
||||
|
||||
- qxl_push_command_ring_release(qdev, release, QXL_CMD_DRAW, false);
|
||||
qxl_release_fence_buffer_objects(release);
|
||||
+ qxl_push_command_ring_release(qdev, release, QXL_CMD_DRAW, false);
|
||||
|
||||
out_release_backoff:
|
||||
if (ret)
|
||||
@@ -432,8 +433,8 @@ void qxl_draw_copyarea(struct qxl_device *qdev,
|
||||
drawable->u.copy_bits.src_pos.y = sy;
|
||||
qxl_release_unmap(qdev, release, &drawable->release_info);
|
||||
|
||||
- qxl_push_command_ring_release(qdev, release, QXL_CMD_DRAW, false);
|
||||
qxl_release_fence_buffer_objects(release);
|
||||
+ qxl_push_command_ring_release(qdev, release, QXL_CMD_DRAW, false);
|
||||
|
||||
out_free_release:
|
||||
if (ret)
|
||||
@@ -476,8 +477,8 @@ void qxl_draw_fill(struct qxl_draw_fill *qxl_draw_fill_rec)
|
||||
|
||||
qxl_release_unmap(qdev, release, &drawable->release_info);
|
||||
|
||||
- qxl_push_command_ring_release(qdev, release, QXL_CMD_DRAW, false);
|
||||
qxl_release_fence_buffer_objects(release);
|
||||
+ qxl_push_command_ring_release(qdev, release, QXL_CMD_DRAW, false);
|
||||
|
||||
out_free_release:
|
||||
if (ret)
|
||||
diff --git a/drivers/gpu/drm/qxl/qxl_ioctl.c b/drivers/gpu/drm/qxl/qxl_ioctl.c
|
||||
index 5a4c8c492683..db0afb0613c9 100644
|
||||
--- a/drivers/gpu/drm/qxl/qxl_ioctl.c
|
||||
+++ b/drivers/gpu/drm/qxl/qxl_ioctl.c
|
||||
@@ -256,11 +256,8 @@ static int qxl_process_single_command(struct qxl_device *qdev,
|
||||
apply_surf_reloc(qdev, &reloc_info[i]);
|
||||
}
|
||||
|
||||
+ qxl_release_fence_buffer_objects(release);
|
||||
ret = qxl_push_command_ring_release(qdev, release, cmd->type, true);
|
||||
- if (ret)
|
||||
- qxl_release_backoff_reserve_list(release);
|
||||
- else
|
||||
- qxl_release_fence_buffer_objects(release);
|
||||
|
||||
out_free_bos:
|
||||
out_free_release:
|
||||
diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c
|
||||
index adc46b809ef2..0555c939c948 100644
|
||||
--- a/drivers/infiniband/hw/mlx4/main.c
|
||||
+++ b/drivers/infiniband/hw/mlx4/main.c
|
||||
@@ -1589,8 +1589,9 @@ static int __mlx4_ib_create_default_rules(
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(pdefault_rules->rules_create_list); i++) {
|
||||
+ union ib_flow_spec ib_spec = {};
|
||||
int ret;
|
||||
- union ib_flow_spec ib_spec;
|
||||
+
|
||||
switch (pdefault_rules->rules_create_list[i]) {
|
||||
case 0:
|
||||
/* no rule */
|
||||
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c
|
||||
index c113e46fdc3a..e6ae8d123984 100644
|
||||
--- a/drivers/iommu/amd_iommu_init.c
|
||||
+++ b/drivers/iommu/amd_iommu_init.c
|
||||
@@ -2574,7 +2574,7 @@ static int __init parse_amd_iommu_intr(char *str)
|
||||
{
|
||||
for (; *str; ++str) {
|
||||
if (strncmp(str, "legacy", 6) == 0) {
|
||||
- amd_iommu_guest_ir = AMD_IOMMU_GUEST_IR_LEGACY;
|
||||
+ amd_iommu_guest_ir = AMD_IOMMU_GUEST_IR_LEGACY_GA;
|
||||
break;
|
||||
}
|
||||
if (strncmp(str, "vapic", 5) == 0) {
|
||||
diff --git a/drivers/md/dm-verity-fec.c b/drivers/md/dm-verity-fec.c
|
||||
index 8f9957d31a3e..1640298d90fd 100644
|
||||
--- a/drivers/md/dm-verity-fec.c
|
||||
+++ b/drivers/md/dm-verity-fec.c
|
||||
@@ -447,7 +447,7 @@ int verity_fec_decode(struct dm_verity *v, struct dm_verity_io *io,
|
||||
fio->level++;
|
||||
|
||||
if (type == DM_VERITY_BLOCK_TYPE_METADATA)
|
||||
- block += v->data_blocks;
|
||||
+ block = block - v->hash_start + v->data_blocks;
|
||||
|
||||
/*
|
||||
* For RS(M, N), the continuous FEC data is divided into blocks of N
|
||||
diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c
|
||||
index 0d5b667c0e65..a9f58f3867f0 100644
|
||||
--- a/drivers/vfio/vfio_iommu_type1.c
|
||||
+++ b/drivers/vfio/vfio_iommu_type1.c
|
||||
@@ -229,8 +229,8 @@ static int vaddr_get_pfn(unsigned long vaddr, int prot, unsigned long *pfn)
|
||||
vma = find_vma_intersection(current->mm, vaddr, vaddr + 1);
|
||||
|
||||
if (vma && vma->vm_flags & VM_PFNMAP) {
|
||||
- *pfn = ((vaddr - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff;
|
||||
- if (is_invalid_reserved_pfn(*pfn))
|
||||
+ if (!follow_pfn(vma, vaddr, pfn) &&
|
||||
+ is_invalid_reserved_pfn(*pfn))
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
|
||||
index 538f378eea52..a83f353e4418 100644
|
||||
--- a/fs/btrfs/extent-tree.c
|
||||
+++ b/fs/btrfs/extent-tree.c
|
||||
@@ -10645,7 +10645,7 @@ int btrfs_remove_block_group(struct btrfs_trans_handle *trans,
|
||||
path = btrfs_alloc_path();
|
||||
if (!path) {
|
||||
ret = -ENOMEM;
|
||||
- goto out;
|
||||
+ goto out_put_group;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -10684,7 +10684,7 @@ int btrfs_remove_block_group(struct btrfs_trans_handle *trans,
|
||||
ret = btrfs_orphan_add(trans, inode);
|
||||
if (ret) {
|
||||
btrfs_add_delayed_iput(inode);
|
||||
- goto out;
|
||||
+ goto out_put_group;
|
||||
}
|
||||
clear_nlink(inode);
|
||||
/* One for the block groups ref */
|
||||
@@ -10707,13 +10707,13 @@ int btrfs_remove_block_group(struct btrfs_trans_handle *trans,
|
||||
|
||||
ret = btrfs_search_slot(trans, tree_root, &key, path, -1, 1);
|
||||
if (ret < 0)
|
||||
- goto out;
|
||||
+ goto out_put_group;
|
||||
if (ret > 0)
|
||||
btrfs_release_path(path);
|
||||
if (ret == 0) {
|
||||
ret = btrfs_del_item(trans, tree_root, path);
|
||||
if (ret)
|
||||
- goto out;
|
||||
+ goto out_put_group;
|
||||
btrfs_release_path(path);
|
||||
}
|
||||
|
||||
@@ -10871,9 +10871,9 @@ int btrfs_remove_block_group(struct btrfs_trans_handle *trans,
|
||||
|
||||
ret = remove_block_group_free_space(trans, root->fs_info, block_group);
|
||||
if (ret)
|
||||
- goto out;
|
||||
+ goto out_put_group;
|
||||
|
||||
- btrfs_put_block_group(block_group);
|
||||
+ /* Once for the block groups rbtree */
|
||||
btrfs_put_block_group(block_group);
|
||||
|
||||
ret = btrfs_search_slot(trans, root, &key, path, -1, 1);
|
||||
@@ -10883,6 +10883,10 @@ int btrfs_remove_block_group(struct btrfs_trans_handle *trans,
|
||||
goto out;
|
||||
|
||||
ret = btrfs_del_item(trans, root, path);
|
||||
+
|
||||
+out_put_group:
|
||||
+ /* Once for the lookup reference */
|
||||
+ btrfs_put_block_group(block_group);
|
||||
out:
|
||||
btrfs_free_path(path);
|
||||
return ret;
|
||||
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
|
||||
index e049dc682e57..d8780e04aaf0 100644
|
||||
--- a/fs/ext4/inode.c
|
||||
+++ b/fs/ext4/inode.c
|
||||
@@ -4494,7 +4494,7 @@ struct inode *__ext4_iget(struct super_block *sb, unsigned long ino,
|
||||
gid_t i_gid;
|
||||
projid_t i_projid;
|
||||
|
||||
- if (((flags & EXT4_IGET_NORMAL) &&
|
||||
+ if ((!(flags & EXT4_IGET_SPECIAL) &&
|
||||
(ino < EXT4_FIRST_INO(sb) && ino != EXT4_ROOT_INO)) ||
|
||||
(ino < EXT4_ROOT_INO) ||
|
||||
(ino > le32_to_cpu(EXT4_SB(sb)->s_es->s_inodes_count))) {
|
||||
diff --git a/fs/nfs/nfs3acl.c b/fs/nfs/nfs3acl.c
|
||||
index 720d92f5abfb..6c378435fa29 100644
|
||||
--- a/fs/nfs/nfs3acl.c
|
||||
+++ b/fs/nfs/nfs3acl.c
|
||||
@@ -252,37 +252,45 @@ int nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl,
|
||||
|
||||
int nfs3_set_acl(struct inode *inode, struct posix_acl *acl, int type)
|
||||
{
|
||||
- struct posix_acl *alloc = NULL, *dfacl = NULL;
|
||||
+ struct posix_acl *orig = acl, *dfacl = NULL, *alloc;
|
||||
int status;
|
||||
|
||||
if (S_ISDIR(inode->i_mode)) {
|
||||
switch(type) {
|
||||
case ACL_TYPE_ACCESS:
|
||||
- alloc = dfacl = get_acl(inode, ACL_TYPE_DEFAULT);
|
||||
+ alloc = get_acl(inode, ACL_TYPE_DEFAULT);
|
||||
if (IS_ERR(alloc))
|
||||
goto fail;
|
||||
+ dfacl = alloc;
|
||||
break;
|
||||
|
||||
case ACL_TYPE_DEFAULT:
|
||||
- dfacl = acl;
|
||||
- alloc = acl = get_acl(inode, ACL_TYPE_ACCESS);
|
||||
+ alloc = get_acl(inode, ACL_TYPE_ACCESS);
|
||||
if (IS_ERR(alloc))
|
||||
goto fail;
|
||||
+ dfacl = acl;
|
||||
+ acl = alloc;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (acl == NULL) {
|
||||
- alloc = acl = posix_acl_from_mode(inode->i_mode, GFP_KERNEL);
|
||||
+ alloc = posix_acl_from_mode(inode->i_mode, GFP_KERNEL);
|
||||
if (IS_ERR(alloc))
|
||||
goto fail;
|
||||
+ acl = alloc;
|
||||
}
|
||||
status = __nfs3_proc_setacls(inode, acl, dfacl);
|
||||
- posix_acl_release(alloc);
|
||||
+out:
|
||||
+ if (acl != orig)
|
||||
+ posix_acl_release(acl);
|
||||
+ if (dfacl != orig)
|
||||
+ posix_acl_release(dfacl);
|
||||
return status;
|
||||
|
||||
fail:
|
||||
- return PTR_ERR(alloc);
|
||||
+ status = PTR_ERR(alloc);
|
||||
+ goto out;
|
||||
}
|
||||
|
||||
const struct xattr_handler *nfs3_xattr_handlers[] = {
|
||||
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
|
||||
index 81695a492ebe..3c775d6b7317 100644
|
||||
--- a/kernel/power/hibernate.c
|
||||
+++ b/kernel/power/hibernate.c
|
||||
@@ -892,6 +892,13 @@ static int software_resume(void)
|
||||
error = freeze_processes();
|
||||
if (error)
|
||||
goto Close_Finish;
|
||||
+
|
||||
+ error = freeze_kernel_threads();
|
||||
+ if (error) {
|
||||
+ thaw_processes();
|
||||
+ goto Close_Finish;
|
||||
+ }
|
||||
+
|
||||
error = load_image_and_restore();
|
||||
thaw_processes();
|
||||
Finish:
|
||||
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
|
||||
index 772df402c495..a2b63a6a33c7 100644
|
||||
--- a/security/selinux/hooks.c
|
||||
+++ b/security/selinux/hooks.c
|
||||
@@ -5002,39 +5002,59 @@ static int selinux_tun_dev_open(void *security)
|
||||
|
||||
static int selinux_nlmsg_perm(struct sock *sk, struct sk_buff *skb)
|
||||
{
|
||||
- int err = 0;
|
||||
- u32 perm;
|
||||
+ int rc = 0;
|
||||
+ unsigned int msg_len;
|
||||
+ unsigned int data_len = skb->len;
|
||||
+ unsigned char *data = skb->data;
|
||||
struct nlmsghdr *nlh;
|
||||
struct sk_security_struct *sksec = sk->sk_security;
|
||||
+ u16 sclass = sksec->sclass;
|
||||
+ u32 perm;
|
||||
|
||||
- if (skb->len < NLMSG_HDRLEN) {
|
||||
- err = -EINVAL;
|
||||
- goto out;
|
||||
- }
|
||||
- nlh = nlmsg_hdr(skb);
|
||||
+ while (data_len >= nlmsg_total_size(0)) {
|
||||
+ nlh = (struct nlmsghdr *)data;
|
||||
|
||||
- err = selinux_nlmsg_lookup(sksec->sclass, nlh->nlmsg_type, &perm);
|
||||
- if (err) {
|
||||
- if (err == -EINVAL) {
|
||||
+ /* NOTE: the nlmsg_len field isn't reliably set by some netlink
|
||||
+ * users which means we can't reject skb's with bogus
|
||||
+ * length fields; our solution is to follow what
|
||||
+ * netlink_rcv_skb() does and simply skip processing at
|
||||
+ * messages with length fields that are clearly junk
|
||||
+ */
|
||||
+ if (nlh->nlmsg_len < NLMSG_HDRLEN || nlh->nlmsg_len > data_len)
|
||||
+ return 0;
|
||||
+
|
||||
+ rc = selinux_nlmsg_lookup(sclass, nlh->nlmsg_type, &perm);
|
||||
+ if (rc == 0) {
|
||||
+ rc = sock_has_perm(current, sk, perm);
|
||||
+ if (rc)
|
||||
+ return rc;
|
||||
+ } else if (rc == -EINVAL) {
|
||||
+ /* -EINVAL is a missing msg/perm mapping */
|
||||
pr_warn_ratelimited("SELinux: unrecognized netlink"
|
||||
- " message: protocol=%hu nlmsg_type=%hu sclass=%s"
|
||||
- " pig=%d comm=%s\n",
|
||||
- sk->sk_protocol, nlh->nlmsg_type,
|
||||
- secclass_map[sksec->sclass - 1].name,
|
||||
- task_pid_nr(current), current->comm);
|
||||
- if (!selinux_enforcing || security_get_allow_unknown())
|
||||
- err = 0;
|
||||
+ " message: protocol=%hu nlmsg_type=%hu sclass=%s"
|
||||
+ " pid=%d comm=%s\n",
|
||||
+ sk->sk_protocol, nlh->nlmsg_type,
|
||||
+ secclass_map[sclass - 1].name,
|
||||
+ task_pid_nr(current), current->comm);
|
||||
+ if (selinux_enforcing && !security_get_allow_unknown())
|
||||
+ return rc;
|
||||
+ rc = 0;
|
||||
+ } else if (rc == -ENOENT) {
|
||||
+ /* -ENOENT is a missing socket/class mapping, ignore */
|
||||
+ rc = 0;
|
||||
+ } else {
|
||||
+ return rc;
|
||||
}
|
||||
|
||||
- /* Ignore */
|
||||
- if (err == -ENOENT)
|
||||
- err = 0;
|
||||
- goto out;
|
||||
+ /* move to the next message after applying netlink padding */
|
||||
+ msg_len = NLMSG_ALIGN(nlh->nlmsg_len);
|
||||
+ if (msg_len >= data_len)
|
||||
+ return 0;
|
||||
+ data_len -= msg_len;
|
||||
+ data += msg_len;
|
||||
}
|
||||
|
||||
- err = sock_has_perm(current, sk, perm);
|
||||
-out:
|
||||
- return err;
|
||||
+ return rc;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NETFILTER
|
||||
diff --git a/sound/core/oss/pcm_plugin.c b/sound/core/oss/pcm_plugin.c
|
||||
index 7c5d124d538c..6a7cbad90222 100644
|
||||
--- a/sound/core/oss/pcm_plugin.c
|
||||
+++ b/sound/core/oss/pcm_plugin.c
|
||||
@@ -211,21 +211,23 @@ static snd_pcm_sframes_t plug_client_size(struct snd_pcm_substream *plug,
|
||||
if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
|
||||
plugin = snd_pcm_plug_last(plug);
|
||||
while (plugin && drv_frames > 0) {
|
||||
- if (check_size && drv_frames > plugin->buf_frames)
|
||||
- drv_frames = plugin->buf_frames;
|
||||
plugin_prev = plugin->prev;
|
||||
if (plugin->src_frames)
|
||||
drv_frames = plugin->src_frames(plugin, drv_frames);
|
||||
+ if (check_size && plugin->buf_frames &&
|
||||
+ drv_frames > plugin->buf_frames)
|
||||
+ drv_frames = plugin->buf_frames;
|
||||
plugin = plugin_prev;
|
||||
}
|
||||
} else if (stream == SNDRV_PCM_STREAM_CAPTURE) {
|
||||
plugin = snd_pcm_plug_first(plug);
|
||||
while (plugin && drv_frames > 0) {
|
||||
plugin_next = plugin->next;
|
||||
+ if (check_size && plugin->buf_frames &&
|
||||
+ drv_frames > plugin->buf_frames)
|
||||
+ drv_frames = plugin->buf_frames;
|
||||
if (plugin->dst_frames)
|
||||
drv_frames = plugin->dst_frames(plugin, drv_frames);
|
||||
- if (check_size && drv_frames > plugin->buf_frames)
|
||||
- drv_frames = plugin->buf_frames;
|
||||
plugin = plugin_next;
|
||||
}
|
||||
} else
|
||||
@@ -251,26 +253,28 @@ static snd_pcm_sframes_t plug_slave_size(struct snd_pcm_substream *plug,
|
||||
plugin = snd_pcm_plug_first(plug);
|
||||
while (plugin && frames > 0) {
|
||||
plugin_next = plugin->next;
|
||||
+ if (check_size && plugin->buf_frames &&
|
||||
+ frames > plugin->buf_frames)
|
||||
+ frames = plugin->buf_frames;
|
||||
if (plugin->dst_frames) {
|
||||
frames = plugin->dst_frames(plugin, frames);
|
||||
if (frames < 0)
|
||||
return frames;
|
||||
}
|
||||
- if (check_size && frames > plugin->buf_frames)
|
||||
- frames = plugin->buf_frames;
|
||||
plugin = plugin_next;
|
||||
}
|
||||
} else if (stream == SNDRV_PCM_STREAM_CAPTURE) {
|
||||
plugin = snd_pcm_plug_last(plug);
|
||||
while (plugin) {
|
||||
- if (check_size && frames > plugin->buf_frames)
|
||||
- frames = plugin->buf_frames;
|
||||
plugin_prev = plugin->prev;
|
||||
if (plugin->src_frames) {
|
||||
frames = plugin->src_frames(plugin, frames);
|
||||
if (frames < 0)
|
||||
return frames;
|
||||
}
|
||||
+ if (check_size && plugin->buf_frames &&
|
||||
+ frames > plugin->buf_frames)
|
||||
+ frames = plugin->buf_frames;
|
||||
plugin = plugin_prev;
|
||||
}
|
||||
} else
|
||||
diff --git a/sound/isa/opti9xx/miro.c b/sound/isa/opti9xx/miro.c
|
||||
index 3a9067db1a84..7fbac24607bc 100644
|
||||
--- a/sound/isa/opti9xx/miro.c
|
||||
+++ b/sound/isa/opti9xx/miro.c
|
||||
@@ -875,10 +875,13 @@ static void snd_miro_write(struct snd_miro *chip, unsigned char reg,
|
||||
spin_unlock_irqrestore(&chip->lock, flags);
|
||||
}
|
||||
|
||||
+static inline void snd_miro_write_mask(struct snd_miro *chip,
|
||||
+ unsigned char reg, unsigned char value, unsigned char mask)
|
||||
+{
|
||||
+ unsigned char oldval = snd_miro_read(chip, reg);
|
||||
|
||||
-#define snd_miro_write_mask(chip, reg, value, mask) \
|
||||
- snd_miro_write(chip, reg, \
|
||||
- (snd_miro_read(chip, reg) & ~(mask)) | ((value) & (mask)))
|
||||
+ snd_miro_write(chip, reg, (oldval & ~mask) | (value & mask));
|
||||
+}
|
||||
|
||||
/*
|
||||
* Proc Interface
|
||||
diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c
|
||||
index 0a5266003786..6777ae84b59e 100644
|
||||
--- a/sound/isa/opti9xx/opti92x-ad1848.c
|
||||
+++ b/sound/isa/opti9xx/opti92x-ad1848.c
|
||||
@@ -327,10 +327,13 @@ static void snd_opti9xx_write(struct snd_opti9xx *chip, unsigned char reg,
|
||||
}
|
||||
|
||||
|
||||
-#define snd_opti9xx_write_mask(chip, reg, value, mask) \
|
||||
- snd_opti9xx_write(chip, reg, \
|
||||
- (snd_opti9xx_read(chip, reg) & ~(mask)) | ((value) & (mask)))
|
||||
+static inline void snd_opti9xx_write_mask(struct snd_opti9xx *chip,
|
||||
+ unsigned char reg, unsigned char value, unsigned char mask)
|
||||
+{
|
||||
+ unsigned char oldval = snd_opti9xx_read(chip, reg);
|
||||
|
||||
+ snd_opti9xx_write(chip, reg, (oldval & ~mask) | (value & mask));
|
||||
+}
|
||||
|
||||
static int snd_opti9xx_configure(struct snd_opti9xx *chip,
|
||||
long port,
|
||||
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
|
||||
index 7a2943a338bf..e19f447e27ae 100644
|
||||
--- a/sound/pci/hda/patch_hdmi.c
|
||||
+++ b/sound/pci/hda/patch_hdmi.c
|
||||
@@ -1699,8 +1699,10 @@ static bool check_non_pcm_per_cvt(struct hda_codec *codec, hda_nid_t cvt_nid)
|
||||
/* Add sanity check to pass klockwork check.
|
||||
* This should never happen.
|
||||
*/
|
||||
- if (WARN_ON(spdif == NULL))
|
||||
+ if (WARN_ON(spdif == NULL)) {
|
||||
+ mutex_unlock(&codec->spdif_mutex);
|
||||
return true;
|
||||
+ }
|
||||
non_pcm = !!(spdif->status & IEC958_AES0_NONAUDIO);
|
||||
mutex_unlock(&codec->spdif_mutex);
|
||||
return non_pcm;
|
||||
696
patch/kernel/odroidc4-legacy/patch-4.9.222-223.patch
Normal file
696
patch/kernel/odroidc4-legacy/patch-4.9.222-223.patch
Normal file
@@ -0,0 +1,696 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 67c9106594be..2a923301987e 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 9
|
||||
-SUBLEVEL = 222
|
||||
+SUBLEVEL = 223
|
||||
EXTRAVERSION =
|
||||
NAME = Roaring Lionus
|
||||
|
||||
diff --git a/arch/mips/kernel/perf_event_mipsxx.c b/arch/mips/kernel/perf_event_mipsxx.c
|
||||
index d3ba9f4105b5..8e04fe8325db 100644
|
||||
--- a/arch/mips/kernel/perf_event_mipsxx.c
|
||||
+++ b/arch/mips/kernel/perf_event_mipsxx.c
|
||||
@@ -1605,7 +1605,6 @@ static const struct mips_perf_event *mipsxx_pmu_map_raw_event(u64 config)
|
||||
break;
|
||||
case CPU_P5600:
|
||||
case CPU_P6600:
|
||||
- case CPU_I6400:
|
||||
/* 8-bit event numbers */
|
||||
raw_id = config & 0x1ff;
|
||||
base_id = raw_id & 0xff;
|
||||
@@ -1618,6 +1617,11 @@ static const struct mips_perf_event *mipsxx_pmu_map_raw_event(u64 config)
|
||||
raw_event.range = P;
|
||||
#endif
|
||||
break;
|
||||
+ case CPU_I6400:
|
||||
+ /* 8-bit event numbers */
|
||||
+ base_id = config & 0xff;
|
||||
+ raw_event.cntr_mask = CNTR_EVEN | CNTR_ODD;
|
||||
+ break;
|
||||
case CPU_1004K:
|
||||
if (IS_BOTH_COUNTERS_1004K_EVENT(base_id))
|
||||
raw_event.cntr_mask = CNTR_EVEN | CNTR_ODD;
|
||||
diff --git a/arch/powerpc/kernel/pci_of_scan.c b/arch/powerpc/kernel/pci_of_scan.c
|
||||
index e0648a09d9c8..194c0ab82e7c 100644
|
||||
--- a/arch/powerpc/kernel/pci_of_scan.c
|
||||
+++ b/arch/powerpc/kernel/pci_of_scan.c
|
||||
@@ -82,10 +82,16 @@ static void of_pci_parse_addrs(struct device_node *node, struct pci_dev *dev)
|
||||
const __be32 *addrs;
|
||||
u32 i;
|
||||
int proplen;
|
||||
+ bool mark_unset = false;
|
||||
|
||||
addrs = of_get_property(node, "assigned-addresses", &proplen);
|
||||
- if (!addrs)
|
||||
- return;
|
||||
+ if (!addrs || !proplen) {
|
||||
+ addrs = of_get_property(node, "reg", &proplen);
|
||||
+ if (!addrs || !proplen)
|
||||
+ return;
|
||||
+ mark_unset = true;
|
||||
+ }
|
||||
+
|
||||
pr_debug(" parse addresses (%d bytes) @ %p\n", proplen, addrs);
|
||||
for (; proplen >= 20; proplen -= 20, addrs += 5) {
|
||||
flags = pci_parse_of_flags(of_read_number(addrs, 1), 0);
|
||||
@@ -110,6 +116,8 @@ static void of_pci_parse_addrs(struct device_node *node, struct pci_dev *dev)
|
||||
continue;
|
||||
}
|
||||
res->flags = flags;
|
||||
+ if (mark_unset)
|
||||
+ res->flags |= IORESOURCE_UNSET;
|
||||
res->name = pci_name(dev);
|
||||
region.start = base;
|
||||
region.end = base + size - 1;
|
||||
diff --git a/drivers/iio/adc/ad7793.c b/drivers/iio/adc/ad7793.c
|
||||
index 47c3d7f32900..437762a1e487 100644
|
||||
--- a/drivers/iio/adc/ad7793.c
|
||||
+++ b/drivers/iio/adc/ad7793.c
|
||||
@@ -570,7 +570,7 @@ static const struct iio_info ad7797_info = {
|
||||
.read_raw = &ad7793_read_raw,
|
||||
.write_raw = &ad7793_write_raw,
|
||||
.write_raw_get_fmt = &ad7793_write_raw_get_fmt,
|
||||
- .attrs = &ad7793_attribute_group,
|
||||
+ .attrs = &ad7797_attribute_group,
|
||||
.validate_trigger = ad_sd_validate_trigger,
|
||||
.driver_module = THIS_MODULE,
|
||||
};
|
||||
diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
|
||||
index 71525950c641..060f9b176929 100644
|
||||
--- a/drivers/net/dsa/b53/b53_common.c
|
||||
+++ b/drivers/net/dsa/b53/b53_common.c
|
||||
@@ -1109,6 +1109,7 @@ static int b53_arl_read(struct b53_device *dev, u64 mac,
|
||||
u16 vid, struct b53_arl_entry *ent, u8 *idx,
|
||||
bool is_valid)
|
||||
{
|
||||
+ DECLARE_BITMAP(free_bins, B53_ARLTBL_MAX_BIN_ENTRIES);
|
||||
unsigned int i;
|
||||
int ret;
|
||||
|
||||
@@ -1116,6 +1117,8 @@ static int b53_arl_read(struct b53_device *dev, u64 mac,
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
+ bitmap_zero(free_bins, dev->num_arl_entries);
|
||||
+
|
||||
/* Read the bins */
|
||||
for (i = 0; i < dev->num_arl_entries; i++) {
|
||||
u64 mac_vid;
|
||||
@@ -1127,13 +1130,21 @@ static int b53_arl_read(struct b53_device *dev, u64 mac,
|
||||
B53_ARLTBL_DATA_ENTRY(i), &fwd_entry);
|
||||
b53_arl_to_entry(ent, mac_vid, fwd_entry);
|
||||
|
||||
- if (!(fwd_entry & ARLTBL_VALID))
|
||||
+ if (!(fwd_entry & ARLTBL_VALID)) {
|
||||
+ set_bit(i, free_bins);
|
||||
continue;
|
||||
+ }
|
||||
if ((mac_vid & ARLTBL_MAC_MASK) != mac)
|
||||
continue;
|
||||
*idx = i;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
+ if (bitmap_weight(free_bins, dev->num_arl_entries) == 0)
|
||||
+ return -ENOSPC;
|
||||
+
|
||||
+ *idx = find_first_bit(free_bins, dev->num_arl_entries);
|
||||
+
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
@@ -1163,10 +1174,21 @@ static int b53_arl_op(struct b53_device *dev, int op, int port,
|
||||
if (op)
|
||||
return ret;
|
||||
|
||||
- /* We could not find a matching MAC, so reset to a new entry */
|
||||
- if (ret) {
|
||||
+ switch (ret) {
|
||||
+ case -ENOSPC:
|
||||
+ dev_dbg(dev->dev, "{%pM,%.4d} no space left in ARL\n",
|
||||
+ addr, vid);
|
||||
+ return is_valid ? ret : 0;
|
||||
+ case -ENOENT:
|
||||
+ /* We could not find a matching MAC, so reset to a new entry */
|
||||
+ dev_dbg(dev->dev, "{%pM,%.4d} not found, using idx: %d\n",
|
||||
+ addr, vid, idx);
|
||||
fwd_entry = 0;
|
||||
- idx = 1;
|
||||
+ break;
|
||||
+ default:
|
||||
+ dev_dbg(dev->dev, "{%pM,%.4d} found, using idx: %d\n",
|
||||
+ addr, vid, idx);
|
||||
+ break;
|
||||
}
|
||||
|
||||
memset(&ent, 0, sizeof(ent));
|
||||
diff --git a/drivers/net/dsa/b53/b53_regs.h b/drivers/net/dsa/b53/b53_regs.h
|
||||
index 85c44bfba55a..3cf246c6bdcc 100644
|
||||
--- a/drivers/net/dsa/b53/b53_regs.h
|
||||
+++ b/drivers/net/dsa/b53/b53_regs.h
|
||||
@@ -280,6 +280,9 @@
|
||||
#define ARLTBL_STATIC BIT(15)
|
||||
#define ARLTBL_VALID BIT(16)
|
||||
|
||||
+/* Maximum number of bin entries in the ARL for all switches */
|
||||
+#define B53_ARLTBL_MAX_BIN_ENTRIES 4
|
||||
+
|
||||
/* ARL Search Control Register (8 bit) */
|
||||
#define B53_ARL_SRCH_CTL 0x50
|
||||
#define B53_ARL_SRCH_CTL_25 0x20
|
||||
diff --git a/drivers/net/ethernet/broadcom/bcmsysport.c b/drivers/net/ethernet/broadcom/bcmsysport.c
|
||||
index 6519dd33c7ca..5d67dbdd943d 100644
|
||||
--- a/drivers/net/ethernet/broadcom/bcmsysport.c
|
||||
+++ b/drivers/net/ethernet/broadcom/bcmsysport.c
|
||||
@@ -504,7 +504,8 @@ static struct sk_buff *bcm_sysport_rx_refill(struct bcm_sysport_priv *priv,
|
||||
dma_addr_t mapping;
|
||||
|
||||
/* Allocate a new SKB for a new packet */
|
||||
- skb = netdev_alloc_skb(priv->netdev, RX_BUF_LENGTH);
|
||||
+ skb = __netdev_alloc_skb(priv->netdev, RX_BUF_LENGTH,
|
||||
+ GFP_ATOMIC | __GFP_NOWARN);
|
||||
if (!skb) {
|
||||
priv->mib.alloc_rx_buff_failed++;
|
||||
netif_err(priv, rx_err, ndev, "SKB alloc failed\n");
|
||||
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
|
||||
index a23404480597..5d4189c94718 100644
|
||||
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
|
||||
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
|
||||
@@ -1596,7 +1596,8 @@ static struct sk_buff *bcmgenet_rx_refill(struct bcmgenet_priv *priv,
|
||||
dma_addr_t mapping;
|
||||
|
||||
/* Allocate a new Rx skb */
|
||||
- skb = netdev_alloc_skb(priv->dev, priv->rx_buf_len + SKB_ALIGNMENT);
|
||||
+ skb = __netdev_alloc_skb(priv->dev, priv->rx_buf_len + SKB_ALIGNMENT,
|
||||
+ GFP_ATOMIC | __GFP_NOWARN);
|
||||
if (!skb) {
|
||||
priv->mib.alloc_rx_buff_failed++;
|
||||
netif_err(priv, rx_err, priv->dev,
|
||||
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c
|
||||
index 25136941a964..5b91a95476de 100644
|
||||
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c
|
||||
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c
|
||||
@@ -40,12 +40,16 @@ static u32 stmmac_config_sub_second_increment(void __iomem *ioaddr,
|
||||
unsigned long data;
|
||||
u32 reg_value;
|
||||
|
||||
- /* For GMAC3.x, 4.x versions, convert the ptp_clock to nano second
|
||||
- * formula = (1/ptp_clock) * 1000000000
|
||||
- * where ptp_clock is 50MHz if fine method is used to update system
|
||||
+ /* For GMAC3.x, 4.x versions, in "fine adjustement mode" set sub-second
|
||||
+ * increment to twice the number of nanoseconds of a clock cycle.
|
||||
+ * The calculation of the default_addend value by the caller will set it
|
||||
+ * to mid-range = 2^31 when the remainder of this division is zero,
|
||||
+ * which will make the accumulator overflow once every 2 ptp_clock
|
||||
+ * cycles, adding twice the number of nanoseconds of a clock cycle :
|
||||
+ * 2000000000ULL / ptp_clock.
|
||||
*/
|
||||
if (value & PTP_TCR_TSCFUPDT)
|
||||
- data = (1000000000ULL / 50000000);
|
||||
+ data = (2000000000ULL / ptp_clock);
|
||||
else
|
||||
data = (1000000000ULL / ptp_clock);
|
||||
|
||||
diff --git a/drivers/net/wimax/i2400m/usb-fw.c b/drivers/net/wimax/i2400m/usb-fw.c
|
||||
index e74664b84925..4e4167976acf 100644
|
||||
--- a/drivers/net/wimax/i2400m/usb-fw.c
|
||||
+++ b/drivers/net/wimax/i2400m/usb-fw.c
|
||||
@@ -354,6 +354,7 @@ out:
|
||||
usb_autopm_put_interface(i2400mu->usb_iface);
|
||||
d_fnend(8, dev, "(i2400m %p ack %p size %zu) = %ld\n",
|
||||
i2400m, ack, ack_size, (long) result);
|
||||
+ usb_put_urb(¬if_urb);
|
||||
return result;
|
||||
|
||||
error_exceeded:
|
||||
diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c
|
||||
index 2e37097916b5..2ac966400c42 100644
|
||||
--- a/drivers/vhost/vsock.c
|
||||
+++ b/drivers/vhost/vsock.c
|
||||
@@ -460,6 +460,11 @@ static int vhost_vsock_start(struct vhost_vsock *vsock)
|
||||
mutex_unlock(&vq->mutex);
|
||||
}
|
||||
|
||||
+ /* Some packets may have been queued before the device was started,
|
||||
+ * let's kick the send worker to send them.
|
||||
+ */
|
||||
+ vhost_work_queue(&vsock->dev, &vsock->send_pkt_work);
|
||||
+
|
||||
mutex_unlock(&vsock->dev.mutex);
|
||||
return 0;
|
||||
|
||||
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
|
||||
index f2707ff795d4..c018d161735c 100644
|
||||
--- a/fs/cifs/connect.c
|
||||
+++ b/fs/cifs/connect.c
|
||||
@@ -341,8 +341,10 @@ static int reconn_set_ipaddr(struct TCP_Server_Info *server)
|
||||
return rc;
|
||||
}
|
||||
|
||||
+ spin_lock(&cifs_tcp_ses_lock);
|
||||
rc = cifs_convert_address((struct sockaddr *)&server->dstaddr, ipaddr,
|
||||
strlen(ipaddr));
|
||||
+ spin_unlock(&cifs_tcp_ses_lock);
|
||||
kfree(ipaddr);
|
||||
|
||||
return !rc ? -1 : 0;
|
||||
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
|
||||
index d3417c18ee2f..dbab3036e4f5 100644
|
||||
--- a/include/linux/ieee80211.h
|
||||
+++ b/include/linux/ieee80211.h
|
||||
@@ -619,6 +619,15 @@ static inline bool ieee80211_is_qos_nullfunc(__le16 fc)
|
||||
cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_QOS_NULLFUNC);
|
||||
}
|
||||
|
||||
+/**
|
||||
+ * ieee80211_is_any_nullfunc - check if frame is regular or QoS nullfunc frame
|
||||
+ * @fc: frame control bytes in little-endian byteorder
|
||||
+ */
|
||||
+static inline bool ieee80211_is_any_nullfunc(__le16 fc)
|
||||
+{
|
||||
+ return (ieee80211_is_nullfunc(fc) || ieee80211_is_qos_nullfunc(fc));
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* ieee80211_is_bufferable_mmpdu - check if frame is bufferable MMPDU
|
||||
* @fc: frame control field in little-endian byteorder
|
||||
diff --git a/lib/mpi/longlong.h b/lib/mpi/longlong.h
|
||||
index 0f64fcee4ccd..8f383cca6bb1 100644
|
||||
--- a/lib/mpi/longlong.h
|
||||
+++ b/lib/mpi/longlong.h
|
||||
@@ -756,22 +756,22 @@ do { \
|
||||
do { \
|
||||
if (__builtin_constant_p(bh) && (bh) == 0) \
|
||||
__asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{aze|addze} %0,%2" \
|
||||
- : "=r" ((USItype)(sh)), \
|
||||
- "=&r" ((USItype)(sl)) \
|
||||
+ : "=r" (sh), \
|
||||
+ "=&r" (sl) \
|
||||
: "%r" ((USItype)(ah)), \
|
||||
"%r" ((USItype)(al)), \
|
||||
"rI" ((USItype)(bl))); \
|
||||
else if (__builtin_constant_p(bh) && (bh) == ~(USItype) 0) \
|
||||
__asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{ame|addme} %0,%2" \
|
||||
- : "=r" ((USItype)(sh)), \
|
||||
- "=&r" ((USItype)(sl)) \
|
||||
+ : "=r" (sh), \
|
||||
+ "=&r" (sl) \
|
||||
: "%r" ((USItype)(ah)), \
|
||||
"%r" ((USItype)(al)), \
|
||||
"rI" ((USItype)(bl))); \
|
||||
else \
|
||||
__asm__ ("{a%I5|add%I5c} %1,%4,%5\n\t{ae|adde} %0,%2,%3" \
|
||||
- : "=r" ((USItype)(sh)), \
|
||||
- "=&r" ((USItype)(sl)) \
|
||||
+ : "=r" (sh), \
|
||||
+ "=&r" (sl) \
|
||||
: "%r" ((USItype)(ah)), \
|
||||
"r" ((USItype)(bh)), \
|
||||
"%r" ((USItype)(al)), \
|
||||
@@ -781,36 +781,36 @@ do { \
|
||||
do { \
|
||||
if (__builtin_constant_p(ah) && (ah) == 0) \
|
||||
__asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfze|subfze} %0,%2" \
|
||||
- : "=r" ((USItype)(sh)), \
|
||||
- "=&r" ((USItype)(sl)) \
|
||||
+ : "=r" (sh), \
|
||||
+ "=&r" (sl) \
|
||||
: "r" ((USItype)(bh)), \
|
||||
"rI" ((USItype)(al)), \
|
||||
"r" ((USItype)(bl))); \
|
||||
else if (__builtin_constant_p(ah) && (ah) == ~(USItype) 0) \
|
||||
__asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfme|subfme} %0,%2" \
|
||||
- : "=r" ((USItype)(sh)), \
|
||||
- "=&r" ((USItype)(sl)) \
|
||||
+ : "=r" (sh), \
|
||||
+ "=&r" (sl) \
|
||||
: "r" ((USItype)(bh)), \
|
||||
"rI" ((USItype)(al)), \
|
||||
"r" ((USItype)(bl))); \
|
||||
else if (__builtin_constant_p(bh) && (bh) == 0) \
|
||||
__asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{ame|addme} %0,%2" \
|
||||
- : "=r" ((USItype)(sh)), \
|
||||
- "=&r" ((USItype)(sl)) \
|
||||
+ : "=r" (sh), \
|
||||
+ "=&r" (sl) \
|
||||
: "r" ((USItype)(ah)), \
|
||||
"rI" ((USItype)(al)), \
|
||||
"r" ((USItype)(bl))); \
|
||||
else if (__builtin_constant_p(bh) && (bh) == ~(USItype) 0) \
|
||||
__asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{aze|addze} %0,%2" \
|
||||
- : "=r" ((USItype)(sh)), \
|
||||
- "=&r" ((USItype)(sl)) \
|
||||
+ : "=r" (sh), \
|
||||
+ "=&r" (sl) \
|
||||
: "r" ((USItype)(ah)), \
|
||||
"rI" ((USItype)(al)), \
|
||||
"r" ((USItype)(bl))); \
|
||||
else \
|
||||
__asm__ ("{sf%I4|subf%I4c} %1,%5,%4\n\t{sfe|subfe} %0,%3,%2" \
|
||||
- : "=r" ((USItype)(sh)), \
|
||||
- "=&r" ((USItype)(sl)) \
|
||||
+ : "=r" (sh), \
|
||||
+ "=&r" (sl) \
|
||||
: "r" ((USItype)(ah)), \
|
||||
"r" ((USItype)(bh)), \
|
||||
"rI" ((USItype)(al)), \
|
||||
@@ -821,7 +821,7 @@ do { \
|
||||
do { \
|
||||
USItype __m0 = (m0), __m1 = (m1); \
|
||||
__asm__ ("mulhwu %0,%1,%2" \
|
||||
- : "=r" ((USItype) ph) \
|
||||
+ : "=r" (ph) \
|
||||
: "%r" (__m0), \
|
||||
"r" (__m1)); \
|
||||
(pl) = __m0 * __m1; \
|
||||
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
|
||||
index 048389b5aa0f..58b80270e58c 100644
|
||||
--- a/net/mac80211/mlme.c
|
||||
+++ b/net/mac80211/mlme.c
|
||||
@@ -2277,7 +2277,7 @@ void ieee80211_sta_tx_notify(struct ieee80211_sub_if_data *sdata,
|
||||
if (!ieee80211_is_data(hdr->frame_control))
|
||||
return;
|
||||
|
||||
- if (ieee80211_is_nullfunc(hdr->frame_control) &&
|
||||
+ if (ieee80211_is_any_nullfunc(hdr->frame_control) &&
|
||||
sdata->u.mgd.probe_send_count > 0) {
|
||||
if (ack)
|
||||
ieee80211_sta_reset_conn_monitor(sdata);
|
||||
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
|
||||
index a6f265262f15..d3334fd84ca2 100644
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -1231,8 +1231,7 @@ ieee80211_rx_h_check_dup(struct ieee80211_rx_data *rx)
|
||||
return RX_CONTINUE;
|
||||
|
||||
if (ieee80211_is_ctl(hdr->frame_control) ||
|
||||
- ieee80211_is_nullfunc(hdr->frame_control) ||
|
||||
- ieee80211_is_qos_nullfunc(hdr->frame_control) ||
|
||||
+ ieee80211_is_any_nullfunc(hdr->frame_control) ||
|
||||
is_multicast_ether_addr(hdr->addr1))
|
||||
return RX_CONTINUE;
|
||||
|
||||
@@ -1617,8 +1616,7 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx)
|
||||
* Drop (qos-)data::nullfunc frames silently, since they
|
||||
* are used only to control station power saving mode.
|
||||
*/
|
||||
- if (ieee80211_is_nullfunc(hdr->frame_control) ||
|
||||
- ieee80211_is_qos_nullfunc(hdr->frame_control)) {
|
||||
+ if (ieee80211_is_any_nullfunc(hdr->frame_control)) {
|
||||
I802_DEBUG_INC(rx->local->rx_handlers_drop_nullfunc);
|
||||
|
||||
/*
|
||||
@@ -2112,7 +2110,7 @@ static int ieee80211_drop_unencrypted(struct ieee80211_rx_data *rx, __le16 fc)
|
||||
|
||||
/* Drop unencrypted frames if key is set. */
|
||||
if (unlikely(!ieee80211_has_protected(fc) &&
|
||||
- !ieee80211_is_nullfunc(fc) &&
|
||||
+ !ieee80211_is_any_nullfunc(fc) &&
|
||||
ieee80211_is_data(fc) && rx->key))
|
||||
return -EACCES;
|
||||
|
||||
diff --git a/net/mac80211/status.c b/net/mac80211/status.c
|
||||
index 246d113bd755..1d81064b241d 100644
|
||||
--- a/net/mac80211/status.c
|
||||
+++ b/net/mac80211/status.c
|
||||
@@ -480,8 +480,7 @@ static void ieee80211_report_ack_skb(struct ieee80211_local *local,
|
||||
rcu_read_lock();
|
||||
sdata = ieee80211_sdata_from_skb(local, skb);
|
||||
if (sdata) {
|
||||
- if (ieee80211_is_nullfunc(hdr->frame_control) ||
|
||||
- ieee80211_is_qos_nullfunc(hdr->frame_control))
|
||||
+ if (ieee80211_is_any_nullfunc(hdr->frame_control))
|
||||
cfg80211_probe_status(sdata->dev, hdr->addr1,
|
||||
cookie, acked,
|
||||
GFP_ATOMIC);
|
||||
@@ -914,7 +913,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
|
||||
I802_DEBUG_INC(local->dot11FailedCount);
|
||||
}
|
||||
|
||||
- if (ieee80211_is_nullfunc(fc) && ieee80211_has_pm(fc) &&
|
||||
+ if (ieee80211_is_any_nullfunc(fc) && ieee80211_has_pm(fc) &&
|
||||
ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS) &&
|
||||
!(info->flags & IEEE80211_TX_CTL_INJECTED) &&
|
||||
local->ps_sdata && !(local->scanning)) {
|
||||
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
|
||||
index 850264fac378..6216279efc46 100644
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -294,7 +294,7 @@ ieee80211_tx_h_check_assoc(struct ieee80211_tx_data *tx)
|
||||
if (unlikely(test_bit(SCAN_SW_SCANNING, &tx->local->scanning)) &&
|
||||
test_bit(SDATA_STATE_OFFCHANNEL, &tx->sdata->state) &&
|
||||
!ieee80211_is_probe_req(hdr->frame_control) &&
|
||||
- !ieee80211_is_nullfunc(hdr->frame_control))
|
||||
+ !ieee80211_is_any_nullfunc(hdr->frame_control))
|
||||
/*
|
||||
* When software scanning only nullfunc frames (to notify
|
||||
* the sleep state to the AP) and probe requests (for the
|
||||
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
|
||||
index fc67d356b5fa..acb0c2631c79 100644
|
||||
--- a/net/sctp/sm_make_chunk.c
|
||||
+++ b/net/sctp/sm_make_chunk.c
|
||||
@@ -856,7 +856,11 @@ struct sctp_chunk *sctp_make_shutdown(const struct sctp_association *asoc,
|
||||
sctp_shutdownhdr_t shut;
|
||||
__u32 ctsn;
|
||||
|
||||
- ctsn = sctp_tsnmap_get_ctsn(&asoc->peer.tsn_map);
|
||||
+ if (chunk && chunk->asoc)
|
||||
+ ctsn = sctp_tsnmap_get_ctsn(&chunk->asoc->peer.tsn_map);
|
||||
+ else
|
||||
+ ctsn = sctp_tsnmap_get_ctsn(&asoc->peer.tsn_map);
|
||||
+
|
||||
shut.cum_tsn_ack = htonl(ctsn);
|
||||
|
||||
retval = sctp_make_control(asoc, SCTP_CID_SHUTDOWN, 0,
|
||||
diff --git a/net/sunrpc/xprtrdma/backchannel.c b/net/sunrpc/xprtrdma/backchannel.c
|
||||
index 2c472e1b4827..a84c3b681699 100644
|
||||
--- a/net/sunrpc/xprtrdma/backchannel.c
|
||||
+++ b/net/sunrpc/xprtrdma/backchannel.c
|
||||
@@ -71,21 +71,13 @@ out_fail:
|
||||
static int rpcrdma_bc_setup_reps(struct rpcrdma_xprt *r_xprt,
|
||||
unsigned int count)
|
||||
{
|
||||
- struct rpcrdma_rep *rep;
|
||||
int rc = 0;
|
||||
|
||||
while (count--) {
|
||||
- rep = rpcrdma_create_rep(r_xprt);
|
||||
- if (IS_ERR(rep)) {
|
||||
- pr_err("RPC: %s: reply buffer alloc failed\n",
|
||||
- __func__);
|
||||
- rc = PTR_ERR(rep);
|
||||
+ rc = rpcrdma_create_rep(r_xprt);
|
||||
+ if (rc)
|
||||
break;
|
||||
- }
|
||||
-
|
||||
- rpcrdma_recv_buffer_put(rep);
|
||||
}
|
||||
-
|
||||
return rc;
|
||||
}
|
||||
|
||||
diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c
|
||||
index 1a2b1f61ed26..915a1ddabe03 100644
|
||||
--- a/net/sunrpc/xprtrdma/verbs.c
|
||||
+++ b/net/sunrpc/xprtrdma/verbs.c
|
||||
@@ -891,10 +891,17 @@ rpcrdma_create_req(struct rpcrdma_xprt *r_xprt)
|
||||
return req;
|
||||
}
|
||||
|
||||
-struct rpcrdma_rep *
|
||||
-rpcrdma_create_rep(struct rpcrdma_xprt *r_xprt)
|
||||
+/**
|
||||
+ * rpcrdma_create_rep - Allocate an rpcrdma_rep object
|
||||
+ * @r_xprt: controlling transport
|
||||
+ *
|
||||
+ * Returns 0 on success or a negative errno on failure.
|
||||
+ */
|
||||
+int
|
||||
+ rpcrdma_create_rep(struct rpcrdma_xprt *r_xprt)
|
||||
{
|
||||
struct rpcrdma_create_data_internal *cdata = &r_xprt->rx_data;
|
||||
+ struct rpcrdma_buffer *buf = &r_xprt->rx_buf;
|
||||
struct rpcrdma_ia *ia = &r_xprt->rx_ia;
|
||||
struct rpcrdma_rep *rep;
|
||||
int rc;
|
||||
@@ -919,12 +926,18 @@ rpcrdma_create_rep(struct rpcrdma_xprt *r_xprt)
|
||||
rep->rr_recv_wr.wr_cqe = &rep->rr_cqe;
|
||||
rep->rr_recv_wr.sg_list = &rep->rr_rdmabuf->rg_iov;
|
||||
rep->rr_recv_wr.num_sge = 1;
|
||||
- return rep;
|
||||
+
|
||||
+ spin_lock(&buf->rb_lock);
|
||||
+ list_add(&rep->rr_list, &buf->rb_recv_bufs);
|
||||
+ spin_unlock(&buf->rb_lock);
|
||||
+ return 0;
|
||||
|
||||
out_free:
|
||||
kfree(rep);
|
||||
out:
|
||||
- return ERR_PTR(rc);
|
||||
+ dprintk("RPC: %s: reply buffer %d alloc failed\n",
|
||||
+ __func__, rc);
|
||||
+ return rc;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -967,17 +980,10 @@ rpcrdma_buffer_create(struct rpcrdma_xprt *r_xprt)
|
||||
}
|
||||
|
||||
INIT_LIST_HEAD(&buf->rb_recv_bufs);
|
||||
- for (i = 0; i < buf->rb_max_requests + RPCRDMA_MAX_BC_REQUESTS; i++) {
|
||||
- struct rpcrdma_rep *rep;
|
||||
-
|
||||
- rep = rpcrdma_create_rep(r_xprt);
|
||||
- if (IS_ERR(rep)) {
|
||||
- dprintk("RPC: %s: reply buffer %d alloc failed\n",
|
||||
- __func__, i);
|
||||
- rc = PTR_ERR(rep);
|
||||
+ for (i = 0; i <= buf->rb_max_requests; i++) {
|
||||
+ rc = rpcrdma_create_rep(r_xprt);
|
||||
+ if (rc)
|
||||
goto out;
|
||||
- }
|
||||
- list_add(&rep->rr_list, &buf->rb_recv_bufs);
|
||||
}
|
||||
|
||||
return 0;
|
||||
diff --git a/net/sunrpc/xprtrdma/xprt_rdma.h b/net/sunrpc/xprtrdma/xprt_rdma.h
|
||||
index 48989d5b2883..002305c38f7c 100644
|
||||
--- a/net/sunrpc/xprtrdma/xprt_rdma.h
|
||||
+++ b/net/sunrpc/xprtrdma/xprt_rdma.h
|
||||
@@ -502,8 +502,8 @@ int rpcrdma_ep_post_recv(struct rpcrdma_ia *, struct rpcrdma_rep *);
|
||||
* Buffer calls - xprtrdma/verbs.c
|
||||
*/
|
||||
struct rpcrdma_req *rpcrdma_create_req(struct rpcrdma_xprt *);
|
||||
-struct rpcrdma_rep *rpcrdma_create_rep(struct rpcrdma_xprt *);
|
||||
void rpcrdma_destroy_req(struct rpcrdma_req *);
|
||||
+int rpcrdma_create_rep(struct rpcrdma_xprt *r_xprt);
|
||||
int rpcrdma_buffer_create(struct rpcrdma_xprt *);
|
||||
void rpcrdma_buffer_destroy(struct rpcrdma_buffer *);
|
||||
|
||||
diff --git a/scripts/config b/scripts/config
|
||||
index 026aeb4f32ee..73de17d39698 100755
|
||||
--- a/scripts/config
|
||||
+++ b/scripts/config
|
||||
@@ -6,6 +6,9 @@ myname=${0##*/}
|
||||
# If no prefix forced, use the default CONFIG_
|
||||
CONFIG_="${CONFIG_-CONFIG_}"
|
||||
|
||||
+# We use an uncommon delimiter for sed substitutions
|
||||
+SED_DELIM=$(echo -en "\001")
|
||||
+
|
||||
usage() {
|
||||
cat >&2 <<EOL
|
||||
Manipulate options in a .config file from the command line.
|
||||
@@ -82,7 +85,7 @@ txt_subst() {
|
||||
local infile="$3"
|
||||
local tmpfile="$infile.swp"
|
||||
|
||||
- sed -e "s:$before:$after:" "$infile" >"$tmpfile"
|
||||
+ sed -e "s$SED_DELIM$before$SED_DELIM$after$SED_DELIM" "$infile" >"$tmpfile"
|
||||
# replace original file with the edited one
|
||||
mv "$tmpfile" "$infile"
|
||||
}
|
||||
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
|
||||
index ab16b81c0c7f..16a692fc7f64 100644
|
||||
--- a/sound/pci/hda/hda_intel.c
|
||||
+++ b/sound/pci/hda/hda_intel.c
|
||||
@@ -1966,9 +1966,10 @@ static const struct hdac_io_ops pci_hda_io_ops = {
|
||||
* some HD-audio PCI entries are exposed without any codecs, and such devices
|
||||
* should be ignored from the beginning.
|
||||
*/
|
||||
-static const struct snd_pci_quirk driver_blacklist[] = {
|
||||
- SND_PCI_QUIRK(0x1462, 0xcb59, "MSI TRX40 Creator", 0),
|
||||
- SND_PCI_QUIRK(0x1462, 0xcb60, "MSI TRX40", 0),
|
||||
+static const struct pci_device_id driver_blacklist[] = {
|
||||
+ { PCI_DEVICE_SUB(0x1022, 0x1487, 0x1043, 0x874f) }, /* ASUS ROG Zenith II / Strix */
|
||||
+ { PCI_DEVICE_SUB(0x1022, 0x1487, 0x1462, 0xcb59) }, /* MSI TRX40 Creator */
|
||||
+ { PCI_DEVICE_SUB(0x1022, 0x1487, 0x1462, 0xcb60) }, /* MSI TRX40 */
|
||||
{}
|
||||
};
|
||||
|
||||
@@ -1991,7 +1992,7 @@ static int azx_probe(struct pci_dev *pci,
|
||||
bool schedule_probe;
|
||||
int err;
|
||||
|
||||
- if (snd_pci_quirk_lookup(pci, driver_blacklist)) {
|
||||
+ if (pci_match_id(driver_blacklist, pci)) {
|
||||
dev_info(&pci->dev, "Skipping the blacklisted device\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
|
||||
index 39810b713d5f..0c2a1413a8f5 100644
|
||||
--- a/sound/soc/codecs/sgtl5000.c
|
||||
+++ b/sound/soc/codecs/sgtl5000.c
|
||||
@@ -1464,6 +1464,40 @@ static int sgtl5000_i2c_probe(struct i2c_client *client,
|
||||
dev_err(&client->dev,
|
||||
"Error %d initializing CHIP_CLK_CTRL\n", ret);
|
||||
|
||||
+ /* Mute everything to avoid pop from the following power-up */
|
||||
+ ret = regmap_write(sgtl5000->regmap, SGTL5000_CHIP_ANA_CTRL,
|
||||
+ SGTL5000_CHIP_ANA_CTRL_DEFAULT);
|
||||
+ if (ret) {
|
||||
+ dev_err(&client->dev,
|
||||
+ "Error %d muting outputs via CHIP_ANA_CTRL\n", ret);
|
||||
+ goto disable_clk;
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * If VAG is powered-on (e.g. from previous boot), it would be disabled
|
||||
+ * by the write to ANA_POWER in later steps of the probe code. This
|
||||
+ * may create a loud pop even with all outputs muted. The proper way
|
||||
+ * to circumvent this is disabling the bit first and waiting the proper
|
||||
+ * cool-down time.
|
||||
+ */
|
||||
+ ret = regmap_read(sgtl5000->regmap, SGTL5000_CHIP_ANA_POWER, &value);
|
||||
+ if (ret) {
|
||||
+ dev_err(&client->dev, "Failed to read ANA_POWER: %d\n", ret);
|
||||
+ goto disable_clk;
|
||||
+ }
|
||||
+ if (value & SGTL5000_VAG_POWERUP) {
|
||||
+ ret = regmap_update_bits(sgtl5000->regmap,
|
||||
+ SGTL5000_CHIP_ANA_POWER,
|
||||
+ SGTL5000_VAG_POWERUP,
|
||||
+ 0);
|
||||
+ if (ret) {
|
||||
+ dev_err(&client->dev, "Error %d disabling VAG\n", ret);
|
||||
+ goto disable_clk;
|
||||
+ }
|
||||
+
|
||||
+ msleep(SGTL5000_VAG_POWERDOWN_DELAY);
|
||||
+ }
|
||||
+
|
||||
/* Follow section 2.2.1.1 of AN3663 */
|
||||
ana_pwr = SGTL5000_ANA_POWER_DEFAULT;
|
||||
if (sgtl5000->num_supplies <= VDDD) {
|
||||
diff --git a/sound/soc/codecs/sgtl5000.h b/sound/soc/codecs/sgtl5000.h
|
||||
index 22f3442af982..9ea41749d037 100644
|
||||
--- a/sound/soc/codecs/sgtl5000.h
|
||||
+++ b/sound/soc/codecs/sgtl5000.h
|
||||
@@ -236,6 +236,7 @@
|
||||
/*
|
||||
* SGTL5000_CHIP_ANA_CTRL
|
||||
*/
|
||||
+#define SGTL5000_CHIP_ANA_CTRL_DEFAULT 0x0133
|
||||
#define SGTL5000_LINE_OUT_MUTE 0x0100
|
||||
#define SGTL5000_HP_SEL_MASK 0x0040
|
||||
#define SGTL5000_HP_SEL_SHIFT 6
|
||||
diff --git a/tools/testing/selftests/ipc/msgque.c b/tools/testing/selftests/ipc/msgque.c
|
||||
index 1b2ce334bb3f..47c074d73e61 100644
|
||||
--- a/tools/testing/selftests/ipc/msgque.c
|
||||
+++ b/tools/testing/selftests/ipc/msgque.c
|
||||
@@ -135,7 +135,7 @@ int dump_queue(struct msgque_data *msgque)
|
||||
for (kern_id = 0; kern_id < 256; kern_id++) {
|
||||
ret = msgctl(kern_id, MSG_STAT, &ds);
|
||||
if (ret < 0) {
|
||||
- if (errno == -EINVAL)
|
||||
+ if (errno == EINVAL)
|
||||
continue;
|
||||
printf("Failed to get stats for IPC queue with id %d\n",
|
||||
kern_id);
|
||||
3212
patch/kernel/odroidc4-legacy/patch-4.9.223-224.patch
Normal file
3212
patch/kernel/odroidc4-legacy/patch-4.9.223-224.patch
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user