This is the 6.6.27 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmYaZ5IACgkQONu9yGCS aT497RAAuzeqn6FN8sY4O+kTBEI93FXpxjpc1CoC5+rLNbi5dOjd45KyyIG6QunK THOjvBctPURdO6rTc6hmWpchCdo4o5P89cOh+oxouF8YYCD2CaP50Roxh4Mw5nZ+ bTyId7pL+/dEQArh0TMey4lToJ6CePx2q0zVRJ63DKxY1DesOSAt5RZVbiHZj7ss C8xDszA4wDRoM7PdYCN1ZUNiSgPWY3HpMJdG1il8WmQipqNYGLz/B/Wo4+JMMWJj OCy5q9VMaFoq3zIpdNDOPV7wgAXANpWKA03N2KcqvmIklNryS4vKrg3yxe40lnE1 inBlzoEdUds+8zrS+kKyk6WBX61dYkaCD/2SJNJwfpIvK68AMEvHYHzvkut5X/g0 0oUzp1NhQCcyxFP0wCZDHPPCJDOOxLmt1tdWoLyv4PLCgICMSrudq/630F+d3jfZ OyOixqOHSx6b3BGlNBxZlH/8ZeDEOsUj34QMyIk9DW6xMMXId3nCKgt01OStHG2l NC08IquRGNmy79/4G22zK3gbMJuzhOoVR0zN8FV5FI8ILVW5B6e58ZFoIsqUCerw JsceiU5+GB0lzTXEbIjuhB3AKYO+paaYMu6t+zovxLkYcZlKdZ3D8f3LHon60k68 gFmrP1rMI19qWZbLOKTvBlvYQRWxX3UO/hDHhfbCn8su0EwwZR0= =NBBR -----END PGP SIGNATURE----- Merge v6.6.27 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
commit
bc9d7909ae
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 = 6
|
PATCHLEVEL = 6
|
||||||
SUBLEVEL = 26
|
SUBLEVEL = 27
|
||||||
EXTRAVERSION =
|
EXTRAVERSION =
|
||||||
NAME = Hurr durr I'ma ninja sloth
|
NAME = Hurr durr I'ma ninja sloth
|
||||||
|
|
||||||
|
|
|
@ -732,14 +732,20 @@
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
|
|
||||||
ports {
|
ports {
|
||||||
hdmi_in: port {
|
#address-cells = <1>;
|
||||||
#address-cells = <1>;
|
#size-cells = <0>;
|
||||||
#size-cells = <0>;
|
|
||||||
hdmi_in_vop: endpoint@0 {
|
hdmi_in: port@0 {
|
||||||
reg = <0>;
|
reg = <0>;
|
||||||
|
|
||||||
|
hdmi_in_vop: endpoint {
|
||||||
remote-endpoint = <&vop_out_hdmi>;
|
remote-endpoint = <&vop_out_hdmi>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
hdmi_out: port@1 {
|
||||||
|
reg = <1>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1231,27 +1231,37 @@
|
||||||
compatible = "rockchip,rk3288-dw-hdmi";
|
compatible = "rockchip,rk3288-dw-hdmi";
|
||||||
reg = <0x0 0xff980000 0x0 0x20000>;
|
reg = <0x0 0xff980000 0x0 0x20000>;
|
||||||
reg-io-width = <4>;
|
reg-io-width = <4>;
|
||||||
#sound-dai-cells = <0>;
|
|
||||||
rockchip,grf = <&grf>;
|
|
||||||
interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
clocks = <&cru PCLK_HDMI_CTRL>, <&cru SCLK_HDMI_HDCP>, <&cru SCLK_HDMI_CEC>;
|
clocks = <&cru PCLK_HDMI_CTRL>, <&cru SCLK_HDMI_HDCP>, <&cru SCLK_HDMI_CEC>;
|
||||||
clock-names = "iahb", "isfr", "cec";
|
clock-names = "iahb", "isfr", "cec";
|
||||||
power-domains = <&power RK3288_PD_VIO>;
|
power-domains = <&power RK3288_PD_VIO>;
|
||||||
|
rockchip,grf = <&grf>;
|
||||||
|
#sound-dai-cells = <0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
|
|
||||||
ports {
|
ports {
|
||||||
hdmi_in: port {
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
hdmi_in: port@0 {
|
||||||
|
reg = <0>;
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
|
|
||||||
hdmi_in_vopb: endpoint@0 {
|
hdmi_in_vopb: endpoint@0 {
|
||||||
reg = <0>;
|
reg = <0>;
|
||||||
remote-endpoint = <&vopb_out_hdmi>;
|
remote-endpoint = <&vopb_out_hdmi>;
|
||||||
};
|
};
|
||||||
|
|
||||||
hdmi_in_vopl: endpoint@1 {
|
hdmi_in_vopl: endpoint@1 {
|
||||||
reg = <1>;
|
reg = <1>;
|
||||||
remote-endpoint = <&vopl_out_hdmi>;
|
remote-endpoint = <&vopl_out_hdmi>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
hdmi_out: port@1 {
|
||||||
|
reg = <1>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -743,11 +743,20 @@
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
|
|
||||||
ports {
|
ports {
|
||||||
hdmi_in: port {
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
hdmi_in: port@0 {
|
||||||
|
reg = <0>;
|
||||||
|
|
||||||
hdmi_in_vop: endpoint {
|
hdmi_in_vop: endpoint {
|
||||||
remote-endpoint = <&vop_out_hdmi>;
|
remote-endpoint = <&vop_out_hdmi>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
hdmi_out: port@1 {
|
||||||
|
reg = <1>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1953,6 +1953,7 @@
|
||||||
hdmi: hdmi@ff940000 {
|
hdmi: hdmi@ff940000 {
|
||||||
compatible = "rockchip,rk3399-dw-hdmi";
|
compatible = "rockchip,rk3399-dw-hdmi";
|
||||||
reg = <0x0 0xff940000 0x0 0x20000>;
|
reg = <0x0 0xff940000 0x0 0x20000>;
|
||||||
|
reg-io-width = <4>;
|
||||||
interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH 0>;
|
interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH 0>;
|
||||||
clocks = <&cru PCLK_HDMI_CTRL>,
|
clocks = <&cru PCLK_HDMI_CTRL>,
|
||||||
<&cru SCLK_HDMI_SFR>,
|
<&cru SCLK_HDMI_SFR>,
|
||||||
|
@ -1961,13 +1962,16 @@
|
||||||
<&cru PLL_VPLL>;
|
<&cru PLL_VPLL>;
|
||||||
clock-names = "iahb", "isfr", "cec", "grf", "ref";
|
clock-names = "iahb", "isfr", "cec", "grf", "ref";
|
||||||
power-domains = <&power RK3399_PD_HDCP>;
|
power-domains = <&power RK3399_PD_HDCP>;
|
||||||
reg-io-width = <4>;
|
|
||||||
rockchip,grf = <&grf>;
|
rockchip,grf = <&grf>;
|
||||||
#sound-dai-cells = <0>;
|
#sound-dai-cells = <0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
|
|
||||||
ports {
|
ports {
|
||||||
hdmi_in: port {
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
hdmi_in: port@0 {
|
||||||
|
reg = <0>;
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
@ -1980,6 +1984,10 @@
|
||||||
remote-endpoint = <&vopl_out_hdmi>;
|
remote-endpoint = <&vopl_out_hdmi>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
hdmi_out: port@1 {
|
||||||
|
reg = <1>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -173,9 +173,11 @@ void amd_pmu_lbr_read(void)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check if a branch has been logged; if valid = 0, spec = 0
|
* Check if a branch has been logged; if valid = 0, spec = 0
|
||||||
* then no branch was recorded
|
* then no branch was recorded; if reserved = 1 then an
|
||||||
|
* erroneous branch was recorded (see Erratum 1452)
|
||||||
*/
|
*/
|
||||||
if (!entry.to.split.valid && !entry.to.split.spec)
|
if ((!entry.to.split.valid && !entry.to.split.spec) ||
|
||||||
|
entry.to.split.reserved)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
perf_clear_branch_entry_bitfields(br + out);
|
perf_clear_branch_entry_bitfields(br + out);
|
||||||
|
|
|
@ -62,6 +62,11 @@ void xen_arch_unregister_cpu(int num);
|
||||||
#ifdef CONFIG_PVH
|
#ifdef CONFIG_PVH
|
||||||
void __init xen_pvh_init(struct boot_params *boot_params);
|
void __init xen_pvh_init(struct boot_params *boot_params);
|
||||||
void __init mem_map_via_hcall(struct boot_params *boot_params_p);
|
void __init mem_map_via_hcall(struct boot_params *boot_params_p);
|
||||||
|
#ifdef CONFIG_XEN_PVH
|
||||||
|
void __init xen_reserve_extra_memory(struct boot_params *bootp);
|
||||||
|
#else
|
||||||
|
static inline void xen_reserve_extra_memory(struct boot_params *bootp) { }
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Lazy mode for batching updates / context switch */
|
/* Lazy mode for batching updates / context switch */
|
||||||
|
|
|
@ -907,6 +907,54 @@ static void chromeos_fixup_apl_pci_l1ss_capability(struct pci_dev *dev)
|
||||||
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x5ad6, chromeos_save_apl_pci_l1ss_capability);
|
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x5ad6, chromeos_save_apl_pci_l1ss_capability);
|
||||||
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL, 0x5ad6, chromeos_fixup_apl_pci_l1ss_capability);
|
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL, 0x5ad6, chromeos_fixup_apl_pci_l1ss_capability);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Disable D3cold on Asus B1400 PCI-NVMe bridge
|
||||||
|
*
|
||||||
|
* On this platform with VMD off, the NVMe device cannot successfully power
|
||||||
|
* back on from D3cold. This appears to be an untested transition by the
|
||||||
|
* vendor: Windows leaves the NVMe and parent bridge in D0 during suspend.
|
||||||
|
*
|
||||||
|
* We disable D3cold on the parent bridge for simplicity, and the fact that
|
||||||
|
* both parent bridge and NVMe device share the same power resource.
|
||||||
|
*
|
||||||
|
* This is only needed on BIOS versions before 308; the newer versions flip
|
||||||
|
* StorageD3Enable from 1 to 0.
|
||||||
|
*/
|
||||||
|
static const struct dmi_system_id asus_nvme_broken_d3cold_table[] = {
|
||||||
|
{
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||||
|
DMI_MATCH(DMI_BIOS_VERSION, "B1400CEAE.304"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||||
|
DMI_MATCH(DMI_BIOS_VERSION, "B1400CEAE.305"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||||
|
DMI_MATCH(DMI_BIOS_VERSION, "B1400CEAE.306"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||||
|
DMI_MATCH(DMI_BIOS_VERSION, "B1400CEAE.307"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{}
|
||||||
|
};
|
||||||
|
|
||||||
|
static void asus_disable_nvme_d3cold(struct pci_dev *pdev)
|
||||||
|
{
|
||||||
|
if (dmi_check_system(asus_nvme_broken_d3cold_table) > 0)
|
||||||
|
pci_d3cold_disable(pdev);
|
||||||
|
}
|
||||||
|
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x9a09, asus_disable_nvme_d3cold);
|
||||||
|
|
||||||
#ifdef CONFIG_SUSPEND
|
#ifdef CONFIG_SUSPEND
|
||||||
/*
|
/*
|
||||||
* Root Ports on some AMD SoCs advertise PME_Support for D3hot and D3cold, but
|
* Root Ports on some AMD SoCs advertise PME_Support for D3hot and D3cold, but
|
||||||
|
|
|
@ -74,6 +74,9 @@ static void __init init_pvh_bootparams(bool xen_guest)
|
||||||
} else
|
} else
|
||||||
xen_raw_printk("Warning: Can fit ISA range into e820\n");
|
xen_raw_printk("Warning: Can fit ISA range into e820\n");
|
||||||
|
|
||||||
|
if (xen_guest)
|
||||||
|
xen_reserve_extra_memory(&pvh_bootparams);
|
||||||
|
|
||||||
pvh_bootparams.hdr.cmd_line_ptr =
|
pvh_bootparams.hdr.cmd_line_ptr =
|
||||||
pvh_start_info.cmdline_paddr;
|
pvh_start_info.cmdline_paddr;
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#include <linux/console.h>
|
#include <linux/console.h>
|
||||||
#include <linux/cpu.h>
|
#include <linux/cpu.h>
|
||||||
#include <linux/kexec.h>
|
#include <linux/kexec.h>
|
||||||
|
#include <linux/memblock.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/panic_notifier.h>
|
#include <linux/panic_notifier.h>
|
||||||
|
|
||||||
|
@ -350,3 +351,34 @@ void xen_arch_unregister_cpu(int num)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(xen_arch_unregister_cpu);
|
EXPORT_SYMBOL(xen_arch_unregister_cpu);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Amount of extra memory space we add to the e820 ranges */
|
||||||
|
struct xen_memory_region xen_extra_mem[XEN_EXTRA_MEM_MAX_REGIONS] __initdata;
|
||||||
|
|
||||||
|
void __init xen_add_extra_mem(unsigned long start_pfn, unsigned long n_pfns)
|
||||||
|
{
|
||||||
|
unsigned int i;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* No need to check for zero size, should happen rarely and will only
|
||||||
|
* write a new entry regarded to be unused due to zero size.
|
||||||
|
*/
|
||||||
|
for (i = 0; i < XEN_EXTRA_MEM_MAX_REGIONS; i++) {
|
||||||
|
/* Add new region. */
|
||||||
|
if (xen_extra_mem[i].n_pfns == 0) {
|
||||||
|
xen_extra_mem[i].start_pfn = start_pfn;
|
||||||
|
xen_extra_mem[i].n_pfns = n_pfns;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
/* Append to existing region. */
|
||||||
|
if (xen_extra_mem[i].start_pfn + xen_extra_mem[i].n_pfns ==
|
||||||
|
start_pfn) {
|
||||||
|
xen_extra_mem[i].n_pfns += n_pfns;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (i == XEN_EXTRA_MEM_MAX_REGIONS)
|
||||||
|
printk(KERN_WARNING "Warning: not enough extra memory regions\n");
|
||||||
|
|
||||||
|
memblock_reserve(PFN_PHYS(start_pfn), PFN_PHYS(n_pfns));
|
||||||
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0
|
// SPDX-License-Identifier: GPL-2.0
|
||||||
#include <linux/acpi.h>
|
#include <linux/acpi.h>
|
||||||
#include <linux/export.h>
|
#include <linux/export.h>
|
||||||
|
#include <linux/mm.h>
|
||||||
|
|
||||||
#include <xen/hvc-console.h>
|
#include <xen/hvc-console.h>
|
||||||
|
|
||||||
|
@ -72,3 +73,70 @@ void __init mem_map_via_hcall(struct boot_params *boot_params_p)
|
||||||
}
|
}
|
||||||
boot_params_p->e820_entries = memmap.nr_entries;
|
boot_params_p->e820_entries = memmap.nr_entries;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Reserve e820 UNUSABLE regions to inflate the memory balloon.
|
||||||
|
*
|
||||||
|
* On PVH dom0 the host memory map is used, RAM regions available to dom0 are
|
||||||
|
* located as the same place as in the native memory map, but since dom0 gets
|
||||||
|
* less memory than the total amount of host RAM the ranges that can't be
|
||||||
|
* populated are converted from RAM -> UNUSABLE. Use such regions (up to the
|
||||||
|
* ratio signaled in EXTRA_MEM_RATIO) in order to inflate the balloon driver at
|
||||||
|
* boot. Doing so prevents the guest (even if just temporary) from using holes
|
||||||
|
* in the memory map in order to map grants or foreign addresses, and
|
||||||
|
* hopefully limits the risk of a clash with a device MMIO region. Ideally the
|
||||||
|
* hypervisor should notify us which memory ranges are suitable for creating
|
||||||
|
* foreign mappings, but that's not yet implemented.
|
||||||
|
*/
|
||||||
|
void __init xen_reserve_extra_memory(struct boot_params *bootp)
|
||||||
|
{
|
||||||
|
unsigned int i, ram_pages = 0, extra_pages;
|
||||||
|
|
||||||
|
for (i = 0; i < bootp->e820_entries; i++) {
|
||||||
|
struct boot_e820_entry *e = &bootp->e820_table[i];
|
||||||
|
|
||||||
|
if (e->type != E820_TYPE_RAM)
|
||||||
|
continue;
|
||||||
|
ram_pages += PFN_DOWN(e->addr + e->size) - PFN_UP(e->addr);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Max amount of extra memory. */
|
||||||
|
extra_pages = EXTRA_MEM_RATIO * ram_pages;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Convert UNUSABLE ranges to RAM and reserve them for foreign mapping
|
||||||
|
* purposes.
|
||||||
|
*/
|
||||||
|
for (i = 0; i < bootp->e820_entries && extra_pages; i++) {
|
||||||
|
struct boot_e820_entry *e = &bootp->e820_table[i];
|
||||||
|
unsigned long pages;
|
||||||
|
|
||||||
|
if (e->type != E820_TYPE_UNUSABLE)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
pages = min(extra_pages,
|
||||||
|
PFN_DOWN(e->addr + e->size) - PFN_UP(e->addr));
|
||||||
|
|
||||||
|
if (pages != (PFN_DOWN(e->addr + e->size) - PFN_UP(e->addr))) {
|
||||||
|
struct boot_e820_entry *next;
|
||||||
|
|
||||||
|
if (bootp->e820_entries ==
|
||||||
|
ARRAY_SIZE(bootp->e820_table))
|
||||||
|
/* No space left to split - skip region. */
|
||||||
|
continue;
|
||||||
|
|
||||||
|
/* Split entry. */
|
||||||
|
next = e + 1;
|
||||||
|
memmove(next, e,
|
||||||
|
(bootp->e820_entries - i) * sizeof(*e));
|
||||||
|
bootp->e820_entries++;
|
||||||
|
next->addr = PAGE_ALIGN(e->addr) + PFN_PHYS(pages);
|
||||||
|
e->size = next->addr - e->addr;
|
||||||
|
next->size -= e->size;
|
||||||
|
}
|
||||||
|
e->type = E820_TYPE_RAM;
|
||||||
|
extra_pages -= pages;
|
||||||
|
|
||||||
|
xen_add_extra_mem(PFN_UP(e->addr), pages);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -38,9 +38,6 @@
|
||||||
|
|
||||||
#define GB(x) ((uint64_t)(x) * 1024 * 1024 * 1024)
|
#define GB(x) ((uint64_t)(x) * 1024 * 1024 * 1024)
|
||||||
|
|
||||||
/* Amount of extra memory space we add to the e820 ranges */
|
|
||||||
struct xen_memory_region xen_extra_mem[XEN_EXTRA_MEM_MAX_REGIONS] __initdata;
|
|
||||||
|
|
||||||
/* Number of pages released from the initial allocation. */
|
/* Number of pages released from the initial allocation. */
|
||||||
unsigned long xen_released_pages;
|
unsigned long xen_released_pages;
|
||||||
|
|
||||||
|
@ -64,18 +61,6 @@ static struct {
|
||||||
} xen_remap_buf __initdata __aligned(PAGE_SIZE);
|
} xen_remap_buf __initdata __aligned(PAGE_SIZE);
|
||||||
static unsigned long xen_remap_mfn __initdata = INVALID_P2M_ENTRY;
|
static unsigned long xen_remap_mfn __initdata = INVALID_P2M_ENTRY;
|
||||||
|
|
||||||
/*
|
|
||||||
* The maximum amount of extra memory compared to the base size. The
|
|
||||||
* main scaling factor is the size of struct page. At extreme ratios
|
|
||||||
* of base:extra, all the base memory can be filled with page
|
|
||||||
* structures for the extra memory, leaving no space for anything
|
|
||||||
* else.
|
|
||||||
*
|
|
||||||
* 10x seems like a reasonable balance between scaling flexibility and
|
|
||||||
* leaving a practically usable system.
|
|
||||||
*/
|
|
||||||
#define EXTRA_MEM_RATIO (10)
|
|
||||||
|
|
||||||
static bool xen_512gb_limit __initdata = IS_ENABLED(CONFIG_XEN_512GB);
|
static bool xen_512gb_limit __initdata = IS_ENABLED(CONFIG_XEN_512GB);
|
||||||
|
|
||||||
static void __init xen_parse_512gb(void)
|
static void __init xen_parse_512gb(void)
|
||||||
|
@ -96,35 +81,6 @@ static void __init xen_parse_512gb(void)
|
||||||
xen_512gb_limit = val;
|
xen_512gb_limit = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __init xen_add_extra_mem(unsigned long start_pfn,
|
|
||||||
unsigned long n_pfns)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* No need to check for zero size, should happen rarely and will only
|
|
||||||
* write a new entry regarded to be unused due to zero size.
|
|
||||||
*/
|
|
||||||
for (i = 0; i < XEN_EXTRA_MEM_MAX_REGIONS; i++) {
|
|
||||||
/* Add new region. */
|
|
||||||
if (xen_extra_mem[i].n_pfns == 0) {
|
|
||||||
xen_extra_mem[i].start_pfn = start_pfn;
|
|
||||||
xen_extra_mem[i].n_pfns = n_pfns;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
/* Append to existing region. */
|
|
||||||
if (xen_extra_mem[i].start_pfn + xen_extra_mem[i].n_pfns ==
|
|
||||||
start_pfn) {
|
|
||||||
xen_extra_mem[i].n_pfns += n_pfns;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (i == XEN_EXTRA_MEM_MAX_REGIONS)
|
|
||||||
printk(KERN_WARNING "Warning: not enough extra memory regions\n");
|
|
||||||
|
|
||||||
memblock_reserve(PFN_PHYS(start_pfn), PFN_PHYS(n_pfns));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __init xen_del_extra_mem(unsigned long start_pfn,
|
static void __init xen_del_extra_mem(unsigned long start_pfn,
|
||||||
unsigned long n_pfns)
|
unsigned long n_pfns)
|
||||||
{
|
{
|
||||||
|
|
|
@ -163,4 +163,18 @@ void xen_hvm_post_suspend(int suspend_cancelled);
|
||||||
static inline void xen_hvm_post_suspend(int suspend_cancelled) {}
|
static inline void xen_hvm_post_suspend(int suspend_cancelled) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The maximum amount of extra memory compared to the base size. The
|
||||||
|
* main scaling factor is the size of struct page. At extreme ratios
|
||||||
|
* of base:extra, all the base memory can be filled with page
|
||||||
|
* structures for the extra memory, leaving no space for anything
|
||||||
|
* else.
|
||||||
|
*
|
||||||
|
* 10x seems like a reasonable balance between scaling flexibility and
|
||||||
|
* leaving a practically usable system.
|
||||||
|
*/
|
||||||
|
#define EXTRA_MEM_RATIO (10)
|
||||||
|
|
||||||
|
void xen_add_extra_mem(unsigned long start_pfn, unsigned long n_pfns);
|
||||||
|
|
||||||
#endif /* XEN_OPS_H */
|
#endif /* XEN_OPS_H */
|
||||||
|
|
|
@ -27,7 +27,7 @@ void blk_rq_stat_init(struct blk_rq_stat *stat)
|
||||||
/* src is a per-cpu stat, mean isn't initialized */
|
/* src is a per-cpu stat, mean isn't initialized */
|
||||||
void blk_rq_stat_sum(struct blk_rq_stat *dst, struct blk_rq_stat *src)
|
void blk_rq_stat_sum(struct blk_rq_stat *dst, struct blk_rq_stat *src)
|
||||||
{
|
{
|
||||||
if (!src->nr_samples)
|
if (dst->nr_samples + src->nr_samples <= dst->nr_samples)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
dst->min = min(dst->min, src->min);
|
dst->min = min(dst->min, src->min);
|
||||||
|
|
|
@ -2508,7 +2508,7 @@ struct hl_state_dump_specs {
|
||||||
* DEVICES
|
* DEVICES
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define HL_STR_MAX 32
|
#define HL_STR_MAX 64
|
||||||
|
|
||||||
#define HL_DEV_STS_MAX (HL_DEVICE_STATUS_LAST + 1)
|
#define HL_DEV_STS_MAX (HL_DEVICE_STATUS_LAST + 1)
|
||||||
|
|
||||||
|
|
|
@ -385,18 +385,6 @@ static const struct dmi_system_id acpisleep_dmi_table[] __initconst = {
|
||||||
DMI_MATCH(DMI_PRODUCT_NAME, "20GGA00L00"),
|
DMI_MATCH(DMI_PRODUCT_NAME, "20GGA00L00"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
/*
|
|
||||||
* ASUS B1400CEAE hangs on resume from suspend (see
|
|
||||||
* https://bugzilla.kernel.org/show_bug.cgi?id=215742).
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
.callback = init_default_s3,
|
|
||||||
.ident = "ASUS B1400CEAE",
|
|
||||||
.matches = {
|
|
||||||
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
||||||
DMI_MATCH(DMI_PRODUCT_NAME, "ASUS EXPERTBOOK B1400CEAE"),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{},
|
{},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -429,7 +429,7 @@ bool acpi_quirk_skip_i2c_client_enumeration(struct acpi_device *adev)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(acpi_quirk_skip_i2c_client_enumeration);
|
EXPORT_SYMBOL_GPL(acpi_quirk_skip_i2c_client_enumeration);
|
||||||
|
|
||||||
int acpi_quirk_skip_serdev_enumeration(struct device *controller_parent, bool *skip)
|
static int acpi_dmi_skip_serdev_enumeration(struct device *controller_parent, bool *skip)
|
||||||
{
|
{
|
||||||
struct acpi_device *adev = ACPI_COMPANION(controller_parent);
|
struct acpi_device *adev = ACPI_COMPANION(controller_parent);
|
||||||
const struct dmi_system_id *dmi_id;
|
const struct dmi_system_id *dmi_id;
|
||||||
|
@ -437,8 +437,6 @@ int acpi_quirk_skip_serdev_enumeration(struct device *controller_parent, bool *s
|
||||||
u64 uid;
|
u64 uid;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
*skip = false;
|
|
||||||
|
|
||||||
ret = acpi_dev_uid_to_integer(adev, &uid);
|
ret = acpi_dev_uid_to_integer(adev, &uid);
|
||||||
if (ret)
|
if (ret)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -464,7 +462,6 @@ int acpi_quirk_skip_serdev_enumeration(struct device *controller_parent, bool *s
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(acpi_quirk_skip_serdev_enumeration);
|
|
||||||
|
|
||||||
bool acpi_quirk_skip_gpio_event_handlers(void)
|
bool acpi_quirk_skip_gpio_event_handlers(void)
|
||||||
{
|
{
|
||||||
|
@ -479,8 +476,21 @@ bool acpi_quirk_skip_gpio_event_handlers(void)
|
||||||
return (quirks & ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS);
|
return (quirks & ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(acpi_quirk_skip_gpio_event_handlers);
|
EXPORT_SYMBOL_GPL(acpi_quirk_skip_gpio_event_handlers);
|
||||||
|
#else
|
||||||
|
static int acpi_dmi_skip_serdev_enumeration(struct device *controller_parent, bool *skip)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
int acpi_quirk_skip_serdev_enumeration(struct device *controller_parent, bool *skip)
|
||||||
|
{
|
||||||
|
*skip = false;
|
||||||
|
|
||||||
|
return acpi_dmi_skip_serdev_enumeration(controller_parent, skip);
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(acpi_quirk_skip_serdev_enumeration);
|
||||||
|
|
||||||
/* Lists of PMIC ACPI HIDs with an (often better) native charger driver */
|
/* Lists of PMIC ACPI HIDs with an (often better) native charger driver */
|
||||||
static const struct {
|
static const struct {
|
||||||
const char *hid;
|
const char *hid;
|
||||||
|
|
|
@ -441,7 +441,7 @@ int btintel_read_version(struct hci_dev *hdev, struct intel_version *ver)
|
||||||
return PTR_ERR(skb);
|
return PTR_ERR(skb);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (skb->len != sizeof(*ver)) {
|
if (!skb || skb->len != sizeof(*ver)) {
|
||||||
bt_dev_err(hdev, "Intel version event size mismatch");
|
bt_dev_err(hdev, "Intel version event size mismatch");
|
||||||
kfree_skb(skb);
|
kfree_skb(skb);
|
||||||
return -EILSEQ;
|
return -EILSEQ;
|
||||||
|
|
|
@ -422,5 +422,6 @@ MODULE_LICENSE("GPL");
|
||||||
MODULE_FIRMWARE(FIRMWARE_MT7622);
|
MODULE_FIRMWARE(FIRMWARE_MT7622);
|
||||||
MODULE_FIRMWARE(FIRMWARE_MT7663);
|
MODULE_FIRMWARE(FIRMWARE_MT7663);
|
||||||
MODULE_FIRMWARE(FIRMWARE_MT7668);
|
MODULE_FIRMWARE(FIRMWARE_MT7668);
|
||||||
|
MODULE_FIRMWARE(FIRMWARE_MT7922);
|
||||||
MODULE_FIRMWARE(FIRMWARE_MT7961);
|
MODULE_FIRMWARE(FIRMWARE_MT7961);
|
||||||
MODULE_FIRMWARE(FIRMWARE_MT7925);
|
MODULE_FIRMWARE(FIRMWARE_MT7925);
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#define FIRMWARE_MT7622 "mediatek/mt7622pr2h.bin"
|
#define FIRMWARE_MT7622 "mediatek/mt7622pr2h.bin"
|
||||||
#define FIRMWARE_MT7663 "mediatek/mt7663pr2h.bin"
|
#define FIRMWARE_MT7663 "mediatek/mt7663pr2h.bin"
|
||||||
#define FIRMWARE_MT7668 "mediatek/mt7668pr2h.bin"
|
#define FIRMWARE_MT7668 "mediatek/mt7668pr2h.bin"
|
||||||
|
#define FIRMWARE_MT7922 "mediatek/BT_RAM_CODE_MT7922_1_1_hdr.bin"
|
||||||
#define FIRMWARE_MT7961 "mediatek/BT_RAM_CODE_MT7961_1_2_hdr.bin"
|
#define FIRMWARE_MT7961 "mediatek/BT_RAM_CODE_MT7961_1_2_hdr.bin"
|
||||||
#define FIRMWARE_MT7925 "mediatek/mt7925/BT_RAM_CODE_MT7925_1_1_hdr.bin"
|
#define FIRMWARE_MT7925 "mediatek/mt7925/BT_RAM_CODE_MT7925_1_1_hdr.bin"
|
||||||
|
|
||||||
|
|
|
@ -4477,6 +4477,7 @@ static int btusb_probe(struct usb_interface *intf,
|
||||||
set_bit(HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER, &hdev->quirks);
|
set_bit(HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER, &hdev->quirks);
|
||||||
set_bit(HCI_QUIRK_BROKEN_SET_RPA_TIMEOUT, &hdev->quirks);
|
set_bit(HCI_QUIRK_BROKEN_SET_RPA_TIMEOUT, &hdev->quirks);
|
||||||
set_bit(HCI_QUIRK_BROKEN_EXT_SCAN, &hdev->quirks);
|
set_bit(HCI_QUIRK_BROKEN_EXT_SCAN, &hdev->quirks);
|
||||||
|
set_bit(HCI_QUIRK_BROKEN_READ_ENC_KEY_SIZE, &hdev->quirks);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!reset)
|
if (!reset)
|
||||||
|
|
|
@ -62,6 +62,7 @@ static const char * const mhi_pm_state_str[] = {
|
||||||
[MHI_PM_STATE_FW_DL_ERR] = "Firmware Download Error",
|
[MHI_PM_STATE_FW_DL_ERR] = "Firmware Download Error",
|
||||||
[MHI_PM_STATE_SYS_ERR_DETECT] = "SYS ERROR Detect",
|
[MHI_PM_STATE_SYS_ERR_DETECT] = "SYS ERROR Detect",
|
||||||
[MHI_PM_STATE_SYS_ERR_PROCESS] = "SYS ERROR Process",
|
[MHI_PM_STATE_SYS_ERR_PROCESS] = "SYS ERROR Process",
|
||||||
|
[MHI_PM_STATE_SYS_ERR_FAIL] = "SYS ERROR Failure",
|
||||||
[MHI_PM_STATE_SHUTDOWN_PROCESS] = "SHUTDOWN Process",
|
[MHI_PM_STATE_SHUTDOWN_PROCESS] = "SHUTDOWN Process",
|
||||||
[MHI_PM_STATE_LD_ERR_FATAL_DETECT] = "Linkdown or Error Fatal Detect",
|
[MHI_PM_STATE_LD_ERR_FATAL_DETECT] = "Linkdown or Error Fatal Detect",
|
||||||
};
|
};
|
||||||
|
|
|
@ -88,6 +88,7 @@ enum mhi_pm_state {
|
||||||
MHI_PM_STATE_FW_DL_ERR,
|
MHI_PM_STATE_FW_DL_ERR,
|
||||||
MHI_PM_STATE_SYS_ERR_DETECT,
|
MHI_PM_STATE_SYS_ERR_DETECT,
|
||||||
MHI_PM_STATE_SYS_ERR_PROCESS,
|
MHI_PM_STATE_SYS_ERR_PROCESS,
|
||||||
|
MHI_PM_STATE_SYS_ERR_FAIL,
|
||||||
MHI_PM_STATE_SHUTDOWN_PROCESS,
|
MHI_PM_STATE_SHUTDOWN_PROCESS,
|
||||||
MHI_PM_STATE_LD_ERR_FATAL_DETECT,
|
MHI_PM_STATE_LD_ERR_FATAL_DETECT,
|
||||||
MHI_PM_STATE_MAX
|
MHI_PM_STATE_MAX
|
||||||
|
@ -104,14 +105,16 @@ enum mhi_pm_state {
|
||||||
#define MHI_PM_FW_DL_ERR BIT(7)
|
#define MHI_PM_FW_DL_ERR BIT(7)
|
||||||
#define MHI_PM_SYS_ERR_DETECT BIT(8)
|
#define MHI_PM_SYS_ERR_DETECT BIT(8)
|
||||||
#define MHI_PM_SYS_ERR_PROCESS BIT(9)
|
#define MHI_PM_SYS_ERR_PROCESS BIT(9)
|
||||||
#define MHI_PM_SHUTDOWN_PROCESS BIT(10)
|
#define MHI_PM_SYS_ERR_FAIL BIT(10)
|
||||||
|
#define MHI_PM_SHUTDOWN_PROCESS BIT(11)
|
||||||
/* link not accessible */
|
/* link not accessible */
|
||||||
#define MHI_PM_LD_ERR_FATAL_DETECT BIT(11)
|
#define MHI_PM_LD_ERR_FATAL_DETECT BIT(12)
|
||||||
|
|
||||||
#define MHI_REG_ACCESS_VALID(pm_state) ((pm_state & (MHI_PM_POR | MHI_PM_M0 | \
|
#define MHI_REG_ACCESS_VALID(pm_state) ((pm_state & (MHI_PM_POR | MHI_PM_M0 | \
|
||||||
MHI_PM_M2 | MHI_PM_M3_ENTER | MHI_PM_M3_EXIT | \
|
MHI_PM_M2 | MHI_PM_M3_ENTER | MHI_PM_M3_EXIT | \
|
||||||
MHI_PM_SYS_ERR_DETECT | MHI_PM_SYS_ERR_PROCESS | \
|
MHI_PM_SYS_ERR_DETECT | MHI_PM_SYS_ERR_PROCESS | \
|
||||||
MHI_PM_SHUTDOWN_PROCESS | MHI_PM_FW_DL_ERR)))
|
MHI_PM_SYS_ERR_FAIL | MHI_PM_SHUTDOWN_PROCESS | \
|
||||||
|
MHI_PM_FW_DL_ERR)))
|
||||||
#define MHI_PM_IN_ERROR_STATE(pm_state) (pm_state >= MHI_PM_FW_DL_ERR)
|
#define MHI_PM_IN_ERROR_STATE(pm_state) (pm_state >= MHI_PM_FW_DL_ERR)
|
||||||
#define MHI_PM_IN_FATAL_STATE(pm_state) (pm_state == MHI_PM_LD_ERR_FATAL_DETECT)
|
#define MHI_PM_IN_FATAL_STATE(pm_state) (pm_state == MHI_PM_LD_ERR_FATAL_DETECT)
|
||||||
#define MHI_DB_ACCESS_VALID(mhi_cntrl) (mhi_cntrl->pm_state & mhi_cntrl->db_access)
|
#define MHI_DB_ACCESS_VALID(mhi_cntrl) (mhi_cntrl->pm_state & mhi_cntrl->db_access)
|
||||||
|
|
|
@ -36,7 +36,10 @@
|
||||||
* M0 <--> M0
|
* M0 <--> M0
|
||||||
* M0 -> FW_DL_ERR
|
* M0 -> FW_DL_ERR
|
||||||
* M0 -> M3_ENTER -> M3 -> M3_EXIT --> M0
|
* M0 -> M3_ENTER -> M3 -> M3_EXIT --> M0
|
||||||
* L1: SYS_ERR_DETECT -> SYS_ERR_PROCESS --> POR
|
* L1: SYS_ERR_DETECT -> SYS_ERR_PROCESS
|
||||||
|
* SYS_ERR_PROCESS -> SYS_ERR_FAIL
|
||||||
|
* SYS_ERR_FAIL -> SYS_ERR_DETECT
|
||||||
|
* SYS_ERR_PROCESS --> POR
|
||||||
* L2: SHUTDOWN_PROCESS -> LD_ERR_FATAL_DETECT
|
* L2: SHUTDOWN_PROCESS -> LD_ERR_FATAL_DETECT
|
||||||
* SHUTDOWN_PROCESS -> DISABLE
|
* SHUTDOWN_PROCESS -> DISABLE
|
||||||
* L3: LD_ERR_FATAL_DETECT <--> LD_ERR_FATAL_DETECT
|
* L3: LD_ERR_FATAL_DETECT <--> LD_ERR_FATAL_DETECT
|
||||||
|
@ -93,7 +96,12 @@ static const struct mhi_pm_transitions dev_state_transitions[] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
MHI_PM_SYS_ERR_PROCESS,
|
MHI_PM_SYS_ERR_PROCESS,
|
||||||
MHI_PM_POR | MHI_PM_SHUTDOWN_PROCESS |
|
MHI_PM_POR | MHI_PM_SYS_ERR_FAIL | MHI_PM_SHUTDOWN_PROCESS |
|
||||||
|
MHI_PM_LD_ERR_FATAL_DETECT
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MHI_PM_SYS_ERR_FAIL,
|
||||||
|
MHI_PM_SYS_ERR_DETECT | MHI_PM_SHUTDOWN_PROCESS |
|
||||||
MHI_PM_LD_ERR_FATAL_DETECT
|
MHI_PM_LD_ERR_FATAL_DETECT
|
||||||
},
|
},
|
||||||
/* L2 States */
|
/* L2 States */
|
||||||
|
@ -624,7 +632,13 @@ static void mhi_pm_sys_error_transition(struct mhi_controller *mhi_cntrl)
|
||||||
!in_reset, timeout);
|
!in_reset, timeout);
|
||||||
if (!ret || in_reset) {
|
if (!ret || in_reset) {
|
||||||
dev_err(dev, "Device failed to exit MHI Reset state\n");
|
dev_err(dev, "Device failed to exit MHI Reset state\n");
|
||||||
goto exit_sys_error_transition;
|
write_lock_irq(&mhi_cntrl->pm_lock);
|
||||||
|
cur_state = mhi_tryset_pm_state(mhi_cntrl,
|
||||||
|
MHI_PM_SYS_ERR_FAIL);
|
||||||
|
write_unlock_irq(&mhi_cntrl->pm_lock);
|
||||||
|
/* Shutdown may have occurred, otherwise cleanup now */
|
||||||
|
if (cur_state != MHI_PM_SYS_ERR_FAIL)
|
||||||
|
goto exit_sys_error_transition;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1576,7 +1576,8 @@ static int cpufreq_online(unsigned int cpu)
|
||||||
if (cpufreq_driver->ready)
|
if (cpufreq_driver->ready)
|
||||||
cpufreq_driver->ready(policy);
|
cpufreq_driver->ready(policy);
|
||||||
|
|
||||||
if (cpufreq_thermal_control_enabled(cpufreq_driver))
|
/* Register cpufreq cooling only for a new policy */
|
||||||
|
if (new_policy && cpufreq_thermal_control_enabled(cpufreq_driver))
|
||||||
policy->cdev = of_cpufreq_cooling_register(policy);
|
policy->cdev = of_cpufreq_cooling_register(policy);
|
||||||
|
|
||||||
pr_debug("initialization complete\n");
|
pr_debug("initialization complete\n");
|
||||||
|
@ -1660,11 +1661,6 @@ static void __cpufreq_offline(unsigned int cpu, struct cpufreq_policy *policy)
|
||||||
else
|
else
|
||||||
policy->last_policy = policy->policy;
|
policy->last_policy = policy->policy;
|
||||||
|
|
||||||
if (cpufreq_thermal_control_enabled(cpufreq_driver)) {
|
|
||||||
cpufreq_cooling_unregister(policy->cdev);
|
|
||||||
policy->cdev = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (has_target())
|
if (has_target())
|
||||||
cpufreq_exit_governor(policy);
|
cpufreq_exit_governor(policy);
|
||||||
|
|
||||||
|
@ -1725,6 +1721,15 @@ static void cpufreq_remove_dev(struct device *dev, struct subsys_interface *sif)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Unregister cpufreq cooling once all the CPUs of the policy are
|
||||||
|
* removed.
|
||||||
|
*/
|
||||||
|
if (cpufreq_thermal_control_enabled(cpufreq_driver)) {
|
||||||
|
cpufreq_cooling_unregister(policy->cdev);
|
||||||
|
policy->cdev = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* We did light-weight exit earlier, do full tear down now */
|
/* We did light-weight exit earlier, do full tear down now */
|
||||||
if (cpufreq_driver->offline)
|
if (cpufreq_driver->offline)
|
||||||
cpufreq_driver->exit(policy);
|
cpufreq_driver->exit(policy);
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
#include <linux/cpumask.h>
|
#include <linux/cpumask.h>
|
||||||
#include <linux/tick.h>
|
#include <linux/tick.h>
|
||||||
#include <linux/cpu.h>
|
#include <linux/cpu.h>
|
||||||
|
#include <linux/math64.h>
|
||||||
|
|
||||||
#include "cpuidle.h"
|
#include "cpuidle.h"
|
||||||
|
|
||||||
|
@ -187,7 +188,7 @@ static void __cpuidle_driver_init(struct cpuidle_driver *drv)
|
||||||
s->target_residency = div_u64(s->target_residency_ns, NSEC_PER_USEC);
|
s->target_residency = div_u64(s->target_residency_ns, NSEC_PER_USEC);
|
||||||
|
|
||||||
if (s->exit_latency > 0)
|
if (s->exit_latency > 0)
|
||||||
s->exit_latency_ns = s->exit_latency * NSEC_PER_USEC;
|
s->exit_latency_ns = mul_u32_u32(s->exit_latency, NSEC_PER_USEC);
|
||||||
else if (s->exit_latency_ns < 0)
|
else if (s->exit_latency_ns < 0)
|
||||||
s->exit_latency_ns = 0;
|
s->exit_latency_ns = 0;
|
||||||
else
|
else
|
||||||
|
|
|
@ -77,7 +77,7 @@ static const char *get_filename(struct tegra_bpmp *bpmp,
|
||||||
|
|
||||||
root_path_buf = kzalloc(root_path_buf_len, GFP_KERNEL);
|
root_path_buf = kzalloc(root_path_buf_len, GFP_KERNEL);
|
||||||
if (!root_path_buf)
|
if (!root_path_buf)
|
||||||
goto out;
|
return NULL;
|
||||||
|
|
||||||
root_path = dentry_path(bpmp->debugfs_mirror, root_path_buf,
|
root_path = dentry_path(bpmp->debugfs_mirror, root_path_buf,
|
||||||
root_path_buf_len);
|
root_path_buf_len);
|
||||||
|
|
|
@ -778,8 +778,8 @@ static int kfd_ioctl_get_process_apertures_new(struct file *filp,
|
||||||
* nodes, but not more than args->num_of_nodes as that is
|
* nodes, but not more than args->num_of_nodes as that is
|
||||||
* the amount of memory allocated by user
|
* the amount of memory allocated by user
|
||||||
*/
|
*/
|
||||||
pa = kzalloc((sizeof(struct kfd_process_device_apertures) *
|
pa = kcalloc(args->num_of_nodes, sizeof(struct kfd_process_device_apertures),
|
||||||
args->num_of_nodes), GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
if (!pa)
|
if (!pa)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
|
|
@ -57,10 +57,10 @@ void mod_stats_update_event(struct mod_stats *mod_stats,
|
||||||
unsigned int length);
|
unsigned int length);
|
||||||
|
|
||||||
void mod_stats_update_flip(struct mod_stats *mod_stats,
|
void mod_stats_update_flip(struct mod_stats *mod_stats,
|
||||||
unsigned long timestamp_in_ns);
|
unsigned long long timestamp_in_ns);
|
||||||
|
|
||||||
void mod_stats_update_vupdate(struct mod_stats *mod_stats,
|
void mod_stats_update_vupdate(struct mod_stats *mod_stats,
|
||||||
unsigned long timestamp_in_ns);
|
unsigned long long timestamp_in_ns);
|
||||||
|
|
||||||
void mod_stats_update_freesync(struct mod_stats *mod_stats,
|
void mod_stats_update_freesync(struct mod_stats *mod_stats,
|
||||||
unsigned int v_total_min,
|
unsigned int v_total_min,
|
||||||
|
|
|
@ -193,13 +193,22 @@ int drm_mode_config_helper_suspend(struct drm_device *dev)
|
||||||
|
|
||||||
if (!dev)
|
if (!dev)
|
||||||
return 0;
|
return 0;
|
||||||
|
/*
|
||||||
|
* Don't disable polling if it was never initialized
|
||||||
|
*/
|
||||||
|
if (dev->mode_config.poll_enabled)
|
||||||
|
drm_kms_helper_poll_disable(dev);
|
||||||
|
|
||||||
drm_kms_helper_poll_disable(dev);
|
|
||||||
drm_fb_helper_set_suspend_unlocked(dev->fb_helper, 1);
|
drm_fb_helper_set_suspend_unlocked(dev->fb_helper, 1);
|
||||||
state = drm_atomic_helper_suspend(dev);
|
state = drm_atomic_helper_suspend(dev);
|
||||||
if (IS_ERR(state)) {
|
if (IS_ERR(state)) {
|
||||||
drm_fb_helper_set_suspend_unlocked(dev->fb_helper, 0);
|
drm_fb_helper_set_suspend_unlocked(dev->fb_helper, 0);
|
||||||
drm_kms_helper_poll_enable(dev);
|
/*
|
||||||
|
* Don't enable polling if it was never initialized
|
||||||
|
*/
|
||||||
|
if (dev->mode_config.poll_enabled)
|
||||||
|
drm_kms_helper_poll_enable(dev);
|
||||||
|
|
||||||
return PTR_ERR(state);
|
return PTR_ERR(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -239,7 +248,11 @@ int drm_mode_config_helper_resume(struct drm_device *dev)
|
||||||
dev->mode_config.suspend_state = NULL;
|
dev->mode_config.suspend_state = NULL;
|
||||||
|
|
||||||
drm_fb_helper_set_suspend_unlocked(dev->fb_helper, 0);
|
drm_fb_helper_set_suspend_unlocked(dev->fb_helper, 0);
|
||||||
drm_kms_helper_poll_enable(dev);
|
/*
|
||||||
|
* Don't enable polling if it is not initialized
|
||||||
|
*/
|
||||||
|
if (dev->mode_config.poll_enabled)
|
||||||
|
drm_kms_helper_poll_enable(dev);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,6 +117,12 @@ static const struct drm_dmi_panel_orientation_data lcd1080x1920_leftside_up = {
|
||||||
.orientation = DRM_MODE_PANEL_ORIENTATION_LEFT_UP,
|
.orientation = DRM_MODE_PANEL_ORIENTATION_LEFT_UP,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct drm_dmi_panel_orientation_data lcd1080x1920_rightside_up = {
|
||||||
|
.width = 1080,
|
||||||
|
.height = 1920,
|
||||||
|
.orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
|
||||||
|
};
|
||||||
|
|
||||||
static const struct drm_dmi_panel_orientation_data lcd1200x1920_rightside_up = {
|
static const struct drm_dmi_panel_orientation_data lcd1200x1920_rightside_up = {
|
||||||
.width = 1200,
|
.width = 1200,
|
||||||
.height = 1920,
|
.height = 1920,
|
||||||
|
@ -279,6 +285,12 @@ static const struct dmi_system_id orientation_data[] = {
|
||||||
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "G1618-03")
|
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "G1618-03")
|
||||||
},
|
},
|
||||||
.driver_data = (void *)&lcd720x1280_rightside_up,
|
.driver_data = (void *)&lcd720x1280_rightside_up,
|
||||||
|
}, { /* GPD Win Mini */
|
||||||
|
.matches = {
|
||||||
|
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "GPD"),
|
||||||
|
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "G1617-01")
|
||||||
|
},
|
||||||
|
.driver_data = (void *)&lcd1080x1920_rightside_up,
|
||||||
}, { /* I.T.Works TW891 */
|
}, { /* I.T.Works TW891 */
|
||||||
.matches = {
|
.matches = {
|
||||||
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."),
|
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."),
|
||||||
|
|
|
@ -293,14 +293,17 @@ static void reschedule_output_poll_work(struct drm_device *dev)
|
||||||
* Drivers can call this helper from their device resume implementation. It is
|
* Drivers can call this helper from their device resume implementation. It is
|
||||||
* not an error to call this even when output polling isn't enabled.
|
* not an error to call this even when output polling isn't enabled.
|
||||||
*
|
*
|
||||||
|
* If device polling was never initialized before, this call will trigger a
|
||||||
|
* warning and return.
|
||||||
|
*
|
||||||
* Note that calls to enable and disable polling must be strictly ordered, which
|
* Note that calls to enable and disable polling must be strictly ordered, which
|
||||||
* is automatically the case when they're only call from suspend/resume
|
* is automatically the case when they're only call from suspend/resume
|
||||||
* callbacks.
|
* callbacks.
|
||||||
*/
|
*/
|
||||||
void drm_kms_helper_poll_enable(struct drm_device *dev)
|
void drm_kms_helper_poll_enable(struct drm_device *dev)
|
||||||
{
|
{
|
||||||
if (!dev->mode_config.poll_enabled || !drm_kms_helper_poll ||
|
if (drm_WARN_ON_ONCE(dev, !dev->mode_config.poll_enabled) ||
|
||||||
dev->mode_config.poll_running)
|
!drm_kms_helper_poll || dev->mode_config.poll_running)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (drm_kms_helper_enable_hpd(dev) ||
|
if (drm_kms_helper_enable_hpd(dev) ||
|
||||||
|
@ -626,8 +629,12 @@ retry:
|
||||||
0);
|
0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Re-enable polling in case the global poll config changed. */
|
/*
|
||||||
drm_kms_helper_poll_enable(dev);
|
* Re-enable polling in case the global poll config changed but polling
|
||||||
|
* is still initialized.
|
||||||
|
*/
|
||||||
|
if (dev->mode_config.poll_enabled)
|
||||||
|
drm_kms_helper_poll_enable(dev);
|
||||||
|
|
||||||
if (connector->status == connector_status_disconnected) {
|
if (connector->status == connector_status_disconnected) {
|
||||||
DRM_DEBUG_KMS("[CONNECTOR:%d:%s] disconnected\n",
|
DRM_DEBUG_KMS("[CONNECTOR:%d:%s] disconnected\n",
|
||||||
|
@ -878,12 +885,18 @@ EXPORT_SYMBOL(drm_kms_helper_is_poll_worker);
|
||||||
* not an error to call this even when output polling isn't enabled or already
|
* not an error to call this even when output polling isn't enabled or already
|
||||||
* disabled. Polling is re-enabled by calling drm_kms_helper_poll_enable().
|
* disabled. Polling is re-enabled by calling drm_kms_helper_poll_enable().
|
||||||
*
|
*
|
||||||
|
* If however, the polling was never initialized, this call will trigger a
|
||||||
|
* warning and return
|
||||||
|
*
|
||||||
* Note that calls to enable and disable polling must be strictly ordered, which
|
* Note that calls to enable and disable polling must be strictly ordered, which
|
||||||
* is automatically the case when they're only call from suspend/resume
|
* is automatically the case when they're only call from suspend/resume
|
||||||
* callbacks.
|
* callbacks.
|
||||||
*/
|
*/
|
||||||
void drm_kms_helper_poll_disable(struct drm_device *dev)
|
void drm_kms_helper_poll_disable(struct drm_device *dev)
|
||||||
{
|
{
|
||||||
|
if (drm_WARN_ON(dev, !dev->mode_config.poll_enabled))
|
||||||
|
return;
|
||||||
|
|
||||||
if (dev->mode_config.poll_running)
|
if (dev->mode_config.poll_running)
|
||||||
drm_kms_helper_disable_hpd(dev);
|
drm_kms_helper_disable_hpd(dev);
|
||||||
|
|
||||||
|
|
|
@ -764,7 +764,7 @@ static int ttm_bo_mem_force_space(struct ttm_buffer_object *bo,
|
||||||
* This function may sleep while waiting for space to become available.
|
* This function may sleep while waiting for space to become available.
|
||||||
* Returns:
|
* Returns:
|
||||||
* -EBUSY: No space available (only if no_wait == 1).
|
* -EBUSY: No space available (only if no_wait == 1).
|
||||||
* -ENOMEM: Could not allocate memory for the buffer object, either due to
|
* -ENOSPC: Could not allocate space for the buffer object, either due to
|
||||||
* fragmentation or concurrent allocators.
|
* fragmentation or concurrent allocators.
|
||||||
* -ERESTARTSYS: An interruptible sleep was interrupted by a signal.
|
* -ERESTARTSYS: An interruptible sleep was interrupted by a signal.
|
||||||
*/
|
*/
|
||||||
|
@ -824,7 +824,7 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo,
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = -ENOMEM;
|
ret = -ENOSPC;
|
||||||
if (!type_found) {
|
if (!type_found) {
|
||||||
pr_err(TTM_PFX "No compatible memory type found\n");
|
pr_err(TTM_PFX "No compatible memory type found\n");
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
|
@ -910,6 +910,9 @@ int ttm_bo_validate(struct ttm_buffer_object *bo,
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
ret = ttm_bo_move_buffer(bo, placement, ctx);
|
ret = ttm_bo_move_buffer(bo, placement, ctx);
|
||||||
|
/* For backward compatibility with userspace */
|
||||||
|
if (ret == -ENOSPC)
|
||||||
|
return -ENOMEM;
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
|
|
@ -1505,9 +1505,6 @@ static int vc4_prepare_fb(struct drm_plane *plane,
|
||||||
|
|
||||||
drm_gem_plane_helper_prepare_fb(plane, state);
|
drm_gem_plane_helper_prepare_fb(plane, state);
|
||||||
|
|
||||||
if (plane->state->fb == state->fb)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
return vc4_bo_inc_usecnt(bo);
|
return vc4_bo_inc_usecnt(bo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1516,7 +1513,7 @@ static void vc4_cleanup_fb(struct drm_plane *plane,
|
||||||
{
|
{
|
||||||
struct vc4_bo *bo;
|
struct vc4_bo *bo;
|
||||||
|
|
||||||
if (plane->state->fb == state->fb || !state->fb)
|
if (!state->fb)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bo = to_vc4_bo(&drm_fb_dma_get_gem_obj(state->fb, 0)->base);
|
bo = to_vc4_bo(&drm_fb_dma_get_gem_obj(state->fb, 0)->base);
|
||||||
|
|
|
@ -427,6 +427,7 @@
|
||||||
#define I2C_DEVICE_ID_HP_SPECTRE_X360_14T_EA100_V1 0x2BED
|
#define I2C_DEVICE_ID_HP_SPECTRE_X360_14T_EA100_V1 0x2BED
|
||||||
#define I2C_DEVICE_ID_HP_SPECTRE_X360_14T_EA100_V2 0x2BEE
|
#define I2C_DEVICE_ID_HP_SPECTRE_X360_14T_EA100_V2 0x2BEE
|
||||||
#define I2C_DEVICE_ID_HP_ENVY_X360_15_EU0556NG 0x2D02
|
#define I2C_DEVICE_ID_HP_ENVY_X360_15_EU0556NG 0x2D02
|
||||||
|
#define I2C_DEVICE_ID_CHROMEBOOK_TROGDOR_POMPOM 0x2F81
|
||||||
|
|
||||||
#define USB_VENDOR_ID_ELECOM 0x056e
|
#define USB_VENDOR_ID_ELECOM 0x056e
|
||||||
#define USB_DEVICE_ID_ELECOM_BM084 0x0061
|
#define USB_DEVICE_ID_ELECOM_BM084 0x0061
|
||||||
|
|
|
@ -411,6 +411,8 @@ static const struct hid_device_id hid_battery_quirks[] = {
|
||||||
HID_BATTERY_QUIRK_IGNORE },
|
HID_BATTERY_QUIRK_IGNORE },
|
||||||
{ HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_HP_ENVY_X360_15_EU0556NG),
|
{ HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_HP_ENVY_X360_15_EU0556NG),
|
||||||
HID_BATTERY_QUIRK_IGNORE },
|
HID_BATTERY_QUIRK_IGNORE },
|
||||||
|
{ HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_CHROMEBOOK_TROGDOR_POMPOM),
|
||||||
|
HID_BATTERY_QUIRK_AVOID_QUERY },
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -318,7 +318,7 @@ struct dw_i2c_dev {
|
||||||
#define AMD_UCSI_INTR_EN 0xd
|
#define AMD_UCSI_INTR_EN 0xd
|
||||||
|
|
||||||
#define TXGBE_TX_FIFO_DEPTH 4
|
#define TXGBE_TX_FIFO_DEPTH 4
|
||||||
#define TXGBE_RX_FIFO_DEPTH 0
|
#define TXGBE_RX_FIFO_DEPTH 1
|
||||||
|
|
||||||
struct i2c_dw_semaphore_callbacks {
|
struct i2c_dw_semaphore_callbacks {
|
||||||
int (*probe)(struct dw_i2c_dev *dev);
|
int (*probe)(struct dw_i2c_dev *dev);
|
||||||
|
|
|
@ -34,6 +34,7 @@ MODULE_AUTHOR("Sean Hefty");
|
||||||
MODULE_DESCRIPTION("InfiniBand CM");
|
MODULE_DESCRIPTION("InfiniBand CM");
|
||||||
MODULE_LICENSE("Dual BSD/GPL");
|
MODULE_LICENSE("Dual BSD/GPL");
|
||||||
|
|
||||||
|
#define CM_DESTROY_ID_WAIT_TIMEOUT 10000 /* msecs */
|
||||||
static const char * const ibcm_rej_reason_strs[] = {
|
static const char * const ibcm_rej_reason_strs[] = {
|
||||||
[IB_CM_REJ_NO_QP] = "no QP",
|
[IB_CM_REJ_NO_QP] = "no QP",
|
||||||
[IB_CM_REJ_NO_EEC] = "no EEC",
|
[IB_CM_REJ_NO_EEC] = "no EEC",
|
||||||
|
@ -1025,10 +1026,20 @@ static void cm_reset_to_idle(struct cm_id_private *cm_id_priv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static noinline void cm_destroy_id_wait_timeout(struct ib_cm_id *cm_id)
|
||||||
|
{
|
||||||
|
struct cm_id_private *cm_id_priv;
|
||||||
|
|
||||||
|
cm_id_priv = container_of(cm_id, struct cm_id_private, id);
|
||||||
|
pr_err("%s: cm_id=%p timed out. state=%d refcnt=%d\n", __func__,
|
||||||
|
cm_id, cm_id->state, refcount_read(&cm_id_priv->refcount));
|
||||||
|
}
|
||||||
|
|
||||||
static void cm_destroy_id(struct ib_cm_id *cm_id, int err)
|
static void cm_destroy_id(struct ib_cm_id *cm_id, int err)
|
||||||
{
|
{
|
||||||
struct cm_id_private *cm_id_priv;
|
struct cm_id_private *cm_id_priv;
|
||||||
struct cm_work *work;
|
struct cm_work *work;
|
||||||
|
int ret;
|
||||||
|
|
||||||
cm_id_priv = container_of(cm_id, struct cm_id_private, id);
|
cm_id_priv = container_of(cm_id, struct cm_id_private, id);
|
||||||
spin_lock_irq(&cm_id_priv->lock);
|
spin_lock_irq(&cm_id_priv->lock);
|
||||||
|
@ -1135,7 +1146,14 @@ retest:
|
||||||
|
|
||||||
xa_erase(&cm.local_id_table, cm_local_id(cm_id->local_id));
|
xa_erase(&cm.local_id_table, cm_local_id(cm_id->local_id));
|
||||||
cm_deref_id(cm_id_priv);
|
cm_deref_id(cm_id_priv);
|
||||||
wait_for_completion(&cm_id_priv->comp);
|
do {
|
||||||
|
ret = wait_for_completion_timeout(&cm_id_priv->comp,
|
||||||
|
msecs_to_jiffies(
|
||||||
|
CM_DESTROY_ID_WAIT_TIMEOUT));
|
||||||
|
if (!ret) /* timeout happened */
|
||||||
|
cm_destroy_id_wait_timeout(cm_id);
|
||||||
|
} while (!ret);
|
||||||
|
|
||||||
while ((work = cm_dequeue_work(cm_id_priv)) != NULL)
|
while ((work = cm_dequeue_work(cm_id_priv)) != NULL)
|
||||||
cm_free_work(work);
|
cm_free_work(work);
|
||||||
|
|
||||||
|
|
|
@ -366,6 +366,8 @@ static const struct xpad_device {
|
||||||
{ 0x24c6, 0x5d04, "Razer Sabertooth", 0, XTYPE_XBOX360 },
|
{ 0x24c6, 0x5d04, "Razer Sabertooth", 0, XTYPE_XBOX360 },
|
||||||
{ 0x24c6, 0xfafe, "Rock Candy Gamepad for Xbox 360", 0, XTYPE_XBOX360 },
|
{ 0x24c6, 0xfafe, "Rock Candy Gamepad for Xbox 360", 0, XTYPE_XBOX360 },
|
||||||
{ 0x2563, 0x058d, "OneXPlayer Gamepad", 0, XTYPE_XBOX360 },
|
{ 0x2563, 0x058d, "OneXPlayer Gamepad", 0, XTYPE_XBOX360 },
|
||||||
|
{ 0x294b, 0x3303, "Snakebyte GAMEPAD BASE X", 0, XTYPE_XBOXONE },
|
||||||
|
{ 0x294b, 0x3404, "Snakebyte GAMEPAD RGB X", 0, XTYPE_XBOXONE },
|
||||||
{ 0x2dc8, 0x2000, "8BitDo Pro 2 Wired Controller fox Xbox", 0, XTYPE_XBOXONE },
|
{ 0x2dc8, 0x2000, "8BitDo Pro 2 Wired Controller fox Xbox", 0, XTYPE_XBOXONE },
|
||||||
{ 0x2dc8, 0x3106, "8BitDo Pro 2 Wired Controller", 0, XTYPE_XBOX360 },
|
{ 0x2dc8, 0x3106, "8BitDo Pro 2 Wired Controller", 0, XTYPE_XBOX360 },
|
||||||
{ 0x31e3, 0x1100, "Wooting One", 0, XTYPE_XBOX360 },
|
{ 0x31e3, 0x1100, "Wooting One", 0, XTYPE_XBOX360 },
|
||||||
|
@ -507,6 +509,7 @@ static const struct usb_device_id xpad_table[] = {
|
||||||
XPAD_XBOXONE_VENDOR(0x24c6), /* PowerA controllers */
|
XPAD_XBOXONE_VENDOR(0x24c6), /* PowerA controllers */
|
||||||
XPAD_XBOX360_VENDOR(0x2563), /* OneXPlayer Gamepad */
|
XPAD_XBOX360_VENDOR(0x2563), /* OneXPlayer Gamepad */
|
||||||
XPAD_XBOX360_VENDOR(0x260d), /* Dareu H101 */
|
XPAD_XBOX360_VENDOR(0x260d), /* Dareu H101 */
|
||||||
|
XPAD_XBOXONE_VENDOR(0x294b), /* Snakebyte */
|
||||||
XPAD_XBOX360_VENDOR(0x2c22), /* Qanba Controllers */
|
XPAD_XBOX360_VENDOR(0x2c22), /* Qanba Controllers */
|
||||||
XPAD_XBOX360_VENDOR(0x2dc8), /* 8BitDo Pro 2 Wired Controller */
|
XPAD_XBOX360_VENDOR(0x2dc8), /* 8BitDo Pro 2 Wired Controller */
|
||||||
XPAD_XBOXONE_VENDOR(0x2dc8), /* 8BitDo Pro 2 Wired Controller for Xbox */
|
XPAD_XBOXONE_VENDOR(0x2dc8), /* 8BitDo Pro 2 Wired Controller for Xbox */
|
||||||
|
|
|
@ -1196,7 +1196,11 @@ static int rmi_driver_probe(struct device *dev)
|
||||||
}
|
}
|
||||||
rmi_driver_set_input_params(rmi_dev, data->input);
|
rmi_driver_set_input_params(rmi_dev, data->input);
|
||||||
data->input->phys = devm_kasprintf(dev, GFP_KERNEL,
|
data->input->phys = devm_kasprintf(dev, GFP_KERNEL,
|
||||||
"%s/input0", dev_name(dev));
|
"%s/input0", dev_name(dev));
|
||||||
|
if (!data->input->phys) {
|
||||||
|
retval = -ENOMEM;
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
retval = rmi_init_functions(data);
|
retval = rmi_init_functions(data);
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0-only
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
|
||||||
|
#include <linux/bitfield.h>
|
||||||
#include <linux/bits.h>
|
#include <linux/bits.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/i2c.h>
|
#include <linux/i2c.h>
|
||||||
|
@ -23,12 +24,9 @@
|
||||||
#define IST3038C_I2C_RETRY_COUNT 3
|
#define IST3038C_I2C_RETRY_COUNT 3
|
||||||
#define IST3038C_MAX_FINGER_NUM 10
|
#define IST3038C_MAX_FINGER_NUM 10
|
||||||
#define IST3038C_X_MASK GENMASK(23, 12)
|
#define IST3038C_X_MASK GENMASK(23, 12)
|
||||||
#define IST3038C_X_SHIFT 12
|
|
||||||
#define IST3038C_Y_MASK GENMASK(11, 0)
|
#define IST3038C_Y_MASK GENMASK(11, 0)
|
||||||
#define IST3038C_AREA_MASK GENMASK(27, 24)
|
#define IST3038C_AREA_MASK GENMASK(27, 24)
|
||||||
#define IST3038C_AREA_SHIFT 24
|
|
||||||
#define IST3038C_FINGER_COUNT_MASK GENMASK(15, 12)
|
#define IST3038C_FINGER_COUNT_MASK GENMASK(15, 12)
|
||||||
#define IST3038C_FINGER_COUNT_SHIFT 12
|
|
||||||
#define IST3038C_FINGER_STATUS_MASK GENMASK(9, 0)
|
#define IST3038C_FINGER_STATUS_MASK GENMASK(9, 0)
|
||||||
|
|
||||||
struct imagis_ts {
|
struct imagis_ts {
|
||||||
|
@ -92,8 +90,7 @@ static irqreturn_t imagis_interrupt(int irq, void *dev_id)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
finger_count = (intr_message & IST3038C_FINGER_COUNT_MASK) >>
|
finger_count = FIELD_GET(IST3038C_FINGER_COUNT_MASK, intr_message);
|
||||||
IST3038C_FINGER_COUNT_SHIFT;
|
|
||||||
if (finger_count > IST3038C_MAX_FINGER_NUM) {
|
if (finger_count > IST3038C_MAX_FINGER_NUM) {
|
||||||
dev_err(&ts->client->dev,
|
dev_err(&ts->client->dev,
|
||||||
"finger count %d is more than maximum supported\n",
|
"finger count %d is more than maximum supported\n",
|
||||||
|
@ -101,7 +98,7 @@ static irqreturn_t imagis_interrupt(int irq, void *dev_id)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
finger_pressed = intr_message & IST3038C_FINGER_STATUS_MASK;
|
finger_pressed = FIELD_GET(IST3038C_FINGER_STATUS_MASK, intr_message);
|
||||||
|
|
||||||
for (i = 0; i < finger_count; i++) {
|
for (i = 0; i < finger_count; i++) {
|
||||||
error = imagis_i2c_read_reg(ts,
|
error = imagis_i2c_read_reg(ts,
|
||||||
|
@ -118,12 +115,11 @@ static irqreturn_t imagis_interrupt(int irq, void *dev_id)
|
||||||
input_mt_report_slot_state(ts->input_dev, MT_TOOL_FINGER,
|
input_mt_report_slot_state(ts->input_dev, MT_TOOL_FINGER,
|
||||||
finger_pressed & BIT(i));
|
finger_pressed & BIT(i));
|
||||||
touchscreen_report_pos(ts->input_dev, &ts->prop,
|
touchscreen_report_pos(ts->input_dev, &ts->prop,
|
||||||
(finger_status & IST3038C_X_MASK) >>
|
FIELD_GET(IST3038C_X_MASK, finger_status),
|
||||||
IST3038C_X_SHIFT,
|
FIELD_GET(IST3038C_Y_MASK, finger_status),
|
||||||
finger_status & IST3038C_Y_MASK, 1);
|
true);
|
||||||
input_report_abs(ts->input_dev, ABS_MT_TOUCH_MAJOR,
|
input_report_abs(ts->input_dev, ABS_MT_TOUCH_MAJOR,
|
||||||
(finger_status & IST3038C_AREA_MASK) >>
|
FIELD_GET(IST3038C_AREA_MASK, finger_status));
|
||||||
IST3038C_AREA_SHIFT);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
input_mt_sync_frame(ts->input_dev);
|
input_mt_sync_frame(ts->input_dev);
|
||||||
|
@ -210,7 +206,7 @@ static int imagis_init_input_dev(struct imagis_ts *ts)
|
||||||
|
|
||||||
input_set_capability(input_dev, EV_ABS, ABS_MT_POSITION_X);
|
input_set_capability(input_dev, EV_ABS, ABS_MT_POSITION_X);
|
||||||
input_set_capability(input_dev, EV_ABS, ABS_MT_POSITION_Y);
|
input_set_capability(input_dev, EV_ABS, ABS_MT_POSITION_Y);
|
||||||
input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0);
|
input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0, 16, 0, 0);
|
||||||
|
|
||||||
touchscreen_parse_properties(input_dev, true, &ts->prop);
|
touchscreen_parse_properties(input_dev, true, &ts->prop);
|
||||||
if (!ts->prop.max_x || !ts->prop.max_y) {
|
if (!ts->prop.max_x || !ts->prop.max_y) {
|
||||||
|
|
|
@ -757,7 +757,7 @@ static const struct video_device video_dev_template = {
|
||||||
/**
|
/**
|
||||||
* vip_irq - interrupt routine
|
* vip_irq - interrupt routine
|
||||||
* @irq: Number of interrupt ( not used, correct number is assumed )
|
* @irq: Number of interrupt ( not used, correct number is assumed )
|
||||||
* @vip: local data structure containing all information
|
* @data: local data structure containing all information
|
||||||
*
|
*
|
||||||
* check for both frame interrupts set ( top and bottom ).
|
* check for both frame interrupts set ( top and bottom ).
|
||||||
* check FIFO overflow, but limit number of log messages after open.
|
* check FIFO overflow, but limit number of log messages after open.
|
||||||
|
@ -767,8 +767,9 @@ static const struct video_device video_dev_template = {
|
||||||
*
|
*
|
||||||
* IRQ_HANDLED, interrupt done.
|
* IRQ_HANDLED, interrupt done.
|
||||||
*/
|
*/
|
||||||
static irqreturn_t vip_irq(int irq, struct sta2x11_vip *vip)
|
static irqreturn_t vip_irq(int irq, void *data)
|
||||||
{
|
{
|
||||||
|
struct sta2x11_vip *vip = data;
|
||||||
unsigned int status;
|
unsigned int status;
|
||||||
|
|
||||||
status = reg_read(vip, DVP_ITS);
|
status = reg_read(vip, DVP_ITS);
|
||||||
|
@ -1053,9 +1054,7 @@ static int sta2x11_vip_init_one(struct pci_dev *pdev,
|
||||||
|
|
||||||
spin_lock_init(&vip->slock);
|
spin_lock_init(&vip->slock);
|
||||||
|
|
||||||
ret = request_irq(pdev->irq,
|
ret = request_irq(pdev->irq, vip_irq, IRQF_SHARED, KBUILD_MODNAME, vip);
|
||||||
(irq_handler_t) vip_irq,
|
|
||||||
IRQF_SHARED, KBUILD_MODNAME, vip);
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(&pdev->dev, "request_irq failed\n");
|
dev_err(&pdev->dev, "request_irq failed\n");
|
||||||
ret = -ENODEV;
|
ret = -ENODEV;
|
||||||
|
|
|
@ -50,12 +50,12 @@ static void mtk_vcodec_vpu_reset_dec_handler(void *priv)
|
||||||
|
|
||||||
dev_err(&dev->plat_dev->dev, "Watchdog timeout!!");
|
dev_err(&dev->plat_dev->dev, "Watchdog timeout!!");
|
||||||
|
|
||||||
mutex_lock(&dev->dev_mutex);
|
mutex_lock(&dev->dev_ctx_lock);
|
||||||
list_for_each_entry(ctx, &dev->ctx_list, list) {
|
list_for_each_entry(ctx, &dev->ctx_list, list) {
|
||||||
ctx->state = MTK_STATE_ABORT;
|
ctx->state = MTK_STATE_ABORT;
|
||||||
mtk_v4l2_vdec_dbg(0, ctx, "[%d] Change to state MTK_STATE_ABORT", ctx->id);
|
mtk_v4l2_vdec_dbg(0, ctx, "[%d] Change to state MTK_STATE_ABORT", ctx->id);
|
||||||
}
|
}
|
||||||
mutex_unlock(&dev->dev_mutex);
|
mutex_unlock(&dev->dev_ctx_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mtk_vcodec_vpu_reset_enc_handler(void *priv)
|
static void mtk_vcodec_vpu_reset_enc_handler(void *priv)
|
||||||
|
@ -65,12 +65,12 @@ static void mtk_vcodec_vpu_reset_enc_handler(void *priv)
|
||||||
|
|
||||||
dev_err(&dev->plat_dev->dev, "Watchdog timeout!!");
|
dev_err(&dev->plat_dev->dev, "Watchdog timeout!!");
|
||||||
|
|
||||||
mutex_lock(&dev->dev_mutex);
|
mutex_lock(&dev->dev_ctx_lock);
|
||||||
list_for_each_entry(ctx, &dev->ctx_list, list) {
|
list_for_each_entry(ctx, &dev->ctx_list, list) {
|
||||||
ctx->state = MTK_STATE_ABORT;
|
ctx->state = MTK_STATE_ABORT;
|
||||||
mtk_v4l2_vdec_dbg(0, ctx, "[%d] Change to state MTK_STATE_ABORT", ctx->id);
|
mtk_v4l2_vdec_dbg(0, ctx, "[%d] Change to state MTK_STATE_ABORT", ctx->id);
|
||||||
}
|
}
|
||||||
mutex_unlock(&dev->dev_mutex);
|
mutex_unlock(&dev->dev_ctx_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct mtk_vcodec_fw_ops mtk_vcodec_vpu_msg = {
|
static const struct mtk_vcodec_fw_ops mtk_vcodec_vpu_msg = {
|
||||||
|
|
|
@ -268,7 +268,9 @@ static int fops_vcodec_open(struct file *file)
|
||||||
|
|
||||||
ctx->dev->vdec_pdata->init_vdec_params(ctx);
|
ctx->dev->vdec_pdata->init_vdec_params(ctx);
|
||||||
|
|
||||||
|
mutex_lock(&dev->dev_ctx_lock);
|
||||||
list_add(&ctx->list, &dev->ctx_list);
|
list_add(&ctx->list, &dev->ctx_list);
|
||||||
|
mutex_unlock(&dev->dev_ctx_lock);
|
||||||
mtk_vcodec_dbgfs_create(ctx);
|
mtk_vcodec_dbgfs_create(ctx);
|
||||||
|
|
||||||
mutex_unlock(&dev->dev_mutex);
|
mutex_unlock(&dev->dev_mutex);
|
||||||
|
@ -311,7 +313,9 @@ static int fops_vcodec_release(struct file *file)
|
||||||
v4l2_ctrl_handler_free(&ctx->ctrl_hdl);
|
v4l2_ctrl_handler_free(&ctx->ctrl_hdl);
|
||||||
|
|
||||||
mtk_vcodec_dbgfs_remove(dev, ctx->id);
|
mtk_vcodec_dbgfs_remove(dev, ctx->id);
|
||||||
|
mutex_lock(&dev->dev_ctx_lock);
|
||||||
list_del_init(&ctx->list);
|
list_del_init(&ctx->list);
|
||||||
|
mutex_unlock(&dev->dev_ctx_lock);
|
||||||
kfree(ctx);
|
kfree(ctx);
|
||||||
mutex_unlock(&dev->dev_mutex);
|
mutex_unlock(&dev->dev_mutex);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -378,6 +382,7 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
|
||||||
for (i = 0; i < MTK_VDEC_HW_MAX; i++)
|
for (i = 0; i < MTK_VDEC_HW_MAX; i++)
|
||||||
mutex_init(&dev->dec_mutex[i]);
|
mutex_init(&dev->dec_mutex[i]);
|
||||||
mutex_init(&dev->dev_mutex);
|
mutex_init(&dev->dev_mutex);
|
||||||
|
mutex_init(&dev->dev_ctx_lock);
|
||||||
spin_lock_init(&dev->irqlock);
|
spin_lock_init(&dev->irqlock);
|
||||||
|
|
||||||
snprintf(dev->v4l2_dev.name, sizeof(dev->v4l2_dev.name), "%s",
|
snprintf(dev->v4l2_dev.name, sizeof(dev->v4l2_dev.name), "%s",
|
||||||
|
|
|
@ -231,6 +231,7 @@ struct mtk_vcodec_dec_ctx {
|
||||||
*
|
*
|
||||||
* @dec_mutex: decoder hardware lock
|
* @dec_mutex: decoder hardware lock
|
||||||
* @dev_mutex: video_device lock
|
* @dev_mutex: video_device lock
|
||||||
|
* @dev_ctx_lock: the lock of context list
|
||||||
* @decode_workqueue: decode work queue
|
* @decode_workqueue: decode work queue
|
||||||
*
|
*
|
||||||
* @irqlock: protect data access by irq handler and work thread
|
* @irqlock: protect data access by irq handler and work thread
|
||||||
|
@ -270,6 +271,7 @@ struct mtk_vcodec_dec_dev {
|
||||||
/* decoder hardware mutex lock */
|
/* decoder hardware mutex lock */
|
||||||
struct mutex dec_mutex[MTK_VDEC_HW_MAX];
|
struct mutex dec_mutex[MTK_VDEC_HW_MAX];
|
||||||
struct mutex dev_mutex;
|
struct mutex dev_mutex;
|
||||||
|
struct mutex dev_ctx_lock;
|
||||||
struct workqueue_struct *decode_workqueue;
|
struct workqueue_struct *decode_workqueue;
|
||||||
|
|
||||||
spinlock_t irqlock;
|
spinlock_t irqlock;
|
||||||
|
|
|
@ -869,7 +869,6 @@ static int vdec_hevc_slice_init(struct mtk_vcodec_dec_ctx *ctx)
|
||||||
inst->vpu.codec_type = ctx->current_codec;
|
inst->vpu.codec_type = ctx->current_codec;
|
||||||
inst->vpu.capture_type = ctx->capture_fourcc;
|
inst->vpu.capture_type = ctx->capture_fourcc;
|
||||||
|
|
||||||
ctx->drv_handle = inst;
|
|
||||||
err = vpu_dec_init(&inst->vpu);
|
err = vpu_dec_init(&inst->vpu);
|
||||||
if (err) {
|
if (err) {
|
||||||
mtk_vdec_err(ctx, "vdec_hevc init err=%d", err);
|
mtk_vdec_err(ctx, "vdec_hevc init err=%d", err);
|
||||||
|
@ -898,6 +897,7 @@ static int vdec_hevc_slice_init(struct mtk_vcodec_dec_ctx *ctx)
|
||||||
mtk_vdec_debug(ctx, "lat hevc instance >> %p, codec_type = 0x%x",
|
mtk_vdec_debug(ctx, "lat hevc instance >> %p, codec_type = 0x%x",
|
||||||
inst, inst->vpu.codec_type);
|
inst, inst->vpu.codec_type);
|
||||||
|
|
||||||
|
ctx->drv_handle = inst;
|
||||||
return 0;
|
return 0;
|
||||||
error_free_inst:
|
error_free_inst:
|
||||||
kfree(inst);
|
kfree(inst);
|
||||||
|
|
|
@ -77,12 +77,14 @@ static bool vpu_dec_check_ap_inst(struct mtk_vcodec_dec_dev *dec_dev, struct vde
|
||||||
struct mtk_vcodec_dec_ctx *ctx;
|
struct mtk_vcodec_dec_ctx *ctx;
|
||||||
int ret = false;
|
int ret = false;
|
||||||
|
|
||||||
|
mutex_lock(&dec_dev->dev_ctx_lock);
|
||||||
list_for_each_entry(ctx, &dec_dev->ctx_list, list) {
|
list_for_each_entry(ctx, &dec_dev->ctx_list, list) {
|
||||||
if (!IS_ERR_OR_NULL(ctx) && ctx->vpu_inst == vpu) {
|
if (!IS_ERR_OR_NULL(ctx) && ctx->vpu_inst == vpu) {
|
||||||
ret = true;
|
ret = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
mutex_unlock(&dec_dev->dev_ctx_lock);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -177,7 +177,9 @@ static int fops_vcodec_open(struct file *file)
|
||||||
mtk_v4l2_venc_dbg(2, ctx, "Create instance [%d]@%p m2m_ctx=%p ",
|
mtk_v4l2_venc_dbg(2, ctx, "Create instance [%d]@%p m2m_ctx=%p ",
|
||||||
ctx->id, ctx, ctx->m2m_ctx);
|
ctx->id, ctx, ctx->m2m_ctx);
|
||||||
|
|
||||||
|
mutex_lock(&dev->dev_ctx_lock);
|
||||||
list_add(&ctx->list, &dev->ctx_list);
|
list_add(&ctx->list, &dev->ctx_list);
|
||||||
|
mutex_unlock(&dev->dev_ctx_lock);
|
||||||
|
|
||||||
mutex_unlock(&dev->dev_mutex);
|
mutex_unlock(&dev->dev_mutex);
|
||||||
mtk_v4l2_venc_dbg(0, ctx, "%s encoder [%d]", dev_name(&dev->plat_dev->dev),
|
mtk_v4l2_venc_dbg(0, ctx, "%s encoder [%d]", dev_name(&dev->plat_dev->dev),
|
||||||
|
@ -212,7 +214,9 @@ static int fops_vcodec_release(struct file *file)
|
||||||
v4l2_fh_exit(&ctx->fh);
|
v4l2_fh_exit(&ctx->fh);
|
||||||
v4l2_ctrl_handler_free(&ctx->ctrl_hdl);
|
v4l2_ctrl_handler_free(&ctx->ctrl_hdl);
|
||||||
|
|
||||||
|
mutex_lock(&dev->dev_ctx_lock);
|
||||||
list_del_init(&ctx->list);
|
list_del_init(&ctx->list);
|
||||||
|
mutex_unlock(&dev->dev_ctx_lock);
|
||||||
kfree(ctx);
|
kfree(ctx);
|
||||||
mutex_unlock(&dev->dev_mutex);
|
mutex_unlock(&dev->dev_mutex);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -294,6 +298,7 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
mutex_init(&dev->enc_mutex);
|
mutex_init(&dev->enc_mutex);
|
||||||
mutex_init(&dev->dev_mutex);
|
mutex_init(&dev->dev_mutex);
|
||||||
|
mutex_init(&dev->dev_ctx_lock);
|
||||||
spin_lock_init(&dev->irqlock);
|
spin_lock_init(&dev->irqlock);
|
||||||
|
|
||||||
snprintf(dev->v4l2_dev.name, sizeof(dev->v4l2_dev.name), "%s",
|
snprintf(dev->v4l2_dev.name, sizeof(dev->v4l2_dev.name), "%s",
|
||||||
|
|
|
@ -178,6 +178,7 @@ struct mtk_vcodec_enc_ctx {
|
||||||
*
|
*
|
||||||
* @enc_mutex: encoder hardware lock.
|
* @enc_mutex: encoder hardware lock.
|
||||||
* @dev_mutex: video_device lock
|
* @dev_mutex: video_device lock
|
||||||
|
* @dev_ctx_lock: the lock of context list
|
||||||
* @encode_workqueue: encode work queue
|
* @encode_workqueue: encode work queue
|
||||||
*
|
*
|
||||||
* @enc_irq: h264 encoder irq resource
|
* @enc_irq: h264 encoder irq resource
|
||||||
|
@ -205,6 +206,7 @@ struct mtk_vcodec_enc_dev {
|
||||||
/* encoder hardware mutex lock */
|
/* encoder hardware mutex lock */
|
||||||
struct mutex enc_mutex;
|
struct mutex enc_mutex;
|
||||||
struct mutex dev_mutex;
|
struct mutex dev_mutex;
|
||||||
|
struct mutex dev_ctx_lock;
|
||||||
struct workqueue_struct *encode_workqueue;
|
struct workqueue_struct *encode_workqueue;
|
||||||
|
|
||||||
int enc_irq;
|
int enc_irq;
|
||||||
|
|
|
@ -47,12 +47,14 @@ static bool vpu_enc_check_ap_inst(struct mtk_vcodec_enc_dev *enc_dev, struct ven
|
||||||
struct mtk_vcodec_enc_ctx *ctx;
|
struct mtk_vcodec_enc_ctx *ctx;
|
||||||
int ret = false;
|
int ret = false;
|
||||||
|
|
||||||
|
mutex_lock(&enc_dev->dev_ctx_lock);
|
||||||
list_for_each_entry(ctx, &enc_dev->ctx_list, list) {
|
list_for_each_entry(ctx, &enc_dev->ctx_list, list) {
|
||||||
if (!IS_ERR_OR_NULL(ctx) && ctx->vpu_inst == vpu) {
|
if (!IS_ERR_OR_NULL(ctx) && ctx->vpu_inst == vpu) {
|
||||||
ret = true;
|
ret = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
mutex_unlock(&enc_dev->dev_ctx_lock);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -234,7 +234,8 @@ static int dg_dispatch_as_host(u32 context_id, struct vmci_datagram *dg)
|
||||||
|
|
||||||
dg_info->in_dg_host_queue = true;
|
dg_info->in_dg_host_queue = true;
|
||||||
dg_info->entry = dst_entry;
|
dg_info->entry = dst_entry;
|
||||||
memcpy(&dg_info->msg, dg, dg_size);
|
dg_info->msg = *dg;
|
||||||
|
memcpy(&dg_info->msg_payload, dg + 1, dg->payload_size);
|
||||||
|
|
||||||
INIT_WORK(&dg_info->work, dg_delayed_dispatch);
|
INIT_WORK(&dg_info->work, dg_delayed_dispatch);
|
||||||
schedule_work(&dg_info->work);
|
schedule_work(&dg_info->work);
|
||||||
|
@ -377,7 +378,8 @@ int vmci_datagram_invoke_guest_handler(struct vmci_datagram *dg)
|
||||||
|
|
||||||
dg_info->in_dg_host_queue = false;
|
dg_info->in_dg_host_queue = false;
|
||||||
dg_info->entry = dst_entry;
|
dg_info->entry = dst_entry;
|
||||||
memcpy(&dg_info->msg, dg, VMCI_DG_SIZE(dg));
|
dg_info->msg = *dg;
|
||||||
|
memcpy(&dg_info->msg_payload, dg + 1, dg->payload_size);
|
||||||
|
|
||||||
INIT_WORK(&dg_info->work, dg_delayed_dispatch);
|
INIT_WORK(&dg_info->work, dg_delayed_dispatch);
|
||||||
schedule_work(&dg_info->work);
|
schedule_work(&dg_info->work);
|
||||||
|
|
|
@ -71,6 +71,7 @@ static int dummy_dev_init(struct net_device *dev)
|
||||||
if (!dev->lstats)
|
if (!dev->lstats)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
netdev_lockdep_set_classes(dev);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -147,10 +147,11 @@ void bnx2x_fill_fw_str(struct bnx2x *bp, char *buf, size_t buf_len)
|
||||||
|
|
||||||
phy_fw_ver[0] = '\0';
|
phy_fw_ver[0] = '\0';
|
||||||
bnx2x_get_ext_phy_fw_version(&bp->link_params,
|
bnx2x_get_ext_phy_fw_version(&bp->link_params,
|
||||||
phy_fw_ver, PHY_FW_VER_LEN);
|
phy_fw_ver, sizeof(phy_fw_ver));
|
||||||
strscpy(buf, bp->fw_ver, buf_len);
|
/* This may become truncated. */
|
||||||
snprintf(buf + strlen(bp->fw_ver), 32 - strlen(bp->fw_ver),
|
scnprintf(buf, buf_len,
|
||||||
"bc %d.%d.%d%s%s",
|
"%sbc %d.%d.%d%s%s",
|
||||||
|
bp->fw_ver,
|
||||||
(bp->common.bc_ver & 0xff0000) >> 16,
|
(bp->common.bc_ver & 0xff0000) >> 16,
|
||||||
(bp->common.bc_ver & 0xff00) >> 8,
|
(bp->common.bc_ver & 0xff00) >> 8,
|
||||||
(bp->common.bc_ver & 0xff),
|
(bp->common.bc_ver & 0xff),
|
||||||
|
|
|
@ -1132,7 +1132,7 @@ static void bnx2x_get_drvinfo(struct net_device *dev,
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(version, 0, sizeof(version));
|
memset(version, 0, sizeof(version));
|
||||||
bnx2x_fill_fw_str(bp, version, ETHTOOL_FWVERS_LEN);
|
bnx2x_fill_fw_str(bp, version, sizeof(version));
|
||||||
strlcat(info->fw_version, version, sizeof(info->fw_version));
|
strlcat(info->fw_version, version, sizeof(info->fw_version));
|
||||||
|
|
||||||
strscpy(info->bus_info, pci_name(bp->pdev), sizeof(info->bus_info));
|
strscpy(info->bus_info, pci_name(bp->pdev), sizeof(info->bus_info));
|
||||||
|
|
|
@ -6163,8 +6163,8 @@ static void bnx2x_link_int_ack(struct link_params *params,
|
||||||
|
|
||||||
static int bnx2x_null_format_ver(u32 spirom_ver, u8 *str, u16 *len)
|
static int bnx2x_null_format_ver(u32 spirom_ver, u8 *str, u16 *len)
|
||||||
{
|
{
|
||||||
str[0] = '\0';
|
if (*len)
|
||||||
(*len)--;
|
str[0] = '\0';
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6173,7 +6173,7 @@ static int bnx2x_format_ver(u32 num, u8 *str, u16 *len)
|
||||||
u16 ret;
|
u16 ret;
|
||||||
|
|
||||||
if (*len < 10) {
|
if (*len < 10) {
|
||||||
/* Need more than 10chars for this format */
|
/* Need more than 10 chars for this format */
|
||||||
bnx2x_null_format_ver(num, str, len);
|
bnx2x_null_format_ver(num, str, len);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
@ -6188,8 +6188,8 @@ static int bnx2x_3_seq_format_ver(u32 num, u8 *str, u16 *len)
|
||||||
{
|
{
|
||||||
u16 ret;
|
u16 ret;
|
||||||
|
|
||||||
if (*len < 10) {
|
if (*len < 9) {
|
||||||
/* Need more than 10chars for this format */
|
/* Need more than 9 chars for this format */
|
||||||
bnx2x_null_format_ver(num, str, len);
|
bnx2x_null_format_ver(num, str, len);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
@ -6208,7 +6208,7 @@ int bnx2x_get_ext_phy_fw_version(struct link_params *params, u8 *version,
|
||||||
int status = 0;
|
int status = 0;
|
||||||
u8 *ver_p = version;
|
u8 *ver_p = version;
|
||||||
u16 remain_len = len;
|
u16 remain_len = len;
|
||||||
if (version == NULL || params == NULL)
|
if (version == NULL || params == NULL || len == 0)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
bp = params->bp;
|
bp = params->bp;
|
||||||
|
|
||||||
|
@ -11546,7 +11546,7 @@ static int bnx2x_7101_format_ver(u32 spirom_ver, u8 *str, u16 *len)
|
||||||
str[2] = (spirom_ver & 0xFF0000) >> 16;
|
str[2] = (spirom_ver & 0xFF0000) >> 16;
|
||||||
str[3] = (spirom_ver & 0xFF000000) >> 24;
|
str[3] = (spirom_ver & 0xFF000000) >> 24;
|
||||||
str[4] = '\0';
|
str[4] = '\0';
|
||||||
*len -= 5;
|
*len -= 4;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -496,7 +496,7 @@ static int ice_vc_get_vf_res_msg(struct ice_vf *vf, u8 *msg)
|
||||||
vfres->rss_lut_size = ICE_LUT_VSI_SIZE;
|
vfres->rss_lut_size = ICE_LUT_VSI_SIZE;
|
||||||
vfres->max_mtu = ice_vc_get_max_frame_size(vf);
|
vfres->max_mtu = ice_vc_get_max_frame_size(vf);
|
||||||
|
|
||||||
vfres->vsi_res[0].vsi_id = vf->lan_vsi_num;
|
vfres->vsi_res[0].vsi_id = ICE_VF_VSI_ID;
|
||||||
vfres->vsi_res[0].vsi_type = VIRTCHNL_VSI_SRIOV;
|
vfres->vsi_res[0].vsi_type = VIRTCHNL_VSI_SRIOV;
|
||||||
vfres->vsi_res[0].num_queue_pairs = vsi->num_txq;
|
vfres->vsi_res[0].num_queue_pairs = vsi->num_txq;
|
||||||
ether_addr_copy(vfres->vsi_res[0].default_mac_addr,
|
ether_addr_copy(vfres->vsi_res[0].default_mac_addr,
|
||||||
|
@ -542,12 +542,7 @@ static void ice_vc_reset_vf_msg(struct ice_vf *vf)
|
||||||
*/
|
*/
|
||||||
bool ice_vc_isvalid_vsi_id(struct ice_vf *vf, u16 vsi_id)
|
bool ice_vc_isvalid_vsi_id(struct ice_vf *vf, u16 vsi_id)
|
||||||
{
|
{
|
||||||
struct ice_pf *pf = vf->pf;
|
return vsi_id == ICE_VF_VSI_ID;
|
||||||
struct ice_vsi *vsi;
|
|
||||||
|
|
||||||
vsi = ice_find_vsi(pf, vsi_id);
|
|
||||||
|
|
||||||
return (vsi && (vsi->vf == vf));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -19,6 +19,15 @@
|
||||||
#define ICE_MAX_MACADDR_PER_VF 18
|
#define ICE_MAX_MACADDR_PER_VF 18
|
||||||
#define ICE_FLEX_DESC_RXDID_MAX_NUM 64
|
#define ICE_FLEX_DESC_RXDID_MAX_NUM 64
|
||||||
|
|
||||||
|
/* VFs only get a single VSI. For ice hardware, the VF does not need to know
|
||||||
|
* its VSI index. However, the virtchnl interface requires a VSI number,
|
||||||
|
* mainly due to legacy hardware.
|
||||||
|
*
|
||||||
|
* Since the VF doesn't need this information, report a static value to the VF
|
||||||
|
* instead of leaking any information about the PF or hardware setup.
|
||||||
|
*/
|
||||||
|
#define ICE_VF_VSI_ID 1
|
||||||
|
|
||||||
struct ice_virtchnl_ops {
|
struct ice_virtchnl_ops {
|
||||||
int (*get_ver_msg)(struct ice_vf *vf, u8 *msg);
|
int (*get_ver_msg)(struct ice_vf *vf, u8 *msg);
|
||||||
int (*get_vf_res_msg)(struct ice_vf *vf, u8 *msg);
|
int (*get_vf_res_msg)(struct ice_vf *vf, u8 *msg);
|
||||||
|
|
|
@ -3468,9 +3468,12 @@ static int ionic_lif_adminq_init(struct ionic_lif *lif)
|
||||||
|
|
||||||
napi_enable(&qcq->napi);
|
napi_enable(&qcq->napi);
|
||||||
|
|
||||||
if (qcq->flags & IONIC_QCQ_F_INTR)
|
if (qcq->flags & IONIC_QCQ_F_INTR) {
|
||||||
|
irq_set_affinity_hint(qcq->intr.vector,
|
||||||
|
&qcq->intr.affinity_mask);
|
||||||
ionic_intr_mask(idev->intr_ctrl, qcq->intr.index,
|
ionic_intr_mask(idev->intr_ctrl, qcq->intr.index,
|
||||||
IONIC_INTR_MASK_CLEAR);
|
IONIC_INTR_MASK_CLEAR);
|
||||||
|
}
|
||||||
|
|
||||||
qcq->flags |= IONIC_QCQ_F_INITED;
|
qcq->flags |= IONIC_QCQ_F_INITED;
|
||||||
|
|
||||||
|
|
|
@ -165,9 +165,9 @@ config DWMAC_STARFIVE
|
||||||
help
|
help
|
||||||
Support for ethernet controllers on StarFive RISC-V SoCs
|
Support for ethernet controllers on StarFive RISC-V SoCs
|
||||||
|
|
||||||
This selects the StarFive platform specific glue layer support for
|
This selects the StarFive platform specific glue layer support
|
||||||
the stmmac device driver. This driver is used for StarFive JH7110
|
for the stmmac device driver. This driver is used for the
|
||||||
ethernet controller.
|
StarFive JH7100 and JH7110 ethernet controllers.
|
||||||
|
|
||||||
config DWMAC_STI
|
config DWMAC_STI
|
||||||
tristate "STi GMAC support"
|
tristate "STi GMAC support"
|
||||||
|
|
|
@ -15,13 +15,20 @@
|
||||||
|
|
||||||
#include "stmmac_platform.h"
|
#include "stmmac_platform.h"
|
||||||
|
|
||||||
#define STARFIVE_DWMAC_PHY_INFT_RGMII 0x1
|
#define STARFIVE_DWMAC_PHY_INFT_RGMII 0x1
|
||||||
#define STARFIVE_DWMAC_PHY_INFT_RMII 0x4
|
#define STARFIVE_DWMAC_PHY_INFT_RMII 0x4
|
||||||
#define STARFIVE_DWMAC_PHY_INFT_FIELD 0x7U
|
#define STARFIVE_DWMAC_PHY_INFT_FIELD 0x7U
|
||||||
|
|
||||||
|
#define JH7100_SYSMAIN_REGISTER49_DLYCHAIN 0xc8
|
||||||
|
|
||||||
|
struct starfive_dwmac_data {
|
||||||
|
unsigned int gtxclk_dlychain;
|
||||||
|
};
|
||||||
|
|
||||||
struct starfive_dwmac {
|
struct starfive_dwmac {
|
||||||
struct device *dev;
|
struct device *dev;
|
||||||
struct clk *clk_tx;
|
struct clk *clk_tx;
|
||||||
|
const struct starfive_dwmac_data *data;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void starfive_dwmac_fix_mac_speed(void *priv, unsigned int speed, unsigned int mode)
|
static void starfive_dwmac_fix_mac_speed(void *priv, unsigned int speed, unsigned int mode)
|
||||||
|
@ -67,6 +74,8 @@ static int starfive_dwmac_set_mode(struct plat_stmmacenet_data *plat_dat)
|
||||||
|
|
||||||
case PHY_INTERFACE_MODE_RGMII:
|
case PHY_INTERFACE_MODE_RGMII:
|
||||||
case PHY_INTERFACE_MODE_RGMII_ID:
|
case PHY_INTERFACE_MODE_RGMII_ID:
|
||||||
|
case PHY_INTERFACE_MODE_RGMII_RXID:
|
||||||
|
case PHY_INTERFACE_MODE_RGMII_TXID:
|
||||||
mode = STARFIVE_DWMAC_PHY_INFT_RGMII;
|
mode = STARFIVE_DWMAC_PHY_INFT_RGMII;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -89,6 +98,14 @@ static int starfive_dwmac_set_mode(struct plat_stmmacenet_data *plat_dat)
|
||||||
if (err)
|
if (err)
|
||||||
return dev_err_probe(dwmac->dev, err, "error setting phy mode\n");
|
return dev_err_probe(dwmac->dev, err, "error setting phy mode\n");
|
||||||
|
|
||||||
|
if (dwmac->data) {
|
||||||
|
err = regmap_write(regmap, JH7100_SYSMAIN_REGISTER49_DLYCHAIN,
|
||||||
|
dwmac->data->gtxclk_dlychain);
|
||||||
|
if (err)
|
||||||
|
return dev_err_probe(dwmac->dev, err,
|
||||||
|
"error selecting gtxclk delay chain\n");
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,6 +131,8 @@ static int starfive_dwmac_probe(struct platform_device *pdev)
|
||||||
if (!dwmac)
|
if (!dwmac)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
dwmac->data = device_get_match_data(&pdev->dev);
|
||||||
|
|
||||||
dwmac->clk_tx = devm_clk_get_enabled(&pdev->dev, "tx");
|
dwmac->clk_tx = devm_clk_get_enabled(&pdev->dev, "tx");
|
||||||
if (IS_ERR(dwmac->clk_tx))
|
if (IS_ERR(dwmac->clk_tx))
|
||||||
return dev_err_probe(&pdev->dev, PTR_ERR(dwmac->clk_tx),
|
return dev_err_probe(&pdev->dev, PTR_ERR(dwmac->clk_tx),
|
||||||
|
@ -150,8 +169,13 @@ static int starfive_dwmac_probe(struct platform_device *pdev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const struct starfive_dwmac_data jh7100_data = {
|
||||||
|
.gtxclk_dlychain = 4,
|
||||||
|
};
|
||||||
|
|
||||||
static const struct of_device_id starfive_dwmac_match[] = {
|
static const struct of_device_id starfive_dwmac_match[] = {
|
||||||
{ .compatible = "starfive,jh7110-dwmac" },
|
{ .compatible = "starfive,jh7100-dwmac", .data = &jh7100_data },
|
||||||
|
{ .compatible = "starfive,jh7110-dwmac" },
|
||||||
{ /* sentinel */ }
|
{ /* sentinel */ }
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(of, starfive_dwmac_match);
|
MODULE_DEVICE_TABLE(of, starfive_dwmac_match);
|
||||||
|
|
|
@ -349,6 +349,7 @@ static int geneve_init(struct net_device *dev)
|
||||||
gro_cells_destroy(&geneve->gro_cells);
|
gro_cells_destroy(&geneve->gro_cells);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
netdev_lockdep_set_classes(dev);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -144,6 +144,7 @@ static int loopback_dev_init(struct net_device *dev)
|
||||||
dev->lstats = netdev_alloc_pcpu_stats(struct pcpu_lstats);
|
dev->lstats = netdev_alloc_pcpu_stats(struct pcpu_lstats);
|
||||||
if (!dev->lstats)
|
if (!dev->lstats)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
netdev_lockdep_set_classes(dev);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -293,7 +293,7 @@ static int xpcs_soft_reset(struct dw_xpcs *xpcs,
|
||||||
dev = MDIO_MMD_VEND2;
|
dev = MDIO_MMD_VEND2;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return -1;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = xpcs_write(xpcs, dev, MDIO_CTRL1, MDIO_CTRL1_RESET);
|
ret = xpcs_write(xpcs, dev, MDIO_CTRL1, MDIO_CTRL1_RESET);
|
||||||
|
@ -891,7 +891,7 @@ int xpcs_do_config(struct dw_xpcs *xpcs, phy_interface_t interface,
|
||||||
return ret;
|
return ret;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return -1;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (compat->pma_config) {
|
if (compat->pma_config) {
|
||||||
|
|
|
@ -1411,6 +1411,11 @@ int phy_sfp_probe(struct phy_device *phydev,
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(phy_sfp_probe);
|
EXPORT_SYMBOL(phy_sfp_probe);
|
||||||
|
|
||||||
|
static bool phy_drv_supports_irq(struct phy_driver *phydrv)
|
||||||
|
{
|
||||||
|
return phydrv->config_intr && phydrv->handle_interrupt;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* phy_attach_direct - attach a network device to a given PHY device pointer
|
* phy_attach_direct - attach a network device to a given PHY device pointer
|
||||||
* @dev: network device to attach
|
* @dev: network device to attach
|
||||||
|
@ -1525,6 +1530,9 @@ int phy_attach_direct(struct net_device *dev, struct phy_device *phydev,
|
||||||
if (phydev->dev_flags & PHY_F_NO_IRQ)
|
if (phydev->dev_flags & PHY_F_NO_IRQ)
|
||||||
phydev->irq = PHY_POLL;
|
phydev->irq = PHY_POLL;
|
||||||
|
|
||||||
|
if (!phy_drv_supports_irq(phydev->drv) && phy_interrupt_is_valid(phydev))
|
||||||
|
phydev->irq = PHY_POLL;
|
||||||
|
|
||||||
/* Port is set to PORT_TP by default and the actual PHY driver will set
|
/* Port is set to PORT_TP by default and the actual PHY driver will set
|
||||||
* it to different value depending on the PHY configuration. If we have
|
* it to different value depending on the PHY configuration. If we have
|
||||||
* the generic PHY driver we can't figure it out, thus set the old
|
* the generic PHY driver we can't figure it out, thus set the old
|
||||||
|
@ -2987,11 +2995,6 @@ s32 phy_get_internal_delay(struct phy_device *phydev, struct device *dev,
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(phy_get_internal_delay);
|
EXPORT_SYMBOL(phy_get_internal_delay);
|
||||||
|
|
||||||
static bool phy_drv_supports_irq(struct phy_driver *phydrv)
|
|
||||||
{
|
|
||||||
return phydrv->config_intr && phydrv->handle_interrupt;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int phy_led_set_brightness(struct led_classdev *led_cdev,
|
static int phy_led_set_brightness(struct led_classdev *led_cdev,
|
||||||
enum led_brightness value)
|
enum led_brightness value)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1475,6 +1475,7 @@ static void veth_free_queues(struct net_device *dev)
|
||||||
|
|
||||||
static int veth_dev_init(struct net_device *dev)
|
static int veth_dev_init(struct net_device *dev)
|
||||||
{
|
{
|
||||||
|
netdev_lockdep_set_classes(dev);
|
||||||
return veth_alloc_queues(dev);
|
return veth_alloc_queues(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2960,6 +2960,7 @@ static int vxlan_init(struct net_device *dev)
|
||||||
if (err)
|
if (err)
|
||||||
goto err_gro_cells_destroy;
|
goto err_gro_cells_destroy;
|
||||||
|
|
||||||
|
netdev_lockdep_set_classes(dev);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_gro_cells_destroy:
|
err_gro_cells_destroy:
|
||||||
|
|
|
@ -105,7 +105,7 @@ static struct mhi_controller_config ath11k_mhi_config_qca6390 = {
|
||||||
.max_channels = 128,
|
.max_channels = 128,
|
||||||
.timeout_ms = 2000,
|
.timeout_ms = 2000,
|
||||||
.use_bounce_buf = false,
|
.use_bounce_buf = false,
|
||||||
.buf_len = 0,
|
.buf_len = 8192,
|
||||||
.num_channels = ARRAY_SIZE(ath11k_mhi_channels_qca6390),
|
.num_channels = ARRAY_SIZE(ath11k_mhi_channels_qca6390),
|
||||||
.ch_cfg = ath11k_mhi_channels_qca6390,
|
.ch_cfg = ath11k_mhi_channels_qca6390,
|
||||||
.num_events = ARRAY_SIZE(ath11k_mhi_events_qca6390),
|
.num_events = ARRAY_SIZE(ath11k_mhi_events_qca6390),
|
||||||
|
|
|
@ -643,7 +643,7 @@ static void ath_ant_try_scan(struct ath_ant_comb *antcomb,
|
||||||
conf->main_lna_conf = ATH_ANT_DIV_COMB_LNA1;
|
conf->main_lna_conf = ATH_ANT_DIV_COMB_LNA1;
|
||||||
conf->alt_lna_conf = ATH_ANT_DIV_COMB_LNA1_PLUS_LNA2;
|
conf->alt_lna_conf = ATH_ANT_DIV_COMB_LNA1_PLUS_LNA2;
|
||||||
} else if (antcomb->rssi_sub >
|
} else if (antcomb->rssi_sub >
|
||||||
antcomb->rssi_lna1) {
|
antcomb->rssi_lna2) {
|
||||||
/* set to A-B */
|
/* set to A-B */
|
||||||
conf->main_lna_conf = ATH_ANT_DIV_COMB_LNA1;
|
conf->main_lna_conf = ATH_ANT_DIV_COMB_LNA1;
|
||||||
conf->alt_lna_conf = ATH_ANT_DIV_COMB_LNA1_MINUS_LNA2;
|
conf->alt_lna_conf = ATH_ANT_DIV_COMB_LNA1_MINUS_LNA2;
|
||||||
|
|
|
@ -82,6 +82,15 @@ static const struct dmi_system_id dmi_platform_data[] = {
|
||||||
},
|
},
|
||||||
.driver_data = (void *)&acepc_t8_data,
|
.driver_data = (void *)&acepc_t8_data,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
/* ACEPC W5 Pro Cherry Trail Z8350 HDMI stick, same wifi as the T8 */
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_BOARD_NAME, "T3 MRD"),
|
||||||
|
DMI_MATCH(DMI_CHASSIS_TYPE, "3"),
|
||||||
|
DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
|
||||||
|
},
|
||||||
|
.driver_data = (void *)&acepc_t8_data,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
/* Chuwi Hi8 Pro with D2D3_Hi8Pro.233 BIOS */
|
/* Chuwi Hi8 Pro with D2D3_Hi8Pro.233 BIOS */
|
||||||
.matches = {
|
.matches = {
|
||||||
|
|
|
@ -299,3 +299,9 @@ MODULE_FIRMWARE(IWL_MA_B_HR_B_FW_MODULE_FIRMWARE(IWL_AX210_UCODE_API_MAX));
|
||||||
MODULE_FIRMWARE(IWL_MA_B_GF_A_FW_MODULE_FIRMWARE(IWL_AX210_UCODE_API_MAX));
|
MODULE_FIRMWARE(IWL_MA_B_GF_A_FW_MODULE_FIRMWARE(IWL_AX210_UCODE_API_MAX));
|
||||||
MODULE_FIRMWARE(IWL_MA_B_GF4_A_FW_MODULE_FIRMWARE(IWL_AX210_UCODE_API_MAX));
|
MODULE_FIRMWARE(IWL_MA_B_GF4_A_FW_MODULE_FIRMWARE(IWL_AX210_UCODE_API_MAX));
|
||||||
MODULE_FIRMWARE(IWL_MA_B_MR_A_FW_MODULE_FIRMWARE(IWL_AX210_UCODE_API_MAX));
|
MODULE_FIRMWARE(IWL_MA_B_MR_A_FW_MODULE_FIRMWARE(IWL_AX210_UCODE_API_MAX));
|
||||||
|
|
||||||
|
MODULE_FIRMWARE("iwlwifi-so-a0-gf-a0.pnvm");
|
||||||
|
MODULE_FIRMWARE("iwlwifi-so-a0-gf4-a0.pnvm");
|
||||||
|
MODULE_FIRMWARE("iwlwifi-ty-a0-gf-a0.pnvm");
|
||||||
|
MODULE_FIRMWARE("iwlwifi-ma-b0-gf-a0.pnvm");
|
||||||
|
MODULE_FIRMWARE("iwlwifi-ma-b0-gf4-a0.pnvm");
|
||||||
|
|
|
@ -179,3 +179,5 @@ MODULE_FIRMWARE(IWL_BZ_A_FM_C_MODULE_FIRMWARE(IWL_BZ_UCODE_API_MAX));
|
||||||
MODULE_FIRMWARE(IWL_BZ_A_FM4_B_MODULE_FIRMWARE(IWL_BZ_UCODE_API_MAX));
|
MODULE_FIRMWARE(IWL_BZ_A_FM4_B_MODULE_FIRMWARE(IWL_BZ_UCODE_API_MAX));
|
||||||
MODULE_FIRMWARE(IWL_GL_B_FM_B_MODULE_FIRMWARE(IWL_BZ_UCODE_API_MAX));
|
MODULE_FIRMWARE(IWL_GL_B_FM_B_MODULE_FIRMWARE(IWL_BZ_UCODE_API_MAX));
|
||||||
MODULE_FIRMWARE(IWL_GL_C_FM_C_MODULE_FIRMWARE(IWL_BZ_UCODE_API_MAX));
|
MODULE_FIRMWARE(IWL_GL_C_FM_C_MODULE_FIRMWARE(IWL_BZ_UCODE_API_MAX));
|
||||||
|
|
||||||
|
MODULE_FIRMWARE("iwlwifi-gl-c0-fm-c0.pnvm");
|
||||||
|
|
|
@ -502,6 +502,7 @@ static const struct pci_device_id iwl_hw_card_ids[] = {
|
||||||
|
|
||||||
/* Bz devices */
|
/* Bz devices */
|
||||||
{IWL_PCI_DEVICE(0x2727, PCI_ANY_ID, iwl_bz_trans_cfg)},
|
{IWL_PCI_DEVICE(0x2727, PCI_ANY_ID, iwl_bz_trans_cfg)},
|
||||||
|
{IWL_PCI_DEVICE(0x272D, PCI_ANY_ID, iwl_bz_trans_cfg)},
|
||||||
{IWL_PCI_DEVICE(0x272b, PCI_ANY_ID, iwl_bz_trans_cfg)},
|
{IWL_PCI_DEVICE(0x272b, PCI_ANY_ID, iwl_bz_trans_cfg)},
|
||||||
{IWL_PCI_DEVICE(0xA840, PCI_ANY_ID, iwl_bz_trans_cfg)},
|
{IWL_PCI_DEVICE(0xA840, PCI_ANY_ID, iwl_bz_trans_cfg)},
|
||||||
{IWL_PCI_DEVICE(0x7740, PCI_ANY_ID, iwl_bz_trans_cfg)},
|
{IWL_PCI_DEVICE(0x7740, PCI_ANY_ID, iwl_bz_trans_cfg)},
|
||||||
|
|
|
@ -490,6 +490,11 @@ static u32 __mt7915_reg_addr(struct mt7915_dev *dev, u32 addr)
|
||||||
return dev->reg.map[i].maps + ofs;
|
return dev->reg.map[i].maps + ofs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static u32 __mt7915_reg_remap_addr(struct mt7915_dev *dev, u32 addr)
|
||||||
|
{
|
||||||
if ((addr >= MT_INFRA_BASE && addr < MT_WFSYS0_PHY_START) ||
|
if ((addr >= MT_INFRA_BASE && addr < MT_WFSYS0_PHY_START) ||
|
||||||
(addr >= MT_WFSYS0_PHY_START && addr < MT_WFSYS1_PHY_START) ||
|
(addr >= MT_WFSYS0_PHY_START && addr < MT_WFSYS1_PHY_START) ||
|
||||||
(addr >= MT_WFSYS1_PHY_START && addr <= MT_WFSYS1_PHY_END))
|
(addr >= MT_WFSYS1_PHY_START && addr <= MT_WFSYS1_PHY_END))
|
||||||
|
@ -514,15 +519,30 @@ void mt7915_memcpy_fromio(struct mt7915_dev *dev, void *buf, u32 offset,
|
||||||
{
|
{
|
||||||
u32 addr = __mt7915_reg_addr(dev, offset);
|
u32 addr = __mt7915_reg_addr(dev, offset);
|
||||||
|
|
||||||
memcpy_fromio(buf, dev->mt76.mmio.regs + addr, len);
|
if (addr) {
|
||||||
|
memcpy_fromio(buf, dev->mt76.mmio.regs + addr, len);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
spin_lock_bh(&dev->reg_lock);
|
||||||
|
memcpy_fromio(buf, dev->mt76.mmio.regs +
|
||||||
|
__mt7915_reg_remap_addr(dev, offset), len);
|
||||||
|
spin_unlock_bh(&dev->reg_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
static u32 mt7915_rr(struct mt76_dev *mdev, u32 offset)
|
static u32 mt7915_rr(struct mt76_dev *mdev, u32 offset)
|
||||||
{
|
{
|
||||||
struct mt7915_dev *dev = container_of(mdev, struct mt7915_dev, mt76);
|
struct mt7915_dev *dev = container_of(mdev, struct mt7915_dev, mt76);
|
||||||
u32 addr = __mt7915_reg_addr(dev, offset);
|
u32 addr = __mt7915_reg_addr(dev, offset), val;
|
||||||
|
|
||||||
return dev->bus_ops->rr(mdev, addr);
|
if (addr)
|
||||||
|
return dev->bus_ops->rr(mdev, addr);
|
||||||
|
|
||||||
|
spin_lock_bh(&dev->reg_lock);
|
||||||
|
val = dev->bus_ops->rr(mdev, __mt7915_reg_remap_addr(dev, offset));
|
||||||
|
spin_unlock_bh(&dev->reg_lock);
|
||||||
|
|
||||||
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mt7915_wr(struct mt76_dev *mdev, u32 offset, u32 val)
|
static void mt7915_wr(struct mt76_dev *mdev, u32 offset, u32 val)
|
||||||
|
@ -530,7 +550,14 @@ static void mt7915_wr(struct mt76_dev *mdev, u32 offset, u32 val)
|
||||||
struct mt7915_dev *dev = container_of(mdev, struct mt7915_dev, mt76);
|
struct mt7915_dev *dev = container_of(mdev, struct mt7915_dev, mt76);
|
||||||
u32 addr = __mt7915_reg_addr(dev, offset);
|
u32 addr = __mt7915_reg_addr(dev, offset);
|
||||||
|
|
||||||
dev->bus_ops->wr(mdev, addr, val);
|
if (addr) {
|
||||||
|
dev->bus_ops->wr(mdev, addr, val);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
spin_lock_bh(&dev->reg_lock);
|
||||||
|
dev->bus_ops->wr(mdev, __mt7915_reg_remap_addr(dev, offset), val);
|
||||||
|
spin_unlock_bh(&dev->reg_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
static u32 mt7915_rmw(struct mt76_dev *mdev, u32 offset, u32 mask, u32 val)
|
static u32 mt7915_rmw(struct mt76_dev *mdev, u32 offset, u32 mask, u32 val)
|
||||||
|
@ -538,7 +565,14 @@ static u32 mt7915_rmw(struct mt76_dev *mdev, u32 offset, u32 mask, u32 val)
|
||||||
struct mt7915_dev *dev = container_of(mdev, struct mt7915_dev, mt76);
|
struct mt7915_dev *dev = container_of(mdev, struct mt7915_dev, mt76);
|
||||||
u32 addr = __mt7915_reg_addr(dev, offset);
|
u32 addr = __mt7915_reg_addr(dev, offset);
|
||||||
|
|
||||||
return dev->bus_ops->rmw(mdev, addr, mask, val);
|
if (addr)
|
||||||
|
return dev->bus_ops->rmw(mdev, addr, mask, val);
|
||||||
|
|
||||||
|
spin_lock_bh(&dev->reg_lock);
|
||||||
|
val = dev->bus_ops->rmw(mdev, __mt7915_reg_remap_addr(dev, offset), mask, val);
|
||||||
|
spin_unlock_bh(&dev->reg_lock);
|
||||||
|
|
||||||
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_NET_MEDIATEK_SOC_WED
|
#ifdef CONFIG_NET_MEDIATEK_SOC_WED
|
||||||
|
@ -813,6 +847,7 @@ static int mt7915_mmio_init(struct mt76_dev *mdev,
|
||||||
|
|
||||||
dev = container_of(mdev, struct mt7915_dev, mt76);
|
dev = container_of(mdev, struct mt7915_dev, mt76);
|
||||||
mt76_mmio_init(&dev->mt76, mem_base);
|
mt76_mmio_init(&dev->mt76, mem_base);
|
||||||
|
spin_lock_init(&dev->reg_lock);
|
||||||
|
|
||||||
switch (device_id) {
|
switch (device_id) {
|
||||||
case 0x7915:
|
case 0x7915:
|
||||||
|
|
|
@ -287,6 +287,7 @@ struct mt7915_dev {
|
||||||
|
|
||||||
struct list_head sta_rc_list;
|
struct list_head sta_rc_list;
|
||||||
struct list_head twt_list;
|
struct list_head twt_list;
|
||||||
|
spinlock_t reg_lock;
|
||||||
|
|
||||||
u32 hw_pattern;
|
u32 hw_pattern;
|
||||||
|
|
||||||
|
|
|
@ -757,6 +757,9 @@ mt7996_mac_write_txwi_8023(struct mt7996_dev *dev, __le32 *txwi,
|
||||||
FIELD_PREP(MT_TXD2_SUB_TYPE, fc_stype);
|
FIELD_PREP(MT_TXD2_SUB_TYPE, fc_stype);
|
||||||
|
|
||||||
txwi[2] |= cpu_to_le32(val);
|
txwi[2] |= cpu_to_le32(val);
|
||||||
|
|
||||||
|
if (wcid->amsdu)
|
||||||
|
txwi[3] |= cpu_to_le32(MT_TXD3_HW_AMSDU);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -887,8 +890,6 @@ void mt7996_mac_write_txwi(struct mt7996_dev *dev, __le32 *txwi,
|
||||||
val |= MT_TXD3_PROTECT_FRAME;
|
val |= MT_TXD3_PROTECT_FRAME;
|
||||||
if (info->flags & IEEE80211_TX_CTL_NO_ACK)
|
if (info->flags & IEEE80211_TX_CTL_NO_ACK)
|
||||||
val |= MT_TXD3_NO_ACK;
|
val |= MT_TXD3_NO_ACK;
|
||||||
if (wcid->amsdu)
|
|
||||||
val |= MT_TXD3_HW_AMSDU;
|
|
||||||
|
|
||||||
txwi[3] = cpu_to_le32(val);
|
txwi[3] = cpu_to_le32(val);
|
||||||
txwi[4] = 0;
|
txwi[4] = 0;
|
||||||
|
|
|
@ -82,7 +82,6 @@ static u32 mt7996_reg_map_l1(struct mt7996_dev *dev, u32 addr)
|
||||||
u32 offset = FIELD_GET(MT_HIF_REMAP_L1_OFFSET, addr);
|
u32 offset = FIELD_GET(MT_HIF_REMAP_L1_OFFSET, addr);
|
||||||
u32 base = FIELD_GET(MT_HIF_REMAP_L1_BASE, addr);
|
u32 base = FIELD_GET(MT_HIF_REMAP_L1_BASE, addr);
|
||||||
|
|
||||||
dev->reg_l1_backup = dev->bus_ops->rr(&dev->mt76, MT_HIF_REMAP_L1);
|
|
||||||
dev->bus_ops->rmw(&dev->mt76, MT_HIF_REMAP_L1,
|
dev->bus_ops->rmw(&dev->mt76, MT_HIF_REMAP_L1,
|
||||||
MT_HIF_REMAP_L1_MASK,
|
MT_HIF_REMAP_L1_MASK,
|
||||||
FIELD_PREP(MT_HIF_REMAP_L1_MASK, base));
|
FIELD_PREP(MT_HIF_REMAP_L1_MASK, base));
|
||||||
|
@ -97,7 +96,6 @@ static u32 mt7996_reg_map_l2(struct mt7996_dev *dev, u32 addr)
|
||||||
u32 offset = FIELD_GET(MT_HIF_REMAP_L2_OFFSET, addr);
|
u32 offset = FIELD_GET(MT_HIF_REMAP_L2_OFFSET, addr);
|
||||||
u32 base = FIELD_GET(MT_HIF_REMAP_L2_BASE, addr);
|
u32 base = FIELD_GET(MT_HIF_REMAP_L2_BASE, addr);
|
||||||
|
|
||||||
dev->reg_l2_backup = dev->bus_ops->rr(&dev->mt76, MT_HIF_REMAP_L2);
|
|
||||||
dev->bus_ops->rmw(&dev->mt76, MT_HIF_REMAP_L2,
|
dev->bus_ops->rmw(&dev->mt76, MT_HIF_REMAP_L2,
|
||||||
MT_HIF_REMAP_L2_MASK,
|
MT_HIF_REMAP_L2_MASK,
|
||||||
FIELD_PREP(MT_HIF_REMAP_L2_MASK, base));
|
FIELD_PREP(MT_HIF_REMAP_L2_MASK, base));
|
||||||
|
@ -107,26 +105,10 @@ static u32 mt7996_reg_map_l2(struct mt7996_dev *dev, u32 addr)
|
||||||
return MT_HIF_REMAP_BASE_L2 + offset;
|
return MT_HIF_REMAP_BASE_L2 + offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mt7996_reg_remap_restore(struct mt7996_dev *dev)
|
|
||||||
{
|
|
||||||
/* remap to ori status */
|
|
||||||
if (unlikely(dev->reg_l1_backup)) {
|
|
||||||
dev->bus_ops->wr(&dev->mt76, MT_HIF_REMAP_L1, dev->reg_l1_backup);
|
|
||||||
dev->reg_l1_backup = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dev->reg_l2_backup) {
|
|
||||||
dev->bus_ops->wr(&dev->mt76, MT_HIF_REMAP_L2, dev->reg_l2_backup);
|
|
||||||
dev->reg_l2_backup = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static u32 __mt7996_reg_addr(struct mt7996_dev *dev, u32 addr)
|
static u32 __mt7996_reg_addr(struct mt7996_dev *dev, u32 addr)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
mt7996_reg_remap_restore(dev);
|
|
||||||
|
|
||||||
if (addr < 0x100000)
|
if (addr < 0x100000)
|
||||||
return addr;
|
return addr;
|
||||||
|
|
||||||
|
@ -143,6 +125,11 @@ static u32 __mt7996_reg_addr(struct mt7996_dev *dev, u32 addr)
|
||||||
return dev->reg.map[i].mapped + ofs;
|
return dev->reg.map[i].mapped + ofs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static u32 __mt7996_reg_remap_addr(struct mt7996_dev *dev, u32 addr)
|
||||||
|
{
|
||||||
if ((addr >= MT_INFRA_BASE && addr < MT_WFSYS0_PHY_START) ||
|
if ((addr >= MT_INFRA_BASE && addr < MT_WFSYS0_PHY_START) ||
|
||||||
(addr >= MT_WFSYS0_PHY_START && addr < MT_WFSYS1_PHY_START) ||
|
(addr >= MT_WFSYS0_PHY_START && addr < MT_WFSYS1_PHY_START) ||
|
||||||
(addr >= MT_WFSYS1_PHY_START && addr <= MT_WFSYS1_PHY_END))
|
(addr >= MT_WFSYS1_PHY_START && addr <= MT_WFSYS1_PHY_END))
|
||||||
|
@ -167,28 +154,60 @@ void mt7996_memcpy_fromio(struct mt7996_dev *dev, void *buf, u32 offset,
|
||||||
{
|
{
|
||||||
u32 addr = __mt7996_reg_addr(dev, offset);
|
u32 addr = __mt7996_reg_addr(dev, offset);
|
||||||
|
|
||||||
memcpy_fromio(buf, dev->mt76.mmio.regs + addr, len);
|
if (addr) {
|
||||||
|
memcpy_fromio(buf, dev->mt76.mmio.regs + addr, len);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
spin_lock_bh(&dev->reg_lock);
|
||||||
|
memcpy_fromio(buf, dev->mt76.mmio.regs +
|
||||||
|
__mt7996_reg_remap_addr(dev, offset), len);
|
||||||
|
spin_unlock_bh(&dev->reg_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
static u32 mt7996_rr(struct mt76_dev *mdev, u32 offset)
|
static u32 mt7996_rr(struct mt76_dev *mdev, u32 offset)
|
||||||
{
|
{
|
||||||
struct mt7996_dev *dev = container_of(mdev, struct mt7996_dev, mt76);
|
struct mt7996_dev *dev = container_of(mdev, struct mt7996_dev, mt76);
|
||||||
|
u32 addr = __mt7996_reg_addr(dev, offset), val;
|
||||||
|
|
||||||
return dev->bus_ops->rr(mdev, __mt7996_reg_addr(dev, offset));
|
if (addr)
|
||||||
|
return dev->bus_ops->rr(mdev, addr);
|
||||||
|
|
||||||
|
spin_lock_bh(&dev->reg_lock);
|
||||||
|
val = dev->bus_ops->rr(mdev, __mt7996_reg_remap_addr(dev, offset));
|
||||||
|
spin_unlock_bh(&dev->reg_lock);
|
||||||
|
|
||||||
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mt7996_wr(struct mt76_dev *mdev, u32 offset, u32 val)
|
static void mt7996_wr(struct mt76_dev *mdev, u32 offset, u32 val)
|
||||||
{
|
{
|
||||||
struct mt7996_dev *dev = container_of(mdev, struct mt7996_dev, mt76);
|
struct mt7996_dev *dev = container_of(mdev, struct mt7996_dev, mt76);
|
||||||
|
u32 addr = __mt7996_reg_addr(dev, offset);
|
||||||
|
|
||||||
dev->bus_ops->wr(mdev, __mt7996_reg_addr(dev, offset), val);
|
if (addr) {
|
||||||
|
dev->bus_ops->wr(mdev, addr, val);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
spin_lock_bh(&dev->reg_lock);
|
||||||
|
dev->bus_ops->wr(mdev, __mt7996_reg_remap_addr(dev, offset), val);
|
||||||
|
spin_unlock_bh(&dev->reg_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
static u32 mt7996_rmw(struct mt76_dev *mdev, u32 offset, u32 mask, u32 val)
|
static u32 mt7996_rmw(struct mt76_dev *mdev, u32 offset, u32 mask, u32 val)
|
||||||
{
|
{
|
||||||
struct mt7996_dev *dev = container_of(mdev, struct mt7996_dev, mt76);
|
struct mt7996_dev *dev = container_of(mdev, struct mt7996_dev, mt76);
|
||||||
|
u32 addr = __mt7996_reg_addr(dev, offset);
|
||||||
|
|
||||||
return dev->bus_ops->rmw(mdev, __mt7996_reg_addr(dev, offset), mask, val);
|
if (addr)
|
||||||
|
return dev->bus_ops->rmw(mdev, addr, mask, val);
|
||||||
|
|
||||||
|
spin_lock_bh(&dev->reg_lock);
|
||||||
|
val = dev->bus_ops->rmw(mdev, __mt7996_reg_remap_addr(dev, offset), mask, val);
|
||||||
|
spin_unlock_bh(&dev->reg_lock);
|
||||||
|
|
||||||
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int mt7996_mmio_init(struct mt76_dev *mdev,
|
static int mt7996_mmio_init(struct mt76_dev *mdev,
|
||||||
|
@ -200,6 +219,7 @@ static int mt7996_mmio_init(struct mt76_dev *mdev,
|
||||||
|
|
||||||
dev = container_of(mdev, struct mt7996_dev, mt76);
|
dev = container_of(mdev, struct mt7996_dev, mt76);
|
||||||
mt76_mmio_init(&dev->mt76, mem_base);
|
mt76_mmio_init(&dev->mt76, mem_base);
|
||||||
|
spin_lock_init(&dev->reg_lock);
|
||||||
|
|
||||||
switch (device_id) {
|
switch (device_id) {
|
||||||
case 0x7990:
|
case 0x7990:
|
||||||
|
|
|
@ -242,8 +242,7 @@ struct mt7996_dev {
|
||||||
u8 n_agrt;
|
u8 n_agrt;
|
||||||
} twt;
|
} twt;
|
||||||
|
|
||||||
u32 reg_l1_backup;
|
spinlock_t reg_lock;
|
||||||
u32 reg_l2_backup;
|
|
||||||
|
|
||||||
u8 wtbl_size_group;
|
u8 wtbl_size_group;
|
||||||
};
|
};
|
||||||
|
|
|
@ -422,7 +422,7 @@ static void rtw89_ops_bss_info_changed(struct ieee80211_hw *hw,
|
||||||
* when disconnected by peer
|
* when disconnected by peer
|
||||||
*/
|
*/
|
||||||
if (rtwdev->scanning)
|
if (rtwdev->scanning)
|
||||||
rtw89_hw_scan_abort(rtwdev, vif);
|
rtw89_hw_scan_abort(rtwdev, rtwdev->scan_info.scanning_vif);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -971,7 +971,7 @@ static int rtw89_ops_remain_on_channel(struct ieee80211_hw *hw,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rtwdev->scanning)
|
if (rtwdev->scanning)
|
||||||
rtw89_hw_scan_abort(rtwdev, vif);
|
rtw89_hw_scan_abort(rtwdev, rtwdev->scan_info.scanning_vif);
|
||||||
|
|
||||||
if (type == IEEE80211_ROC_TYPE_MGMT_TX)
|
if (type == IEEE80211_ROC_TYPE_MGMT_TX)
|
||||||
roc->state = RTW89_ROC_MGMT;
|
roc->state = RTW89_ROC_MGMT;
|
||||||
|
|
|
@ -559,7 +559,7 @@
|
||||||
#define RTW89_PCI_TXWD_NUM_MAX 512
|
#define RTW89_PCI_TXWD_NUM_MAX 512
|
||||||
#define RTW89_PCI_TXWD_PAGE_SIZE 128
|
#define RTW89_PCI_TXWD_PAGE_SIZE 128
|
||||||
#define RTW89_PCI_ADDRINFO_MAX 4
|
#define RTW89_PCI_ADDRINFO_MAX 4
|
||||||
#define RTW89_PCI_RX_BUF_SIZE 11460
|
#define RTW89_PCI_RX_BUF_SIZE (11454 + 40) /* +40 for rtw89_rxdesc_long_v2 */
|
||||||
|
|
||||||
#define RTW89_PCI_POLL_BDRAM_RST_CNT 100
|
#define RTW89_PCI_POLL_BDRAM_RST_CNT 100
|
||||||
#define RTW89_PCI_MULTITAG 8
|
#define RTW89_PCI_MULTITAG 8
|
||||||
|
|
|
@ -3361,6 +3361,9 @@ static const struct pci_device_id nvme_id_table[] = {
|
||||||
NVME_QUIRK_BOGUS_NID, },
|
NVME_QUIRK_BOGUS_NID, },
|
||||||
{ PCI_VDEVICE(REDHAT, 0x0010), /* Qemu emulated controller */
|
{ PCI_VDEVICE(REDHAT, 0x0010), /* Qemu emulated controller */
|
||||||
.driver_data = NVME_QUIRK_BOGUS_NID, },
|
.driver_data = NVME_QUIRK_BOGUS_NID, },
|
||||||
|
{ PCI_DEVICE(0x126f, 0x2262), /* Silicon Motion generic */
|
||||||
|
.driver_data = NVME_QUIRK_NO_DEEPEST_PS |
|
||||||
|
NVME_QUIRK_BOGUS_NID, },
|
||||||
{ PCI_DEVICE(0x126f, 0x2263), /* Silicon Motion unidentified */
|
{ PCI_DEVICE(0x126f, 0x2263), /* Silicon Motion unidentified */
|
||||||
.driver_data = NVME_QUIRK_NO_NS_DESC_LIST |
|
.driver_data = NVME_QUIRK_NO_NS_DESC_LIST |
|
||||||
NVME_QUIRK_BOGUS_NID, },
|
NVME_QUIRK_BOGUS_NID, },
|
||||||
|
|
|
@ -287,12 +287,52 @@ static u64 hisi_uc_pmu_read_counter(struct hisi_pmu *uc_pmu,
|
||||||
return readq(uc_pmu->base + HISI_UC_CNTR_REGn(hwc->idx));
|
return readq(uc_pmu->base + HISI_UC_CNTR_REGn(hwc->idx));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void hisi_uc_pmu_write_counter(struct hisi_pmu *uc_pmu,
|
static bool hisi_uc_pmu_get_glb_en_state(struct hisi_pmu *uc_pmu)
|
||||||
|
{
|
||||||
|
u32 val;
|
||||||
|
|
||||||
|
val = readl(uc_pmu->base + HISI_UC_EVENT_CTRL_REG);
|
||||||
|
return !!FIELD_GET(HISI_UC_EVENT_GLB_EN, val);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void hisi_uc_pmu_write_counter_normal(struct hisi_pmu *uc_pmu,
|
||||||
struct hw_perf_event *hwc, u64 val)
|
struct hw_perf_event *hwc, u64 val)
|
||||||
{
|
{
|
||||||
writeq(val, uc_pmu->base + HISI_UC_CNTR_REGn(hwc->idx));
|
writeq(val, uc_pmu->base + HISI_UC_CNTR_REGn(hwc->idx));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void hisi_uc_pmu_write_counter_quirk_v2(struct hisi_pmu *uc_pmu,
|
||||||
|
struct hw_perf_event *hwc, u64 val)
|
||||||
|
{
|
||||||
|
hisi_uc_pmu_start_counters(uc_pmu);
|
||||||
|
hisi_uc_pmu_write_counter_normal(uc_pmu, hwc, val);
|
||||||
|
hisi_uc_pmu_stop_counters(uc_pmu);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void hisi_uc_pmu_write_counter(struct hisi_pmu *uc_pmu,
|
||||||
|
struct hw_perf_event *hwc, u64 val)
|
||||||
|
{
|
||||||
|
bool enable = hisi_uc_pmu_get_glb_en_state(uc_pmu);
|
||||||
|
bool erratum = uc_pmu->identifier == HISI_PMU_V2;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* HiSilicon UC PMU v2 suffers the erratum 162700402 that the
|
||||||
|
* PMU counter cannot be set due to the lack of clock under power
|
||||||
|
* saving mode. This will lead to error or inaccurate counts.
|
||||||
|
* The clock can be enabled by the PMU global enabling control.
|
||||||
|
* The irq handler and pmu_start() will call the function to set
|
||||||
|
* period. If the function under irq context, the PMU has been
|
||||||
|
* enabled therefore we set counter directly. Other situations
|
||||||
|
* the PMU is disabled, we need to enable it to turn on the
|
||||||
|
* counter clock to set period, and then restore PMU enable
|
||||||
|
* status, the counter can hold its value without a clock.
|
||||||
|
*/
|
||||||
|
if (enable || !erratum)
|
||||||
|
hisi_uc_pmu_write_counter_normal(uc_pmu, hwc, val);
|
||||||
|
else
|
||||||
|
hisi_uc_pmu_write_counter_quirk_v2(uc_pmu, hwc, val);
|
||||||
|
}
|
||||||
|
|
||||||
static void hisi_uc_pmu_enable_counter_int(struct hisi_pmu *uc_pmu,
|
static void hisi_uc_pmu_enable_counter_int(struct hisi_pmu *uc_pmu,
|
||||||
struct hw_perf_event *hwc)
|
struct hw_perf_event *hwc)
|
||||||
{
|
{
|
||||||
|
|
|
@ -909,9 +909,11 @@ static void __init sh_pfc_check_cfg_reg(const char *drvname,
|
||||||
sh_pfc_err("reg 0x%x: var_field_width declares %u instead of %u bits\n",
|
sh_pfc_err("reg 0x%x: var_field_width declares %u instead of %u bits\n",
|
||||||
cfg_reg->reg, rw, cfg_reg->reg_width);
|
cfg_reg->reg, rw, cfg_reg->reg_width);
|
||||||
|
|
||||||
if (n != cfg_reg->nr_enum_ids)
|
if (n != cfg_reg->nr_enum_ids) {
|
||||||
sh_pfc_err("reg 0x%x: enum_ids[] has %u instead of %u values\n",
|
sh_pfc_err("reg 0x%x: enum_ids[] has %u instead of %u values\n",
|
||||||
cfg_reg->reg, cfg_reg->nr_enum_ids, n);
|
cfg_reg->reg, cfg_reg->nr_enum_ids, n);
|
||||||
|
n = cfg_reg->nr_enum_ids;
|
||||||
|
}
|
||||||
|
|
||||||
check_enum_ids:
|
check_enum_ids:
|
||||||
sh_pfc_check_reg_enums(drvname, cfg_reg->reg, cfg_reg->enum_ids, n);
|
sh_pfc_check_reg_enums(drvname, cfg_reg->reg, cfg_reg->enum_ids, n);
|
||||||
|
|
|
@ -136,8 +136,6 @@ static int intel_vbtn_input_setup(struct platform_device *device)
|
||||||
priv->switches_dev->id.bustype = BUS_HOST;
|
priv->switches_dev->id.bustype = BUS_HOST;
|
||||||
|
|
||||||
if (priv->has_switches) {
|
if (priv->has_switches) {
|
||||||
detect_tablet_mode(&device->dev);
|
|
||||||
|
|
||||||
ret = input_register_device(priv->switches_dev);
|
ret = input_register_device(priv->switches_dev);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -316,6 +314,9 @@ static int intel_vbtn_probe(struct platform_device *device)
|
||||||
if (ACPI_FAILURE(status))
|
if (ACPI_FAILURE(status))
|
||||||
dev_err(&device->dev, "Error VBDL failed with ACPI status %d\n", status);
|
dev_err(&device->dev, "Error VBDL failed with ACPI status %d\n", status);
|
||||||
}
|
}
|
||||||
|
// Check switches after buttons since VBDL may have side effects.
|
||||||
|
if (has_switches)
|
||||||
|
detect_tablet_mode(&device->dev);
|
||||||
|
|
||||||
device_init_wakeup(&device->dev, true);
|
device_init_wakeup(&device->dev, true);
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1222,6 +1222,15 @@ const struct dmi_system_id touchscreen_dmi_table[] = {
|
||||||
DMI_MATCH(DMI_BIOS_VERSION, "CHUWI.D86JLBNR"),
|
DMI_MATCH(DMI_BIOS_VERSION, "CHUWI.D86JLBNR"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
/* Chuwi Vi8 dual-boot (CWI506) */
|
||||||
|
.driver_data = (void *)&chuwi_vi8_data,
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
|
||||||
|
DMI_MATCH(DMI_PRODUCT_NAME, "i86"),
|
||||||
|
DMI_MATCH(DMI_BIOS_VERSION, "CHUWI2.D86JHBNR02"),
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
/* Chuwi Vi8 Plus (CWI519) */
|
/* Chuwi Vi8 Plus (CWI519) */
|
||||||
.driver_data = (void *)&chuwi_vi8_plus_data,
|
.driver_data = (void *)&chuwi_vi8_plus_data,
|
||||||
|
|
|
@ -55,7 +55,7 @@ struct imx8mp_blk_ctrl_domain_data {
|
||||||
const char *gpc_name;
|
const char *gpc_name;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define DOMAIN_MAX_CLKS 2
|
#define DOMAIN_MAX_CLKS 3
|
||||||
#define DOMAIN_MAX_PATHS 3
|
#define DOMAIN_MAX_PATHS 3
|
||||||
|
|
||||||
struct imx8mp_blk_ctrl_domain {
|
struct imx8mp_blk_ctrl_domain {
|
||||||
|
@ -457,8 +457,8 @@ static const struct imx8mp_blk_ctrl_domain_data imx8mp_hdmi_domain_data[] = {
|
||||||
},
|
},
|
||||||
[IMX8MP_HDMIBLK_PD_LCDIF] = {
|
[IMX8MP_HDMIBLK_PD_LCDIF] = {
|
||||||
.name = "hdmiblk-lcdif",
|
.name = "hdmiblk-lcdif",
|
||||||
.clk_names = (const char *[]){ "axi", "apb" },
|
.clk_names = (const char *[]){ "axi", "apb", "fdcc" },
|
||||||
.num_clks = 2,
|
.num_clks = 3,
|
||||||
.gpc_name = "lcdif",
|
.gpc_name = "lcdif",
|
||||||
.path_names = (const char *[]){"lcdif-hdmi"},
|
.path_names = (const char *[]){"lcdif-hdmi"},
|
||||||
.num_paths = 1,
|
.num_paths = 1,
|
||||||
|
@ -483,8 +483,8 @@ static const struct imx8mp_blk_ctrl_domain_data imx8mp_hdmi_domain_data[] = {
|
||||||
},
|
},
|
||||||
[IMX8MP_HDMIBLK_PD_HDMI_TX] = {
|
[IMX8MP_HDMIBLK_PD_HDMI_TX] = {
|
||||||
.name = "hdmiblk-hdmi-tx",
|
.name = "hdmiblk-hdmi-tx",
|
||||||
.clk_names = (const char *[]){ "apb", "ref_266m" },
|
.clk_names = (const char *[]){ "apb", "ref_266m", "fdcc" },
|
||||||
.num_clks = 2,
|
.num_clks = 3,
|
||||||
.gpc_name = "hdmi-tx",
|
.gpc_name = "hdmi-tx",
|
||||||
},
|
},
|
||||||
[IMX8MP_HDMIBLK_PD_HDMI_TX_PHY] = {
|
[IMX8MP_HDMIBLK_PD_HDMI_TX_PHY] = {
|
||||||
|
|
|
@ -695,6 +695,8 @@ static int omap_prm_domain_init(struct device *dev, struct omap_prm *prm)
|
||||||
data = prm->data;
|
data = prm->data;
|
||||||
name = devm_kasprintf(dev, GFP_KERNEL, "prm_%s",
|
name = devm_kasprintf(dev, GFP_KERNEL, "prm_%s",
|
||||||
data->name);
|
data->name);
|
||||||
|
if (!name)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
prmd->dev = dev;
|
prmd->dev = dev;
|
||||||
prmd->prm = prm;
|
prmd->prm = prm;
|
||||||
|
|
|
@ -748,8 +748,10 @@ lpfc_rcv_padisc(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
|
||||||
/* Save the ELS cmd */
|
/* Save the ELS cmd */
|
||||||
elsiocb->drvrTimeout = cmd;
|
elsiocb->drvrTimeout = cmd;
|
||||||
|
|
||||||
lpfc_sli4_resume_rpi(ndlp,
|
if (lpfc_sli4_resume_rpi(ndlp,
|
||||||
lpfc_mbx_cmpl_resume_rpi, elsiocb);
|
lpfc_mbx_cmpl_resume_rpi,
|
||||||
|
elsiocb))
|
||||||
|
kfree(elsiocb);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -130,6 +130,14 @@ static const struct dmi_system_id adr_remap_quirk_table[] = {
|
||||||
},
|
},
|
||||||
.driver_data = (void *)intel_rooks_county,
|
.driver_data = (void *)intel_rooks_county,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
/* quirk used for NUC15 LAPRC710 skew */
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_BOARD_VENDOR, "Intel Corporation"),
|
||||||
|
DMI_MATCH(DMI_BOARD_NAME, "LAPRC710"),
|
||||||
|
},
|
||||||
|
.driver_data = (void *)intel_rooks_county,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.matches = {
|
.matches = {
|
||||||
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
|
||||||
|
|
|
@ -225,14 +225,18 @@ static int thermal_of_monitor_init(struct device_node *np, int *delay, int *pdel
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = of_property_read_u32(np, "polling-delay-passive", pdelay);
|
ret = of_property_read_u32(np, "polling-delay-passive", pdelay);
|
||||||
if (ret < 0) {
|
if (ret == -EINVAL) {
|
||||||
pr_err("%pOFn: missing polling-delay-passive property\n", np);
|
*pdelay = 0;
|
||||||
|
} else if (ret < 0) {
|
||||||
|
pr_err("%pOFn: Couldn't get polling-delay-passive: %d\n", np, ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = of_property_read_u32(np, "polling-delay", delay);
|
ret = of_property_read_u32(np, "polling-delay", delay);
|
||||||
if (ret < 0) {
|
if (ret == -EINVAL) {
|
||||||
pr_err("%pOFn: missing polling-delay property\n", np);
|
*delay = 0;
|
||||||
|
} else if (ret < 0) {
|
||||||
|
pr_err("%pOFn: Couldn't get polling-delay: %d\n", np, ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,12 @@ static void quirk_usb3_maximum_bandwidth(struct tb_switch *sw)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void quirk_block_rpm_in_redrive(struct tb_switch *sw)
|
||||||
|
{
|
||||||
|
sw->quirks |= QUIRK_KEEP_POWER_IN_DP_REDRIVE;
|
||||||
|
tb_sw_dbg(sw, "preventing runtime PM in DP redrive mode\n");
|
||||||
|
}
|
||||||
|
|
||||||
struct tb_quirk {
|
struct tb_quirk {
|
||||||
u16 hw_vendor_id;
|
u16 hw_vendor_id;
|
||||||
u16 hw_device_id;
|
u16 hw_device_id;
|
||||||
|
@ -86,6 +92,14 @@ static const struct tb_quirk tb_quirks[] = {
|
||||||
quirk_usb3_maximum_bandwidth },
|
quirk_usb3_maximum_bandwidth },
|
||||||
{ 0x8087, PCI_DEVICE_ID_INTEL_BARLOW_RIDGE_HUB_40G_BRIDGE, 0x0000, 0x0000,
|
{ 0x8087, PCI_DEVICE_ID_INTEL_BARLOW_RIDGE_HUB_40G_BRIDGE, 0x0000, 0x0000,
|
||||||
quirk_usb3_maximum_bandwidth },
|
quirk_usb3_maximum_bandwidth },
|
||||||
|
/*
|
||||||
|
* Block Runtime PM in DP redrive mode for Intel Barlow Ridge host
|
||||||
|
* controllers.
|
||||||
|
*/
|
||||||
|
{ 0x8087, PCI_DEVICE_ID_INTEL_BARLOW_RIDGE_HOST_80G_NHI, 0x0000, 0x0000,
|
||||||
|
quirk_block_rpm_in_redrive },
|
||||||
|
{ 0x8087, PCI_DEVICE_ID_INTEL_BARLOW_RIDGE_HOST_40G_NHI, 0x0000, 0x0000,
|
||||||
|
quirk_block_rpm_in_redrive },
|
||||||
/*
|
/*
|
||||||
* CLx is not supported on AMD USB4 Yellow Carp and Pink Sardine platforms.
|
* CLx is not supported on AMD USB4 Yellow Carp and Pink Sardine platforms.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1416,6 +1416,49 @@ err_rpm_put:
|
||||||
pm_runtime_put_autosuspend(&in->sw->dev);
|
pm_runtime_put_autosuspend(&in->sw->dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void tb_enter_redrive(struct tb_port *port)
|
||||||
|
{
|
||||||
|
struct tb_switch *sw = port->sw;
|
||||||
|
|
||||||
|
if (!(sw->quirks & QUIRK_KEEP_POWER_IN_DP_REDRIVE))
|
||||||
|
return;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If we get hot-unplug for the DP IN port of the host router
|
||||||
|
* and the DP resource is not available anymore it means there
|
||||||
|
* is a monitor connected directly to the Type-C port and we are
|
||||||
|
* in "redrive" mode. For this to work we cannot enter RTD3 so
|
||||||
|
* we bump up the runtime PM reference count here.
|
||||||
|
*/
|
||||||
|
if (!tb_port_is_dpin(port))
|
||||||
|
return;
|
||||||
|
if (tb_route(sw))
|
||||||
|
return;
|
||||||
|
if (!tb_switch_query_dp_resource(sw, port)) {
|
||||||
|
port->redrive = true;
|
||||||
|
pm_runtime_get(&sw->dev);
|
||||||
|
tb_port_dbg(port, "enter redrive mode, keeping powered\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void tb_exit_redrive(struct tb_port *port)
|
||||||
|
{
|
||||||
|
struct tb_switch *sw = port->sw;
|
||||||
|
|
||||||
|
if (!(sw->quirks & QUIRK_KEEP_POWER_IN_DP_REDRIVE))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!tb_port_is_dpin(port))
|
||||||
|
return;
|
||||||
|
if (tb_route(sw))
|
||||||
|
return;
|
||||||
|
if (port->redrive && tb_switch_query_dp_resource(sw, port)) {
|
||||||
|
port->redrive = false;
|
||||||
|
pm_runtime_put(&sw->dev);
|
||||||
|
tb_port_dbg(port, "exit redrive mode\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void tb_dp_resource_unavailable(struct tb *tb, struct tb_port *port)
|
static void tb_dp_resource_unavailable(struct tb *tb, struct tb_port *port)
|
||||||
{
|
{
|
||||||
struct tb_port *in, *out;
|
struct tb_port *in, *out;
|
||||||
|
@ -1432,7 +1475,10 @@ static void tb_dp_resource_unavailable(struct tb *tb, struct tb_port *port)
|
||||||
}
|
}
|
||||||
|
|
||||||
tunnel = tb_find_tunnel(tb, TB_TUNNEL_DP, in, out);
|
tunnel = tb_find_tunnel(tb, TB_TUNNEL_DP, in, out);
|
||||||
tb_deactivate_and_free_tunnel(tunnel);
|
if (tunnel)
|
||||||
|
tb_deactivate_and_free_tunnel(tunnel);
|
||||||
|
else
|
||||||
|
tb_enter_redrive(port);
|
||||||
list_del_init(&port->list);
|
list_del_init(&port->list);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1459,6 +1505,7 @@ static void tb_dp_resource_available(struct tb *tb, struct tb_port *port)
|
||||||
tb_port_dbg(port, "DP %s resource available\n",
|
tb_port_dbg(port, "DP %s resource available\n",
|
||||||
tb_port_is_dpin(port) ? "IN" : "OUT");
|
tb_port_is_dpin(port) ? "IN" : "OUT");
|
||||||
list_add_tail(&port->list, &tcm->dp_resources);
|
list_add_tail(&port->list, &tcm->dp_resources);
|
||||||
|
tb_exit_redrive(port);
|
||||||
|
|
||||||
/* Look for suitable DP IN <-> DP OUT pairs now */
|
/* Look for suitable DP IN <-> DP OUT pairs now */
|
||||||
tb_tunnel_dp(tb);
|
tb_tunnel_dp(tb);
|
||||||
|
|
|
@ -23,6 +23,8 @@
|
||||||
#define QUIRK_FORCE_POWER_LINK_CONTROLLER BIT(0)
|
#define QUIRK_FORCE_POWER_LINK_CONTROLLER BIT(0)
|
||||||
/* Disable CLx if not supported */
|
/* Disable CLx if not supported */
|
||||||
#define QUIRK_NO_CLX BIT(1)
|
#define QUIRK_NO_CLX BIT(1)
|
||||||
|
/* Need to keep power on while USB4 port is in redrive mode */
|
||||||
|
#define QUIRK_KEEP_POWER_IN_DP_REDRIVE BIT(2)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct tb_nvm - Structure holding NVM information
|
* struct tb_nvm - Structure holding NVM information
|
||||||
|
@ -261,6 +263,7 @@ struct tb_bandwidth_group {
|
||||||
* @group_list: The adapter is linked to the group's list of ports through this
|
* @group_list: The adapter is linked to the group's list of ports through this
|
||||||
* @max_bw: Maximum possible bandwidth through this adapter if set to
|
* @max_bw: Maximum possible bandwidth through this adapter if set to
|
||||||
* non-zero.
|
* non-zero.
|
||||||
|
* @redrive: For DP IN, if true the adapter is in redrive mode.
|
||||||
*
|
*
|
||||||
* In USB4 terminology this structure represents an adapter (protocol or
|
* In USB4 terminology this structure represents an adapter (protocol or
|
||||||
* lane adapter).
|
* lane adapter).
|
||||||
|
@ -289,6 +292,7 @@ struct tb_port {
|
||||||
struct tb_bandwidth_group *group;
|
struct tb_bandwidth_group *group;
|
||||||
struct list_head group_list;
|
struct list_head group_list;
|
||||||
unsigned int max_bw;
|
unsigned int max_bw;
|
||||||
|
bool redrive;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -35,6 +35,9 @@ uvc_video_encode_header(struct uvc_video *video, struct uvc_buffer *buf,
|
||||||
|
|
||||||
data[1] = UVC_STREAM_EOH | video->fid;
|
data[1] = UVC_STREAM_EOH | video->fid;
|
||||||
|
|
||||||
|
if (video->queue.flags & UVC_QUEUE_DROP_INCOMPLETE)
|
||||||
|
data[1] |= UVC_STREAM_ERR;
|
||||||
|
|
||||||
if (video->queue.buf_used == 0 && ts.tv_sec) {
|
if (video->queue.buf_used == 0 && ts.tv_sec) {
|
||||||
/* dwClockFrequency is 48 MHz */
|
/* dwClockFrequency is 48 MHz */
|
||||||
u32 pts = ((u64)ts.tv_sec * USEC_PER_SEC + ts.tv_nsec / NSEC_PER_USEC) * 48;
|
u32 pts = ((u64)ts.tv_sec * USEC_PER_SEC + ts.tv_nsec / NSEC_PER_USEC) * 48;
|
||||||
|
|
|
@ -585,6 +585,7 @@ done(struct sl811 *sl811, struct sl811h_ep *ep, u8 bank)
|
||||||
finish_request(sl811, ep, urb, urbstat);
|
finish_request(sl811, ep, urb, urbstat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef QUIRK2
|
||||||
static inline u8 checkdone(struct sl811 *sl811)
|
static inline u8 checkdone(struct sl811 *sl811)
|
||||||
{
|
{
|
||||||
u8 ctl;
|
u8 ctl;
|
||||||
|
@ -616,6 +617,7 @@ static inline u8 checkdone(struct sl811 *sl811)
|
||||||
#endif
|
#endif
|
||||||
return irqstat;
|
return irqstat;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static irqreturn_t sl811h_irq(struct usb_hcd *hcd)
|
static irqreturn_t sl811h_irq(struct usb_hcd *hcd)
|
||||||
{
|
{
|
||||||
|
|
|
@ -889,6 +889,7 @@ MODULE_DEVICE_TABLE(i2c, tcpci_id);
|
||||||
#ifdef CONFIG_OF
|
#ifdef CONFIG_OF
|
||||||
static const struct of_device_id tcpci_of_match[] = {
|
static const struct of_device_id tcpci_of_match[] = {
|
||||||
{ .compatible = "nxp,ptn5110", },
|
{ .compatible = "nxp,ptn5110", },
|
||||||
|
{ .compatible = "tcpci", },
|
||||||
{},
|
{},
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(of, tcpci_of_match);
|
MODULE_DEVICE_TABLE(of, tcpci_of_match);
|
||||||
|
|
|
@ -36,6 +36,19 @@
|
||||||
*/
|
*/
|
||||||
#define UCSI_SWAP_TIMEOUT_MS 5000
|
#define UCSI_SWAP_TIMEOUT_MS 5000
|
||||||
|
|
||||||
|
static int ucsi_read_message_in(struct ucsi *ucsi, void *buf,
|
||||||
|
size_t buf_size)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Below UCSI 2.0, MESSAGE_IN was limited to 16 bytes. Truncate the
|
||||||
|
* reads here.
|
||||||
|
*/
|
||||||
|
if (ucsi->version <= UCSI_VERSION_1_2)
|
||||||
|
buf_size = clamp(buf_size, 0, 16);
|
||||||
|
|
||||||
|
return ucsi->ops->read(ucsi, UCSI_MESSAGE_IN, buf, buf_size);
|
||||||
|
}
|
||||||
|
|
||||||
static int ucsi_acknowledge_command(struct ucsi *ucsi)
|
static int ucsi_acknowledge_command(struct ucsi *ucsi)
|
||||||
{
|
{
|
||||||
u64 ctrl;
|
u64 ctrl;
|
||||||
|
@ -72,7 +85,7 @@ static int ucsi_read_error(struct ucsi *ucsi)
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
ret = ucsi->ops->read(ucsi, UCSI_MESSAGE_IN, &error, sizeof(error));
|
ret = ucsi_read_message_in(ucsi, &error, sizeof(error));
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
@ -174,7 +187,7 @@ int ucsi_send_command(struct ucsi *ucsi, u64 command,
|
||||||
length = ret;
|
length = ret;
|
||||||
|
|
||||||
if (data) {
|
if (data) {
|
||||||
ret = ucsi->ops->read(ucsi, UCSI_MESSAGE_IN, data, size);
|
ret = ucsi_read_message_in(ucsi, data, size);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
@ -1593,6 +1606,15 @@ int ucsi_register(struct ucsi *ucsi)
|
||||||
if (!ucsi->version)
|
if (!ucsi->version)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Version format is JJ.M.N (JJ = Major version, M = Minor version,
|
||||||
|
* N = sub-minor version).
|
||||||
|
*/
|
||||||
|
dev_dbg(ucsi->dev, "Registered UCSI interface with version %x.%x.%x",
|
||||||
|
UCSI_BCD_GET_MAJOR(ucsi->version),
|
||||||
|
UCSI_BCD_GET_MINOR(ucsi->version),
|
||||||
|
UCSI_BCD_GET_SUBMINOR(ucsi->version));
|
||||||
|
|
||||||
queue_delayed_work(system_long_wq, &ucsi->work, 0);
|
queue_delayed_work(system_long_wq, &ucsi->work, 0);
|
||||||
|
|
||||||
ucsi_debugfs_register(ucsi);
|
ucsi_debugfs_register(ucsi);
|
||||||
|
|
|
@ -23,6 +23,17 @@ struct dentry;
|
||||||
#define UCSI_CONTROL 8
|
#define UCSI_CONTROL 8
|
||||||
#define UCSI_MESSAGE_IN 16
|
#define UCSI_MESSAGE_IN 16
|
||||||
#define UCSI_MESSAGE_OUT 32
|
#define UCSI_MESSAGE_OUT 32
|
||||||
|
#define UCSIv2_MESSAGE_OUT 272
|
||||||
|
|
||||||
|
/* UCSI versions */
|
||||||
|
#define UCSI_VERSION_1_2 0x0120
|
||||||
|
#define UCSI_VERSION_2_0 0x0200
|
||||||
|
#define UCSI_VERSION_2_1 0x0210
|
||||||
|
#define UCSI_VERSION_3_0 0x0300
|
||||||
|
|
||||||
|
#define UCSI_BCD_GET_MAJOR(_v_) (((_v_) >> 8) & 0xFF)
|
||||||
|
#define UCSI_BCD_GET_MINOR(_v_) (((_v_) >> 4) & 0x0F)
|
||||||
|
#define UCSI_BCD_GET_SUBMINOR(_v_) ((_v_) & 0x0F)
|
||||||
|
|
||||||
/* Command Status and Connector Change Indication (CCI) bits */
|
/* Command Status and Connector Change Indication (CCI) bits */
|
||||||
#define UCSI_CCI_CONNECTOR(_c_) (((_c_) & GENMASK(7, 1)) >> 1)
|
#define UCSI_CCI_CONNECTOR(_c_) (((_c_) & GENMASK(7, 1)) >> 1)
|
||||||
|
|
|
@ -1311,7 +1311,7 @@ int fb_get_mode(int flags, u32 val, struct fb_var_screeninfo *var, struct fb_inf
|
||||||
int fb_videomode_from_videomode(const struct videomode *vm,
|
int fb_videomode_from_videomode(const struct videomode *vm,
|
||||||
struct fb_videomode *fbmode)
|
struct fb_videomode *fbmode)
|
||||||
{
|
{
|
||||||
unsigned int htotal, vtotal;
|
unsigned int htotal, vtotal, total;
|
||||||
|
|
||||||
fbmode->xres = vm->hactive;
|
fbmode->xres = vm->hactive;
|
||||||
fbmode->left_margin = vm->hback_porch;
|
fbmode->left_margin = vm->hback_porch;
|
||||||
|
@ -1344,8 +1344,9 @@ int fb_videomode_from_videomode(const struct videomode *vm,
|
||||||
vtotal = vm->vactive + vm->vfront_porch + vm->vback_porch +
|
vtotal = vm->vactive + vm->vfront_porch + vm->vback_porch +
|
||||||
vm->vsync_len;
|
vm->vsync_len;
|
||||||
/* prevent division by zero */
|
/* prevent division by zero */
|
||||||
if (htotal && vtotal) {
|
total = htotal * vtotal;
|
||||||
fbmode->refresh = vm->pixelclock / (htotal * vtotal);
|
if (total) {
|
||||||
|
fbmode->refresh = vm->pixelclock / total;
|
||||||
/* a mode must have htotal and vtotal != 0 or it is invalid */
|
/* a mode must have htotal and vtotal != 0 or it is invalid */
|
||||||
} else {
|
} else {
|
||||||
fbmode->refresh = 0;
|
fbmode->refresh = 0;
|
||||||
|
|
|
@ -115,7 +115,7 @@ static int hw_bitblt_1(void __iomem *engine, u8 op, u32 width, u32 height,
|
||||||
|
|
||||||
if (op != VIA_BITBLT_FILL) {
|
if (op != VIA_BITBLT_FILL) {
|
||||||
tmp = src_mem ? 0 : src_addr;
|
tmp = src_mem ? 0 : src_addr;
|
||||||
if (dst_addr & 0xE0000007) {
|
if (tmp & 0xE0000007) {
|
||||||
printk(KERN_WARNING "hw_bitblt_1: Unsupported source "
|
printk(KERN_WARNING "hw_bitblt_1: Unsupported source "
|
||||||
"address %X\n", tmp);
|
"address %X\n", tmp);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -260,7 +260,7 @@ static int hw_bitblt_2(void __iomem *engine, u8 op, u32 width, u32 height,
|
||||||
writel(tmp, engine + 0x18);
|
writel(tmp, engine + 0x18);
|
||||||
|
|
||||||
tmp = src_mem ? 0 : src_addr;
|
tmp = src_mem ? 0 : src_addr;
|
||||||
if (dst_addr & 0xE0000007) {
|
if (tmp & 0xE0000007) {
|
||||||
printk(KERN_WARNING "hw_bitblt_2: Unsupported source "
|
printk(KERN_WARNING "hw_bitblt_2: Unsupported source "
|
||||||
"address %X\n", tmp);
|
"address %X\n", tmp);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
|
@ -673,7 +673,6 @@ EXPORT_SYMBOL(xen_free_ballooned_pages);
|
||||||
|
|
||||||
static void __init balloon_add_regions(void)
|
static void __init balloon_add_regions(void)
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_XEN_PV)
|
|
||||||
unsigned long start_pfn, pages;
|
unsigned long start_pfn, pages;
|
||||||
unsigned long pfn, extra_pfn_end;
|
unsigned long pfn, extra_pfn_end;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
@ -697,7 +696,6 @@ static void __init balloon_add_regions(void)
|
||||||
|
|
||||||
balloon_stats.total_pages += extra_pfn_end - start_pfn;
|
balloon_stats.total_pages += extra_pfn_end - start_pfn;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __init balloon_init(void)
|
static int __init balloon_init(void)
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue