You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
Merge 5.10.90 into android12-5.10-lts
Changes in 5.10.90 Input: i8042 - add deferred probe support Input: i8042 - enable deferred probe quirk for ASUS UM325UA tomoyo: Check exceeded quota early in tomoyo_domain_quota_is_ok(). tomoyo: use hwight16() in tomoyo_domain_quota_is_ok() parisc: Clear stale IIR value on instruction access rights trap platform/x86: apple-gmux: use resource_size() with res memblock: fix memblock_phys_alloc() section mismatch error recordmcount.pl: fix typo in s390 mcount regex selinux: initialize proto variable in selinux_ip_postroute_compat() scsi: lpfc: Terminate string in lpfc_debugfs_nvmeio_trc_write() net/mlx5: DR, Fix NULL vs IS_ERR checking in dr_domain_init_resources net/mlx5e: Wrap the tx reporter dump callback to extract the sq net/mlx5e: Fix ICOSQ recovery flow for XSK udp: using datalen to cap ipv6 udp max gso segments selftests: Calculate udpgso segment count without header adjustment sctp: use call_rcu to free endpoint net/smc: fix using of uninitialized completions net: usb: pegasus: Do not drop long Ethernet frames net: ag71xx: Fix a potential double free in error handling paths net: lantiq_xrx200: fix statistics of received bytes NFC: st21nfca: Fix memory leak in device probe and remove net/smc: improved fix wait on already cleared link net/smc: don't send CDC/LLC message if link not ready net/smc: fix kernel panic caused by race of smc_sock igc: Fix TX timestamp support for non-MSI-X platforms ionic: Initialize the 'lif->dbid_inuse' bitmap net/mlx5e: Fix wrong features assignment in case of error selftests/net: udpgso_bench_tx: fix dst ip argument net/ncsi: check for error return from call to nla_put_u32 fsl/fman: Fix missing put_device() call in fman_port_probe i2c: validate user data in compat ioctl nfc: uapi: use kernel size_t to fix user-space builds uapi: fix linux/nfc.h userspace compilation errors drm/amdgpu: When the VCN(1.0) block is suspended, powergating is explicitly enabled drm/amdgpu: add support for IP discovery gc_info table v2 xhci: Fresco FL1100 controller should not have BROKEN_MSI quirk set. usb: gadget: f_fs: Clear ffs_eventfd in ffs_data_clear. usb: mtu3: add memory barrier before set GPD's HWO usb: mtu3: fix list_head check warning usb: mtu3: set interval of FS intr and isoc endpoint binder: fix async_free_space accounting for empty parcels scsi: vmw_pvscsi: Set residual data length conditionally Input: appletouch - initialize work before device registration Input: spaceball - fix parsing of movement data packets net: fix use-after-free in tw_timer_handler perf script: Fix CPU filtering of a script's switch events bpf: Add kconfig knob for disabling unpriv bpf by default Linux 5.10.90 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I299d1e939d3b01b5d6f34f7b9ec701d624bbfde3
This commit is contained in:
@@ -1654,6 +1654,8 @@
|
||||
architectures force reset to be always executed
|
||||
i8042.unlock [HW] Unlock (ignore) the keylock
|
||||
i8042.kbdreset [HW] Reset device connected to KBD port
|
||||
i8042.probe_defer
|
||||
[HW] Allow deferred probing upon i8042 probe errors
|
||||
|
||||
i810= [HW,DRM]
|
||||
|
||||
|
||||
@@ -1457,11 +1457,22 @@ unprivileged_bpf_disabled
|
||||
=========================
|
||||
|
||||
Writing 1 to this entry will disable unprivileged calls to ``bpf()``;
|
||||
once disabled, calling ``bpf()`` without ``CAP_SYS_ADMIN`` will return
|
||||
``-EPERM``.
|
||||
once disabled, calling ``bpf()`` without ``CAP_SYS_ADMIN`` or ``CAP_BPF``
|
||||
will return ``-EPERM``. Once set to 1, this can't be cleared from the
|
||||
running kernel anymore.
|
||||
|
||||
Once set, this can't be cleared.
|
||||
Writing 2 to this entry will also disable unprivileged calls to ``bpf()``,
|
||||
however, an admin can still change this setting later on, if needed, by
|
||||
writing 0 or 1 to this entry.
|
||||
|
||||
If ``BPF_UNPRIV_DEFAULT_OFF`` is enabled in the kernel config, then this
|
||||
entry will default to 2 instead of 0.
|
||||
|
||||
= =============================================================
|
||||
0 Unprivileged calls to ``bpf()`` are enabled
|
||||
1 Unprivileged calls to ``bpf()`` are disabled without recovery
|
||||
2 Unprivileged calls to ``bpf()`` are disabled
|
||||
= =============================================================
|
||||
|
||||
watchdog
|
||||
========
|
||||
|
||||
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 10
|
||||
SUBLEVEL = 89
|
||||
SUBLEVEL = 90
|
||||
EXTRAVERSION =
|
||||
NAME = Dare mighty things
|
||||
|
||||
|
||||
@@ -729,6 +729,8 @@ void notrace handle_interruption(int code, struct pt_regs *regs)
|
||||
}
|
||||
mmap_read_unlock(current->mm);
|
||||
}
|
||||
/* CPU could not fetch instruction, so clear stale IIR value. */
|
||||
regs->iir = 0xbaadf00d;
|
||||
fallthrough;
|
||||
case 27:
|
||||
/* Data memory protection ID trap */
|
||||
|
||||
@@ -673,7 +673,7 @@ static void binder_free_buf_locked(struct binder_alloc *alloc,
|
||||
BUG_ON(buffer->user_data > alloc->buffer + alloc->buffer_size);
|
||||
|
||||
if (buffer->async_transaction) {
|
||||
alloc->free_async_space += size + sizeof(struct binder_buffer);
|
||||
alloc->free_async_space += buffer_size + sizeof(struct binder_buffer);
|
||||
|
||||
binder_alloc_debug(BINDER_DEBUG_BUFFER_ALLOC_ASYNC,
|
||||
"%d: binder_free_buf size %zd async free %zd\n",
|
||||
|
||||
@@ -372,10 +372,15 @@ int amdgpu_discovery_get_ip_version(struct amdgpu_device *adev, int hw_id,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
union gc_info {
|
||||
struct gc_info_v1_0 v1;
|
||||
struct gc_info_v2_0 v2;
|
||||
};
|
||||
|
||||
int amdgpu_discovery_get_gfx_info(struct amdgpu_device *adev)
|
||||
{
|
||||
struct binary_header *bhdr;
|
||||
struct gc_info_v1_0 *gc_info;
|
||||
union gc_info *gc_info;
|
||||
|
||||
if (!adev->mman.discovery_bin) {
|
||||
DRM_ERROR("ip discovery uninitialized\n");
|
||||
@@ -383,27 +388,54 @@ int amdgpu_discovery_get_gfx_info(struct amdgpu_device *adev)
|
||||
}
|
||||
|
||||
bhdr = (struct binary_header *)adev->mman.discovery_bin;
|
||||
gc_info = (struct gc_info_v1_0 *)(adev->mman.discovery_bin +
|
||||
gc_info = (union gc_info *)(adev->mman.discovery_bin +
|
||||
le16_to_cpu(bhdr->table_list[GC].offset));
|
||||
|
||||
adev->gfx.config.max_shader_engines = le32_to_cpu(gc_info->gc_num_se);
|
||||
adev->gfx.config.max_cu_per_sh = 2 * (le32_to_cpu(gc_info->gc_num_wgp0_per_sa) +
|
||||
le32_to_cpu(gc_info->gc_num_wgp1_per_sa));
|
||||
adev->gfx.config.max_sh_per_se = le32_to_cpu(gc_info->gc_num_sa_per_se);
|
||||
adev->gfx.config.max_backends_per_se = le32_to_cpu(gc_info->gc_num_rb_per_se);
|
||||
adev->gfx.config.max_texture_channel_caches = le32_to_cpu(gc_info->gc_num_gl2c);
|
||||
adev->gfx.config.max_gprs = le32_to_cpu(gc_info->gc_num_gprs);
|
||||
adev->gfx.config.max_gs_threads = le32_to_cpu(gc_info->gc_num_max_gs_thds);
|
||||
adev->gfx.config.gs_vgt_table_depth = le32_to_cpu(gc_info->gc_gs_table_depth);
|
||||
adev->gfx.config.gs_prim_buffer_depth = le32_to_cpu(gc_info->gc_gsprim_buff_depth);
|
||||
adev->gfx.config.double_offchip_lds_buf = le32_to_cpu(gc_info->gc_double_offchip_lds_buffer);
|
||||
adev->gfx.cu_info.wave_front_size = le32_to_cpu(gc_info->gc_wave_size);
|
||||
adev->gfx.cu_info.max_waves_per_simd = le32_to_cpu(gc_info->gc_max_waves_per_simd);
|
||||
adev->gfx.cu_info.max_scratch_slots_per_cu = le32_to_cpu(gc_info->gc_max_scratch_slots_per_cu);
|
||||
adev->gfx.cu_info.lds_size = le32_to_cpu(gc_info->gc_lds_size);
|
||||
adev->gfx.config.num_sc_per_sh = le32_to_cpu(gc_info->gc_num_sc_per_se) /
|
||||
le32_to_cpu(gc_info->gc_num_sa_per_se);
|
||||
adev->gfx.config.num_packer_per_sc = le32_to_cpu(gc_info->gc_num_packer_per_sc);
|
||||
|
||||
switch (gc_info->v1.header.version_major) {
|
||||
case 1:
|
||||
adev->gfx.config.max_shader_engines = le32_to_cpu(gc_info->v1.gc_num_se);
|
||||
adev->gfx.config.max_cu_per_sh = 2 * (le32_to_cpu(gc_info->v1.gc_num_wgp0_per_sa) +
|
||||
le32_to_cpu(gc_info->v1.gc_num_wgp1_per_sa));
|
||||
adev->gfx.config.max_sh_per_se = le32_to_cpu(gc_info->v1.gc_num_sa_per_se);
|
||||
adev->gfx.config.max_backends_per_se = le32_to_cpu(gc_info->v1.gc_num_rb_per_se);
|
||||
adev->gfx.config.max_texture_channel_caches = le32_to_cpu(gc_info->v1.gc_num_gl2c);
|
||||
adev->gfx.config.max_gprs = le32_to_cpu(gc_info->v1.gc_num_gprs);
|
||||
adev->gfx.config.max_gs_threads = le32_to_cpu(gc_info->v1.gc_num_max_gs_thds);
|
||||
adev->gfx.config.gs_vgt_table_depth = le32_to_cpu(gc_info->v1.gc_gs_table_depth);
|
||||
adev->gfx.config.gs_prim_buffer_depth = le32_to_cpu(gc_info->v1.gc_gsprim_buff_depth);
|
||||
adev->gfx.config.double_offchip_lds_buf = le32_to_cpu(gc_info->v1.gc_double_offchip_lds_buffer);
|
||||
adev->gfx.cu_info.wave_front_size = le32_to_cpu(gc_info->v1.gc_wave_size);
|
||||
adev->gfx.cu_info.max_waves_per_simd = le32_to_cpu(gc_info->v1.gc_max_waves_per_simd);
|
||||
adev->gfx.cu_info.max_scratch_slots_per_cu = le32_to_cpu(gc_info->v1.gc_max_scratch_slots_per_cu);
|
||||
adev->gfx.cu_info.lds_size = le32_to_cpu(gc_info->v1.gc_lds_size);
|
||||
adev->gfx.config.num_sc_per_sh = le32_to_cpu(gc_info->v1.gc_num_sc_per_se) /
|
||||
le32_to_cpu(gc_info->v1.gc_num_sa_per_se);
|
||||
adev->gfx.config.num_packer_per_sc = le32_to_cpu(gc_info->v1.gc_num_packer_per_sc);
|
||||
break;
|
||||
case 2:
|
||||
adev->gfx.config.max_shader_engines = le32_to_cpu(gc_info->v2.gc_num_se);
|
||||
adev->gfx.config.max_cu_per_sh = le32_to_cpu(gc_info->v2.gc_num_cu_per_sh);
|
||||
adev->gfx.config.max_sh_per_se = le32_to_cpu(gc_info->v2.gc_num_sh_per_se);
|
||||
adev->gfx.config.max_backends_per_se = le32_to_cpu(gc_info->v2.gc_num_rb_per_se);
|
||||
adev->gfx.config.max_texture_channel_caches = le32_to_cpu(gc_info->v2.gc_num_tccs);
|
||||
adev->gfx.config.max_gprs = le32_to_cpu(gc_info->v2.gc_num_gprs);
|
||||
adev->gfx.config.max_gs_threads = le32_to_cpu(gc_info->v2.gc_num_max_gs_thds);
|
||||
adev->gfx.config.gs_vgt_table_depth = le32_to_cpu(gc_info->v2.gc_gs_table_depth);
|
||||
adev->gfx.config.gs_prim_buffer_depth = le32_to_cpu(gc_info->v2.gc_gsprim_buff_depth);
|
||||
adev->gfx.config.double_offchip_lds_buf = le32_to_cpu(gc_info->v2.gc_double_offchip_lds_buffer);
|
||||
adev->gfx.cu_info.wave_front_size = le32_to_cpu(gc_info->v2.gc_wave_size);
|
||||
adev->gfx.cu_info.max_waves_per_simd = le32_to_cpu(gc_info->v2.gc_max_waves_per_simd);
|
||||
adev->gfx.cu_info.max_scratch_slots_per_cu = le32_to_cpu(gc_info->v2.gc_max_scratch_slots_per_cu);
|
||||
adev->gfx.cu_info.lds_size = le32_to_cpu(gc_info->v2.gc_lds_size);
|
||||
adev->gfx.config.num_sc_per_sh = le32_to_cpu(gc_info->v2.gc_num_sc_per_se) /
|
||||
le32_to_cpu(gc_info->v2.gc_num_sh_per_se);
|
||||
adev->gfx.config.num_packer_per_sc = le32_to_cpu(gc_info->v2.gc_num_packer_per_sc);
|
||||
break;
|
||||
default:
|
||||
dev_err(adev->dev,
|
||||
"Unhandled GC info table %d.%d\n",
|
||||
gc_info->v1.header.version_major,
|
||||
gc_info->v1.header.version_minor);
|
||||
return -EINVAL;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -254,6 +254,13 @@ static int vcn_v1_0_suspend(void *handle)
|
||||
{
|
||||
int r;
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
bool idle_work_unexecuted;
|
||||
|
||||
idle_work_unexecuted = cancel_delayed_work_sync(&adev->vcn.idle_work);
|
||||
if (idle_work_unexecuted) {
|
||||
if (adev->pm.dpm_enabled)
|
||||
amdgpu_dpm_enable_uvd(adev, false);
|
||||
}
|
||||
|
||||
r = vcn_v1_0_hw_fini(adev);
|
||||
if (r)
|
||||
|
||||
@@ -143,6 +143,55 @@ struct gc_info_v1_0 {
|
||||
uint32_t gc_num_gl2a;
|
||||
};
|
||||
|
||||
struct gc_info_v1_1 {
|
||||
struct gpu_info_header header;
|
||||
|
||||
uint32_t gc_num_se;
|
||||
uint32_t gc_num_wgp0_per_sa;
|
||||
uint32_t gc_num_wgp1_per_sa;
|
||||
uint32_t gc_num_rb_per_se;
|
||||
uint32_t gc_num_gl2c;
|
||||
uint32_t gc_num_gprs;
|
||||
uint32_t gc_num_max_gs_thds;
|
||||
uint32_t gc_gs_table_depth;
|
||||
uint32_t gc_gsprim_buff_depth;
|
||||
uint32_t gc_parameter_cache_depth;
|
||||
uint32_t gc_double_offchip_lds_buffer;
|
||||
uint32_t gc_wave_size;
|
||||
uint32_t gc_max_waves_per_simd;
|
||||
uint32_t gc_max_scratch_slots_per_cu;
|
||||
uint32_t gc_lds_size;
|
||||
uint32_t gc_num_sc_per_se;
|
||||
uint32_t gc_num_sa_per_se;
|
||||
uint32_t gc_num_packer_per_sc;
|
||||
uint32_t gc_num_gl2a;
|
||||
uint32_t gc_num_tcp_per_sa;
|
||||
uint32_t gc_num_sdp_interface;
|
||||
uint32_t gc_num_tcps;
|
||||
};
|
||||
|
||||
struct gc_info_v2_0 {
|
||||
struct gpu_info_header header;
|
||||
|
||||
uint32_t gc_num_se;
|
||||
uint32_t gc_num_cu_per_sh;
|
||||
uint32_t gc_num_sh_per_se;
|
||||
uint32_t gc_num_rb_per_se;
|
||||
uint32_t gc_num_tccs;
|
||||
uint32_t gc_num_gprs;
|
||||
uint32_t gc_num_max_gs_thds;
|
||||
uint32_t gc_gs_table_depth;
|
||||
uint32_t gc_gsprim_buff_depth;
|
||||
uint32_t gc_parameter_cache_depth;
|
||||
uint32_t gc_double_offchip_lds_buffer;
|
||||
uint32_t gc_wave_size;
|
||||
uint32_t gc_max_waves_per_simd;
|
||||
uint32_t gc_max_scratch_slots_per_cu;
|
||||
uint32_t gc_lds_size;
|
||||
uint32_t gc_num_sc_per_se;
|
||||
uint32_t gc_num_packer_per_sc;
|
||||
};
|
||||
|
||||
typedef struct harvest_info_header {
|
||||
uint32_t signature; /* Table Signature */
|
||||
uint32_t version; /* Table Version */
|
||||
|
||||
@@ -536,6 +536,9 @@ static long compat_i2cdev_ioctl(struct file *file, unsigned int cmd, unsigned lo
|
||||
sizeof(rdwr_arg)))
|
||||
return -EFAULT;
|
||||
|
||||
if (!rdwr_arg.msgs || rdwr_arg.nmsgs == 0)
|
||||
return -EINVAL;
|
||||
|
||||
if (rdwr_arg.nmsgs > I2C_RDWR_IOCTL_MAX_MSGS)
|
||||
return -EINVAL;
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/serio.h>
|
||||
#include <asm/unaligned.h>
|
||||
|
||||
#define DRIVER_DESC "SpaceTec SpaceBall 2003/3003/4000 FLX driver"
|
||||
|
||||
@@ -75,9 +76,15 @@ static void spaceball_process_packet(struct spaceball* spaceball)
|
||||
|
||||
case 'D': /* Ball data */
|
||||
if (spaceball->idx != 15) return;
|
||||
for (i = 0; i < 6; i++)
|
||||
/*
|
||||
* Skip first three bytes; read six axes worth of data.
|
||||
* Axis values are signed 16-bit big-endian.
|
||||
*/
|
||||
data += 3;
|
||||
for (i = 0; i < ARRAY_SIZE(spaceball_axes); i++) {
|
||||
input_report_abs(dev, spaceball_axes[i],
|
||||
(__s16)((data[2 * i + 3] << 8) | data[2 * i + 2]));
|
||||
(__s16)get_unaligned_be16(&data[i * 2]));
|
||||
}
|
||||
break;
|
||||
|
||||
case 'K': /* Button data */
|
||||
|
||||
@@ -916,6 +916,8 @@ static int atp_probe(struct usb_interface *iface,
|
||||
set_bit(BTN_TOOL_TRIPLETAP, input_dev->keybit);
|
||||
set_bit(BTN_LEFT, input_dev->keybit);
|
||||
|
||||
INIT_WORK(&dev->work, atp_reinit);
|
||||
|
||||
error = input_register_device(dev->input);
|
||||
if (error)
|
||||
goto err_free_buffer;
|
||||
@@ -923,8 +925,6 @@ static int atp_probe(struct usb_interface *iface,
|
||||
/* save our data pointer in this interface device */
|
||||
usb_set_intfdata(iface, dev);
|
||||
|
||||
INIT_WORK(&dev->work, atp_reinit);
|
||||
|
||||
return 0;
|
||||
|
||||
err_free_buffer:
|
||||
|
||||
@@ -995,6 +995,24 @@ static const struct dmi_system_id __initconst i8042_dmi_kbdreset_table[] = {
|
||||
{ }
|
||||
};
|
||||
|
||||
static const struct dmi_system_id i8042_dmi_probe_defer_table[] __initconst = {
|
||||
{
|
||||
/* ASUS ZenBook UX425UA */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "ZenBook UX425UA"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* ASUS ZenBook UM325UA */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "ZenBook UX325UA_UM325UA"),
|
||||
},
|
||||
},
|
||||
{ }
|
||||
};
|
||||
|
||||
#endif /* CONFIG_X86 */
|
||||
|
||||
#ifdef CONFIG_PNP
|
||||
@@ -1315,6 +1333,9 @@ static int __init i8042_platform_init(void)
|
||||
if (dmi_check_system(i8042_dmi_kbdreset_table))
|
||||
i8042_kbdreset = true;
|
||||
|
||||
if (dmi_check_system(i8042_dmi_probe_defer_table))
|
||||
i8042_probe_defer = true;
|
||||
|
||||
/*
|
||||
* A20 was already enabled during early kernel init. But some buggy
|
||||
* BIOSes (in MSI Laptops) require A20 to be enabled using 8042 to
|
||||
|
||||
@@ -45,6 +45,10 @@ static bool i8042_unlock;
|
||||
module_param_named(unlock, i8042_unlock, bool, 0);
|
||||
MODULE_PARM_DESC(unlock, "Ignore keyboard lock.");
|
||||
|
||||
static bool i8042_probe_defer;
|
||||
module_param_named(probe_defer, i8042_probe_defer, bool, 0);
|
||||
MODULE_PARM_DESC(probe_defer, "Allow deferred probing.");
|
||||
|
||||
enum i8042_controller_reset_mode {
|
||||
I8042_RESET_NEVER,
|
||||
I8042_RESET_ALWAYS,
|
||||
@@ -711,7 +715,7 @@ static int i8042_set_mux_mode(bool multiplex, unsigned char *mux_version)
|
||||
* LCS/Telegraphics.
|
||||
*/
|
||||
|
||||
static int __init i8042_check_mux(void)
|
||||
static int i8042_check_mux(void)
|
||||
{
|
||||
unsigned char mux_version;
|
||||
|
||||
@@ -740,10 +744,10 @@ static int __init i8042_check_mux(void)
|
||||
/*
|
||||
* The following is used to test AUX IRQ delivery.
|
||||
*/
|
||||
static struct completion i8042_aux_irq_delivered __initdata;
|
||||
static bool i8042_irq_being_tested __initdata;
|
||||
static struct completion i8042_aux_irq_delivered;
|
||||
static bool i8042_irq_being_tested;
|
||||
|
||||
static irqreturn_t __init i8042_aux_test_irq(int irq, void *dev_id)
|
||||
static irqreturn_t i8042_aux_test_irq(int irq, void *dev_id)
|
||||
{
|
||||
unsigned long flags;
|
||||
unsigned char str, data;
|
||||
@@ -770,7 +774,7 @@ static irqreturn_t __init i8042_aux_test_irq(int irq, void *dev_id)
|
||||
* verifies success by readinng CTR. Used when testing for presence of AUX
|
||||
* port.
|
||||
*/
|
||||
static int __init i8042_toggle_aux(bool on)
|
||||
static int i8042_toggle_aux(bool on)
|
||||
{
|
||||
unsigned char param;
|
||||
int i;
|
||||
@@ -798,7 +802,7 @@ static int __init i8042_toggle_aux(bool on)
|
||||
* the presence of an AUX interface.
|
||||
*/
|
||||
|
||||
static int __init i8042_check_aux(void)
|
||||
static int i8042_check_aux(void)
|
||||
{
|
||||
int retval = -1;
|
||||
bool irq_registered = false;
|
||||
@@ -1005,7 +1009,7 @@ static int i8042_controller_init(void)
|
||||
|
||||
if (i8042_command(&ctr[n++ % 2], I8042_CMD_CTL_RCTR)) {
|
||||
pr_err("Can't read CTR while initializing i8042\n");
|
||||
return -EIO;
|
||||
return i8042_probe_defer ? -EPROBE_DEFER : -EIO;
|
||||
}
|
||||
|
||||
} while (n < 2 || ctr[0] != ctr[1]);
|
||||
@@ -1320,7 +1324,7 @@ static void i8042_shutdown(struct platform_device *dev)
|
||||
i8042_controller_reset(false);
|
||||
}
|
||||
|
||||
static int __init i8042_create_kbd_port(void)
|
||||
static int i8042_create_kbd_port(void)
|
||||
{
|
||||
struct serio *serio;
|
||||
struct i8042_port *port = &i8042_ports[I8042_KBD_PORT_NO];
|
||||
@@ -1349,7 +1353,7 @@ static int __init i8042_create_kbd_port(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __init i8042_create_aux_port(int idx)
|
||||
static int i8042_create_aux_port(int idx)
|
||||
{
|
||||
struct serio *serio;
|
||||
int port_no = idx < 0 ? I8042_AUX_PORT_NO : I8042_MUX_PORT_NO + idx;
|
||||
@@ -1386,13 +1390,13 @@ static int __init i8042_create_aux_port(int idx)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __init i8042_free_kbd_port(void)
|
||||
static void i8042_free_kbd_port(void)
|
||||
{
|
||||
kfree(i8042_ports[I8042_KBD_PORT_NO].serio);
|
||||
i8042_ports[I8042_KBD_PORT_NO].serio = NULL;
|
||||
}
|
||||
|
||||
static void __init i8042_free_aux_ports(void)
|
||||
static void i8042_free_aux_ports(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -1402,7 +1406,7 @@ static void __init i8042_free_aux_ports(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void __init i8042_register_ports(void)
|
||||
static void i8042_register_ports(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -1443,7 +1447,7 @@ static void i8042_free_irqs(void)
|
||||
i8042_aux_irq_registered = i8042_kbd_irq_registered = false;
|
||||
}
|
||||
|
||||
static int __init i8042_setup_aux(void)
|
||||
static int i8042_setup_aux(void)
|
||||
{
|
||||
int (*aux_enable)(void);
|
||||
int error;
|
||||
@@ -1485,7 +1489,7 @@ static int __init i8042_setup_aux(void)
|
||||
return error;
|
||||
}
|
||||
|
||||
static int __init i8042_setup_kbd(void)
|
||||
static int i8042_setup_kbd(void)
|
||||
{
|
||||
int error;
|
||||
|
||||
@@ -1535,7 +1539,7 @@ static int i8042_kbd_bind_notifier(struct notifier_block *nb,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __init i8042_probe(struct platform_device *dev)
|
||||
static int i8042_probe(struct platform_device *dev)
|
||||
{
|
||||
int error;
|
||||
|
||||
@@ -1600,6 +1604,7 @@ static struct platform_driver i8042_driver = {
|
||||
.pm = &i8042_pm_ops,
|
||||
#endif
|
||||
},
|
||||
.probe = i8042_probe,
|
||||
.remove = i8042_remove,
|
||||
.shutdown = i8042_shutdown,
|
||||
};
|
||||
@@ -1610,7 +1615,6 @@ static struct notifier_block i8042_kbd_bind_notifier_block = {
|
||||
|
||||
static int __init i8042_init(void)
|
||||
{
|
||||
struct platform_device *pdev;
|
||||
int err;
|
||||
|
||||
dbg_init();
|
||||
@@ -1626,17 +1630,29 @@ static int __init i8042_init(void)
|
||||
/* Set this before creating the dev to allow i8042_command to work right away */
|
||||
i8042_present = true;
|
||||
|
||||
pdev = platform_create_bundle(&i8042_driver, i8042_probe, NULL, 0, NULL, 0);
|
||||
if (IS_ERR(pdev)) {
|
||||
err = PTR_ERR(pdev);
|
||||
err = platform_driver_register(&i8042_driver);
|
||||
if (err)
|
||||
goto err_platform_exit;
|
||||
|
||||
i8042_platform_device = platform_device_alloc("i8042", -1);
|
||||
if (!i8042_platform_device) {
|
||||
err = -ENOMEM;
|
||||
goto err_unregister_driver;
|
||||
}
|
||||
|
||||
err = platform_device_add(i8042_platform_device);
|
||||
if (err)
|
||||
goto err_free_device;
|
||||
|
||||
bus_register_notifier(&serio_bus, &i8042_kbd_bind_notifier_block);
|
||||
panic_blink = i8042_panic_blink;
|
||||
|
||||
return 0;
|
||||
|
||||
err_free_device:
|
||||
platform_device_put(i8042_platform_device);
|
||||
err_unregister_driver:
|
||||
platform_driver_unregister(&i8042_driver);
|
||||
err_platform_exit:
|
||||
i8042_platform_exit();
|
||||
return err;
|
||||
|
||||
@@ -1904,15 +1904,12 @@ static int ag71xx_probe(struct platform_device *pdev)
|
||||
ag->mac_reset = devm_reset_control_get(&pdev->dev, "mac");
|
||||
if (IS_ERR(ag->mac_reset)) {
|
||||
netif_err(ag, probe, ndev, "missing mac reset\n");
|
||||
err = PTR_ERR(ag->mac_reset);
|
||||
goto err_free;
|
||||
return PTR_ERR(ag->mac_reset);
|
||||
}
|
||||
|
||||
ag->mac_base = devm_ioremap(&pdev->dev, res->start, resource_size(res));
|
||||
if (!ag->mac_base) {
|
||||
err = -ENOMEM;
|
||||
goto err_free;
|
||||
}
|
||||
if (!ag->mac_base)
|
||||
return -ENOMEM;
|
||||
|
||||
ndev->irq = platform_get_irq(pdev, 0);
|
||||
err = devm_request_irq(&pdev->dev, ndev->irq, ag71xx_interrupt,
|
||||
@@ -1920,7 +1917,7 @@ static int ag71xx_probe(struct platform_device *pdev)
|
||||
if (err) {
|
||||
netif_err(ag, probe, ndev, "unable to request IRQ %d\n",
|
||||
ndev->irq);
|
||||
goto err_free;
|
||||
return err;
|
||||
}
|
||||
|
||||
ndev->netdev_ops = &ag71xx_netdev_ops;
|
||||
@@ -1948,10 +1945,8 @@ static int ag71xx_probe(struct platform_device *pdev)
|
||||
ag->stop_desc = dmam_alloc_coherent(&pdev->dev,
|
||||
sizeof(struct ag71xx_desc),
|
||||
&ag->stop_desc_dma, GFP_KERNEL);
|
||||
if (!ag->stop_desc) {
|
||||
err = -ENOMEM;
|
||||
goto err_free;
|
||||
}
|
||||
if (!ag->stop_desc)
|
||||
return -ENOMEM;
|
||||
|
||||
ag->stop_desc->data = 0;
|
||||
ag->stop_desc->ctrl = 0;
|
||||
@@ -1968,7 +1963,7 @@ static int ag71xx_probe(struct platform_device *pdev)
|
||||
err = of_get_phy_mode(np, &ag->phy_if_mode);
|
||||
if (err) {
|
||||
netif_err(ag, probe, ndev, "missing phy-mode property in DT\n");
|
||||
goto err_free;
|
||||
return err;
|
||||
}
|
||||
|
||||
netif_napi_add(ndev, &ag->napi, ag71xx_poll, AG71XX_NAPI_WEIGHT);
|
||||
@@ -1976,7 +1971,7 @@ static int ag71xx_probe(struct platform_device *pdev)
|
||||
err = clk_prepare_enable(ag->clk_eth);
|
||||
if (err) {
|
||||
netif_err(ag, probe, ndev, "Failed to enable eth clk.\n");
|
||||
goto err_free;
|
||||
return err;
|
||||
}
|
||||
|
||||
ag71xx_wr(ag, AG71XX_REG_MAC_CFG1, 0);
|
||||
@@ -2012,8 +2007,6 @@ err_mdio_remove:
|
||||
ag71xx_mdio_remove(ag);
|
||||
err_put_clk:
|
||||
clk_disable_unprepare(ag->clk_eth);
|
||||
err_free:
|
||||
free_netdev(ndev);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
@@ -1805,7 +1805,7 @@ static int fman_port_probe(struct platform_device *of_dev)
|
||||
fman = dev_get_drvdata(&fm_pdev->dev);
|
||||
if (!fman) {
|
||||
err = -EINVAL;
|
||||
goto return_err;
|
||||
goto put_device;
|
||||
}
|
||||
|
||||
err = of_property_read_u32(port_node, "cell-index", &val);
|
||||
@@ -1813,7 +1813,7 @@ static int fman_port_probe(struct platform_device *of_dev)
|
||||
dev_err(port->dev, "%s: reading cell-index for %pOF failed\n",
|
||||
__func__, port_node);
|
||||
err = -EINVAL;
|
||||
goto return_err;
|
||||
goto put_device;
|
||||
}
|
||||
port_id = (u8)val;
|
||||
port->dts_params.id = port_id;
|
||||
@@ -1847,7 +1847,7 @@ static int fman_port_probe(struct platform_device *of_dev)
|
||||
} else {
|
||||
dev_err(port->dev, "%s: Illegal port type\n", __func__);
|
||||
err = -EINVAL;
|
||||
goto return_err;
|
||||
goto put_device;
|
||||
}
|
||||
|
||||
port->dts_params.type = port_type;
|
||||
@@ -1861,7 +1861,7 @@ static int fman_port_probe(struct platform_device *of_dev)
|
||||
dev_err(port->dev, "%s: incorrect qman-channel-id\n",
|
||||
__func__);
|
||||
err = -EINVAL;
|
||||
goto return_err;
|
||||
goto put_device;
|
||||
}
|
||||
port->dts_params.qman_channel_id = qman_channel_id;
|
||||
}
|
||||
@@ -1871,7 +1871,7 @@ static int fman_port_probe(struct platform_device *of_dev)
|
||||
dev_err(port->dev, "%s: of_address_to_resource() failed\n",
|
||||
__func__);
|
||||
err = -ENOMEM;
|
||||
goto return_err;
|
||||
goto put_device;
|
||||
}
|
||||
|
||||
port->dts_params.fman = fman;
|
||||
@@ -1896,6 +1896,8 @@ static int fman_port_probe(struct platform_device *of_dev)
|
||||
|
||||
return 0;
|
||||
|
||||
put_device:
|
||||
put_device(&fm_pdev->dev);
|
||||
return_err:
|
||||
of_node_put(port_node);
|
||||
free_port:
|
||||
|
||||
@@ -4422,6 +4422,9 @@ static irqreturn_t igc_intr_msi(int irq, void *data)
|
||||
mod_timer(&adapter->watchdog_timer, jiffies + 1);
|
||||
}
|
||||
|
||||
if (icr & IGC_ICR_TS)
|
||||
igc_tsync_interrupt(adapter);
|
||||
|
||||
napi_schedule(&q_vector->napi);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
@@ -4465,6 +4468,9 @@ static irqreturn_t igc_intr(int irq, void *data)
|
||||
mod_timer(&adapter->watchdog_timer, jiffies + 1);
|
||||
}
|
||||
|
||||
if (icr & IGC_ICR_TS)
|
||||
igc_tsync_interrupt(adapter);
|
||||
|
||||
napi_schedule(&q_vector->napi);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
|
||||
@@ -209,7 +209,7 @@ static int xrx200_hw_receive(struct xrx200_chan *ch)
|
||||
skb->protocol = eth_type_trans(skb, net_dev);
|
||||
netif_receive_skb(skb);
|
||||
net_dev->stats.rx_packets++;
|
||||
net_dev->stats.rx_bytes += len - ETH_FCS_LEN;
|
||||
net_dev->stats.rx_bytes += len;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -916,9 +916,6 @@ void mlx5e_deactivate_rq(struct mlx5e_rq *rq);
|
||||
void mlx5e_close_rq(struct mlx5e_rq *rq);
|
||||
|
||||
struct mlx5e_sq_param;
|
||||
int mlx5e_open_icosq(struct mlx5e_channel *c, struct mlx5e_params *params,
|
||||
struct mlx5e_sq_param *param, struct mlx5e_icosq *sq);
|
||||
void mlx5e_close_icosq(struct mlx5e_icosq *sq);
|
||||
int mlx5e_open_xdpsq(struct mlx5e_channel *c, struct mlx5e_params *params,
|
||||
struct mlx5e_sq_param *param, struct xsk_buff_pool *xsk_pool,
|
||||
struct mlx5e_xdpsq *sq, bool is_redirect);
|
||||
|
||||
@@ -335,6 +335,14 @@ static int mlx5e_tx_reporter_dump_sq(struct mlx5e_priv *priv, struct devlink_fms
|
||||
return mlx5e_health_fmsg_named_obj_nest_end(fmsg);
|
||||
}
|
||||
|
||||
static int mlx5e_tx_reporter_timeout_dump(struct mlx5e_priv *priv, struct devlink_fmsg *fmsg,
|
||||
void *ctx)
|
||||
{
|
||||
struct mlx5e_tx_timeout_ctx *to_ctx = ctx;
|
||||
|
||||
return mlx5e_tx_reporter_dump_sq(priv, fmsg, to_ctx->sq);
|
||||
}
|
||||
|
||||
static int mlx5e_tx_reporter_dump_all_sqs(struct mlx5e_priv *priv,
|
||||
struct devlink_fmsg *fmsg)
|
||||
{
|
||||
@@ -418,7 +426,7 @@ int mlx5e_reporter_tx_timeout(struct mlx5e_txqsq *sq)
|
||||
to_ctx.sq = sq;
|
||||
err_ctx.ctx = &to_ctx;
|
||||
err_ctx.recover = mlx5e_tx_reporter_timeout_recover;
|
||||
err_ctx.dump = mlx5e_tx_reporter_dump_sq;
|
||||
err_ctx.dump = mlx5e_tx_reporter_timeout_dump;
|
||||
snprintf(err_str, sizeof(err_str),
|
||||
"TX timeout on queue: %d, SQ: 0x%x, CQ: 0x%x, SQ Cons: 0x%x SQ Prod: 0x%x, usecs since last trans: %u",
|
||||
sq->channel->ix, sq->sqn, sq->cq.mcq.cqn, sq->cc, sq->pc,
|
||||
|
||||
@@ -1051,9 +1051,20 @@ static void mlx5e_icosq_err_cqe_work(struct work_struct *recover_work)
|
||||
mlx5e_reporter_icosq_cqe_err(sq);
|
||||
}
|
||||
|
||||
static void mlx5e_async_icosq_err_cqe_work(struct work_struct *recover_work)
|
||||
{
|
||||
struct mlx5e_icosq *sq = container_of(recover_work, struct mlx5e_icosq,
|
||||
recover_work);
|
||||
|
||||
/* Not implemented yet. */
|
||||
|
||||
netdev_warn(sq->channel->netdev, "async_icosq recovery is not implemented\n");
|
||||
}
|
||||
|
||||
static int mlx5e_alloc_icosq(struct mlx5e_channel *c,
|
||||
struct mlx5e_sq_param *param,
|
||||
struct mlx5e_icosq *sq)
|
||||
struct mlx5e_icosq *sq,
|
||||
work_func_t recover_work_func)
|
||||
{
|
||||
void *sqc_wq = MLX5_ADDR_OF(sqc, param->sqc, wq);
|
||||
struct mlx5_core_dev *mdev = c->mdev;
|
||||
@@ -1073,7 +1084,7 @@ static int mlx5e_alloc_icosq(struct mlx5e_channel *c,
|
||||
if (err)
|
||||
goto err_sq_wq_destroy;
|
||||
|
||||
INIT_WORK(&sq->recover_work, mlx5e_icosq_err_cqe_work);
|
||||
INIT_WORK(&sq->recover_work, recover_work_func);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -1423,13 +1434,14 @@ static void mlx5e_tx_err_cqe_work(struct work_struct *recover_work)
|
||||
mlx5e_reporter_tx_err_cqe(sq);
|
||||
}
|
||||
|
||||
int mlx5e_open_icosq(struct mlx5e_channel *c, struct mlx5e_params *params,
|
||||
struct mlx5e_sq_param *param, struct mlx5e_icosq *sq)
|
||||
static int mlx5e_open_icosq(struct mlx5e_channel *c, struct mlx5e_params *params,
|
||||
struct mlx5e_sq_param *param, struct mlx5e_icosq *sq,
|
||||
work_func_t recover_work_func)
|
||||
{
|
||||
struct mlx5e_create_sq_param csp = {};
|
||||
int err;
|
||||
|
||||
err = mlx5e_alloc_icosq(c, param, sq);
|
||||
err = mlx5e_alloc_icosq(c, param, sq, recover_work_func);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@@ -1459,7 +1471,7 @@ void mlx5e_deactivate_icosq(struct mlx5e_icosq *icosq)
|
||||
synchronize_net(); /* Sync with NAPI. */
|
||||
}
|
||||
|
||||
void mlx5e_close_icosq(struct mlx5e_icosq *sq)
|
||||
static void mlx5e_close_icosq(struct mlx5e_icosq *sq)
|
||||
{
|
||||
struct mlx5e_channel *c = sq->channel;
|
||||
|
||||
@@ -1862,11 +1874,13 @@ static int mlx5e_open_queues(struct mlx5e_channel *c,
|
||||
|
||||
spin_lock_init(&c->async_icosq_lock);
|
||||
|
||||
err = mlx5e_open_icosq(c, params, &cparam->async_icosq, &c->async_icosq);
|
||||
err = mlx5e_open_icosq(c, params, &cparam->async_icosq, &c->async_icosq,
|
||||
mlx5e_async_icosq_err_cqe_work);
|
||||
if (err)
|
||||
goto err_disable_napi;
|
||||
|
||||
err = mlx5e_open_icosq(c, params, &cparam->icosq, &c->icosq);
|
||||
err = mlx5e_open_icosq(c, params, &cparam->icosq, &c->icosq,
|
||||
mlx5e_icosq_err_cqe_work);
|
||||
if (err)
|
||||
goto err_close_async_icosq;
|
||||
|
||||
@@ -3921,12 +3935,11 @@ static int set_feature_arfs(struct net_device *netdev, bool enable)
|
||||
|
||||
static int mlx5e_handle_feature(struct net_device *netdev,
|
||||
netdev_features_t *features,
|
||||
netdev_features_t wanted_features,
|
||||
netdev_features_t feature,
|
||||
mlx5e_feature_handler feature_handler)
|
||||
{
|
||||
netdev_features_t changes = wanted_features ^ netdev->features;
|
||||
bool enable = !!(wanted_features & feature);
|
||||
netdev_features_t changes = *features ^ netdev->features;
|
||||
bool enable = !!(*features & feature);
|
||||
int err;
|
||||
|
||||
if (!(changes & feature))
|
||||
@@ -3934,22 +3947,22 @@ static int mlx5e_handle_feature(struct net_device *netdev,
|
||||
|
||||
err = feature_handler(netdev, enable);
|
||||
if (err) {
|
||||
MLX5E_SET_FEATURE(features, feature, !enable);
|
||||
netdev_err(netdev, "%s feature %pNF failed, err %d\n",
|
||||
enable ? "Enable" : "Disable", &feature, err);
|
||||
return err;
|
||||
}
|
||||
|
||||
MLX5E_SET_FEATURE(features, feature, enable);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int mlx5e_set_features(struct net_device *netdev, netdev_features_t features)
|
||||
{
|
||||
netdev_features_t oper_features = netdev->features;
|
||||
netdev_features_t oper_features = features;
|
||||
int err = 0;
|
||||
|
||||
#define MLX5E_HANDLE_FEATURE(feature, handler) \
|
||||
mlx5e_handle_feature(netdev, &oper_features, features, feature, handler)
|
||||
mlx5e_handle_feature(netdev, &oper_features, feature, handler)
|
||||
|
||||
err |= MLX5E_HANDLE_FEATURE(NETIF_F_LRO, set_feature_lro);
|
||||
err |= MLX5E_HANDLE_FEATURE(NETIF_F_HW_VLAN_CTAG_FILTER,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user