Merge 8e56a792eb ("ALSA: hda/realtek: enable headset mic on Latitude 5420 Rugged") into android12-5.10-lts
Steps on the way to 5.10.239 Change-Id: I071914d0e7c0053bb614206b186b16873ab997ec Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -5224,8 +5224,6 @@
|
||||
|
||||
Selecting 'on' will also enable the mitigation
|
||||
against user space to user space task attacks.
|
||||
Selecting specific mitigation does not force enable
|
||||
user mitigations.
|
||||
|
||||
Selecting 'off' will disable both the kernel and
|
||||
the user space protections.
|
||||
|
||||
@@ -11658,6 +11658,15 @@ F: drivers/scsi/smartpqi/smartpqi*.[ch]
|
||||
F: include/linux/cciss*.h
|
||||
F: include/uapi/linux/cciss*.h
|
||||
|
||||
MICROSOFT SURFACE HARDWARE PLATFORM SUPPORT
|
||||
M: Hans de Goede <hdegoede@redhat.com>
|
||||
M: Mark Gross <mgross@linux.intel.com>
|
||||
M: Maximilian Luz <luzmaximilian@gmail.com>
|
||||
L: platform-driver-x86@vger.kernel.org
|
||||
S: Maintained
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git
|
||||
F: drivers/platform/surface/
|
||||
|
||||
MICROSOFT SURFACE PRO 3 BUTTON DRIVER
|
||||
M: Chen Yu <yu.c.chen@intel.com>
|
||||
L: platform-driver-x86@vger.kernel.org
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
#define CLKDM_NO_AUTODEPS (1 << 4)
|
||||
#define CLKDM_ACTIVE_WITH_MPU (1 << 5)
|
||||
#define CLKDM_MISSING_IDLE_REPORTING (1 << 6)
|
||||
#define CLKDM_STANDBY_FORCE_WAKEUP BIT(7)
|
||||
|
||||
#define CLKDM_CAN_HWSUP (CLKDM_CAN_ENABLE_AUTO | CLKDM_CAN_DISABLE_AUTO)
|
||||
#define CLKDM_CAN_SWSUP (CLKDM_CAN_FORCE_SLEEP | CLKDM_CAN_FORCE_WAKEUP)
|
||||
|
||||
@@ -27,7 +27,7 @@ static struct clockdomain l4ls_am33xx_clkdm = {
|
||||
.pwrdm = { .name = "per_pwrdm" },
|
||||
.cm_inst = AM33XX_CM_PER_MOD,
|
||||
.clkdm_offs = AM33XX_CM_PER_L4LS_CLKSTCTRL_OFFSET,
|
||||
.flags = CLKDM_CAN_SWSUP,
|
||||
.flags = CLKDM_CAN_SWSUP | CLKDM_STANDBY_FORCE_WAKEUP,
|
||||
};
|
||||
|
||||
static struct clockdomain l3s_am33xx_clkdm = {
|
||||
|
||||
@@ -28,6 +28,9 @@
|
||||
#include "cm-regbits-34xx.h"
|
||||
#include "cm-regbits-33xx.h"
|
||||
#include "prm33xx.h"
|
||||
#if IS_ENABLED(CONFIG_SUSPEND)
|
||||
#include <linux/suspend.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* CLKCTRL_IDLEST_*: possible values for the CM_*_CLKCTRL.IDLEST bitfield:
|
||||
@@ -336,8 +339,17 @@ static int am33xx_clkdm_clk_disable(struct clockdomain *clkdm)
|
||||
{
|
||||
bool hwsup = false;
|
||||
|
||||
#if IS_ENABLED(CONFIG_SUSPEND)
|
||||
/*
|
||||
* In case of standby, Don't put the l4ls clk domain to sleep.
|
||||
* Since CM3 PM FW doesn't wake-up/enable the l4ls clk domain
|
||||
* upon wake-up, CM3 PM FW fails to wake-up th MPU.
|
||||
*/
|
||||
if (pm_suspend_target_state == PM_SUSPEND_STANDBY &&
|
||||
(clkdm->flags & CLKDM_STANDBY_FORCE_WAKEUP))
|
||||
return 0;
|
||||
#endif
|
||||
hwsup = am33xx_cm_is_clkdm_in_hwsup(clkdm->cm_inst, clkdm->clkdm_offs);
|
||||
|
||||
if (!hwsup && (clkdm->flags & CLKDM_CAN_FORCE_SLEEP))
|
||||
am33xx_clkdm_sleep(clkdm);
|
||||
|
||||
|
||||
@@ -277,4 +277,20 @@ extern void __init mmu_init(void);
|
||||
extern void update_mmu_cache(struct vm_area_struct *vma,
|
||||
unsigned long address, pte_t *pte);
|
||||
|
||||
static inline int pte_same(pte_t pte_a, pte_t pte_b);
|
||||
|
||||
#define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS
|
||||
static inline int ptep_set_access_flags(struct vm_area_struct *vma,
|
||||
unsigned long address, pte_t *ptep,
|
||||
pte_t entry, int dirty)
|
||||
{
|
||||
if (!pte_same(*ptep, entry))
|
||||
set_ptes(vma->vm_mm, address, ptep, entry, 1);
|
||||
/*
|
||||
* update_mmu_cache will unconditionally execute, handling both
|
||||
* the case that the PTE changed and the spurious fault case.
|
||||
*/
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif /* _ASM_NIOS2_PGTABLE_H */
|
||||
|
||||
@@ -1525,6 +1525,8 @@ int eeh_pe_configure(struct eeh_pe *pe)
|
||||
/* Invalid PE ? */
|
||||
if (!pe)
|
||||
return -ENODEV;
|
||||
else
|
||||
ret = eeh_ops->configure_bridge(pe);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1231,13 +1231,9 @@ static __ro_after_init enum spectre_v2_mitigation_cmd spectre_v2_cmd;
|
||||
static enum spectre_v2_user_cmd __init
|
||||
spectre_v2_parse_user_cmdline(void)
|
||||
{
|
||||
enum spectre_v2_user_cmd mode;
|
||||
char arg[20];
|
||||
int ret, i;
|
||||
|
||||
mode = IS_ENABLED(CONFIG_MITIGATION_SPECTRE_V2) ?
|
||||
SPECTRE_V2_USER_CMD_AUTO : SPECTRE_V2_USER_CMD_NONE;
|
||||
|
||||
switch (spectre_v2_cmd) {
|
||||
case SPECTRE_V2_CMD_NONE:
|
||||
return SPECTRE_V2_USER_CMD_NONE;
|
||||
@@ -1250,7 +1246,7 @@ spectre_v2_parse_user_cmdline(void)
|
||||
ret = cmdline_find_option(boot_command_line, "spectre_v2_user",
|
||||
arg, sizeof(arg));
|
||||
if (ret < 0)
|
||||
return mode;
|
||||
return SPECTRE_V2_USER_CMD_AUTO;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(v2_user_options); i++) {
|
||||
if (match_option(arg, ret, v2_user_options[i].option)) {
|
||||
@@ -1260,8 +1256,8 @@ spectre_v2_parse_user_cmdline(void)
|
||||
}
|
||||
}
|
||||
|
||||
pr_err("Unknown user space protection option (%s). Switching to default\n", arg);
|
||||
return mode;
|
||||
pr_err("Unknown user space protection option (%s). Switching to AUTO select\n", arg);
|
||||
return SPECTRE_V2_USER_CMD_AUTO;
|
||||
}
|
||||
|
||||
static inline bool spectre_v2_in_eibrs_mode(enum spectre_v2_mitigation mode)
|
||||
|
||||
@@ -521,7 +521,7 @@ software_node_get_reference_args(const struct fwnode_handle *fwnode,
|
||||
if (prop->is_inline)
|
||||
return -EINVAL;
|
||||
|
||||
if (index * sizeof(*ref) >= prop->length)
|
||||
if ((index + 1) * sizeof(*ref) > prop->length)
|
||||
return -ENOENT;
|
||||
|
||||
ref_array = prop->pointer;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
/**
|
||||
* Timeout in milliseconds to wait for the completion of an MC command
|
||||
*/
|
||||
#define MC_CMD_COMPLETION_TIMEOUT_MS 500
|
||||
#define MC_CMD_COMPLETION_TIMEOUT_MS 15000
|
||||
|
||||
/*
|
||||
* usleep_range() min and max values used to throttle down polling
|
||||
|
||||
@@ -687,51 +687,6 @@ static int sysc_parse_and_check_child_range(struct sysc *ddata)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Interconnect instances to probe before l4_per instances */
|
||||
static struct resource early_bus_ranges[] = {
|
||||
/* am3/4 l4_wkup */
|
||||
{ .start = 0x44c00000, .end = 0x44c00000 + 0x300000, },
|
||||
/* omap4/5 and dra7 l4_cfg */
|
||||
{ .start = 0x4a000000, .end = 0x4a000000 + 0x300000, },
|
||||
/* omap4 l4_wkup */
|
||||
{ .start = 0x4a300000, .end = 0x4a300000 + 0x30000, },
|
||||
/* omap5 and dra7 l4_wkup without dra7 dcan segment */
|
||||
{ .start = 0x4ae00000, .end = 0x4ae00000 + 0x30000, },
|
||||
};
|
||||
|
||||
static atomic_t sysc_defer = ATOMIC_INIT(10);
|
||||
|
||||
/**
|
||||
* sysc_defer_non_critical - defer non_critical interconnect probing
|
||||
* @ddata: device driver data
|
||||
*
|
||||
* We want to probe l4_cfg and l4_wkup interconnect instances before any
|
||||
* l4_per instances as l4_per instances depend on resources on l4_cfg and
|
||||
* l4_wkup interconnects.
|
||||
*/
|
||||
static int sysc_defer_non_critical(struct sysc *ddata)
|
||||
{
|
||||
struct resource *res;
|
||||
int i;
|
||||
|
||||
if (!atomic_read(&sysc_defer))
|
||||
return 0;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(early_bus_ranges); i++) {
|
||||
res = &early_bus_ranges[i];
|
||||
if (ddata->module_pa >= res->start &&
|
||||
ddata->module_pa <= res->end) {
|
||||
atomic_set(&sysc_defer, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
atomic_dec_if_positive(&sysc_defer);
|
||||
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
|
||||
static struct device_node *stdout_path;
|
||||
|
||||
static void sysc_init_stdout_path(struct sysc *ddata)
|
||||
@@ -956,10 +911,6 @@ static int sysc_map_and_check_registers(struct sysc *ddata)
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
error = sysc_defer_non_critical(ddata);
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
sysc_check_children(ddata);
|
||||
|
||||
error = sysc_parse_registers(ddata);
|
||||
|
||||
@@ -429,6 +429,7 @@ static const char *const rk3036_critical_clocks[] __initconst = {
|
||||
"hclk_peri",
|
||||
"pclk_peri",
|
||||
"pclk_ddrupctl",
|
||||
"ddrphy",
|
||||
};
|
||||
|
||||
static void __init rk3036_clk_init(struct device_node *np)
|
||||
|
||||
@@ -2658,8 +2658,10 @@ int cpufreq_boost_trigger_state(int state)
|
||||
unsigned long flags;
|
||||
int ret = 0;
|
||||
|
||||
if (cpufreq_driver->boost_enabled == state)
|
||||
return 0;
|
||||
/*
|
||||
* Don't compare 'cpufreq_driver->boost_enabled' with 'state' here to
|
||||
* make sure all policies are in sync with global boost flag.
|
||||
*/
|
||||
|
||||
write_lock_irqsave(&cpufreq_driver_lock, flags);
|
||||
cpufreq_driver->boost_enabled = state;
|
||||
|
||||
@@ -127,8 +127,7 @@ static int begin_cpu_udmabuf(struct dma_buf *buf,
|
||||
ubuf->sg = NULL;
|
||||
}
|
||||
} else {
|
||||
dma_sync_sg_for_cpu(dev, ubuf->sg->sgl, ubuf->sg->nents,
|
||||
direction);
|
||||
dma_sync_sgtable_for_cpu(dev, ubuf->sg, direction);
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -143,7 +142,7 @@ static int end_cpu_udmabuf(struct dma_buf *buf,
|
||||
if (!ubuf->sg)
|
||||
return -EINVAL;
|
||||
|
||||
dma_sync_sg_for_device(dev, ubuf->sg->sgl, ubuf->sg->nents, direction);
|
||||
dma_sync_sgtable_for_device(dev, ubuf->sg, direction);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1268,8 +1268,6 @@ static void gfx_v8_0_get_csb_buffer(struct amdgpu_device *adev,
|
||||
PACKET3_SET_CONTEXT_REG_START);
|
||||
for (i = 0; i < ext->reg_count; i++)
|
||||
buffer[count++] = cpu_to_le32(ext->extent[i]);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1741,8 +1741,6 @@ static void gfx_v9_0_get_csb_buffer(struct amdgpu_device *adev,
|
||||
PACKET3_SET_CONTEXT_REG_START);
|
||||
for (i = 0; i < ext->reg_count; i++)
|
||||
buffer[count++] = cpu_to_le32(ext->extent[i]);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -396,6 +396,10 @@ static void update_mqd_sdma(struct mqd_manager *mm, void *mqd,
|
||||
m->sdma_engine_id = q->sdma_engine_id;
|
||||
m->sdma_queue_id = q->sdma_queue_id;
|
||||
m->sdmax_rlcx_dummy_reg = SDMA_RLC_DUMMY_DEFAULT;
|
||||
/* Allow context switch so we don't cross-process starve with a massive
|
||||
* command buffer of long-running SDMA commands
|
||||
*/
|
||||
m->sdmax_rlcx_ib_cntl |= SDMA0_GFX_IB_CNTL__SWITCH_INSIDE_IB_MASK;
|
||||
|
||||
q->is_active = QUEUE_IS_ACTIVE(*q);
|
||||
}
|
||||
|
||||
@@ -353,7 +353,8 @@ static void dpu_encoder_phys_vid_underrun_irq(void *arg, int irq_idx)
|
||||
static bool dpu_encoder_phys_vid_needs_single_flush(
|
||||
struct dpu_encoder_phys *phys_enc)
|
||||
{
|
||||
return phys_enc->split_role != ENC_ROLE_SOLO;
|
||||
return !(phys_enc->hw_ctl->caps->features & BIT(DPU_CTL_ACTIVE_CFG)) &&
|
||||
phys_enc->split_role != ENC_ROLE_SOLO;
|
||||
}
|
||||
|
||||
static void _dpu_encoder_phys_vid_setup_irq_hw_idx(
|
||||
|
||||
@@ -199,7 +199,8 @@ static void mousevsc_on_receive_device_info(struct mousevsc_dev *input_device,
|
||||
if (!input_device->hid_desc)
|
||||
goto cleanup;
|
||||
|
||||
input_device->report_desc_size = desc->desc[0].wDescriptorLength;
|
||||
input_device->report_desc_size = le16_to_cpu(
|
||||
desc->rpt_desc.wDescriptorLength);
|
||||
if (input_device->report_desc_size == 0) {
|
||||
input_device->dev_info_status = -EINVAL;
|
||||
goto cleanup;
|
||||
@@ -217,7 +218,7 @@ static void mousevsc_on_receive_device_info(struct mousevsc_dev *input_device,
|
||||
|
||||
memcpy(input_device->report_desc,
|
||||
((unsigned char *)desc) + desc->bLength,
|
||||
desc->desc[0].wDescriptorLength);
|
||||
le16_to_cpu(desc->rpt_desc.wDescriptorLength));
|
||||
|
||||
/* Send the ack */
|
||||
memset(&ack, 0, sizeof(struct mousevsc_prt_msg));
|
||||
|
||||
@@ -984,12 +984,11 @@ static int usbhid_parse(struct hid_device *hid)
|
||||
struct usb_host_interface *interface = intf->cur_altsetting;
|
||||
struct usb_device *dev = interface_to_usbdev (intf);
|
||||
struct hid_descriptor *hdesc;
|
||||
struct hid_class_descriptor *hcdesc;
|
||||
u32 quirks = 0;
|
||||
unsigned int rsize = 0;
|
||||
char *rdesc;
|
||||
int ret, n;
|
||||
int num_descriptors;
|
||||
size_t offset = offsetof(struct hid_descriptor, desc);
|
||||
int ret;
|
||||
|
||||
quirks = hid_lookup_quirk(hid);
|
||||
|
||||
@@ -1011,20 +1010,19 @@ static int usbhid_parse(struct hid_device *hid)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
if (hdesc->bLength < sizeof(struct hid_descriptor)) {
|
||||
dbg_hid("hid descriptor is too short\n");
|
||||
if (!hdesc->bNumDescriptors ||
|
||||
hdesc->bLength != sizeof(*hdesc) +
|
||||
(hdesc->bNumDescriptors - 1) * sizeof(*hcdesc)) {
|
||||
dbg_hid("hid descriptor invalid, bLen=%hhu bNum=%hhu\n",
|
||||
hdesc->bLength, hdesc->bNumDescriptors);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
hid->version = le16_to_cpu(hdesc->bcdHID);
|
||||
hid->country = hdesc->bCountryCode;
|
||||
|
||||
num_descriptors = min_t(int, hdesc->bNumDescriptors,
|
||||
(hdesc->bLength - offset) / sizeof(struct hid_class_descriptor));
|
||||
|
||||
for (n = 0; n < num_descriptors; n++)
|
||||
if (hdesc->desc[n].bDescriptorType == HID_DT_REPORT)
|
||||
rsize = le16_to_cpu(hdesc->desc[n].wDescriptorLength);
|
||||
if (hdesc->rpt_desc.bDescriptorType == HID_DT_REPORT)
|
||||
rsize = le16_to_cpu(hdesc->rpt_desc.wDescriptorLength);
|
||||
|
||||
if (!rsize || rsize > HID_MAX_DESCRIPTOR_SIZE) {
|
||||
dbg_hid("weird size of report descriptor (%u)\n", rsize);
|
||||
@@ -1052,6 +1050,11 @@ static int usbhid_parse(struct hid_device *hid)
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (hdesc->bNumDescriptors > 1)
|
||||
hid_warn(intf,
|
||||
"%u unsupported optional hid class descriptors\n",
|
||||
(int)(hdesc->bNumDescriptors - 1));
|
||||
|
||||
hid->quirks |= quirks;
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -97,7 +97,7 @@ static int i2c_dw_unreg_slave(struct i2c_client *slave)
|
||||
dev->disable(dev);
|
||||
synchronize_irq(dev->irq);
|
||||
dev->slave = NULL;
|
||||
pm_runtime_put(dev->dev);
|
||||
pm_runtime_put_sync_suspend(dev->dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1950,10 +1950,14 @@ static int npcm_i2c_init_module(struct npcm_i2c *bus, enum i2c_mode mode,
|
||||
|
||||
/* check HW is OK: SDA and SCL should be high at this point. */
|
||||
if ((npcm_i2c_get_SDA(&bus->adap) == 0) || (npcm_i2c_get_SCL(&bus->adap) == 0)) {
|
||||
dev_err(bus->dev, "I2C%d init fail: lines are low\n", bus->num);
|
||||
dev_err(bus->dev, "SDA=%d SCL=%d\n", npcm_i2c_get_SDA(&bus->adap),
|
||||
npcm_i2c_get_SCL(&bus->adap));
|
||||
return -ENXIO;
|
||||
dev_warn(bus->dev, " I2C%d SDA=%d SCL=%d, attempting to recover\n", bus->num,
|
||||
npcm_i2c_get_SDA(&bus->adap), npcm_i2c_get_SCL(&bus->adap));
|
||||
if (npcm_i2c_recovery_tgclk(&bus->adap)) {
|
||||
dev_err(bus->dev, "I2C%d init fail: SDA=%d SCL=%d\n",
|
||||
bus->num, npcm_i2c_get_SDA(&bus->adap),
|
||||
npcm_i2c_get_SCL(&bus->adap));
|
||||
return -ENXIO;
|
||||
}
|
||||
}
|
||||
|
||||
npcm_i2c_int_enable(bus, true);
|
||||
|
||||
@@ -74,9 +74,14 @@ static int bbc_spkr_event(struct input_dev *dev, unsigned int type, unsigned int
|
||||
return -1;
|
||||
|
||||
switch (code) {
|
||||
case SND_BELL: if (value) value = 1000;
|
||||
case SND_TONE: break;
|
||||
default: return -1;
|
||||
case SND_BELL:
|
||||
if (value)
|
||||
value = 1000;
|
||||
break;
|
||||
case SND_TONE:
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (value > 20 && value < 32767)
|
||||
@@ -112,9 +117,14 @@ static int grover_spkr_event(struct input_dev *dev, unsigned int type, unsigned
|
||||
return -1;
|
||||
|
||||
switch (code) {
|
||||
case SND_BELL: if (value) value = 1000;
|
||||
case SND_TONE: break;
|
||||
default: return -1;
|
||||
case SND_BELL:
|
||||
if (value)
|
||||
value = 1000;
|
||||
break;
|
||||
case SND_TONE:
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (value > 20 && value < 32767)
|
||||
|
||||
@@ -750,6 +750,14 @@ int amd_iommu_register_ga_log_notifier(int (*notifier)(u32))
|
||||
{
|
||||
iommu_ga_log_notifier = notifier;
|
||||
|
||||
/*
|
||||
* Ensure all in-flight IRQ handlers run to completion before returning
|
||||
* to the caller, e.g. to ensure module code isn't unloaded while it's
|
||||
* being executed in the IRQ handler.
|
||||
*/
|
||||
if (!notifier)
|
||||
synchronize_rcu();
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(amd_iommu_register_ga_log_notifier);
|
||||
|
||||
@@ -309,6 +309,10 @@ static int tc358743_get_detected_timings(struct v4l2_subdev *sd,
|
||||
|
||||
memset(timings, 0, sizeof(struct v4l2_dv_timings));
|
||||
|
||||
/* if HPD is low, ignore any video */
|
||||
if (!(i2c_rd8(sd, HPD_CTL) & MASK_HPD_OUT0))
|
||||
return -ENOLINK;
|
||||
|
||||
if (no_signal(sd)) {
|
||||
v4l2_dbg(1, debug, sd, "%s: no valid signal\n", __func__);
|
||||
return -ENOLINK;
|
||||
|
||||
@@ -164,6 +164,7 @@ int fimc_is_hw_change_mode(struct fimc_is *is)
|
||||
if (WARN_ON(is->config_index >= ARRAY_SIZE(cmd)))
|
||||
return -EINVAL;
|
||||
|
||||
fimc_is_hw_wait_intmsr0_intmsd0(is);
|
||||
mcuctl_write(cmd[is->config_index], is, MCUCTL_REG_ISSR(0));
|
||||
mcuctl_write(is->sensor_index, is, MCUCTL_REG_ISSR(1));
|
||||
mcuctl_write(is->setfile.sub_index, is, MCUCTL_REG_ISSR(2));
|
||||
|
||||
@@ -117,7 +117,6 @@ static netdev_tx_t aq_ndev_start_xmit(struct sk_buff *skb, struct net_device *nd
|
||||
}
|
||||
#endif
|
||||
|
||||
skb_tx_timestamp(skb);
|
||||
return aq_nic_xmit(aq_nic, skb);
|
||||
}
|
||||
|
||||
|
||||
@@ -751,6 +751,8 @@ int aq_nic_xmit(struct aq_nic_s *self, struct sk_buff *skb)
|
||||
|
||||
frags = aq_nic_map_skb(self, skb, ring);
|
||||
|
||||
skb_tx_timestamp(skb);
|
||||
|
||||
if (likely(frags)) {
|
||||
err = self->aq_hw_ops->hw_ring_tx_xmit(self->aq_hw,
|
||||
ring, frags);
|
||||
|
||||
@@ -4571,7 +4571,11 @@ static int macb_probe(struct platform_device *pdev)
|
||||
|
||||
#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
|
||||
if (GEM_BFEXT(DAW64, gem_readl(bp, DCFG6))) {
|
||||
dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(44));
|
||||
err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(44));
|
||||
if (err) {
|
||||
dev_err(&pdev->dev, "failed to set DMA mask\n");
|
||||
goto err_out_free_netdev;
|
||||
}
|
||||
bp->hw_dma_cap |= HW_DMA_CAP_64B;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -146,6 +146,8 @@ rio_probe1 (struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
np->ioaddr = ioaddr;
|
||||
np->chip_id = chip_idx;
|
||||
np->pdev = pdev;
|
||||
|
||||
spin_lock_init(&np->stats_lock);
|
||||
spin_lock_init (&np->tx_lock);
|
||||
spin_lock_init (&np->rx_lock);
|
||||
|
||||
@@ -869,7 +871,6 @@ tx_error (struct net_device *dev, int tx_status)
|
||||
frame_id = (tx_status & 0xffff0000);
|
||||
printk (KERN_ERR "%s: Transmit error, TxStatus %4.4x, FrameId %d.\n",
|
||||
dev->name, tx_status, frame_id);
|
||||
dev->stats.tx_errors++;
|
||||
/* Ttransmit Underrun */
|
||||
if (tx_status & 0x10) {
|
||||
dev->stats.tx_fifo_errors++;
|
||||
@@ -906,9 +907,15 @@ tx_error (struct net_device *dev, int tx_status)
|
||||
rio_set_led_mode(dev);
|
||||
/* Let TxStartThresh stay default value */
|
||||
}
|
||||
|
||||
spin_lock(&np->stats_lock);
|
||||
/* Maximum Collisions */
|
||||
if (tx_status & 0x08)
|
||||
dev->stats.collisions++;
|
||||
|
||||
dev->stats.tx_errors++;
|
||||
spin_unlock(&np->stats_lock);
|
||||
|
||||
/* Restart the Tx */
|
||||
dw32(MACCtrl, dr16(MACCtrl) | TxEnable);
|
||||
}
|
||||
@@ -1077,7 +1084,9 @@ get_stats (struct net_device *dev)
|
||||
int i;
|
||||
#endif
|
||||
unsigned int stat_reg;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&np->stats_lock, flags);
|
||||
/* All statistics registers need to be acknowledged,
|
||||
else statistic overflow could cause problems */
|
||||
|
||||
@@ -1127,6 +1136,9 @@ get_stats (struct net_device *dev)
|
||||
dr16(TCPCheckSumErrors);
|
||||
dr16(UDPCheckSumErrors);
|
||||
dr16(IPCheckSumErrors);
|
||||
|
||||
spin_unlock_irqrestore(&np->stats_lock, flags);
|
||||
|
||||
return &dev->stats;
|
||||
}
|
||||
|
||||
|
||||
@@ -372,6 +372,8 @@ struct netdev_private {
|
||||
struct pci_dev *pdev;
|
||||
void __iomem *ioaddr;
|
||||
void __iomem *eeprom_addr;
|
||||
// To ensure synchronization when stats are updated.
|
||||
spinlock_t stats_lock;
|
||||
spinlock_t tx_lock;
|
||||
spinlock_t rx_lock;
|
||||
unsigned int rx_buf_sz; /* Based on MTU+slack. */
|
||||
|
||||
@@ -1608,7 +1608,7 @@ int be_cmd_get_stats(struct be_adapter *adapter, struct be_dma_mem *nonemb_cmd)
|
||||
/* version 1 of the cmd is not supported only by BE2 */
|
||||
if (BE2_chip(adapter))
|
||||
hdr->version = 0;
|
||||
if (BE3_chip(adapter) || lancer_chip(adapter))
|
||||
else if (BE3_chip(adapter) || lancer_chip(adapter))
|
||||
hdr->version = 1;
|
||||
else
|
||||
hdr->version = 2;
|
||||
|
||||
@@ -1320,10 +1320,11 @@ i40e_status i40e_pf_reset(struct i40e_hw *hw)
|
||||
void i40e_clear_hw(struct i40e_hw *hw)
|
||||
{
|
||||
u32 num_queues, base_queue;
|
||||
u32 num_pf_int;
|
||||
u32 num_vf_int;
|
||||
s32 num_pf_int;
|
||||
s32 num_vf_int;
|
||||
u32 num_vfs;
|
||||
u32 i, j;
|
||||
s32 i;
|
||||
u32 j;
|
||||
u32 val;
|
||||
u32 eol = 0x7ff;
|
||||
|
||||
|
||||
@@ -1905,6 +1905,7 @@ static int mlx4_en_get_ts_info(struct net_device *dev,
|
||||
if (mdev->dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_TS) {
|
||||
info->so_timestamping |=
|
||||
SOF_TIMESTAMPING_TX_HARDWARE |
|
||||
SOF_TIMESTAMPING_TX_SOFTWARE |
|
||||
SOF_TIMESTAMPING_RX_HARDWARE |
|
||||
SOF_TIMESTAMPING_RAW_HARDWARE;
|
||||
|
||||
|
||||
@@ -712,10 +712,10 @@ static int vxlan_fdb_append(struct vxlan_fdb *f,
|
||||
if (rd == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
if (dst_cache_init(&rd->dst_cache, GFP_ATOMIC)) {
|
||||
kfree(rd);
|
||||
return -ENOMEM;
|
||||
}
|
||||
/* The driver can work correctly without a dst cache, so do not treat
|
||||
* dst cache initialization errors as fatal.
|
||||
*/
|
||||
dst_cache_init(&rd->dst_cache, GFP_ATOMIC | __GFP_NOWARN);
|
||||
|
||||
rd->remote_ip = *ip;
|
||||
rd->remote_port = port;
|
||||
|
||||
@@ -17,6 +17,8 @@ static const struct usb_device_id mt76x2u_device_table[] = {
|
||||
{ USB_DEVICE(0x057c, 0x8503) }, /* Avm FRITZ!WLAN AC860 */
|
||||
{ USB_DEVICE(0x7392, 0xb711) }, /* Edimax EW 7722 UAC */
|
||||
{ USB_DEVICE(0x0e8d, 0x7632) }, /* HC-M7662BU1 */
|
||||
{ USB_DEVICE(0x0471, 0x2126) }, /* LiteOn WN4516R module, nonstandard USB connector */
|
||||
{ USB_DEVICE(0x0471, 0x7600) }, /* LiteOn WN4519R module, nonstandard USB connector */
|
||||
{ USB_DEVICE(0x2c4e, 0x0103) }, /* Mercury UD13 */
|
||||
{ USB_DEVICE(0x0846, 0x9053) }, /* Netgear A6210 */
|
||||
{ USB_DEVICE(0x045e, 0x02e6) }, /* XBox One Wireless Adapter */
|
||||
|
||||
@@ -191,6 +191,7 @@ int mt76x2u_register_device(struct mt76x02_dev *dev)
|
||||
{
|
||||
struct ieee80211_hw *hw = mt76_hw(dev);
|
||||
struct mt76_usb *usb = &dev->mt76.usb;
|
||||
bool vht;
|
||||
int err;
|
||||
|
||||
INIT_DELAYED_WORK(&dev->cal_work, mt76x2u_phy_calibrate);
|
||||
@@ -215,7 +216,17 @@ int mt76x2u_register_device(struct mt76x02_dev *dev)
|
||||
|
||||
/* check hw sg support in order to enable AMSDU */
|
||||
hw->max_tx_fragments = dev->mt76.usb.sg_en ? MT_TX_SG_MAX_SIZE : 1;
|
||||
err = mt76_register_device(&dev->mt76, true, mt76x02_rates,
|
||||
switch (dev->mt76.rev) {
|
||||
case 0x76320044:
|
||||
/* these ASIC revisions do not support VHT */
|
||||
vht = false;
|
||||
break;
|
||||
default:
|
||||
vht = true;
|
||||
break;
|
||||
}
|
||||
|
||||
err = mt76_register_device(&dev->mt76, vht, mt76x02_rates,
|
||||
ARRAY_SIZE(mt76x02_rates));
|
||||
if (err)
|
||||
goto fail;
|
||||
|
||||
@@ -354,9 +354,7 @@ static int armada_37xx_pmx_set_by_name(struct pinctrl_dev *pctldev,
|
||||
|
||||
val = grp->val[func];
|
||||
|
||||
regmap_update_bits(info->regmap, reg, mask, val);
|
||||
|
||||
return 0;
|
||||
return regmap_update_bits(info->regmap, reg, mask, val);
|
||||
}
|
||||
|
||||
static int armada_37xx_pmx_set(struct pinctrl_dev *pctldev,
|
||||
@@ -398,10 +396,13 @@ static int armada_37xx_gpio_get_direction(struct gpio_chip *chip,
|
||||
struct armada_37xx_pinctrl *info = gpiochip_get_data(chip);
|
||||
unsigned int reg = OUTPUT_EN;
|
||||
unsigned int val, mask;
|
||||
int ret;
|
||||
|
||||
armada_37xx_update_reg(®, &offset);
|
||||
mask = BIT(offset);
|
||||
regmap_read(info->regmap, reg, &val);
|
||||
ret = regmap_read(info->regmap, reg, &val);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (val & mask)
|
||||
return GPIO_LINE_DIRECTION_OUT;
|
||||
@@ -438,11 +439,14 @@ static int armada_37xx_gpio_get(struct gpio_chip *chip, unsigned int offset)
|
||||
struct armada_37xx_pinctrl *info = gpiochip_get_data(chip);
|
||||
unsigned int reg = INPUT_VAL;
|
||||
unsigned int val, mask;
|
||||
int ret;
|
||||
|
||||
armada_37xx_update_reg(®, &offset);
|
||||
mask = BIT(offset);
|
||||
|
||||
regmap_read(info->regmap, reg, &val);
|
||||
ret = regmap_read(info->regmap, reg, &val);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return (val & mask) != 0;
|
||||
}
|
||||
@@ -467,16 +471,17 @@ static int armada_37xx_pmx_gpio_set_direction(struct pinctrl_dev *pctldev,
|
||||
{
|
||||
struct armada_37xx_pinctrl *info = pinctrl_dev_get_drvdata(pctldev);
|
||||
struct gpio_chip *chip = range->gc;
|
||||
int ret;
|
||||
|
||||
dev_dbg(info->dev, "gpio_direction for pin %u as %s-%d to %s\n",
|
||||
offset, range->name, offset, input ? "input" : "output");
|
||||
|
||||
if (input)
|
||||
armada_37xx_gpio_direction_input(chip, offset);
|
||||
ret = armada_37xx_gpio_direction_input(chip, offset);
|
||||
else
|
||||
armada_37xx_gpio_direction_output(chip, offset, 0);
|
||||
ret = armada_37xx_gpio_direction_output(chip, offset, 0);
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int armada_37xx_gpio_request_enable(struct pinctrl_dev *pctldev,
|
||||
|
||||
@@ -13,3 +13,5 @@ source "drivers/platform/chrome/Kconfig"
|
||||
source "drivers/platform/mellanox/Kconfig"
|
||||
|
||||
source "drivers/platform/olpc/Kconfig"
|
||||
|
||||
source "drivers/platform/surface/Kconfig"
|
||||
|
||||
@@ -9,3 +9,4 @@ obj-$(CONFIG_MIPS) += mips/
|
||||
obj-$(CONFIG_OLPC_EC) += olpc/
|
||||
obj-$(CONFIG_GOLDFISH) += goldfish/
|
||||
obj-$(CONFIG_CHROME_PLATFORMS) += chrome/
|
||||
obj-$(CONFIG_SURFACE_PLATFORMS) += surface/
|
||||
|
||||
14
drivers/platform/surface/Kconfig
Normal file
14
drivers/platform/surface/Kconfig
Normal file
@@ -0,0 +1,14 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Microsoft Surface Platform-Specific Drivers
|
||||
#
|
||||
|
||||
menuconfig SURFACE_PLATFORMS
|
||||
bool "Microsoft Surface Platform-Specific Device Drivers"
|
||||
default y
|
||||
help
|
||||
Say Y here to get to see options for platform-specific device drivers
|
||||
for Microsoft Surface devices. This option alone does not add any
|
||||
kernel code.
|
||||
|
||||
If you say N, all options in this submenu will be skipped and disabled.
|
||||
5
drivers/platform/surface/Makefile
Normal file
5
drivers/platform/surface/Makefile
Normal file
@@ -0,0 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
#
|
||||
# Makefile for linux/drivers/platform/surface
|
||||
# Microsoft Surface Platform-Specific Drivers
|
||||
#
|
||||
@@ -292,7 +292,7 @@ static int packet_read_list(char *data, size_t * pread_length)
|
||||
remaining_bytes = *pread_length;
|
||||
bytes_read = rbu_data.packet_read_count;
|
||||
|
||||
list_for_each_entry(newpacket, (&packet_data_head.list)->next, list) {
|
||||
list_for_each_entry(newpacket, &packet_data_head.list, list) {
|
||||
bytes_copied = do_packet_read(pdest, newpacket,
|
||||
remaining_bytes, bytes_read, &temp_count);
|
||||
remaining_bytes -= bytes_copied;
|
||||
@@ -315,14 +315,14 @@ static void packet_empty_list(void)
|
||||
{
|
||||
struct packet_data *newpacket, *tmp;
|
||||
|
||||
list_for_each_entry_safe(newpacket, tmp, (&packet_data_head.list)->next, list) {
|
||||
list_for_each_entry_safe(newpacket, tmp, &packet_data_head.list, list) {
|
||||
list_del(&newpacket->list);
|
||||
|
||||
/*
|
||||
* zero out the RBU packet memory before freeing
|
||||
* to make sure there are no stale RBU packets left in memory
|
||||
*/
|
||||
memset(newpacket->data, 0, rbu_data.packetsize);
|
||||
memset(newpacket->data, 0, newpacket->length);
|
||||
set_memory_wb((unsigned long)newpacket->data,
|
||||
1 << newpacket->ordernum);
|
||||
free_pages((unsigned long) newpacket->data,
|
||||
|
||||
@@ -787,6 +787,9 @@ static int riocm_ch_send(u16 ch_id, void *buf, int len)
|
||||
if (buf == NULL || ch_id == 0 || len == 0 || len > RIO_MAX_MSG_SIZE)
|
||||
return -EINVAL;
|
||||
|
||||
if (len < sizeof(struct rio_ch_chan_hdr))
|
||||
return -EINVAL; /* insufficient data from user */
|
||||
|
||||
ch = riocm_get_channel(ch_id);
|
||||
if (!ch) {
|
||||
riocm_error("%s(%d) ch_%d not found", current->comm,
|
||||
|
||||
@@ -450,6 +450,8 @@ static ssize_t zfcp_sysfs_unit_add_store(struct device *dev,
|
||||
if (kstrtoull(buf, 0, (unsigned long long *) &fcp_lun))
|
||||
return -EINVAL;
|
||||
|
||||
flush_work(&port->rport_work);
|
||||
|
||||
retval = zfcp_unit_add(port, fcp_lun);
|
||||
if (retval)
|
||||
return retval;
|
||||
|
||||
@@ -4772,7 +4772,7 @@ lpfc_check_sli_ndlp(struct lpfc_hba *phba,
|
||||
case CMD_GEN_REQUEST64_CR:
|
||||
if (iocb->context_un.ndlp == ndlp)
|
||||
return 1;
|
||||
fallthrough;
|
||||
break;
|
||||
case CMD_ELS_REQUEST64_CR:
|
||||
if (icmd->un.elsreq64.remoteID == ndlp->nlp_DID)
|
||||
return 1;
|
||||
|
||||
@@ -5530,9 +5530,9 @@ lpfc_sli4_get_ctl_attr(struct lpfc_hba *phba)
|
||||
phba->sli4_hba.lnk_info.lnk_no =
|
||||
bf_get(lpfc_cntl_attr_lnk_numb, cntl_attr);
|
||||
|
||||
memset(phba->BIOSVersion, 0, sizeof(phba->BIOSVersion));
|
||||
strlcat(phba->BIOSVersion, (char *)cntl_attr->bios_ver_str,
|
||||
memcpy(phba->BIOSVersion, cntl_attr->bios_ver_str,
|
||||
sizeof(phba->BIOSVersion));
|
||||
phba->BIOSVersion[sizeof(phba->BIOSVersion) - 1] = '\0';
|
||||
|
||||
lpfc_printf_log(phba, KERN_INFO, LOG_SLI,
|
||||
"3086 lnk_type:%d, lnk_numb:%d, bios_ver:%s\n",
|
||||
|
||||
@@ -400,7 +400,7 @@ MODULE_PARM_DESC(ring_avail_percent_lowater,
|
||||
/*
|
||||
* Timeout in seconds for all devices managed by this driver.
|
||||
*/
|
||||
static int storvsc_timeout = 180;
|
||||
static const int storvsc_timeout = 180;
|
||||
|
||||
#if IS_ENABLED(CONFIG_SCSI_FC_ATTRS)
|
||||
static struct scsi_transport_template *fc_transport_template;
|
||||
@@ -779,7 +779,7 @@ static void handle_multichannel_storage(struct hv_device *device, int max_chns)
|
||||
return;
|
||||
}
|
||||
|
||||
t = wait_for_completion_timeout(&request->wait_event, 10*HZ);
|
||||
t = wait_for_completion_timeout(&request->wait_event, storvsc_timeout * HZ);
|
||||
if (t == 0) {
|
||||
dev_err(dev, "Failed to create sub-channel: timed out\n");
|
||||
return;
|
||||
@@ -840,7 +840,7 @@ static int storvsc_execute_vstor_op(struct hv_device *device,
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
|
||||
t = wait_for_completion_timeout(&request->wait_event, 5*HZ);
|
||||
t = wait_for_completion_timeout(&request->wait_event, storvsc_timeout * HZ);
|
||||
if (t == 0)
|
||||
return -ETIMEDOUT;
|
||||
|
||||
@@ -1301,6 +1301,8 @@ static int storvsc_connect_to_vsp(struct hv_device *device, u32 ring_size,
|
||||
return ret;
|
||||
|
||||
ret = storvsc_channel_init(device, is_fc);
|
||||
if (ret)
|
||||
vmbus_close(device->channel);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -1623,7 +1625,7 @@ static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd)
|
||||
if (ret != 0)
|
||||
return FAILED;
|
||||
|
||||
t = wait_for_completion_timeout(&request->wait_event, 5*HZ);
|
||||
t = wait_for_completion_timeout(&request->wait_event, storvsc_timeout * HZ);
|
||||
if (t == 0)
|
||||
return TIMEOUT_ERROR;
|
||||
|
||||
|
||||
@@ -827,24 +827,24 @@ static int rkvdec_open(struct file *filp)
|
||||
rkvdec_reset_decoded_fmt(ctx);
|
||||
v4l2_fh_init(&ctx->fh, video_devdata(filp));
|
||||
|
||||
ret = rkvdec_init_ctrls(ctx);
|
||||
if (ret)
|
||||
goto err_free_ctx;
|
||||
|
||||
ctx->fh.m2m_ctx = v4l2_m2m_ctx_init(rkvdec->m2m_dev, ctx,
|
||||
rkvdec_queue_init);
|
||||
if (IS_ERR(ctx->fh.m2m_ctx)) {
|
||||
ret = PTR_ERR(ctx->fh.m2m_ctx);
|
||||
goto err_cleanup_ctrls;
|
||||
goto err_free_ctx;
|
||||
}
|
||||
|
||||
ret = rkvdec_init_ctrls(ctx);
|
||||
if (ret)
|
||||
goto err_cleanup_m2m_ctx;
|
||||
|
||||
filp->private_data = &ctx->fh;
|
||||
v4l2_fh_add(&ctx->fh);
|
||||
|
||||
return 0;
|
||||
|
||||
err_cleanup_ctrls:
|
||||
v4l2_ctrl_handler_free(&ctx->ctrl_hdl);
|
||||
err_cleanup_m2m_ctx:
|
||||
v4l2_m2m_ctx_release(ctx->fh.m2m_ctx);
|
||||
|
||||
err_free_ctx:
|
||||
kfree(ctx);
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <linux/fs.h>
|
||||
#include <linux/idr.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/overflow.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/tee_drv.h>
|
||||
#include <linux/uaccess.h>
|
||||
@@ -19,7 +20,7 @@
|
||||
|
||||
#define TEE_NUM_DEVICES 32
|
||||
|
||||
#define TEE_IOCTL_PARAM_SIZE(x) (sizeof(struct tee_param) * (x))
|
||||
#define TEE_IOCTL_PARAM_SIZE(x) (size_mul(sizeof(struct tee_param), (x)))
|
||||
|
||||
#define TEE_UUID_NS_NAME_SIZE 128
|
||||
|
||||
@@ -492,7 +493,7 @@ static int tee_ioctl_open_session(struct tee_context *ctx,
|
||||
if (copy_from_user(&arg, uarg, sizeof(arg)))
|
||||
return -EFAULT;
|
||||
|
||||
if (sizeof(arg) + TEE_IOCTL_PARAM_SIZE(arg.num_params) != buf.buf_len)
|
||||
if (size_add(sizeof(arg), TEE_IOCTL_PARAM_SIZE(arg.num_params)) != buf.buf_len)
|
||||
return -EINVAL;
|
||||
|
||||
if (arg.num_params) {
|
||||
@@ -570,7 +571,7 @@ static int tee_ioctl_invoke(struct tee_context *ctx,
|
||||
if (copy_from_user(&arg, uarg, sizeof(arg)))
|
||||
return -EFAULT;
|
||||
|
||||
if (sizeof(arg) + TEE_IOCTL_PARAM_SIZE(arg.num_params) != buf.buf_len)
|
||||
if (size_add(sizeof(arg), TEE_IOCTL_PARAM_SIZE(arg.num_params)) != buf.buf_len)
|
||||
return -EINVAL;
|
||||
|
||||
if (arg.num_params) {
|
||||
@@ -704,7 +705,7 @@ static int tee_ioctl_supp_recv(struct tee_context *ctx,
|
||||
if (get_user(num_params, &uarg->num_params))
|
||||
return -EFAULT;
|
||||
|
||||
if (sizeof(*uarg) + TEE_IOCTL_PARAM_SIZE(num_params) != buf.buf_len)
|
||||
if (size_add(sizeof(*uarg), TEE_IOCTL_PARAM_SIZE(num_params)) != buf.buf_len)
|
||||
return -EINVAL;
|
||||
|
||||
params = kcalloc(num_params, sizeof(struct tee_param), GFP_KERNEL);
|
||||
@@ -803,7 +804,7 @@ static int tee_ioctl_supp_send(struct tee_context *ctx,
|
||||
get_user(num_params, &uarg->num_params))
|
||||
return -EFAULT;
|
||||
|
||||
if (sizeof(*uarg) + TEE_IOCTL_PARAM_SIZE(num_params) > buf.buf_len)
|
||||
if (size_add(sizeof(*uarg), TEE_IOCTL_PARAM_SIZE(num_params)) > buf.buf_len)
|
||||
return -EINVAL;
|
||||
|
||||
params = kcalloc(num_params, sizeof(struct tee_param), GFP_KERNEL);
|
||||
|
||||
@@ -264,7 +264,7 @@ static void tsens_set_interrupt(struct tsens_priv *priv, u32 hw_id,
|
||||
dev_dbg(priv->dev, "[%u] %s: %s -> %s\n", hw_id, __func__,
|
||||
irq_type ? ((irq_type == 1) ? "UP" : "CRITICAL") : "LOW",
|
||||
enable ? "en" : "dis");
|
||||
if (tsens_version(priv) > VER_1_X)
|
||||
if (tsens_version(priv) >= VER_2_X)
|
||||
tsens_set_interrupt_v2(priv, hw_id, irq_type, enable);
|
||||
else
|
||||
tsens_set_interrupt_v1(priv, hw_id, irq_type, enable);
|
||||
@@ -316,7 +316,7 @@ static int tsens_read_irq_state(struct tsens_priv *priv, u32 hw_id,
|
||||
ret = regmap_field_read(priv->rf[LOW_INT_CLEAR_0 + hw_id], &d->low_irq_clear);
|
||||
if (ret)
|
||||
return ret;
|
||||
if (tsens_version(priv) > VER_1_X) {
|
||||
if (tsens_version(priv) >= VER_2_X) {
|
||||
ret = regmap_field_read(priv->rf[UP_INT_MASK_0 + hw_id], &d->up_irq_mask);
|
||||
if (ret)
|
||||
return ret;
|
||||
@@ -360,7 +360,7 @@ static int tsens_read_irq_state(struct tsens_priv *priv, u32 hw_id,
|
||||
|
||||
static inline u32 masked_irq(u32 hw_id, u32 mask, enum tsens_ver ver)
|
||||
{
|
||||
if (ver > VER_1_X)
|
||||
if (ver >= VER_2_X)
|
||||
return mask & (1 << hw_id);
|
||||
|
||||
/* v1, v0.1 don't have a irq mask register */
|
||||
@@ -560,7 +560,7 @@ static int tsens_set_trips(void *_sensor, int low, int high)
|
||||
static int tsens_enable_irq(struct tsens_priv *priv)
|
||||
{
|
||||
int ret;
|
||||
int val = tsens_version(priv) > VER_1_X ? 7 : 1;
|
||||
int val = tsens_version(priv) >= VER_2_X ? 7 : 1;
|
||||
|
||||
ret = regmap_field_write(priv->rf[INT_EN], val);
|
||||
if (ret < 0)
|
||||
@@ -826,7 +826,7 @@ int __init init_common(struct tsens_priv *priv)
|
||||
}
|
||||
}
|
||||
|
||||
if (tsens_version(priv) > VER_1_X && ver_minor > 2) {
|
||||
if (tsens_version(priv) >= VER_2_X && ver_minor > 2) {
|
||||
/* Watchdog is present only on v2.3+ */
|
||||
priv->feat->has_watchdog = 1;
|
||||
for (i = WDOG_BARK_STATUS; i <= CC_MON_MASK; i++) {
|
||||
|
||||
@@ -114,8 +114,8 @@ static struct hid_descriptor hidg_desc = {
|
||||
.bcdHID = cpu_to_le16(0x0101),
|
||||
.bCountryCode = 0x00,
|
||||
.bNumDescriptors = 0x1,
|
||||
/*.desc[0].bDescriptorType = DYNAMIC */
|
||||
/*.desc[0].wDescriptorLenght = DYNAMIC */
|
||||
/*.rpt_desc.bDescriptorType = DYNAMIC */
|
||||
/*.rpt_desc.wDescriptorLength = DYNAMIC */
|
||||
};
|
||||
|
||||
/* Super-Speed Support */
|
||||
@@ -724,8 +724,8 @@ static int hidg_setup(struct usb_function *f,
|
||||
struct hid_descriptor hidg_desc_copy = hidg_desc;
|
||||
|
||||
VDBG(cdev, "USB_REQ_GET_DESCRIPTOR: HID\n");
|
||||
hidg_desc_copy.desc[0].bDescriptorType = HID_DT_REPORT;
|
||||
hidg_desc_copy.desc[0].wDescriptorLength =
|
||||
hidg_desc_copy.rpt_desc.bDescriptorType = HID_DT_REPORT;
|
||||
hidg_desc_copy.rpt_desc.wDescriptorLength =
|
||||
cpu_to_le16(hidg->report_desc_length);
|
||||
|
||||
length = min_t(unsigned short, length,
|
||||
@@ -966,8 +966,8 @@ static int hidg_bind(struct usb_configuration *c, struct usb_function *f)
|
||||
* We can use hidg_desc struct here but we should not relay
|
||||
* that its content won't change after returning from this function.
|
||||
*/
|
||||
hidg_desc.desc[0].bDescriptorType = HID_DT_REPORT;
|
||||
hidg_desc.desc[0].wDescriptorLength =
|
||||
hidg_desc.rpt_desc.bDescriptorType = HID_DT_REPORT;
|
||||
hidg_desc.rpt_desc.wDescriptorLength =
|
||||
cpu_to_le16(hidg->report_desc_length);
|
||||
|
||||
hidg_hs_in_ep_desc.bEndpointAddress =
|
||||
|
||||
@@ -164,6 +164,7 @@ static int da9052_wdt_probe(struct platform_device *pdev)
|
||||
da9052_wdt = &driver_data->wdt;
|
||||
|
||||
da9052_wdt->timeout = DA9052_DEF_TIMEOUT;
|
||||
da9052_wdt->min_hw_heartbeat_ms = DA9052_TWDMIN;
|
||||
da9052_wdt->info = &da9052_wdt_info;
|
||||
da9052_wdt->ops = &da9052_wdt_ops;
|
||||
da9052_wdt->parent = dev;
|
||||
|
||||
@@ -1526,7 +1526,7 @@ static int ext4_ext_search_left(struct inode *inode,
|
||||
static int ext4_ext_search_right(struct inode *inode,
|
||||
struct ext4_ext_path *path,
|
||||
ext4_lblk_t *logical, ext4_fsblk_t *phys,
|
||||
struct ext4_extent *ret_ex)
|
||||
struct ext4_extent *ret_ex, int flags)
|
||||
{
|
||||
struct buffer_head *bh = NULL;
|
||||
struct ext4_extent_header *eh;
|
||||
@@ -1600,7 +1600,8 @@ got_index:
|
||||
ix++;
|
||||
while (++depth < path->p_depth) {
|
||||
/* subtract from p_depth to get proper eh_depth */
|
||||
bh = read_extent_tree_block(inode, ix, path->p_depth - depth, 0);
|
||||
bh = read_extent_tree_block(inode, ix, path->p_depth - depth,
|
||||
flags);
|
||||
if (IS_ERR(bh))
|
||||
return PTR_ERR(bh);
|
||||
eh = ext_block_hdr(bh);
|
||||
@@ -1608,7 +1609,7 @@ got_index:
|
||||
put_bh(bh);
|
||||
}
|
||||
|
||||
bh = read_extent_tree_block(inode, ix, path->p_depth - depth, 0);
|
||||
bh = read_extent_tree_block(inode, ix, path->p_depth - depth, flags);
|
||||
if (IS_ERR(bh))
|
||||
return PTR_ERR(bh);
|
||||
eh = ext_block_hdr(bh);
|
||||
@@ -2794,6 +2795,7 @@ int ext4_ext_remove_space(struct inode *inode, ext4_lblk_t start,
|
||||
struct partial_cluster partial;
|
||||
handle_t *handle;
|
||||
int i = 0, err = 0;
|
||||
int flags = EXT4_EX_NOCACHE | EXT4_EX_NOFAIL;
|
||||
|
||||
partial.pclu = 0;
|
||||
partial.lblk = 0;
|
||||
@@ -2824,8 +2826,7 @@ again:
|
||||
ext4_fsblk_t pblk;
|
||||
|
||||
/* find extent for or closest extent to this block */
|
||||
path = ext4_find_extent(inode, end, NULL,
|
||||
EXT4_EX_NOCACHE | EXT4_EX_NOFAIL);
|
||||
path = ext4_find_extent(inode, end, NULL, flags);
|
||||
if (IS_ERR(path)) {
|
||||
ext4_journal_stop(handle);
|
||||
return PTR_ERR(path);
|
||||
@@ -2890,7 +2891,7 @@ again:
|
||||
*/
|
||||
lblk = ex_end + 1;
|
||||
err = ext4_ext_search_right(inode, path, &lblk, &pblk,
|
||||
NULL);
|
||||
NULL, flags);
|
||||
if (err < 0)
|
||||
goto out;
|
||||
if (pblk) {
|
||||
@@ -2967,8 +2968,7 @@ again:
|
||||
i + 1, ext4_idx_pblock(path[i].p_idx));
|
||||
memset(path + i + 1, 0, sizeof(*path));
|
||||
bh = read_extent_tree_block(inode, path[i].p_idx,
|
||||
depth - i - 1,
|
||||
EXT4_EX_NOCACHE);
|
||||
depth - i - 1, flags);
|
||||
if (IS_ERR(bh)) {
|
||||
/* should we reset i_size? */
|
||||
err = PTR_ERR(bh);
|
||||
@@ -4270,7 +4270,8 @@ int ext4_ext_map_blocks(handle_t *handle, struct inode *inode,
|
||||
if (err)
|
||||
goto out;
|
||||
ar.lright = map->m_lblk;
|
||||
err = ext4_ext_search_right(inode, path, &ar.lright, &ar.pright, &ex2);
|
||||
err = ext4_ext_search_right(inode, path, &ar.lright, &ar.pright,
|
||||
&ex2, 0);
|
||||
if (err < 0)
|
||||
goto out;
|
||||
|
||||
@@ -5033,7 +5034,9 @@ int ext4_get_es_cache(struct inode *inode, struct fiemap_extent_info *fieinfo,
|
||||
}
|
||||
|
||||
if (fieinfo->fi_flags & FIEMAP_FLAG_CACHE) {
|
||||
inode_lock_shared(inode);
|
||||
error = ext4_ext_precache(inode);
|
||||
inode_unlock_shared(inode);
|
||||
if (error)
|
||||
return error;
|
||||
fieinfo->fi_flags &= ~FIEMAP_FLAG_CACHE;
|
||||
|
||||
@@ -1139,8 +1139,14 @@ resizefs_out:
|
||||
return 0;
|
||||
}
|
||||
case EXT4_IOC_PRECACHE_EXTENTS:
|
||||
return ext4_ext_precache(inode);
|
||||
{
|
||||
int ret;
|
||||
|
||||
inode_lock_shared(inode);
|
||||
ret = ext4_ext_precache(inode);
|
||||
inode_unlock_shared(inode);
|
||||
return ret;
|
||||
}
|
||||
case FS_IOC_SET_ENCRYPTION_POLICY:
|
||||
if (!ext4_has_feature_encrypt(sb))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
@@ -427,7 +427,9 @@ static void jffs2_mark_erased_block(struct jffs2_sb_info *c, struct jffs2_eraseb
|
||||
.totlen = cpu_to_je32(c->cleanmarker_size)
|
||||
};
|
||||
|
||||
jffs2_prealloc_raw_node_refs(c, jeb, 1);
|
||||
ret = jffs2_prealloc_raw_node_refs(c, jeb, 1);
|
||||
if (ret)
|
||||
goto filebad;
|
||||
|
||||
marker.hdr_crc = cpu_to_je32(crc32(0, &marker, sizeof(struct jffs2_unknown_node)-4));
|
||||
|
||||
|
||||
@@ -256,7 +256,9 @@ int jffs2_scan_medium(struct jffs2_sb_info *c)
|
||||
|
||||
jffs2_dbg(1, "%s(): Skipping %d bytes in nextblock to ensure page alignment\n",
|
||||
__func__, skip);
|
||||
jffs2_prealloc_raw_node_refs(c, c->nextblock, 1);
|
||||
ret = jffs2_prealloc_raw_node_refs(c, c->nextblock, 1);
|
||||
if (ret)
|
||||
goto out;
|
||||
jffs2_scan_dirty_space(c, c->nextblock, skip);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -858,7 +858,10 @@ int jffs2_sum_write_sumnode(struct jffs2_sb_info *c)
|
||||
spin_unlock(&c->erase_completion_lock);
|
||||
|
||||
jeb = c->nextblock;
|
||||
jffs2_prealloc_raw_node_refs(c, jeb, 1);
|
||||
ret = jffs2_prealloc_raw_node_refs(c, jeb, 1);
|
||||
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
if (!c->summary->sum_num || !c->summary->sum_list_head) {
|
||||
JFFS2_WARNING("Empty summary info!!!\n");
|
||||
@@ -872,6 +875,8 @@ int jffs2_sum_write_sumnode(struct jffs2_sb_info *c)
|
||||
datasize += padsize;
|
||||
|
||||
ret = jffs2_sum_write_data(c, jeb, infosize, datasize, padsize);
|
||||
|
||||
out:
|
||||
spin_lock(&c->erase_completion_lock);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -86,7 +86,8 @@ int jfs_ioc_trim(struct inode *ip, struct fstrim_range *range)
|
||||
down_read(&sb->s_umount);
|
||||
bmp = JFS_SBI(ip->i_sb)->bmap;
|
||||
|
||||
if (minlen > bmp->db_agsize ||
|
||||
if (bmp == NULL ||
|
||||
minlen > bmp->db_agsize ||
|
||||
start >= bmp->db_mapsize ||
|
||||
range->len < sb->s_blocksize) {
|
||||
up_read(&sb->s_umount);
|
||||
|
||||
@@ -2909,7 +2909,7 @@ void dtInitRoot(tid_t tid, struct inode *ip, u32 idotdot)
|
||||
* fsck.jfs should really fix this, but it currently does not.
|
||||
* Called from jfs_readdir when bad index is detected.
|
||||
*/
|
||||
static void add_missing_indices(struct inode *inode, s64 bn)
|
||||
static int add_missing_indices(struct inode *inode, s64 bn)
|
||||
{
|
||||
struct ldtentry *d;
|
||||
struct dt_lock *dtlck;
|
||||
@@ -2918,7 +2918,7 @@ static void add_missing_indices(struct inode *inode, s64 bn)
|
||||
struct lv *lv;
|
||||
struct metapage *mp;
|
||||
dtpage_t *p;
|
||||
int rc;
|
||||
int rc = 0;
|
||||
s8 *stbl;
|
||||
tid_t tid;
|
||||
struct tlock *tlck;
|
||||
@@ -2943,6 +2943,16 @@ static void add_missing_indices(struct inode *inode, s64 bn)
|
||||
|
||||
stbl = DT_GETSTBL(p);
|
||||
for (i = 0; i < p->header.nextindex; i++) {
|
||||
if (stbl[i] < 0) {
|
||||
jfs_err("jfs: add_missing_indices: Invalid stbl[%d] = %d for inode %ld, block = %lld",
|
||||
i, stbl[i], (long)inode->i_ino, (long long)bn);
|
||||
rc = -EIO;
|
||||
|
||||
DT_PUTPAGE(mp);
|
||||
txAbort(tid, 0);
|
||||
goto end;
|
||||
}
|
||||
|
||||
d = (struct ldtentry *) &p->slot[stbl[i]];
|
||||
index = le32_to_cpu(d->index);
|
||||
if ((index < 2) || (index >= JFS_IP(inode)->next_index)) {
|
||||
@@ -2960,6 +2970,7 @@ static void add_missing_indices(struct inode *inode, s64 bn)
|
||||
(void) txCommit(tid, 1, &inode, 0);
|
||||
end:
|
||||
txEnd(tid);
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3313,7 +3324,8 @@ skip_one:
|
||||
}
|
||||
|
||||
if (fix_page) {
|
||||
add_missing_indices(ip, bn);
|
||||
if ((rc = add_missing_indices(ip, bn)))
|
||||
goto out;
|
||||
page_fixed = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -248,6 +248,12 @@ static inline void atm_account_tx(struct atm_vcc *vcc, struct sk_buff *skb)
|
||||
ATM_SKB(skb)->atm_options = vcc->atm_options;
|
||||
}
|
||||
|
||||
static inline void atm_return_tx(struct atm_vcc *vcc, struct sk_buff *skb)
|
||||
{
|
||||
WARN_ON_ONCE(refcount_sub_and_test(ATM_SKB(skb)->acct_truesize,
|
||||
&sk_atm(vcc)->sk_wmem_alloc));
|
||||
}
|
||||
|
||||
static inline void atm_force_charge(struct atm_vcc *vcc,int truesize)
|
||||
{
|
||||
atomic_add(truesize, &sk_atm(vcc)->sk_rmem_alloc);
|
||||
|
||||
@@ -669,8 +669,9 @@ struct hid_descriptor {
|
||||
__le16 bcdHID;
|
||||
__u8 bCountryCode;
|
||||
__u8 bNumDescriptors;
|
||||
struct hid_class_descriptor rpt_desc;
|
||||
|
||||
struct hid_class_descriptor desc[1];
|
||||
struct hid_class_descriptor opt_descs[];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#define HID_DEVICE(b, g, ven, prod) \
|
||||
|
||||
@@ -635,6 +635,7 @@ int vcc_sendmsg(struct socket *sock, struct msghdr *m, size_t size)
|
||||
|
||||
skb->dev = NULL; /* for paths shared with net_device interfaces */
|
||||
if (!copy_from_iter_full(skb_put(skb, size), size, &m->msg_iter)) {
|
||||
atm_return_tx(vcc, skb);
|
||||
kfree_skb(skb);
|
||||
error = -EFAULT;
|
||||
goto out;
|
||||
|
||||
@@ -36,7 +36,7 @@ static void atm_pop_raw(struct atm_vcc *vcc, struct sk_buff *skb)
|
||||
|
||||
pr_debug("(%d) %d -= %d\n",
|
||||
vcc->vci, sk_wmem_alloc_get(sk), ATM_SKB(skb)->acct_truesize);
|
||||
WARN_ON(refcount_sub_and_test(ATM_SKB(skb)->acct_truesize, &sk->sk_wmem_alloc));
|
||||
atm_return_tx(vcc, skb);
|
||||
dev_kfree_skb_any(skb);
|
||||
sk->sk_write_space(sk);
|
||||
}
|
||||
|
||||
@@ -3451,7 +3451,7 @@ static int assign_proto_idx(struct proto *prot)
|
||||
{
|
||||
prot->inuse_idx = find_first_zero_bit(proto_inuse_idx, PROTO_INUSE_NR);
|
||||
|
||||
if (unlikely(prot->inuse_idx == PROTO_INUSE_NR - 1)) {
|
||||
if (unlikely(prot->inuse_idx == PROTO_INUSE_NR)) {
|
||||
pr_err("PROTO_INUSE_NR exhausted\n");
|
||||
return -ENOSPC;
|
||||
}
|
||||
@@ -3462,7 +3462,7 @@ static int assign_proto_idx(struct proto *prot)
|
||||
|
||||
static void release_proto_idx(struct proto *prot)
|
||||
{
|
||||
if (prot->inuse_idx != PROTO_INUSE_NR - 1)
|
||||
if (prot->inuse_idx != PROTO_INUSE_NR)
|
||||
clear_bit(prot->inuse_idx, proto_inuse_idx);
|
||||
}
|
||||
#else
|
||||
|
||||
@@ -197,7 +197,11 @@ const __u8 ip_tos2prio[16] = {
|
||||
EXPORT_SYMBOL(ip_tos2prio);
|
||||
|
||||
static DEFINE_PER_CPU(struct rt_cache_stat, rt_cache_stat);
|
||||
#ifndef CONFIG_PREEMPT_RT
|
||||
#define RT_CACHE_STAT_INC(field) raw_cpu_inc(rt_cache_stat.field)
|
||||
#else
|
||||
#define RT_CACHE_STAT_INC(field) this_cpu_inc(rt_cache_stat.field)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
static void *rt_cache_seq_start(struct seq_file *seq, loff_t *pos)
|
||||
|
||||
@@ -641,10 +641,12 @@ EXPORT_SYMBOL(tcp_initialize_rcv_mss);
|
||||
*/
|
||||
static void tcp_rcv_rtt_update(struct tcp_sock *tp, u32 sample, int win_dep)
|
||||
{
|
||||
u32 new_sample = tp->rcv_rtt_est.rtt_us;
|
||||
long m = sample;
|
||||
u32 new_sample, old_sample = tp->rcv_rtt_est.rtt_us;
|
||||
long m = sample << 3;
|
||||
|
||||
if (new_sample != 0) {
|
||||
if (old_sample == 0 || m < old_sample) {
|
||||
new_sample = m;
|
||||
} else {
|
||||
/* If we sample in larger samples in the non-timestamp
|
||||
* case, we could grossly overestimate the RTT especially
|
||||
* with chatty applications or bulk transfer apps which
|
||||
@@ -655,17 +657,9 @@ static void tcp_rcv_rtt_update(struct tcp_sock *tp, u32 sample, int win_dep)
|
||||
* else with timestamps disabled convergence takes too
|
||||
* long.
|
||||
*/
|
||||
if (!win_dep) {
|
||||
m -= (new_sample >> 3);
|
||||
new_sample += m;
|
||||
} else {
|
||||
m <<= 3;
|
||||
if (m < new_sample)
|
||||
new_sample = m;
|
||||
}
|
||||
} else {
|
||||
/* No previous measure. */
|
||||
new_sample = m << 3;
|
||||
if (win_dep)
|
||||
return;
|
||||
new_sample = old_sample - (old_sample >> 3) + sample;
|
||||
}
|
||||
|
||||
tp->rcv_rtt_est.rtt_us = new_sample;
|
||||
@@ -6520,6 +6514,9 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb)
|
||||
if (!tp->srtt_us)
|
||||
tcp_synack_rtt_meas(sk, req);
|
||||
|
||||
if (tp->rx_opt.tstamp_ok)
|
||||
tp->advmss -= TCPOLEN_TSTAMP_ALIGNED;
|
||||
|
||||
if (req) {
|
||||
tcp_rcv_synrecv_state_fastopen(sk);
|
||||
} else {
|
||||
@@ -6544,9 +6541,6 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb)
|
||||
tp->snd_wnd = ntohs(th->window) << tp->rx_opt.snd_wscale;
|
||||
tcp_init_wl(tp, TCP_SKB_CB(skb)->seq);
|
||||
|
||||
if (tp->rx_opt.tstamp_ok)
|
||||
tp->advmss -= TCPOLEN_TSTAMP_ALIGNED;
|
||||
|
||||
if (!inet_csk(sk)->icsk_ca_ops->cong_control)
|
||||
tcp_update_pacing_rate(sk);
|
||||
|
||||
|
||||
@@ -620,7 +620,7 @@ static void hwmp_preq_frame_process(struct ieee80211_sub_if_data *sdata,
|
||||
mesh_path_add_gate(mpath);
|
||||
}
|
||||
rcu_read_unlock();
|
||||
} else {
|
||||
} else if (ifmsh->mshcfg.dot11MeshForwarding) {
|
||||
rcu_read_lock();
|
||||
mpath = mesh_path_lookup(sdata, target_addr);
|
||||
if (mpath) {
|
||||
@@ -638,6 +638,8 @@ static void hwmp_preq_frame_process(struct ieee80211_sub_if_data *sdata,
|
||||
}
|
||||
}
|
||||
rcu_read_unlock();
|
||||
} else {
|
||||
forward = false;
|
||||
}
|
||||
|
||||
if (reply) {
|
||||
@@ -655,7 +657,7 @@ static void hwmp_preq_frame_process(struct ieee80211_sub_if_data *sdata,
|
||||
}
|
||||
}
|
||||
|
||||
if (forward && ifmsh->mshcfg.dot11MeshForwarding) {
|
||||
if (forward) {
|
||||
u32 preq_id;
|
||||
u8 hopcount;
|
||||
|
||||
|
||||
@@ -8838,7 +8838,8 @@ static void __sctp_write_space(struct sctp_association *asoc)
|
||||
wq = rcu_dereference(sk->sk_wq);
|
||||
if (wq) {
|
||||
if (waitqueue_active(&wq->wait))
|
||||
wake_up_interruptible(&wq->wait);
|
||||
wake_up_interruptible_poll(&wq->wait, EPOLLOUT |
|
||||
EPOLLWRNORM | EPOLLWRBAND);
|
||||
|
||||
/* Note that we try to include the Async I/O support
|
||||
* here by modeling from the current TCP/UDP code.
|
||||
|
||||
@@ -451,24 +451,21 @@ static int cache_clean(void)
|
||||
}
|
||||
}
|
||||
|
||||
spin_lock(¤t_detail->hash_lock);
|
||||
|
||||
/* find a non-empty bucket in the table */
|
||||
while (current_detail &&
|
||||
current_index < current_detail->hash_size &&
|
||||
while (current_index < current_detail->hash_size &&
|
||||
hlist_empty(¤t_detail->hash_table[current_index]))
|
||||
current_index++;
|
||||
|
||||
/* find a cleanable entry in the bucket and clean it, or set to next bucket */
|
||||
|
||||
if (current_detail && current_index < current_detail->hash_size) {
|
||||
if (current_index < current_detail->hash_size) {
|
||||
struct cache_head *ch = NULL;
|
||||
struct cache_detail *d;
|
||||
struct hlist_head *head;
|
||||
struct hlist_node *tmp;
|
||||
|
||||
spin_lock(¤t_detail->hash_lock);
|
||||
|
||||
/* Ok, now to clean this strand */
|
||||
|
||||
head = ¤t_detail->hash_table[current_index];
|
||||
hlist_for_each_entry_safe(ch, tmp, head, cache_list) {
|
||||
if (current_detail->nextcheck > ch->expiry_time)
|
||||
@@ -489,8 +486,10 @@ static int cache_clean(void)
|
||||
spin_unlock(&cache_list_lock);
|
||||
if (ch)
|
||||
sunrpc_end_cache_remove_entry(ch, d);
|
||||
} else
|
||||
} else {
|
||||
spin_unlock(¤t_detail->hash_lock);
|
||||
spin_unlock(&cache_list_lock);
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
@@ -419,7 +419,7 @@ static void tipc_aead_free(struct rcu_head *rp)
|
||||
}
|
||||
free_percpu(aead->tfm_entry);
|
||||
kfree_sensitive(aead->key);
|
||||
kfree(aead);
|
||||
kfree_sensitive(aead);
|
||||
}
|
||||
|
||||
static int tipc_aead_users(struct tipc_aead __rcu *aead)
|
||||
|
||||
@@ -95,7 +95,7 @@ static int selinux_xfrm_alloc_user(struct xfrm_sec_ctx **ctxp,
|
||||
|
||||
ctx->ctx_doi = XFRM_SC_DOI_LSM;
|
||||
ctx->ctx_alg = XFRM_SC_ALG_SELINUX;
|
||||
ctx->ctx_len = str_len;
|
||||
ctx->ctx_len = str_len + 1;
|
||||
memcpy(ctx->ctx_str, &uctx[1], str_len);
|
||||
ctx->ctx_str[str_len] = '\0';
|
||||
rc = security_context_to_sid(&selinux_state, ctx->ctx_str, str_len,
|
||||
|
||||
@@ -2295,6 +2295,8 @@ static const struct snd_pci_quirk power_save_denylist[] = {
|
||||
SND_PCI_QUIRK(0x1734, 0x1232, "KONTRON SinglePC", 0),
|
||||
/* Dell ALC3271 */
|
||||
SND_PCI_QUIRK(0x1028, 0x0962, "Dell ALC3271", 0),
|
||||
/* https://bugzilla.kernel.org/show_bug.cgi?id=220210 */
|
||||
SND_PCI_QUIRK(0x17aa, 0x5079, "Lenovo Thinkpad E15", 0),
|
||||
{}
|
||||
};
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
@@ -9151,6 +9151,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x1028, 0x0871, "Dell Precision 3630", ALC255_FIXUP_DELL_HEADSET_MIC),
|
||||
SND_PCI_QUIRK(0x1028, 0x0872, "Dell Precision 3630", ALC255_FIXUP_DELL_HEADSET_MIC),
|
||||
SND_PCI_QUIRK(0x1028, 0x0873, "Dell Precision 3930", ALC255_FIXUP_DUMMY_LINEOUT_VERB),
|
||||
SND_PCI_QUIRK(0x1028, 0x0879, "Dell Latitude 5420 Rugged", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1028, 0x08ad, "Dell WYSE AIO", ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1028, 0x08ae, "Dell WYSE NB", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1028, 0x0935, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB),
|
||||
|
||||
@@ -367,6 +367,13 @@ static const struct usbmix_name_map corsair_virtuoso_map[] = {
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
/* KTMicro USB */
|
||||
static struct usbmix_name_map s31b2_0022_map[] = {
|
||||
{ 23, "Speaker Playback" },
|
||||
{ 18, "Headphone Playback" },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
/* ASUS ROG Zenith II with Realtek ALC1220-VB */
|
||||
static const struct usbmix_name_map asus_zenith_ii_map[] = {
|
||||
{ 19, NULL, 12 }, /* FU, Input Gain Pad - broken response, disabled */
|
||||
@@ -649,6 +656,11 @@ static const struct usbmix_ctl_map usbmix_ctl_maps[] = {
|
||||
.id = USB_ID(0x1395, 0x0025),
|
||||
.map = sennheiser_pc8_map,
|
||||
},
|
||||
{
|
||||
/* KTMicro USB */
|
||||
.id = USB_ID(0X31b2, 0x0022),
|
||||
.map = s31b2_0022_map,
|
||||
},
|
||||
{ 0 } /* terminator */
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user