mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
Merge eed8395d94 ("udf: Fold udf_getblk() into udf_bread()") into android14-6.1-lts
Steps on the way to 6.1.121 Resolves merge conflicts in: mm/kasan/report.c Change-Id: Ib310935a500ec1829d89bb0de679d6dc0645aeb9 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -163,6 +163,17 @@ Description:
|
|||||||
will be present in sysfs. Writing 1 to this file
|
will be present in sysfs. Writing 1 to this file
|
||||||
will perform reset.
|
will perform reset.
|
||||||
|
|
||||||
|
What: /sys/bus/pci/devices/.../reset_subordinate
|
||||||
|
Date: October 2024
|
||||||
|
Contact: linux-pci@vger.kernel.org
|
||||||
|
Description:
|
||||||
|
This is visible only for bridge devices. If you want to reset
|
||||||
|
all devices attached through the subordinate bus of a specific
|
||||||
|
bridge device, writing 1 to this will try to do it. This will
|
||||||
|
affect all devices attached to the system through this bridge
|
||||||
|
similiar to writing 1 to their individual "reset" file, so use
|
||||||
|
with caution.
|
||||||
|
|
||||||
What: /sys/bus/pci/devices/.../vpd
|
What: /sys/bus/pci/devices/.../vpd
|
||||||
Date: February 2008
|
Date: February 2008
|
||||||
Contact: Ben Hutchings <bwh@kernel.org>
|
Contact: Ben Hutchings <bwh@kernel.org>
|
||||||
|
|||||||
@@ -279,7 +279,7 @@ void setup_tlb_handler(int cpu)
|
|||||||
/* Avoid lockdep warning */
|
/* Avoid lockdep warning */
|
||||||
rcu_cpu_starting(cpu);
|
rcu_cpu_starting(cpu);
|
||||||
|
|
||||||
#ifdef CONFIG_NUMA
|
#if defined(CONFIG_NUMA) && !defined(CONFIG_PREEMPT_RT)
|
||||||
vec_sz = sizeof(exception_handlers);
|
vec_sz = sizeof(exception_handlers);
|
||||||
|
|
||||||
if (pcpu_handlers[cpu])
|
if (pcpu_handlers[cpu])
|
||||||
|
|||||||
@@ -63,7 +63,6 @@
|
|||||||
device_type = "pci";
|
device_type = "pci";
|
||||||
#address-cells = <3>;
|
#address-cells = <3>;
|
||||||
#size-cells = <2>;
|
#size-cells = <2>;
|
||||||
#interrupt-cells = <2>;
|
|
||||||
msi-parent = <&msi>;
|
msi-parent = <&msi>;
|
||||||
|
|
||||||
reg = <0 0x1a000000 0 0x02000000>,
|
reg = <0 0x1a000000 0 0x02000000>,
|
||||||
@@ -227,7 +226,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
pci_bridge@9,0 {
|
pcie@9,0 {
|
||||||
compatible = "pci0014,7a19.1",
|
compatible = "pci0014,7a19.1",
|
||||||
"pci0014,7a19",
|
"pci0014,7a19",
|
||||||
"pciclass060400",
|
"pciclass060400",
|
||||||
@@ -237,12 +236,16 @@
|
|||||||
interrupts = <32 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <32 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
interrupt-parent = <&pic>;
|
interrupt-parent = <&pic>;
|
||||||
|
|
||||||
|
#address-cells = <3>;
|
||||||
|
#size-cells = <2>;
|
||||||
|
device_type = "pci";
|
||||||
#interrupt-cells = <1>;
|
#interrupt-cells = <1>;
|
||||||
interrupt-map-mask = <0 0 0 0>;
|
interrupt-map-mask = <0 0 0 0>;
|
||||||
interrupt-map = <0 0 0 0 &pic 32 IRQ_TYPE_LEVEL_HIGH>;
|
interrupt-map = <0 0 0 0 &pic 32 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
ranges;
|
||||||
};
|
};
|
||||||
|
|
||||||
pci_bridge@a,0 {
|
pcie@a,0 {
|
||||||
compatible = "pci0014,7a09.1",
|
compatible = "pci0014,7a09.1",
|
||||||
"pci0014,7a09",
|
"pci0014,7a09",
|
||||||
"pciclass060400",
|
"pciclass060400",
|
||||||
@@ -252,12 +255,16 @@
|
|||||||
interrupts = <33 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <33 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
interrupt-parent = <&pic>;
|
interrupt-parent = <&pic>;
|
||||||
|
|
||||||
|
#address-cells = <3>;
|
||||||
|
#size-cells = <2>;
|
||||||
|
device_type = "pci";
|
||||||
#interrupt-cells = <1>;
|
#interrupt-cells = <1>;
|
||||||
interrupt-map-mask = <0 0 0 0>;
|
interrupt-map-mask = <0 0 0 0>;
|
||||||
interrupt-map = <0 0 0 0 &pic 33 IRQ_TYPE_LEVEL_HIGH>;
|
interrupt-map = <0 0 0 0 &pic 33 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
ranges;
|
||||||
};
|
};
|
||||||
|
|
||||||
pci_bridge@b,0 {
|
pcie@b,0 {
|
||||||
compatible = "pci0014,7a09.1",
|
compatible = "pci0014,7a09.1",
|
||||||
"pci0014,7a09",
|
"pci0014,7a09",
|
||||||
"pciclass060400",
|
"pciclass060400",
|
||||||
@@ -267,12 +274,16 @@
|
|||||||
interrupts = <34 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <34 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
interrupt-parent = <&pic>;
|
interrupt-parent = <&pic>;
|
||||||
|
|
||||||
|
#address-cells = <3>;
|
||||||
|
#size-cells = <2>;
|
||||||
|
device_type = "pci";
|
||||||
#interrupt-cells = <1>;
|
#interrupt-cells = <1>;
|
||||||
interrupt-map-mask = <0 0 0 0>;
|
interrupt-map-mask = <0 0 0 0>;
|
||||||
interrupt-map = <0 0 0 0 &pic 34 IRQ_TYPE_LEVEL_HIGH>;
|
interrupt-map = <0 0 0 0 &pic 34 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
ranges;
|
||||||
};
|
};
|
||||||
|
|
||||||
pci_bridge@c,0 {
|
pcie@c,0 {
|
||||||
compatible = "pci0014,7a09.1",
|
compatible = "pci0014,7a09.1",
|
||||||
"pci0014,7a09",
|
"pci0014,7a09",
|
||||||
"pciclass060400",
|
"pciclass060400",
|
||||||
@@ -282,12 +293,16 @@
|
|||||||
interrupts = <35 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <35 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
interrupt-parent = <&pic>;
|
interrupt-parent = <&pic>;
|
||||||
|
|
||||||
|
#address-cells = <3>;
|
||||||
|
#size-cells = <2>;
|
||||||
|
device_type = "pci";
|
||||||
#interrupt-cells = <1>;
|
#interrupt-cells = <1>;
|
||||||
interrupt-map-mask = <0 0 0 0>;
|
interrupt-map-mask = <0 0 0 0>;
|
||||||
interrupt-map = <0 0 0 0 &pic 35 IRQ_TYPE_LEVEL_HIGH>;
|
interrupt-map = <0 0 0 0 &pic 35 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
ranges;
|
||||||
};
|
};
|
||||||
|
|
||||||
pci_bridge@d,0 {
|
pcie@d,0 {
|
||||||
compatible = "pci0014,7a19.1",
|
compatible = "pci0014,7a19.1",
|
||||||
"pci0014,7a19",
|
"pci0014,7a19",
|
||||||
"pciclass060400",
|
"pciclass060400",
|
||||||
@@ -297,12 +312,16 @@
|
|||||||
interrupts = <36 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <36 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
interrupt-parent = <&pic>;
|
interrupt-parent = <&pic>;
|
||||||
|
|
||||||
|
#address-cells = <3>;
|
||||||
|
#size-cells = <2>;
|
||||||
|
device_type = "pci";
|
||||||
#interrupt-cells = <1>;
|
#interrupt-cells = <1>;
|
||||||
interrupt-map-mask = <0 0 0 0>;
|
interrupt-map-mask = <0 0 0 0>;
|
||||||
interrupt-map = <0 0 0 0 &pic 36 IRQ_TYPE_LEVEL_HIGH>;
|
interrupt-map = <0 0 0 0 &pic 36 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
ranges;
|
||||||
};
|
};
|
||||||
|
|
||||||
pci_bridge@e,0 {
|
pcie@e,0 {
|
||||||
compatible = "pci0014,7a09.1",
|
compatible = "pci0014,7a09.1",
|
||||||
"pci0014,7a09",
|
"pci0014,7a09",
|
||||||
"pciclass060400",
|
"pciclass060400",
|
||||||
@@ -312,12 +331,16 @@
|
|||||||
interrupts = <37 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <37 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
interrupt-parent = <&pic>;
|
interrupt-parent = <&pic>;
|
||||||
|
|
||||||
|
#address-cells = <3>;
|
||||||
|
#size-cells = <2>;
|
||||||
|
device_type = "pci";
|
||||||
#interrupt-cells = <1>;
|
#interrupt-cells = <1>;
|
||||||
interrupt-map-mask = <0 0 0 0>;
|
interrupt-map-mask = <0 0 0 0>;
|
||||||
interrupt-map = <0 0 0 0 &pic 37 IRQ_TYPE_LEVEL_HIGH>;
|
interrupt-map = <0 0 0 0 &pic 37 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
ranges;
|
||||||
};
|
};
|
||||||
|
|
||||||
pci_bridge@f,0 {
|
pcie@f,0 {
|
||||||
compatible = "pci0014,7a29.1",
|
compatible = "pci0014,7a29.1",
|
||||||
"pci0014,7a29",
|
"pci0014,7a29",
|
||||||
"pciclass060400",
|
"pciclass060400",
|
||||||
@@ -327,12 +350,16 @@
|
|||||||
interrupts = <40 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <40 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
interrupt-parent = <&pic>;
|
interrupt-parent = <&pic>;
|
||||||
|
|
||||||
|
#address-cells = <3>;
|
||||||
|
#size-cells = <2>;
|
||||||
|
device_type = "pci";
|
||||||
#interrupt-cells = <1>;
|
#interrupt-cells = <1>;
|
||||||
interrupt-map-mask = <0 0 0 0>;
|
interrupt-map-mask = <0 0 0 0>;
|
||||||
interrupt-map = <0 0 0 0 &pic 40 IRQ_TYPE_LEVEL_HIGH>;
|
interrupt-map = <0 0 0 0 &pic 40 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
ranges;
|
||||||
};
|
};
|
||||||
|
|
||||||
pci_bridge@10,0 {
|
pcie@10,0 {
|
||||||
compatible = "pci0014,7a19.1",
|
compatible = "pci0014,7a19.1",
|
||||||
"pci0014,7a19",
|
"pci0014,7a19",
|
||||||
"pciclass060400",
|
"pciclass060400",
|
||||||
@@ -342,12 +369,16 @@
|
|||||||
interrupts = <41 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <41 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
interrupt-parent = <&pic>;
|
interrupt-parent = <&pic>;
|
||||||
|
|
||||||
|
#address-cells = <3>;
|
||||||
|
#size-cells = <2>;
|
||||||
|
device_type = "pci";
|
||||||
#interrupt-cells = <1>;
|
#interrupt-cells = <1>;
|
||||||
interrupt-map-mask = <0 0 0 0>;
|
interrupt-map-mask = <0 0 0 0>;
|
||||||
interrupt-map = <0 0 0 0 &pic 41 IRQ_TYPE_LEVEL_HIGH>;
|
interrupt-map = <0 0 0 0 &pic 41 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
ranges;
|
||||||
};
|
};
|
||||||
|
|
||||||
pci_bridge@11,0 {
|
pcie@11,0 {
|
||||||
compatible = "pci0014,7a29.1",
|
compatible = "pci0014,7a29.1",
|
||||||
"pci0014,7a29",
|
"pci0014,7a29",
|
||||||
"pciclass060400",
|
"pciclass060400",
|
||||||
@@ -357,12 +388,16 @@
|
|||||||
interrupts = <42 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <42 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
interrupt-parent = <&pic>;
|
interrupt-parent = <&pic>;
|
||||||
|
|
||||||
|
#address-cells = <3>;
|
||||||
|
#size-cells = <2>;
|
||||||
|
device_type = "pci";
|
||||||
#interrupt-cells = <1>;
|
#interrupt-cells = <1>;
|
||||||
interrupt-map-mask = <0 0 0 0>;
|
interrupt-map-mask = <0 0 0 0>;
|
||||||
interrupt-map = <0 0 0 0 &pic 42 IRQ_TYPE_LEVEL_HIGH>;
|
interrupt-map = <0 0 0 0 &pic 42 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
ranges;
|
||||||
};
|
};
|
||||||
|
|
||||||
pci_bridge@12,0 {
|
pcie@12,0 {
|
||||||
compatible = "pci0014,7a19.1",
|
compatible = "pci0014,7a19.1",
|
||||||
"pci0014,7a19",
|
"pci0014,7a19",
|
||||||
"pciclass060400",
|
"pciclass060400",
|
||||||
@@ -372,12 +407,16 @@
|
|||||||
interrupts = <43 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <43 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
interrupt-parent = <&pic>;
|
interrupt-parent = <&pic>;
|
||||||
|
|
||||||
|
#address-cells = <3>;
|
||||||
|
#size-cells = <2>;
|
||||||
|
device_type = "pci";
|
||||||
#interrupt-cells = <1>;
|
#interrupt-cells = <1>;
|
||||||
interrupt-map-mask = <0 0 0 0>;
|
interrupt-map-mask = <0 0 0 0>;
|
||||||
interrupt-map = <0 0 0 0 &pic 43 IRQ_TYPE_LEVEL_HIGH>;
|
interrupt-map = <0 0 0 0 &pic 43 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
ranges;
|
||||||
};
|
};
|
||||||
|
|
||||||
pci_bridge@13,0 {
|
pcie@13,0 {
|
||||||
compatible = "pci0014,7a29.1",
|
compatible = "pci0014,7a29.1",
|
||||||
"pci0014,7a29",
|
"pci0014,7a29",
|
||||||
"pciclass060400",
|
"pciclass060400",
|
||||||
@@ -387,12 +426,16 @@
|
|||||||
interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
interrupt-parent = <&pic>;
|
interrupt-parent = <&pic>;
|
||||||
|
|
||||||
|
#address-cells = <3>;
|
||||||
|
#size-cells = <2>;
|
||||||
|
device_type = "pci";
|
||||||
#interrupt-cells = <1>;
|
#interrupt-cells = <1>;
|
||||||
interrupt-map-mask = <0 0 0 0>;
|
interrupt-map-mask = <0 0 0 0>;
|
||||||
interrupt-map = <0 0 0 0 &pic 38 IRQ_TYPE_LEVEL_HIGH>;
|
interrupt-map = <0 0 0 0 &pic 38 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
ranges;
|
||||||
};
|
};
|
||||||
|
|
||||||
pci_bridge@14,0 {
|
pcie@14,0 {
|
||||||
compatible = "pci0014,7a19.1",
|
compatible = "pci0014,7a19.1",
|
||||||
"pci0014,7a19",
|
"pci0014,7a19",
|
||||||
"pciclass060400",
|
"pciclass060400",
|
||||||
@@ -402,9 +445,13 @@
|
|||||||
interrupts = <39 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <39 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
interrupt-parent = <&pic>;
|
interrupt-parent = <&pic>;
|
||||||
|
|
||||||
|
#address-cells = <3>;
|
||||||
|
#size-cells = <2>;
|
||||||
|
device_type = "pci";
|
||||||
#interrupt-cells = <1>;
|
#interrupt-cells = <1>;
|
||||||
interrupt-map-mask = <0 0 0 0>;
|
interrupt-map-mask = <0 0 0 0>;
|
||||||
interrupt-map = <0 0 0 0 &pic 39 IRQ_TYPE_LEVEL_HIGH>;
|
interrupt-map = <0 0 0 0 &pic 39 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
ranges;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -2924,7 +2924,7 @@ static void __init fixup_device_tree_chrp(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_PPC64) && defined(CONFIG_PPC_PMAC)
|
#if defined(CONFIG_PPC64) && defined(CONFIG_PPC_PMAC)
|
||||||
static void __init fixup_device_tree_pmac(void)
|
static void __init fixup_device_tree_pmac64(void)
|
||||||
{
|
{
|
||||||
phandle u3, i2c, mpic;
|
phandle u3, i2c, mpic;
|
||||||
u32 u3_rev;
|
u32 u3_rev;
|
||||||
@@ -2964,7 +2964,31 @@ static void __init fixup_device_tree_pmac(void)
|
|||||||
&parent, sizeof(parent));
|
&parent, sizeof(parent));
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#define fixup_device_tree_pmac()
|
#define fixup_device_tree_pmac64()
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_PPC_PMAC
|
||||||
|
static void __init fixup_device_tree_pmac(void)
|
||||||
|
{
|
||||||
|
__be32 val = 1;
|
||||||
|
char type[8];
|
||||||
|
phandle node;
|
||||||
|
|
||||||
|
// Some pmacs are missing #size-cells on escc nodes
|
||||||
|
for (node = 0; prom_next_node(&node); ) {
|
||||||
|
type[0] = '\0';
|
||||||
|
prom_getprop(node, "device_type", type, sizeof(type));
|
||||||
|
if (prom_strcmp(type, "escc"))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (prom_getproplen(node, "#size-cells") != PROM_ERROR)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
prom_setprop(node, NULL, "#size-cells", &val, sizeof(val));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static inline void fixup_device_tree_pmac(void) { }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_PPC_EFIKA
|
#ifdef CONFIG_PPC_EFIKA
|
||||||
@@ -3189,6 +3213,7 @@ static void __init fixup_device_tree(void)
|
|||||||
fixup_device_tree_maple_memory_controller();
|
fixup_device_tree_maple_memory_controller();
|
||||||
fixup_device_tree_chrp();
|
fixup_device_tree_chrp();
|
||||||
fixup_device_tree_pmac();
|
fixup_device_tree_pmac();
|
||||||
|
fixup_device_tree_pmac64();
|
||||||
fixup_device_tree_efika();
|
fixup_device_tree_efika();
|
||||||
fixup_device_tree_pasemi();
|
fixup_device_tree_pasemi();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -248,6 +248,125 @@ void __init pci_acpi_crs_quirks(void)
|
|||||||
printk(KERN_INFO "PCI: Please notify linux-pci@vger.kernel.org so future kernels can this automatically\n");
|
printk(KERN_INFO "PCI: Please notify linux-pci@vger.kernel.org so future kernels can this automatically\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Check if pdev is part of a PCIe switch that is directly below the
|
||||||
|
* specified bridge.
|
||||||
|
*/
|
||||||
|
static bool pcie_switch_directly_under(struct pci_dev *bridge,
|
||||||
|
struct pci_dev *pdev)
|
||||||
|
{
|
||||||
|
struct pci_dev *parent = pci_upstream_bridge(pdev);
|
||||||
|
|
||||||
|
/* If the device doesn't have a parent, it's not under anything */
|
||||||
|
if (!parent)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If the device has a PCIe type, check if it is below the
|
||||||
|
* corresponding PCIe switch components (if applicable). Then check
|
||||||
|
* if its upstream port is directly beneath the specified bridge.
|
||||||
|
*/
|
||||||
|
switch (pci_pcie_type(pdev)) {
|
||||||
|
case PCI_EXP_TYPE_UPSTREAM:
|
||||||
|
return parent == bridge;
|
||||||
|
|
||||||
|
case PCI_EXP_TYPE_DOWNSTREAM:
|
||||||
|
if (pci_pcie_type(parent) != PCI_EXP_TYPE_UPSTREAM)
|
||||||
|
return false;
|
||||||
|
parent = pci_upstream_bridge(parent);
|
||||||
|
return parent == bridge;
|
||||||
|
|
||||||
|
case PCI_EXP_TYPE_ENDPOINT:
|
||||||
|
if (pci_pcie_type(parent) != PCI_EXP_TYPE_DOWNSTREAM)
|
||||||
|
return false;
|
||||||
|
parent = pci_upstream_bridge(parent);
|
||||||
|
if (!parent || pci_pcie_type(parent) != PCI_EXP_TYPE_UPSTREAM)
|
||||||
|
return false;
|
||||||
|
parent = pci_upstream_bridge(parent);
|
||||||
|
return parent == bridge;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool pcie_has_usb4_host_interface(struct pci_dev *pdev)
|
||||||
|
{
|
||||||
|
struct fwnode_handle *fwnode;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* For USB4, the tunneled PCIe Root or Downstream Ports are marked
|
||||||
|
* with the "usb4-host-interface" ACPI property, so we look for
|
||||||
|
* that first. This should cover most cases.
|
||||||
|
*/
|
||||||
|
fwnode = fwnode_find_reference(dev_fwnode(&pdev->dev),
|
||||||
|
"usb4-host-interface", 0);
|
||||||
|
if (!IS_ERR(fwnode)) {
|
||||||
|
fwnode_handle_put(fwnode);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Any integrated Thunderbolt 3/4 PCIe Root Ports from Intel
|
||||||
|
* before Alder Lake do not have the "usb4-host-interface"
|
||||||
|
* property so we use their PCI IDs instead. All these are
|
||||||
|
* tunneled. This list is not expected to grow.
|
||||||
|
*/
|
||||||
|
if (pdev->vendor == PCI_VENDOR_ID_INTEL) {
|
||||||
|
switch (pdev->device) {
|
||||||
|
/* Ice Lake Thunderbolt 3 PCIe Root Ports */
|
||||||
|
case 0x8a1d:
|
||||||
|
case 0x8a1f:
|
||||||
|
case 0x8a21:
|
||||||
|
case 0x8a23:
|
||||||
|
/* Tiger Lake-LP Thunderbolt 4 PCIe Root Ports */
|
||||||
|
case 0x9a23:
|
||||||
|
case 0x9a25:
|
||||||
|
case 0x9a27:
|
||||||
|
case 0x9a29:
|
||||||
|
/* Tiger Lake-H Thunderbolt 4 PCIe Root Ports */
|
||||||
|
case 0x9a2b:
|
||||||
|
case 0x9a2d:
|
||||||
|
case 0x9a2f:
|
||||||
|
case 0x9a31:
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool arch_pci_dev_is_removable(struct pci_dev *pdev)
|
||||||
|
{
|
||||||
|
struct pci_dev *parent, *root;
|
||||||
|
|
||||||
|
/* pdev without a parent or Root Port is never tunneled */
|
||||||
|
parent = pci_upstream_bridge(pdev);
|
||||||
|
if (!parent)
|
||||||
|
return false;
|
||||||
|
root = pcie_find_root_port(pdev);
|
||||||
|
if (!root)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
/* Internal PCIe devices are not tunneled */
|
||||||
|
if (!root->external_facing)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
/* Anything directly behind a "usb4-host-interface" is tunneled */
|
||||||
|
if (pcie_has_usb4_host_interface(parent))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Check if this is a discrete Thunderbolt/USB4 controller that is
|
||||||
|
* directly behind the non-USB4 PCIe Root Port marked as
|
||||||
|
* "ExternalFacingPort". Those are not behind a PCIe tunnel.
|
||||||
|
*/
|
||||||
|
if (pcie_switch_directly_under(root, pdev))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
/* PCIe devices after the discrete chip are tunneled */
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PCI_MMCONFIG
|
#ifdef CONFIG_PCI_MMCONFIG
|
||||||
static int check_segment(u16 seg, struct device *dev, char *estr)
|
static int check_segment(u16 seg, struct device *dev, char *estr)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -549,6 +549,8 @@ static const struct usb_device_id blacklist_table[] = {
|
|||||||
BTUSB_WIDEBAND_SPEECH },
|
BTUSB_WIDEBAND_SPEECH },
|
||||||
{ USB_DEVICE(0x13d3, 0x3591), .driver_info = BTUSB_REALTEK |
|
{ USB_DEVICE(0x13d3, 0x3591), .driver_info = BTUSB_REALTEK |
|
||||||
BTUSB_WIDEBAND_SPEECH },
|
BTUSB_WIDEBAND_SPEECH },
|
||||||
|
{ USB_DEVICE(0x0489, 0xe123), .driver_info = BTUSB_REALTEK |
|
||||||
|
BTUSB_WIDEBAND_SPEECH },
|
||||||
{ USB_DEVICE(0x0489, 0xe125), .driver_info = BTUSB_REALTEK |
|
{ USB_DEVICE(0x0489, 0xe125), .driver_info = BTUSB_REALTEK |
|
||||||
BTUSB_WIDEBAND_SPEECH },
|
BTUSB_WIDEBAND_SPEECH },
|
||||||
|
|
||||||
|
|||||||
@@ -758,6 +758,7 @@ int amdgpu_acpi_power_shift_control(struct amdgpu_device *adev,
|
|||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
kfree(info);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6013,6 +6013,9 @@ bool amdgpu_device_cache_pci_state(struct pci_dev *pdev)
|
|||||||
struct amdgpu_device *adev = drm_to_adev(dev);
|
struct amdgpu_device *adev = drm_to_adev(dev);
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
|
if (amdgpu_sriov_vf(adev))
|
||||||
|
return false;
|
||||||
|
|
||||||
r = pci_save_state(pdev);
|
r = pci_save_state(pdev);
|
||||||
if (!r) {
|
if (!r) {
|
||||||
kfree(adev->pci_state);
|
kfree(adev->pci_state);
|
||||||
|
|||||||
@@ -776,7 +776,7 @@ static int amdgpu_ttm_tt_pin_userptr(struct ttm_device *bdev,
|
|||||||
/* Map SG to device */
|
/* Map SG to device */
|
||||||
r = dma_map_sgtable(adev->dev, ttm->sg, direction, 0);
|
r = dma_map_sgtable(adev->dev, ttm->sg, direction, 0);
|
||||||
if (r)
|
if (r)
|
||||||
goto release_sg;
|
goto release_sg_table;
|
||||||
|
|
||||||
/* convert SG to linear array of pages and dma addresses */
|
/* convert SG to linear array of pages and dma addresses */
|
||||||
drm_prime_sg_to_dma_addr_array(ttm->sg, gtt->ttm.dma_address,
|
drm_prime_sg_to_dma_addr_array(ttm->sg, gtt->ttm.dma_address,
|
||||||
@@ -784,6 +784,8 @@ static int amdgpu_ttm_tt_pin_userptr(struct ttm_device *bdev,
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
release_sg_table:
|
||||||
|
sg_free_table(ttm->sg);
|
||||||
release_sg:
|
release_sg:
|
||||||
kfree(ttm->sg);
|
kfree(ttm->sg);
|
||||||
ttm->sg = NULL;
|
ttm->sg = NULL;
|
||||||
@@ -1730,6 +1732,7 @@ int amdgpu_ttm_init(struct amdgpu_device *adev)
|
|||||||
|
|
||||||
mutex_init(&adev->mman.gtt_window_lock);
|
mutex_init(&adev->mman.gtt_window_lock);
|
||||||
|
|
||||||
|
dma_set_max_seg_size(adev->dev, UINT_MAX);
|
||||||
/* No others user of address space so set it to 0 */
|
/* No others user of address space so set it to 0 */
|
||||||
r = ttm_device_init(&adev->mman.bdev, &amdgpu_bo_driver, adev->dev,
|
r = ttm_device_init(&adev->mman.bdev, &amdgpu_bo_driver, adev->dev,
|
||||||
adev_to_drm(adev)->anon_inode->i_mapping,
|
adev_to_drm(adev)->anon_inode->i_mapping,
|
||||||
|
|||||||
@@ -109,6 +109,33 @@ static int vega20_ih_toggle_ring_interrupts(struct amdgpu_device *adev,
|
|||||||
tmp = REG_SET_FIELD(tmp, IH_RB_CNTL, RB_ENABLE, (enable ? 1 : 0));
|
tmp = REG_SET_FIELD(tmp, IH_RB_CNTL, RB_ENABLE, (enable ? 1 : 0));
|
||||||
tmp = REG_SET_FIELD(tmp, IH_RB_CNTL, RB_GPU_TS_ENABLE, 1);
|
tmp = REG_SET_FIELD(tmp, IH_RB_CNTL, RB_GPU_TS_ENABLE, 1);
|
||||||
|
|
||||||
|
if (enable) {
|
||||||
|
/* Unset the CLEAR_OVERFLOW bit to make sure the next step
|
||||||
|
* is switching the bit from 0 to 1
|
||||||
|
*/
|
||||||
|
tmp = REG_SET_FIELD(tmp, IH_RB_CNTL, WPTR_OVERFLOW_CLEAR, 0);
|
||||||
|
if (amdgpu_sriov_vf(adev) && amdgpu_sriov_reg_indirect_ih(adev)) {
|
||||||
|
if (psp_reg_program(&adev->psp, ih_regs->psp_reg_id, tmp))
|
||||||
|
return -ETIMEDOUT;
|
||||||
|
} else {
|
||||||
|
WREG32_NO_KIQ(ih_regs->ih_rb_cntl, tmp);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Clear RB_OVERFLOW bit */
|
||||||
|
tmp = REG_SET_FIELD(tmp, IH_RB_CNTL, WPTR_OVERFLOW_CLEAR, 1);
|
||||||
|
if (amdgpu_sriov_vf(adev) && amdgpu_sriov_reg_indirect_ih(adev)) {
|
||||||
|
if (psp_reg_program(&adev->psp, ih_regs->psp_reg_id, tmp))
|
||||||
|
return -ETIMEDOUT;
|
||||||
|
} else {
|
||||||
|
WREG32_NO_KIQ(ih_regs->ih_rb_cntl, tmp);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Unset the CLEAR_OVERFLOW bit immediately so new overflows
|
||||||
|
* can be detected.
|
||||||
|
*/
|
||||||
|
tmp = REG_SET_FIELD(tmp, IH_RB_CNTL, WPTR_OVERFLOW_CLEAR, 0);
|
||||||
|
}
|
||||||
|
|
||||||
/* enable_intr field is only valid in ring0 */
|
/* enable_intr field is only valid in ring0 */
|
||||||
if (ih == &adev->irq.ih)
|
if (ih == &adev->irq.ih)
|
||||||
tmp = REG_SET_FIELD(tmp, IH_RB_CNTL, ENABLE_INTR, (enable ? 1 : 0));
|
tmp = REG_SET_FIELD(tmp, IH_RB_CNTL, ENABLE_INTR, (enable ? 1 : 0));
|
||||||
|
|||||||
@@ -3349,6 +3349,7 @@ static const struct of_device_id it6505_of_match[] = {
|
|||||||
{ .compatible = "ite,it6505" },
|
{ .compatible = "ite,it6505" },
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
MODULE_DEVICE_TABLE(of, it6505_of_match);
|
||||||
|
|
||||||
static struct i2c_driver it6505_i2c_driver = {
|
static struct i2c_driver it6505_i2c_driver = {
|
||||||
.driver = {
|
.driver = {
|
||||||
|
|||||||
@@ -160,11 +160,11 @@ EXPORT_SYMBOL(drm_dp_dual_mode_write);
|
|||||||
|
|
||||||
static bool is_hdmi_adaptor(const char hdmi_id[DP_DUAL_MODE_HDMI_ID_LEN])
|
static bool is_hdmi_adaptor(const char hdmi_id[DP_DUAL_MODE_HDMI_ID_LEN])
|
||||||
{
|
{
|
||||||
static const char dp_dual_mode_hdmi_id[DP_DUAL_MODE_HDMI_ID_LEN] =
|
static const char dp_dual_mode_hdmi_id[DP_DUAL_MODE_HDMI_ID_LEN + 1] =
|
||||||
"DP-HDMI ADAPTOR\x04";
|
"DP-HDMI ADAPTOR\x04";
|
||||||
|
|
||||||
return memcmp(hdmi_id, dp_dual_mode_hdmi_id,
|
return memcmp(hdmi_id, dp_dual_mode_hdmi_id,
|
||||||
sizeof(dp_dual_mode_hdmi_id)) == 0;
|
DP_DUAL_MODE_HDMI_ID_LEN) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool is_type1_adaptor(uint8_t adaptor_id)
|
static bool is_type1_adaptor(uint8_t adaptor_id)
|
||||||
|
|||||||
@@ -184,6 +184,12 @@ static const struct dmi_system_id orientation_data[] = {
|
|||||||
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T103HAF"),
|
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T103HAF"),
|
||||||
},
|
},
|
||||||
.driver_data = (void *)&lcd800x1280_rightside_up,
|
.driver_data = (void *)&lcd800x1280_rightside_up,
|
||||||
|
}, { /* AYA NEO AYANEO 2 */
|
||||||
|
.matches = {
|
||||||
|
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AYANEO"),
|
||||||
|
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "AYANEO 2"),
|
||||||
|
},
|
||||||
|
.driver_data = (void *)&lcd1200x1920_rightside_up,
|
||||||
}, { /* AYA NEO 2021 */
|
}, { /* AYA NEO 2021 */
|
||||||
.matches = {
|
.matches = {
|
||||||
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AYADEVICE"),
|
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AYADEVICE"),
|
||||||
@@ -196,6 +202,18 @@ static const struct dmi_system_id orientation_data[] = {
|
|||||||
DMI_MATCH(DMI_PRODUCT_NAME, "AIR"),
|
DMI_MATCH(DMI_PRODUCT_NAME, "AIR"),
|
||||||
},
|
},
|
||||||
.driver_data = (void *)&lcd1080x1920_leftside_up,
|
.driver_data = (void *)&lcd1080x1920_leftside_up,
|
||||||
|
}, { /* AYA NEO Founder */
|
||||||
|
.matches = {
|
||||||
|
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AYA NEO"),
|
||||||
|
DMI_MATCH(DMI_PRODUCT_NAME, "AYA NEO Founder"),
|
||||||
|
},
|
||||||
|
.driver_data = (void *)&lcd800x1280_rightside_up,
|
||||||
|
}, { /* AYA NEO GEEK */
|
||||||
|
.matches = {
|
||||||
|
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AYANEO"),
|
||||||
|
DMI_MATCH(DMI_PRODUCT_NAME, "GEEK"),
|
||||||
|
},
|
||||||
|
.driver_data = (void *)&lcd800x1280_rightside_up,
|
||||||
}, { /* AYA NEO NEXT */
|
}, { /* AYA NEO NEXT */
|
||||||
.matches = {
|
.matches = {
|
||||||
DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
|
DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
|
||||||
|
|||||||
@@ -468,6 +468,7 @@ static const struct of_device_id mcde_of_match[] = {
|
|||||||
},
|
},
|
||||||
{},
|
{},
|
||||||
};
|
};
|
||||||
|
MODULE_DEVICE_TABLE(of, mcde_of_match);
|
||||||
|
|
||||||
static struct platform_driver mcde_driver = {
|
static struct platform_driver mcde_driver = {
|
||||||
.driver = {
|
.driver = {
|
||||||
|
|||||||
@@ -3908,6 +3908,31 @@ static const struct panel_desc yes_optoelectronics_ytc700tlag_05_201c = {
|
|||||||
.connector_type = DRM_MODE_CONNECTOR_LVDS,
|
.connector_type = DRM_MODE_CONNECTOR_LVDS,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct drm_display_mode mchp_ac69t88a_mode = {
|
||||||
|
.clock = 25000,
|
||||||
|
.hdisplay = 800,
|
||||||
|
.hsync_start = 800 + 88,
|
||||||
|
.hsync_end = 800 + 88 + 5,
|
||||||
|
.htotal = 800 + 88 + 5 + 40,
|
||||||
|
.vdisplay = 480,
|
||||||
|
.vsync_start = 480 + 23,
|
||||||
|
.vsync_end = 480 + 23 + 5,
|
||||||
|
.vtotal = 480 + 23 + 5 + 1,
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct panel_desc mchp_ac69t88a = {
|
||||||
|
.modes = &mchp_ac69t88a_mode,
|
||||||
|
.num_modes = 1,
|
||||||
|
.bpc = 8,
|
||||||
|
.size = {
|
||||||
|
.width = 108,
|
||||||
|
.height = 65,
|
||||||
|
},
|
||||||
|
.bus_flags = DRM_BUS_FLAG_DE_HIGH,
|
||||||
|
.bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA,
|
||||||
|
.connector_type = DRM_MODE_CONNECTOR_LVDS,
|
||||||
|
};
|
||||||
|
|
||||||
static const struct drm_display_mode arm_rtsm_mode[] = {
|
static const struct drm_display_mode arm_rtsm_mode[] = {
|
||||||
{
|
{
|
||||||
.clock = 65000,
|
.clock = 65000,
|
||||||
@@ -4325,6 +4350,9 @@ static const struct of_device_id platform_of_match[] = {
|
|||||||
}, {
|
}, {
|
||||||
.compatible = "yes-optoelectronics,ytc700tlag-05-201c",
|
.compatible = "yes-optoelectronics,ytc700tlag-05-201c",
|
||||||
.data = &yes_optoelectronics_ytc700tlag_05_201c,
|
.data = &yes_optoelectronics_ytc700tlag_05_201c,
|
||||||
|
}, {
|
||||||
|
.compatible = "microchip,ac69t88a",
|
||||||
|
.data = &mchp_ac69t88a,
|
||||||
}, {
|
}, {
|
||||||
/* Must be the last entry */
|
/* Must be the last entry */
|
||||||
.compatible = "panel-dpi",
|
.compatible = "panel-dpi",
|
||||||
|
|||||||
@@ -2104,7 +2104,7 @@ static int r600_packet3_check(struct radeon_cs_parser *p,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
offset = radeon_get_ib_value(p, idx+1) << 8;
|
offset = (u64)radeon_get_ib_value(p, idx+1) << 8;
|
||||||
if (offset != track->vgt_strmout_bo_offset[idx_value]) {
|
if (offset != track->vgt_strmout_bo_offset[idx_value]) {
|
||||||
DRM_ERROR("bad STRMOUT_BASE_UPDATE, bo offset does not match: 0x%llx, 0x%x\n",
|
DRM_ERROR("bad STRMOUT_BASE_UPDATE, bo offset does not match: 0x%llx, 0x%x\n",
|
||||||
offset, track->vgt_strmout_bo_offset[idx_value]);
|
offset, track->vgt_strmout_bo_offset[idx_value]);
|
||||||
|
|||||||
@@ -595,6 +595,14 @@ int drm_sched_job_init(struct drm_sched_job *job,
|
|||||||
if (!entity->rq)
|
if (!entity->rq)
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We don't know for sure how the user has allocated. Thus, zero the
|
||||||
|
* struct so that unallowed (i.e., too early) usage of pointers that
|
||||||
|
* this function does not set is guaranteed to lead to a NULL pointer
|
||||||
|
* exception instead of UB.
|
||||||
|
*/
|
||||||
|
memset(job, 0, sizeof(*job));
|
||||||
|
|
||||||
job->entity = entity;
|
job->entity = entity;
|
||||||
job->s_fence = drm_sched_fence_alloc(entity, owner);
|
job->s_fence = drm_sched_fence_alloc(entity, owner);
|
||||||
if (!job->s_fence)
|
if (!job->s_fence)
|
||||||
|
|||||||
@@ -2160,7 +2160,7 @@ static int vc4_hdmi_audio_startup(struct device *dev, void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!vc4_hdmi_audio_can_stream(vc4_hdmi)) {
|
if (!vc4_hdmi_audio_can_stream(vc4_hdmi)) {
|
||||||
ret = -ENODEV;
|
ret = -ENOTSUPP;
|
||||||
goto out_dev_exit;
|
goto out_dev_exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -910,6 +910,17 @@ static int vc4_hvs_bind(struct device *dev, struct device *master, void *data)
|
|||||||
SCALER_DISPCTRL_SCLEIRQ);
|
SCALER_DISPCTRL_SCLEIRQ);
|
||||||
|
|
||||||
|
|
||||||
|
/* Set AXI panic mode.
|
||||||
|
* VC4 panics when < 2 lines in FIFO.
|
||||||
|
* VC5 panics when less than 1 line in the FIFO.
|
||||||
|
*/
|
||||||
|
dispctrl &= ~(SCALER_DISPCTRL_PANIC0_MASK |
|
||||||
|
SCALER_DISPCTRL_PANIC1_MASK |
|
||||||
|
SCALER_DISPCTRL_PANIC2_MASK);
|
||||||
|
dispctrl |= VC4_SET_FIELD(2, SCALER_DISPCTRL_PANIC0);
|
||||||
|
dispctrl |= VC4_SET_FIELD(2, SCALER_DISPCTRL_PANIC1);
|
||||||
|
dispctrl |= VC4_SET_FIELD(2, SCALER_DISPCTRL_PANIC2);
|
||||||
|
|
||||||
/* Set AXI panic mode.
|
/* Set AXI panic mode.
|
||||||
* VC4 panics when < 2 lines in FIFO.
|
* VC4 panics when < 2 lines in FIFO.
|
||||||
* VC5 panics when less than 1 line in the FIFO.
|
* VC5 panics when less than 1 line in the FIFO.
|
||||||
|
|||||||
@@ -94,6 +94,7 @@
|
|||||||
#define USB_DEVICE_ID_APPLE_MAGICMOUSE2 0x0269
|
#define USB_DEVICE_ID_APPLE_MAGICMOUSE2 0x0269
|
||||||
#define USB_DEVICE_ID_APPLE_MAGICTRACKPAD 0x030e
|
#define USB_DEVICE_ID_APPLE_MAGICTRACKPAD 0x030e
|
||||||
#define USB_DEVICE_ID_APPLE_MAGICTRACKPAD2 0x0265
|
#define USB_DEVICE_ID_APPLE_MAGICTRACKPAD2 0x0265
|
||||||
|
#define USB_DEVICE_ID_APPLE_MAGICTRACKPAD2_USBC 0x0324
|
||||||
#define USB_DEVICE_ID_APPLE_FOUNTAIN_ANSI 0x020e
|
#define USB_DEVICE_ID_APPLE_FOUNTAIN_ANSI 0x020e
|
||||||
#define USB_DEVICE_ID_APPLE_FOUNTAIN_ISO 0x020f
|
#define USB_DEVICE_ID_APPLE_FOUNTAIN_ISO 0x020f
|
||||||
#define USB_DEVICE_ID_APPLE_GEYSER_ANSI 0x0214
|
#define USB_DEVICE_ID_APPLE_GEYSER_ANSI 0x0214
|
||||||
|
|||||||
@@ -224,7 +224,9 @@ static void magicmouse_emit_touch(struct magicmouse_sc *msc, int raw_id, u8 *tda
|
|||||||
touch_minor = tdata[4];
|
touch_minor = tdata[4];
|
||||||
state = tdata[7] & TOUCH_STATE_MASK;
|
state = tdata[7] & TOUCH_STATE_MASK;
|
||||||
down = state != TOUCH_STATE_NONE;
|
down = state != TOUCH_STATE_NONE;
|
||||||
} else if (input->id.product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD2) {
|
} else if (input->id.product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD2 ||
|
||||||
|
input->id.product ==
|
||||||
|
USB_DEVICE_ID_APPLE_MAGICTRACKPAD2_USBC) {
|
||||||
id = tdata[8] & 0xf;
|
id = tdata[8] & 0xf;
|
||||||
x = (tdata[1] << 27 | tdata[0] << 19) >> 19;
|
x = (tdata[1] << 27 | tdata[0] << 19) >> 19;
|
||||||
y = -((tdata[3] << 30 | tdata[2] << 22 | tdata[1] << 14) >> 19);
|
y = -((tdata[3] << 30 | tdata[2] << 22 | tdata[1] << 14) >> 19);
|
||||||
@@ -256,8 +258,9 @@ static void magicmouse_emit_touch(struct magicmouse_sc *msc, int raw_id, u8 *tda
|
|||||||
/* If requested, emulate a scroll wheel by detecting small
|
/* If requested, emulate a scroll wheel by detecting small
|
||||||
* vertical touch motions.
|
* vertical touch motions.
|
||||||
*/
|
*/
|
||||||
if (emulate_scroll_wheel && (input->id.product !=
|
if (emulate_scroll_wheel &&
|
||||||
USB_DEVICE_ID_APPLE_MAGICTRACKPAD2)) {
|
input->id.product != USB_DEVICE_ID_APPLE_MAGICTRACKPAD2 &&
|
||||||
|
input->id.product != USB_DEVICE_ID_APPLE_MAGICTRACKPAD2_USBC) {
|
||||||
unsigned long now = jiffies;
|
unsigned long now = jiffies;
|
||||||
int step_x = msc->touches[id].scroll_x - x;
|
int step_x = msc->touches[id].scroll_x - x;
|
||||||
int step_y = msc->touches[id].scroll_y - y;
|
int step_y = msc->touches[id].scroll_y - y;
|
||||||
@@ -356,7 +359,9 @@ static void magicmouse_emit_touch(struct magicmouse_sc *msc, int raw_id, u8 *tda
|
|||||||
input_report_abs(input, ABS_MT_POSITION_X, x);
|
input_report_abs(input, ABS_MT_POSITION_X, x);
|
||||||
input_report_abs(input, ABS_MT_POSITION_Y, y);
|
input_report_abs(input, ABS_MT_POSITION_Y, y);
|
||||||
|
|
||||||
if (input->id.product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD2)
|
if (input->id.product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD2 ||
|
||||||
|
input->id.product ==
|
||||||
|
USB_DEVICE_ID_APPLE_MAGICTRACKPAD2_USBC)
|
||||||
input_report_abs(input, ABS_MT_PRESSURE, pressure);
|
input_report_abs(input, ABS_MT_PRESSURE, pressure);
|
||||||
|
|
||||||
if (report_undeciphered) {
|
if (report_undeciphered) {
|
||||||
@@ -364,7 +369,9 @@ static void magicmouse_emit_touch(struct magicmouse_sc *msc, int raw_id, u8 *tda
|
|||||||
input->id.product == USB_DEVICE_ID_APPLE_MAGICMOUSE2)
|
input->id.product == USB_DEVICE_ID_APPLE_MAGICMOUSE2)
|
||||||
input_event(input, EV_MSC, MSC_RAW, tdata[7]);
|
input_event(input, EV_MSC, MSC_RAW, tdata[7]);
|
||||||
else if (input->id.product !=
|
else if (input->id.product !=
|
||||||
USB_DEVICE_ID_APPLE_MAGICTRACKPAD2)
|
USB_DEVICE_ID_APPLE_MAGICTRACKPAD2 &&
|
||||||
|
input->id.product !=
|
||||||
|
USB_DEVICE_ID_APPLE_MAGICTRACKPAD2_USBC)
|
||||||
input_event(input, EV_MSC, MSC_RAW, tdata[8]);
|
input_event(input, EV_MSC, MSC_RAW, tdata[8]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -490,7 +497,9 @@ static int magicmouse_raw_event(struct hid_device *hdev,
|
|||||||
magicmouse_emit_buttons(msc, clicks & 3);
|
magicmouse_emit_buttons(msc, clicks & 3);
|
||||||
input_report_rel(input, REL_X, x);
|
input_report_rel(input, REL_X, x);
|
||||||
input_report_rel(input, REL_Y, y);
|
input_report_rel(input, REL_Y, y);
|
||||||
} else if (input->id.product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD2) {
|
} else if (input->id.product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD2 ||
|
||||||
|
input->id.product ==
|
||||||
|
USB_DEVICE_ID_APPLE_MAGICTRACKPAD2_USBC) {
|
||||||
input_mt_sync_frame(input);
|
input_mt_sync_frame(input);
|
||||||
input_report_key(input, BTN_MOUSE, clicks & 1);
|
input_report_key(input, BTN_MOUSE, clicks & 1);
|
||||||
} else { /* USB_DEVICE_ID_APPLE_MAGICTRACKPAD */
|
} else { /* USB_DEVICE_ID_APPLE_MAGICTRACKPAD */
|
||||||
@@ -542,7 +551,9 @@ static int magicmouse_setup_input(struct input_dev *input, struct hid_device *hd
|
|||||||
__set_bit(REL_WHEEL_HI_RES, input->relbit);
|
__set_bit(REL_WHEEL_HI_RES, input->relbit);
|
||||||
__set_bit(REL_HWHEEL_HI_RES, input->relbit);
|
__set_bit(REL_HWHEEL_HI_RES, input->relbit);
|
||||||
}
|
}
|
||||||
} else if (input->id.product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD2) {
|
} else if (input->id.product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD2 ||
|
||||||
|
input->id.product ==
|
||||||
|
USB_DEVICE_ID_APPLE_MAGICTRACKPAD2_USBC) {
|
||||||
/* If the trackpad has been connected to a Mac, the name is
|
/* If the trackpad has been connected to a Mac, the name is
|
||||||
* automatically personalized, e.g., "José Expósito's Trackpad".
|
* automatically personalized, e.g., "José Expósito's Trackpad".
|
||||||
* When connected through Bluetooth, the personalized name is
|
* When connected through Bluetooth, the personalized name is
|
||||||
@@ -618,7 +629,9 @@ static int magicmouse_setup_input(struct input_dev *input, struct hid_device *hd
|
|||||||
MOUSE_RES_X);
|
MOUSE_RES_X);
|
||||||
input_abs_set_res(input, ABS_MT_POSITION_Y,
|
input_abs_set_res(input, ABS_MT_POSITION_Y,
|
||||||
MOUSE_RES_Y);
|
MOUSE_RES_Y);
|
||||||
} else if (input->id.product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD2) {
|
} else if (input->id.product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD2 ||
|
||||||
|
input->id.product ==
|
||||||
|
USB_DEVICE_ID_APPLE_MAGICTRACKPAD2_USBC) {
|
||||||
input_set_abs_params(input, ABS_MT_PRESSURE, 0, 253, 0, 0);
|
input_set_abs_params(input, ABS_MT_PRESSURE, 0, 253, 0, 0);
|
||||||
input_set_abs_params(input, ABS_PRESSURE, 0, 253, 0, 0);
|
input_set_abs_params(input, ABS_PRESSURE, 0, 253, 0, 0);
|
||||||
input_set_abs_params(input, ABS_MT_ORIENTATION, -3, 4, 0, 0);
|
input_set_abs_params(input, ABS_MT_ORIENTATION, -3, 4, 0, 0);
|
||||||
@@ -657,7 +670,8 @@ static int magicmouse_setup_input(struct input_dev *input, struct hid_device *hd
|
|||||||
input_set_events_per_packet(input, 60);
|
input_set_events_per_packet(input, 60);
|
||||||
|
|
||||||
if (report_undeciphered &&
|
if (report_undeciphered &&
|
||||||
input->id.product != USB_DEVICE_ID_APPLE_MAGICTRACKPAD2) {
|
input->id.product != USB_DEVICE_ID_APPLE_MAGICTRACKPAD2 &&
|
||||||
|
input->id.product != USB_DEVICE_ID_APPLE_MAGICTRACKPAD2_USBC) {
|
||||||
__set_bit(EV_MSC, input->evbit);
|
__set_bit(EV_MSC, input->evbit);
|
||||||
__set_bit(MSC_RAW, input->mscbit);
|
__set_bit(MSC_RAW, input->mscbit);
|
||||||
}
|
}
|
||||||
@@ -682,7 +696,9 @@ static int magicmouse_input_mapping(struct hid_device *hdev,
|
|||||||
|
|
||||||
/* Magic Trackpad does not give relative data after switching to MT */
|
/* Magic Trackpad does not give relative data after switching to MT */
|
||||||
if ((hi->input->id.product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD ||
|
if ((hi->input->id.product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD ||
|
||||||
hi->input->id.product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD2) &&
|
hi->input->id.product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD2 ||
|
||||||
|
hi->input->id.product ==
|
||||||
|
USB_DEVICE_ID_APPLE_MAGICTRACKPAD2_USBC) &&
|
||||||
field->flags & HID_MAIN_ITEM_RELATIVE)
|
field->flags & HID_MAIN_ITEM_RELATIVE)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
@@ -718,7 +734,8 @@ static int magicmouse_enable_multitouch(struct hid_device *hdev)
|
|||||||
int ret;
|
int ret;
|
||||||
int feature_size;
|
int feature_size;
|
||||||
|
|
||||||
if (hdev->product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD2) {
|
if (hdev->product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD2 ||
|
||||||
|
hdev->product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD2_USBC) {
|
||||||
if (hdev->vendor == BT_VENDOR_ID_APPLE) {
|
if (hdev->vendor == BT_VENDOR_ID_APPLE) {
|
||||||
feature_size = sizeof(feature_mt_trackpad2_bt);
|
feature_size = sizeof(feature_mt_trackpad2_bt);
|
||||||
feature = feature_mt_trackpad2_bt;
|
feature = feature_mt_trackpad2_bt;
|
||||||
@@ -763,7 +780,8 @@ static int magicmouse_fetch_battery(struct hid_device *hdev)
|
|||||||
|
|
||||||
if (!hdev->battery || hdev->vendor != USB_VENDOR_ID_APPLE ||
|
if (!hdev->battery || hdev->vendor != USB_VENDOR_ID_APPLE ||
|
||||||
(hdev->product != USB_DEVICE_ID_APPLE_MAGICMOUSE2 &&
|
(hdev->product != USB_DEVICE_ID_APPLE_MAGICMOUSE2 &&
|
||||||
hdev->product != USB_DEVICE_ID_APPLE_MAGICTRACKPAD2))
|
hdev->product != USB_DEVICE_ID_APPLE_MAGICTRACKPAD2 &&
|
||||||
|
hdev->product != USB_DEVICE_ID_APPLE_MAGICTRACKPAD2_USBC))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
report_enum = &hdev->report_enum[hdev->battery_report_type];
|
report_enum = &hdev->report_enum[hdev->battery_report_type];
|
||||||
@@ -832,7 +850,9 @@ static int magicmouse_probe(struct hid_device *hdev,
|
|||||||
|
|
||||||
if (id->vendor == USB_VENDOR_ID_APPLE &&
|
if (id->vendor == USB_VENDOR_ID_APPLE &&
|
||||||
(id->product == USB_DEVICE_ID_APPLE_MAGICMOUSE2 ||
|
(id->product == USB_DEVICE_ID_APPLE_MAGICMOUSE2 ||
|
||||||
(id->product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD2 && hdev->type != HID_TYPE_USBMOUSE)))
|
((id->product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD2 ||
|
||||||
|
id->product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD2_USBC) &&
|
||||||
|
hdev->type != HID_TYPE_USBMOUSE)))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (!msc->input) {
|
if (!msc->input) {
|
||||||
@@ -847,7 +867,8 @@ static int magicmouse_probe(struct hid_device *hdev,
|
|||||||
else if (id->product == USB_DEVICE_ID_APPLE_MAGICMOUSE2)
|
else if (id->product == USB_DEVICE_ID_APPLE_MAGICMOUSE2)
|
||||||
report = hid_register_report(hdev, HID_INPUT_REPORT,
|
report = hid_register_report(hdev, HID_INPUT_REPORT,
|
||||||
MOUSE2_REPORT_ID, 0);
|
MOUSE2_REPORT_ID, 0);
|
||||||
else if (id->product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD2) {
|
else if (id->product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD2 ||
|
||||||
|
id->product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD2_USBC) {
|
||||||
if (id->vendor == BT_VENDOR_ID_APPLE)
|
if (id->vendor == BT_VENDOR_ID_APPLE)
|
||||||
report = hid_register_report(hdev, HID_INPUT_REPORT,
|
report = hid_register_report(hdev, HID_INPUT_REPORT,
|
||||||
TRACKPAD2_BT_REPORT_ID, 0);
|
TRACKPAD2_BT_REPORT_ID, 0);
|
||||||
@@ -917,7 +938,8 @@ static __u8 *magicmouse_report_fixup(struct hid_device *hdev, __u8 *rdesc,
|
|||||||
*/
|
*/
|
||||||
if (hdev->vendor == USB_VENDOR_ID_APPLE &&
|
if (hdev->vendor == USB_VENDOR_ID_APPLE &&
|
||||||
(hdev->product == USB_DEVICE_ID_APPLE_MAGICMOUSE2 ||
|
(hdev->product == USB_DEVICE_ID_APPLE_MAGICMOUSE2 ||
|
||||||
hdev->product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD2) &&
|
hdev->product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD2 ||
|
||||||
|
hdev->product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD2_USBC) &&
|
||||||
*rsize == 83 && rdesc[46] == 0x84 && rdesc[58] == 0x85) {
|
*rsize == 83 && rdesc[46] == 0x84 && rdesc[58] == 0x85) {
|
||||||
hid_info(hdev,
|
hid_info(hdev,
|
||||||
"fixing up magicmouse battery report descriptor\n");
|
"fixing up magicmouse battery report descriptor\n");
|
||||||
@@ -948,6 +970,10 @@ static const struct hid_device_id magic_mice[] = {
|
|||||||
USB_DEVICE_ID_APPLE_MAGICTRACKPAD2), .driver_data = 0 },
|
USB_DEVICE_ID_APPLE_MAGICTRACKPAD2), .driver_data = 0 },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE,
|
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE,
|
||||||
USB_DEVICE_ID_APPLE_MAGICTRACKPAD2), .driver_data = 0 },
|
USB_DEVICE_ID_APPLE_MAGICTRACKPAD2), .driver_data = 0 },
|
||||||
|
{ HID_BLUETOOTH_DEVICE(BT_VENDOR_ID_APPLE,
|
||||||
|
USB_DEVICE_ID_APPLE_MAGICTRACKPAD2_USBC), .driver_data = 0 },
|
||||||
|
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE,
|
||||||
|
USB_DEVICE_ID_APPLE_MAGICTRACKPAD2_USBC), .driver_data = 0 },
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(hid, magic_mice);
|
MODULE_DEVICE_TABLE(hid, magic_mice);
|
||||||
|
|||||||
@@ -279,7 +279,8 @@ static int i3c_device_uevent(struct device *dev, struct kobj_uevent_env *env)
|
|||||||
struct i3c_device_info devinfo;
|
struct i3c_device_info devinfo;
|
||||||
u16 manuf, part, ext;
|
u16 manuf, part, ext;
|
||||||
|
|
||||||
i3c_device_get_info(i3cdev, &devinfo);
|
if (i3cdev->desc)
|
||||||
|
devinfo = i3cdev->desc->info;
|
||||||
manuf = I3C_PID_MANUF_ID(devinfo.pid);
|
manuf = I3C_PID_MANUF_ID(devinfo.pid);
|
||||||
part = I3C_PID_PART_ID(devinfo.pid);
|
part = I3C_PID_PART_ID(devinfo.pid);
|
||||||
ext = I3C_PID_EXTRA_INFO(devinfo.pid);
|
ext = I3C_PID_EXTRA_INFO(devinfo.pid);
|
||||||
|
|||||||
@@ -174,10 +174,10 @@ static void hci_dma_cleanup(struct i3c_hci *hci)
|
|||||||
for (i = 0; i < rings->total; i++) {
|
for (i = 0; i < rings->total; i++) {
|
||||||
rh = &rings->headers[i];
|
rh = &rings->headers[i];
|
||||||
|
|
||||||
|
rh_reg_write(INTR_SIGNAL_ENABLE, 0);
|
||||||
rh_reg_write(RING_CONTROL, 0);
|
rh_reg_write(RING_CONTROL, 0);
|
||||||
rh_reg_write(CR_SETUP, 0);
|
rh_reg_write(CR_SETUP, 0);
|
||||||
rh_reg_write(IBI_SETUP, 0);
|
rh_reg_write(IBI_SETUP, 0);
|
||||||
rh_reg_write(INTR_SIGNAL_ENABLE, 0);
|
|
||||||
|
|
||||||
if (rh->xfer)
|
if (rh->xfer)
|
||||||
dma_free_coherent(&hci->master.dev,
|
dma_free_coherent(&hci->master.dev,
|
||||||
|
|||||||
@@ -1631,6 +1631,8 @@ static const struct acpi_device_id ltr_acpi_match[] = {
|
|||||||
{ "LTER0501", ltr501 },
|
{ "LTER0501", ltr501 },
|
||||||
{ "LTER0559", ltr559 },
|
{ "LTER0559", ltr559 },
|
||||||
{ "LTER0301", ltr301 },
|
{ "LTER0301", ltr301 },
|
||||||
|
/* https://www.catalog.update.microsoft.com/Search.aspx?q=lter0303 */
|
||||||
|
{ "LTER0303", ltr303 },
|
||||||
{ },
|
{ },
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(acpi, ltr_acpi_match);
|
MODULE_DEVICE_TABLE(acpi, ltr_acpi_match);
|
||||||
|
|||||||
@@ -28,11 +28,14 @@ static ssize_t brightness_show(struct device *dev,
|
|||||||
struct device_attribute *attr, char *buf)
|
struct device_attribute *attr, char *buf)
|
||||||
{
|
{
|
||||||
struct led_classdev *led_cdev = dev_get_drvdata(dev);
|
struct led_classdev *led_cdev = dev_get_drvdata(dev);
|
||||||
|
unsigned int brightness;
|
||||||
|
|
||||||
/* no lock needed for this */
|
mutex_lock(&led_cdev->led_access);
|
||||||
led_update_brightness(led_cdev);
|
led_update_brightness(led_cdev);
|
||||||
|
brightness = led_cdev->brightness;
|
||||||
|
mutex_unlock(&led_cdev->led_access);
|
||||||
|
|
||||||
return sprintf(buf, "%u\n", led_cdev->brightness);
|
return sprintf(buf, "%u\n", brightness);
|
||||||
}
|
}
|
||||||
|
|
||||||
static ssize_t brightness_store(struct device *dev,
|
static ssize_t brightness_store(struct device *dev,
|
||||||
@@ -69,8 +72,13 @@ static ssize_t max_brightness_show(struct device *dev,
|
|||||||
struct device_attribute *attr, char *buf)
|
struct device_attribute *attr, char *buf)
|
||||||
{
|
{
|
||||||
struct led_classdev *led_cdev = dev_get_drvdata(dev);
|
struct led_classdev *led_cdev = dev_get_drvdata(dev);
|
||||||
|
unsigned int max_brightness;
|
||||||
|
|
||||||
return sprintf(buf, "%u\n", led_cdev->max_brightness);
|
mutex_lock(&led_cdev->led_access);
|
||||||
|
max_brightness = led_cdev->max_brightness;
|
||||||
|
mutex_unlock(&led_cdev->led_access);
|
||||||
|
|
||||||
|
return sprintf(buf, "%u\n", max_brightness);
|
||||||
}
|
}
|
||||||
static DEVICE_ATTR_RO(max_brightness);
|
static DEVICE_ATTR_RO(max_brightness);
|
||||||
|
|
||||||
|
|||||||
@@ -186,6 +186,11 @@ void eeprom_93cx6_read(struct eeprom_93cx6 *eeprom, const u8 word,
|
|||||||
eeprom_93cx6_write_bits(eeprom, command,
|
eeprom_93cx6_write_bits(eeprom, command,
|
||||||
PCI_EEPROM_WIDTH_OPCODE + eeprom->width);
|
PCI_EEPROM_WIDTH_OPCODE + eeprom->width);
|
||||||
|
|
||||||
|
if (has_quirk_extra_read_cycle(eeprom)) {
|
||||||
|
eeprom_93cx6_pulse_high(eeprom);
|
||||||
|
eeprom_93cx6_pulse_low(eeprom);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Read the requested 16 bits.
|
* Read the requested 16 bits.
|
||||||
*/
|
*/
|
||||||
@@ -252,6 +257,11 @@ void eeprom_93cx6_readb(struct eeprom_93cx6 *eeprom, const u8 byte,
|
|||||||
eeprom_93cx6_write_bits(eeprom, command,
|
eeprom_93cx6_write_bits(eeprom, command,
|
||||||
PCI_EEPROM_WIDTH_OPCODE + eeprom->width + 1);
|
PCI_EEPROM_WIDTH_OPCODE + eeprom->width + 1);
|
||||||
|
|
||||||
|
if (has_quirk_extra_read_cycle(eeprom)) {
|
||||||
|
eeprom_93cx6_pulse_high(eeprom);
|
||||||
|
eeprom_93cx6_pulse_low(eeprom);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Read the requested 8 bits.
|
* Read the requested 8 bits.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -551,7 +551,7 @@ qca8k_phy_eth_command(struct qca8k_priv *priv, bool read, int phy,
|
|||||||
* We therefore need to lock the MDIO bus onto which the switch is
|
* We therefore need to lock the MDIO bus onto which the switch is
|
||||||
* connected.
|
* connected.
|
||||||
*/
|
*/
|
||||||
mutex_lock(&priv->bus->mdio_lock);
|
mutex_lock_nested(&priv->bus->mdio_lock, MDIO_MUTEX_NESTED);
|
||||||
|
|
||||||
/* Actually start the request:
|
/* Actually start the request:
|
||||||
* 1. Send mdio master packet
|
* 1. Send mdio master packet
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ static int mpc52xx_fec_mdio_probe(struct platform_device *of)
|
|||||||
goto out_free;
|
goto out_free;
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(bus->id, MII_BUS_ID_SIZE, "%x", res.start);
|
snprintf(bus->id, MII_BUS_ID_SIZE, "%pa", &res.start);
|
||||||
bus->priv = priv;
|
bus->priv = priv;
|
||||||
|
|
||||||
bus->parent = dev;
|
bus->parent = dev;
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ static int fs_mii_bitbang_init(struct mii_bus *bus, struct device_node *np)
|
|||||||
* we get is an int, and the odds of multiple bitbang mdio buses
|
* we get is an int, and the odds of multiple bitbang mdio buses
|
||||||
* is low enough that it's not worth going too crazy.
|
* is low enough that it's not worth going too crazy.
|
||||||
*/
|
*/
|
||||||
snprintf(bus->id, MII_BUS_ID_SIZE, "%x", res.start);
|
snprintf(bus->id, MII_BUS_ID_SIZE, "%pa", &res.start);
|
||||||
|
|
||||||
data = of_get_property(np, "fsl,mdio-pin", &len);
|
data = of_get_property(np, "fsl,mdio-pin", &len);
|
||||||
if (!data || len != 4)
|
if (!data || len != 4)
|
||||||
|
|||||||
@@ -4139,8 +4139,8 @@ static unsigned int rtl8125_quirk_udp_padto(struct rtl8169_private *tp,
|
|||||||
{
|
{
|
||||||
unsigned int padto = 0, len = skb->len;
|
unsigned int padto = 0, len = skb->len;
|
||||||
|
|
||||||
if (rtl_is_8125(tp) && len < 128 + RTL_MIN_PATCH_LEN &&
|
if (len < 128 + RTL_MIN_PATCH_LEN && rtl_skb_is_udp(skb) &&
|
||||||
rtl_skb_is_udp(skb) && skb_transport_header_was_set(skb)) {
|
skb_transport_header_was_set(skb)) {
|
||||||
unsigned int trans_data_len = skb_tail_pointer(skb) -
|
unsigned int trans_data_len = skb_tail_pointer(skb) -
|
||||||
skb_transport_header(skb);
|
skb_transport_header(skb);
|
||||||
|
|
||||||
@@ -4164,9 +4164,15 @@ static unsigned int rtl8125_quirk_udp_padto(struct rtl8169_private *tp,
|
|||||||
static unsigned int rtl_quirk_packet_padto(struct rtl8169_private *tp,
|
static unsigned int rtl_quirk_packet_padto(struct rtl8169_private *tp,
|
||||||
struct sk_buff *skb)
|
struct sk_buff *skb)
|
||||||
{
|
{
|
||||||
unsigned int padto;
|
unsigned int padto = 0;
|
||||||
|
|
||||||
padto = rtl8125_quirk_udp_padto(tp, skb);
|
switch (tp->mac_version) {
|
||||||
|
case RTL_GIGA_MAC_VER_61 ... RTL_GIGA_MAC_VER_63:
|
||||||
|
padto = rtl8125_quirk_udp_padto(tp, skb);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
switch (tp->mac_version) {
|
switch (tp->mac_version) {
|
||||||
case RTL_GIGA_MAC_VER_34:
|
case RTL_GIGA_MAC_VER_34:
|
||||||
|
|||||||
@@ -2504,7 +2504,7 @@ static void rocker_carrier_init(const struct rocker_port *rocker_port)
|
|||||||
u64 link_status = rocker_read64(rocker, PORT_PHYS_LINK_STATUS);
|
u64 link_status = rocker_read64(rocker, PORT_PHYS_LINK_STATUS);
|
||||||
bool link_up;
|
bool link_up;
|
||||||
|
|
||||||
link_up = link_status & (1 << rocker_port->pport);
|
link_up = link_status & (1ULL << rocker_port->pport);
|
||||||
if (link_up)
|
if (link_up)
|
||||||
netif_carrier_on(rocker_port->dev);
|
netif_carrier_on(rocker_port->dev);
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -386,7 +386,8 @@ static void sfp_quirk_ubnt_uf_instant(const struct sfp_eeprom_id *id,
|
|||||||
static const struct sfp_quirk sfp_quirks[] = {
|
static const struct sfp_quirk sfp_quirks[] = {
|
||||||
// Alcatel Lucent G-010S-P can operate at 2500base-X, but incorrectly
|
// Alcatel Lucent G-010S-P can operate at 2500base-X, but incorrectly
|
||||||
// report 2500MBd NRZ in their EEPROM
|
// report 2500MBd NRZ in their EEPROM
|
||||||
SFP_QUIRK_M("ALCATELLUCENT", "G010SP", sfp_quirk_2500basex),
|
SFP_QUIRK("ALCATELLUCENT", "G010SP", sfp_quirk_2500basex,
|
||||||
|
sfp_fixup_ignore_tx_fault),
|
||||||
|
|
||||||
// Alcatel Lucent G-010S-A can operate at 2500base-X, but report 3.2GBd
|
// Alcatel Lucent G-010S-A can operate at 2500base-X, but report 3.2GBd
|
||||||
// NRZ in their EEPROM
|
// NRZ in their EEPROM
|
||||||
|
|||||||
@@ -46,6 +46,8 @@ static const struct pci_device_id ath5k_pci_id_table[] = {
|
|||||||
{ PCI_VDEVICE(ATHEROS, 0x001b) }, /* 5413 Eagle */
|
{ PCI_VDEVICE(ATHEROS, 0x001b) }, /* 5413 Eagle */
|
||||||
{ PCI_VDEVICE(ATHEROS, 0x001c) }, /* PCI-E cards */
|
{ PCI_VDEVICE(ATHEROS, 0x001c) }, /* PCI-E cards */
|
||||||
{ PCI_VDEVICE(ATHEROS, 0x001d) }, /* 2417 Nala */
|
{ PCI_VDEVICE(ATHEROS, 0x001d) }, /* 2417 Nala */
|
||||||
|
{ PCI_VDEVICE(ATHEROS, 0xff16) }, /* Gigaset SX76[23] AR241[34]A */
|
||||||
|
{ PCI_VDEVICE(ATHEROS, 0xff1a) }, /* Arcadyan ARV45XX AR2417 */
|
||||||
{ PCI_VDEVICE(ATHEROS, 0xff1b) }, /* AR5BXB63 */
|
{ PCI_VDEVICE(ATHEROS, 0xff1b) }, /* AR5BXB63 */
|
||||||
{ 0 }
|
{ 0 }
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -770,7 +770,7 @@ void brcmf_sdiod_sgtable_alloc(struct brcmf_sdio_dev *sdiodev)
|
|||||||
|
|
||||||
nents = max_t(uint, BRCMF_DEFAULT_RXGLOM_SIZE,
|
nents = max_t(uint, BRCMF_DEFAULT_RXGLOM_SIZE,
|
||||||
sdiodev->settings->bus.sdio.txglomsz);
|
sdiodev->settings->bus.sdio.txglomsz);
|
||||||
nents += (nents >> 4) + 1;
|
nents *= 2;
|
||||||
|
|
||||||
WARN_ON(nents > sdiodev->max_segment_count);
|
WARN_ON(nents > sdiodev->max_segment_count);
|
||||||
|
|
||||||
|
|||||||
@@ -870,8 +870,8 @@ void libipw_rx_any(struct libipw_device *ieee,
|
|||||||
switch (ieee->iw_mode) {
|
switch (ieee->iw_mode) {
|
||||||
case IW_MODE_ADHOC:
|
case IW_MODE_ADHOC:
|
||||||
/* our BSS and not from/to DS */
|
/* our BSS and not from/to DS */
|
||||||
if (ether_addr_equal(hdr->addr3, ieee->bssid))
|
if (ether_addr_equal(hdr->addr3, ieee->bssid) &&
|
||||||
if ((fc & (IEEE80211_FCTL_TODS+IEEE80211_FCTL_FROMDS)) == 0) {
|
((fc & (IEEE80211_FCTL_TODS + IEEE80211_FCTL_FROMDS)) == 0)) {
|
||||||
/* promisc: get all */
|
/* promisc: get all */
|
||||||
if (ieee->dev->flags & IFF_PROMISC)
|
if (ieee->dev->flags & IFF_PROMISC)
|
||||||
is_packet_for_us = 1;
|
is_packet_for_us = 1;
|
||||||
@@ -885,8 +885,8 @@ void libipw_rx_any(struct libipw_device *ieee,
|
|||||||
break;
|
break;
|
||||||
case IW_MODE_INFRA:
|
case IW_MODE_INFRA:
|
||||||
/* our BSS (== from our AP) and from DS */
|
/* our BSS (== from our AP) and from DS */
|
||||||
if (ether_addr_equal(hdr->addr2, ieee->bssid))
|
if (ether_addr_equal(hdr->addr2, ieee->bssid) &&
|
||||||
if ((fc & (IEEE80211_FCTL_TODS+IEEE80211_FCTL_FROMDS)) == IEEE80211_FCTL_FROMDS) {
|
((fc & (IEEE80211_FCTL_TODS + IEEE80211_FCTL_FROMDS)) == IEEE80211_FCTL_FROMDS)) {
|
||||||
/* promisc: get all */
|
/* promisc: get all */
|
||||||
if (ieee->dev->flags & IFF_PROMISC)
|
if (ieee->dev->flags & IFF_PROMISC)
|
||||||
is_packet_for_us = 1;
|
is_packet_for_us = 1;
|
||||||
|
|||||||
@@ -106,12 +106,12 @@ int nd_dax_probe(struct device *dev, struct nd_namespace_common *ndns)
|
|||||||
|
|
||||||
nvdimm_bus_lock(&ndns->dev);
|
nvdimm_bus_lock(&ndns->dev);
|
||||||
nd_dax = nd_dax_alloc(nd_region);
|
nd_dax = nd_dax_alloc(nd_region);
|
||||||
nd_pfn = &nd_dax->nd_pfn;
|
dax_dev = nd_dax_devinit(nd_dax, ndns);
|
||||||
dax_dev = nd_pfn_devinit(nd_pfn, ndns);
|
|
||||||
nvdimm_bus_unlock(&ndns->dev);
|
nvdimm_bus_unlock(&ndns->dev);
|
||||||
if (!dax_dev)
|
if (!dax_dev)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
pfn_sb = devm_kmalloc(dev, sizeof(*pfn_sb), GFP_KERNEL);
|
pfn_sb = devm_kmalloc(dev, sizeof(*pfn_sb), GFP_KERNEL);
|
||||||
|
nd_pfn = &nd_dax->nd_pfn;
|
||||||
nd_pfn->pfn_sb = pfn_sb;
|
nd_pfn->pfn_sb = pfn_sb;
|
||||||
rc = nd_pfn_validate(nd_pfn, DAX_SIG);
|
rc = nd_pfn_validate(nd_pfn, DAX_SIG);
|
||||||
dev_dbg(dev, "dax: %s\n", rc == 0 ? dev_name(dax_dev) : "<none>");
|
dev_dbg(dev, "dax: %s\n", rc == 0 ? dev_name(dax_dev) : "<none>");
|
||||||
|
|||||||
@@ -601,6 +601,13 @@ struct nd_dax *to_nd_dax(struct device *dev);
|
|||||||
int nd_dax_probe(struct device *dev, struct nd_namespace_common *ndns);
|
int nd_dax_probe(struct device *dev, struct nd_namespace_common *ndns);
|
||||||
bool is_nd_dax(struct device *dev);
|
bool is_nd_dax(struct device *dev);
|
||||||
struct device *nd_dax_create(struct nd_region *nd_region);
|
struct device *nd_dax_create(struct nd_region *nd_region);
|
||||||
|
static inline struct device *nd_dax_devinit(struct nd_dax *nd_dax,
|
||||||
|
struct nd_namespace_common *ndns)
|
||||||
|
{
|
||||||
|
if (!nd_dax)
|
||||||
|
return NULL;
|
||||||
|
return nd_pfn_devinit(&nd_dax->nd_pfn, ndns);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
static inline int nd_dax_probe(struct device *dev,
|
static inline int nd_dax_probe(struct device *dev,
|
||||||
struct nd_namespace_common *ndns)
|
struct nd_namespace_common *ndns)
|
||||||
|
|||||||
@@ -517,6 +517,31 @@ static ssize_t bus_rescan_store(struct device *dev,
|
|||||||
static struct device_attribute dev_attr_bus_rescan = __ATTR(rescan, 0200, NULL,
|
static struct device_attribute dev_attr_bus_rescan = __ATTR(rescan, 0200, NULL,
|
||||||
bus_rescan_store);
|
bus_rescan_store);
|
||||||
|
|
||||||
|
static ssize_t reset_subordinate_store(struct device *dev,
|
||||||
|
struct device_attribute *attr,
|
||||||
|
const char *buf, size_t count)
|
||||||
|
{
|
||||||
|
struct pci_dev *pdev = to_pci_dev(dev);
|
||||||
|
struct pci_bus *bus = pdev->subordinate;
|
||||||
|
unsigned long val;
|
||||||
|
|
||||||
|
if (!capable(CAP_SYS_ADMIN))
|
||||||
|
return -EPERM;
|
||||||
|
|
||||||
|
if (kstrtoul(buf, 0, &val) < 0)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
if (val) {
|
||||||
|
int ret = __pci_reset_bus(bus);
|
||||||
|
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
static DEVICE_ATTR_WO(reset_subordinate);
|
||||||
|
|
||||||
#if defined(CONFIG_PM) && defined(CONFIG_ACPI)
|
#if defined(CONFIG_PM) && defined(CONFIG_ACPI)
|
||||||
static ssize_t d3cold_allowed_store(struct device *dev,
|
static ssize_t d3cold_allowed_store(struct device *dev,
|
||||||
struct device_attribute *attr,
|
struct device_attribute *attr,
|
||||||
@@ -621,6 +646,7 @@ static struct attribute *pci_dev_attrs[] = {
|
|||||||
static struct attribute *pci_bridge_attrs[] = {
|
static struct attribute *pci_bridge_attrs[] = {
|
||||||
&dev_attr_subordinate_bus_number.attr,
|
&dev_attr_subordinate_bus_number.attr,
|
||||||
&dev_attr_secondary_bus_number.attr,
|
&dev_attr_secondary_bus_number.attr,
|
||||||
|
&dev_attr_reset_subordinate.attr,
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -5933,7 +5933,7 @@ EXPORT_SYMBOL_GPL(pci_probe_reset_bus);
|
|||||||
*
|
*
|
||||||
* Same as above except return -EAGAIN if the bus cannot be locked
|
* Same as above except return -EAGAIN if the bus cannot be locked
|
||||||
*/
|
*/
|
||||||
static int __pci_reset_bus(struct pci_bus *bus)
|
int __pci_reset_bus(struct pci_bus *bus)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ bool pci_reset_supported(struct pci_dev *dev);
|
|||||||
void pci_init_reset_methods(struct pci_dev *dev);
|
void pci_init_reset_methods(struct pci_dev *dev);
|
||||||
int pci_bridge_secondary_bus_reset(struct pci_dev *dev);
|
int pci_bridge_secondary_bus_reset(struct pci_dev *dev);
|
||||||
int pci_bus_error_reset(struct pci_dev *dev);
|
int pci_bus_error_reset(struct pci_dev *dev);
|
||||||
|
int __pci_reset_bus(struct pci_bus *bus);
|
||||||
|
|
||||||
struct pci_cap_saved_data {
|
struct pci_cap_saved_data {
|
||||||
u16 cap_nr;
|
u16 cap_nr;
|
||||||
|
|||||||
@@ -1593,23 +1593,33 @@ static void set_pcie_thunderbolt(struct pci_dev *dev)
|
|||||||
|
|
||||||
static void set_pcie_untrusted(struct pci_dev *dev)
|
static void set_pcie_untrusted(struct pci_dev *dev)
|
||||||
{
|
{
|
||||||
struct pci_dev *parent;
|
struct pci_dev *parent = pci_upstream_bridge(dev);
|
||||||
|
|
||||||
|
if (!parent)
|
||||||
|
return;
|
||||||
/*
|
/*
|
||||||
* If the upstream bridge is untrusted we treat this device
|
* If the upstream bridge is untrusted we treat this device as
|
||||||
* untrusted as well.
|
* untrusted as well.
|
||||||
*/
|
*/
|
||||||
parent = pci_upstream_bridge(dev);
|
if (parent->untrusted) {
|
||||||
if (parent && (parent->untrusted || parent->external_facing))
|
|
||||||
dev->untrusted = true;
|
dev->untrusted = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (arch_pci_dev_is_removable(dev)) {
|
||||||
|
pci_dbg(dev, "marking as untrusted\n");
|
||||||
|
dev->untrusted = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pci_set_removable(struct pci_dev *dev)
|
static void pci_set_removable(struct pci_dev *dev)
|
||||||
{
|
{
|
||||||
struct pci_dev *parent = pci_upstream_bridge(dev);
|
struct pci_dev *parent = pci_upstream_bridge(dev);
|
||||||
|
|
||||||
|
if (!parent)
|
||||||
|
return;
|
||||||
/*
|
/*
|
||||||
* We (only) consider everything downstream from an external_facing
|
* We (only) consider everything tunneled below an external_facing
|
||||||
* device to be removable by the user. We're mainly concerned with
|
* device to be removable by the user. We're mainly concerned with
|
||||||
* consumer platforms with user accessible thunderbolt ports that are
|
* consumer platforms with user accessible thunderbolt ports that are
|
||||||
* vulnerable to DMA attacks, and we expect those ports to be marked by
|
* vulnerable to DMA attacks, and we expect those ports to be marked by
|
||||||
@@ -1619,9 +1629,15 @@ static void pci_set_removable(struct pci_dev *dev)
|
|||||||
* accessible to user / may not be removed by end user, and thus not
|
* accessible to user / may not be removed by end user, and thus not
|
||||||
* exposed as "removable" to userspace.
|
* exposed as "removable" to userspace.
|
||||||
*/
|
*/
|
||||||
if (parent &&
|
if (dev_is_removable(&parent->dev)) {
|
||||||
(parent->external_facing || dev_is_removable(&parent->dev)))
|
|
||||||
dev_set_removable(&dev->dev, DEVICE_REMOVABLE);
|
dev_set_removable(&dev->dev, DEVICE_REMOVABLE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (arch_pci_dev_is_removable(dev)) {
|
||||||
|
pci_dbg(dev, "marking as removable\n");
|
||||||
|
dev_set_removable(&dev->dev, DEVICE_REMOVABLE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -4881,18 +4881,21 @@ static int pci_quirk_brcm_acs(struct pci_dev *dev, u16 acs_flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Wangxun 10G/1G NICs have no ACS capability, and on multi-function
|
* Wangxun 40G/25G/10G/1G NICs have no ACS capability, but on
|
||||||
* devices, peer-to-peer transactions are not be used between the functions.
|
* multi-function devices, the hardware isolates the functions by
|
||||||
* So add an ACS quirk for below devices to isolate functions.
|
* directing all peer-to-peer traffic upstream as though PCI_ACS_RR and
|
||||||
|
* PCI_ACS_CR were set.
|
||||||
* SFxxx 1G NICs(em).
|
* SFxxx 1G NICs(em).
|
||||||
* RP1000/RP2000 10G NICs(sp).
|
* RP1000/RP2000 10G NICs(sp).
|
||||||
|
* FF5xxx 40G/25G/10G NICs(aml).
|
||||||
*/
|
*/
|
||||||
static int pci_quirk_wangxun_nic_acs(struct pci_dev *dev, u16 acs_flags)
|
static int pci_quirk_wangxun_nic_acs(struct pci_dev *dev, u16 acs_flags)
|
||||||
{
|
{
|
||||||
switch (dev->device) {
|
switch (dev->device) {
|
||||||
case 0x0100 ... 0x010F:
|
case 0x0100 ... 0x010F: /* EM */
|
||||||
case 0x1001:
|
case 0x1001: case 0x2001: /* SP */
|
||||||
case 0x2001:
|
case 0x5010: case 0x5025: case 0x5040: /* AML */
|
||||||
|
case 0x5110: case 0x5125: case 0x5140: /* AML */
|
||||||
return pci_acs_ctrl_enabled(acs_flags,
|
return pci_acs_ctrl_enabled(acs_flags,
|
||||||
PCI_ACS_SV | PCI_ACS_RR | PCI_ACS_CR | PCI_ACS_UF);
|
PCI_ACS_SV | PCI_ACS_RR | PCI_ACS_CR | PCI_ACS_UF);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ config PINCTRL_IMX
|
|||||||
|
|
||||||
config PINCTRL_IMX_SCU
|
config PINCTRL_IMX_SCU
|
||||||
tristate
|
tristate
|
||||||
depends on IMX_SCU
|
depends on IMX_SCU || COMPILE_TEST
|
||||||
select PINCTRL_IMX
|
select PINCTRL_IMX
|
||||||
|
|
||||||
config PINCTRL_IMX1_CORE
|
config PINCTRL_IMX1_CORE
|
||||||
|
|||||||
@@ -1219,6 +1219,8 @@ static const struct of_device_id pmic_gpio_of_match[] = {
|
|||||||
{ .compatible = "qcom,pm8350c-gpio", .data = (void *) 9 },
|
{ .compatible = "qcom,pm8350c-gpio", .data = (void *) 9 },
|
||||||
{ .compatible = "qcom,pm8450-gpio", .data = (void *) 4 },
|
{ .compatible = "qcom,pm8450-gpio", .data = (void *) 4 },
|
||||||
{ .compatible = "qcom,pm8916-gpio", .data = (void *) 4 },
|
{ .compatible = "qcom,pm8916-gpio", .data = (void *) 4 },
|
||||||
|
/* pm8937 has 8 GPIOs with holes on 3, 4 and 6 */
|
||||||
|
{ .compatible = "qcom,pm8937-gpio", .data = (void *) 8 },
|
||||||
{ .compatible = "qcom,pm8941-gpio", .data = (void *) 36 },
|
{ .compatible = "qcom,pm8941-gpio", .data = (void *) 36 },
|
||||||
/* pm8950 has 8 GPIOs with holes on 3 */
|
/* pm8950 has 8 GPIOs with holes on 3 */
|
||||||
{ .compatible = "qcom,pm8950-gpio", .data = (void *) 8 },
|
{ .compatible = "qcom,pm8950-gpio", .data = (void *) 8 },
|
||||||
|
|||||||
@@ -964,6 +964,7 @@ static const struct of_device_id pmic_mpp_of_match[] = {
|
|||||||
{ .compatible = "qcom,pm8226-mpp", .data = (void *) 8 },
|
{ .compatible = "qcom,pm8226-mpp", .data = (void *) 8 },
|
||||||
{ .compatible = "qcom,pm8841-mpp", .data = (void *) 4 },
|
{ .compatible = "qcom,pm8841-mpp", .data = (void *) 4 },
|
||||||
{ .compatible = "qcom,pm8916-mpp", .data = (void *) 4 },
|
{ .compatible = "qcom,pm8916-mpp", .data = (void *) 4 },
|
||||||
|
{ .compatible = "qcom,pm8937-mpp", .data = (void *) 4 },
|
||||||
{ .compatible = "qcom,pm8941-mpp", .data = (void *) 8 },
|
{ .compatible = "qcom,pm8941-mpp", .data = (void *) 8 },
|
||||||
{ .compatible = "qcom,pm8950-mpp", .data = (void *) 4 },
|
{ .compatible = "qcom,pm8950-mpp", .data = (void *) 4 },
|
||||||
{ .compatible = "qcom,pmi8950-mpp", .data = (void *) 4 },
|
{ .compatible = "qcom,pmi8950-mpp", .data = (void *) 4 },
|
||||||
|
|||||||
@@ -645,18 +645,17 @@ static int cmos_nvram_read(void *priv, unsigned int off, void *val,
|
|||||||
unsigned char *buf = val;
|
unsigned char *buf = val;
|
||||||
|
|
||||||
off += NVRAM_OFFSET;
|
off += NVRAM_OFFSET;
|
||||||
spin_lock_irq(&rtc_lock);
|
for (; count; count--, off++, buf++) {
|
||||||
for (; count; count--, off++) {
|
guard(spinlock_irq)(&rtc_lock);
|
||||||
if (off < 128)
|
if (off < 128)
|
||||||
*buf++ = CMOS_READ(off);
|
*buf = CMOS_READ(off);
|
||||||
else if (can_bank2)
|
else if (can_bank2)
|
||||||
*buf++ = cmos_read_bank2(off);
|
*buf = cmos_read_bank2(off);
|
||||||
else
|
else
|
||||||
break;
|
return -EIO;
|
||||||
}
|
}
|
||||||
spin_unlock_irq(&rtc_lock);
|
|
||||||
|
|
||||||
return count ? -EIO : 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int cmos_nvram_write(void *priv, unsigned int off, void *val,
|
static int cmos_nvram_write(void *priv, unsigned int off, void *val,
|
||||||
@@ -671,23 +670,23 @@ static int cmos_nvram_write(void *priv, unsigned int off, void *val,
|
|||||||
* NVRAM to update, updating checksums is also part of its job.
|
* NVRAM to update, updating checksums is also part of its job.
|
||||||
*/
|
*/
|
||||||
off += NVRAM_OFFSET;
|
off += NVRAM_OFFSET;
|
||||||
spin_lock_irq(&rtc_lock);
|
for (; count; count--, off++, buf++) {
|
||||||
for (; count; count--, off++) {
|
|
||||||
/* don't trash RTC registers */
|
/* don't trash RTC registers */
|
||||||
if (off == cmos->day_alrm
|
if (off == cmos->day_alrm
|
||||||
|| off == cmos->mon_alrm
|
|| off == cmos->mon_alrm
|
||||||
|| off == cmos->century)
|
|| off == cmos->century)
|
||||||
buf++;
|
continue;
|
||||||
else if (off < 128)
|
|
||||||
CMOS_WRITE(*buf++, off);
|
|
||||||
else if (can_bank2)
|
|
||||||
cmos_write_bank2(*buf++, off);
|
|
||||||
else
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
spin_unlock_irq(&rtc_lock);
|
|
||||||
|
|
||||||
return count ? -EIO : 0;
|
guard(spinlock_irq)(&rtc_lock);
|
||||||
|
if (off < 128)
|
||||||
|
CMOS_WRITE(*buf, off);
|
||||||
|
else if (can_bank2)
|
||||||
|
cmos_write_bank2(*buf, off);
|
||||||
|
else
|
||||||
|
return -EIO;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------*/
|
/*----------------------------------------------------------------*/
|
||||||
|
|||||||
@@ -2410,6 +2410,7 @@ static irqreturn_t cq_thread_v3_hw(int irq_no, void *p)
|
|||||||
/* update rd_point */
|
/* update rd_point */
|
||||||
cq->rd_point = rd_point;
|
cq->rd_point = rd_point;
|
||||||
hisi_sas_write32(hisi_hba, COMPL_Q_0_RD_PTR + (0x14 * queue), rd_point);
|
hisi_sas_write32(hisi_hba, COMPL_Q_0_RD_PTR + (0x14 * queue), rd_point);
|
||||||
|
cond_resched();
|
||||||
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3504,6 +3504,7 @@ static long st_ioctl(struct file *file, unsigned int cmd_in, unsigned long arg)
|
|||||||
int i, cmd_nr, cmd_type, bt;
|
int i, cmd_nr, cmd_type, bt;
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
unsigned int blk;
|
unsigned int blk;
|
||||||
|
bool cmd_mtiocget;
|
||||||
struct scsi_tape *STp = file->private_data;
|
struct scsi_tape *STp = file->private_data;
|
||||||
struct st_modedef *STm;
|
struct st_modedef *STm;
|
||||||
struct st_partstat *STps;
|
struct st_partstat *STps;
|
||||||
@@ -3617,6 +3618,7 @@ static long st_ioctl(struct file *file, unsigned int cmd_in, unsigned long arg)
|
|||||||
*/
|
*/
|
||||||
if (mtc.mt_op != MTREW &&
|
if (mtc.mt_op != MTREW &&
|
||||||
mtc.mt_op != MTOFFL &&
|
mtc.mt_op != MTOFFL &&
|
||||||
|
mtc.mt_op != MTLOAD &&
|
||||||
mtc.mt_op != MTRETEN &&
|
mtc.mt_op != MTRETEN &&
|
||||||
mtc.mt_op != MTERASE &&
|
mtc.mt_op != MTERASE &&
|
||||||
mtc.mt_op != MTSEEK &&
|
mtc.mt_op != MTSEEK &&
|
||||||
@@ -3730,17 +3732,28 @@ static long st_ioctl(struct file *file, unsigned int cmd_in, unsigned long arg)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cmd_mtiocget = cmd_type == _IOC_TYPE(MTIOCGET) && cmd_nr == _IOC_NR(MTIOCGET);
|
||||||
|
|
||||||
if ((i = flush_buffer(STp, 0)) < 0) {
|
if ((i = flush_buffer(STp, 0)) < 0) {
|
||||||
retval = i;
|
if (cmd_mtiocget && STp->pos_unknown) {
|
||||||
goto out;
|
/* flush fails -> modify status accordingly */
|
||||||
}
|
reset_state(STp);
|
||||||
if (STp->can_partitions &&
|
STp->pos_unknown = 1;
|
||||||
(i = switch_partition(STp)) < 0) {
|
} else { /* return error */
|
||||||
retval = i;
|
retval = i;
|
||||||
goto out;
|
goto out;
|
||||||
|
}
|
||||||
|
} else { /* flush_buffer succeeds */
|
||||||
|
if (STp->can_partitions) {
|
||||||
|
i = switch_partition(STp);
|
||||||
|
if (i < 0) {
|
||||||
|
retval = i;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cmd_type == _IOC_TYPE(MTIOCGET) && cmd_nr == _IOC_NR(MTIOCGET)) {
|
if (cmd_mtiocget) {
|
||||||
struct mtget mt_status;
|
struct mtget mt_status;
|
||||||
|
|
||||||
if (_IOC_SIZE(cmd_in) != sizeof(struct mtget)) {
|
if (_IOC_SIZE(cmd_in) != sizeof(struct mtget)) {
|
||||||
@@ -3754,7 +3767,7 @@ static long st_ioctl(struct file *file, unsigned int cmd_in, unsigned long arg)
|
|||||||
((STp->density << MT_ST_DENSITY_SHIFT) & MT_ST_DENSITY_MASK);
|
((STp->density << MT_ST_DENSITY_SHIFT) & MT_ST_DENSITY_MASK);
|
||||||
mt_status.mt_blkno = STps->drv_block;
|
mt_status.mt_blkno = STps->drv_block;
|
||||||
mt_status.mt_fileno = STps->drv_file;
|
mt_status.mt_fileno = STps->drv_file;
|
||||||
if (STp->block_size != 0) {
|
if (STp->block_size != 0 && mt_status.mt_blkno >= 0) {
|
||||||
if (STps->rw == ST_WRITING)
|
if (STps->rw == ST_WRITING)
|
||||||
mt_status.mt_blkno +=
|
mt_status.mt_blkno +=
|
||||||
(STp->buffer)->buffer_bytes / STp->block_size;
|
(STp->buffer)->buffer_bytes / STp->block_size;
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
struct imx8_soc_data {
|
struct imx8_soc_data {
|
||||||
char *name;
|
char *name;
|
||||||
u32 (*soc_revision)(void);
|
int (*soc_revision)(u32 *socrev);
|
||||||
};
|
};
|
||||||
|
|
||||||
static u64 soc_uid;
|
static u64 soc_uid;
|
||||||
@@ -51,24 +51,29 @@ static u32 imx8mq_soc_revision_from_atf(void)
|
|||||||
static inline u32 imx8mq_soc_revision_from_atf(void) { return 0; };
|
static inline u32 imx8mq_soc_revision_from_atf(void) { return 0; };
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static u32 __init imx8mq_soc_revision(void)
|
static int imx8mq_soc_revision(u32 *socrev)
|
||||||
{
|
{
|
||||||
struct device_node *np;
|
struct device_node *np;
|
||||||
void __iomem *ocotp_base;
|
void __iomem *ocotp_base;
|
||||||
u32 magic;
|
u32 magic;
|
||||||
u32 rev;
|
u32 rev;
|
||||||
struct clk *clk;
|
struct clk *clk;
|
||||||
|
int ret;
|
||||||
|
|
||||||
np = of_find_compatible_node(NULL, NULL, "fsl,imx8mq-ocotp");
|
np = of_find_compatible_node(NULL, NULL, "fsl,imx8mq-ocotp");
|
||||||
if (!np)
|
if (!np)
|
||||||
return 0;
|
return -EINVAL;
|
||||||
|
|
||||||
ocotp_base = of_iomap(np, 0);
|
ocotp_base = of_iomap(np, 0);
|
||||||
WARN_ON(!ocotp_base);
|
if (!ocotp_base) {
|
||||||
|
ret = -EINVAL;
|
||||||
|
goto err_iomap;
|
||||||
|
}
|
||||||
|
|
||||||
clk = of_clk_get_by_name(np, NULL);
|
clk = of_clk_get_by_name(np, NULL);
|
||||||
if (IS_ERR(clk)) {
|
if (IS_ERR(clk)) {
|
||||||
WARN_ON(IS_ERR(clk));
|
ret = PTR_ERR(clk);
|
||||||
return 0;
|
goto err_clk;
|
||||||
}
|
}
|
||||||
|
|
||||||
clk_prepare_enable(clk);
|
clk_prepare_enable(clk);
|
||||||
@@ -88,32 +93,45 @@ static u32 __init imx8mq_soc_revision(void)
|
|||||||
soc_uid <<= 32;
|
soc_uid <<= 32;
|
||||||
soc_uid |= readl_relaxed(ocotp_base + OCOTP_UID_LOW);
|
soc_uid |= readl_relaxed(ocotp_base + OCOTP_UID_LOW);
|
||||||
|
|
||||||
|
*socrev = rev;
|
||||||
|
|
||||||
clk_disable_unprepare(clk);
|
clk_disable_unprepare(clk);
|
||||||
clk_put(clk);
|
clk_put(clk);
|
||||||
iounmap(ocotp_base);
|
iounmap(ocotp_base);
|
||||||
of_node_put(np);
|
of_node_put(np);
|
||||||
|
|
||||||
return rev;
|
return 0;
|
||||||
|
|
||||||
|
err_clk:
|
||||||
|
iounmap(ocotp_base);
|
||||||
|
err_iomap:
|
||||||
|
of_node_put(np);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __init imx8mm_soc_uid(void)
|
static int imx8mm_soc_uid(void)
|
||||||
{
|
{
|
||||||
void __iomem *ocotp_base;
|
void __iomem *ocotp_base;
|
||||||
struct device_node *np;
|
struct device_node *np;
|
||||||
struct clk *clk;
|
struct clk *clk;
|
||||||
|
int ret = 0;
|
||||||
u32 offset = of_machine_is_compatible("fsl,imx8mp") ?
|
u32 offset = of_machine_is_compatible("fsl,imx8mp") ?
|
||||||
IMX8MP_OCOTP_UID_OFFSET : 0;
|
IMX8MP_OCOTP_UID_OFFSET : 0;
|
||||||
|
|
||||||
np = of_find_compatible_node(NULL, NULL, "fsl,imx8mm-ocotp");
|
np = of_find_compatible_node(NULL, NULL, "fsl,imx8mm-ocotp");
|
||||||
if (!np)
|
if (!np)
|
||||||
return;
|
return -EINVAL;
|
||||||
|
|
||||||
ocotp_base = of_iomap(np, 0);
|
ocotp_base = of_iomap(np, 0);
|
||||||
WARN_ON(!ocotp_base);
|
if (!ocotp_base) {
|
||||||
|
ret = -EINVAL;
|
||||||
|
goto err_iomap;
|
||||||
|
}
|
||||||
|
|
||||||
clk = of_clk_get_by_name(np, NULL);
|
clk = of_clk_get_by_name(np, NULL);
|
||||||
if (IS_ERR(clk)) {
|
if (IS_ERR(clk)) {
|
||||||
WARN_ON(IS_ERR(clk));
|
ret = PTR_ERR(clk);
|
||||||
return;
|
goto err_clk;
|
||||||
}
|
}
|
||||||
|
|
||||||
clk_prepare_enable(clk);
|
clk_prepare_enable(clk);
|
||||||
@@ -124,31 +142,41 @@ static void __init imx8mm_soc_uid(void)
|
|||||||
|
|
||||||
clk_disable_unprepare(clk);
|
clk_disable_unprepare(clk);
|
||||||
clk_put(clk);
|
clk_put(clk);
|
||||||
|
|
||||||
|
err_clk:
|
||||||
iounmap(ocotp_base);
|
iounmap(ocotp_base);
|
||||||
|
err_iomap:
|
||||||
of_node_put(np);
|
of_node_put(np);
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static u32 __init imx8mm_soc_revision(void)
|
static int imx8mm_soc_revision(u32 *socrev)
|
||||||
{
|
{
|
||||||
struct device_node *np;
|
struct device_node *np;
|
||||||
void __iomem *anatop_base;
|
void __iomem *anatop_base;
|
||||||
u32 rev;
|
int ret;
|
||||||
|
|
||||||
np = of_find_compatible_node(NULL, NULL, "fsl,imx8mm-anatop");
|
np = of_find_compatible_node(NULL, NULL, "fsl,imx8mm-anatop");
|
||||||
if (!np)
|
if (!np)
|
||||||
return 0;
|
return -EINVAL;
|
||||||
|
|
||||||
anatop_base = of_iomap(np, 0);
|
anatop_base = of_iomap(np, 0);
|
||||||
WARN_ON(!anatop_base);
|
if (!anatop_base) {
|
||||||
|
ret = -EINVAL;
|
||||||
|
goto err_iomap;
|
||||||
|
}
|
||||||
|
|
||||||
rev = readl_relaxed(anatop_base + ANADIG_DIGPROG_IMX8MM);
|
*socrev = readl_relaxed(anatop_base + ANADIG_DIGPROG_IMX8MM);
|
||||||
|
|
||||||
iounmap(anatop_base);
|
iounmap(anatop_base);
|
||||||
of_node_put(np);
|
of_node_put(np);
|
||||||
|
|
||||||
imx8mm_soc_uid();
|
return imx8mm_soc_uid();
|
||||||
|
|
||||||
return rev;
|
err_iomap:
|
||||||
|
of_node_put(np);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct imx8_soc_data imx8mq_soc_data = {
|
static const struct imx8_soc_data imx8mq_soc_data = {
|
||||||
@@ -184,7 +212,7 @@ static __maybe_unused const struct of_device_id imx8_soc_match[] = {
|
|||||||
kasprintf(GFP_KERNEL, "%d.%d", (soc_rev >> 4) & 0xf, soc_rev & 0xf) : \
|
kasprintf(GFP_KERNEL, "%d.%d", (soc_rev >> 4) & 0xf, soc_rev & 0xf) : \
|
||||||
"unknown"
|
"unknown"
|
||||||
|
|
||||||
static int __init imx8_soc_init(void)
|
static int imx8m_soc_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct soc_device_attribute *soc_dev_attr;
|
struct soc_device_attribute *soc_dev_attr;
|
||||||
struct soc_device *soc_dev;
|
struct soc_device *soc_dev;
|
||||||
@@ -212,8 +240,11 @@ static int __init imx8_soc_init(void)
|
|||||||
data = id->data;
|
data = id->data;
|
||||||
if (data) {
|
if (data) {
|
||||||
soc_dev_attr->soc_id = data->name;
|
soc_dev_attr->soc_id = data->name;
|
||||||
if (data->soc_revision)
|
if (data->soc_revision) {
|
||||||
soc_rev = data->soc_revision();
|
ret = data->soc_revision(&soc_rev);
|
||||||
|
if (ret)
|
||||||
|
goto free_soc;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
soc_dev_attr->revision = imx8_revision(soc_rev);
|
soc_dev_attr->revision = imx8_revision(soc_rev);
|
||||||
@@ -251,4 +282,36 @@ free_soc:
|
|||||||
kfree(soc_dev_attr);
|
kfree(soc_dev_attr);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static struct platform_driver imx8m_soc_driver = {
|
||||||
|
.probe = imx8m_soc_probe,
|
||||||
|
.driver = {
|
||||||
|
.name = "imx8m-soc",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
static int __init imx8_soc_init(void)
|
||||||
|
{
|
||||||
|
struct platform_device *pdev;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
/* No match means this is non-i.MX8M hardware, do nothing. */
|
||||||
|
if (!of_match_node(imx8_soc_match, of_root))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
ret = platform_driver_register(&imx8m_soc_driver);
|
||||||
|
if (ret) {
|
||||||
|
pr_err("Failed to register imx8m-soc platform driver: %d\n", ret);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
pdev = platform_device_register_simple("imx8m-soc", -1, NULL, 0);
|
||||||
|
if (IS_ERR(pdev)) {
|
||||||
|
pr_err("Failed to register imx8m-soc platform device: %ld\n", PTR_ERR(pdev));
|
||||||
|
platform_driver_unregister(&imx8m_soc_driver);
|
||||||
|
return PTR_ERR(pdev);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
device_initcall(imx8_soc_init);
|
device_initcall(imx8_soc_init);
|
||||||
|
|||||||
@@ -770,7 +770,7 @@ static const struct dw8250_platform_data dw8250_renesas_rzn1_data = {
|
|||||||
.quirks = DW_UART_QUIRK_IS_DMA_FC,
|
.quirks = DW_UART_QUIRK_IS_DMA_FC,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct dw8250_platform_data dw8250_starfive_jh7100_data = {
|
static const struct dw8250_platform_data dw8250_skip_set_rate_data = {
|
||||||
.usr_reg = DW_UART_USR,
|
.usr_reg = DW_UART_USR,
|
||||||
.quirks = DW_UART_QUIRK_SKIP_SET_RATE,
|
.quirks = DW_UART_QUIRK_SKIP_SET_RATE,
|
||||||
};
|
};
|
||||||
@@ -780,7 +780,8 @@ static const struct of_device_id dw8250_of_match[] = {
|
|||||||
{ .compatible = "cavium,octeon-3860-uart", .data = &dw8250_octeon_3860_data },
|
{ .compatible = "cavium,octeon-3860-uart", .data = &dw8250_octeon_3860_data },
|
||||||
{ .compatible = "marvell,armada-38x-uart", .data = &dw8250_armada_38x_data },
|
{ .compatible = "marvell,armada-38x-uart", .data = &dw8250_armada_38x_data },
|
||||||
{ .compatible = "renesas,rzn1-uart", .data = &dw8250_renesas_rzn1_data },
|
{ .compatible = "renesas,rzn1-uart", .data = &dw8250_renesas_rzn1_data },
|
||||||
{ .compatible = "starfive,jh7100-uart", .data = &dw8250_starfive_jh7100_data },
|
{ .compatible = "sophgo,sg2044-uart", .data = &dw8250_skip_set_rate_data },
|
||||||
|
{ .compatible = "starfive,jh7100-uart", .data = &dw8250_skip_set_rate_data },
|
||||||
{ /* Sentinel */ }
|
{ /* Sentinel */ }
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(of, dw8250_of_match);
|
MODULE_DEVICE_TABLE(of, dw8250_of_match);
|
||||||
|
|||||||
@@ -2364,8 +2364,6 @@ static inline int ufshcd_hba_capabilities(struct ufs_hba *hba)
|
|||||||
int err;
|
int err;
|
||||||
|
|
||||||
hba->capabilities = ufshcd_readl(hba, REG_CONTROLLER_CAPABILITIES);
|
hba->capabilities = ufshcd_readl(hba, REG_CONTROLLER_CAPABILITIES);
|
||||||
if (hba->quirks & UFSHCD_QUIRK_BROKEN_64BIT_ADDRESS)
|
|
||||||
hba->capabilities &= ~MASK_64_ADDRESSING_SUPPORT;
|
|
||||||
|
|
||||||
/* nutrs and nutmrs are 0 based values */
|
/* nutrs and nutmrs are 0 based values */
|
||||||
hba->nutrs = (hba->capabilities & MASK_TRANSFER_REQUESTS_SLOTS) + 1;
|
hba->nutrs = (hba->capabilities & MASK_TRANSFER_REQUESTS_SLOTS) + 1;
|
||||||
@@ -10314,6 +10312,8 @@ EXPORT_SYMBOL_GPL(ufshcd_dealloc_host);
|
|||||||
*/
|
*/
|
||||||
static int ufshcd_set_dma_mask(struct ufs_hba *hba)
|
static int ufshcd_set_dma_mask(struct ufs_hba *hba)
|
||||||
{
|
{
|
||||||
|
if (hba->vops && hba->vops->set_dma_mask)
|
||||||
|
return hba->vops->set_dma_mask(hba);
|
||||||
if (hba->capabilities & MASK_64_ADDRESSING_SUPPORT) {
|
if (hba->capabilities & MASK_64_ADDRESSING_SUPPORT) {
|
||||||
if (!dma_set_mask_and_coherent(hba->dev, DMA_BIT_MASK(64)))
|
if (!dma_set_mask_and_coherent(hba->dev, DMA_BIT_MASK(64)))
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
#include <linux/clk.h>
|
#include <linux/clk.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
|
#include <linux/dma-mapping.h>
|
||||||
#include <linux/err.h>
|
#include <linux/err.h>
|
||||||
#include <linux/iopoll.h>
|
#include <linux/iopoll.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
@@ -364,14 +365,20 @@ static int ufs_renesas_init(struct ufs_hba *hba)
|
|||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
ufshcd_set_variant(hba, priv);
|
ufshcd_set_variant(hba, priv);
|
||||||
|
|
||||||
hba->quirks |= UFSHCD_QUIRK_BROKEN_64BIT_ADDRESS | UFSHCD_QUIRK_HIBERN_FASTAUTO;
|
hba->quirks |= UFSHCD_QUIRK_HIBERN_FASTAUTO;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int ufs_renesas_set_dma_mask(struct ufs_hba *hba)
|
||||||
|
{
|
||||||
|
return dma_set_mask_and_coherent(hba->dev, DMA_BIT_MASK(32));
|
||||||
|
}
|
||||||
|
|
||||||
static const struct ufs_hba_variant_ops ufs_renesas_vops = {
|
static const struct ufs_hba_variant_ops ufs_renesas_vops = {
|
||||||
.name = "renesas",
|
.name = "renesas",
|
||||||
.init = ufs_renesas_init,
|
.init = ufs_renesas_init,
|
||||||
|
.set_dma_mask = ufs_renesas_set_dma_mask,
|
||||||
.setup_clocks = ufs_renesas_setup_clocks,
|
.setup_clocks = ufs_renesas_setup_clocks,
|
||||||
.hce_enable_notify = ufs_renesas_hce_enable_notify,
|
.hce_enable_notify = ufs_renesas_hce_enable_notify,
|
||||||
.dbg_register_dump = ufs_renesas_dbg_register_dump,
|
.dbg_register_dump = ufs_renesas_dbg_register_dump,
|
||||||
|
|||||||
@@ -2052,7 +2052,7 @@ static irqreturn_t udc_irq(struct ci_hdrc *ci)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (USBi_UI & intr)
|
if ((USBi_UI | USBi_UEI) & intr)
|
||||||
isr_tr_complete_handler(ci);
|
isr_tr_complete_handler(ci);
|
||||||
|
|
||||||
if ((USBi_SLI & intr) && !(ci->suspended)) {
|
if ((USBi_SLI & intr) && !(ci->suspended)) {
|
||||||
|
|||||||
@@ -1106,7 +1106,8 @@ int mlx5vf_start_page_tracker(struct vfio_device *vdev,
|
|||||||
struct mlx5_vhca_qp *host_qp;
|
struct mlx5_vhca_qp *host_qp;
|
||||||
struct mlx5_vhca_qp *fw_qp;
|
struct mlx5_vhca_qp *fw_qp;
|
||||||
struct mlx5_core_dev *mdev;
|
struct mlx5_core_dev *mdev;
|
||||||
u32 max_msg_size = PAGE_SIZE;
|
u32 log_max_msg_size;
|
||||||
|
u32 max_msg_size;
|
||||||
u64 rq_size = SZ_2M;
|
u64 rq_size = SZ_2M;
|
||||||
u32 max_recv_wr;
|
u32 max_recv_wr;
|
||||||
int err;
|
int err;
|
||||||
@@ -1123,6 +1124,12 @@ int mlx5vf_start_page_tracker(struct vfio_device *vdev,
|
|||||||
}
|
}
|
||||||
|
|
||||||
mdev = mvdev->mdev;
|
mdev = mvdev->mdev;
|
||||||
|
log_max_msg_size = MLX5_CAP_ADV_VIRTUALIZATION(mdev, pg_track_log_max_msg_size);
|
||||||
|
max_msg_size = (1ULL << log_max_msg_size);
|
||||||
|
/* The RQ must hold at least 4 WQEs/messages for successful QP creation */
|
||||||
|
if (rq_size < 4 * max_msg_size)
|
||||||
|
rq_size = 4 * max_msg_size;
|
||||||
|
|
||||||
memset(tracker, 0, sizeof(*tracker));
|
memset(tracker, 0, sizeof(*tracker));
|
||||||
tracker->uar = mlx5_get_uars_page(mdev);
|
tracker->uar = mlx5_get_uars_page(mdev);
|
||||||
if (IS_ERR(tracker->uar)) {
|
if (IS_ERR(tracker->uar)) {
|
||||||
@@ -1212,25 +1219,41 @@ set_report_output(u32 size, int index, struct mlx5_vhca_qp *qp,
|
|||||||
{
|
{
|
||||||
u32 entry_size = MLX5_ST_SZ_BYTES(page_track_report_entry);
|
u32 entry_size = MLX5_ST_SZ_BYTES(page_track_report_entry);
|
||||||
u32 nent = size / entry_size;
|
u32 nent = size / entry_size;
|
||||||
|
u32 nent_in_page;
|
||||||
|
u32 nent_to_set;
|
||||||
struct page *page;
|
struct page *page;
|
||||||
|
u32 page_offset;
|
||||||
|
u32 page_index;
|
||||||
|
u32 buf_offset;
|
||||||
|
void *kaddr;
|
||||||
u64 addr;
|
u64 addr;
|
||||||
u64 *buf;
|
u64 *buf;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (WARN_ON(index >= qp->recv_buf.npages ||
|
buf_offset = index * qp->max_msg_size;
|
||||||
|
if (WARN_ON(buf_offset + size >= qp->recv_buf.npages * PAGE_SIZE ||
|
||||||
(nent > qp->max_msg_size / entry_size)))
|
(nent > qp->max_msg_size / entry_size)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
page = qp->recv_buf.page_list[index];
|
do {
|
||||||
buf = kmap_local_page(page);
|
page_index = buf_offset / PAGE_SIZE;
|
||||||
for (i = 0; i < nent; i++) {
|
page_offset = buf_offset % PAGE_SIZE;
|
||||||
addr = MLX5_GET(page_track_report_entry, buf + i,
|
nent_in_page = (PAGE_SIZE - page_offset) / entry_size;
|
||||||
dirty_address_low);
|
page = qp->recv_buf.page_list[page_index];
|
||||||
addr |= (u64)MLX5_GET(page_track_report_entry, buf + i,
|
kaddr = kmap_local_page(page);
|
||||||
dirty_address_high) << 32;
|
buf = kaddr + page_offset;
|
||||||
iova_bitmap_set(dirty, addr, qp->tracked_page_size);
|
nent_to_set = min(nent, nent_in_page);
|
||||||
}
|
for (i = 0; i < nent_to_set; i++) {
|
||||||
kunmap_local(buf);
|
addr = MLX5_GET(page_track_report_entry, buf + i,
|
||||||
|
dirty_address_low);
|
||||||
|
addr |= (u64)MLX5_GET(page_track_report_entry, buf + i,
|
||||||
|
dirty_address_high) << 32;
|
||||||
|
iova_bitmap_set(dirty, addr, qp->tracked_page_size);
|
||||||
|
}
|
||||||
|
kunmap_local(kaddr);
|
||||||
|
buf_offset += (nent_to_set * entry_size);
|
||||||
|
nent -= nent_to_set;
|
||||||
|
} while (nent);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
@@ -11228,6 +11228,7 @@ static int btrfs_swap_activate(struct swap_info_struct *sis, struct file *file,
|
|||||||
if (btrfs_root_dead(root)) {
|
if (btrfs_root_dead(root)) {
|
||||||
spin_unlock(&root->root_item_lock);
|
spin_unlock(&root->root_item_lock);
|
||||||
|
|
||||||
|
btrfs_drew_write_unlock(&root->snapshot_lock);
|
||||||
btrfs_exclop_finish(fs_info);
|
btrfs_exclop_finish(fs_info);
|
||||||
btrfs_warn(fs_info,
|
btrfs_warn(fs_info,
|
||||||
"cannot activate swapfile because subvolume %llu is being deleted",
|
"cannot activate swapfile because subvolume %llu is being deleted",
|
||||||
|
|||||||
@@ -724,8 +724,10 @@ int f2fs_write_inode(struct inode *inode, struct writeback_control *wbc)
|
|||||||
!is_inode_flag_set(inode, FI_DIRTY_INODE))
|
!is_inode_flag_set(inode, FI_DIRTY_INODE))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (!f2fs_is_checkpoint_ready(sbi))
|
if (!f2fs_is_checkpoint_ready(sbi)) {
|
||||||
|
f2fs_mark_inode_dirty_sync(inode, true);
|
||||||
return -ENOSPC;
|
return -ENOSPC;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We need to balance fs here to prevent from producing dirty node pages
|
* We need to balance fs here to prevent from producing dirty node pages
|
||||||
|
|||||||
@@ -1820,6 +1820,9 @@ dbAllocCtl(struct bmap * bmp, s64 nblocks, int l2nb, s64 blkno, s64 * results)
|
|||||||
return -EIO;
|
return -EIO;
|
||||||
dp = (struct dmap *) mp->data;
|
dp = (struct dmap *) mp->data;
|
||||||
|
|
||||||
|
if (dp->tree.budmin < 0)
|
||||||
|
return -EIO;
|
||||||
|
|
||||||
/* try to allocate the blocks.
|
/* try to allocate the blocks.
|
||||||
*/
|
*/
|
||||||
rc = dbAllocDmapLev(bmp, dp, (int) nblocks, l2nb, results);
|
rc = dbAllocDmapLev(bmp, dp, (int) nblocks, l2nb, results);
|
||||||
@@ -2888,6 +2891,9 @@ static void dbAdjTree(dmtree_t *tp, int leafno, int newval, bool is_ctl)
|
|||||||
/* bubble the new value up the tree as required.
|
/* bubble the new value up the tree as required.
|
||||||
*/
|
*/
|
||||||
for (k = 0; k < le32_to_cpu(tp->dmt_height); k++) {
|
for (k = 0; k < le32_to_cpu(tp->dmt_height); k++) {
|
||||||
|
if (lp == 0)
|
||||||
|
break;
|
||||||
|
|
||||||
/* get the index of the first leaf of the 4 leaf
|
/* get the index of the first leaf of the 4 leaf
|
||||||
* group containing the specified leaf (leafno).
|
* group containing the specified leaf (leafno).
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -2891,6 +2891,14 @@ int jfs_readdir(struct file *file, struct dir_context *ctx)
|
|||||||
stbl = DT_GETSTBL(p);
|
stbl = DT_GETSTBL(p);
|
||||||
|
|
||||||
for (i = index; i < p->header.nextindex; i++) {
|
for (i = index; i < p->header.nextindex; i++) {
|
||||||
|
if (stbl[i] < 0 || stbl[i] > 127) {
|
||||||
|
jfs_err("JFS: Invalid stbl[%d] = %d for inode %ld, block = %lld",
|
||||||
|
i, stbl[i], (long)ip->i_ino, (long long)bn);
|
||||||
|
free_page(dirent_buf);
|
||||||
|
DT_PUTPAGE(mp);
|
||||||
|
return -EIO;
|
||||||
|
}
|
||||||
|
|
||||||
d = (struct ldtentry *) & p->slot[stbl[i]];
|
d = (struct ldtentry *) & p->slot[stbl[i]];
|
||||||
|
|
||||||
if (((long) jfs_dirent + d->namlen + 1) >
|
if (((long) jfs_dirent + d->namlen + 1) >
|
||||||
@@ -3086,6 +3094,13 @@ static int dtReadFirst(struct inode *ip, struct btstack * btstack)
|
|||||||
|
|
||||||
/* get the leftmost entry */
|
/* get the leftmost entry */
|
||||||
stbl = DT_GETSTBL(p);
|
stbl = DT_GETSTBL(p);
|
||||||
|
|
||||||
|
if (stbl[0] < 0 || stbl[0] > 127) {
|
||||||
|
DT_PUTPAGE(mp);
|
||||||
|
jfs_error(ip->i_sb, "stbl[0] out of bound\n");
|
||||||
|
return -EIO;
|
||||||
|
}
|
||||||
|
|
||||||
xd = (pxd_t *) & p->slot[stbl[0]];
|
xd = (pxd_t *) & p->slot[stbl[0]];
|
||||||
|
|
||||||
/* get the child page block address */
|
/* get the child page block address */
|
||||||
|
|||||||
@@ -5349,7 +5349,7 @@ SetTimesRetry:
|
|||||||
param_offset = offsetof(struct smb_com_transaction2_spi_req,
|
param_offset = offsetof(struct smb_com_transaction2_spi_req,
|
||||||
InformationLevel) - 4;
|
InformationLevel) - 4;
|
||||||
offset = param_offset + params;
|
offset = param_offset + params;
|
||||||
data_offset = (char *) (&pSMB->hdr.Protocol) + offset;
|
data_offset = (char *)pSMB + offsetof(typeof(*pSMB), hdr.Protocol) + offset;
|
||||||
pSMB->ParameterOffset = cpu_to_le16(param_offset);
|
pSMB->ParameterOffset = cpu_to_le16(param_offset);
|
||||||
pSMB->DataOffset = cpu_to_le16(offset);
|
pSMB->DataOffset = cpu_to_le16(offset);
|
||||||
pSMB->SetupCount = 1;
|
pSMB->SetupCount = 1;
|
||||||
|
|||||||
@@ -369,29 +369,6 @@ abort:
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct buffer_head *udf_getblk(struct inode *inode, udf_pblk_t block,
|
|
||||||
int create, int *err)
|
|
||||||
{
|
|
||||||
struct buffer_head *bh;
|
|
||||||
struct buffer_head dummy;
|
|
||||||
|
|
||||||
dummy.b_state = 0;
|
|
||||||
dummy.b_blocknr = -1000;
|
|
||||||
*err = udf_get_block(inode, block, &dummy, create);
|
|
||||||
if (!*err && buffer_mapped(&dummy)) {
|
|
||||||
bh = sb_getblk(inode->i_sb, dummy.b_blocknr);
|
|
||||||
if (buffer_new(&dummy)) {
|
|
||||||
lock_buffer(bh);
|
|
||||||
memset(bh->b_data, 0x00, inode->i_sb->s_blocksize);
|
|
||||||
set_buffer_uptodate(bh);
|
|
||||||
unlock_buffer(bh);
|
|
||||||
mark_buffer_dirty_inode(bh, inode);
|
|
||||||
}
|
|
||||||
return bh;
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Extend the file with new blocks totaling 'new_block_bytes',
|
/* Extend the file with new blocks totaling 'new_block_bytes',
|
||||||
* return the number of extents added
|
* return the number of extents added
|
||||||
@@ -1108,11 +1085,30 @@ struct buffer_head *udf_bread(struct inode *inode, udf_pblk_t block,
|
|||||||
int create, int *err)
|
int create, int *err)
|
||||||
{
|
{
|
||||||
struct buffer_head *bh = NULL;
|
struct buffer_head *bh = NULL;
|
||||||
|
struct buffer_head dummy;
|
||||||
|
|
||||||
bh = udf_getblk(inode, block, create, err);
|
dummy.b_state = 0;
|
||||||
if (!bh)
|
dummy.b_blocknr = -1000;
|
||||||
|
|
||||||
|
*err = udf_get_block(inode, block, &dummy, create);
|
||||||
|
if (*err || !buffer_mapped(&dummy))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
bh = sb_getblk(inode->i_sb, dummy.b_blocknr);
|
||||||
|
if (!bh) {
|
||||||
|
*err = -ENOMEM;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (buffer_new(&dummy)) {
|
||||||
|
lock_buffer(bh);
|
||||||
|
memset(bh->b_data, 0x00, inode->i_sb->s_blocksize);
|
||||||
|
set_buffer_uptodate(bh);
|
||||||
|
unlock_buffer(bh);
|
||||||
|
mark_buffer_dirty_inode(bh, inode);
|
||||||
|
return bh;
|
||||||
|
}
|
||||||
|
|
||||||
if (bh_read(bh, 0) >= 0)
|
if (bh_read(bh, 0) >= 0)
|
||||||
return bh;
|
return bh;
|
||||||
|
|
||||||
|
|||||||
@@ -2230,6 +2230,75 @@ static void nfdicf_init(void)
|
|||||||
file_fail(fold_name);
|
file_fail(fold_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void ignore_init(void)
|
||||||
|
{
|
||||||
|
FILE *file;
|
||||||
|
unsigned int unichar;
|
||||||
|
unsigned int first;
|
||||||
|
unsigned int last;
|
||||||
|
unsigned int *um;
|
||||||
|
int count;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
if (verbose > 0)
|
||||||
|
printf("Parsing %s\n", prop_name);
|
||||||
|
file = fopen(prop_name, "r");
|
||||||
|
if (!file)
|
||||||
|
open_fail(prop_name, errno);
|
||||||
|
assert(file);
|
||||||
|
count = 0;
|
||||||
|
while (fgets(line, LINESIZE, file)) {
|
||||||
|
ret = sscanf(line, "%X..%X ; %s # ", &first, &last, buf0);
|
||||||
|
if (ret == 3) {
|
||||||
|
if (strcmp(buf0, "Default_Ignorable_Code_Point"))
|
||||||
|
continue;
|
||||||
|
if (!utf32valid(first) || !utf32valid(last))
|
||||||
|
line_fail(prop_name, line);
|
||||||
|
for (unichar = first; unichar <= last; unichar++) {
|
||||||
|
free(unicode_data[unichar].utf32nfdi);
|
||||||
|
um = malloc(sizeof(unsigned int));
|
||||||
|
*um = 0;
|
||||||
|
unicode_data[unichar].utf32nfdi = um;
|
||||||
|
free(unicode_data[unichar].utf32nfdicf);
|
||||||
|
um = malloc(sizeof(unsigned int));
|
||||||
|
*um = 0;
|
||||||
|
unicode_data[unichar].utf32nfdicf = um;
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
if (verbose > 1)
|
||||||
|
printf(" %X..%X Default_Ignorable_Code_Point\n",
|
||||||
|
first, last);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
ret = sscanf(line, "%X ; %s # ", &unichar, buf0);
|
||||||
|
if (ret == 2) {
|
||||||
|
if (strcmp(buf0, "Default_Ignorable_Code_Point"))
|
||||||
|
continue;
|
||||||
|
if (!utf32valid(unichar))
|
||||||
|
line_fail(prop_name, line);
|
||||||
|
free(unicode_data[unichar].utf32nfdi);
|
||||||
|
um = malloc(sizeof(unsigned int));
|
||||||
|
*um = 0;
|
||||||
|
unicode_data[unichar].utf32nfdi = um;
|
||||||
|
free(unicode_data[unichar].utf32nfdicf);
|
||||||
|
um = malloc(sizeof(unsigned int));
|
||||||
|
*um = 0;
|
||||||
|
unicode_data[unichar].utf32nfdicf = um;
|
||||||
|
if (verbose > 1)
|
||||||
|
printf(" %X Default_Ignorable_Code_Point\n",
|
||||||
|
unichar);
|
||||||
|
count++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fclose(file);
|
||||||
|
|
||||||
|
if (verbose > 0)
|
||||||
|
printf("Found %d entries\n", count);
|
||||||
|
if (count == 0)
|
||||||
|
file_fail(prop_name);
|
||||||
|
}
|
||||||
|
|
||||||
static void corrections_init(void)
|
static void corrections_init(void)
|
||||||
{
|
{
|
||||||
FILE *file;
|
FILE *file;
|
||||||
@@ -3341,6 +3410,7 @@ int main(int argc, char *argv[])
|
|||||||
ccc_init();
|
ccc_init();
|
||||||
nfdi_init();
|
nfdi_init();
|
||||||
nfdicf_init();
|
nfdicf_init();
|
||||||
|
ignore_init();
|
||||||
corrections_init();
|
corrections_init();
|
||||||
hangul_decompose();
|
hangul_decompose();
|
||||||
nfdi_decompose();
|
nfdi_decompose();
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -11,6 +11,8 @@
|
|||||||
Supported chipsets: 93c46, 93c56 and 93c66.
|
Supported chipsets: 93c46, 93c56 and 93c66.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <linux/bits.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* EEPROM operation defines.
|
* EEPROM operation defines.
|
||||||
*/
|
*/
|
||||||
@@ -34,6 +36,7 @@
|
|||||||
* @register_write(struct eeprom_93cx6 *eeprom): handler to
|
* @register_write(struct eeprom_93cx6 *eeprom): handler to
|
||||||
* write to the eeprom register by using all reg_* fields.
|
* write to the eeprom register by using all reg_* fields.
|
||||||
* @width: eeprom width, should be one of the PCI_EEPROM_WIDTH_* defines
|
* @width: eeprom width, should be one of the PCI_EEPROM_WIDTH_* defines
|
||||||
|
* @quirks: eeprom or controller quirks
|
||||||
* @drive_data: Set if we're driving the data line.
|
* @drive_data: Set if we're driving the data line.
|
||||||
* @reg_data_in: register field to indicate data input
|
* @reg_data_in: register field to indicate data input
|
||||||
* @reg_data_out: register field to indicate data output
|
* @reg_data_out: register field to indicate data output
|
||||||
@@ -50,6 +53,9 @@ struct eeprom_93cx6 {
|
|||||||
void (*register_write)(struct eeprom_93cx6 *eeprom);
|
void (*register_write)(struct eeprom_93cx6 *eeprom);
|
||||||
|
|
||||||
int width;
|
int width;
|
||||||
|
unsigned int quirks;
|
||||||
|
/* Some EEPROMs require an extra clock cycle before reading */
|
||||||
|
#define PCI_EEPROM_QUIRK_EXTRA_READ_CYCLE BIT(0)
|
||||||
|
|
||||||
char drive_data;
|
char drive_data;
|
||||||
char reg_data_in;
|
char reg_data_in;
|
||||||
@@ -71,3 +77,8 @@ extern void eeprom_93cx6_wren(struct eeprom_93cx6 *eeprom, bool enable);
|
|||||||
|
|
||||||
extern void eeprom_93cx6_write(struct eeprom_93cx6 *eeprom,
|
extern void eeprom_93cx6_write(struct eeprom_93cx6 *eeprom,
|
||||||
u8 addr, u16 data);
|
u8 addr, u16 data);
|
||||||
|
|
||||||
|
static inline bool has_quirk_extra_read_cycle(struct eeprom_93cx6 *eeprom)
|
||||||
|
{
|
||||||
|
return eeprom->quirks & PCI_EEPROM_QUIRK_EXTRA_READ_CYCLE;
|
||||||
|
}
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ struct led_classdev {
|
|||||||
struct kernfs_node *brightness_hw_changed_kn;
|
struct kernfs_node *brightness_hw_changed_kn;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Ensures consistent access to the LED Flash Class device */
|
/* Ensures consistent access to the LED class device */
|
||||||
struct mutex led_access;
|
struct mutex led_access;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -2449,6 +2449,12 @@ pci_host_bridge_acpi_msi_domain(struct pci_bus *bus) { return NULL; }
|
|||||||
static inline bool pci_pr3_present(struct pci_dev *pdev) { return false; }
|
static inline bool pci_pr3_present(struct pci_dev *pdev) { return false; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(CONFIG_X86) && defined(CONFIG_ACPI)
|
||||||
|
bool arch_pci_dev_is_removable(struct pci_dev *pdev);
|
||||||
|
#else
|
||||||
|
static inline bool arch_pci_dev_is_removable(struct pci_dev *pdev) { return false; }
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_EEH
|
#ifdef CONFIG_EEH
|
||||||
static inline struct eeh_dev *pci_dev_to_eeh_dev(struct pci_dev *pdev)
|
static inline struct eeh_dev *pci_dev_to_eeh_dev(struct pci_dev *pdev)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -244,6 +244,9 @@ static struct trace_event_fields trace_event_fields_##call[] = { \
|
|||||||
tstruct \
|
tstruct \
|
||||||
{} };
|
{} };
|
||||||
|
|
||||||
|
#undef DECLARE_EVENT_SYSCALL_CLASS
|
||||||
|
#define DECLARE_EVENT_SYSCALL_CLASS DECLARE_EVENT_CLASS
|
||||||
|
|
||||||
#undef DEFINE_EVENT_PRINT
|
#undef DEFINE_EVENT_PRINT
|
||||||
#define DEFINE_EVENT_PRINT(template, name, proto, args, print)
|
#define DEFINE_EVENT_PRINT(template, name, proto, args, print)
|
||||||
|
|
||||||
@@ -374,11 +377,11 @@ static inline notrace int trace_event_get_offsets_##call( \
|
|||||||
|
|
||||||
#include "stages/stage6_event_callback.h"
|
#include "stages/stage6_event_callback.h"
|
||||||
|
|
||||||
#undef DECLARE_EVENT_CLASS
|
|
||||||
#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
|
#undef __DECLARE_EVENT_CLASS
|
||||||
\
|
#define __DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
|
||||||
static notrace void \
|
static notrace void \
|
||||||
trace_event_raw_event_##call(void *__data, proto) \
|
do_trace_event_raw_event_##call(void *__data, proto) \
|
||||||
{ \
|
{ \
|
||||||
struct trace_event_file *trace_file = __data; \
|
struct trace_event_file *trace_file = __data; \
|
||||||
struct trace_event_data_offsets_##call __maybe_unused __data_offsets;\
|
struct trace_event_data_offsets_##call __maybe_unused __data_offsets;\
|
||||||
@@ -403,6 +406,29 @@ trace_event_raw_event_##call(void *__data, proto) \
|
|||||||
\
|
\
|
||||||
trace_event_buffer_commit(&fbuffer); \
|
trace_event_buffer_commit(&fbuffer); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#undef DECLARE_EVENT_CLASS
|
||||||
|
#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
|
||||||
|
__DECLARE_EVENT_CLASS(call, PARAMS(proto), PARAMS(args), PARAMS(tstruct), \
|
||||||
|
PARAMS(assign), PARAMS(print)) \
|
||||||
|
static notrace void \
|
||||||
|
trace_event_raw_event_##call(void *__data, proto) \
|
||||||
|
{ \
|
||||||
|
do_trace_event_raw_event_##call(__data, args); \
|
||||||
|
}
|
||||||
|
|
||||||
|
#undef DECLARE_EVENT_SYSCALL_CLASS
|
||||||
|
#define DECLARE_EVENT_SYSCALL_CLASS(call, proto, args, tstruct, assign, print) \
|
||||||
|
__DECLARE_EVENT_CLASS(call, PARAMS(proto), PARAMS(args), PARAMS(tstruct), \
|
||||||
|
PARAMS(assign), PARAMS(print)) \
|
||||||
|
static notrace void \
|
||||||
|
trace_event_raw_event_##call(void *__data, proto) \
|
||||||
|
{ \
|
||||||
|
preempt_disable_notrace(); \
|
||||||
|
do_trace_event_raw_event_##call(__data, args); \
|
||||||
|
preempt_enable_notrace(); \
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The ftrace_test_probe is compiled out, it is only here as a build time check
|
* The ftrace_test_probe is compiled out, it is only here as a build time check
|
||||||
* to make sure that if the tracepoint handling changes, the ftrace probe will
|
* to make sure that if the tracepoint handling changes, the ftrace probe will
|
||||||
@@ -418,6 +444,8 @@ static inline void ftrace_test_probe_##call(void) \
|
|||||||
|
|
||||||
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
|
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
|
||||||
|
|
||||||
|
#undef __DECLARE_EVENT_CLASS
|
||||||
|
|
||||||
#include "stages/stage7_class_define.h"
|
#include "stages/stage7_class_define.h"
|
||||||
|
|
||||||
#undef DECLARE_EVENT_CLASS
|
#undef DECLARE_EVENT_CLASS
|
||||||
|
|||||||
@@ -278,6 +278,8 @@ struct ufs_pwr_mode_info {
|
|||||||
* @name: variant name
|
* @name: variant name
|
||||||
* @init: called when the driver is initialized
|
* @init: called when the driver is initialized
|
||||||
* @exit: called to cleanup everything done in init
|
* @exit: called to cleanup everything done in init
|
||||||
|
* @set_dma_mask: For setting another DMA mask than indicated by the 64AS
|
||||||
|
* capability bit.
|
||||||
* @get_ufs_hci_version: called to get UFS HCI version
|
* @get_ufs_hci_version: called to get UFS HCI version
|
||||||
* @clk_scale_notify: notifies that clks are scaled up/down
|
* @clk_scale_notify: notifies that clks are scaled up/down
|
||||||
* @setup_clocks: called before touching any of the controller registers
|
* @setup_clocks: called before touching any of the controller registers
|
||||||
@@ -317,6 +319,7 @@ struct ufs_hba_variant_ops {
|
|||||||
int (*init)(struct ufs_hba *);
|
int (*init)(struct ufs_hba *);
|
||||||
void (*exit)(struct ufs_hba *);
|
void (*exit)(struct ufs_hba *);
|
||||||
u32 (*get_ufs_hci_version)(struct ufs_hba *);
|
u32 (*get_ufs_hci_version)(struct ufs_hba *);
|
||||||
|
int (*set_dma_mask)(struct ufs_hba *);
|
||||||
int (*clk_scale_notify)(struct ufs_hba *, bool,
|
int (*clk_scale_notify)(struct ufs_hba *, bool,
|
||||||
enum ufs_notify_change_status);
|
enum ufs_notify_change_status);
|
||||||
int (*setup_clocks)(struct ufs_hba *, bool,
|
int (*setup_clocks)(struct ufs_hba *, bool,
|
||||||
@@ -612,12 +615,6 @@ enum ufshcd_quirks {
|
|||||||
*/
|
*/
|
||||||
UFSHCD_QUIRK_SKIP_PH_CONFIGURATION = 1 << 16,
|
UFSHCD_QUIRK_SKIP_PH_CONFIGURATION = 1 << 16,
|
||||||
|
|
||||||
/*
|
|
||||||
* This quirk needs to be enabled if the host controller has
|
|
||||||
* 64-bit addressing supported capability but it doesn't work.
|
|
||||||
*/
|
|
||||||
UFSHCD_QUIRK_BROKEN_64BIT_ADDRESS = 1 << 17,
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This quirk needs to be enabled if the host controller has
|
* This quirk needs to be enabled if the host controller has
|
||||||
* auto-hibernate capability but it's FASTAUTO only.
|
* auto-hibernate capability but it's FASTAUTO only.
|
||||||
|
|||||||
@@ -47,8 +47,19 @@ static struct io_wq *io_init_wq_offload(struct io_ring_ctx *ctx,
|
|||||||
void __io_uring_free(struct task_struct *tsk)
|
void __io_uring_free(struct task_struct *tsk)
|
||||||
{
|
{
|
||||||
struct io_uring_task *tctx = tsk->io_uring;
|
struct io_uring_task *tctx = tsk->io_uring;
|
||||||
|
struct io_tctx_node *node;
|
||||||
|
unsigned long index;
|
||||||
|
|
||||||
WARN_ON_ONCE(!xa_empty(&tctx->xa));
|
/*
|
||||||
|
* Fault injection forcing allocation errors in the xa_store() path
|
||||||
|
* can lead to xa_empty() returning false, even though no actual
|
||||||
|
* node is stored in the xarray. Until that gets sorted out, attempt
|
||||||
|
* an iteration here and warn if any entries are found.
|
||||||
|
*/
|
||||||
|
xa_for_each(&tctx->xa, index, node) {
|
||||||
|
WARN_ON_ONCE(1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
WARN_ON_ONCE(tctx->io_wq);
|
WARN_ON_ONCE(tctx->io_wq);
|
||||||
WARN_ON_ONCE(tctx->cached_refs);
|
WARN_ON_ONCE(tctx->cached_refs);
|
||||||
|
|
||||||
|
|||||||
@@ -1044,9 +1044,13 @@ static void check_unmap(struct dma_debug_entry *ref)
|
|||||||
}
|
}
|
||||||
|
|
||||||
hash_bucket_del(entry);
|
hash_bucket_del(entry);
|
||||||
dma_entry_free(entry);
|
|
||||||
|
|
||||||
put_hash_bucket(bucket, flags);
|
put_hash_bucket(bucket, flags);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Free the entry outside of bucket_lock to avoid ABBA deadlocks
|
||||||
|
* between that and radix_lock.
|
||||||
|
*/
|
||||||
|
dma_entry_free(entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void check_for_stack(struct device *dev,
|
static void check_for_stack(struct device *dev,
|
||||||
|
|||||||
@@ -1196,9 +1196,9 @@ static void nohz_csd_func(void *info)
|
|||||||
WARN_ON(!(flags & NOHZ_KICK_MASK));
|
WARN_ON(!(flags & NOHZ_KICK_MASK));
|
||||||
|
|
||||||
rq->idle_balance = idle_cpu(cpu);
|
rq->idle_balance = idle_cpu(cpu);
|
||||||
if (rq->idle_balance && !need_resched()) {
|
if (rq->idle_balance) {
|
||||||
rq->nohz_idle_balance = flags;
|
rq->nohz_idle_balance = flags;
|
||||||
raise_softirq_irqoff(SCHED_SOFTIRQ);
|
__raise_softirq_irqoff(SCHED_SOFTIRQ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11552,7 +11552,7 @@ static void _nohz_idle_balance(struct rq *this_rq, unsigned int flags)
|
|||||||
* work being done for other CPUs. Next load
|
* work being done for other CPUs. Next load
|
||||||
* balancing owner will pick it up.
|
* balancing owner will pick it up.
|
||||||
*/
|
*/
|
||||||
if (need_resched()) {
|
if (!idle_cpu(this_cpu) && need_resched()) {
|
||||||
if (flags & NOHZ_STATS_KICK)
|
if (flags & NOHZ_STATS_KICK)
|
||||||
has_blocked_load = true;
|
has_blocked_load = true;
|
||||||
if (flags & NOHZ_NEXT_KICK)
|
if (flags & NOHZ_NEXT_KICK)
|
||||||
|
|||||||
@@ -154,5 +154,5 @@ static atomic64_t trace_counter;
|
|||||||
*/
|
*/
|
||||||
u64 notrace trace_clock_counter(void)
|
u64 notrace trace_clock_counter(void)
|
||||||
{
|
{
|
||||||
return atomic64_add_return(1, &trace_counter);
|
return atomic64_inc_return(&trace_counter);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1069,6 +1069,11 @@ static int __trace_eprobe_create(int argc, const char *argv[])
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
ret = dyn_event_add(&ep->devent, &ep->tp.event->call);
|
ret = dyn_event_add(&ep->devent, &ep->tp.event->call);
|
||||||
|
if (ret < 0) {
|
||||||
|
trace_probe_unregister_event_call(&ep->tp);
|
||||||
|
mutex_unlock(&event_mutex);
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
mutex_unlock(&event_mutex);
|
mutex_unlock(&event_mutex);
|
||||||
return ret;
|
return ret;
|
||||||
parse_error:
|
parse_error:
|
||||||
|
|||||||
@@ -299,6 +299,12 @@ static void ftrace_syscall_enter(void *data, struct pt_regs *regs, long id)
|
|||||||
int syscall_nr;
|
int syscall_nr;
|
||||||
int size;
|
int size;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Syscall probe called with preemption enabled, but the ring
|
||||||
|
* buffer and per-cpu data require preemption to be disabled.
|
||||||
|
*/
|
||||||
|
guard(preempt_notrace)();
|
||||||
|
|
||||||
syscall_nr = trace_get_syscall_nr(current, regs);
|
syscall_nr = trace_get_syscall_nr(current, regs);
|
||||||
if (syscall_nr < 0 || syscall_nr >= NR_syscalls)
|
if (syscall_nr < 0 || syscall_nr >= NR_syscalls)
|
||||||
return;
|
return;
|
||||||
@@ -338,6 +344,12 @@ static void ftrace_syscall_exit(void *data, struct pt_regs *regs, long ret)
|
|||||||
struct trace_event_buffer fbuffer;
|
struct trace_event_buffer fbuffer;
|
||||||
int syscall_nr;
|
int syscall_nr;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Syscall probe called with preemption enabled, but the ring
|
||||||
|
* buffer and per-cpu data require preemption to be disabled.
|
||||||
|
*/
|
||||||
|
guard(preempt_notrace)();
|
||||||
|
|
||||||
syscall_nr = trace_get_syscall_nr(current, regs);
|
syscall_nr = trace_get_syscall_nr(current, regs);
|
||||||
if (syscall_nr < 0 || syscall_nr >= NR_syscalls)
|
if (syscall_nr < 0 || syscall_nr >= NR_syscalls)
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ static void update_kunit_status(bool sync)
|
|||||||
static void update_kunit_status(bool sync) { }
|
static void update_kunit_status(bool sync) { }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static DEFINE_SPINLOCK(report_lock);
|
static DEFINE_RAW_SPINLOCK(report_lock);
|
||||||
|
|
||||||
static void start_report(unsigned long *flags, bool sync)
|
static void start_report(unsigned long *flags, bool sync)
|
||||||
{
|
{
|
||||||
@@ -185,7 +185,7 @@ static void start_report(unsigned long *flags, bool sync)
|
|||||||
lockdep_off();
|
lockdep_off();
|
||||||
/* Make sure we don't end up in loop. */
|
/* Make sure we don't end up in loop. */
|
||||||
report_suppress_start();
|
report_suppress_start();
|
||||||
spin_lock_irqsave(&report_lock, *flags);
|
raw_spin_lock_irqsave(&report_lock, *flags);
|
||||||
pr_err("==================================================================\n");
|
pr_err("==================================================================\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,7 +195,7 @@ static void end_report(unsigned long *flags, void *addr)
|
|||||||
trace_error_report_end(ERROR_DETECTOR_KASAN,
|
trace_error_report_end(ERROR_DETECTOR_KASAN,
|
||||||
(unsigned long)addr);
|
(unsigned long)addr);
|
||||||
pr_err("==================================================================\n");
|
pr_err("==================================================================\n");
|
||||||
spin_unlock_irqrestore(&report_lock, *flags);
|
raw_spin_unlock_irqrestore(&report_lock, *flags);
|
||||||
if (!test_bit(KASAN_BIT_MULTI_SHOT, &kasan_flags))
|
if (!test_bit(KASAN_BIT_MULTI_SHOT, &kasan_flags))
|
||||||
check_panic_on_warn("KASAN");
|
check_panic_on_warn("KASAN");
|
||||||
if (kasan_arg_fault == KASAN_ARG_FAULT_PANIC)
|
if (kasan_arg_fault == KASAN_ARG_FAULT_PANIC)
|
||||||
|
|||||||
@@ -3809,18 +3809,22 @@ static void hci_tx_work(struct work_struct *work)
|
|||||||
/* ACL data packet */
|
/* ACL data packet */
|
||||||
static void hci_acldata_packet(struct hci_dev *hdev, struct sk_buff *skb)
|
static void hci_acldata_packet(struct hci_dev *hdev, struct sk_buff *skb)
|
||||||
{
|
{
|
||||||
struct hci_acl_hdr *hdr = (void *) skb->data;
|
struct hci_acl_hdr *hdr;
|
||||||
struct hci_conn *conn;
|
struct hci_conn *conn;
|
||||||
__u16 handle, flags;
|
__u16 handle, flags;
|
||||||
|
|
||||||
skb_pull(skb, HCI_ACL_HDR_SIZE);
|
hdr = skb_pull_data(skb, sizeof(*hdr));
|
||||||
|
if (!hdr) {
|
||||||
|
bt_dev_err(hdev, "ACL packet too small");
|
||||||
|
goto drop;
|
||||||
|
}
|
||||||
|
|
||||||
handle = __le16_to_cpu(hdr->handle);
|
handle = __le16_to_cpu(hdr->handle);
|
||||||
flags = hci_flags(handle);
|
flags = hci_flags(handle);
|
||||||
handle = hci_handle(handle);
|
handle = hci_handle(handle);
|
||||||
|
|
||||||
BT_DBG("%s len %d handle 0x%4.4x flags 0x%4.4x", hdev->name, skb->len,
|
bt_dev_dbg(hdev, "len %d handle 0x%4.4x flags 0x%4.4x", skb->len,
|
||||||
handle, flags);
|
handle, flags);
|
||||||
|
|
||||||
hdev->stat.acl_rx++;
|
hdev->stat.acl_rx++;
|
||||||
|
|
||||||
@@ -3839,6 +3843,7 @@ static void hci_acldata_packet(struct hci_dev *hdev, struct sk_buff *skb)
|
|||||||
handle);
|
handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
drop:
|
||||||
kfree_skb(skb);
|
kfree_skb(skb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1866,6 +1866,7 @@ static struct sock *l2cap_sock_alloc(struct net *net, struct socket *sock,
|
|||||||
chan = l2cap_chan_create();
|
chan = l2cap_chan_create();
|
||||||
if (!chan) {
|
if (!chan) {
|
||||||
sk_free(sk);
|
sk_free(sk);
|
||||||
|
sock->sk = NULL;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -274,13 +274,13 @@ static struct sock *rfcomm_sock_alloc(struct net *net, struct socket *sock,
|
|||||||
struct rfcomm_dlc *d;
|
struct rfcomm_dlc *d;
|
||||||
struct sock *sk;
|
struct sock *sk;
|
||||||
|
|
||||||
sk = bt_sock_alloc(net, sock, &rfcomm_proto, proto, prio, kern);
|
d = rfcomm_dlc_alloc(prio);
|
||||||
if (!sk)
|
if (!d)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
d = rfcomm_dlc_alloc(prio);
|
sk = bt_sock_alloc(net, sock, &rfcomm_proto, proto, prio, kern);
|
||||||
if (!d) {
|
if (!sk) {
|
||||||
sk_free(sk);
|
rfcomm_dlc_free(d);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -171,6 +171,7 @@ static int can_create(struct net *net, struct socket *sock, int protocol,
|
|||||||
/* release sk on errors */
|
/* release sk on errors */
|
||||||
sock_orphan(sk);
|
sock_orphan(sk);
|
||||||
sock_put(sk);
|
sock_put(sk);
|
||||||
|
sock->sk = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
errout:
|
errout:
|
||||||
|
|||||||
@@ -2865,6 +2865,7 @@ static int neigh_dump_info(struct sk_buff *skb, struct netlink_callback *cb)
|
|||||||
err = neigh_valid_dump_req(nlh, cb->strict_check, &filter, cb->extack);
|
err = neigh_valid_dump_req(nlh, cb->strict_check, &filter, cb->extack);
|
||||||
if (err < 0 && cb->strict_check)
|
if (err < 0 && cb->strict_check)
|
||||||
return err;
|
return err;
|
||||||
|
err = 0;
|
||||||
|
|
||||||
s_t = cb->args[0];
|
s_t = cb->args[0];
|
||||||
|
|
||||||
|
|||||||
@@ -636,7 +636,7 @@ int __netpoll_setup(struct netpoll *np, struct net_device *ndev)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ndev->npinfo) {
|
if (!rcu_access_pointer(ndev->npinfo)) {
|
||||||
npinfo = kmalloc(sizeof(*npinfo), GFP_KERNEL);
|
npinfo = kmalloc(sizeof(*npinfo), GFP_KERNEL);
|
||||||
if (!npinfo) {
|
if (!npinfo) {
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
|
|||||||
@@ -1046,19 +1046,21 @@ static int ieee802154_create(struct net *net, struct socket *sock,
|
|||||||
|
|
||||||
if (sk->sk_prot->hash) {
|
if (sk->sk_prot->hash) {
|
||||||
rc = sk->sk_prot->hash(sk);
|
rc = sk->sk_prot->hash(sk);
|
||||||
if (rc) {
|
if (rc)
|
||||||
sk_common_release(sk);
|
goto out_sk_release;
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sk->sk_prot->init) {
|
if (sk->sk_prot->init) {
|
||||||
rc = sk->sk_prot->init(sk);
|
rc = sk->sk_prot->init(sk);
|
||||||
if (rc)
|
if (rc)
|
||||||
sk_common_release(sk);
|
goto out_sk_release;
|
||||||
}
|
}
|
||||||
out:
|
out:
|
||||||
return rc;
|
return rc;
|
||||||
|
out_sk_release:
|
||||||
|
sk_common_release(sk);
|
||||||
|
sock->sk = NULL;
|
||||||
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct net_proto_family ieee802154_family_ops = {
|
static const struct net_proto_family ieee802154_family_ops = {
|
||||||
|
|||||||
@@ -371,32 +371,30 @@ lookup_protocol:
|
|||||||
inet->inet_sport = htons(inet->inet_num);
|
inet->inet_sport = htons(inet->inet_num);
|
||||||
/* Add to protocol hash chains. */
|
/* Add to protocol hash chains. */
|
||||||
err = sk->sk_prot->hash(sk);
|
err = sk->sk_prot->hash(sk);
|
||||||
if (err) {
|
if (err)
|
||||||
sk_common_release(sk);
|
goto out_sk_release;
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sk->sk_prot->init) {
|
if (sk->sk_prot->init) {
|
||||||
err = sk->sk_prot->init(sk);
|
err = sk->sk_prot->init(sk);
|
||||||
if (err) {
|
if (err)
|
||||||
sk_common_release(sk);
|
goto out_sk_release;
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!kern) {
|
if (!kern) {
|
||||||
err = BPF_CGROUP_RUN_PROG_INET_SOCK(sk);
|
err = BPF_CGROUP_RUN_PROG_INET_SOCK(sk);
|
||||||
if (err) {
|
if (err)
|
||||||
sk_common_release(sk);
|
goto out_sk_release;
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
out:
|
out:
|
||||||
return err;
|
return err;
|
||||||
out_rcu_unlock:
|
out_rcu_unlock:
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
goto out;
|
goto out;
|
||||||
|
out_sk_release:
|
||||||
|
sk_common_release(sk);
|
||||||
|
sock->sk = NULL;
|
||||||
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -260,31 +260,29 @@ lookup_protocol:
|
|||||||
*/
|
*/
|
||||||
inet->inet_sport = htons(inet->inet_num);
|
inet->inet_sport = htons(inet->inet_num);
|
||||||
err = sk->sk_prot->hash(sk);
|
err = sk->sk_prot->hash(sk);
|
||||||
if (err) {
|
if (err)
|
||||||
sk_common_release(sk);
|
goto out_sk_release;
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (sk->sk_prot->init) {
|
if (sk->sk_prot->init) {
|
||||||
err = sk->sk_prot->init(sk);
|
err = sk->sk_prot->init(sk);
|
||||||
if (err) {
|
if (err)
|
||||||
sk_common_release(sk);
|
goto out_sk_release;
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!kern) {
|
if (!kern) {
|
||||||
err = BPF_CGROUP_RUN_PROG_INET_SOCK(sk);
|
err = BPF_CGROUP_RUN_PROG_INET_SOCK(sk);
|
||||||
if (err) {
|
if (err)
|
||||||
sk_common_release(sk);
|
goto out_sk_release;
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
out:
|
out:
|
||||||
return err;
|
return err;
|
||||||
out_rcu_unlock:
|
out_rcu_unlock:
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
goto out;
|
goto out;
|
||||||
|
out_sk_release:
|
||||||
|
sk_common_release(sk);
|
||||||
|
sock->sk = NULL;
|
||||||
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __inet6_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len,
|
static int __inet6_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len,
|
||||||
|
|||||||
@@ -3418,18 +3418,18 @@ static int packet_create(struct net *net, struct socket *sock, int protocol,
|
|||||||
if (sock->type == SOCK_PACKET)
|
if (sock->type == SOCK_PACKET)
|
||||||
sock->ops = &packet_ops_spkt;
|
sock->ops = &packet_ops_spkt;
|
||||||
|
|
||||||
|
po = pkt_sk(sk);
|
||||||
|
err = packet_alloc_pending(po);
|
||||||
|
if (err)
|
||||||
|
goto out_sk_free;
|
||||||
|
|
||||||
sock_init_data(sock, sk);
|
sock_init_data(sock, sk);
|
||||||
|
|
||||||
po = pkt_sk(sk);
|
|
||||||
init_completion(&po->skb_completion);
|
init_completion(&po->skb_completion);
|
||||||
sk->sk_family = PF_PACKET;
|
sk->sk_family = PF_PACKET;
|
||||||
po->num = proto;
|
po->num = proto;
|
||||||
po->xmit = dev_queue_xmit;
|
po->xmit = dev_queue_xmit;
|
||||||
|
|
||||||
err = packet_alloc_pending(po);
|
|
||||||
if (err)
|
|
||||||
goto out2;
|
|
||||||
|
|
||||||
packet_cached_dev_reset(po);
|
packet_cached_dev_reset(po);
|
||||||
|
|
||||||
sk->sk_destruct = packet_sock_destruct;
|
sk->sk_destruct = packet_sock_destruct;
|
||||||
@@ -3462,7 +3462,7 @@ static int packet_create(struct net *net, struct socket *sock, int protocol,
|
|||||||
sock_prot_inuse_add(net, &packet_proto, 1);
|
sock_prot_inuse_add(net, &packet_proto, 1);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
out2:
|
out_sk_free:
|
||||||
sk_free(sk);
|
sk_free(sk);
|
||||||
out:
|
out:
|
||||||
return err;
|
return err;
|
||||||
|
|||||||
@@ -310,7 +310,7 @@ static void cbs_set_port_rate(struct net_device *dev, struct cbs_sched_data *q)
|
|||||||
{
|
{
|
||||||
struct ethtool_link_ksettings ecmd;
|
struct ethtool_link_ksettings ecmd;
|
||||||
int speed = SPEED_10;
|
int speed = SPEED_10;
|
||||||
int port_rate;
|
s64 port_rate;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = __ethtool_get_link_ksettings(dev, &ecmd);
|
err = __ethtool_get_link_ksettings(dev, &ecmd);
|
||||||
|
|||||||
@@ -178,8 +178,10 @@ static int show_sockopts(int family)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (get_bind_to_device(sd, name, sizeof(name)) < 0)
|
if (get_bind_to_device(sd, name, sizeof(name)) < 0) {
|
||||||
|
close(sd);
|
||||||
return 1;
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
mark = get_somark(sd);
|
mark = get_somark(sd);
|
||||||
prio = get_priority(sd);
|
prio = get_priority(sd);
|
||||||
|
|||||||
@@ -220,6 +220,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
|
|||||||
DMI_MATCH(DMI_PRODUCT_NAME, "21J6"),
|
DMI_MATCH(DMI_PRODUCT_NAME, "21J6"),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.driver_data = &acp6x_card,
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||||
|
DMI_MATCH(DMI_PRODUCT_NAME, "21M1"),
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.driver_data = &acp6x_card,
|
.driver_data = &acp6x_card,
|
||||||
.matches = {
|
.matches = {
|
||||||
|
|||||||
@@ -184,84 +184,97 @@ static const struct snd_pcm_chmap_elem hdmi_codec_8ch_chmaps[] = {
|
|||||||
/*
|
/*
|
||||||
* hdmi_codec_channel_alloc: speaker configuration available for CEA
|
* hdmi_codec_channel_alloc: speaker configuration available for CEA
|
||||||
*
|
*
|
||||||
* This is an ordered list that must match with hdmi_codec_8ch_chmaps struct
|
* This is an ordered list where ca_id must exist in hdmi_codec_8ch_chmaps
|
||||||
* The preceding ones have better chances to be selected by
|
* The preceding ones have better chances to be selected by
|
||||||
* hdmi_codec_get_ch_alloc_table_idx().
|
* hdmi_codec_get_ch_alloc_table_idx().
|
||||||
*/
|
*/
|
||||||
static const struct hdmi_codec_cea_spk_alloc hdmi_codec_channel_alloc[] = {
|
static const struct hdmi_codec_cea_spk_alloc hdmi_codec_channel_alloc[] = {
|
||||||
{ .ca_id = 0x00, .n_ch = 2,
|
{ .ca_id = 0x00, .n_ch = 2,
|
||||||
.mask = FL | FR},
|
.mask = FL | FR },
|
||||||
/* 2.1 */
|
{ .ca_id = 0x03, .n_ch = 4,
|
||||||
{ .ca_id = 0x01, .n_ch = 4,
|
.mask = FL | FR | LFE | FC },
|
||||||
.mask = FL | FR | LFE},
|
|
||||||
/* Dolby Surround */
|
|
||||||
{ .ca_id = 0x02, .n_ch = 4,
|
{ .ca_id = 0x02, .n_ch = 4,
|
||||||
.mask = FL | FR | FC },
|
.mask = FL | FR | FC },
|
||||||
/* surround51 */
|
{ .ca_id = 0x01, .n_ch = 4,
|
||||||
|
.mask = FL | FR | LFE },
|
||||||
{ .ca_id = 0x0b, .n_ch = 6,
|
{ .ca_id = 0x0b, .n_ch = 6,
|
||||||
.mask = FL | FR | LFE | FC | RL | RR},
|
.mask = FL | FR | LFE | FC | RL | RR },
|
||||||
/* surround40 */
|
|
||||||
{ .ca_id = 0x08, .n_ch = 6,
|
|
||||||
.mask = FL | FR | RL | RR },
|
|
||||||
/* surround41 */
|
|
||||||
{ .ca_id = 0x09, .n_ch = 6,
|
|
||||||
.mask = FL | FR | LFE | RL | RR },
|
|
||||||
/* surround50 */
|
|
||||||
{ .ca_id = 0x0a, .n_ch = 6,
|
{ .ca_id = 0x0a, .n_ch = 6,
|
||||||
.mask = FL | FR | FC | RL | RR },
|
.mask = FL | FR | FC | RL | RR },
|
||||||
/* 6.1 */
|
{ .ca_id = 0x09, .n_ch = 6,
|
||||||
{ .ca_id = 0x0f, .n_ch = 8,
|
.mask = FL | FR | LFE | RL | RR },
|
||||||
.mask = FL | FR | LFE | FC | RL | RR | RC },
|
{ .ca_id = 0x08, .n_ch = 6,
|
||||||
/* surround71 */
|
.mask = FL | FR | RL | RR },
|
||||||
|
{ .ca_id = 0x07, .n_ch = 6,
|
||||||
|
.mask = FL | FR | LFE | FC | RC },
|
||||||
|
{ .ca_id = 0x06, .n_ch = 6,
|
||||||
|
.mask = FL | FR | FC | RC },
|
||||||
|
{ .ca_id = 0x05, .n_ch = 6,
|
||||||
|
.mask = FL | FR | LFE | RC },
|
||||||
|
{ .ca_id = 0x04, .n_ch = 6,
|
||||||
|
.mask = FL | FR | RC },
|
||||||
{ .ca_id = 0x13, .n_ch = 8,
|
{ .ca_id = 0x13, .n_ch = 8,
|
||||||
.mask = FL | FR | LFE | FC | RL | RR | RLC | RRC },
|
.mask = FL | FR | LFE | FC | RL | RR | RLC | RRC },
|
||||||
/* others */
|
|
||||||
{ .ca_id = 0x03, .n_ch = 8,
|
|
||||||
.mask = FL | FR | LFE | FC },
|
|
||||||
{ .ca_id = 0x04, .n_ch = 8,
|
|
||||||
.mask = FL | FR | RC},
|
|
||||||
{ .ca_id = 0x05, .n_ch = 8,
|
|
||||||
.mask = FL | FR | LFE | RC },
|
|
||||||
{ .ca_id = 0x06, .n_ch = 8,
|
|
||||||
.mask = FL | FR | FC | RC },
|
|
||||||
{ .ca_id = 0x07, .n_ch = 8,
|
|
||||||
.mask = FL | FR | LFE | FC | RC },
|
|
||||||
{ .ca_id = 0x0c, .n_ch = 8,
|
|
||||||
.mask = FL | FR | RC | RL | RR },
|
|
||||||
{ .ca_id = 0x0d, .n_ch = 8,
|
|
||||||
.mask = FL | FR | LFE | RL | RR | RC },
|
|
||||||
{ .ca_id = 0x0e, .n_ch = 8,
|
|
||||||
.mask = FL | FR | FC | RL | RR | RC },
|
|
||||||
{ .ca_id = 0x10, .n_ch = 8,
|
|
||||||
.mask = FL | FR | RL | RR | RLC | RRC },
|
|
||||||
{ .ca_id = 0x11, .n_ch = 8,
|
|
||||||
.mask = FL | FR | LFE | RL | RR | RLC | RRC },
|
|
||||||
{ .ca_id = 0x12, .n_ch = 8,
|
|
||||||
.mask = FL | FR | FC | RL | RR | RLC | RRC },
|
|
||||||
{ .ca_id = 0x14, .n_ch = 8,
|
|
||||||
.mask = FL | FR | FLC | FRC },
|
|
||||||
{ .ca_id = 0x15, .n_ch = 8,
|
|
||||||
.mask = FL | FR | LFE | FLC | FRC },
|
|
||||||
{ .ca_id = 0x16, .n_ch = 8,
|
|
||||||
.mask = FL | FR | FC | FLC | FRC },
|
|
||||||
{ .ca_id = 0x17, .n_ch = 8,
|
|
||||||
.mask = FL | FR | LFE | FC | FLC | FRC },
|
|
||||||
{ .ca_id = 0x18, .n_ch = 8,
|
|
||||||
.mask = FL | FR | RC | FLC | FRC },
|
|
||||||
{ .ca_id = 0x19, .n_ch = 8,
|
|
||||||
.mask = FL | FR | LFE | RC | FLC | FRC },
|
|
||||||
{ .ca_id = 0x1a, .n_ch = 8,
|
|
||||||
.mask = FL | FR | RC | FC | FLC | FRC },
|
|
||||||
{ .ca_id = 0x1b, .n_ch = 8,
|
|
||||||
.mask = FL | FR | LFE | RC | FC | FLC | FRC },
|
|
||||||
{ .ca_id = 0x1c, .n_ch = 8,
|
|
||||||
.mask = FL | FR | RL | RR | FLC | FRC },
|
|
||||||
{ .ca_id = 0x1d, .n_ch = 8,
|
|
||||||
.mask = FL | FR | LFE | RL | RR | FLC | FRC },
|
|
||||||
{ .ca_id = 0x1e, .n_ch = 8,
|
|
||||||
.mask = FL | FR | FC | RL | RR | FLC | FRC },
|
|
||||||
{ .ca_id = 0x1f, .n_ch = 8,
|
{ .ca_id = 0x1f, .n_ch = 8,
|
||||||
.mask = FL | FR | LFE | FC | RL | RR | FLC | FRC },
|
.mask = FL | FR | LFE | FC | RL | RR | FLC | FRC },
|
||||||
|
{ .ca_id = 0x12, .n_ch = 8,
|
||||||
|
.mask = FL | FR | FC | RL | RR | RLC | RRC },
|
||||||
|
{ .ca_id = 0x1e, .n_ch = 8,
|
||||||
|
.mask = FL | FR | FC | RL | RR | FLC | FRC },
|
||||||
|
{ .ca_id = 0x11, .n_ch = 8,
|
||||||
|
.mask = FL | FR | LFE | RL | RR | RLC | RRC },
|
||||||
|
{ .ca_id = 0x1d, .n_ch = 8,
|
||||||
|
.mask = FL | FR | LFE | RL | RR | FLC | FRC },
|
||||||
|
{ .ca_id = 0x10, .n_ch = 8,
|
||||||
|
.mask = FL | FR | RL | RR | RLC | RRC },
|
||||||
|
{ .ca_id = 0x1c, .n_ch = 8,
|
||||||
|
.mask = FL | FR | RL | RR | FLC | FRC },
|
||||||
|
{ .ca_id = 0x0f, .n_ch = 8,
|
||||||
|
.mask = FL | FR | LFE | FC | RL | RR | RC },
|
||||||
|
{ .ca_id = 0x1b, .n_ch = 8,
|
||||||
|
.mask = FL | FR | LFE | RC | FC | FLC | FRC },
|
||||||
|
{ .ca_id = 0x0e, .n_ch = 8,
|
||||||
|
.mask = FL | FR | FC | RL | RR | RC },
|
||||||
|
{ .ca_id = 0x1a, .n_ch = 8,
|
||||||
|
.mask = FL | FR | RC | FC | FLC | FRC },
|
||||||
|
{ .ca_id = 0x0d, .n_ch = 8,
|
||||||
|
.mask = FL | FR | LFE | RL | RR | RC },
|
||||||
|
{ .ca_id = 0x19, .n_ch = 8,
|
||||||
|
.mask = FL | FR | LFE | RC | FLC | FRC },
|
||||||
|
{ .ca_id = 0x0c, .n_ch = 8,
|
||||||
|
.mask = FL | FR | RC | RL | RR },
|
||||||
|
{ .ca_id = 0x18, .n_ch = 8,
|
||||||
|
.mask = FL | FR | RC | FLC | FRC },
|
||||||
|
{ .ca_id = 0x17, .n_ch = 8,
|
||||||
|
.mask = FL | FR | LFE | FC | FLC | FRC },
|
||||||
|
{ .ca_id = 0x16, .n_ch = 8,
|
||||||
|
.mask = FL | FR | FC | FLC | FRC },
|
||||||
|
{ .ca_id = 0x15, .n_ch = 8,
|
||||||
|
.mask = FL | FR | LFE | FLC | FRC },
|
||||||
|
{ .ca_id = 0x14, .n_ch = 8,
|
||||||
|
.mask = FL | FR | FLC | FRC },
|
||||||
|
{ .ca_id = 0x0b, .n_ch = 8,
|
||||||
|
.mask = FL | FR | LFE | FC | RL | RR },
|
||||||
|
{ .ca_id = 0x0a, .n_ch = 8,
|
||||||
|
.mask = FL | FR | FC | RL | RR },
|
||||||
|
{ .ca_id = 0x09, .n_ch = 8,
|
||||||
|
.mask = FL | FR | LFE | RL | RR },
|
||||||
|
{ .ca_id = 0x08, .n_ch = 8,
|
||||||
|
.mask = FL | FR | RL | RR },
|
||||||
|
{ .ca_id = 0x07, .n_ch = 8,
|
||||||
|
.mask = FL | FR | LFE | FC | RC },
|
||||||
|
{ .ca_id = 0x06, .n_ch = 8,
|
||||||
|
.mask = FL | FR | FC | RC },
|
||||||
|
{ .ca_id = 0x05, .n_ch = 8,
|
||||||
|
.mask = FL | FR | LFE | RC },
|
||||||
|
{ .ca_id = 0x04, .n_ch = 8,
|
||||||
|
.mask = FL | FR | RC },
|
||||||
|
{ .ca_id = 0x03, .n_ch = 8,
|
||||||
|
.mask = FL | FR | LFE | FC },
|
||||||
|
{ .ca_id = 0x02, .n_ch = 8,
|
||||||
|
.mask = FL | FR | FC },
|
||||||
|
{ .ca_id = 0x01, .n_ch = 8,
|
||||||
|
.mask = FL | FR | LFE },
|
||||||
};
|
};
|
||||||
|
|
||||||
struct hdmi_codec_priv {
|
struct hdmi_codec_priv {
|
||||||
@@ -370,7 +383,8 @@ static int hdmi_codec_chmap_ctl_get(struct snd_kcontrol *kcontrol,
|
|||||||
struct snd_pcm_chmap *info = snd_kcontrol_chip(kcontrol);
|
struct snd_pcm_chmap *info = snd_kcontrol_chip(kcontrol);
|
||||||
struct hdmi_codec_priv *hcp = info->private_data;
|
struct hdmi_codec_priv *hcp = info->private_data;
|
||||||
|
|
||||||
map = info->chmap[hcp->chmap_idx].map;
|
if (hcp->chmap_idx != HDMI_CODEC_CHMAP_IDX_UNKNOWN)
|
||||||
|
map = info->chmap[hcp->chmap_idx].map;
|
||||||
|
|
||||||
for (i = 0; i < info->max_channels; i++) {
|
for (i = 0; i < info->max_channels; i++) {
|
||||||
if (hcp->chmap_idx == HDMI_CODEC_CHMAP_IDX_UNKNOWN)
|
if (hcp->chmap_idx == HDMI_CODEC_CHMAP_IDX_UNKNOWN)
|
||||||
|
|||||||
@@ -1084,6 +1084,21 @@ static void volume_control_quirks(struct usb_mixer_elem_info *cval,
|
|||||||
struct snd_kcontrol *kctl)
|
struct snd_kcontrol *kctl)
|
||||||
{
|
{
|
||||||
struct snd_usb_audio *chip = cval->head.mixer->chip;
|
struct snd_usb_audio *chip = cval->head.mixer->chip;
|
||||||
|
|
||||||
|
if (chip->quirk_flags & QUIRK_FLAG_MIC_RES_384) {
|
||||||
|
if (!strcmp(kctl->id.name, "Mic Capture Volume")) {
|
||||||
|
usb_audio_info(chip,
|
||||||
|
"set resolution quirk: cval->res = 384\n");
|
||||||
|
cval->res = 384;
|
||||||
|
}
|
||||||
|
} else if (chip->quirk_flags & QUIRK_FLAG_MIC_RES_16) {
|
||||||
|
if (!strcmp(kctl->id.name, "Mic Capture Volume")) {
|
||||||
|
usb_audio_info(chip,
|
||||||
|
"set resolution quirk: cval->res = 16\n");
|
||||||
|
cval->res = 16;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
switch (chip->usb_id) {
|
switch (chip->usb_id) {
|
||||||
case USB_ID(0x0763, 0x2030): /* M-Audio Fast Track C400 */
|
case USB_ID(0x0763, 0x2030): /* M-Audio Fast Track C400 */
|
||||||
case USB_ID(0x0763, 0x2031): /* M-Audio Fast Track C600 */
|
case USB_ID(0x0763, 0x2031): /* M-Audio Fast Track C600 */
|
||||||
@@ -1168,27 +1183,6 @@ static void volume_control_quirks(struct usb_mixer_elem_info *cval,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case USB_ID(0x046d, 0x0807): /* Logitech Webcam C500 */
|
|
||||||
case USB_ID(0x046d, 0x0808):
|
|
||||||
case USB_ID(0x046d, 0x0809):
|
|
||||||
case USB_ID(0x046d, 0x0819): /* Logitech Webcam C210 */
|
|
||||||
case USB_ID(0x046d, 0x081b): /* HD Webcam c310 */
|
|
||||||
case USB_ID(0x046d, 0x081d): /* HD Webcam c510 */
|
|
||||||
case USB_ID(0x046d, 0x0825): /* HD Webcam c270 */
|
|
||||||
case USB_ID(0x046d, 0x0826): /* HD Webcam c525 */
|
|
||||||
case USB_ID(0x046d, 0x08ca): /* Logitech Quickcam Fusion */
|
|
||||||
case USB_ID(0x046d, 0x0991):
|
|
||||||
case USB_ID(0x046d, 0x09a2): /* QuickCam Communicate Deluxe/S7500 */
|
|
||||||
/* Most audio usb devices lie about volume resolution.
|
|
||||||
* Most Logitech webcams have res = 384.
|
|
||||||
* Probably there is some logitech magic behind this number --fishor
|
|
||||||
*/
|
|
||||||
if (!strcmp(kctl->id.name, "Mic Capture Volume")) {
|
|
||||||
usb_audio_info(chip,
|
|
||||||
"set resolution quirk: cval->res = 384\n");
|
|
||||||
cval->res = 384;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case USB_ID(0x0495, 0x3042): /* ESS Technology Asus USB DAC */
|
case USB_ID(0x0495, 0x3042): /* ESS Technology Asus USB DAC */
|
||||||
if ((strstr(kctl->id.name, "Playback Volume") != NULL) ||
|
if ((strstr(kctl->id.name, "Playback Volume") != NULL) ||
|
||||||
strstr(kctl->id.name, "Capture Volume") != NULL) {
|
strstr(kctl->id.name, "Capture Volume") != NULL) {
|
||||||
@@ -1197,28 +1191,6 @@ static void volume_control_quirks(struct usb_mixer_elem_info *cval,
|
|||||||
cval->res = 1;
|
cval->res = 1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case USB_ID(0x1224, 0x2a25): /* Jieli Technology USB PHY 2.0 */
|
|
||||||
if (!strcmp(kctl->id.name, "Mic Capture Volume")) {
|
|
||||||
usb_audio_info(chip,
|
|
||||||
"set resolution quirk: cval->res = 16\n");
|
|
||||||
cval->res = 16;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case USB_ID(0x1bcf, 0x2283): /* NexiGo N930AF FHD Webcam */
|
|
||||||
case USB_ID(0x03f0, 0x654a): /* HP 320 FHD Webcam */
|
|
||||||
if (!strcmp(kctl->id.name, "Mic Capture Volume")) {
|
|
||||||
usb_audio_info(chip,
|
|
||||||
"set resolution quirk: cval->res = 16\n");
|
|
||||||
cval->res = 16;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case USB_ID(0x1bcf, 0x2281): /* HD Webcam */
|
|
||||||
if (!strcmp(kctl->id.name, "Mic Capture Volume")) {
|
|
||||||
usb_audio_info(chip,
|
|
||||||
"set resolution quirk: cval->res = 16\n");
|
|
||||||
cval->res = 16;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2030,7 +2030,7 @@ struct usb_audio_quirk_flags_table {
|
|||||||
static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
|
static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
|
||||||
/* Device matches */
|
/* Device matches */
|
||||||
DEVICE_FLG(0x03f0, 0x654a, /* HP 320 FHD Webcam */
|
DEVICE_FLG(0x03f0, 0x654a, /* HP 320 FHD Webcam */
|
||||||
QUIRK_FLAG_GET_SAMPLE_RATE),
|
QUIRK_FLAG_GET_SAMPLE_RATE | QUIRK_FLAG_MIC_RES_16),
|
||||||
DEVICE_FLG(0x041e, 0x3000, /* Creative SB Extigy */
|
DEVICE_FLG(0x041e, 0x3000, /* Creative SB Extigy */
|
||||||
QUIRK_FLAG_IGNORE_CTL_ERROR),
|
QUIRK_FLAG_IGNORE_CTL_ERROR),
|
||||||
DEVICE_FLG(0x041e, 0x4080, /* Creative Live Cam VF0610 */
|
DEVICE_FLG(0x041e, 0x4080, /* Creative Live Cam VF0610 */
|
||||||
@@ -2038,10 +2038,31 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
|
|||||||
DEVICE_FLG(0x045e, 0x083c, /* MS USB Link headset */
|
DEVICE_FLG(0x045e, 0x083c, /* MS USB Link headset */
|
||||||
QUIRK_FLAG_GET_SAMPLE_RATE | QUIRK_FLAG_CTL_MSG_DELAY |
|
QUIRK_FLAG_GET_SAMPLE_RATE | QUIRK_FLAG_CTL_MSG_DELAY |
|
||||||
QUIRK_FLAG_DISABLE_AUTOSUSPEND),
|
QUIRK_FLAG_DISABLE_AUTOSUSPEND),
|
||||||
|
DEVICE_FLG(0x046d, 0x0807, /* Logitech Webcam C500 */
|
||||||
|
QUIRK_FLAG_CTL_MSG_DELAY_1M | QUIRK_FLAG_MIC_RES_384),
|
||||||
|
DEVICE_FLG(0x046d, 0x0808, /* Logitech Webcam C600 */
|
||||||
|
QUIRK_FLAG_CTL_MSG_DELAY_1M | QUIRK_FLAG_MIC_RES_384),
|
||||||
|
DEVICE_FLG(0x046d, 0x0809,
|
||||||
|
QUIRK_FLAG_CTL_MSG_DELAY_1M | QUIRK_FLAG_MIC_RES_384),
|
||||||
|
DEVICE_FLG(0x046d, 0x0819, /* Logitech Webcam C210 */
|
||||||
|
QUIRK_FLAG_CTL_MSG_DELAY_1M | QUIRK_FLAG_MIC_RES_384),
|
||||||
|
DEVICE_FLG(0x046d, 0x081b, /* HD Webcam c310 */
|
||||||
|
QUIRK_FLAG_CTL_MSG_DELAY_1M | QUIRK_FLAG_MIC_RES_384),
|
||||||
|
DEVICE_FLG(0x046d, 0x081d, /* HD Webcam c510 */
|
||||||
|
QUIRK_FLAG_CTL_MSG_DELAY_1M | QUIRK_FLAG_MIC_RES_384),
|
||||||
|
DEVICE_FLG(0x046d, 0x0825, /* HD Webcam c270 */
|
||||||
|
QUIRK_FLAG_CTL_MSG_DELAY_1M | QUIRK_FLAG_MIC_RES_384),
|
||||||
|
DEVICE_FLG(0x046d, 0x0826, /* HD Webcam c525 */
|
||||||
|
QUIRK_FLAG_CTL_MSG_DELAY_1M | QUIRK_FLAG_MIC_RES_384),
|
||||||
DEVICE_FLG(0x046d, 0x084c, /* Logitech ConferenceCam Connect */
|
DEVICE_FLG(0x046d, 0x084c, /* Logitech ConferenceCam Connect */
|
||||||
QUIRK_FLAG_GET_SAMPLE_RATE | QUIRK_FLAG_CTL_MSG_DELAY_1M),
|
QUIRK_FLAG_GET_SAMPLE_RATE | QUIRK_FLAG_CTL_MSG_DELAY_1M),
|
||||||
|
DEVICE_FLG(0x046d, 0x08ca, /* Logitech Quickcam Fusion */
|
||||||
|
QUIRK_FLAG_CTL_MSG_DELAY_1M | QUIRK_FLAG_MIC_RES_384),
|
||||||
DEVICE_FLG(0x046d, 0x0991, /* Logitech QuickCam Pro */
|
DEVICE_FLG(0x046d, 0x0991, /* Logitech QuickCam Pro */
|
||||||
QUIRK_FLAG_CTL_MSG_DELAY_1M | QUIRK_FLAG_IGNORE_CTL_ERROR),
|
QUIRK_FLAG_CTL_MSG_DELAY_1M | QUIRK_FLAG_IGNORE_CTL_ERROR |
|
||||||
|
QUIRK_FLAG_MIC_RES_384),
|
||||||
|
DEVICE_FLG(0x046d, 0x09a2, /* QuickCam Communicate Deluxe/S7500 */
|
||||||
|
QUIRK_FLAG_CTL_MSG_DELAY_1M | QUIRK_FLAG_MIC_RES_384),
|
||||||
DEVICE_FLG(0x046d, 0x09a4, /* Logitech QuickCam E 3500 */
|
DEVICE_FLG(0x046d, 0x09a4, /* Logitech QuickCam E 3500 */
|
||||||
QUIRK_FLAG_CTL_MSG_DELAY_1M | QUIRK_FLAG_IGNORE_CTL_ERROR),
|
QUIRK_FLAG_CTL_MSG_DELAY_1M | QUIRK_FLAG_IGNORE_CTL_ERROR),
|
||||||
DEVICE_FLG(0x0499, 0x1509, /* Steinberg UR22 */
|
DEVICE_FLG(0x0499, 0x1509, /* Steinberg UR22 */
|
||||||
@@ -2109,7 +2130,7 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
|
|||||||
DEVICE_FLG(0x0fd9, 0x0008, /* Hauppauge HVR-950Q */
|
DEVICE_FLG(0x0fd9, 0x0008, /* Hauppauge HVR-950Q */
|
||||||
QUIRK_FLAG_SHARE_MEDIA_DEVICE | QUIRK_FLAG_ALIGN_TRANSFER),
|
QUIRK_FLAG_SHARE_MEDIA_DEVICE | QUIRK_FLAG_ALIGN_TRANSFER),
|
||||||
DEVICE_FLG(0x1224, 0x2a25, /* Jieli Technology USB PHY 2.0 */
|
DEVICE_FLG(0x1224, 0x2a25, /* Jieli Technology USB PHY 2.0 */
|
||||||
QUIRK_FLAG_GET_SAMPLE_RATE),
|
QUIRK_FLAG_GET_SAMPLE_RATE | QUIRK_FLAG_MIC_RES_16),
|
||||||
DEVICE_FLG(0x1395, 0x740a, /* Sennheiser DECT */
|
DEVICE_FLG(0x1395, 0x740a, /* Sennheiser DECT */
|
||||||
QUIRK_FLAG_GET_SAMPLE_RATE),
|
QUIRK_FLAG_GET_SAMPLE_RATE),
|
||||||
DEVICE_FLG(0x1397, 0x0507, /* Behringer UMC202HD */
|
DEVICE_FLG(0x1397, 0x0507, /* Behringer UMC202HD */
|
||||||
@@ -2147,9 +2168,9 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
|
|||||||
DEVICE_FLG(0x19f7, 0x0035, /* RODE NT-USB+ */
|
DEVICE_FLG(0x19f7, 0x0035, /* RODE NT-USB+ */
|
||||||
QUIRK_FLAG_GET_SAMPLE_RATE),
|
QUIRK_FLAG_GET_SAMPLE_RATE),
|
||||||
DEVICE_FLG(0x1bcf, 0x2281, /* HD Webcam */
|
DEVICE_FLG(0x1bcf, 0x2281, /* HD Webcam */
|
||||||
QUIRK_FLAG_GET_SAMPLE_RATE),
|
QUIRK_FLAG_GET_SAMPLE_RATE | QUIRK_FLAG_MIC_RES_16),
|
||||||
DEVICE_FLG(0x1bcf, 0x2283, /* NexiGo N930AF FHD Webcam */
|
DEVICE_FLG(0x1bcf, 0x2283, /* NexiGo N930AF FHD Webcam */
|
||||||
QUIRK_FLAG_GET_SAMPLE_RATE),
|
QUIRK_FLAG_GET_SAMPLE_RATE | QUIRK_FLAG_MIC_RES_16),
|
||||||
DEVICE_FLG(0x2040, 0x7200, /* Hauppauge HVR-950Q */
|
DEVICE_FLG(0x2040, 0x7200, /* Hauppauge HVR-950Q */
|
||||||
QUIRK_FLAG_SHARE_MEDIA_DEVICE | QUIRK_FLAG_ALIGN_TRANSFER),
|
QUIRK_FLAG_SHARE_MEDIA_DEVICE | QUIRK_FLAG_ALIGN_TRANSFER),
|
||||||
DEVICE_FLG(0x2040, 0x7201, /* Hauppauge HVR-950Q-MXL */
|
DEVICE_FLG(0x2040, 0x7201, /* Hauppauge HVR-950Q-MXL */
|
||||||
|
|||||||
@@ -186,6 +186,8 @@ extern bool snd_usb_skip_validation;
|
|||||||
* QUIRK_FLAG_FIXED_RATE
|
* QUIRK_FLAG_FIXED_RATE
|
||||||
* Do not set PCM rate (frequency) when only one rate is available
|
* Do not set PCM rate (frequency) when only one rate is available
|
||||||
* for the given endpoint.
|
* for the given endpoint.
|
||||||
|
* QUIRK_FLAG_MIC_RES_16 and QUIRK_FLAG_MIC_RES_384
|
||||||
|
* Set the fixed resolution for Mic Capture Volume (mostly for webcams)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define QUIRK_FLAG_GET_SAMPLE_RATE (1U << 0)
|
#define QUIRK_FLAG_GET_SAMPLE_RATE (1U << 0)
|
||||||
@@ -210,6 +212,8 @@ extern bool snd_usb_skip_validation;
|
|||||||
#define QUIRK_FLAG_IFACE_SKIP_CLOSE (1U << 19)
|
#define QUIRK_FLAG_IFACE_SKIP_CLOSE (1U << 19)
|
||||||
#define QUIRK_FLAG_FORCE_IFACE_RESET (1U << 20)
|
#define QUIRK_FLAG_FORCE_IFACE_RESET (1U << 20)
|
||||||
#define QUIRK_FLAG_FIXED_RATE (1U << 21)
|
#define QUIRK_FLAG_FIXED_RATE (1U << 21)
|
||||||
|
#define QUIRK_FLAG_MIC_RES_16 (1U << 22)
|
||||||
|
#define QUIRK_FLAG_MIC_RES_384 (1U << 23)
|
||||||
|
|
||||||
struct audioformat;
|
struct audioformat;
|
||||||
|
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ long parse_ns_duration(char *val)
|
|||||||
|
|
||||||
#define SCHED_DEADLINE 6
|
#define SCHED_DEADLINE 6
|
||||||
|
|
||||||
static inline int sched_setattr(pid_t pid, const struct sched_attr *attr,
|
static inline int syscall_sched_setattr(pid_t pid, const struct sched_attr *attr,
|
||||||
unsigned int flags) {
|
unsigned int flags) {
|
||||||
return syscall(__NR_sched_setattr, pid, attr, flags);
|
return syscall(__NR_sched_setattr, pid, attr, flags);
|
||||||
}
|
}
|
||||||
@@ -248,7 +248,7 @@ int __set_sched_attr(int pid, struct sched_attr *attr)
|
|||||||
int flags = 0;
|
int flags = 0;
|
||||||
int retval;
|
int retval;
|
||||||
|
|
||||||
retval = sched_setattr(pid, attr, flags);
|
retval = syscall_sched_setattr(pid, attr, flags);
|
||||||
if (retval < 0) {
|
if (retval < 0) {
|
||||||
err_msg("Failed to set sched attributes to the pid %d: %s\n",
|
err_msg("Failed to set sched attributes to the pid %d: %s\n",
|
||||||
pid, strerror(errno));
|
pid, strerror(errno));
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ update_sum(unsigned long long *a, unsigned long long *b)
|
|||||||
*a += *b;
|
*a += *b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef SCHED_ATTR_SIZE_VER0
|
||||||
struct sched_attr {
|
struct sched_attr {
|
||||||
uint32_t size;
|
uint32_t size;
|
||||||
uint32_t sched_policy;
|
uint32_t sched_policy;
|
||||||
@@ -54,6 +55,7 @@ struct sched_attr {
|
|||||||
uint64_t sched_deadline;
|
uint64_t sched_deadline;
|
||||||
uint64_t sched_period;
|
uint64_t sched_period;
|
||||||
};
|
};
|
||||||
|
#endif /* SCHED_ATTR_SIZE_VER0 */
|
||||||
|
|
||||||
int parse_prio(char *arg, struct sched_attr *sched_param);
|
int parse_prio(char *arg, struct sched_attr *sched_param);
|
||||||
int set_comm_sched_attr(const char *comm_prefix, struct sched_attr *attr);
|
int set_comm_sched_attr(const char *comm_prefix, struct sched_attr *attr);
|
||||||
|
|||||||
@@ -29,11 +29,11 @@ class Automata:
|
|||||||
|
|
||||||
def __get_model_name(self):
|
def __get_model_name(self):
|
||||||
basename = ntpath.basename(self.__dot_path)
|
basename = ntpath.basename(self.__dot_path)
|
||||||
if basename.endswith(".dot") == False:
|
if not basename.endswith(".dot") and not basename.endswith(".gv"):
|
||||||
print("not a dot file")
|
print("not a dot file")
|
||||||
raise Exception("not a dot file: %s" % self.__dot_path)
|
raise Exception("not a dot file: %s" % self.__dot_path)
|
||||||
|
|
||||||
model_name = basename[0:-4]
|
model_name = ntpath.splitext(basename)[0]
|
||||||
if model_name.__len__() == 0:
|
if model_name.__len__() == 0:
|
||||||
raise Exception("not a dot file: %s" % self.__dot_path)
|
raise Exception("not a dot file: %s" % self.__dot_path)
|
||||||
|
|
||||||
@@ -68,9 +68,9 @@ class Automata:
|
|||||||
def __get_cursor_begin_events(self):
|
def __get_cursor_begin_events(self):
|
||||||
cursor = 0
|
cursor = 0
|
||||||
while self.__dot_lines[cursor].split()[0] != "{node":
|
while self.__dot_lines[cursor].split()[0] != "{node":
|
||||||
cursor += 1
|
cursor += 1
|
||||||
while self.__dot_lines[cursor].split()[0] == "{node":
|
while self.__dot_lines[cursor].split()[0] == "{node":
|
||||||
cursor += 1
|
cursor += 1
|
||||||
# skip initial state transition
|
# skip initial state transition
|
||||||
cursor += 1
|
cursor += 1
|
||||||
return cursor
|
return cursor
|
||||||
@@ -94,11 +94,11 @@ class Automata:
|
|||||||
initial_state = state[7:]
|
initial_state = state[7:]
|
||||||
else:
|
else:
|
||||||
states.append(state)
|
states.append(state)
|
||||||
if self.__dot_lines[cursor].__contains__("doublecircle") == True:
|
if "doublecircle" in self.__dot_lines[cursor]:
|
||||||
final_states.append(state)
|
final_states.append(state)
|
||||||
has_final_states = True
|
has_final_states = True
|
||||||
|
|
||||||
if self.__dot_lines[cursor].__contains__("ellipse") == True:
|
if "ellipse" in self.__dot_lines[cursor]:
|
||||||
final_states.append(state)
|
final_states.append(state)
|
||||||
has_final_states = True
|
has_final_states = True
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@ class Automata:
|
|||||||
# Insert the initial state at the bein og the states
|
# Insert the initial state at the bein og the states
|
||||||
states.insert(0, initial_state)
|
states.insert(0, initial_state)
|
||||||
|
|
||||||
if has_final_states == False:
|
if not has_final_states:
|
||||||
final_states.append(initial_state)
|
final_states.append(initial_state)
|
||||||
|
|
||||||
return states, initial_state, final_states
|
return states, initial_state, final_states
|
||||||
@@ -120,7 +120,7 @@ class Automata:
|
|||||||
cursor = self.__get_cursor_begin_events()
|
cursor = self.__get_cursor_begin_events()
|
||||||
|
|
||||||
events = []
|
events = []
|
||||||
while self.__dot_lines[cursor][1] == '"':
|
while self.__dot_lines[cursor].lstrip()[0] == '"':
|
||||||
# transitions have the format:
|
# transitions have the format:
|
||||||
# "all_fired" -> "both_fired" [ label = "disable_irq" ];
|
# "all_fired" -> "both_fired" [ label = "disable_irq" ];
|
||||||
# ------------ event is here ------------^^^^^
|
# ------------ event is here ------------^^^^^
|
||||||
@@ -161,7 +161,7 @@ class Automata:
|
|||||||
# and we are back! Let's fill the matrix
|
# and we are back! Let's fill the matrix
|
||||||
cursor = self.__get_cursor_begin_events()
|
cursor = self.__get_cursor_begin_events()
|
||||||
|
|
||||||
while self.__dot_lines[cursor][1] == '"':
|
while self.__dot_lines[cursor].lstrip()[0] == '"':
|
||||||
if self.__dot_lines[cursor].split()[1] == "->":
|
if self.__dot_lines[cursor].split()[1] == "->":
|
||||||
line = self.__dot_lines[cursor].split()
|
line = self.__dot_lines[cursor].split()
|
||||||
origin_state = line[0].replace('"','').replace(',','_')
|
origin_state = line[0].replace('"','').replace(',','_')
|
||||||
|
|||||||
Reference in New Issue
Block a user