Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit da78120b authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge 4.19.319 into android-4.19-stable



Changes in 4.19.319
	gcc-plugins: Rename last_stmt() for GCC 14+
	scsi: qedf: Set qed_slowpath_params to zero before use
	ACPI: EC: Abort address space access upon error
	ACPI: EC: Avoid returning AE_OK on errors in address space handler
	wifi: mac80211: mesh: init nonpeer_pm to active by default in mesh sdata
	wifi: mac80211: fix UBSAN noise in ieee80211_prep_hw_scan()
	Input: silead - Always support 10 fingers
	ila: block BH in ila_output()
	kconfig: gconf: give a proper initial state to the Save button
	kconfig: remove wrong expr_trans_bool()
	fs/file: fix the check in find_next_fd()
	mei: demote client disconnect warning on suspend to debug
	wifi: cfg80211: wext: add extra SIOCSIWSCAN data check
	Input: elantech - fix touchpad state on resume for Lenovo N24
	bytcr_rt5640 : inverse jack detect for Archos 101 cesium
	can: kvaser_usb: fix return value for hif_usb_send_regout
	s390/sclp: Fix sclp_init() cleanup on failure
	ALSA: dmaengine_pcm: terminate dmaengine before synchronize
	net: usb: qmi_wwan: add Telit FN912 compositions
	net: mac802154: Fix racy device stats updates by DEV_STATS_INC() and DEV_STATS_ADD()
	Bluetooth: hci_core: cancel all works upon hci_unregister_dev()
	fs: better handle deep ancestor chains in is_subdir()
	spi: imx: Don't expect DMA for i.MX{25,35,50,51,53} cspi devices
	selftests/vDSO: fix clang build errors and warnings
	hfsplus: fix uninit-value in copy_name
	filelock: Remove locks reliably when fcntl/close race is detected
	ARM: 9324/1: fix get_user() broken with veneer
	ACPI: processor_idle: Fix invalid comparison with insertion sort for latency
	net: relax socket state check at accept time.
	ocfs2: add bounds checking to ocfs2_check_dir_entry()
	jfs: don't walk off the end of ealist
	filelock: Fix fcntl/close race recovery compat path
	Linux 4.19.319

Change-Id: Ic95938f445f72bf8c4604f405929da254471d15e
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parents 82f9317b bd67cb15
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
VERSION = 4
PATCHLEVEL = 19
SUBLEVEL = 318
SUBLEVEL = 319
EXTRAVERSION =
NAME = "People's Front"

+2 −12
Original line number Diff line number Diff line
@@ -145,16 +145,6 @@ extern int __get_user_64t_1(void *);
extern int __get_user_64t_2(void *);
extern int __get_user_64t_4(void *);

#define __GUP_CLOBBER_1	"lr", "cc"
#ifdef CONFIG_CPU_USE_DOMAINS
#define __GUP_CLOBBER_2	"ip", "lr", "cc"
#else
#define __GUP_CLOBBER_2 "lr", "cc"
#endif
#define __GUP_CLOBBER_4	"lr", "cc"
#define __GUP_CLOBBER_32t_8 "lr", "cc"
#define __GUP_CLOBBER_8	"lr", "cc"

#define __get_user_x(__r2, __p, __e, __l, __s)				\
	   __asm__ __volatile__ (					\
		__asmeq("%0", "r0") __asmeq("%1", "r2")			\
@@ -162,7 +152,7 @@ extern int __get_user_64t_4(void *);
		"bl	__get_user_" #__s				\
		: "=&r" (__e), "=r" (__r2)				\
		: "0" (__p), "r" (__l)					\
		: __GUP_CLOBBER_##__s)
		: "ip", "lr", "cc")

/* narrowing a double-word get into a single 32bit word register: */
#ifdef __ARMEB__
@@ -184,7 +174,7 @@ extern int __get_user_64t_4(void *);
		"bl	__get_user_64t_" #__s				\
		: "=&r" (__e), "=r" (__r2)				\
		: "0" (__p), "r" (__l)					\
		: __GUP_CLOBBER_##__s)
		: "ip", "lr", "cc")
#else
#define __get_user_x_64t __get_user_x
#endif
+7 −2
Original line number Diff line number Diff line
@@ -1330,10 +1330,13 @@ acpi_ec_space_handler(u32 function, acpi_physical_address address,
	if (ec->busy_polling || bits > 8)
		acpi_ec_burst_enable(ec);

	for (i = 0; i < bytes; ++i, ++address, ++value)
	for (i = 0; i < bytes; ++i, ++address, ++value) {
		result = (function == ACPI_READ) ?
			acpi_ec_read(ec, address, value) :
			acpi_ec_write(ec, address, *value);
		if (result < 0)
			break;
	}

	if (ec->busy_polling || bits > 8)
		acpi_ec_burst_disable(ec);
@@ -1345,8 +1348,10 @@ acpi_ec_space_handler(u32 function, acpi_physical_address address,
		return AE_NOT_FOUND;
	case -ETIME:
		return AE_TIME;
	default:
	case 0:
		return AE_OK;
	default:
		return AE_ERROR;
	}
}

+16 −24
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@
#include <linux/acpi.h>
#include <linux/dmi.h>
#include <linux/sched.h>       /* need_resched() */
#include <linux/sort.h>
#include <linux/tick.h>
#include <linux/cpuidle.h>
#include <linux/cpu.h>
@@ -545,28 +544,24 @@ static void acpi_processor_power_verify_c3(struct acpi_processor *pr,
	return;
}

static int acpi_cst_latency_cmp(const void *a, const void *b)
static void acpi_cst_latency_sort(struct acpi_processor_cx *states, size_t length)
{
	const struct acpi_processor_cx *x = a, *y = b;
	int i, j, k;

	if (!(x->valid && y->valid))
		return 0;
	if (x->latency > y->latency)
		return 1;
	if (x->latency < y->latency)
		return -1;
	return 0;
}
static void acpi_cst_latency_swap(void *a, void *b, int n)
{
	struct acpi_processor_cx *x = a, *y = b;
	u32 tmp;
	for (i = 1; i < length; i++) {
		if (!states[i].valid)
			continue;

	if (!(x->valid && y->valid))
		return;
	tmp = x->latency;
	x->latency = y->latency;
	y->latency = tmp;
		for (j = i - 1, k = i; j >= 0; j--) {
			if (!states[j].valid)
				continue;

			if (states[j].latency > states[k].latency)
				swap(states[j].latency, states[k].latency);

			k = j;
		}
	}
}

static int acpi_processor_power_verify(struct acpi_processor *pr)
@@ -611,10 +606,7 @@ static int acpi_processor_power_verify(struct acpi_processor *pr)

	if (buggy_latency) {
		pr_notice("FW issue: working around C-state latencies out of order\n");
		sort(&pr->power.states[1], max_cstate,
		     sizeof(struct acpi_processor_cx),
		     acpi_cst_latency_cmp,
		     acpi_cst_latency_swap);
		acpi_cst_latency_sort(&pr->power.states[1], max_cstate);
	}

	lapic_timer_propagate_broadcast(pr);
+31 −0
Original line number Diff line number Diff line
@@ -1527,16 +1527,47 @@ static void elantech_disconnect(struct psmouse *psmouse)
	psmouse->private = NULL;
}

/*
 * Some hw_version 4 models fail to properly activate absolute mode on
 * resume without going through disable/enable cycle.
 */
static const struct dmi_system_id elantech_needs_reenable[] = {
#if defined(CONFIG_DMI) && defined(CONFIG_X86)
	{
		/* Lenovo N24 */
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
			DMI_MATCH(DMI_PRODUCT_NAME, "81AF"),
		},
	},
#endif
	{ }
};

/*
 * Put the touchpad back into absolute mode when reconnecting
 */
static int elantech_reconnect(struct psmouse *psmouse)
{
	int err;

	psmouse_reset(psmouse);

	if (elantech_detect(psmouse, 0))
		return -1;

	if (dmi_check_system(elantech_needs_reenable)) {
		err = ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_DISABLE);
		if (err)
			psmouse_warn(psmouse, "failed to deactivate mouse on %s: %d\n",
				     psmouse->ps2dev.serio->phys, err);

		err = ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_ENABLE);
		if (err)
			psmouse_warn(psmouse, "failed to reactivate mouse on %s: %d\n",
				     psmouse->ps2dev.serio->phys, err);
	}

	if (elantech_set_absolute_mode(psmouse)) {
		psmouse_err(psmouse,
			    "failed to put touchpad back into absolute mode.\n");
Loading