mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
Merge 6.1.133 into android14-6.1-lts
Changes in 6.1.133 ALSA: usb-audio: Add quirk for Plantronics headsets to fix control names HID: hid-plantronics: Add mic mute mapping and generalize quirks atm: Fix NULL pointer dereference ARM: 9350/1: fault: Implement copy_from_kernel_nofault_allowed() ARM: 9351/1: fault: Add "cut here" line for prefetch aborts ARM: Remove address checking for MMUless devices drm/amd/display: Check denominator crb_pipes before used netfilter: socket: Lookup orig tuple for IPv6 SNAT ALSA: hda/realtek: Support mute LED on HP Laptop 15s-du3xxx counter: stm32-lptimer-cnt: fix error handling when enabling counter: microchip-tcb-capture: Fix undefined counter channel state on probe tty: serial: 8250: Add some more device IDs tty: serial: 8250: Add Brainboxes XC devices net: usb: qmi_wwan: add Telit Cinterion FN990B composition net: usb: qmi_wwan: add Telit Cinterion FE990B composition net: usb: usbnet: restore usb%d name exception for local mac addresses memstick: rtsx_usb_ms: Fix slab-use-after-free in rtsx_usb_ms_drv_remove serial: 8250_dma: terminate correct DMA in tx_dma_flush() usb: gadget: uvc: Fix ERR_PTR dereference in uvc_v4l2.c usb: typec: ucsi: Fix NULL pointer access media: i2c: et8ek8: Don't strip remove function when driver is builtin ARM: dts: imx6qdl-apalis: Fix poweroff on Apalis iMX6 Linux 6.1.133 Change-Id: I77eaef12f435acdaa92e4c97431104044fc736f5 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
VERSION = 6
|
VERSION = 6
|
||||||
PATCHLEVEL = 1
|
PATCHLEVEL = 1
|
||||||
SUBLEVEL = 132
|
SUBLEVEL = 133
|
||||||
EXTRAVERSION =
|
EXTRAVERSION =
|
||||||
NAME = Curry Ramen
|
NAME = Curry Ramen
|
||||||
|
|
||||||
|
|||||||
@@ -101,6 +101,11 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
poweroff {
|
||||||
|
compatible = "regulator-poweroff";
|
||||||
|
cpu-supply = <&vgen2_reg>;
|
||||||
|
};
|
||||||
|
|
||||||
reg_module_3v3: regulator-module-3v3 {
|
reg_module_3v3: regulator-module-3v3 {
|
||||||
compatible = "regulator-fixed";
|
compatible = "regulator-fixed";
|
||||||
regulator-always-on;
|
regulator-always-on;
|
||||||
@@ -220,10 +225,6 @@
|
|||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
|
|
||||||
&clks {
|
|
||||||
fsl,pmic-stby-poweroff;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Apalis SPI1 */
|
/* Apalis SPI1 */
|
||||||
&ecspi1 {
|
&ecspi1 {
|
||||||
cs-gpios = <&gpio5 25 GPIO_ACTIVE_LOW>;
|
cs-gpios = <&gpio5 25 GPIO_ACTIVE_LOW>;
|
||||||
@@ -511,7 +512,6 @@
|
|||||||
|
|
||||||
pmic: pmic@8 {
|
pmic: pmic@8 {
|
||||||
compatible = "fsl,pfuze100";
|
compatible = "fsl,pfuze100";
|
||||||
fsl,pmic-stby-poweroff;
|
|
||||||
reg = <0x08>;
|
reg = <0x08>;
|
||||||
|
|
||||||
regulators {
|
regulators {
|
||||||
|
|||||||
@@ -27,6 +27,13 @@
|
|||||||
|
|
||||||
#ifdef CONFIG_MMU
|
#ifdef CONFIG_MMU
|
||||||
|
|
||||||
|
bool copy_from_kernel_nofault_allowed(const void *unsafe_src, size_t size)
|
||||||
|
{
|
||||||
|
unsigned long addr = (unsigned long)unsafe_src;
|
||||||
|
|
||||||
|
return addr >= TASK_SIZE && ULONG_MAX - addr >= size;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is useful to dump out the page tables associated with
|
* This is useful to dump out the page tables associated with
|
||||||
* 'addr' in mm 'mm'.
|
* 'addr' in mm 'mm'.
|
||||||
@@ -552,6 +559,7 @@ do_PrefetchAbort(unsigned long addr, unsigned int ifsr, struct pt_regs *regs)
|
|||||||
if (!inf->fn(addr, ifsr | FSR_LNX_PF, regs))
|
if (!inf->fn(addr, ifsr | FSR_LNX_PF, regs))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
pr_alert("8<--- cut here ---\n");
|
||||||
pr_alert("Unhandled prefetch abort: %s (0x%03x) at 0x%08lx\n",
|
pr_alert("Unhandled prefetch abort: %s (0x%03x) at 0x%08lx\n",
|
||||||
inf->name, ifsr, addr);
|
inf->name, ifsr, addr);
|
||||||
|
|
||||||
|
|||||||
@@ -369,6 +369,25 @@ static int mchp_tc_probe(struct platform_device *pdev)
|
|||||||
channel);
|
channel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Disable Quadrature Decoder and position measure */
|
||||||
|
ret = regmap_update_bits(regmap, ATMEL_TC_BMR, ATMEL_TC_QDEN | ATMEL_TC_POSEN, 0);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
/* Setup the period capture mode */
|
||||||
|
ret = regmap_update_bits(regmap, ATMEL_TC_REG(priv->channel[0], CMR),
|
||||||
|
ATMEL_TC_WAVE | ATMEL_TC_ABETRG | ATMEL_TC_CMR_MASK |
|
||||||
|
ATMEL_TC_TCCLKS,
|
||||||
|
ATMEL_TC_CMR_MASK);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
/* Enable clock and trigger counter */
|
||||||
|
ret = regmap_write(regmap, ATMEL_TC_REG(priv->channel[0], CCR),
|
||||||
|
ATMEL_TC_CLKEN | ATMEL_TC_SWTRG);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
priv->tc_cfg = tcb_config;
|
priv->tc_cfg = tcb_config;
|
||||||
priv->regmap = regmap;
|
priv->regmap = regmap;
|
||||||
counter->name = dev_name(&pdev->dev);
|
counter->name = dev_name(&pdev->dev);
|
||||||
|
|||||||
@@ -58,37 +58,43 @@ static int stm32_lptim_set_enable_state(struct stm32_lptim_cnt *priv,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ret = clk_enable(priv->clk);
|
||||||
|
if (ret)
|
||||||
|
goto disable_cnt;
|
||||||
|
|
||||||
/* LP timer must be enabled before writing CMP & ARR */
|
/* LP timer must be enabled before writing CMP & ARR */
|
||||||
ret = regmap_write(priv->regmap, STM32_LPTIM_ARR, priv->ceiling);
|
ret = regmap_write(priv->regmap, STM32_LPTIM_ARR, priv->ceiling);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
goto disable_clk;
|
||||||
|
|
||||||
ret = regmap_write(priv->regmap, STM32_LPTIM_CMP, 0);
|
ret = regmap_write(priv->regmap, STM32_LPTIM_CMP, 0);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
goto disable_clk;
|
||||||
|
|
||||||
/* ensure CMP & ARR registers are properly written */
|
/* ensure CMP & ARR registers are properly written */
|
||||||
ret = regmap_read_poll_timeout(priv->regmap, STM32_LPTIM_ISR, val,
|
ret = regmap_read_poll_timeout(priv->regmap, STM32_LPTIM_ISR, val,
|
||||||
(val & STM32_LPTIM_CMPOK_ARROK) == STM32_LPTIM_CMPOK_ARROK,
|
(val & STM32_LPTIM_CMPOK_ARROK) == STM32_LPTIM_CMPOK_ARROK,
|
||||||
100, 1000);
|
100, 1000);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
goto disable_clk;
|
||||||
|
|
||||||
ret = regmap_write(priv->regmap, STM32_LPTIM_ICR,
|
ret = regmap_write(priv->regmap, STM32_LPTIM_ICR,
|
||||||
STM32_LPTIM_CMPOKCF_ARROKCF);
|
STM32_LPTIM_CMPOKCF_ARROKCF);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
goto disable_clk;
|
||||||
|
|
||||||
ret = clk_enable(priv->clk);
|
|
||||||
if (ret) {
|
|
||||||
regmap_write(priv->regmap, STM32_LPTIM_CR, 0);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
priv->enabled = true;
|
priv->enabled = true;
|
||||||
|
|
||||||
/* Start LP timer in continuous mode */
|
/* Start LP timer in continuous mode */
|
||||||
return regmap_update_bits(priv->regmap, STM32_LPTIM_CR,
|
return regmap_update_bits(priv->regmap, STM32_LPTIM_CR,
|
||||||
STM32_LPTIM_CNTSTRT, STM32_LPTIM_CNTSTRT);
|
STM32_LPTIM_CNTSTRT, STM32_LPTIM_CNTSTRT);
|
||||||
|
|
||||||
|
disable_clk:
|
||||||
|
clk_disable(priv->clk);
|
||||||
|
disable_cnt:
|
||||||
|
regmap_write(priv->regmap, STM32_LPTIM_CR, 0);
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int stm32_lptim_setup(struct stm32_lptim_cnt *priv, int enable)
|
static int stm32_lptim_setup(struct stm32_lptim_cnt *priv, int enable)
|
||||||
|
|||||||
@@ -1772,7 +1772,7 @@ static int dcn315_populate_dml_pipes_from_context(
|
|||||||
bool split_required = pipe->stream->timing.pix_clk_100hz >= dcn_get_max_non_odm_pix_rate_100hz(&dc->dml.soc)
|
bool split_required = pipe->stream->timing.pix_clk_100hz >= dcn_get_max_non_odm_pix_rate_100hz(&dc->dml.soc)
|
||||||
|| (pipe->plane_state && pipe->plane_state->src_rect.width > 5120);
|
|| (pipe->plane_state && pipe->plane_state->src_rect.width > 5120);
|
||||||
|
|
||||||
if (remaining_det_segs > MIN_RESERVED_DET_SEGS)
|
if (remaining_det_segs > MIN_RESERVED_DET_SEGS && crb_pipes != 0)
|
||||||
pipes[pipe_cnt].pipe.src.det_size_override += (remaining_det_segs - MIN_RESERVED_DET_SEGS) / crb_pipes +
|
pipes[pipe_cnt].pipe.src.det_size_override += (remaining_det_segs - MIN_RESERVED_DET_SEGS) / crb_pipes +
|
||||||
(crb_idx < (remaining_det_segs - MIN_RESERVED_DET_SEGS) % crb_pipes ? 1 : 0);
|
(crb_idx < (remaining_det_segs - MIN_RESERVED_DET_SEGS) % crb_pipes ? 1 : 0);
|
||||||
if (pipes[pipe_cnt].pipe.src.det_size_override > 2 * DCN3_15_MAX_DET_SEGS) {
|
if (pipes[pipe_cnt].pipe.src.det_size_override > 2 * DCN3_15_MAX_DET_SEGS) {
|
||||||
|
|||||||
@@ -6,9 +6,6 @@
|
|||||||
* Copyright (c) 2015-2018 Terry Junge <terry.junge@plantronics.com>
|
* Copyright (c) 2015-2018 Terry Junge <terry.junge@plantronics.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "hid-ids.h"
|
#include "hid-ids.h"
|
||||||
|
|
||||||
#include <linux/hid.h>
|
#include <linux/hid.h>
|
||||||
@@ -23,30 +20,28 @@
|
|||||||
|
|
||||||
#define PLT_VOL_UP 0x00b1
|
#define PLT_VOL_UP 0x00b1
|
||||||
#define PLT_VOL_DOWN 0x00b2
|
#define PLT_VOL_DOWN 0x00b2
|
||||||
|
#define PLT_MIC_MUTE 0x00b5
|
||||||
|
|
||||||
#define PLT1_VOL_UP (PLT_HID_1_0_PAGE | PLT_VOL_UP)
|
#define PLT1_VOL_UP (PLT_HID_1_0_PAGE | PLT_VOL_UP)
|
||||||
#define PLT1_VOL_DOWN (PLT_HID_1_0_PAGE | PLT_VOL_DOWN)
|
#define PLT1_VOL_DOWN (PLT_HID_1_0_PAGE | PLT_VOL_DOWN)
|
||||||
|
#define PLT1_MIC_MUTE (PLT_HID_1_0_PAGE | PLT_MIC_MUTE)
|
||||||
#define PLT2_VOL_UP (PLT_HID_2_0_PAGE | PLT_VOL_UP)
|
#define PLT2_VOL_UP (PLT_HID_2_0_PAGE | PLT_VOL_UP)
|
||||||
#define PLT2_VOL_DOWN (PLT_HID_2_0_PAGE | PLT_VOL_DOWN)
|
#define PLT2_VOL_DOWN (PLT_HID_2_0_PAGE | PLT_VOL_DOWN)
|
||||||
|
#define PLT2_MIC_MUTE (PLT_HID_2_0_PAGE | PLT_MIC_MUTE)
|
||||||
|
#define HID_TELEPHONY_MUTE (HID_UP_TELEPHONY | 0x2f)
|
||||||
|
#define HID_CONSUMER_MUTE (HID_UP_CONSUMER | 0xe2)
|
||||||
|
|
||||||
#define PLT_DA60 0xda60
|
#define PLT_DA60 0xda60
|
||||||
#define PLT_BT300_MIN 0x0413
|
#define PLT_BT300_MIN 0x0413
|
||||||
#define PLT_BT300_MAX 0x0418
|
#define PLT_BT300_MAX 0x0418
|
||||||
|
|
||||||
|
|
||||||
#define PLT_ALLOW_CONSUMER (field->application == HID_CP_CONSUMERCONTROL && \
|
|
||||||
(usage->hid & HID_USAGE_PAGE) == HID_UP_CONSUMER)
|
|
||||||
|
|
||||||
#define PLT_QUIRK_DOUBLE_VOLUME_KEYS BIT(0)
|
|
||||||
#define PLT_QUIRK_FOLLOWED_OPPOSITE_VOLUME_KEYS BIT(1)
|
|
||||||
|
|
||||||
#define PLT_DOUBLE_KEY_TIMEOUT 5 /* ms */
|
#define PLT_DOUBLE_KEY_TIMEOUT 5 /* ms */
|
||||||
#define PLT_FOLLOWED_OPPOSITE_KEY_TIMEOUT 220 /* ms */
|
|
||||||
|
|
||||||
struct plt_drv_data {
|
struct plt_drv_data {
|
||||||
unsigned long device_type;
|
unsigned long device_type;
|
||||||
unsigned long last_volume_key_ts;
|
unsigned long last_key_ts;
|
||||||
u32 quirks;
|
unsigned long double_key_to;
|
||||||
|
__u16 last_key;
|
||||||
};
|
};
|
||||||
|
|
||||||
static int plantronics_input_mapping(struct hid_device *hdev,
|
static int plantronics_input_mapping(struct hid_device *hdev,
|
||||||
@@ -58,34 +53,43 @@ static int plantronics_input_mapping(struct hid_device *hdev,
|
|||||||
unsigned short mapped_key;
|
unsigned short mapped_key;
|
||||||
struct plt_drv_data *drv_data = hid_get_drvdata(hdev);
|
struct plt_drv_data *drv_data = hid_get_drvdata(hdev);
|
||||||
unsigned long plt_type = drv_data->device_type;
|
unsigned long plt_type = drv_data->device_type;
|
||||||
|
int allow_mute = usage->hid == HID_TELEPHONY_MUTE;
|
||||||
|
int allow_consumer = field->application == HID_CP_CONSUMERCONTROL &&
|
||||||
|
(usage->hid & HID_USAGE_PAGE) == HID_UP_CONSUMER &&
|
||||||
|
usage->hid != HID_CONSUMER_MUTE;
|
||||||
|
|
||||||
/* special case for PTT products */
|
/* special case for PTT products */
|
||||||
if (field->application == HID_GD_JOYSTICK)
|
if (field->application == HID_GD_JOYSTICK)
|
||||||
goto defaulted;
|
goto defaulted;
|
||||||
|
|
||||||
/* handle volume up/down mapping */
|
|
||||||
/* non-standard types or multi-HID interfaces - plt_type is PID */
|
/* non-standard types or multi-HID interfaces - plt_type is PID */
|
||||||
if (!(plt_type & HID_USAGE_PAGE)) {
|
if (!(plt_type & HID_USAGE_PAGE)) {
|
||||||
switch (plt_type) {
|
switch (plt_type) {
|
||||||
case PLT_DA60:
|
case PLT_DA60:
|
||||||
if (PLT_ALLOW_CONSUMER)
|
if (allow_consumer)
|
||||||
goto defaulted;
|
goto defaulted;
|
||||||
goto ignored;
|
if (usage->hid == HID_CONSUMER_MUTE) {
|
||||||
|
mapped_key = KEY_MICMUTE;
|
||||||
|
goto mapped;
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
if (PLT_ALLOW_CONSUMER)
|
if (allow_consumer || allow_mute)
|
||||||
goto defaulted;
|
goto defaulted;
|
||||||
}
|
}
|
||||||
|
goto ignored;
|
||||||
}
|
}
|
||||||
/* handle standard types - plt_type is 0xffa0uuuu or 0xffa2uuuu */
|
|
||||||
/* 'basic telephony compliant' - allow default consumer page map */
|
/* handle standard consumer control mapping */
|
||||||
else if ((plt_type & HID_USAGE) >= PLT_BASIC_TELEPHONY &&
|
/* and standard telephony mic mute mapping */
|
||||||
(plt_type & HID_USAGE) != PLT_BASIC_EXCEPTION) {
|
if (allow_consumer || allow_mute)
|
||||||
if (PLT_ALLOW_CONSUMER)
|
goto defaulted;
|
||||||
goto defaulted;
|
|
||||||
}
|
/* handle vendor unique types - plt_type is 0xffa0uuuu or 0xffa2uuuu */
|
||||||
/* not 'basic telephony' - apply legacy mapping */
|
/* if not 'basic telephony compliant' - map vendor unique controls */
|
||||||
/* only map if the field is in the device's primary vendor page */
|
if (!((plt_type & HID_USAGE) >= PLT_BASIC_TELEPHONY &&
|
||||||
else if (!((field->application ^ plt_type) & HID_USAGE_PAGE)) {
|
(plt_type & HID_USAGE) != PLT_BASIC_EXCEPTION) &&
|
||||||
|
!((field->application ^ plt_type) & HID_USAGE_PAGE))
|
||||||
switch (usage->hid) {
|
switch (usage->hid) {
|
||||||
case PLT1_VOL_UP:
|
case PLT1_VOL_UP:
|
||||||
case PLT2_VOL_UP:
|
case PLT2_VOL_UP:
|
||||||
@@ -95,8 +99,11 @@ static int plantronics_input_mapping(struct hid_device *hdev,
|
|||||||
case PLT2_VOL_DOWN:
|
case PLT2_VOL_DOWN:
|
||||||
mapped_key = KEY_VOLUMEDOWN;
|
mapped_key = KEY_VOLUMEDOWN;
|
||||||
goto mapped;
|
goto mapped;
|
||||||
|
case PLT1_MIC_MUTE:
|
||||||
|
case PLT2_MIC_MUTE:
|
||||||
|
mapped_key = KEY_MICMUTE;
|
||||||
|
goto mapped;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Future mapping of call control or other usages,
|
* Future mapping of call control or other usages,
|
||||||
@@ -105,6 +112,8 @@ static int plantronics_input_mapping(struct hid_device *hdev,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
ignored:
|
ignored:
|
||||||
|
hid_dbg(hdev, "usage: %08x (appl: %08x) - ignored\n",
|
||||||
|
usage->hid, field->application);
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
defaulted:
|
defaulted:
|
||||||
@@ -123,38 +132,26 @@ static int plantronics_event(struct hid_device *hdev, struct hid_field *field,
|
|||||||
struct hid_usage *usage, __s32 value)
|
struct hid_usage *usage, __s32 value)
|
||||||
{
|
{
|
||||||
struct plt_drv_data *drv_data = hid_get_drvdata(hdev);
|
struct plt_drv_data *drv_data = hid_get_drvdata(hdev);
|
||||||
|
unsigned long prev_tsto, cur_ts;
|
||||||
|
__u16 prev_key, cur_key;
|
||||||
|
|
||||||
if (drv_data->quirks & PLT_QUIRK_DOUBLE_VOLUME_KEYS) {
|
/* Usages are filtered in plantronics_usages. */
|
||||||
unsigned long prev_ts, cur_ts;
|
|
||||||
|
|
||||||
/* Usages are filtered in plantronics_usages. */
|
/* HZ too low for ms resolution - double key detection disabled */
|
||||||
|
/* or it is a key release - handle key presses only. */
|
||||||
|
if (!drv_data->double_key_to || !value)
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (!value) /* Handle key presses only. */
|
prev_tsto = drv_data->last_key_ts + drv_data->double_key_to;
|
||||||
return 0;
|
cur_ts = drv_data->last_key_ts = jiffies;
|
||||||
|
prev_key = drv_data->last_key;
|
||||||
|
cur_key = drv_data->last_key = usage->code;
|
||||||
|
|
||||||
prev_ts = drv_data->last_volume_key_ts;
|
/* If the same key occurs in <= double_key_to -- ignore it */
|
||||||
cur_ts = jiffies;
|
if (prev_key == cur_key && time_before_eq(cur_ts, prev_tsto)) {
|
||||||
if (jiffies_to_msecs(cur_ts - prev_ts) <= PLT_DOUBLE_KEY_TIMEOUT)
|
hid_dbg(hdev, "double key %d ignored\n", cur_key);
|
||||||
return 1; /* Ignore the repeated key. */
|
return 1; /* Ignore the repeated key. */
|
||||||
|
|
||||||
drv_data->last_volume_key_ts = cur_ts;
|
|
||||||
}
|
}
|
||||||
if (drv_data->quirks & PLT_QUIRK_FOLLOWED_OPPOSITE_VOLUME_KEYS) {
|
|
||||||
unsigned long prev_ts, cur_ts;
|
|
||||||
|
|
||||||
/* Usages are filtered in plantronics_usages. */
|
|
||||||
|
|
||||||
if (!value) /* Handle key presses only. */
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
prev_ts = drv_data->last_volume_key_ts;
|
|
||||||
cur_ts = jiffies;
|
|
||||||
if (jiffies_to_msecs(cur_ts - prev_ts) <= PLT_FOLLOWED_OPPOSITE_KEY_TIMEOUT)
|
|
||||||
return 1; /* Ignore the followed opposite volume key. */
|
|
||||||
|
|
||||||
drv_data->last_volume_key_ts = cur_ts;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -196,12 +193,16 @@ static int plantronics_probe(struct hid_device *hdev,
|
|||||||
ret = hid_parse(hdev);
|
ret = hid_parse(hdev);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
hid_err(hdev, "parse failed\n");
|
hid_err(hdev, "parse failed\n");
|
||||||
goto err;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
drv_data->device_type = plantronics_device_type(hdev);
|
drv_data->device_type = plantronics_device_type(hdev);
|
||||||
drv_data->quirks = id->driver_data;
|
drv_data->double_key_to = msecs_to_jiffies(PLT_DOUBLE_KEY_TIMEOUT);
|
||||||
drv_data->last_volume_key_ts = jiffies - msecs_to_jiffies(PLT_DOUBLE_KEY_TIMEOUT);
|
drv_data->last_key_ts = jiffies - drv_data->double_key_to;
|
||||||
|
|
||||||
|
/* if HZ does not allow ms resolution - disable double key detection */
|
||||||
|
if (drv_data->double_key_to < PLT_DOUBLE_KEY_TIMEOUT)
|
||||||
|
drv_data->double_key_to = 0;
|
||||||
|
|
||||||
hid_set_drvdata(hdev, drv_data);
|
hid_set_drvdata(hdev, drv_data);
|
||||||
|
|
||||||
@@ -210,29 +211,10 @@ static int plantronics_probe(struct hid_device *hdev,
|
|||||||
if (ret)
|
if (ret)
|
||||||
hid_err(hdev, "hw start failed\n");
|
hid_err(hdev, "hw start failed\n");
|
||||||
|
|
||||||
err:
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct hid_device_id plantronics_devices[] = {
|
static const struct hid_device_id plantronics_devices[] = {
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS,
|
|
||||||
USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3210_SERIES),
|
|
||||||
.driver_data = PLT_QUIRK_DOUBLE_VOLUME_KEYS },
|
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS,
|
|
||||||
USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3220_SERIES),
|
|
||||||
.driver_data = PLT_QUIRK_DOUBLE_VOLUME_KEYS },
|
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS,
|
|
||||||
USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3215_SERIES),
|
|
||||||
.driver_data = PLT_QUIRK_DOUBLE_VOLUME_KEYS },
|
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS,
|
|
||||||
USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3225_SERIES),
|
|
||||||
.driver_data = PLT_QUIRK_DOUBLE_VOLUME_KEYS },
|
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS,
|
|
||||||
USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3325_SERIES),
|
|
||||||
.driver_data = PLT_QUIRK_FOLLOWED_OPPOSITE_VOLUME_KEYS },
|
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS,
|
|
||||||
USB_DEVICE_ID_PLANTRONICS_ENCOREPRO_500_SERIES),
|
|
||||||
.driver_data = PLT_QUIRK_FOLLOWED_OPPOSITE_VOLUME_KEYS },
|
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS, HID_ANY_ID) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS, HID_ANY_ID) },
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
@@ -241,6 +223,14 @@ MODULE_DEVICE_TABLE(hid, plantronics_devices);
|
|||||||
static const struct hid_usage_id plantronics_usages[] = {
|
static const struct hid_usage_id plantronics_usages[] = {
|
||||||
{ HID_CP_VOLUMEUP, EV_KEY, HID_ANY_ID },
|
{ HID_CP_VOLUMEUP, EV_KEY, HID_ANY_ID },
|
||||||
{ HID_CP_VOLUMEDOWN, EV_KEY, HID_ANY_ID },
|
{ HID_CP_VOLUMEDOWN, EV_KEY, HID_ANY_ID },
|
||||||
|
{ HID_TELEPHONY_MUTE, EV_KEY, HID_ANY_ID },
|
||||||
|
{ HID_CONSUMER_MUTE, EV_KEY, HID_ANY_ID },
|
||||||
|
{ PLT2_VOL_UP, EV_KEY, HID_ANY_ID },
|
||||||
|
{ PLT2_VOL_DOWN, EV_KEY, HID_ANY_ID },
|
||||||
|
{ PLT2_MIC_MUTE, EV_KEY, HID_ANY_ID },
|
||||||
|
{ PLT1_VOL_UP, EV_KEY, HID_ANY_ID },
|
||||||
|
{ PLT1_VOL_DOWN, EV_KEY, HID_ANY_ID },
|
||||||
|
{ PLT1_MIC_MUTE, EV_KEY, HID_ANY_ID },
|
||||||
{ HID_TERMINATOR, HID_TERMINATOR, HID_TERMINATOR }
|
{ HID_TERMINATOR, HID_TERMINATOR, HID_TERMINATOR }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1460,7 +1460,7 @@ err_mutex:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __exit et8ek8_remove(struct i2c_client *client)
|
static void et8ek8_remove(struct i2c_client *client)
|
||||||
{
|
{
|
||||||
struct v4l2_subdev *subdev = i2c_get_clientdata(client);
|
struct v4l2_subdev *subdev = i2c_get_clientdata(client);
|
||||||
struct et8ek8_sensor *sensor = to_et8ek8_sensor(subdev);
|
struct et8ek8_sensor *sensor = to_et8ek8_sensor(subdev);
|
||||||
@@ -1502,7 +1502,7 @@ static struct i2c_driver et8ek8_i2c_driver = {
|
|||||||
.of_match_table = et8ek8_of_table,
|
.of_match_table = et8ek8_of_table,
|
||||||
},
|
},
|
||||||
.probe_new = et8ek8_probe,
|
.probe_new = et8ek8_probe,
|
||||||
.remove = __exit_p(et8ek8_remove),
|
.remove = et8ek8_remove,
|
||||||
.id_table = et8ek8_id_table,
|
.id_table = et8ek8_id_table,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -813,6 +813,7 @@ static int rtsx_usb_ms_drv_remove(struct platform_device *pdev)
|
|||||||
|
|
||||||
host->eject = true;
|
host->eject = true;
|
||||||
cancel_work_sync(&host->handle_req);
|
cancel_work_sync(&host->handle_req);
|
||||||
|
cancel_delayed_work_sync(&host->poll_card);
|
||||||
|
|
||||||
mutex_lock(&host->host_mutex);
|
mutex_lock(&host->host_mutex);
|
||||||
if (host->req) {
|
if (host->req) {
|
||||||
|
|||||||
@@ -1372,9 +1372,11 @@ static const struct usb_device_id products[] = {
|
|||||||
{QMI_QUIRK_SET_DTR(0x1bc7, 0x10a0, 0)}, /* Telit FN920C04 */
|
{QMI_QUIRK_SET_DTR(0x1bc7, 0x10a0, 0)}, /* Telit FN920C04 */
|
||||||
{QMI_QUIRK_SET_DTR(0x1bc7, 0x10a4, 0)}, /* Telit FN920C04 */
|
{QMI_QUIRK_SET_DTR(0x1bc7, 0x10a4, 0)}, /* Telit FN920C04 */
|
||||||
{QMI_QUIRK_SET_DTR(0x1bc7, 0x10a9, 0)}, /* Telit FN920C04 */
|
{QMI_QUIRK_SET_DTR(0x1bc7, 0x10a9, 0)}, /* Telit FN920C04 */
|
||||||
|
{QMI_QUIRK_SET_DTR(0x1bc7, 0x10b0, 0)}, /* Telit FE990B */
|
||||||
{QMI_QUIRK_SET_DTR(0x1bc7, 0x10c0, 0)}, /* Telit FE910C04 */
|
{QMI_QUIRK_SET_DTR(0x1bc7, 0x10c0, 0)}, /* Telit FE910C04 */
|
||||||
{QMI_QUIRK_SET_DTR(0x1bc7, 0x10c4, 0)}, /* Telit FE910C04 */
|
{QMI_QUIRK_SET_DTR(0x1bc7, 0x10c4, 0)}, /* Telit FE910C04 */
|
||||||
{QMI_QUIRK_SET_DTR(0x1bc7, 0x10c8, 0)}, /* Telit FE910C04 */
|
{QMI_QUIRK_SET_DTR(0x1bc7, 0x10c8, 0)}, /* Telit FE910C04 */
|
||||||
|
{QMI_QUIRK_SET_DTR(0x1bc7, 0x10d0, 0)}, /* Telit FN990B */
|
||||||
{QMI_FIXED_INTF(0x1bc7, 0x1100, 3)}, /* Telit ME910 */
|
{QMI_FIXED_INTF(0x1bc7, 0x1100, 3)}, /* Telit ME910 */
|
||||||
{QMI_FIXED_INTF(0x1bc7, 0x1101, 3)}, /* Telit ME910 dual modem */
|
{QMI_FIXED_INTF(0x1bc7, 0x1101, 3)}, /* Telit ME910 dual modem */
|
||||||
{QMI_FIXED_INTF(0x1bc7, 0x1200, 5)}, /* Telit LE920 */
|
{QMI_FIXED_INTF(0x1bc7, 0x1200, 5)}, /* Telit LE920 */
|
||||||
|
|||||||
@@ -178,6 +178,17 @@ int usbnet_get_ethernet_addr(struct usbnet *dev, int iMACAddress)
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(usbnet_get_ethernet_addr);
|
EXPORT_SYMBOL_GPL(usbnet_get_ethernet_addr);
|
||||||
|
|
||||||
|
static bool usbnet_needs_usb_name_format(struct usbnet *dev, struct net_device *net)
|
||||||
|
{
|
||||||
|
/* Point to point devices which don't have a real MAC address
|
||||||
|
* (or report a fake local one) have historically used the usb%d
|
||||||
|
* naming. Preserve this..
|
||||||
|
*/
|
||||||
|
return (dev->driver_info->flags & FLAG_POINTTOPOINT) != 0 &&
|
||||||
|
(is_zero_ether_addr(net->dev_addr) ||
|
||||||
|
is_local_ether_addr(net->dev_addr));
|
||||||
|
}
|
||||||
|
|
||||||
static void intr_complete (struct urb *urb)
|
static void intr_complete (struct urb *urb)
|
||||||
{
|
{
|
||||||
struct usbnet *dev = urb->context;
|
struct usbnet *dev = urb->context;
|
||||||
@@ -1761,13 +1772,11 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
|
|||||||
if (status < 0)
|
if (status < 0)
|
||||||
goto out1;
|
goto out1;
|
||||||
|
|
||||||
// heuristic: "usb%d" for links we know are two-host,
|
/* heuristic: rename to "eth%d" if we are not sure this link
|
||||||
// else "eth%d" when there's reasonable doubt. userspace
|
* is two-host (these links keep "usb%d")
|
||||||
// can rename the link if it knows better.
|
*/
|
||||||
if ((dev->driver_info->flags & FLAG_ETHER) != 0 &&
|
if ((dev->driver_info->flags & FLAG_ETHER) != 0 &&
|
||||||
((dev->driver_info->flags & FLAG_POINTTOPOINT) == 0 ||
|
!usbnet_needs_usb_name_format(dev, net))
|
||||||
/* somebody touched it*/
|
|
||||||
!is_zero_ether_addr(net->dev_addr)))
|
|
||||||
strscpy(net->name, "eth%d", sizeof(net->name));
|
strscpy(net->name, "eth%d", sizeof(net->name));
|
||||||
/* WLAN devices should always be named "wlan%d" */
|
/* WLAN devices should always be named "wlan%d" */
|
||||||
if ((dev->driver_info->flags & FLAG_WLAN) != 0)
|
if ((dev->driver_info->flags & FLAG_WLAN) != 0)
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ void serial8250_tx_dma_flush(struct uart_8250_port *p)
|
|||||||
*/
|
*/
|
||||||
dma->tx_size = 0;
|
dma->tx_size = 0;
|
||||||
|
|
||||||
dmaengine_terminate_async(dma->rxchan);
|
dmaengine_terminate_async(dma->txchan);
|
||||||
}
|
}
|
||||||
|
|
||||||
int serial8250_rx_dma(struct uart_8250_port *p)
|
int serial8250_rx_dma(struct uart_8250_port *p)
|
||||||
|
|||||||
@@ -2604,6 +2604,22 @@ static struct pci_serial_quirk pci_serial_quirks[] = {
|
|||||||
.init = pci_oxsemi_tornado_init,
|
.init = pci_oxsemi_tornado_init,
|
||||||
.setup = pci_oxsemi_tornado_setup,
|
.setup = pci_oxsemi_tornado_setup,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.vendor = PCI_VENDOR_ID_INTASHIELD,
|
||||||
|
.device = 0x4026,
|
||||||
|
.subvendor = PCI_ANY_ID,
|
||||||
|
.subdevice = PCI_ANY_ID,
|
||||||
|
.init = pci_oxsemi_tornado_init,
|
||||||
|
.setup = pci_oxsemi_tornado_setup,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.vendor = PCI_VENDOR_ID_INTASHIELD,
|
||||||
|
.device = 0x4021,
|
||||||
|
.subvendor = PCI_ANY_ID,
|
||||||
|
.subdevice = PCI_ANY_ID,
|
||||||
|
.init = pci_oxsemi_tornado_init,
|
||||||
|
.setup = pci_oxsemi_tornado_setup,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.vendor = PCI_VENDOR_ID_INTEL,
|
.vendor = PCI_VENDOR_ID_INTEL,
|
||||||
.device = 0x8811,
|
.device = 0x8811,
|
||||||
@@ -5145,6 +5161,14 @@ static const struct pci_device_id serial_pci_tbl[] = {
|
|||||||
PCI_ANY_ID, PCI_ANY_ID,
|
PCI_ANY_ID, PCI_ANY_ID,
|
||||||
0, 0,
|
0, 0,
|
||||||
pbn_b2_2_115200 },
|
pbn_b2_2_115200 },
|
||||||
|
{ PCI_VENDOR_ID_INTASHIELD, 0x0BA2,
|
||||||
|
PCI_ANY_ID, PCI_ANY_ID,
|
||||||
|
0, 0,
|
||||||
|
pbn_b2_2_115200 },
|
||||||
|
{ PCI_VENDOR_ID_INTASHIELD, 0x0BA3,
|
||||||
|
PCI_ANY_ID, PCI_ANY_ID,
|
||||||
|
0, 0,
|
||||||
|
pbn_b2_2_115200 },
|
||||||
/*
|
/*
|
||||||
* Brainboxes UC-235/246
|
* Brainboxes UC-235/246
|
||||||
*/
|
*/
|
||||||
@@ -5265,6 +5289,14 @@ static const struct pci_device_id serial_pci_tbl[] = {
|
|||||||
PCI_ANY_ID, PCI_ANY_ID,
|
PCI_ANY_ID, PCI_ANY_ID,
|
||||||
0, 0,
|
0, 0,
|
||||||
pbn_b2_4_115200 },
|
pbn_b2_4_115200 },
|
||||||
|
{ PCI_VENDOR_ID_INTASHIELD, 0x0C42,
|
||||||
|
PCI_ANY_ID, PCI_ANY_ID,
|
||||||
|
0, 0,
|
||||||
|
pbn_b2_4_115200 },
|
||||||
|
{ PCI_VENDOR_ID_INTASHIELD, 0x0C43,
|
||||||
|
PCI_ANY_ID, PCI_ANY_ID,
|
||||||
|
0, 0,
|
||||||
|
pbn_b2_4_115200 },
|
||||||
/*
|
/*
|
||||||
* Brainboxes UC-420
|
* Brainboxes UC-420
|
||||||
*/
|
*/
|
||||||
@@ -5491,6 +5523,20 @@ static const struct pci_device_id serial_pci_tbl[] = {
|
|||||||
PCI_ANY_ID, PCI_ANY_ID,
|
PCI_ANY_ID, PCI_ANY_ID,
|
||||||
0, 0,
|
0, 0,
|
||||||
pbn_oxsemi_1_15625000 },
|
pbn_oxsemi_1_15625000 },
|
||||||
|
/*
|
||||||
|
* Brainboxes XC-235
|
||||||
|
*/
|
||||||
|
{ PCI_VENDOR_ID_INTASHIELD, 0x4026,
|
||||||
|
PCI_ANY_ID, PCI_ANY_ID,
|
||||||
|
0, 0,
|
||||||
|
pbn_oxsemi_1_15625000 },
|
||||||
|
/*
|
||||||
|
* Brainboxes XC-475
|
||||||
|
*/
|
||||||
|
{ PCI_VENDOR_ID_INTASHIELD, 0x4021,
|
||||||
|
PCI_ANY_ID, PCI_ANY_ID,
|
||||||
|
0, 0,
|
||||||
|
pbn_oxsemi_1_15625000 },
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Perle PCI-RAS cards
|
* Perle PCI-RAS cards
|
||||||
|
|||||||
@@ -130,6 +130,9 @@ static struct uvcg_format *find_format_by_pix(struct uvc_device *uvc,
|
|||||||
list_for_each_entry(format, &uvc->header->formats, entry) {
|
list_for_each_entry(format, &uvc->header->formats, entry) {
|
||||||
struct uvc_format_desc *fmtdesc = to_uvc_format(format->fmt);
|
struct uvc_format_desc *fmtdesc = to_uvc_format(format->fmt);
|
||||||
|
|
||||||
|
if (IS_ERR(fmtdesc))
|
||||||
|
continue;
|
||||||
|
|
||||||
if (fmtdesc->fcc == pixelformat) {
|
if (fmtdesc->fcc == pixelformat) {
|
||||||
uformat = format->fmt;
|
uformat = format->fmt;
|
||||||
break;
|
break;
|
||||||
@@ -249,6 +252,7 @@ uvc_v4l2_try_format(struct file *file, void *fh, struct v4l2_format *fmt)
|
|||||||
struct uvc_video *video = &uvc->video;
|
struct uvc_video *video = &uvc->video;
|
||||||
struct uvcg_format *uformat;
|
struct uvcg_format *uformat;
|
||||||
struct uvcg_frame *uframe;
|
struct uvcg_frame *uframe;
|
||||||
|
const struct uvc_format_desc *fmtdesc;
|
||||||
u8 *fcc;
|
u8 *fcc;
|
||||||
|
|
||||||
if (fmt->type != video->queue.queue.type)
|
if (fmt->type != video->queue.queue.type)
|
||||||
@@ -274,7 +278,10 @@ uvc_v4l2_try_format(struct file *file, void *fh, struct v4l2_format *fmt)
|
|||||||
fmt->fmt.pix.field = V4L2_FIELD_NONE;
|
fmt->fmt.pix.field = V4L2_FIELD_NONE;
|
||||||
fmt->fmt.pix.bytesperline = uvc_v4l2_get_bytesperline(uformat, uframe);
|
fmt->fmt.pix.bytesperline = uvc_v4l2_get_bytesperline(uformat, uframe);
|
||||||
fmt->fmt.pix.sizeimage = uvc_get_frame_size(uformat, uframe);
|
fmt->fmt.pix.sizeimage = uvc_get_frame_size(uformat, uframe);
|
||||||
fmt->fmt.pix.pixelformat = to_uvc_format(uformat)->fcc;
|
fmtdesc = to_uvc_format(uformat);
|
||||||
|
if (IS_ERR(fmtdesc))
|
||||||
|
return PTR_ERR(fmtdesc);
|
||||||
|
fmt->fmt.pix.pixelformat = fmtdesc->fcc;
|
||||||
fmt->fmt.pix.colorspace = V4L2_COLORSPACE_SRGB;
|
fmt->fmt.pix.colorspace = V4L2_COLORSPACE_SRGB;
|
||||||
fmt->fmt.pix.priv = 0;
|
fmt->fmt.pix.priv = 0;
|
||||||
|
|
||||||
@@ -387,6 +394,9 @@ uvc_v4l2_enum_format(struct file *file, void *fh, struct v4l2_fmtdesc *f)
|
|||||||
f->flags |= V4L2_FMT_FLAG_COMPRESSED;
|
f->flags |= V4L2_FMT_FLAG_COMPRESSED;
|
||||||
|
|
||||||
fmtdesc = to_uvc_format(uformat);
|
fmtdesc = to_uvc_format(uformat);
|
||||||
|
if (IS_ERR(fmtdesc))
|
||||||
|
return PTR_ERR(fmtdesc);
|
||||||
|
|
||||||
f->pixelformat = fmtdesc->fcc;
|
f->pixelformat = fmtdesc->fcc;
|
||||||
|
|
||||||
strscpy(f->description, fmtdesc->name, sizeof(f->description));
|
strscpy(f->description, fmtdesc->name, sizeof(f->description));
|
||||||
|
|||||||
@@ -1313,11 +1313,11 @@ static int ucsi_init(struct ucsi *ucsi)
|
|||||||
|
|
||||||
err_unregister:
|
err_unregister:
|
||||||
for (con = connector; con->port; con++) {
|
for (con = connector; con->port; con++) {
|
||||||
|
if (con->wq)
|
||||||
|
destroy_workqueue(con->wq);
|
||||||
ucsi_unregister_partner(con);
|
ucsi_unregister_partner(con);
|
||||||
ucsi_unregister_altmodes(con, UCSI_RECIPIENT_CON);
|
ucsi_unregister_altmodes(con, UCSI_RECIPIENT_CON);
|
||||||
ucsi_unregister_port_psy(con);
|
ucsi_unregister_port_psy(con);
|
||||||
if (con->wq)
|
|
||||||
destroy_workqueue(con->wq);
|
|
||||||
typec_unregister_port(con->port);
|
typec_unregister_port(con->port);
|
||||||
con->port = NULL;
|
con->port = NULL;
|
||||||
}
|
}
|
||||||
@@ -1479,10 +1479,6 @@ void ucsi_unregister(struct ucsi *ucsi)
|
|||||||
|
|
||||||
for (i = 0; i < ucsi->cap.num_connectors; i++) {
|
for (i = 0; i < ucsi->cap.num_connectors; i++) {
|
||||||
cancel_work_sync(&ucsi->connector[i].work);
|
cancel_work_sync(&ucsi->connector[i].work);
|
||||||
ucsi_unregister_partner(&ucsi->connector[i]);
|
|
||||||
ucsi_unregister_altmodes(&ucsi->connector[i],
|
|
||||||
UCSI_RECIPIENT_CON);
|
|
||||||
ucsi_unregister_port_psy(&ucsi->connector[i]);
|
|
||||||
|
|
||||||
if (ucsi->connector[i].wq) {
|
if (ucsi->connector[i].wq) {
|
||||||
struct ucsi_work *uwork;
|
struct ucsi_work *uwork;
|
||||||
@@ -1497,6 +1493,11 @@ void ucsi_unregister(struct ucsi *ucsi)
|
|||||||
mutex_unlock(&ucsi->connector[i].lock);
|
mutex_unlock(&ucsi->connector[i].lock);
|
||||||
destroy_workqueue(ucsi->connector[i].wq);
|
destroy_workqueue(ucsi->connector[i].wq);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ucsi_unregister_partner(&ucsi->connector[i]);
|
||||||
|
ucsi_unregister_altmodes(&ucsi->connector[i],
|
||||||
|
UCSI_RECIPIENT_CON);
|
||||||
|
ucsi_unregister_port_psy(&ucsi->connector[i]);
|
||||||
typec_unregister_port(ucsi->connector[i].port);
|
typec_unregister_port(ucsi->connector[i].port);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1314,6 +1314,8 @@ static void MPOA_cache_impos_rcvd(struct k_message *msg,
|
|||||||
holding_time = msg->content.eg_info.holding_time;
|
holding_time = msg->content.eg_info.holding_time;
|
||||||
dprintk("(%s) entry = %p, holding_time = %u\n",
|
dprintk("(%s) entry = %p, holding_time = %u\n",
|
||||||
mpc->dev->name, entry, holding_time);
|
mpc->dev->name, entry, holding_time);
|
||||||
|
if (entry == NULL && !holding_time)
|
||||||
|
return;
|
||||||
if (entry == NULL && holding_time) {
|
if (entry == NULL && holding_time) {
|
||||||
entry = mpc->eg_ops->add_entry(msg, mpc);
|
entry = mpc->eg_ops->add_entry(msg, mpc);
|
||||||
mpc->eg_ops->put(entry);
|
mpc->eg_ops->put(entry);
|
||||||
|
|||||||
@@ -103,6 +103,10 @@ struct sock *nf_sk_lookup_slow_v6(struct net *net, const struct sk_buff *skb,
|
|||||||
struct sk_buff *data_skb = NULL;
|
struct sk_buff *data_skb = NULL;
|
||||||
int doff = 0;
|
int doff = 0;
|
||||||
int thoff = 0, tproto;
|
int thoff = 0, tproto;
|
||||||
|
#if IS_ENABLED(CONFIG_NF_CONNTRACK)
|
||||||
|
enum ip_conntrack_info ctinfo;
|
||||||
|
struct nf_conn const *ct;
|
||||||
|
#endif
|
||||||
|
|
||||||
tproto = ipv6_find_hdr(skb, &thoff, -1, NULL, NULL);
|
tproto = ipv6_find_hdr(skb, &thoff, -1, NULL, NULL);
|
||||||
if (tproto < 0) {
|
if (tproto < 0) {
|
||||||
@@ -136,6 +140,25 @@ struct sock *nf_sk_lookup_slow_v6(struct net *net, const struct sk_buff *skb,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if IS_ENABLED(CONFIG_NF_CONNTRACK)
|
||||||
|
/* Do the lookup with the original socket address in
|
||||||
|
* case this is a reply packet of an established
|
||||||
|
* SNAT-ted connection.
|
||||||
|
*/
|
||||||
|
ct = nf_ct_get(skb, &ctinfo);
|
||||||
|
if (ct &&
|
||||||
|
((tproto != IPPROTO_ICMPV6 &&
|
||||||
|
ctinfo == IP_CT_ESTABLISHED_REPLY) ||
|
||||||
|
(tproto == IPPROTO_ICMPV6 &&
|
||||||
|
ctinfo == IP_CT_RELATED_REPLY)) &&
|
||||||
|
(ct->status & IPS_SRC_NAT_DONE)) {
|
||||||
|
daddr = &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u3.in6;
|
||||||
|
dport = (tproto == IPPROTO_TCP) ?
|
||||||
|
ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u.tcp.port :
|
||||||
|
ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u.udp.port;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return nf_socket_get_sock_v6(net, data_skb, doff, tproto, saddr, daddr,
|
return nf_socket_get_sock_v6(net, data_skb, doff, tproto, saddr, daddr,
|
||||||
sport, dport, indev);
|
sport, dport, indev);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9867,6 +9867,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
|||||||
SND_PCI_QUIRK(0x103c, 0x8811, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
|
SND_PCI_QUIRK(0x103c, 0x8811, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
|
||||||
SND_PCI_QUIRK(0x103c, 0x8812, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
|
SND_PCI_QUIRK(0x103c, 0x8812, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
|
||||||
SND_PCI_QUIRK(0x103c, 0x881d, "HP 250 G8 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
|
SND_PCI_QUIRK(0x103c, 0x881d, "HP 250 G8 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
|
||||||
|
SND_PCI_QUIRK(0x103c, 0x881e, "HP Laptop 15s-du3xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
|
||||||
SND_PCI_QUIRK(0x103c, 0x8846, "HP EliteBook 850 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
|
SND_PCI_QUIRK(0x103c, 0x8846, "HP EliteBook 850 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
|
||||||
SND_PCI_QUIRK(0x103c, 0x8847, "HP EliteBook x360 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
|
SND_PCI_QUIRK(0x103c, 0x8847, "HP EliteBook x360 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
|
||||||
SND_PCI_QUIRK(0x103c, 0x884b, "HP EliteBook 840 Aero G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
|
SND_PCI_QUIRK(0x103c, 0x884b, "HP EliteBook 840 Aero G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
|
||||||
|
|||||||
@@ -3575,6 +3575,52 @@ static void snd_dragonfly_quirk_db_scale(struct usb_mixer_interface *mixer,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Some Plantronics headsets have control names that don't meet ALSA naming
|
||||||
|
* standards. This function fixes nonstandard source names. By the time
|
||||||
|
* this function is called the control name should look like one of these:
|
||||||
|
* "source names Playback Volume"
|
||||||
|
* "source names Playback Switch"
|
||||||
|
* "source names Capture Volume"
|
||||||
|
* "source names Capture Switch"
|
||||||
|
* If any of the trigger words are found in the name then the name will
|
||||||
|
* be changed to:
|
||||||
|
* "Headset Playback Volume"
|
||||||
|
* "Headset Playback Switch"
|
||||||
|
* "Headset Capture Volume"
|
||||||
|
* "Headset Capture Switch"
|
||||||
|
* depending on the current suffix.
|
||||||
|
*/
|
||||||
|
static void snd_fix_plt_name(struct snd_usb_audio *chip,
|
||||||
|
struct snd_ctl_elem_id *id)
|
||||||
|
{
|
||||||
|
/* no variant of "Sidetone" should be added to this list */
|
||||||
|
static const char * const trigger[] = {
|
||||||
|
"Earphone", "Microphone", "Receive", "Transmit"
|
||||||
|
};
|
||||||
|
static const char * const suffix[] = {
|
||||||
|
" Playback Volume", " Playback Switch",
|
||||||
|
" Capture Volume", " Capture Switch"
|
||||||
|
};
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < ARRAY_SIZE(trigger); i++)
|
||||||
|
if (strstr(id->name, trigger[i]))
|
||||||
|
goto triggered;
|
||||||
|
usb_audio_dbg(chip, "no change in %s\n", id->name);
|
||||||
|
return;
|
||||||
|
|
||||||
|
triggered:
|
||||||
|
for (i = 0; i < ARRAY_SIZE(suffix); i++)
|
||||||
|
if (strstr(id->name, suffix[i])) {
|
||||||
|
usb_audio_dbg(chip, "fixing kctl name %s\n", id->name);
|
||||||
|
snprintf(id->name, sizeof(id->name), "Headset%s",
|
||||||
|
suffix[i]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
usb_audio_dbg(chip, "something wrong in kctl name %s\n", id->name);
|
||||||
|
}
|
||||||
|
|
||||||
void snd_usb_mixer_fu_apply_quirk(struct usb_mixer_interface *mixer,
|
void snd_usb_mixer_fu_apply_quirk(struct usb_mixer_interface *mixer,
|
||||||
struct usb_mixer_elem_info *cval, int unitid,
|
struct usb_mixer_elem_info *cval, int unitid,
|
||||||
struct snd_kcontrol *kctl)
|
struct snd_kcontrol *kctl)
|
||||||
@@ -3592,5 +3638,10 @@ void snd_usb_mixer_fu_apply_quirk(struct usb_mixer_interface *mixer,
|
|||||||
cval->min_mute = 1;
|
cval->min_mute = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ALSA-ify some Plantronics headset control names */
|
||||||
|
if (USB_ID_VENDOR(mixer->chip->usb_id) == 0x047f &&
|
||||||
|
(cval->control == UAC_FU_MUTE || cval->control == UAC_FU_VOLUME))
|
||||||
|
snd_fix_plt_name(mixer->chip, &kctl->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user