This is the 5.4.97 stable release
-----BEGIN PGP SIGNATURE----- iQIyBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmAjmR0ACgkQONu9yGCS aT6y/A/3f4yvZr4VWRdsX9eWC5snc9jx+QSd/t+LzdRTJa8gCHQcEp9TTGiZHr7/ DSM5c32BXesBDs2Ctb5jUYRfp1SgPH5pen7/HUREG0qCG+u2lY6I3/Nc0thCQNcH xCOHlBMx1bJ9Dy4Z39YpwqGbGRldFM+/UoAke1/mGvqxVBeQyx4bwKg94qdKRugb XRwKRcihNgL2NfWdGQ+yy+G4msjrUoswdpns5CWOjWXxkObfeg3clnQipw6mSloR q+NCcwgPXUC1jbzH0nXQwzfHpD+mcFU8/ueUgN/1Q6OGkZ5uDv2vdSK4PtzTyUSN SNlcCl5D1hQdml9+Vh+/ScVCwzpKHmCzyWY/e17Fe1mMXGYIrOkexNcgrfld6Hfz 1yQ/9UfBZ2gAUTsecOvZS+l/ejh5NkOJX5CtMlQDA4wtn6JjMWLVddksXxAcbIIP PWdLlfH+vfGfxrGJ/g3L0ALlppx0ezDCMvz6X2mVn1w7ifXcW+mnucypmDoQQ57j Ckc+YRluLxrBdLJsS98iLOkoTFxRJXZArJSI/lDW3LqPaFhFX5SMg/ilArefas78 62y8gIPdIlMt2sjJ12xnY4G4cod5Ec29YpMorIbl2CZve5OC5e5MiUxubU0C7noz zEGP9+bqp0WVd5Ir2yAvSyvmkNPOSOoBsrKuw0Gw1M1p3gxKLg== =BMmj -----END PGP SIGNATURE----- Merge 5.4.97 into android11-5.4-lts Changes in 5.4.97 USB: serial: cp210x: add pid/vid for WSDA-200-USB USB: serial: cp210x: add new VID/PID for supporting Teraoka AD2000 USB: serial: option: Adding support for Cinterion MV31 arm64: dts: qcom: c630: keep both touchpad devices enabled Input: i8042 - unbreak Pegatron C15B arm64: dts: amlogic: meson-g12: Set FL-adj property value arm64: dts: rockchip: fix vopl iommu irq on px30 bpf, cgroup: Fix optlen WARN_ON_ONCE toctou bpf, cgroup: Fix problematic bounds check um: virtio: free vu_dev only with the contained struct device rxrpc: Fix deadlock around release of dst cached on udp tunnel arm64: dts: ls1046a: fix dcfg address range igc: set the default return value to -IGC_ERR_NVM in igc_write_nvm_srwr igc: check return value of ret_val in igc_config_fc_after_link_up i40e: Revert "i40e: don't report link up for a VF who hasn't enabled queues" net/mlx5: Fix leak upon failure of rule creation net: lapb: Copy the skb before sending a packet net: mvpp2: TCAM entry enable should be written after SRAM data r8169: fix WoL on shutdown if CONFIG_DEBUG_SHIRQ is set ARM: dts: sun7i: a20: bananapro: Fix ethernet phy-mode nvmet-tcp: fix out-of-bounds access when receiving multiple h2cdata PDUs memblock: do not start bottom-up allocations with kernel_end USB: gadget: legacy: fix an error code in eth_bind() USB: usblp: don't call usb_set_interface if there's a single alt usb: renesas_usbhs: Clear pipe running flag in usbhs_pkt_pop() usb: dwc2: Fix endpoint direction check in ep_from_windex usb: dwc3: fix clock issue during resume in OTG mode usb: xhci-mtk: fix unreleased bandwidth data usb: xhci-mtk: skip dropping bandwidth of unchecked endpoints usb: xhci-mtk: break loop when find the endpoint to drop usb: host: xhci-plat: add priv quirk for skip PHY initialization ovl: fix dentry leak in ovl_get_redirect mac80211: fix station rate table updates on assoc fgraph: Initialize tracing_graph_pause at task creation kretprobe: Avoid re-registration of the same kretprobe earlier libnvdimm/dimm: Avoid race between probe and available_slots_show() genirq/msi: Activate Multi-MSI early when MSI_FLAG_ACTIVATE_EARLY is set xhci: fix bounce buffer usage for non-sg list case cifs: report error instead of invalid when revalidating a dentry fails smb3: Fix out-of-bounds bug in SMB2_negotiate() smb3: fix crediting for compounding when only one request in flight mmc: core: Limit retries when analyse of SDIO tuples fails drm/amd/display: Revert "Fix EDID parsing after resume from suspend" nvme-pci: avoid the deepest sleep state on Kingston A2000 SSDs KVM: SVM: Treat SVM as unsupported when running as an SEV guest KVM: x86: Update emulator context mode if SYSENTER xfers to 64-bit mode ARM: footbridge: fix dc21285 PCI configuration accessors mm: hugetlbfs: fix cannot migrate the fallocated HugeTLB page mm: hugetlb: fix a race between freeing and dissolving the page mm: hugetlb: fix a race between isolating and freeing page mm: hugetlb: remove VM_BUG_ON_PAGE from page_huge_active mm, compaction: move high_pfn to the for loop scope mm: thp: fix MADV_REMOVE deadlock on shmem THP x86/build: Disable CET instrumentation in the kernel x86/apic: Add extra serialization for non-serializing MSRs iwlwifi: mvm: don't send RFH_QUEUE_CONFIG_CMD with no queues Input: xpad - sync supported devices with fork on GitHub iommu/vt-d: Do not use flush-queue when caching-mode is on md: Set prev_flush_start and flush_bio in an atomic way igc: Report speed and duplex as unknown when device is runtime suspended neighbour: Prevent a dead entry from updating gc_list net: ip_tunnel: fix mtu calculation net: dsa: mv88e6xxx: override existent unicast portvec in port_fdb_add net: sched: replaced invalid qdisc tree flush helper in qdisc_replace usb: host: xhci: mvebu: make USB 3.0 PHY optional for Armada 3720 Linux 5.4.97 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Ic972908fac1b16b4b01a63e2c23b2dd2f528143b
This commit is contained in:
commit
1187a992b3
8
Makefile
8
Makefile
@ -1,7 +1,7 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
VERSION = 5
|
VERSION = 5
|
||||||
PATCHLEVEL = 4
|
PATCHLEVEL = 4
|
||||||
SUBLEVEL = 96
|
SUBLEVEL = 97
|
||||||
EXTRAVERSION =
|
EXTRAVERSION =
|
||||||
NAME = Kleptomaniac Octopus
|
NAME = Kleptomaniac Octopus
|
||||||
|
|
||||||
@ -993,12 +993,6 @@ KBUILD_CFLAGS += $(call cc-option,-Werror=designated-init)
|
|||||||
# change __FILE__ to the relative path from the srctree
|
# change __FILE__ to the relative path from the srctree
|
||||||
KBUILD_CFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=)
|
KBUILD_CFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=)
|
||||||
|
|
||||||
# ensure -fcf-protection is disabled when using retpoline as it is
|
|
||||||
# incompatible with -mindirect-branch=thunk-extern
|
|
||||||
ifdef CONFIG_RETPOLINE
|
|
||||||
KBUILD_CFLAGS += $(call cc-option,-fcf-protection=none)
|
|
||||||
endif
|
|
||||||
|
|
||||||
include scripts/Makefile.kasan
|
include scripts/Makefile.kasan
|
||||||
include scripts/Makefile.extrawarn
|
include scripts/Makefile.extrawarn
|
||||||
include scripts/Makefile.ubsan
|
include scripts/Makefile.ubsan
|
||||||
|
@ -110,7 +110,7 @@
|
|||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&gmac_rgmii_pins>;
|
pinctrl-0 = <&gmac_rgmii_pins>;
|
||||||
phy-handle = <&phy1>;
|
phy-handle = <&phy1>;
|
||||||
phy-mode = "rgmii";
|
phy-mode = "rgmii-id";
|
||||||
phy-supply = <®_gmac_3v3>;
|
phy-supply = <®_gmac_3v3>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
@ -66,15 +66,15 @@ dc21285_read_config(struct pci_bus *bus, unsigned int devfn, int where,
|
|||||||
if (addr)
|
if (addr)
|
||||||
switch (size) {
|
switch (size) {
|
||||||
case 1:
|
case 1:
|
||||||
asm("ldrb %0, [%1, %2]"
|
asm volatile("ldrb %0, [%1, %2]"
|
||||||
: "=r" (v) : "r" (addr), "r" (where) : "cc");
|
: "=r" (v) : "r" (addr), "r" (where) : "cc");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
asm("ldrh %0, [%1, %2]"
|
asm volatile("ldrh %0, [%1, %2]"
|
||||||
: "=r" (v) : "r" (addr), "r" (where) : "cc");
|
: "=r" (v) : "r" (addr), "r" (where) : "cc");
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
asm("ldr %0, [%1, %2]"
|
asm volatile("ldr %0, [%1, %2]"
|
||||||
: "=r" (v) : "r" (addr), "r" (where) : "cc");
|
: "=r" (v) : "r" (addr), "r" (where) : "cc");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -100,17 +100,17 @@ dc21285_write_config(struct pci_bus *bus, unsigned int devfn, int where,
|
|||||||
if (addr)
|
if (addr)
|
||||||
switch (size) {
|
switch (size) {
|
||||||
case 1:
|
case 1:
|
||||||
asm("strb %0, [%1, %2]"
|
asm volatile("strb %0, [%1, %2]"
|
||||||
: : "r" (value), "r" (addr), "r" (where)
|
: : "r" (value), "r" (addr), "r" (where)
|
||||||
: "cc");
|
: "cc");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
asm("strh %0, [%1, %2]"
|
asm volatile("strh %0, [%1, %2]"
|
||||||
: : "r" (value), "r" (addr), "r" (where)
|
: : "r" (value), "r" (addr), "r" (where)
|
||||||
: "cc");
|
: "cc");
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
asm("str %0, [%1, %2]"
|
asm volatile("str %0, [%1, %2]"
|
||||||
: : "r" (value), "r" (addr), "r" (where)
|
: : "r" (value), "r" (addr), "r" (where)
|
||||||
: "cc");
|
: "cc");
|
||||||
break;
|
break;
|
||||||
|
@ -2382,7 +2382,7 @@
|
|||||||
interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
dr_mode = "host";
|
dr_mode = "host";
|
||||||
snps,dis_u2_susphy_quirk;
|
snps,dis_u2_susphy_quirk;
|
||||||
snps,quirk-frame-length-adjustment;
|
snps,quirk-frame-length-adjustment = <0x20>;
|
||||||
snps,parkmode-disable-ss-quirk;
|
snps,parkmode-disable-ss-quirk;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -304,7 +304,7 @@
|
|||||||
|
|
||||||
dcfg: dcfg@1ee0000 {
|
dcfg: dcfg@1ee0000 {
|
||||||
compatible = "fsl,ls1046a-dcfg", "syscon";
|
compatible = "fsl,ls1046a-dcfg", "syscon";
|
||||||
reg = <0x0 0x1ee0000 0x0 0x10000>;
|
reg = <0x0 0x1ee0000 0x0 0x1000>;
|
||||||
big-endian;
|
big-endian;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -243,6 +243,8 @@
|
|||||||
&i2c3 {
|
&i2c3 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
clock-frequency = <400000>;
|
clock-frequency = <400000>;
|
||||||
|
/* Overwrite pinctrl-0 from sdm845.dtsi */
|
||||||
|
pinctrl-0 = <&qup_i2c3_default &i2c3_hid_active>;
|
||||||
|
|
||||||
tsel: hid@15 {
|
tsel: hid@15 {
|
||||||
compatible = "hid-over-i2c";
|
compatible = "hid-over-i2c";
|
||||||
@ -250,9 +252,6 @@
|
|||||||
hid-descr-addr = <0x1>;
|
hid-descr-addr = <0x1>;
|
||||||
|
|
||||||
interrupts-extended = <&tlmm 37 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts-extended = <&tlmm 37 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
|
||||||
pinctrl-names = "default";
|
|
||||||
pinctrl-0 = <&i2c3_hid_active>;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
tsc2: hid@2c {
|
tsc2: hid@2c {
|
||||||
@ -261,11 +260,6 @@
|
|||||||
hid-descr-addr = <0x20>;
|
hid-descr-addr = <0x20>;
|
||||||
|
|
||||||
interrupts-extended = <&tlmm 37 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts-extended = <&tlmm 37 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
|
||||||
pinctrl-names = "default";
|
|
||||||
pinctrl-0 = <&i2c3_hid_active>;
|
|
||||||
|
|
||||||
status = "disabled";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -860,7 +860,7 @@
|
|||||||
vopl_mmu: iommu@ff470f00 {
|
vopl_mmu: iommu@ff470f00 {
|
||||||
compatible = "rockchip,iommu";
|
compatible = "rockchip,iommu";
|
||||||
reg = <0x0 0xff470f00 0x0 0x100>;
|
reg = <0x0 0xff470f00 0x0 0x100>;
|
||||||
interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
interrupt-names = "vopl_mmu";
|
interrupt-names = "vopl_mmu";
|
||||||
clocks = <&cru ACLK_VOPL>, <&cru HCLK_VOPL>;
|
clocks = <&cru ACLK_VOPL>, <&cru HCLK_VOPL>;
|
||||||
clock-names = "aclk", "hclk";
|
clock-names = "aclk", "hclk";
|
||||||
|
@ -959,6 +959,7 @@ static void virtio_uml_release_dev(struct device *d)
|
|||||||
}
|
}
|
||||||
|
|
||||||
os_close_file(vu_dev->sock);
|
os_close_file(vu_dev->sock);
|
||||||
|
kfree(vu_dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Platform device */
|
/* Platform device */
|
||||||
@ -977,7 +978,7 @@ static int virtio_uml_probe(struct platform_device *pdev)
|
|||||||
if (!pdata)
|
if (!pdata)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
vu_dev = devm_kzalloc(&pdev->dev, sizeof(*vu_dev), GFP_KERNEL);
|
vu_dev = kzalloc(sizeof(*vu_dev), GFP_KERNEL);
|
||||||
if (!vu_dev)
|
if (!vu_dev)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
@ -131,6 +131,9 @@ else
|
|||||||
|
|
||||||
KBUILD_CFLAGS += -mno-red-zone
|
KBUILD_CFLAGS += -mno-red-zone
|
||||||
KBUILD_CFLAGS += -mcmodel=kernel
|
KBUILD_CFLAGS += -mcmodel=kernel
|
||||||
|
|
||||||
|
# Intel CET isn't enabled in the kernel
|
||||||
|
KBUILD_CFLAGS += $(call cc-option,-fcf-protection=none)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_X86_X32
|
ifdef CONFIG_X86_X32
|
||||||
|
@ -197,16 +197,6 @@ static inline bool apic_needs_pit(void) { return true; }
|
|||||||
#endif /* !CONFIG_X86_LOCAL_APIC */
|
#endif /* !CONFIG_X86_LOCAL_APIC */
|
||||||
|
|
||||||
#ifdef CONFIG_X86_X2APIC
|
#ifdef CONFIG_X86_X2APIC
|
||||||
/*
|
|
||||||
* Make previous memory operations globally visible before
|
|
||||||
* sending the IPI through x2apic wrmsr. We need a serializing instruction or
|
|
||||||
* mfence for this.
|
|
||||||
*/
|
|
||||||
static inline void x2apic_wrmsr_fence(void)
|
|
||||||
{
|
|
||||||
asm volatile("mfence" : : : "memory");
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void native_apic_msr_write(u32 reg, u32 v)
|
static inline void native_apic_msr_write(u32 reg, u32 v)
|
||||||
{
|
{
|
||||||
if (reg == APIC_DFR || reg == APIC_ID || reg == APIC_LDR ||
|
if (reg == APIC_DFR || reg == APIC_ID || reg == APIC_LDR ||
|
||||||
|
@ -84,4 +84,22 @@ do { \
|
|||||||
|
|
||||||
#include <asm-generic/barrier.h>
|
#include <asm-generic/barrier.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Make previous memory operations globally visible before
|
||||||
|
* a WRMSR.
|
||||||
|
*
|
||||||
|
* MFENCE makes writes visible, but only affects load/store
|
||||||
|
* instructions. WRMSR is unfortunately not a load/store
|
||||||
|
* instruction and is unaffected by MFENCE. The LFENCE ensures
|
||||||
|
* that the WRMSR is not reordered.
|
||||||
|
*
|
||||||
|
* Most WRMSRs are full serializing instructions themselves and
|
||||||
|
* do not require this barrier. This is only required for the
|
||||||
|
* IA32_TSC_DEADLINE and X2APIC MSRs.
|
||||||
|
*/
|
||||||
|
static inline void weak_wrmsr_fence(void)
|
||||||
|
{
|
||||||
|
asm volatile("mfence; lfence" : : : "memory");
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* _ASM_X86_BARRIER_H */
|
#endif /* _ASM_X86_BARRIER_H */
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
#include <asm/x86_init.h>
|
#include <asm/x86_init.h>
|
||||||
#include <asm/pgalloc.h>
|
#include <asm/pgalloc.h>
|
||||||
#include <linux/atomic.h>
|
#include <linux/atomic.h>
|
||||||
|
#include <asm/barrier.h>
|
||||||
#include <asm/mpspec.h>
|
#include <asm/mpspec.h>
|
||||||
#include <asm/i8259.h>
|
#include <asm/i8259.h>
|
||||||
#include <asm/proto.h>
|
#include <asm/proto.h>
|
||||||
@ -472,6 +473,9 @@ static int lapic_next_deadline(unsigned long delta,
|
|||||||
{
|
{
|
||||||
u64 tsc;
|
u64 tsc;
|
||||||
|
|
||||||
|
/* This MSR is special and need a special fence: */
|
||||||
|
weak_wrmsr_fence();
|
||||||
|
|
||||||
tsc = rdtsc();
|
tsc = rdtsc();
|
||||||
wrmsrl(MSR_IA32_TSC_DEADLINE, tsc + (((u64) delta) * TSC_DIVISOR));
|
wrmsrl(MSR_IA32_TSC_DEADLINE, tsc + (((u64) delta) * TSC_DIVISOR));
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -29,7 +29,8 @@ static void x2apic_send_IPI(int cpu, int vector)
|
|||||||
{
|
{
|
||||||
u32 dest = per_cpu(x86_cpu_to_logical_apicid, cpu);
|
u32 dest = per_cpu(x86_cpu_to_logical_apicid, cpu);
|
||||||
|
|
||||||
x2apic_wrmsr_fence();
|
/* x2apic MSRs are special and need a special fence: */
|
||||||
|
weak_wrmsr_fence();
|
||||||
__x2apic_send_IPI_dest(dest, vector, APIC_DEST_LOGICAL);
|
__x2apic_send_IPI_dest(dest, vector, APIC_DEST_LOGICAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,7 +42,8 @@ __x2apic_send_IPI_mask(const struct cpumask *mask, int vector, int apic_dest)
|
|||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
u32 dest;
|
u32 dest;
|
||||||
|
|
||||||
x2apic_wrmsr_fence();
|
/* x2apic MSRs are special and need a special fence: */
|
||||||
|
weak_wrmsr_fence();
|
||||||
local_irq_save(flags);
|
local_irq_save(flags);
|
||||||
|
|
||||||
tmpmsk = this_cpu_cpumask_var_ptr(ipi_mask);
|
tmpmsk = this_cpu_cpumask_var_ptr(ipi_mask);
|
||||||
|
@ -43,7 +43,8 @@ static void x2apic_send_IPI(int cpu, int vector)
|
|||||||
{
|
{
|
||||||
u32 dest = per_cpu(x86_cpu_to_apicid, cpu);
|
u32 dest = per_cpu(x86_cpu_to_apicid, cpu);
|
||||||
|
|
||||||
x2apic_wrmsr_fence();
|
/* x2apic MSRs are special and need a special fence: */
|
||||||
|
weak_wrmsr_fence();
|
||||||
__x2apic_send_IPI_dest(dest, vector, APIC_DEST_PHYSICAL);
|
__x2apic_send_IPI_dest(dest, vector, APIC_DEST_PHYSICAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,7 +55,8 @@ __x2apic_send_IPI_mask(const struct cpumask *mask, int vector, int apic_dest)
|
|||||||
unsigned long this_cpu;
|
unsigned long this_cpu;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
x2apic_wrmsr_fence();
|
/* x2apic MSRs are special and need a special fence: */
|
||||||
|
weak_wrmsr_fence();
|
||||||
|
|
||||||
local_irq_save(flags);
|
local_irq_save(flags);
|
||||||
|
|
||||||
@ -125,7 +127,8 @@ void __x2apic_send_IPI_shorthand(int vector, u32 which)
|
|||||||
{
|
{
|
||||||
unsigned long cfg = __prepare_ICR(which, vector, 0);
|
unsigned long cfg = __prepare_ICR(which, vector, 0);
|
||||||
|
|
||||||
x2apic_wrmsr_fence();
|
/* x2apic MSRs are special and need a special fence: */
|
||||||
|
weak_wrmsr_fence();
|
||||||
native_x2apic_icr_write(cfg, 0);
|
native_x2apic_icr_write(cfg, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2890,6 +2890,8 @@ static int em_sysenter(struct x86_emulate_ctxt *ctxt)
|
|||||||
ops->get_msr(ctxt, MSR_IA32_SYSENTER_ESP, &msr_data);
|
ops->get_msr(ctxt, MSR_IA32_SYSENTER_ESP, &msr_data);
|
||||||
*reg_write(ctxt, VCPU_REGS_RSP) = (efer & EFER_LMA) ? msr_data :
|
*reg_write(ctxt, VCPU_REGS_RSP) = (efer & EFER_LMA) ? msr_data :
|
||||||
(u32)msr_data;
|
(u32)msr_data;
|
||||||
|
if (efer & EFER_LMA)
|
||||||
|
ctxt->mode = X86EMUL_MODE_PROT64;
|
||||||
|
|
||||||
return X86EMUL_CONTINUE;
|
return X86EMUL_CONTINUE;
|
||||||
}
|
}
|
||||||
|
@ -889,6 +889,11 @@ static int has_svm(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sev_active()) {
|
||||||
|
pr_info("KVM is unsupported when running as an SEV guest\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -375,6 +375,7 @@ bool force_dma_unencrypted(struct device *dev)
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(sev_active);
|
||||||
|
|
||||||
/* Architecture __weak replacement functions */
|
/* Architecture __weak replacement functions */
|
||||||
void __init mem_encrypt_free_decrypted_mem(void)
|
void __init mem_encrypt_free_decrypted_mem(void)
|
||||||
|
@ -1434,8 +1434,6 @@ amdgpu_dm_update_connector_after_detect(struct amdgpu_dm_connector *aconnector)
|
|||||||
|
|
||||||
drm_connector_update_edid_property(connector,
|
drm_connector_update_edid_property(connector,
|
||||||
aconnector->edid);
|
aconnector->edid);
|
||||||
drm_add_edid_modes(connector, aconnector->edid);
|
|
||||||
|
|
||||||
if (aconnector->dc_link->aux_mode)
|
if (aconnector->dc_link->aux_mode)
|
||||||
drm_dp_cec_set_edid(&aconnector->dm_dp_aux.aux,
|
drm_dp_cec_set_edid(&aconnector->dm_dp_aux.aux,
|
||||||
aconnector->edid);
|
aconnector->edid);
|
||||||
|
@ -215,9 +215,17 @@ static const struct xpad_device {
|
|||||||
{ 0x0e6f, 0x0213, "Afterglow Gamepad for Xbox 360", 0, XTYPE_XBOX360 },
|
{ 0x0e6f, 0x0213, "Afterglow Gamepad for Xbox 360", 0, XTYPE_XBOX360 },
|
||||||
{ 0x0e6f, 0x021f, "Rock Candy Gamepad for Xbox 360", 0, XTYPE_XBOX360 },
|
{ 0x0e6f, 0x021f, "Rock Candy Gamepad for Xbox 360", 0, XTYPE_XBOX360 },
|
||||||
{ 0x0e6f, 0x0246, "Rock Candy Gamepad for Xbox One 2015", 0, XTYPE_XBOXONE },
|
{ 0x0e6f, 0x0246, "Rock Candy Gamepad for Xbox One 2015", 0, XTYPE_XBOXONE },
|
||||||
{ 0x0e6f, 0x02ab, "PDP Controller for Xbox One", 0, XTYPE_XBOXONE },
|
{ 0x0e6f, 0x02a0, "PDP Xbox One Controller", 0, XTYPE_XBOXONE },
|
||||||
|
{ 0x0e6f, 0x02a1, "PDP Xbox One Controller", 0, XTYPE_XBOXONE },
|
||||||
|
{ 0x0e6f, 0x02a2, "PDP Wired Controller for Xbox One - Crimson Red", 0, XTYPE_XBOXONE },
|
||||||
{ 0x0e6f, 0x02a4, "PDP Wired Controller for Xbox One - Stealth Series", 0, XTYPE_XBOXONE },
|
{ 0x0e6f, 0x02a4, "PDP Wired Controller for Xbox One - Stealth Series", 0, XTYPE_XBOXONE },
|
||||||
{ 0x0e6f, 0x02a6, "PDP Wired Controller for Xbox One - Camo Series", 0, XTYPE_XBOXONE },
|
{ 0x0e6f, 0x02a6, "PDP Wired Controller for Xbox One - Camo Series", 0, XTYPE_XBOXONE },
|
||||||
|
{ 0x0e6f, 0x02a7, "PDP Xbox One Controller", 0, XTYPE_XBOXONE },
|
||||||
|
{ 0x0e6f, 0x02a8, "PDP Xbox One Controller", 0, XTYPE_XBOXONE },
|
||||||
|
{ 0x0e6f, 0x02ab, "PDP Controller for Xbox One", 0, XTYPE_XBOXONE },
|
||||||
|
{ 0x0e6f, 0x02ad, "PDP Wired Controller for Xbox One - Stealth Series", 0, XTYPE_XBOXONE },
|
||||||
|
{ 0x0e6f, 0x02b3, "Afterglow Prismatic Wired Controller", 0, XTYPE_XBOXONE },
|
||||||
|
{ 0x0e6f, 0x02b8, "Afterglow Prismatic Wired Controller", 0, XTYPE_XBOXONE },
|
||||||
{ 0x0e6f, 0x0301, "Logic3 Controller", 0, XTYPE_XBOX360 },
|
{ 0x0e6f, 0x0301, "Logic3 Controller", 0, XTYPE_XBOX360 },
|
||||||
{ 0x0e6f, 0x0346, "Rock Candy Gamepad for Xbox One 2016", 0, XTYPE_XBOXONE },
|
{ 0x0e6f, 0x0346, "Rock Candy Gamepad for Xbox One 2016", 0, XTYPE_XBOXONE },
|
||||||
{ 0x0e6f, 0x0401, "Logic3 Controller", 0, XTYPE_XBOX360 },
|
{ 0x0e6f, 0x0401, "Logic3 Controller", 0, XTYPE_XBOX360 },
|
||||||
@ -296,6 +304,9 @@ static const struct xpad_device {
|
|||||||
{ 0x1bad, 0xfa01, "MadCatz GamePad", 0, XTYPE_XBOX360 },
|
{ 0x1bad, 0xfa01, "MadCatz GamePad", 0, XTYPE_XBOX360 },
|
||||||
{ 0x1bad, 0xfd00, "Razer Onza TE", 0, XTYPE_XBOX360 },
|
{ 0x1bad, 0xfd00, "Razer Onza TE", 0, XTYPE_XBOX360 },
|
||||||
{ 0x1bad, 0xfd01, "Razer Onza", 0, XTYPE_XBOX360 },
|
{ 0x1bad, 0xfd01, "Razer Onza", 0, XTYPE_XBOX360 },
|
||||||
|
{ 0x20d6, 0x2001, "BDA Xbox Series X Wired Controller", 0, XTYPE_XBOXONE },
|
||||||
|
{ 0x20d6, 0x281f, "PowerA Wired Controller For Xbox 360", 0, XTYPE_XBOX360 },
|
||||||
|
{ 0x2e24, 0x0652, "Hyperkin Duke X-Box One pad", 0, XTYPE_XBOXONE },
|
||||||
{ 0x24c6, 0x5000, "Razer Atrox Arcade Stick", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 },
|
{ 0x24c6, 0x5000, "Razer Atrox Arcade Stick", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 },
|
||||||
{ 0x24c6, 0x5300, "PowerA MINI PROEX Controller", 0, XTYPE_XBOX360 },
|
{ 0x24c6, 0x5300, "PowerA MINI PROEX Controller", 0, XTYPE_XBOX360 },
|
||||||
{ 0x24c6, 0x5303, "Xbox Airflo wired controller", 0, XTYPE_XBOX360 },
|
{ 0x24c6, 0x5303, "Xbox Airflo wired controller", 0, XTYPE_XBOX360 },
|
||||||
@ -429,8 +440,12 @@ static const struct usb_device_id xpad_table[] = {
|
|||||||
XPAD_XBOX360_VENDOR(0x162e), /* Joytech X-Box 360 controllers */
|
XPAD_XBOX360_VENDOR(0x162e), /* Joytech X-Box 360 controllers */
|
||||||
XPAD_XBOX360_VENDOR(0x1689), /* Razer Onza */
|
XPAD_XBOX360_VENDOR(0x1689), /* Razer Onza */
|
||||||
XPAD_XBOX360_VENDOR(0x1bad), /* Harminix Rock Band Guitar and Drums */
|
XPAD_XBOX360_VENDOR(0x1bad), /* Harminix Rock Band Guitar and Drums */
|
||||||
|
XPAD_XBOX360_VENDOR(0x20d6), /* PowerA Controllers */
|
||||||
|
XPAD_XBOXONE_VENDOR(0x20d6), /* PowerA Controllers */
|
||||||
XPAD_XBOX360_VENDOR(0x24c6), /* PowerA Controllers */
|
XPAD_XBOX360_VENDOR(0x24c6), /* PowerA Controllers */
|
||||||
XPAD_XBOXONE_VENDOR(0x24c6), /* PowerA Controllers */
|
XPAD_XBOXONE_VENDOR(0x24c6), /* PowerA Controllers */
|
||||||
|
XPAD_XBOXONE_VENDOR(0x2e24), /* Hyperkin Duke X-Box One pad */
|
||||||
|
XPAD_XBOX360_VENDOR(0x2f24), /* GameSir Controllers */
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -219,6 +219,8 @@ static const struct dmi_system_id __initconst i8042_dmi_noloop_table[] = {
|
|||||||
DMI_MATCH(DMI_SYS_VENDOR, "PEGATRON CORPORATION"),
|
DMI_MATCH(DMI_SYS_VENDOR, "PEGATRON CORPORATION"),
|
||||||
DMI_MATCH(DMI_PRODUCT_NAME, "C15B"),
|
DMI_MATCH(DMI_PRODUCT_NAME, "C15B"),
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
.matches = {
|
.matches = {
|
||||||
DMI_MATCH(DMI_SYS_VENDOR, "ByteSpeed LLC"),
|
DMI_MATCH(DMI_SYS_VENDOR, "ByteSpeed LLC"),
|
||||||
DMI_MATCH(DMI_PRODUCT_NAME, "ByteSpeed Laptop C15B"),
|
DMI_MATCH(DMI_PRODUCT_NAME, "ByteSpeed Laptop C15B"),
|
||||||
|
@ -3285,6 +3285,12 @@ static int __init init_dmars(void)
|
|||||||
|
|
||||||
if (!ecap_pass_through(iommu->ecap))
|
if (!ecap_pass_through(iommu->ecap))
|
||||||
hw_pass_through = 0;
|
hw_pass_through = 0;
|
||||||
|
|
||||||
|
if (!intel_iommu_strict && cap_caching_mode(iommu->cap)) {
|
||||||
|
pr_info("Disable batched IOTLB flush due to virtualization");
|
||||||
|
intel_iommu_strict = 1;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_INTEL_IOMMU_SVM
|
#ifdef CONFIG_INTEL_IOMMU_SVM
|
||||||
if (pasid_supported(iommu))
|
if (pasid_supported(iommu))
|
||||||
intel_svm_init(iommu);
|
intel_svm_init(iommu);
|
||||||
|
@ -538,8 +538,10 @@ static void md_submit_flush_data(struct work_struct *ws)
|
|||||||
* could wait for this and below md_handle_request could wait for those
|
* could wait for this and below md_handle_request could wait for those
|
||||||
* bios because of suspend check
|
* bios because of suspend check
|
||||||
*/
|
*/
|
||||||
|
spin_lock_irq(&mddev->lock);
|
||||||
mddev->last_flush = mddev->start_flush;
|
mddev->last_flush = mddev->start_flush;
|
||||||
mddev->flush_bio = NULL;
|
mddev->flush_bio = NULL;
|
||||||
|
spin_unlock_irq(&mddev->lock);
|
||||||
wake_up(&mddev->sb_wait);
|
wake_up(&mddev->sb_wait);
|
||||||
|
|
||||||
if (bio->bi_iter.bi_size == 0) {
|
if (bio->bi_iter.bi_size == 0) {
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
#include "sdio_cis.h"
|
#include "sdio_cis.h"
|
||||||
#include "sdio_ops.h"
|
#include "sdio_ops.h"
|
||||||
|
|
||||||
|
#define SDIO_READ_CIS_TIMEOUT_MS (10 * 1000) /* 10s */
|
||||||
|
|
||||||
static int cistpl_vers_1(struct mmc_card *card, struct sdio_func *func,
|
static int cistpl_vers_1(struct mmc_card *card, struct sdio_func *func,
|
||||||
const unsigned char *buf, unsigned size)
|
const unsigned char *buf, unsigned size)
|
||||||
{
|
{
|
||||||
@ -266,6 +268,8 @@ static int sdio_read_cis(struct mmc_card *card, struct sdio_func *func)
|
|||||||
|
|
||||||
do {
|
do {
|
||||||
unsigned char tpl_code, tpl_link;
|
unsigned char tpl_code, tpl_link;
|
||||||
|
unsigned long timeout = jiffies +
|
||||||
|
msecs_to_jiffies(SDIO_READ_CIS_TIMEOUT_MS);
|
||||||
|
|
||||||
ret = mmc_io_rw_direct(card, 0, 0, ptr++, 0, &tpl_code);
|
ret = mmc_io_rw_direct(card, 0, 0, ptr++, 0, &tpl_code);
|
||||||
if (ret)
|
if (ret)
|
||||||
@ -318,6 +322,8 @@ static int sdio_read_cis(struct mmc_card *card, struct sdio_func *func)
|
|||||||
prev = &this->next;
|
prev = &this->next;
|
||||||
|
|
||||||
if (ret == -ENOENT) {
|
if (ret == -ENOENT) {
|
||||||
|
if (time_after(jiffies, timeout))
|
||||||
|
break;
|
||||||
/* warn about unknown tuples */
|
/* warn about unknown tuples */
|
||||||
pr_warn_ratelimited("%s: queuing unknown"
|
pr_warn_ratelimited("%s: queuing unknown"
|
||||||
" CIS tuple 0x%02x (%u bytes)\n",
|
" CIS tuple 0x%02x (%u bytes)\n",
|
||||||
|
@ -1517,7 +1517,11 @@ static int mv88e6xxx_port_db_load_purge(struct mv88e6xxx_chip *chip, int port,
|
|||||||
if (!entry.portvec)
|
if (!entry.portvec)
|
||||||
entry.state = 0;
|
entry.state = 0;
|
||||||
} else {
|
} else {
|
||||||
entry.portvec |= BIT(port);
|
if (state == MV88E6XXX_G1_ATU_DATA_STATE_UC_STATIC)
|
||||||
|
entry.portvec = BIT(port);
|
||||||
|
else
|
||||||
|
entry.portvec |= BIT(port);
|
||||||
|
|
||||||
entry.state = state;
|
entry.state = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,12 +55,7 @@ static void i40e_vc_notify_vf_link_state(struct i40e_vf *vf)
|
|||||||
|
|
||||||
pfe.event = VIRTCHNL_EVENT_LINK_CHANGE;
|
pfe.event = VIRTCHNL_EVENT_LINK_CHANGE;
|
||||||
pfe.severity = PF_EVENT_SEVERITY_INFO;
|
pfe.severity = PF_EVENT_SEVERITY_INFO;
|
||||||
|
if (vf->link_forced) {
|
||||||
/* Always report link is down if the VF queues aren't enabled */
|
|
||||||
if (!vf->queues_enabled) {
|
|
||||||
pfe.event_data.link_event.link_status = false;
|
|
||||||
pfe.event_data.link_event.link_speed = 0;
|
|
||||||
} else if (vf->link_forced) {
|
|
||||||
pfe.event_data.link_event.link_status = vf->link_up;
|
pfe.event_data.link_event.link_status = vf->link_up;
|
||||||
pfe.event_data.link_event.link_speed =
|
pfe.event_data.link_event.link_speed =
|
||||||
(vf->link_up ? VIRTCHNL_LINK_SPEED_40GB : 0);
|
(vf->link_up ? VIRTCHNL_LINK_SPEED_40GB : 0);
|
||||||
@ -70,7 +65,6 @@ static void i40e_vc_notify_vf_link_state(struct i40e_vf *vf)
|
|||||||
pfe.event_data.link_event.link_speed =
|
pfe.event_data.link_event.link_speed =
|
||||||
i40e_virtchnl_link_speed(ls->link_speed);
|
i40e_virtchnl_link_speed(ls->link_speed);
|
||||||
}
|
}
|
||||||
|
|
||||||
i40e_aq_send_msg_to_vf(hw, abs_vf_id, VIRTCHNL_OP_EVENT,
|
i40e_aq_send_msg_to_vf(hw, abs_vf_id, VIRTCHNL_OP_EVENT,
|
||||||
0, (u8 *)&pfe, sizeof(pfe), NULL);
|
0, (u8 *)&pfe, sizeof(pfe), NULL);
|
||||||
}
|
}
|
||||||
@ -2393,8 +2387,6 @@ static int i40e_vc_enable_queues_msg(struct i40e_vf *vf, u8 *msg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
vf->queues_enabled = true;
|
|
||||||
|
|
||||||
error_param:
|
error_param:
|
||||||
/* send the response to the VF */
|
/* send the response to the VF */
|
||||||
return i40e_vc_send_resp_to_vf(vf, VIRTCHNL_OP_ENABLE_QUEUES,
|
return i40e_vc_send_resp_to_vf(vf, VIRTCHNL_OP_ENABLE_QUEUES,
|
||||||
@ -2416,9 +2408,6 @@ static int i40e_vc_disable_queues_msg(struct i40e_vf *vf, u8 *msg)
|
|||||||
struct i40e_pf *pf = vf->pf;
|
struct i40e_pf *pf = vf->pf;
|
||||||
i40e_status aq_ret = 0;
|
i40e_status aq_ret = 0;
|
||||||
|
|
||||||
/* Immediately mark queues as disabled */
|
|
||||||
vf->queues_enabled = false;
|
|
||||||
|
|
||||||
if (!test_bit(I40E_VF_STATE_ACTIVE, &vf->vf_states)) {
|
if (!test_bit(I40E_VF_STATE_ACTIVE, &vf->vf_states)) {
|
||||||
aq_ret = I40E_ERR_PARAM;
|
aq_ret = I40E_ERR_PARAM;
|
||||||
goto error_param;
|
goto error_param;
|
||||||
|
@ -99,7 +99,6 @@ struct i40e_vf {
|
|||||||
unsigned int tx_rate; /* Tx bandwidth limit in Mbps */
|
unsigned int tx_rate; /* Tx bandwidth limit in Mbps */
|
||||||
bool link_forced;
|
bool link_forced;
|
||||||
bool link_up; /* only valid if VF link is forced */
|
bool link_up; /* only valid if VF link is forced */
|
||||||
bool queues_enabled; /* true if the VF queues are enabled */
|
|
||||||
bool spoofchk;
|
bool spoofchk;
|
||||||
u16 num_mac;
|
u16 num_mac;
|
||||||
u16 num_vlan;
|
u16 num_vlan;
|
||||||
|
@ -1709,7 +1709,8 @@ static int igc_get_link_ksettings(struct net_device *netdev,
|
|||||||
Asym_Pause);
|
Asym_Pause);
|
||||||
}
|
}
|
||||||
|
|
||||||
status = rd32(IGC_STATUS);
|
status = pm_runtime_suspended(&adapter->pdev->dev) ?
|
||||||
|
0 : rd32(IGC_STATUS);
|
||||||
|
|
||||||
if (status & IGC_STATUS_LU) {
|
if (status & IGC_STATUS_LU) {
|
||||||
if (status & IGC_STATUS_SPEED_1000) {
|
if (status & IGC_STATUS_SPEED_1000) {
|
||||||
|
@ -219,9 +219,9 @@ static s32 igc_write_nvm_srwr(struct igc_hw *hw, u16 offset, u16 words,
|
|||||||
u16 *data)
|
u16 *data)
|
||||||
{
|
{
|
||||||
struct igc_nvm_info *nvm = &hw->nvm;
|
struct igc_nvm_info *nvm = &hw->nvm;
|
||||||
|
s32 ret_val = -IGC_ERR_NVM;
|
||||||
u32 attempts = 100000;
|
u32 attempts = 100000;
|
||||||
u32 i, k, eewr = 0;
|
u32 i, k, eewr = 0;
|
||||||
s32 ret_val = 0;
|
|
||||||
|
|
||||||
/* A check for invalid values: offset too large, too many words,
|
/* A check for invalid values: offset too large, too many words,
|
||||||
* too many words for the offset, and not enough words.
|
* too many words for the offset, and not enough words.
|
||||||
@ -229,7 +229,6 @@ static s32 igc_write_nvm_srwr(struct igc_hw *hw, u16 offset, u16 words,
|
|||||||
if (offset >= nvm->word_size || (words > (nvm->word_size - offset)) ||
|
if (offset >= nvm->word_size || (words > (nvm->word_size - offset)) ||
|
||||||
words == 0) {
|
words == 0) {
|
||||||
hw_dbg("nvm parameter(s) out of bounds\n");
|
hw_dbg("nvm parameter(s) out of bounds\n");
|
||||||
ret_val = -IGC_ERR_NVM;
|
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -647,7 +647,7 @@ s32 igc_config_fc_after_link_up(struct igc_hw *hw)
|
|||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
return 0;
|
return ret_val;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -29,16 +29,16 @@ static int mvpp2_prs_hw_write(struct mvpp2 *priv, struct mvpp2_prs_entry *pe)
|
|||||||
/* Clear entry invalidation bit */
|
/* Clear entry invalidation bit */
|
||||||
pe->tcam[MVPP2_PRS_TCAM_INV_WORD] &= ~MVPP2_PRS_TCAM_INV_MASK;
|
pe->tcam[MVPP2_PRS_TCAM_INV_WORD] &= ~MVPP2_PRS_TCAM_INV_MASK;
|
||||||
|
|
||||||
/* Write tcam index - indirect access */
|
|
||||||
mvpp2_write(priv, MVPP2_PRS_TCAM_IDX_REG, pe->index);
|
|
||||||
for (i = 0; i < MVPP2_PRS_TCAM_WORDS; i++)
|
|
||||||
mvpp2_write(priv, MVPP2_PRS_TCAM_DATA_REG(i), pe->tcam[i]);
|
|
||||||
|
|
||||||
/* Write sram index - indirect access */
|
/* Write sram index - indirect access */
|
||||||
mvpp2_write(priv, MVPP2_PRS_SRAM_IDX_REG, pe->index);
|
mvpp2_write(priv, MVPP2_PRS_SRAM_IDX_REG, pe->index);
|
||||||
for (i = 0; i < MVPP2_PRS_SRAM_WORDS; i++)
|
for (i = 0; i < MVPP2_PRS_SRAM_WORDS; i++)
|
||||||
mvpp2_write(priv, MVPP2_PRS_SRAM_DATA_REG(i), pe->sram[i]);
|
mvpp2_write(priv, MVPP2_PRS_SRAM_DATA_REG(i), pe->sram[i]);
|
||||||
|
|
||||||
|
/* Write tcam index - indirect access */
|
||||||
|
mvpp2_write(priv, MVPP2_PRS_TCAM_IDX_REG, pe->index);
|
||||||
|
for (i = 0; i < MVPP2_PRS_TCAM_WORDS; i++)
|
||||||
|
mvpp2_write(priv, MVPP2_PRS_TCAM_DATA_REG(i), pe->tcam[i]);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1697,6 +1697,7 @@ try_add_to_existing_fg(struct mlx5_flow_table *ft,
|
|||||||
if (!fte_tmp)
|
if (!fte_tmp)
|
||||||
continue;
|
continue;
|
||||||
rule = add_rule_fg(g, spec, flow_act, dest, dest_num, fte_tmp);
|
rule = add_rule_fg(g, spec, flow_act, dest, dest_num, fte_tmp);
|
||||||
|
/* No error check needed here, because insert_fte() is not called */
|
||||||
up_write_ref_node(&fte_tmp->node, false);
|
up_write_ref_node(&fte_tmp->node, false);
|
||||||
tree_put_node(&fte_tmp->node, false);
|
tree_put_node(&fte_tmp->node, false);
|
||||||
kmem_cache_free(steering->ftes_cache, fte);
|
kmem_cache_free(steering->ftes_cache, fte);
|
||||||
@ -1745,6 +1746,8 @@ try_add_to_existing_fg(struct mlx5_flow_table *ft,
|
|||||||
up_write_ref_node(&g->node, false);
|
up_write_ref_node(&g->node, false);
|
||||||
rule = add_rule_fg(g, spec, flow_act, dest, dest_num, fte);
|
rule = add_rule_fg(g, spec, flow_act, dest, dest_num, fte);
|
||||||
up_write_ref_node(&fte->node, false);
|
up_write_ref_node(&fte->node, false);
|
||||||
|
if (IS_ERR(rule))
|
||||||
|
tree_put_node(&fte->node, false);
|
||||||
return rule;
|
return rule;
|
||||||
}
|
}
|
||||||
rule = ERR_PTR(-ENOENT);
|
rule = ERR_PTR(-ENOENT);
|
||||||
@ -1844,6 +1847,8 @@ _mlx5_add_flow_rules(struct mlx5_flow_table *ft,
|
|||||||
up_write_ref_node(&g->node, false);
|
up_write_ref_node(&g->node, false);
|
||||||
rule = add_rule_fg(g, spec, flow_act, dest, dest_num, fte);
|
rule = add_rule_fg(g, spec, flow_act, dest, dest_num, fte);
|
||||||
up_write_ref_node(&fte->node, false);
|
up_write_ref_node(&fte->node, false);
|
||||||
|
if (IS_ERR(rule))
|
||||||
|
tree_put_node(&fte->node, false);
|
||||||
tree_put_node(&g->node, false);
|
tree_put_node(&g->node, false);
|
||||||
return rule;
|
return rule;
|
||||||
|
|
||||||
|
@ -6419,10 +6419,10 @@ static int rtl8169_close(struct net_device *dev)
|
|||||||
|
|
||||||
cancel_work_sync(&tp->wk.work);
|
cancel_work_sync(&tp->wk.work);
|
||||||
|
|
||||||
phy_disconnect(tp->phydev);
|
|
||||||
|
|
||||||
free_irq(pci_irq_vector(pdev, 0), tp);
|
free_irq(pci_irq_vector(pdev, 0), tp);
|
||||||
|
|
||||||
|
phy_disconnect(tp->phydev);
|
||||||
|
|
||||||
dma_free_coherent(&pdev->dev, R8169_RX_RING_BYTES, tp->RxDescArray,
|
dma_free_coherent(&pdev->dev, R8169_RX_RING_BYTES, tp->RxDescArray,
|
||||||
tp->RxPhyAddr);
|
tp->RxPhyAddr);
|
||||||
dma_free_coherent(&pdev->dev, R8169_TX_RING_BYTES, tp->TxDescArray,
|
dma_free_coherent(&pdev->dev, R8169_TX_RING_BYTES, tp->TxDescArray,
|
||||||
|
@ -134,7 +134,14 @@ static int iwl_configure_rxq(struct iwl_mvm *mvm)
|
|||||||
.dataflags[0] = IWL_HCMD_DFL_NOCOPY,
|
.dataflags[0] = IWL_HCMD_DFL_NOCOPY,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Do not configure default queue, it is configured via context info */
|
/*
|
||||||
|
* The default queue is configured via context info, so if we
|
||||||
|
* have a single queue, there's nothing to do here.
|
||||||
|
*/
|
||||||
|
if (mvm->trans->num_rx_queues == 1)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
/* skip the default queue */
|
||||||
num_queues = mvm->trans->num_rx_queues - 1;
|
num_queues = mvm->trans->num_rx_queues - 1;
|
||||||
|
|
||||||
size = struct_size(cmd, data, num_queues);
|
size = struct_size(cmd, data, num_queues);
|
||||||
|
@ -344,16 +344,16 @@ static ssize_t state_show(struct device *dev, struct device_attribute *attr,
|
|||||||
}
|
}
|
||||||
static DEVICE_ATTR_RO(state);
|
static DEVICE_ATTR_RO(state);
|
||||||
|
|
||||||
static ssize_t available_slots_show(struct device *dev,
|
static ssize_t __available_slots_show(struct nvdimm_drvdata *ndd, char *buf)
|
||||||
struct device_attribute *attr, char *buf)
|
|
||||||
{
|
{
|
||||||
struct nvdimm_drvdata *ndd = dev_get_drvdata(dev);
|
struct device *dev;
|
||||||
ssize_t rc;
|
ssize_t rc;
|
||||||
u32 nfree;
|
u32 nfree;
|
||||||
|
|
||||||
if (!ndd)
|
if (!ndd)
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
|
|
||||||
|
dev = ndd->dev;
|
||||||
nvdimm_bus_lock(dev);
|
nvdimm_bus_lock(dev);
|
||||||
nfree = nd_label_nfree(ndd);
|
nfree = nd_label_nfree(ndd);
|
||||||
if (nfree - 1 > nfree) {
|
if (nfree - 1 > nfree) {
|
||||||
@ -365,6 +365,18 @@ static ssize_t available_slots_show(struct device *dev,
|
|||||||
nvdimm_bus_unlock(dev);
|
nvdimm_bus_unlock(dev);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static ssize_t available_slots_show(struct device *dev,
|
||||||
|
struct device_attribute *attr, char *buf)
|
||||||
|
{
|
||||||
|
ssize_t rc;
|
||||||
|
|
||||||
|
nd_device_lock(dev);
|
||||||
|
rc = __available_slots_show(dev_get_drvdata(dev), buf);
|
||||||
|
nd_device_unlock(dev);
|
||||||
|
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
static DEVICE_ATTR_RO(available_slots);
|
static DEVICE_ATTR_RO(available_slots);
|
||||||
|
|
||||||
__weak ssize_t security_show(struct device *dev,
|
__weak ssize_t security_show(struct device *dev,
|
||||||
|
@ -3161,6 +3161,8 @@ static const struct pci_device_id nvme_id_table[] = {
|
|||||||
{ PCI_DEVICE(0x1c5c, 0x1504), /* SK Hynix PC400 */
|
{ PCI_DEVICE(0x1c5c, 0x1504), /* SK Hynix PC400 */
|
||||||
.driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
|
.driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
|
||||||
{ PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_EXPRESS, 0xffffff) },
|
{ PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_EXPRESS, 0xffffff) },
|
||||||
|
{ PCI_DEVICE(0x2646, 0x2263), /* KINGSTON A2000 NVMe SSD */
|
||||||
|
.driver_data = NVME_QUIRK_NO_DEEPEST_PS, },
|
||||||
{ PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2001),
|
{ PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2001),
|
||||||
.driver_data = NVME_QUIRK_SINGLE_VECTOR },
|
.driver_data = NVME_QUIRK_SINGLE_VECTOR },
|
||||||
{ PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2003) },
|
{ PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2003) },
|
||||||
|
@ -292,7 +292,7 @@ static void nvmet_tcp_map_pdu_iovec(struct nvmet_tcp_cmd *cmd)
|
|||||||
length = cmd->pdu_len;
|
length = cmd->pdu_len;
|
||||||
cmd->nr_mapped = DIV_ROUND_UP(length, PAGE_SIZE);
|
cmd->nr_mapped = DIV_ROUND_UP(length, PAGE_SIZE);
|
||||||
offset = cmd->rbytes_done;
|
offset = cmd->rbytes_done;
|
||||||
cmd->sg_idx = DIV_ROUND_UP(offset, PAGE_SIZE);
|
cmd->sg_idx = offset / PAGE_SIZE;
|
||||||
sg_offset = offset % PAGE_SIZE;
|
sg_offset = offset % PAGE_SIZE;
|
||||||
sg = &cmd->req.sg[cmd->sg_idx];
|
sg = &cmd->req.sg[cmd->sg_idx];
|
||||||
|
|
||||||
@ -305,6 +305,7 @@ static void nvmet_tcp_map_pdu_iovec(struct nvmet_tcp_cmd *cmd)
|
|||||||
length -= iov_len;
|
length -= iov_len;
|
||||||
sg = sg_next(sg);
|
sg = sg_next(sg);
|
||||||
iov++;
|
iov++;
|
||||||
|
sg_offset = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
iov_iter_kvec(&cmd->recv_msg.msg_iter, READ, cmd->iov,
|
iov_iter_kvec(&cmd->recv_msg.msg_iter, READ, cmd->iov,
|
||||||
|
@ -1329,14 +1329,17 @@ static int usblp_set_protocol(struct usblp *usblp, int protocol)
|
|||||||
if (protocol < USBLP_FIRST_PROTOCOL || protocol > USBLP_LAST_PROTOCOL)
|
if (protocol < USBLP_FIRST_PROTOCOL || protocol > USBLP_LAST_PROTOCOL)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
alts = usblp->protocol[protocol].alt_setting;
|
/* Don't unnecessarily set the interface if there's a single alt. */
|
||||||
if (alts < 0)
|
if (usblp->intf->num_altsetting > 1) {
|
||||||
return -EINVAL;
|
alts = usblp->protocol[protocol].alt_setting;
|
||||||
r = usb_set_interface(usblp->dev, usblp->ifnum, alts);
|
if (alts < 0)
|
||||||
if (r < 0) {
|
return -EINVAL;
|
||||||
printk(KERN_ERR "usblp: can't set desired altsetting %d on interface %d\n",
|
r = usb_set_interface(usblp->dev, usblp->ifnum, alts);
|
||||||
alts, usblp->ifnum);
|
if (r < 0) {
|
||||||
return r;
|
printk(KERN_ERR "usblp: can't set desired altsetting %d on interface %d\n",
|
||||||
|
alts, usblp->ifnum);
|
||||||
|
return r;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
usblp->bidir = (usblp->protocol[protocol].epread != NULL);
|
usblp->bidir = (usblp->protocol[protocol].epread != NULL);
|
||||||
|
@ -1543,7 +1543,6 @@ static void dwc2_hsotg_complete_oursetup(struct usb_ep *ep,
|
|||||||
static struct dwc2_hsotg_ep *ep_from_windex(struct dwc2_hsotg *hsotg,
|
static struct dwc2_hsotg_ep *ep_from_windex(struct dwc2_hsotg *hsotg,
|
||||||
u32 windex)
|
u32 windex)
|
||||||
{
|
{
|
||||||
struct dwc2_hsotg_ep *ep;
|
|
||||||
int dir = (windex & USB_DIR_IN) ? 1 : 0;
|
int dir = (windex & USB_DIR_IN) ? 1 : 0;
|
||||||
int idx = windex & 0x7F;
|
int idx = windex & 0x7F;
|
||||||
|
|
||||||
@ -1553,12 +1552,7 @@ static struct dwc2_hsotg_ep *ep_from_windex(struct dwc2_hsotg *hsotg,
|
|||||||
if (idx > hsotg->num_of_eps)
|
if (idx > hsotg->num_of_eps)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
ep = index_to_ep(hsotg, idx, dir);
|
return index_to_ep(hsotg, idx, dir);
|
||||||
|
|
||||||
if (idx && ep->dir_in != dir)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
return ep;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1708,7 +1708,7 @@ static int dwc3_resume_common(struct dwc3 *dwc, pm_message_t msg)
|
|||||||
if (PMSG_IS_AUTO(msg))
|
if (PMSG_IS_AUTO(msg))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
ret = dwc3_core_init(dwc);
|
ret = dwc3_core_init_for_resume(dwc);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
@ -403,8 +403,10 @@ static int eth_bind(struct usb_composite_dev *cdev)
|
|||||||
struct usb_descriptor_header *usb_desc;
|
struct usb_descriptor_header *usb_desc;
|
||||||
|
|
||||||
usb_desc = usb_otg_descriptor_alloc(gadget);
|
usb_desc = usb_otg_descriptor_alloc(gadget);
|
||||||
if (!usb_desc)
|
if (!usb_desc) {
|
||||||
|
status = -ENOMEM;
|
||||||
goto fail1;
|
goto fail1;
|
||||||
|
}
|
||||||
usb_otg_descriptor_init(gadget, usb_desc);
|
usb_otg_descriptor_init(gadget, usb_desc);
|
||||||
otg_desc[0] = usb_desc;
|
otg_desc[0] = usb_desc;
|
||||||
otg_desc[1] = NULL;
|
otg_desc[1] = NULL;
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#include <linux/mbus.h>
|
#include <linux/mbus.h>
|
||||||
#include <linux/of.h>
|
#include <linux/of.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
|
#include <linux/phy/phy.h>
|
||||||
|
|
||||||
#include <linux/usb.h>
|
#include <linux/usb.h>
|
||||||
#include <linux/usb/hcd.h>
|
#include <linux/usb/hcd.h>
|
||||||
@ -74,6 +75,47 @@ int xhci_mvebu_mbus_init_quirk(struct usb_hcd *hcd)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int xhci_mvebu_a3700_plat_setup(struct usb_hcd *hcd)
|
||||||
|
{
|
||||||
|
struct xhci_hcd *xhci = hcd_to_xhci(hcd);
|
||||||
|
struct device *dev = hcd->self.controller;
|
||||||
|
struct phy *phy;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
/* Old bindings miss the PHY handle */
|
||||||
|
phy = of_phy_get(dev->of_node, "usb3-phy");
|
||||||
|
if (IS_ERR(phy) && PTR_ERR(phy) == -EPROBE_DEFER)
|
||||||
|
return -EPROBE_DEFER;
|
||||||
|
else if (IS_ERR(phy))
|
||||||
|
goto phy_out;
|
||||||
|
|
||||||
|
ret = phy_init(phy);
|
||||||
|
if (ret)
|
||||||
|
goto phy_put;
|
||||||
|
|
||||||
|
ret = phy_set_mode(phy, PHY_MODE_USB_HOST_SS);
|
||||||
|
if (ret)
|
||||||
|
goto phy_exit;
|
||||||
|
|
||||||
|
ret = phy_power_on(phy);
|
||||||
|
if (ret == -EOPNOTSUPP) {
|
||||||
|
/* Skip initializatin of XHCI PHY when it is unsupported by firmware */
|
||||||
|
dev_warn(dev, "PHY unsupported by firmware\n");
|
||||||
|
xhci->quirks |= XHCI_SKIP_PHY_INIT;
|
||||||
|
}
|
||||||
|
if (ret)
|
||||||
|
goto phy_exit;
|
||||||
|
|
||||||
|
phy_power_off(phy);
|
||||||
|
phy_exit:
|
||||||
|
phy_exit(phy);
|
||||||
|
phy_put:
|
||||||
|
phy_put(phy);
|
||||||
|
phy_out:
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int xhci_mvebu_a3700_init_quirk(struct usb_hcd *hcd)
|
int xhci_mvebu_a3700_init_quirk(struct usb_hcd *hcd)
|
||||||
{
|
{
|
||||||
struct xhci_hcd *xhci = hcd_to_xhci(hcd);
|
struct xhci_hcd *xhci = hcd_to_xhci(hcd);
|
||||||
|
@ -12,6 +12,7 @@ struct usb_hcd;
|
|||||||
|
|
||||||
#if IS_ENABLED(CONFIG_USB_XHCI_MVEBU)
|
#if IS_ENABLED(CONFIG_USB_XHCI_MVEBU)
|
||||||
int xhci_mvebu_mbus_init_quirk(struct usb_hcd *hcd);
|
int xhci_mvebu_mbus_init_quirk(struct usb_hcd *hcd);
|
||||||
|
int xhci_mvebu_a3700_plat_setup(struct usb_hcd *hcd);
|
||||||
int xhci_mvebu_a3700_init_quirk(struct usb_hcd *hcd);
|
int xhci_mvebu_a3700_init_quirk(struct usb_hcd *hcd);
|
||||||
#else
|
#else
|
||||||
static inline int xhci_mvebu_mbus_init_quirk(struct usb_hcd *hcd)
|
static inline int xhci_mvebu_mbus_init_quirk(struct usb_hcd *hcd)
|
||||||
@ -19,6 +20,11 @@ static inline int xhci_mvebu_mbus_init_quirk(struct usb_hcd *hcd)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int xhci_mvebu_a3700_plat_setup(struct usb_hcd *hcd)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static inline int xhci_mvebu_a3700_init_quirk(struct usb_hcd *hcd)
|
static inline int xhci_mvebu_a3700_init_quirk(struct usb_hcd *hcd)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -44,6 +44,16 @@ static void xhci_priv_plat_start(struct usb_hcd *hcd)
|
|||||||
priv->plat_start(hcd);
|
priv->plat_start(hcd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int xhci_priv_plat_setup(struct usb_hcd *hcd)
|
||||||
|
{
|
||||||
|
struct xhci_plat_priv *priv = hcd_to_xhci_priv(hcd);
|
||||||
|
|
||||||
|
if (!priv->plat_setup)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return priv->plat_setup(hcd);
|
||||||
|
}
|
||||||
|
|
||||||
static int xhci_priv_init_quirk(struct usb_hcd *hcd)
|
static int xhci_priv_init_quirk(struct usb_hcd *hcd)
|
||||||
{
|
{
|
||||||
struct xhci_plat_priv *priv = hcd_to_xhci_priv(hcd);
|
struct xhci_plat_priv *priv = hcd_to_xhci_priv(hcd);
|
||||||
@ -101,6 +111,7 @@ static const struct xhci_plat_priv xhci_plat_marvell_armada = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const struct xhci_plat_priv xhci_plat_marvell_armada3700 = {
|
static const struct xhci_plat_priv xhci_plat_marvell_armada3700 = {
|
||||||
|
.plat_setup = xhci_mvebu_a3700_plat_setup,
|
||||||
.init_quirk = xhci_mvebu_a3700_init_quirk,
|
.init_quirk = xhci_mvebu_a3700_init_quirk,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -163,6 +174,8 @@ static int xhci_plat_probe(struct platform_device *pdev)
|
|||||||
struct usb_hcd *hcd;
|
struct usb_hcd *hcd;
|
||||||
int ret;
|
int ret;
|
||||||
int irq;
|
int irq;
|
||||||
|
struct xhci_plat_priv *priv = NULL;
|
||||||
|
|
||||||
|
|
||||||
if (usb_disabled())
|
if (usb_disabled())
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
@ -257,8 +270,7 @@ static int xhci_plat_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
priv_match = of_device_get_match_data(&pdev->dev);
|
priv_match = of_device_get_match_data(&pdev->dev);
|
||||||
if (priv_match) {
|
if (priv_match) {
|
||||||
struct xhci_plat_priv *priv = hcd_to_xhci_priv(hcd);
|
priv = hcd_to_xhci_priv(hcd);
|
||||||
|
|
||||||
/* Just copy data for now */
|
/* Just copy data for now */
|
||||||
if (priv_match)
|
if (priv_match)
|
||||||
*priv = *priv_match;
|
*priv = *priv_match;
|
||||||
@ -307,6 +319,16 @@ static int xhci_plat_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
hcd->tpl_support = of_usb_host_tpl_support(sysdev->of_node);
|
hcd->tpl_support = of_usb_host_tpl_support(sysdev->of_node);
|
||||||
xhci->shared_hcd->tpl_support = hcd->tpl_support;
|
xhci->shared_hcd->tpl_support = hcd->tpl_support;
|
||||||
|
|
||||||
|
if (priv) {
|
||||||
|
ret = xhci_priv_plat_setup(hcd);
|
||||||
|
if (ret)
|
||||||
|
goto disable_usb_phy;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((xhci->quirks & XHCI_SKIP_PHY_INIT) || (priv && (priv->quirks & XHCI_SKIP_PHY_INIT)))
|
||||||
|
hcd->skip_phy_initialization = 1;
|
||||||
|
|
||||||
ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
|
ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto disable_usb_phy;
|
goto disable_usb_phy;
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
struct xhci_plat_priv {
|
struct xhci_plat_priv {
|
||||||
const char *firmware_name;
|
const char *firmware_name;
|
||||||
unsigned long long quirks;
|
unsigned long long quirks;
|
||||||
|
int (*plat_setup)(struct usb_hcd *);
|
||||||
void (*plat_start)(struct usb_hcd *);
|
void (*plat_start)(struct usb_hcd *);
|
||||||
int (*init_quirk)(struct usb_hcd *);
|
int (*init_quirk)(struct usb_hcd *);
|
||||||
int (*resume_quirk)(struct usb_hcd *);
|
int (*resume_quirk)(struct usb_hcd *);
|
||||||
|
@ -695,11 +695,16 @@ static void xhci_unmap_td_bounce_buffer(struct xhci_hcd *xhci,
|
|||||||
dma_unmap_single(dev, seg->bounce_dma, ring->bounce_buf_len,
|
dma_unmap_single(dev, seg->bounce_dma, ring->bounce_buf_len,
|
||||||
DMA_FROM_DEVICE);
|
DMA_FROM_DEVICE);
|
||||||
/* for in tranfers we need to copy the data from bounce to sg */
|
/* for in tranfers we need to copy the data from bounce to sg */
|
||||||
len = sg_pcopy_from_buffer(urb->sg, urb->num_sgs, seg->bounce_buf,
|
if (urb->num_sgs) {
|
||||||
seg->bounce_len, seg->bounce_offs);
|
len = sg_pcopy_from_buffer(urb->sg, urb->num_sgs, seg->bounce_buf,
|
||||||
if (len != seg->bounce_len)
|
seg->bounce_len, seg->bounce_offs);
|
||||||
xhci_warn(xhci, "WARN Wrong bounce buffer read length: %zu != %d\n",
|
if (len != seg->bounce_len)
|
||||||
len, seg->bounce_len);
|
xhci_warn(xhci, "WARN Wrong bounce buffer read length: %zu != %d\n",
|
||||||
|
len, seg->bounce_len);
|
||||||
|
} else {
|
||||||
|
memcpy(urb->transfer_buffer + seg->bounce_offs, seg->bounce_buf,
|
||||||
|
seg->bounce_len);
|
||||||
|
}
|
||||||
seg->bounce_len = 0;
|
seg->bounce_len = 0;
|
||||||
seg->bounce_offs = 0;
|
seg->bounce_offs = 0;
|
||||||
}
|
}
|
||||||
@ -3263,12 +3268,16 @@ static int xhci_align_td(struct xhci_hcd *xhci, struct urb *urb, u32 enqd_len,
|
|||||||
|
|
||||||
/* create a max max_pkt sized bounce buffer pointed to by last trb */
|
/* create a max max_pkt sized bounce buffer pointed to by last trb */
|
||||||
if (usb_urb_dir_out(urb)) {
|
if (usb_urb_dir_out(urb)) {
|
||||||
len = sg_pcopy_to_buffer(urb->sg, urb->num_sgs,
|
if (urb->num_sgs) {
|
||||||
seg->bounce_buf, new_buff_len, enqd_len);
|
len = sg_pcopy_to_buffer(urb->sg, urb->num_sgs,
|
||||||
if (len != new_buff_len)
|
seg->bounce_buf, new_buff_len, enqd_len);
|
||||||
xhci_warn(xhci,
|
if (len != new_buff_len)
|
||||||
"WARN Wrong bounce buffer write length: %zu != %d\n",
|
xhci_warn(xhci, "WARN Wrong bounce buffer write length: %zu != %d\n",
|
||||||
len, new_buff_len);
|
len, new_buff_len);
|
||||||
|
} else {
|
||||||
|
memcpy(seg->bounce_buf, urb->transfer_buffer + enqd_len, new_buff_len);
|
||||||
|
}
|
||||||
|
|
||||||
seg->bounce_dma = dma_map_single(dev, seg->bounce_buf,
|
seg->bounce_dma = dma_map_single(dev, seg->bounce_buf,
|
||||||
max_pkt, DMA_TO_DEVICE);
|
max_pkt, DMA_TO_DEVICE);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1873,6 +1873,7 @@ struct xhci_hcd {
|
|||||||
#define XHCI_DEFAULT_PM_RUNTIME_ALLOW BIT_ULL(33)
|
#define XHCI_DEFAULT_PM_RUNTIME_ALLOW BIT_ULL(33)
|
||||||
#define XHCI_RESET_PLL_ON_DISCONNECT BIT_ULL(34)
|
#define XHCI_RESET_PLL_ON_DISCONNECT BIT_ULL(34)
|
||||||
#define XHCI_SNPS_BROKEN_SUSPEND BIT_ULL(35)
|
#define XHCI_SNPS_BROKEN_SUSPEND BIT_ULL(35)
|
||||||
|
#define XHCI_SKIP_PHY_INIT BIT_ULL(37)
|
||||||
#define XHCI_DISABLE_SPARSE BIT_ULL(38)
|
#define XHCI_DISABLE_SPARSE BIT_ULL(38)
|
||||||
|
|
||||||
unsigned int num_active_eps;
|
unsigned int num_active_eps;
|
||||||
|
@ -126,6 +126,7 @@ struct usbhs_pkt *usbhs_pkt_pop(struct usbhs_pipe *pipe, struct usbhs_pkt *pkt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
usbhs_pipe_clear_without_sequence(pipe, 0, 0);
|
usbhs_pipe_clear_without_sequence(pipe, 0, 0);
|
||||||
|
usbhs_pipe_running(pipe, 0);
|
||||||
|
|
||||||
__usbhsf_pkt_del(pkt);
|
__usbhsf_pkt_del(pkt);
|
||||||
}
|
}
|
||||||
|
@ -61,6 +61,7 @@ static const struct usb_device_id id_table[] = {
|
|||||||
{ USB_DEVICE(0x08e6, 0x5501) }, /* Gemalto Prox-PU/CU contactless smartcard reader */
|
{ USB_DEVICE(0x08e6, 0x5501) }, /* Gemalto Prox-PU/CU contactless smartcard reader */
|
||||||
{ USB_DEVICE(0x08FD, 0x000A) }, /* Digianswer A/S , ZigBee/802.15.4 MAC Device */
|
{ USB_DEVICE(0x08FD, 0x000A) }, /* Digianswer A/S , ZigBee/802.15.4 MAC Device */
|
||||||
{ USB_DEVICE(0x0908, 0x01FF) }, /* Siemens RUGGEDCOM USB Serial Console */
|
{ USB_DEVICE(0x0908, 0x01FF) }, /* Siemens RUGGEDCOM USB Serial Console */
|
||||||
|
{ USB_DEVICE(0x0988, 0x0578) }, /* Teraoka AD2000 */
|
||||||
{ USB_DEVICE(0x0B00, 0x3070) }, /* Ingenico 3070 */
|
{ USB_DEVICE(0x0B00, 0x3070) }, /* Ingenico 3070 */
|
||||||
{ USB_DEVICE(0x0BED, 0x1100) }, /* MEI (TM) Cashflow-SC Bill/Voucher Acceptor */
|
{ USB_DEVICE(0x0BED, 0x1100) }, /* MEI (TM) Cashflow-SC Bill/Voucher Acceptor */
|
||||||
{ USB_DEVICE(0x0BED, 0x1101) }, /* MEI series 2000 Combo Acceptor */
|
{ USB_DEVICE(0x0BED, 0x1101) }, /* MEI series 2000 Combo Acceptor */
|
||||||
@ -201,6 +202,7 @@ static const struct usb_device_id id_table[] = {
|
|||||||
{ USB_DEVICE(0x1901, 0x0194) }, /* GE Healthcare Remote Alarm Box */
|
{ USB_DEVICE(0x1901, 0x0194) }, /* GE Healthcare Remote Alarm Box */
|
||||||
{ USB_DEVICE(0x1901, 0x0195) }, /* GE B850/B650/B450 CP2104 DP UART interface */
|
{ USB_DEVICE(0x1901, 0x0195) }, /* GE B850/B650/B450 CP2104 DP UART interface */
|
||||||
{ USB_DEVICE(0x1901, 0x0196) }, /* GE B850 CP2105 DP UART interface */
|
{ USB_DEVICE(0x1901, 0x0196) }, /* GE B850 CP2105 DP UART interface */
|
||||||
|
{ USB_DEVICE(0x199B, 0xBA30) }, /* LORD WSDA-200-USB */
|
||||||
{ USB_DEVICE(0x19CF, 0x3000) }, /* Parrot NMEA GPS Flight Recorder */
|
{ USB_DEVICE(0x19CF, 0x3000) }, /* Parrot NMEA GPS Flight Recorder */
|
||||||
{ USB_DEVICE(0x1ADB, 0x0001) }, /* Schweitzer Engineering C662 Cable */
|
{ USB_DEVICE(0x1ADB, 0x0001) }, /* Schweitzer Engineering C662 Cable */
|
||||||
{ USB_DEVICE(0x1B1C, 0x1C00) }, /* Corsair USB Dongle */
|
{ USB_DEVICE(0x1B1C, 0x1C00) }, /* Corsair USB Dongle */
|
||||||
|
@ -425,6 +425,8 @@ static void option_instat_callback(struct urb *urb);
|
|||||||
#define CINTERION_PRODUCT_AHXX_2RMNET 0x0084
|
#define CINTERION_PRODUCT_AHXX_2RMNET 0x0084
|
||||||
#define CINTERION_PRODUCT_AHXX_AUDIO 0x0085
|
#define CINTERION_PRODUCT_AHXX_AUDIO 0x0085
|
||||||
#define CINTERION_PRODUCT_CLS8 0x00b0
|
#define CINTERION_PRODUCT_CLS8 0x00b0
|
||||||
|
#define CINTERION_PRODUCT_MV31_MBIM 0x00b3
|
||||||
|
#define CINTERION_PRODUCT_MV31_RMNET 0x00b7
|
||||||
|
|
||||||
/* Olivetti products */
|
/* Olivetti products */
|
||||||
#define OLIVETTI_VENDOR_ID 0x0b3c
|
#define OLIVETTI_VENDOR_ID 0x0b3c
|
||||||
@ -1914,6 +1916,10 @@ static const struct usb_device_id option_ids[] = {
|
|||||||
{ USB_DEVICE(SIEMENS_VENDOR_ID, CINTERION_PRODUCT_HC25_MDMNET) },
|
{ USB_DEVICE(SIEMENS_VENDOR_ID, CINTERION_PRODUCT_HC25_MDMNET) },
|
||||||
{ USB_DEVICE(SIEMENS_VENDOR_ID, CINTERION_PRODUCT_HC28_MDM) }, /* HC28 enumerates with Siemens or Cinterion VID depending on FW revision */
|
{ USB_DEVICE(SIEMENS_VENDOR_ID, CINTERION_PRODUCT_HC28_MDM) }, /* HC28 enumerates with Siemens or Cinterion VID depending on FW revision */
|
||||||
{ USB_DEVICE(SIEMENS_VENDOR_ID, CINTERION_PRODUCT_HC28_MDMNET) },
|
{ USB_DEVICE(SIEMENS_VENDOR_ID, CINTERION_PRODUCT_HC28_MDMNET) },
|
||||||
|
{ USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_MV31_MBIM, 0xff),
|
||||||
|
.driver_info = RSVD(3)},
|
||||||
|
{ USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_MV31_RMNET, 0xff),
|
||||||
|
.driver_info = RSVD(0)},
|
||||||
{ USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100),
|
{ USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100),
|
||||||
.driver_info = RSVD(4) },
|
.driver_info = RSVD(4) },
|
||||||
{ USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD120),
|
{ USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD120),
|
||||||
|
@ -186,7 +186,7 @@ static int __init afs_init(void)
|
|||||||
goto error_cache;
|
goto error_cache;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ret = register_pernet_subsys(&afs_net_ops);
|
ret = register_pernet_device(&afs_net_ops);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto error_net;
|
goto error_net;
|
||||||
|
|
||||||
@ -206,7 +206,7 @@ static int __init afs_init(void)
|
|||||||
error_proc:
|
error_proc:
|
||||||
afs_fs_exit();
|
afs_fs_exit();
|
||||||
error_fs:
|
error_fs:
|
||||||
unregister_pernet_subsys(&afs_net_ops);
|
unregister_pernet_device(&afs_net_ops);
|
||||||
error_net:
|
error_net:
|
||||||
#ifdef CONFIG_AFS_FSCACHE
|
#ifdef CONFIG_AFS_FSCACHE
|
||||||
fscache_unregister_netfs(&afs_cache_netfs);
|
fscache_unregister_netfs(&afs_cache_netfs);
|
||||||
@ -237,7 +237,7 @@ static void __exit afs_exit(void)
|
|||||||
|
|
||||||
proc_remove(afs_proc_symlink);
|
proc_remove(afs_proc_symlink);
|
||||||
afs_fs_exit();
|
afs_fs_exit();
|
||||||
unregister_pernet_subsys(&afs_net_ops);
|
unregister_pernet_device(&afs_net_ops);
|
||||||
#ifdef CONFIG_AFS_FSCACHE
|
#ifdef CONFIG_AFS_FSCACHE
|
||||||
fscache_unregister_netfs(&afs_cache_netfs);
|
fscache_unregister_netfs(&afs_cache_netfs);
|
||||||
#endif
|
#endif
|
||||||
|
@ -738,6 +738,7 @@ static int
|
|||||||
cifs_d_revalidate(struct dentry *direntry, unsigned int flags)
|
cifs_d_revalidate(struct dentry *direntry, unsigned int flags)
|
||||||
{
|
{
|
||||||
struct inode *inode;
|
struct inode *inode;
|
||||||
|
int rc;
|
||||||
|
|
||||||
if (flags & LOOKUP_RCU)
|
if (flags & LOOKUP_RCU)
|
||||||
return -ECHILD;
|
return -ECHILD;
|
||||||
@ -747,8 +748,25 @@ cifs_d_revalidate(struct dentry *direntry, unsigned int flags)
|
|||||||
if ((flags & LOOKUP_REVAL) && !CIFS_CACHE_READ(CIFS_I(inode)))
|
if ((flags & LOOKUP_REVAL) && !CIFS_CACHE_READ(CIFS_I(inode)))
|
||||||
CIFS_I(inode)->time = 0; /* force reval */
|
CIFS_I(inode)->time = 0; /* force reval */
|
||||||
|
|
||||||
if (cifs_revalidate_dentry(direntry))
|
rc = cifs_revalidate_dentry(direntry);
|
||||||
return 0;
|
if (rc) {
|
||||||
|
cifs_dbg(FYI, "cifs_revalidate_dentry failed with rc=%d", rc);
|
||||||
|
switch (rc) {
|
||||||
|
case -ENOENT:
|
||||||
|
case -ESTALE:
|
||||||
|
/*
|
||||||
|
* Those errors mean the dentry is invalid
|
||||||
|
* (file was deleted or recreated)
|
||||||
|
*/
|
||||||
|
return 0;
|
||||||
|
default:
|
||||||
|
/*
|
||||||
|
* Otherwise some unexpected error happened
|
||||||
|
* report it as-is to VFS layer
|
||||||
|
*/
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
/*
|
/*
|
||||||
* If the inode wasn't known to be a dfs entry when
|
* If the inode wasn't known to be a dfs entry when
|
||||||
|
@ -227,7 +227,7 @@ struct smb2_negotiate_req {
|
|||||||
__le32 NegotiateContextOffset; /* SMB3.1.1 only. MBZ earlier */
|
__le32 NegotiateContextOffset; /* SMB3.1.1 only. MBZ earlier */
|
||||||
__le16 NegotiateContextCount; /* SMB3.1.1 only. MBZ earlier */
|
__le16 NegotiateContextCount; /* SMB3.1.1 only. MBZ earlier */
|
||||||
__le16 Reserved2;
|
__le16 Reserved2;
|
||||||
__le16 Dialects[1]; /* One dialect (vers=) at a time for now */
|
__le16 Dialects[4]; /* BB expand this if autonegotiate > 4 dialects */
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
/* Dialects */
|
/* Dialects */
|
||||||
|
@ -659,10 +659,22 @@ wait_for_compound_request(struct TCP_Server_Info *server, int num,
|
|||||||
spin_lock(&server->req_lock);
|
spin_lock(&server->req_lock);
|
||||||
if (*credits < num) {
|
if (*credits < num) {
|
||||||
/*
|
/*
|
||||||
* Return immediately if not too many requests in flight since
|
* If the server is tight on resources or just gives us less
|
||||||
* we will likely be stuck on waiting for credits.
|
* credits for other reasons (e.g. requests are coming out of
|
||||||
|
* order and the server delays granting more credits until it
|
||||||
|
* processes a missing mid) and we exhausted most available
|
||||||
|
* credits there may be situations when we try to send
|
||||||
|
* a compound request but we don't have enough credits. At this
|
||||||
|
* point the client needs to decide if it should wait for
|
||||||
|
* additional credits or fail the request. If at least one
|
||||||
|
* request is in flight there is a high probability that the
|
||||||
|
* server will return enough credits to satisfy this compound
|
||||||
|
* request.
|
||||||
|
*
|
||||||
|
* Return immediately if no requests in flight since we will be
|
||||||
|
* stuck on waiting for credits.
|
||||||
*/
|
*/
|
||||||
if (server->in_flight < num - *credits) {
|
if (server->in_flight == 0) {
|
||||||
spin_unlock(&server->req_lock);
|
spin_unlock(&server->req_lock);
|
||||||
return -ENOTSUPP;
|
return -ENOTSUPP;
|
||||||
}
|
}
|
||||||
|
@ -675,9 +675,10 @@ static long hugetlbfs_fallocate(struct file *file, int mode, loff_t offset,
|
|||||||
|
|
||||||
mutex_unlock(&hugetlb_fault_mutex_table[hash]);
|
mutex_unlock(&hugetlb_fault_mutex_table[hash]);
|
||||||
|
|
||||||
|
set_page_huge_active(page);
|
||||||
/*
|
/*
|
||||||
* unlock_page because locked by add_to_page_cache()
|
* unlock_page because locked by add_to_page_cache()
|
||||||
* page_put due to reference from alloc_huge_page()
|
* put_page() due to reference from alloc_huge_page()
|
||||||
*/
|
*/
|
||||||
unlock_page(page);
|
unlock_page(page);
|
||||||
put_page(page);
|
put_page(page);
|
||||||
|
@ -943,8 +943,8 @@ static char *ovl_get_redirect(struct dentry *dentry, bool abs_redirect)
|
|||||||
|
|
||||||
buflen -= thislen;
|
buflen -= thislen;
|
||||||
memcpy(&buf[buflen], name, thislen);
|
memcpy(&buf[buflen], name, thislen);
|
||||||
tmp = dget_dlock(d->d_parent);
|
|
||||||
spin_unlock(&d->d_lock);
|
spin_unlock(&d->d_lock);
|
||||||
|
tmp = dget_parent(d);
|
||||||
|
|
||||||
dput(d);
|
dput(d);
|
||||||
d = tmp;
|
d = tmp;
|
||||||
|
@ -590,6 +590,8 @@ static inline void huge_ptep_modify_prot_commit(struct vm_area_struct *vma,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void set_page_huge_active(struct page *page);
|
||||||
|
|
||||||
#else /* CONFIG_HUGETLB_PAGE */
|
#else /* CONFIG_HUGETLB_PAGE */
|
||||||
struct hstate {};
|
struct hstate {};
|
||||||
|
|
||||||
|
@ -139,6 +139,12 @@ struct msi_desc {
|
|||||||
list_for_each_entry((desc), dev_to_msi_list((dev)), list)
|
list_for_each_entry((desc), dev_to_msi_list((dev)), list)
|
||||||
#define for_each_msi_entry_safe(desc, tmp, dev) \
|
#define for_each_msi_entry_safe(desc, tmp, dev) \
|
||||||
list_for_each_entry_safe((desc), (tmp), dev_to_msi_list((dev)), list)
|
list_for_each_entry_safe((desc), (tmp), dev_to_msi_list((dev)), list)
|
||||||
|
#define for_each_msi_vector(desc, __irq, dev) \
|
||||||
|
for_each_msi_entry((desc), (dev)) \
|
||||||
|
if ((desc)->irq) \
|
||||||
|
for (__irq = (desc)->irq; \
|
||||||
|
__irq < ((desc)->irq + (desc)->nvec_used); \
|
||||||
|
__irq++)
|
||||||
|
|
||||||
#ifdef CONFIG_IRQ_MSI_IOMMU
|
#ifdef CONFIG_IRQ_MSI_IOMMU
|
||||||
static inline const void *msi_desc_get_iommu_cookie(struct msi_desc *desc)
|
static inline const void *msi_desc_get_iommu_cookie(struct msi_desc *desc)
|
||||||
|
@ -1158,7 +1158,7 @@ static inline struct Qdisc *qdisc_replace(struct Qdisc *sch, struct Qdisc *new,
|
|||||||
old = *pold;
|
old = *pold;
|
||||||
*pold = new;
|
*pold = new;
|
||||||
if (old != NULL)
|
if (old != NULL)
|
||||||
qdisc_tree_flush_backlog(old);
|
qdisc_purge_queue(old);
|
||||||
sch_tree_unlock(sch);
|
sch_tree_unlock(sch);
|
||||||
|
|
||||||
return old;
|
return old;
|
||||||
|
@ -171,7 +171,8 @@ struct task_struct init_task
|
|||||||
.lockdep_recursion = 0,
|
.lockdep_recursion = 0,
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
|
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
|
||||||
.ret_stack = NULL,
|
.ret_stack = NULL,
|
||||||
|
.tracing_graph_pause = ATOMIC_INIT(0),
|
||||||
#endif
|
#endif
|
||||||
#if defined(CONFIG_TRACING) && defined(CONFIG_PREEMPTION)
|
#if defined(CONFIG_TRACING) && defined(CONFIG_PREEMPTION)
|
||||||
.trace_recursion = 0,
|
.trace_recursion = 0,
|
||||||
|
@ -1109,6 +1109,11 @@ int __cgroup_bpf_run_filter_getsockopt(struct sock *sk, int level,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ctx.optlen < 0) {
|
||||||
|
ret = -EFAULT;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
if (copy_from_user(ctx.optval, optval,
|
if (copy_from_user(ctx.optval, optval,
|
||||||
min(ctx.optlen, max_optlen)) != 0) {
|
min(ctx.optlen, max_optlen)) != 0) {
|
||||||
ret = -EFAULT;
|
ret = -EFAULT;
|
||||||
@ -1126,7 +1131,7 @@ int __cgroup_bpf_run_filter_getsockopt(struct sock *sk, int level,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctx.optlen > max_optlen) {
|
if (ctx.optlen > max_optlen || ctx.optlen < 0) {
|
||||||
ret = -EFAULT;
|
ret = -EFAULT;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
@ -437,22 +437,22 @@ int msi_domain_alloc_irqs(struct irq_domain *domain, struct device *dev,
|
|||||||
|
|
||||||
can_reserve = msi_check_reservation_mode(domain, info, dev);
|
can_reserve = msi_check_reservation_mode(domain, info, dev);
|
||||||
|
|
||||||
for_each_msi_entry(desc, dev) {
|
/*
|
||||||
virq = desc->irq;
|
* This flag is set by the PCI layer as we need to activate
|
||||||
if (desc->nvec_used == 1)
|
* the MSI entries before the PCI layer enables MSI in the
|
||||||
dev_dbg(dev, "irq %d for MSI\n", virq);
|
* card. Otherwise the card latches a random msi message.
|
||||||
else
|
*/
|
||||||
|
if (!(info->flags & MSI_FLAG_ACTIVATE_EARLY))
|
||||||
|
goto skip_activate;
|
||||||
|
|
||||||
|
for_each_msi_vector(desc, i, dev) {
|
||||||
|
if (desc->irq == i) {
|
||||||
|
virq = desc->irq;
|
||||||
dev_dbg(dev, "irq [%d-%d] for MSI\n",
|
dev_dbg(dev, "irq [%d-%d] for MSI\n",
|
||||||
virq, virq + desc->nvec_used - 1);
|
virq, virq + desc->nvec_used - 1);
|
||||||
/*
|
}
|
||||||
* This flag is set by the PCI layer as we need to activate
|
|
||||||
* the MSI entries before the PCI layer enables MSI in the
|
|
||||||
* card. Otherwise the card latches a random msi message.
|
|
||||||
*/
|
|
||||||
if (!(info->flags & MSI_FLAG_ACTIVATE_EARLY))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
irq_data = irq_domain_get_irq_data(domain, desc->irq);
|
irq_data = irq_domain_get_irq_data(domain, i);
|
||||||
if (!can_reserve) {
|
if (!can_reserve) {
|
||||||
irqd_clr_can_reserve(irq_data);
|
irqd_clr_can_reserve(irq_data);
|
||||||
if (domain->flags & IRQ_DOMAIN_MSI_NOMASK_QUIRK)
|
if (domain->flags & IRQ_DOMAIN_MSI_NOMASK_QUIRK)
|
||||||
@ -463,28 +463,24 @@ int msi_domain_alloc_irqs(struct irq_domain *domain, struct device *dev,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
skip_activate:
|
||||||
/*
|
/*
|
||||||
* If these interrupts use reservation mode, clear the activated bit
|
* If these interrupts use reservation mode, clear the activated bit
|
||||||
* so request_irq() will assign the final vector.
|
* so request_irq() will assign the final vector.
|
||||||
*/
|
*/
|
||||||
if (can_reserve) {
|
if (can_reserve) {
|
||||||
for_each_msi_entry(desc, dev) {
|
for_each_msi_vector(desc, i, dev) {
|
||||||
irq_data = irq_domain_get_irq_data(domain, desc->irq);
|
irq_data = irq_domain_get_irq_data(domain, i);
|
||||||
irqd_clr_activated(irq_data);
|
irqd_clr_activated(irq_data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
for_each_msi_entry(desc, dev) {
|
for_each_msi_vector(desc, i, dev) {
|
||||||
struct irq_data *irqd;
|
irq_data = irq_domain_get_irq_data(domain, i);
|
||||||
|
if (irqd_is_activated(irq_data))
|
||||||
if (desc->irq == virq)
|
irq_domain_deactivate_irq(irq_data);
|
||||||
break;
|
|
||||||
|
|
||||||
irqd = irq_domain_get_irq_data(domain, desc->irq);
|
|
||||||
if (irqd_is_activated(irqd))
|
|
||||||
irq_domain_deactivate_irq(irqd);
|
|
||||||
}
|
}
|
||||||
msi_domain_free_irqs(domain, dev);
|
msi_domain_free_irqs(domain, dev);
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -1972,6 +1972,10 @@ int register_kretprobe(struct kretprobe *rp)
|
|||||||
if (!kprobe_on_func_entry(rp->kp.addr, rp->kp.symbol_name, rp->kp.offset))
|
if (!kprobe_on_func_entry(rp->kp.addr, rp->kp.symbol_name, rp->kp.offset))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
/* If only rp->kp.addr is specified, check reregistering kprobes */
|
||||||
|
if (rp->kp.addr && check_kprobe_rereg(&rp->kp))
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
if (kretprobe_blacklist_size) {
|
if (kretprobe_blacklist_size) {
|
||||||
addr = kprobe_addr(&rp->kp);
|
addr = kprobe_addr(&rp->kp);
|
||||||
if (IS_ERR(addr))
|
if (IS_ERR(addr))
|
||||||
|
@ -367,7 +367,6 @@ static int alloc_retstack_tasklist(struct ftrace_ret_stack **ret_stack_list)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (t->ret_stack == NULL) {
|
if (t->ret_stack == NULL) {
|
||||||
atomic_set(&t->tracing_graph_pause, 0);
|
|
||||||
atomic_set(&t->trace_overrun, 0);
|
atomic_set(&t->trace_overrun, 0);
|
||||||
t->curr_ret_stack = -1;
|
t->curr_ret_stack = -1;
|
||||||
t->curr_ret_depth = -1;
|
t->curr_ret_depth = -1;
|
||||||
@ -462,7 +461,6 @@ static DEFINE_PER_CPU(struct ftrace_ret_stack *, idle_ret_stack);
|
|||||||
static void
|
static void
|
||||||
graph_init_task(struct task_struct *t, struct ftrace_ret_stack *ret_stack)
|
graph_init_task(struct task_struct *t, struct ftrace_ret_stack *ret_stack)
|
||||||
{
|
{
|
||||||
atomic_set(&t->tracing_graph_pause, 0);
|
|
||||||
atomic_set(&t->trace_overrun, 0);
|
atomic_set(&t->trace_overrun, 0);
|
||||||
t->ftrace_timestamp = 0;
|
t->ftrace_timestamp = 0;
|
||||||
/* make curr_ret_stack visible before we add the ret_stack */
|
/* make curr_ret_stack visible before we add the ret_stack */
|
||||||
|
@ -1276,7 +1276,7 @@ fast_isolate_freepages(struct compact_control *cc)
|
|||||||
{
|
{
|
||||||
unsigned int limit = min(1U, freelist_scan_limit(cc) >> 1);
|
unsigned int limit = min(1U, freelist_scan_limit(cc) >> 1);
|
||||||
unsigned int nr_scanned = 0;
|
unsigned int nr_scanned = 0;
|
||||||
unsigned long low_pfn, min_pfn, high_pfn = 0, highest = 0;
|
unsigned long low_pfn, min_pfn, highest = 0;
|
||||||
unsigned long nr_isolated = 0;
|
unsigned long nr_isolated = 0;
|
||||||
unsigned long distance;
|
unsigned long distance;
|
||||||
struct page *page = NULL;
|
struct page *page = NULL;
|
||||||
@ -1321,6 +1321,7 @@ fast_isolate_freepages(struct compact_control *cc)
|
|||||||
struct page *freepage;
|
struct page *freepage;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
unsigned int order_scanned = 0;
|
unsigned int order_scanned = 0;
|
||||||
|
unsigned long high_pfn = 0;
|
||||||
|
|
||||||
if (!area->nr_free)
|
if (!area->nr_free)
|
||||||
continue;
|
continue;
|
||||||
|
@ -2306,7 +2306,7 @@ void __split_huge_pmd(struct vm_area_struct *vma, pmd_t *pmd,
|
|||||||
{
|
{
|
||||||
spinlock_t *ptl;
|
spinlock_t *ptl;
|
||||||
struct mmu_notifier_range range;
|
struct mmu_notifier_range range;
|
||||||
bool was_locked = false;
|
bool do_unlock_page = false;
|
||||||
pmd_t _pmd;
|
pmd_t _pmd;
|
||||||
|
|
||||||
mmu_notifier_range_init(&range, MMU_NOTIFY_CLEAR, 0, vma, vma->vm_mm,
|
mmu_notifier_range_init(&range, MMU_NOTIFY_CLEAR, 0, vma, vma->vm_mm,
|
||||||
@ -2322,7 +2322,6 @@ void __split_huge_pmd(struct vm_area_struct *vma, pmd_t *pmd,
|
|||||||
VM_BUG_ON(freeze && !page);
|
VM_BUG_ON(freeze && !page);
|
||||||
if (page) {
|
if (page) {
|
||||||
VM_WARN_ON_ONCE(!PageLocked(page));
|
VM_WARN_ON_ONCE(!PageLocked(page));
|
||||||
was_locked = true;
|
|
||||||
if (page != pmd_page(*pmd))
|
if (page != pmd_page(*pmd))
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@ -2331,19 +2330,29 @@ void __split_huge_pmd(struct vm_area_struct *vma, pmd_t *pmd,
|
|||||||
if (pmd_trans_huge(*pmd)) {
|
if (pmd_trans_huge(*pmd)) {
|
||||||
if (!page) {
|
if (!page) {
|
||||||
page = pmd_page(*pmd);
|
page = pmd_page(*pmd);
|
||||||
if (unlikely(!trylock_page(page))) {
|
/*
|
||||||
get_page(page);
|
* An anonymous page must be locked, to ensure that a
|
||||||
_pmd = *pmd;
|
* concurrent reuse_swap_page() sees stable mapcount;
|
||||||
spin_unlock(ptl);
|
* but reuse_swap_page() is not used on shmem or file,
|
||||||
lock_page(page);
|
* and page lock must not be taken when zap_pmd_range()
|
||||||
spin_lock(ptl);
|
* calls __split_huge_pmd() while i_mmap_lock is held.
|
||||||
if (unlikely(!pmd_same(*pmd, _pmd))) {
|
*/
|
||||||
unlock_page(page);
|
if (PageAnon(page)) {
|
||||||
|
if (unlikely(!trylock_page(page))) {
|
||||||
|
get_page(page);
|
||||||
|
_pmd = *pmd;
|
||||||
|
spin_unlock(ptl);
|
||||||
|
lock_page(page);
|
||||||
|
spin_lock(ptl);
|
||||||
|
if (unlikely(!pmd_same(*pmd, _pmd))) {
|
||||||
|
unlock_page(page);
|
||||||
|
put_page(page);
|
||||||
|
page = NULL;
|
||||||
|
goto repeat;
|
||||||
|
}
|
||||||
put_page(page);
|
put_page(page);
|
||||||
page = NULL;
|
|
||||||
goto repeat;
|
|
||||||
}
|
}
|
||||||
put_page(page);
|
do_unlock_page = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (PageMlocked(page))
|
if (PageMlocked(page))
|
||||||
@ -2353,7 +2362,7 @@ void __split_huge_pmd(struct vm_area_struct *vma, pmd_t *pmd,
|
|||||||
__split_huge_pmd_locked(vma, pmd, range.start, freeze);
|
__split_huge_pmd_locked(vma, pmd, range.start, freeze);
|
||||||
out:
|
out:
|
||||||
spin_unlock(ptl);
|
spin_unlock(ptl);
|
||||||
if (!was_locked && page)
|
if (do_unlock_page)
|
||||||
unlock_page(page);
|
unlock_page(page);
|
||||||
/*
|
/*
|
||||||
* No need to double call mmu_notifier->invalidate_range() callback.
|
* No need to double call mmu_notifier->invalidate_range() callback.
|
||||||
|
48
mm/hugetlb.c
48
mm/hugetlb.c
@ -71,6 +71,21 @@ DEFINE_SPINLOCK(hugetlb_lock);
|
|||||||
static int num_fault_mutexes;
|
static int num_fault_mutexes;
|
||||||
struct mutex *hugetlb_fault_mutex_table ____cacheline_aligned_in_smp;
|
struct mutex *hugetlb_fault_mutex_table ____cacheline_aligned_in_smp;
|
||||||
|
|
||||||
|
static inline bool PageHugeFreed(struct page *head)
|
||||||
|
{
|
||||||
|
return page_private(head + 4) == -1UL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void SetPageHugeFreed(struct page *head)
|
||||||
|
{
|
||||||
|
set_page_private(head + 4, -1UL);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void ClearPageHugeFreed(struct page *head)
|
||||||
|
{
|
||||||
|
set_page_private(head + 4, 0);
|
||||||
|
}
|
||||||
|
|
||||||
/* Forward declaration */
|
/* Forward declaration */
|
||||||
static int hugetlb_acct_memory(struct hstate *h, long delta);
|
static int hugetlb_acct_memory(struct hstate *h, long delta);
|
||||||
|
|
||||||
@ -869,6 +884,7 @@ static void enqueue_huge_page(struct hstate *h, struct page *page)
|
|||||||
list_move(&page->lru, &h->hugepage_freelists[nid]);
|
list_move(&page->lru, &h->hugepage_freelists[nid]);
|
||||||
h->free_huge_pages++;
|
h->free_huge_pages++;
|
||||||
h->free_huge_pages_node[nid]++;
|
h->free_huge_pages_node[nid]++;
|
||||||
|
SetPageHugeFreed(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct page *dequeue_huge_page_node_exact(struct hstate *h, int nid)
|
static struct page *dequeue_huge_page_node_exact(struct hstate *h, int nid)
|
||||||
@ -886,6 +902,7 @@ static struct page *dequeue_huge_page_node_exact(struct hstate *h, int nid)
|
|||||||
return NULL;
|
return NULL;
|
||||||
list_move(&page->lru, &h->hugepage_activelist);
|
list_move(&page->lru, &h->hugepage_activelist);
|
||||||
set_page_refcounted(page);
|
set_page_refcounted(page);
|
||||||
|
ClearPageHugeFreed(page);
|
||||||
h->free_huge_pages--;
|
h->free_huge_pages--;
|
||||||
h->free_huge_pages_node[nid]--;
|
h->free_huge_pages_node[nid]--;
|
||||||
return page;
|
return page;
|
||||||
@ -1217,12 +1234,11 @@ struct hstate *size_to_hstate(unsigned long size)
|
|||||||
*/
|
*/
|
||||||
bool page_huge_active(struct page *page)
|
bool page_huge_active(struct page *page)
|
||||||
{
|
{
|
||||||
VM_BUG_ON_PAGE(!PageHuge(page), page);
|
return PageHeadHuge(page) && PagePrivate(&page[1]);
|
||||||
return PageHead(page) && PagePrivate(&page[1]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* never called for tail page */
|
/* never called for tail page */
|
||||||
static void set_page_huge_active(struct page *page)
|
void set_page_huge_active(struct page *page)
|
||||||
{
|
{
|
||||||
VM_BUG_ON_PAGE(!PageHeadHuge(page), page);
|
VM_BUG_ON_PAGE(!PageHeadHuge(page), page);
|
||||||
SetPagePrivate(&page[1]);
|
SetPagePrivate(&page[1]);
|
||||||
@ -1375,6 +1391,7 @@ static void prep_new_huge_page(struct hstate *h, struct page *page, int nid)
|
|||||||
set_hugetlb_cgroup(page, NULL);
|
set_hugetlb_cgroup(page, NULL);
|
||||||
h->nr_huge_pages++;
|
h->nr_huge_pages++;
|
||||||
h->nr_huge_pages_node[nid]++;
|
h->nr_huge_pages_node[nid]++;
|
||||||
|
ClearPageHugeFreed(page);
|
||||||
spin_unlock(&hugetlb_lock);
|
spin_unlock(&hugetlb_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1602,6 +1619,7 @@ int dissolve_free_huge_page(struct page *page)
|
|||||||
{
|
{
|
||||||
int rc = -EBUSY;
|
int rc = -EBUSY;
|
||||||
|
|
||||||
|
retry:
|
||||||
/* Not to disrupt normal path by vainly holding hugetlb_lock */
|
/* Not to disrupt normal path by vainly holding hugetlb_lock */
|
||||||
if (!PageHuge(page))
|
if (!PageHuge(page))
|
||||||
return 0;
|
return 0;
|
||||||
@ -1618,6 +1636,26 @@ int dissolve_free_huge_page(struct page *page)
|
|||||||
int nid = page_to_nid(head);
|
int nid = page_to_nid(head);
|
||||||
if (h->free_huge_pages - h->resv_huge_pages == 0)
|
if (h->free_huge_pages - h->resv_huge_pages == 0)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We should make sure that the page is already on the free list
|
||||||
|
* when it is dissolved.
|
||||||
|
*/
|
||||||
|
if (unlikely(!PageHugeFreed(head))) {
|
||||||
|
spin_unlock(&hugetlb_lock);
|
||||||
|
cond_resched();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Theoretically, we should return -EBUSY when we
|
||||||
|
* encounter this race. In fact, we have a chance
|
||||||
|
* to successfully dissolve the page if we do a
|
||||||
|
* retry. Because the race window is quite small.
|
||||||
|
* If we seize this opportunity, it is an optimization
|
||||||
|
* for increasing the success rate of dissolving page.
|
||||||
|
*/
|
||||||
|
goto retry;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Move PageHWPoison flag from head page to the raw error page,
|
* Move PageHWPoison flag from head page to the raw error page,
|
||||||
* which makes any subpages rather than the error page reusable.
|
* which makes any subpages rather than the error page reusable.
|
||||||
@ -5136,9 +5174,9 @@ bool isolate_huge_page(struct page *page, struct list_head *list)
|
|||||||
{
|
{
|
||||||
bool ret = true;
|
bool ret = true;
|
||||||
|
|
||||||
VM_BUG_ON_PAGE(!PageHead(page), page);
|
|
||||||
spin_lock(&hugetlb_lock);
|
spin_lock(&hugetlb_lock);
|
||||||
if (!page_huge_active(page) || !get_page_unless_zero(page)) {
|
if (!PageHeadHuge(page) || !page_huge_active(page) ||
|
||||||
|
!get_page_unless_zero(page)) {
|
||||||
ret = false;
|
ret = false;
|
||||||
goto unlock;
|
goto unlock;
|
||||||
}
|
}
|
||||||
|
@ -257,14 +257,6 @@ __memblock_find_range_top_down(phys_addr_t start, phys_addr_t end,
|
|||||||
*
|
*
|
||||||
* Find @size free area aligned to @align in the specified range and node.
|
* Find @size free area aligned to @align in the specified range and node.
|
||||||
*
|
*
|
||||||
* When allocation direction is bottom-up, the @start should be greater
|
|
||||||
* than the end of the kernel image. Otherwise, it will be trimmed. The
|
|
||||||
* reason is that we want the bottom-up allocation just near the kernel
|
|
||||||
* image so it is highly likely that the allocated memory and the kernel
|
|
||||||
* will reside in the same node.
|
|
||||||
*
|
|
||||||
* If bottom-up allocation failed, will try to allocate memory top-down.
|
|
||||||
*
|
|
||||||
* Return:
|
* Return:
|
||||||
* Found address on success, 0 on failure.
|
* Found address on success, 0 on failure.
|
||||||
*/
|
*/
|
||||||
@ -273,8 +265,6 @@ static phys_addr_t __init_memblock memblock_find_in_range_node(phys_addr_t size,
|
|||||||
phys_addr_t end, int nid,
|
phys_addr_t end, int nid,
|
||||||
enum memblock_flags flags)
|
enum memblock_flags flags)
|
||||||
{
|
{
|
||||||
phys_addr_t kernel_end, ret;
|
|
||||||
|
|
||||||
/* pump up @end */
|
/* pump up @end */
|
||||||
if (end == MEMBLOCK_ALLOC_ACCESSIBLE ||
|
if (end == MEMBLOCK_ALLOC_ACCESSIBLE ||
|
||||||
end == MEMBLOCK_ALLOC_KASAN)
|
end == MEMBLOCK_ALLOC_KASAN)
|
||||||
@ -283,40 +273,13 @@ static phys_addr_t __init_memblock memblock_find_in_range_node(phys_addr_t size,
|
|||||||
/* avoid allocating the first page */
|
/* avoid allocating the first page */
|
||||||
start = max_t(phys_addr_t, start, PAGE_SIZE);
|
start = max_t(phys_addr_t, start, PAGE_SIZE);
|
||||||
end = max(start, end);
|
end = max(start, end);
|
||||||
kernel_end = __pa_symbol(_end);
|
|
||||||
|
|
||||||
/*
|
if (memblock_bottom_up())
|
||||||
* try bottom-up allocation only when bottom-up mode
|
return __memblock_find_range_bottom_up(start, end, size, align,
|
||||||
* is set and @end is above the kernel image.
|
nid, flags);
|
||||||
*/
|
else
|
||||||
if (memblock_bottom_up() && end > kernel_end) {
|
return __memblock_find_range_top_down(start, end, size, align,
|
||||||
phys_addr_t bottom_up_start;
|
nid, flags);
|
||||||
|
|
||||||
/* make sure we will allocate above the kernel */
|
|
||||||
bottom_up_start = max(start, kernel_end);
|
|
||||||
|
|
||||||
/* ok, try bottom-up allocation first */
|
|
||||||
ret = __memblock_find_range_bottom_up(bottom_up_start, end,
|
|
||||||
size, align, nid, flags);
|
|
||||||
if (ret)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* we always limit bottom-up allocation above the kernel,
|
|
||||||
* but top-down allocation doesn't have the limit, so
|
|
||||||
* retrying top-down allocation may succeed when bottom-up
|
|
||||||
* allocation failed.
|
|
||||||
*
|
|
||||||
* bottom-up allocation is expected to be fail very rarely,
|
|
||||||
* so we use WARN_ONCE() here to see the stack trace if
|
|
||||||
* fail happens.
|
|
||||||
*/
|
|
||||||
WARN_ONCE(IS_ENABLED(CONFIG_MEMORY_HOTREMOVE),
|
|
||||||
"memblock: bottom-up allocation failed, memory hotremove may be affected\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
return __memblock_find_range_top_down(start, end, size, align, nid,
|
|
||||||
flags);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1242,13 +1242,14 @@ static int __neigh_update(struct neighbour *neigh, const u8 *lladdr,
|
|||||||
old = neigh->nud_state;
|
old = neigh->nud_state;
|
||||||
err = -EPERM;
|
err = -EPERM;
|
||||||
|
|
||||||
|
if (neigh->dead) {
|
||||||
|
NL_SET_ERR_MSG(extack, "Neighbor entry is now dead");
|
||||||
|
new = old;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
if (!(flags & NEIGH_UPDATE_F_ADMIN) &&
|
if (!(flags & NEIGH_UPDATE_F_ADMIN) &&
|
||||||
(old & (NUD_NOARP | NUD_PERMANENT)))
|
(old & (NUD_NOARP | NUD_PERMANENT)))
|
||||||
goto out;
|
goto out;
|
||||||
if (neigh->dead) {
|
|
||||||
NL_SET_ERR_MSG(extack, "Neighbor entry is now dead");
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
ext_learn_change = neigh_update_ext_learned(neigh, flags, ¬ify);
|
ext_learn_change = neigh_update_ext_learned(neigh, flags, ¬ify);
|
||||||
|
|
||||||
|
@ -317,7 +317,7 @@ static int ip_tunnel_bind_dev(struct net_device *dev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
dev->needed_headroom = t_hlen + hlen;
|
dev->needed_headroom = t_hlen + hlen;
|
||||||
mtu -= (dev->hard_header_len + t_hlen);
|
mtu -= t_hlen;
|
||||||
|
|
||||||
if (mtu < IPV4_MIN_MTU)
|
if (mtu < IPV4_MIN_MTU)
|
||||||
mtu = IPV4_MIN_MTU;
|
mtu = IPV4_MIN_MTU;
|
||||||
@ -347,7 +347,7 @@ static struct ip_tunnel *ip_tunnel_create(struct net *net,
|
|||||||
nt = netdev_priv(dev);
|
nt = netdev_priv(dev);
|
||||||
t_hlen = nt->hlen + sizeof(struct iphdr);
|
t_hlen = nt->hlen + sizeof(struct iphdr);
|
||||||
dev->min_mtu = ETH_MIN_MTU;
|
dev->min_mtu = ETH_MIN_MTU;
|
||||||
dev->max_mtu = IP_MAX_MTU - dev->hard_header_len - t_hlen;
|
dev->max_mtu = IP_MAX_MTU - t_hlen;
|
||||||
ip_tunnel_add(itn, nt);
|
ip_tunnel_add(itn, nt);
|
||||||
return nt;
|
return nt;
|
||||||
|
|
||||||
@ -494,11 +494,10 @@ static int tnl_update_pmtu(struct net_device *dev, struct sk_buff *skb,
|
|||||||
int mtu;
|
int mtu;
|
||||||
|
|
||||||
tunnel_hlen = md ? tunnel_hlen : tunnel->hlen;
|
tunnel_hlen = md ? tunnel_hlen : tunnel->hlen;
|
||||||
pkt_size = skb->len - tunnel_hlen - dev->hard_header_len;
|
pkt_size = skb->len - tunnel_hlen;
|
||||||
|
|
||||||
if (df)
|
if (df)
|
||||||
mtu = dst_mtu(&rt->dst) - dev->hard_header_len
|
mtu = dst_mtu(&rt->dst) - (sizeof(struct iphdr) + tunnel_hlen);
|
||||||
- sizeof(struct iphdr) - tunnel_hlen;
|
|
||||||
else
|
else
|
||||||
mtu = skb_valid_dst(skb) ? dst_mtu(skb_dst(skb)) : dev->mtu;
|
mtu = skb_valid_dst(skb) ? dst_mtu(skb_dst(skb)) : dev->mtu;
|
||||||
|
|
||||||
@ -964,7 +963,7 @@ int __ip_tunnel_change_mtu(struct net_device *dev, int new_mtu, bool strict)
|
|||||||
{
|
{
|
||||||
struct ip_tunnel *tunnel = netdev_priv(dev);
|
struct ip_tunnel *tunnel = netdev_priv(dev);
|
||||||
int t_hlen = tunnel->hlen + sizeof(struct iphdr);
|
int t_hlen = tunnel->hlen + sizeof(struct iphdr);
|
||||||
int max_mtu = IP_MAX_MTU - dev->hard_header_len - t_hlen;
|
int max_mtu = IP_MAX_MTU - t_hlen;
|
||||||
|
|
||||||
if (new_mtu < ETH_MIN_MTU)
|
if (new_mtu < ETH_MIN_MTU)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
@ -1141,10 +1140,9 @@ int ip_tunnel_newlink(struct net_device *dev, struct nlattr *tb[],
|
|||||||
|
|
||||||
mtu = ip_tunnel_bind_dev(dev);
|
mtu = ip_tunnel_bind_dev(dev);
|
||||||
if (tb[IFLA_MTU]) {
|
if (tb[IFLA_MTU]) {
|
||||||
unsigned int max = IP_MAX_MTU - dev->hard_header_len - nt->hlen;
|
unsigned int max = IP_MAX_MTU - (nt->hlen + sizeof(struct iphdr));
|
||||||
|
|
||||||
mtu = clamp(dev->mtu, (unsigned int)ETH_MIN_MTU,
|
mtu = clamp(dev->mtu, (unsigned int)ETH_MIN_MTU, max);
|
||||||
(unsigned int)(max - sizeof(struct iphdr)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
err = dev_set_mtu(dev, mtu);
|
err = dev_set_mtu(dev, mtu);
|
||||||
|
@ -82,7 +82,8 @@ void lapb_kick(struct lapb_cb *lapb)
|
|||||||
skb = skb_dequeue(&lapb->write_queue);
|
skb = skb_dequeue(&lapb->write_queue);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if ((skbn = skb_clone(skb, GFP_ATOMIC)) == NULL) {
|
skbn = skb_copy(skb, GFP_ATOMIC);
|
||||||
|
if (!skbn) {
|
||||||
skb_queue_head(&lapb->write_queue, skb);
|
skb_queue_head(&lapb->write_queue, skb);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -125,8 +125,11 @@ int drv_sta_state(struct ieee80211_local *local,
|
|||||||
} else if (old_state == IEEE80211_STA_AUTH &&
|
} else if (old_state == IEEE80211_STA_AUTH &&
|
||||||
new_state == IEEE80211_STA_ASSOC) {
|
new_state == IEEE80211_STA_ASSOC) {
|
||||||
ret = drv_sta_add(local, sdata, &sta->sta);
|
ret = drv_sta_add(local, sdata, &sta->sta);
|
||||||
if (ret == 0)
|
if (ret == 0) {
|
||||||
sta->uploaded = true;
|
sta->uploaded = true;
|
||||||
|
if (rcu_access_pointer(sta->sta.rates))
|
||||||
|
drv_sta_rate_tbl_update(local, sdata, &sta->sta);
|
||||||
|
}
|
||||||
} else if (old_state == IEEE80211_STA_ASSOC &&
|
} else if (old_state == IEEE80211_STA_ASSOC &&
|
||||||
new_state == IEEE80211_STA_AUTH) {
|
new_state == IEEE80211_STA_AUTH) {
|
||||||
drv_sta_remove(local, sdata, &sta->sta);
|
drv_sta_remove(local, sdata, &sta->sta);
|
||||||
|
@ -934,7 +934,8 @@ int rate_control_set_rates(struct ieee80211_hw *hw,
|
|||||||
if (old)
|
if (old)
|
||||||
kfree_rcu(old, rcu_head);
|
kfree_rcu(old, rcu_head);
|
||||||
|
|
||||||
drv_sta_rate_tbl_update(hw_to_local(hw), sta->sdata, pubsta);
|
if (sta->uploaded)
|
||||||
|
drv_sta_rate_tbl_update(hw_to_local(hw), sta->sdata, pubsta);
|
||||||
|
|
||||||
ieee80211_sta_set_expected_throughput(pubsta, sta_get_expected_throughput(sta));
|
ieee80211_sta_set_expected_throughput(pubsta, sta_get_expected_throughput(sta));
|
||||||
|
|
||||||
|
@ -976,7 +976,7 @@ static int __init af_rxrpc_init(void)
|
|||||||
goto error_security;
|
goto error_security;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = register_pernet_subsys(&rxrpc_net_ops);
|
ret = register_pernet_device(&rxrpc_net_ops);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto error_pernet;
|
goto error_pernet;
|
||||||
|
|
||||||
@ -1021,7 +1021,7 @@ static int __init af_rxrpc_init(void)
|
|||||||
error_sock:
|
error_sock:
|
||||||
proto_unregister(&rxrpc_proto);
|
proto_unregister(&rxrpc_proto);
|
||||||
error_proto:
|
error_proto:
|
||||||
unregister_pernet_subsys(&rxrpc_net_ops);
|
unregister_pernet_device(&rxrpc_net_ops);
|
||||||
error_pernet:
|
error_pernet:
|
||||||
rxrpc_exit_security();
|
rxrpc_exit_security();
|
||||||
error_security:
|
error_security:
|
||||||
@ -1043,7 +1043,7 @@ static void __exit af_rxrpc_exit(void)
|
|||||||
unregister_key_type(&key_type_rxrpc);
|
unregister_key_type(&key_type_rxrpc);
|
||||||
sock_unregister(PF_RXRPC);
|
sock_unregister(PF_RXRPC);
|
||||||
proto_unregister(&rxrpc_proto);
|
proto_unregister(&rxrpc_proto);
|
||||||
unregister_pernet_subsys(&rxrpc_net_ops);
|
unregister_pernet_device(&rxrpc_net_ops);
|
||||||
ASSERTCMP(atomic_read(&rxrpc_n_tx_skbs), ==, 0);
|
ASSERTCMP(atomic_read(&rxrpc_n_tx_skbs), ==, 0);
|
||||||
ASSERTCMP(atomic_read(&rxrpc_n_rx_skbs), ==, 0);
|
ASSERTCMP(atomic_read(&rxrpc_n_rx_skbs), ==, 0);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user