mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
Merge 4.19.160 into android-4.19-stable
Changes in 4.19.160
ah6: fix error return code in ah6_input()
atm: nicstar: Unmap DMA on send error
bnxt_en: read EEPROM A2h address using page 0
devlink: Add missing genlmsg_cancel() in devlink_nl_sb_port_pool_fill()
inet_diag: Fix error path to cancel the meseage in inet_req_diag_fill()
lan743x: fix issue causing intermittent kernel log warnings
lan743x: prevent entire kernel HANG on open, for some platforms
mlxsw: core: Use variable timeout for EMAD retries
net: b44: fix error return code in b44_init_one()
net: bridge: add missing counters to ndo_get_stats64 callback
net: dsa: mv88e6xxx: Avoid VTU corruption on 6097
net: Have netpoll bring-up DSA management interface
netlabel: fix our progress tracking in netlbl_unlabel_staticlist()
netlabel: fix an uninitialized warning in netlbl_unlabel_staticlist()
net/mlx4_core: Fix init_hca fields offset
net: qualcomm: rmnet: Fix incorrect receive packet handling during cleanup
net: x25: Increase refcnt of "struct x25_neigh" in x25_rx_call_request
page_frag: Recover from memory pressure
qed: fix error return code in qed_iwarp_ll2_start()
qlcnic: fix error return code in qlcnic_83xx_restart_hw()
sctp: change to hold/put transport for proto_unreach_timer
tcp: only postpone PROBE_RTT if RTT is < current min_rtt estimate
net/mlx5: Disable QoS when min_rates on all VFs are zero
net: usb: qmi_wwan: Set DTR quirk for MR400
net/ncsi: Fix netlink registration
net: ftgmac100: Fix crash when removing driver
pinctrl: rockchip: enable gpio pclk for rockchip_gpio_to_irq
scsi: ufs: Fix unbalanced scsi_block_reqs_cnt caused by ufshcd_hold()
selftests: kvm: Fix the segment descriptor layout to match the actual layout
ACPI: button: Add DMI quirk for Medion Akoya E2228T
arm64: psci: Avoid printing in cpu_psci_cpu_die()
vfs: remove lockdep bogosity in __sb_start_write
arm64: dts: allwinner: a64: Pine64 Plus: Fix ethernet node
arm64: dts: allwinner: h5: OrangePi PC2: Fix ethernet node
ARM: dts: sun8i: r40: bananapi-m2-ultra: Fix ethernet node
Revert "arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high"
ARM: dts: sun8i: h3: orangepi-plus2e: Enable RGMII RX/TX delay on Ethernet PHY
ARM: dts: sun8i: a83t: Enable both RGMII RX/TX delay on Ethernet PHY
arm64: dts: allwinner: a64: bananapi-m64: Enable RGMII RX/TX delay on PHY
Input: adxl34x - clean up a data type in adxl34x_probe()
MIPS: export has_transparent_hugepage() for modules
arm64: dts: allwinner: h5: OrangePi Prime: Fix ethernet node
arm: dts: imx6qdl-udoo: fix rgmii phy-mode for ksz9031 phy
ARM: dts: imx50-evk: Fix the chip select 1 IOMUX
Input: resistive-adc-touch - fix kconfig dependency on IIO_BUFFER
perf lock: Don't free "lock_seq_stat" if read_count isn't zero
ip_tunnels: Set tunnel option flag when tunnel metadata is present
can: af_can: prevent potential access of uninitialized member in can_rcv()
can: af_can: prevent potential access of uninitialized member in canfd_rcv()
can: dev: can_restart(): post buffer from the right context
can: ti_hecc: Fix memleak in ti_hecc_probe
can: mcba_usb: mcba_usb_start_xmit(): first fill skb, then pass to can_put_echo_skb()
can: peak_usb: fix potential integer overflow on shift of a int
can: m_can: m_can_handle_state_change(): fix state change
ASoC: qcom: lpass-platform: Fix memory leak
MIPS: Alchemy: Fix memleak in alchemy_clk_setup_cpu
drm/sun4i: dw-hdmi: fix error return code in sun8i_dw_hdmi_bind()
can: kvaser_usb: kvaser_usb_hydra: Fix KCAN bittiming limits
xfs: fix the minrecs logic when dealing with inode root child blocks
xfs: strengthen rmap record flags checking
regulator: ti-abb: Fix array out of bound read access on the first transition
fail_function: Remove a redundant mutex unlock
xfs: revert "xfs: fix rmap key and record comparison functions"
efi/x86: Free efi_pgd with free_pages()
libfs: fix error cast of negative value in simple_attr_write()
speakup: Do not let the line discipline be used several times
ALSA: firewire: Clean up a locking issue in copy_resp_to_buf()
ALSA: usb-audio: Add delay quirk for all Logitech USB devices
ALSA: ctl: fix error path at adding user-defined element set
ALSA: mixart: Fix mutex deadlock
ALSA: hda/realtek: Add some Clove SSID in the ALC293(ALC1220)
tty: serial: imx: keep console clocks always on
efivarfs: fix memory leak in efivarfs_create()
staging: rtl8723bs: Add 024c:0627 to the list of SDIO device-ids
ext4: fix bogus warning in ext4_update_dx_flag()
iio: accel: kxcjk1013: Replace is_smo8500_device with an acpi_type enum
iio: accel: kxcjk1013: Add support for KIOX010A ACPI DSM for setting tablet-mode
regulator: pfuze100: limit pfuze-support-disable-sw to pfuze{100,200}
regulator: fix memory leak with repeated set_machine_constraints()
regulator: avoid resolve_supply() infinite recursion
regulator: workaround self-referent regulators
xtensa: disable preemption around cache alias management calls
mac80211: minstrel: remove deferred sampling code
mac80211: minstrel: fix tx status processing corner case
mac80211: free sta in sta_info_insert_finish() on errors
s390/cpum_sf.c: fix file permission for cpum_sfb_size
s390/dasd: fix null pointer dereference for ERP requests
ptrace: Set PF_SUPERPRIV when checking capability
seccomp: Set PF_SUPERPRIV when checking capability
x86/microcode/intel: Check patch signature before saving microcode for early loading
mm/userfaultfd: do not access vma->vm_mm after calling handle_userfault()
Linux 4.19.160
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I3a7304be6687f4ffe96f0e765da0c0ec7dcb971d
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 19
|
||||
SUBLEVEL = 159
|
||||
SUBLEVEL = 160
|
||||
EXTRAVERSION =
|
||||
NAME = "People's Front"
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
MX50_PAD_CSPI_MISO__CSPI_MISO 0x00
|
||||
MX50_PAD_CSPI_MOSI__CSPI_MOSI 0x00
|
||||
MX50_PAD_CSPI_SS0__GPIO4_11 0xc4
|
||||
MX50_PAD_ECSPI1_MOSI__CSPI_SS1 0xf4
|
||||
MX50_PAD_ECSPI1_MOSI__GPIO4_13 0x84
|
||||
>;
|
||||
};
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
&fec {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_enet>;
|
||||
phy-mode = "rgmii";
|
||||
phy-mode = "rgmii-id";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
pinctrl-0 = <&emac_rgmii_pins>;
|
||||
phy-supply = <®_sw>;
|
||||
phy-handle = <&rgmii_phy>;
|
||||
phy-mode = "rgmii";
|
||||
phy-mode = "rgmii-id";
|
||||
allwinner,rx-delay-ps = <700>;
|
||||
allwinner,tx-delay-ps = <700>;
|
||||
status = "okay";
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
pinctrl-0 = <&emac_rgmii_pins>;
|
||||
phy-supply = <®_dldo4>;
|
||||
phy-handle = <&rgmii_phy>;
|
||||
phy-mode = "rgmii";
|
||||
phy-mode = "rgmii-id";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
||||
@@ -53,11 +53,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
&emac {
|
||||
/* LEDs changed to active high on the plus */
|
||||
/delete-property/ allwinner,leds-active-low;
|
||||
};
|
||||
|
||||
&mmc1 {
|
||||
vmmc-supply = <®_vcc3v3>;
|
||||
bus-width = <4>;
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
pinctrl-0 = <&emac_rgmii_pins>;
|
||||
phy-supply = <®_gmac_3v3>;
|
||||
phy-handle = <&ext_rgmii_phy>;
|
||||
phy-mode = "rgmii";
|
||||
phy-mode = "rgmii-id";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&gmac_rgmii_pins>;
|
||||
phy-handle = <&phy1>;
|
||||
phy-mode = "rgmii";
|
||||
phy-mode = "rgmii-id";
|
||||
phy-supply = <®_dc1sw>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
&emac {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii_pins>;
|
||||
phy-mode = "rgmii";
|
||||
phy-mode = "rgmii-id";
|
||||
phy-handle = <&ext_rgmii_phy>;
|
||||
phy-supply = <®_dc1sw>;
|
||||
status = "okay";
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
&emac {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii_pins>;
|
||||
phy-mode = "rgmii";
|
||||
phy-mode = "rgmii-txid";
|
||||
phy-handle = <&ext_rgmii_phy>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
pinctrl-0 = <&emac_rgmii_pins>;
|
||||
phy-supply = <®_gmac_3v3>;
|
||||
phy-handle = <&ext_rgmii_phy>;
|
||||
phy-mode = "rgmii";
|
||||
phy-mode = "rgmii-id";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
pinctrl-0 = <&emac_rgmii_pins>;
|
||||
phy-supply = <®_gmac_3v3>;
|
||||
phy-handle = <&ext_rgmii_phy>;
|
||||
phy-mode = "rgmii";
|
||||
phy-mode = "rgmii-id";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
||||
@@ -70,7 +70,6 @@ static int cpu_psci_cpu_disable(unsigned int cpu)
|
||||
|
||||
static void cpu_psci_cpu_die(unsigned int cpu)
|
||||
{
|
||||
int ret;
|
||||
/*
|
||||
* There are no known implementations of PSCI actually using the
|
||||
* power state field, pass a sensible default for now.
|
||||
@@ -78,9 +77,7 @@ static void cpu_psci_cpu_die(unsigned int cpu)
|
||||
u32 state = PSCI_POWER_STATE_TYPE_POWER_DOWN <<
|
||||
PSCI_0_2_POWER_STATE_TYPE_SHIFT;
|
||||
|
||||
ret = psci_ops.cpu_off(state);
|
||||
|
||||
pr_crit("unable to power off CPU%u (%d)\n", cpu, ret);
|
||||
psci_ops.cpu_off(state);
|
||||
}
|
||||
|
||||
static int cpu_psci_cpu_kill(unsigned int cpu)
|
||||
|
||||
@@ -152,6 +152,7 @@ static struct clk __init *alchemy_clk_setup_cpu(const char *parent_name,
|
||||
{
|
||||
struct clk_init_data id;
|
||||
struct clk_hw *h;
|
||||
struct clk *clk;
|
||||
|
||||
h = kzalloc(sizeof(*h), GFP_KERNEL);
|
||||
if (!h)
|
||||
@@ -164,7 +165,13 @@ static struct clk __init *alchemy_clk_setup_cpu(const char *parent_name,
|
||||
id.ops = &alchemy_clkops_cpu;
|
||||
h->init = &id;
|
||||
|
||||
return clk_register(NULL, h);
|
||||
clk = clk_register(NULL, h);
|
||||
if (IS_ERR(clk)) {
|
||||
pr_err("failed to register clock\n");
|
||||
kfree(h);
|
||||
}
|
||||
|
||||
return clk;
|
||||
}
|
||||
|
||||
/* AUXPLLs ************************************************************/
|
||||
|
||||
@@ -424,6 +424,7 @@ int has_transparent_hugepage(void)
|
||||
}
|
||||
return mask == PM_HUGE_MASK;
|
||||
}
|
||||
EXPORT_SYMBOL(has_transparent_hugepage);
|
||||
|
||||
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
|
||||
|
||||
|
||||
@@ -2097,4 +2097,4 @@ out:
|
||||
return err;
|
||||
}
|
||||
arch_initcall(init_cpum_sampling_pmu);
|
||||
core_param(cpum_sfb_size, CPUM_SF_MAX_SDB, sfb_size, 0640);
|
||||
core_param(cpum_sfb_size, CPUM_SF_MAX_SDB, sfb_size, 0644);
|
||||
|
||||
@@ -103,53 +103,6 @@ static int has_newer_microcode(void *mc, unsigned int csig, int cpf, int new_rev
|
||||
return find_matching_signature(mc, csig, cpf);
|
||||
}
|
||||
|
||||
/*
|
||||
* Given CPU signature and a microcode patch, this function finds if the
|
||||
* microcode patch has matching family and model with the CPU.
|
||||
*
|
||||
* %true - if there's a match
|
||||
* %false - otherwise
|
||||
*/
|
||||
static bool microcode_matches(struct microcode_header_intel *mc_header,
|
||||
unsigned long sig)
|
||||
{
|
||||
unsigned long total_size = get_totalsize(mc_header);
|
||||
unsigned long data_size = get_datasize(mc_header);
|
||||
struct extended_sigtable *ext_header;
|
||||
unsigned int fam_ucode, model_ucode;
|
||||
struct extended_signature *ext_sig;
|
||||
unsigned int fam, model;
|
||||
int ext_sigcount, i;
|
||||
|
||||
fam = x86_family(sig);
|
||||
model = x86_model(sig);
|
||||
|
||||
fam_ucode = x86_family(mc_header->sig);
|
||||
model_ucode = x86_model(mc_header->sig);
|
||||
|
||||
if (fam == fam_ucode && model == model_ucode)
|
||||
return true;
|
||||
|
||||
/* Look for ext. headers: */
|
||||
if (total_size <= data_size + MC_HEADER_SIZE)
|
||||
return false;
|
||||
|
||||
ext_header = (void *) mc_header + data_size + MC_HEADER_SIZE;
|
||||
ext_sig = (void *)ext_header + EXT_HEADER_SIZE;
|
||||
ext_sigcount = ext_header->count;
|
||||
|
||||
for (i = 0; i < ext_sigcount; i++) {
|
||||
fam_ucode = x86_family(ext_sig->sig);
|
||||
model_ucode = x86_model(ext_sig->sig);
|
||||
|
||||
if (fam == fam_ucode && model == model_ucode)
|
||||
return true;
|
||||
|
||||
ext_sig++;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static struct ucode_patch *memdup_patch(void *data, unsigned int size)
|
||||
{
|
||||
struct ucode_patch *p;
|
||||
@@ -167,7 +120,7 @@ static struct ucode_patch *memdup_patch(void *data, unsigned int size)
|
||||
return p;
|
||||
}
|
||||
|
||||
static void save_microcode_patch(void *data, unsigned int size)
|
||||
static void save_microcode_patch(struct ucode_cpu_info *uci, void *data, unsigned int size)
|
||||
{
|
||||
struct microcode_header_intel *mc_hdr, *mc_saved_hdr;
|
||||
struct ucode_patch *iter, *tmp, *p = NULL;
|
||||
@@ -213,6 +166,9 @@ static void save_microcode_patch(void *data, unsigned int size)
|
||||
if (!p)
|
||||
return;
|
||||
|
||||
if (!find_matching_signature(p->data, uci->cpu_sig.sig, uci->cpu_sig.pf))
|
||||
return;
|
||||
|
||||
/*
|
||||
* Save for early loading. On 32-bit, that needs to be a physical
|
||||
* address as the APs are running from physical addresses, before
|
||||
@@ -347,13 +303,14 @@ scan_microcode(void *data, size_t size, struct ucode_cpu_info *uci, bool save)
|
||||
|
||||
size -= mc_size;
|
||||
|
||||
if (!microcode_matches(mc_header, uci->cpu_sig.sig)) {
|
||||
if (!find_matching_signature(data, uci->cpu_sig.sig,
|
||||
uci->cpu_sig.pf)) {
|
||||
data += mc_size;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (save) {
|
||||
save_microcode_patch(data, mc_size);
|
||||
save_microcode_patch(uci, data, mc_size);
|
||||
goto next;
|
||||
}
|
||||
|
||||
@@ -486,14 +443,14 @@ static void show_saved_mc(void)
|
||||
* Save this microcode patch. It will be loaded early when a CPU is
|
||||
* hot-added or resumes.
|
||||
*/
|
||||
static void save_mc_for_early(u8 *mc, unsigned int size)
|
||||
static void save_mc_for_early(struct ucode_cpu_info *uci, u8 *mc, unsigned int size)
|
||||
{
|
||||
/* Synchronization during CPU hotplug. */
|
||||
static DEFINE_MUTEX(x86_cpu_microcode_mutex);
|
||||
|
||||
mutex_lock(&x86_cpu_microcode_mutex);
|
||||
|
||||
save_microcode_patch(mc, size);
|
||||
save_microcode_patch(uci, mc, size);
|
||||
show_saved_mc();
|
||||
|
||||
mutex_unlock(&x86_cpu_microcode_mutex);
|
||||
@@ -937,7 +894,7 @@ static enum ucode_state generic_load_microcode(int cpu, void *data, size_t size,
|
||||
* permanent memory. So it will be loaded early when a CPU is hot added
|
||||
* or resumes.
|
||||
*/
|
||||
save_mc_for_early(new_mc, new_mc_size);
|
||||
save_mc_for_early(uci, new_mc, new_mc_size);
|
||||
|
||||
pr_debug("CPU%d found a matching microcode update with version 0x%x (current=0x%x)\n",
|
||||
cpu, new_rev, uci->cpu_sig.rev);
|
||||
|
||||
@@ -214,28 +214,30 @@ int __init efi_alloc_page_tables(void)
|
||||
gfp_mask = GFP_KERNEL | __GFP_ZERO;
|
||||
efi_pgd = (pgd_t *)__get_free_pages(gfp_mask, PGD_ALLOCATION_ORDER);
|
||||
if (!efi_pgd)
|
||||
return -ENOMEM;
|
||||
goto fail;
|
||||
|
||||
pgd = efi_pgd + pgd_index(EFI_VA_END);
|
||||
p4d = p4d_alloc(&init_mm, pgd, EFI_VA_END);
|
||||
if (!p4d) {
|
||||
free_page((unsigned long)efi_pgd);
|
||||
return -ENOMEM;
|
||||
}
|
||||
if (!p4d)
|
||||
goto free_pgd;
|
||||
|
||||
pud = pud_alloc(&init_mm, p4d, EFI_VA_END);
|
||||
if (!pud) {
|
||||
if (pgtable_l5_enabled())
|
||||
free_page((unsigned long) pgd_page_vaddr(*pgd));
|
||||
free_pages((unsigned long)efi_pgd, PGD_ALLOCATION_ORDER);
|
||||
return -ENOMEM;
|
||||
}
|
||||
if (!pud)
|
||||
goto free_p4d;
|
||||
|
||||
efi_mm.pgd = efi_pgd;
|
||||
mm_init_cpumask(&efi_mm);
|
||||
init_new_context(NULL, &efi_mm);
|
||||
|
||||
return 0;
|
||||
|
||||
free_p4d:
|
||||
if (pgtable_l5_enabled())
|
||||
free_page((unsigned long)pgd_page_vaddr(*pgd));
|
||||
free_pgd:
|
||||
free_pages((unsigned long)efi_pgd, PGD_ALLOCATION_ORDER);
|
||||
fail:
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -71,8 +71,10 @@ static inline void kmap_invalidate_coherent(struct page *page,
|
||||
kvaddr = TLBTEMP_BASE_1 +
|
||||
(page_to_phys(page) & DCACHE_ALIAS_MASK);
|
||||
|
||||
preempt_disable();
|
||||
__invalidate_dcache_page_alias(kvaddr,
|
||||
page_to_phys(page));
|
||||
preempt_enable();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -157,6 +159,7 @@ void flush_dcache_page(struct page *page)
|
||||
if (!alias && !mapping)
|
||||
return;
|
||||
|
||||
preempt_disable();
|
||||
virt = TLBTEMP_BASE_1 + (phys & DCACHE_ALIAS_MASK);
|
||||
__flush_invalidate_dcache_page_alias(virt, phys);
|
||||
|
||||
@@ -167,6 +170,7 @@ void flush_dcache_page(struct page *page)
|
||||
|
||||
if (mapping)
|
||||
__invalidate_icache_page_alias(virt, phys);
|
||||
preempt_enable();
|
||||
}
|
||||
|
||||
/* There shouldn't be an entry in the cache for this page anymore. */
|
||||
@@ -200,8 +204,10 @@ void local_flush_cache_page(struct vm_area_struct *vma, unsigned long address,
|
||||
unsigned long phys = page_to_phys(pfn_to_page(pfn));
|
||||
unsigned long virt = TLBTEMP_BASE_1 + (address & DCACHE_ALIAS_MASK);
|
||||
|
||||
preempt_disable();
|
||||
__flush_invalidate_dcache_page_alias(virt, phys);
|
||||
__invalidate_icache_page_alias(virt, phys);
|
||||
preempt_enable();
|
||||
}
|
||||
EXPORT_SYMBOL(local_flush_cache_page);
|
||||
|
||||
@@ -228,11 +234,13 @@ update_mmu_cache(struct vm_area_struct * vma, unsigned long addr, pte_t *ptep)
|
||||
unsigned long phys = page_to_phys(page);
|
||||
unsigned long tmp;
|
||||
|
||||
preempt_disable();
|
||||
tmp = TLBTEMP_BASE_1 + (phys & DCACHE_ALIAS_MASK);
|
||||
__flush_invalidate_dcache_page_alias(tmp, phys);
|
||||
tmp = TLBTEMP_BASE_1 + (addr & DCACHE_ALIAS_MASK);
|
||||
__flush_invalidate_dcache_page_alias(tmp, phys);
|
||||
__invalidate_icache_page_alias(tmp, phys);
|
||||
preempt_enable();
|
||||
|
||||
clear_bit(PG_arch_1, &page->flags);
|
||||
}
|
||||
@@ -266,7 +274,9 @@ void copy_to_user_page(struct vm_area_struct *vma, struct page *page,
|
||||
|
||||
if (alias) {
|
||||
unsigned long t = TLBTEMP_BASE_1 + (vaddr & DCACHE_ALIAS_MASK);
|
||||
preempt_disable();
|
||||
__flush_invalidate_dcache_page_alias(t, phys);
|
||||
preempt_enable();
|
||||
}
|
||||
|
||||
/* Copy data */
|
||||
@@ -281,9 +291,11 @@ void copy_to_user_page(struct vm_area_struct *vma, struct page *page,
|
||||
if (alias) {
|
||||
unsigned long t = TLBTEMP_BASE_1 + (vaddr & DCACHE_ALIAS_MASK);
|
||||
|
||||
preempt_disable();
|
||||
__flush_invalidate_dcache_range((unsigned long) dst, len);
|
||||
if ((vma->vm_flags & VM_EXEC) != 0)
|
||||
__invalidate_icache_page_alias(t, phys);
|
||||
preempt_enable();
|
||||
|
||||
} else if ((vma->vm_flags & VM_EXEC) != 0) {
|
||||
__flush_dcache_range((unsigned long)dst,len);
|
||||
@@ -305,7 +317,9 @@ extern void copy_from_user_page(struct vm_area_struct *vma, struct page *page,
|
||||
|
||||
if (alias) {
|
||||
unsigned long t = TLBTEMP_BASE_1 + (vaddr & DCACHE_ALIAS_MASK);
|
||||
preempt_disable();
|
||||
__flush_invalidate_dcache_page_alias(t, phys);
|
||||
preempt_enable();
|
||||
}
|
||||
|
||||
memcpy(dst, src, len);
|
||||
|
||||
@@ -98,7 +98,18 @@ static const struct dmi_system_id lid_blacklst[] = {
|
||||
*/
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "MEDION"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "E2215T MD60198"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "E2215T"),
|
||||
},
|
||||
.driver_data = (void *)(long)ACPI_BUTTON_LID_INIT_OPEN,
|
||||
},
|
||||
{
|
||||
/*
|
||||
* Medion Akoya E2228T, notification of the LID device only
|
||||
* happens on close, not on open and _LID always returns closed.
|
||||
*/
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "MEDION"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "E2228T"),
|
||||
},
|
||||
.driver_data = (void *)(long)ACPI_BUTTON_LID_INIT_OPEN,
|
||||
},
|
||||
|
||||
@@ -1705,6 +1705,8 @@ static int ns_send(struct atm_vcc *vcc, struct sk_buff *skb)
|
||||
|
||||
if (push_scqe(card, vc, scq, &scqe, skb) != 0) {
|
||||
atomic_inc(&vcc->stats->tx_err);
|
||||
dma_unmap_single(&card->pcidev->dev, NS_PRV_DMA(skb), skb->len,
|
||||
DMA_TO_DEVICE);
|
||||
dev_kfree_skb_any(skb);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
@@ -140,6 +140,7 @@ static int sun8i_dw_hdmi_bind(struct device *dev, struct device *master,
|
||||
phy_node = of_parse_phandle(dev->of_node, "phys", 0);
|
||||
if (!phy_node) {
|
||||
dev_err(dev, "Can't found PHY phandle\n");
|
||||
ret = -EINVAL;
|
||||
goto err_disable_clk_tmds;
|
||||
}
|
||||
|
||||
|
||||
@@ -134,6 +134,12 @@ enum kx_chipset {
|
||||
KX_MAX_CHIPS /* this must be last */
|
||||
};
|
||||
|
||||
enum kx_acpi_type {
|
||||
ACPI_GENERIC,
|
||||
ACPI_SMO8500,
|
||||
ACPI_KIOX010A,
|
||||
};
|
||||
|
||||
struct kxcjk1013_data {
|
||||
struct i2c_client *client;
|
||||
struct iio_trigger *dready_trig;
|
||||
@@ -150,7 +156,7 @@ struct kxcjk1013_data {
|
||||
bool motion_trigger_on;
|
||||
int64_t timestamp;
|
||||
enum kx_chipset chipset;
|
||||
bool is_smo8500_device;
|
||||
enum kx_acpi_type acpi_type;
|
||||
};
|
||||
|
||||
enum kxcjk1013_axis {
|
||||
@@ -277,6 +283,32 @@ static const struct {
|
||||
{19163, 1, 0},
|
||||
{38326, 0, 1} };
|
||||
|
||||
#ifdef CONFIG_ACPI
|
||||
enum kiox010a_fn_index {
|
||||
KIOX010A_SET_LAPTOP_MODE = 1,
|
||||
KIOX010A_SET_TABLET_MODE = 2,
|
||||
};
|
||||
|
||||
static int kiox010a_dsm(struct device *dev, int fn_index)
|
||||
{
|
||||
acpi_handle handle = ACPI_HANDLE(dev);
|
||||
guid_t kiox010a_dsm_guid;
|
||||
union acpi_object *obj;
|
||||
|
||||
if (!handle)
|
||||
return -ENODEV;
|
||||
|
||||
guid_parse("1f339696-d475-4e26-8cad-2e9f8e6d7a91", &kiox010a_dsm_guid);
|
||||
|
||||
obj = acpi_evaluate_dsm(handle, &kiox010a_dsm_guid, 1, fn_index, NULL);
|
||||
if (!obj)
|
||||
return -EIO;
|
||||
|
||||
ACPI_FREE(obj);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int kxcjk1013_set_mode(struct kxcjk1013_data *data,
|
||||
enum kxcjk1013_mode mode)
|
||||
{
|
||||
@@ -354,6 +386,13 @@ static int kxcjk1013_chip_init(struct kxcjk1013_data *data)
|
||||
{
|
||||
int ret;
|
||||
|
||||
#ifdef CONFIG_ACPI
|
||||
if (data->acpi_type == ACPI_KIOX010A) {
|
||||
/* Make sure the kbd and touchpad on 2-in-1s using 2 KXCJ91008-s work */
|
||||
kiox010a_dsm(&data->client->dev, KIOX010A_SET_LAPTOP_MODE);
|
||||
}
|
||||
#endif
|
||||
|
||||
ret = i2c_smbus_read_byte_data(data->client, KXCJK1013_REG_WHO_AM_I);
|
||||
if (ret < 0) {
|
||||
dev_err(&data->client->dev, "Error reading who_am_i\n");
|
||||
@@ -1241,7 +1280,7 @@ static irqreturn_t kxcjk1013_data_rdy_trig_poll(int irq, void *private)
|
||||
|
||||
static const char *kxcjk1013_match_acpi_device(struct device *dev,
|
||||
enum kx_chipset *chipset,
|
||||
bool *is_smo8500_device)
|
||||
enum kx_acpi_type *acpi_type)
|
||||
{
|
||||
const struct acpi_device_id *id;
|
||||
|
||||
@@ -1250,7 +1289,9 @@ static const char *kxcjk1013_match_acpi_device(struct device *dev,
|
||||
return NULL;
|
||||
|
||||
if (strcmp(id->id, "SMO8500") == 0)
|
||||
*is_smo8500_device = true;
|
||||
*acpi_type = ACPI_SMO8500;
|
||||
else if (strcmp(id->id, "KIOX010A") == 0)
|
||||
*acpi_type = ACPI_KIOX010A;
|
||||
|
||||
*chipset = (enum kx_chipset)id->driver_data;
|
||||
|
||||
@@ -1286,7 +1327,7 @@ static int kxcjk1013_probe(struct i2c_client *client,
|
||||
} else if (ACPI_HANDLE(&client->dev)) {
|
||||
name = kxcjk1013_match_acpi_device(&client->dev,
|
||||
&data->chipset,
|
||||
&data->is_smo8500_device);
|
||||
&data->acpi_type);
|
||||
} else
|
||||
return -ENODEV;
|
||||
|
||||
@@ -1304,7 +1345,7 @@ static int kxcjk1013_probe(struct i2c_client *client,
|
||||
indio_dev->modes = INDIO_DIRECT_MODE;
|
||||
indio_dev->info = &kxcjk1013_info;
|
||||
|
||||
if (client->irq > 0 && !data->is_smo8500_device) {
|
||||
if (client->irq > 0 && data->acpi_type != ACPI_SMO8500) {
|
||||
ret = devm_request_threaded_irq(&client->dev, client->irq,
|
||||
kxcjk1013_data_rdy_trig_poll,
|
||||
kxcjk1013_event_handler,
|
||||
|
||||
@@ -696,7 +696,7 @@ struct adxl34x *adxl34x_probe(struct device *dev, int irq,
|
||||
struct input_dev *input_dev;
|
||||
const struct adxl34x_platform_data *pdata;
|
||||
int err, range, i;
|
||||
unsigned char revid;
|
||||
int revid;
|
||||
|
||||
if (!irq) {
|
||||
dev_err(dev, "no IRQ?\n");
|
||||
|
||||
@@ -95,6 +95,7 @@ config TOUCHSCREEN_AD7879_SPI
|
||||
config TOUCHSCREEN_ADC
|
||||
tristate "Generic ADC based resistive touchscreen"
|
||||
depends on IIO
|
||||
select IIO_BUFFER
|
||||
select IIO_BUFFER_CB
|
||||
help
|
||||
Say Y here if you want to use the generic ADC
|
||||
|
||||
@@ -579,7 +579,7 @@ static void can_restart(struct net_device *dev)
|
||||
}
|
||||
cf->can_id |= CAN_ERR_RESTARTED;
|
||||
|
||||
netif_rx(skb);
|
||||
netif_rx_ni(skb);
|
||||
|
||||
stats->rx_packets++;
|
||||
stats->rx_bytes += cf->can_dlc;
|
||||
|
||||
@@ -675,7 +675,7 @@ static int m_can_handle_state_change(struct net_device *dev,
|
||||
unsigned int ecr;
|
||||
|
||||
switch (new_state) {
|
||||
case CAN_STATE_ERROR_ACTIVE:
|
||||
case CAN_STATE_ERROR_WARNING:
|
||||
/* error warning state */
|
||||
priv->can.can_stats.error_warning++;
|
||||
priv->can.state = CAN_STATE_ERROR_WARNING;
|
||||
@@ -704,7 +704,7 @@ static int m_can_handle_state_change(struct net_device *dev,
|
||||
__m_can_get_berr_counter(dev, &bec);
|
||||
|
||||
switch (new_state) {
|
||||
case CAN_STATE_ERROR_ACTIVE:
|
||||
case CAN_STATE_ERROR_WARNING:
|
||||
/* error warning state */
|
||||
cf->can_id |= CAN_ERR_CRTL;
|
||||
cf->data[1] = (bec.txerr > bec.rxerr) ?
|
||||
|
||||
@@ -903,7 +903,8 @@ static int ti_hecc_probe(struct platform_device *pdev)
|
||||
priv->base = devm_ioremap_resource(&pdev->dev, res);
|
||||
if (IS_ERR(priv->base)) {
|
||||
dev_err(&pdev->dev, "hecc ioremap failed\n");
|
||||
return PTR_ERR(priv->base);
|
||||
err = PTR_ERR(priv->base);
|
||||
goto probe_exit_candev;
|
||||
}
|
||||
|
||||
/* handle hecc-ram memory */
|
||||
@@ -916,7 +917,8 @@ static int ti_hecc_probe(struct platform_device *pdev)
|
||||
priv->hecc_ram = devm_ioremap_resource(&pdev->dev, res);
|
||||
if (IS_ERR(priv->hecc_ram)) {
|
||||
dev_err(&pdev->dev, "hecc-ram ioremap failed\n");
|
||||
return PTR_ERR(priv->hecc_ram);
|
||||
err = PTR_ERR(priv->hecc_ram);
|
||||
goto probe_exit_candev;
|
||||
}
|
||||
|
||||
/* handle mbx memory */
|
||||
@@ -929,13 +931,14 @@ static int ti_hecc_probe(struct platform_device *pdev)
|
||||
priv->mbx = devm_ioremap_resource(&pdev->dev, res);
|
||||
if (IS_ERR(priv->mbx)) {
|
||||
dev_err(&pdev->dev, "mbx ioremap failed\n");
|
||||
return PTR_ERR(priv->mbx);
|
||||
err = PTR_ERR(priv->mbx);
|
||||
goto probe_exit_candev;
|
||||
}
|
||||
|
||||
irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
|
||||
if (!irq) {
|
||||
dev_err(&pdev->dev, "No irq resource\n");
|
||||
goto probe_exit;
|
||||
goto probe_exit_candev;
|
||||
}
|
||||
|
||||
priv->ndev = ndev;
|
||||
@@ -988,7 +991,7 @@ probe_exit_clk:
|
||||
clk_put(priv->clk);
|
||||
probe_exit_candev:
|
||||
free_candev(ndev);
|
||||
probe_exit:
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
@@ -367,7 +367,7 @@ static const struct can_bittiming_const kvaser_usb_hydra_kcan_bittiming_c = {
|
||||
.tseg2_max = 32,
|
||||
.sjw_max = 16,
|
||||
.brp_min = 1,
|
||||
.brp_max = 4096,
|
||||
.brp_max = 8192,
|
||||
.brp_inc = 1,
|
||||
};
|
||||
|
||||
|
||||
@@ -337,8 +337,6 @@ static netdev_tx_t mcba_usb_start_xmit(struct sk_buff *skb,
|
||||
if (!ctx)
|
||||
return NETDEV_TX_BUSY;
|
||||
|
||||
can_put_echo_skb(skb, priv->netdev, ctx->ndx);
|
||||
|
||||
if (cf->can_id & CAN_EFF_FLAG) {
|
||||
/* SIDH | SIDL | EIDH | EIDL
|
||||
* 28 - 21 | 20 19 18 x x x 17 16 | 15 - 8 | 7 - 0
|
||||
@@ -368,6 +366,8 @@ static netdev_tx_t mcba_usb_start_xmit(struct sk_buff *skb,
|
||||
if (cf->can_id & CAN_RTR_FLAG)
|
||||
usb_msg.dlc |= MCBA_DLC_RTR_MASK;
|
||||
|
||||
can_put_echo_skb(skb, priv->netdev, ctx->ndx);
|
||||
|
||||
err = mcba_usb_xmit(priv, (struct mcba_usb_msg *)&usb_msg, ctx);
|
||||
if (err)
|
||||
goto xmit_failed;
|
||||
|
||||
@@ -164,7 +164,7 @@ void peak_usb_get_ts_time(struct peak_time_ref *time_ref, u32 ts, ktime_t *time)
|
||||
if (time_ref->ts_dev_1 < time_ref->ts_dev_2) {
|
||||
/* case when event time (tsw) wraps */
|
||||
if (ts < time_ref->ts_dev_1)
|
||||
delta_ts = 1 << time_ref->adapter->ts_used_bits;
|
||||
delta_ts = BIT_ULL(time_ref->adapter->ts_used_bits);
|
||||
|
||||
/* Otherwise, sync time counter (ts_dev_2) has wrapped:
|
||||
* handle case when event time (tsn) hasn't.
|
||||
@@ -176,7 +176,7 @@ void peak_usb_get_ts_time(struct peak_time_ref *time_ref, u32 ts, ktime_t *time)
|
||||
* tsn ts
|
||||
*/
|
||||
} else if (time_ref->ts_dev_1 < ts) {
|
||||
delta_ts = -(1 << time_ref->adapter->ts_used_bits);
|
||||
delta_ts = -BIT_ULL(time_ref->adapter->ts_used_bits);
|
||||
}
|
||||
|
||||
/* add delay between last sync and event timestamps */
|
||||
|
||||
@@ -127,11 +127,9 @@ static int mv88e6xxx_g1_vtu_vid_write(struct mv88e6xxx_chip *chip,
|
||||
* Offset 0x08: VTU/STU Data Register 2
|
||||
* Offset 0x09: VTU/STU Data Register 3
|
||||
*/
|
||||
|
||||
static int mv88e6185_g1_vtu_data_read(struct mv88e6xxx_chip *chip,
|
||||
struct mv88e6xxx_vtu_entry *entry)
|
||||
static int mv88e6185_g1_vtu_stu_data_read(struct mv88e6xxx_chip *chip,
|
||||
u16 *regs)
|
||||
{
|
||||
u16 regs[3];
|
||||
int i;
|
||||
|
||||
/* Read all 3 VTU/STU Data registers */
|
||||
@@ -144,12 +142,45 @@ static int mv88e6185_g1_vtu_data_read(struct mv88e6xxx_chip *chip,
|
||||
return err;
|
||||
}
|
||||
|
||||
/* Extract MemberTag and PortState data */
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int mv88e6185_g1_vtu_data_read(struct mv88e6xxx_chip *chip,
|
||||
struct mv88e6xxx_vtu_entry *entry)
|
||||
{
|
||||
u16 regs[3];
|
||||
int err;
|
||||
int i;
|
||||
|
||||
err = mv88e6185_g1_vtu_stu_data_read(chip, regs);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
/* Extract MemberTag data */
|
||||
for (i = 0; i < mv88e6xxx_num_ports(chip); ++i) {
|
||||
unsigned int member_offset = (i % 4) * 4;
|
||||
unsigned int state_offset = member_offset + 2;
|
||||
|
||||
entry->member[i] = (regs[i / 4] >> member_offset) & 0x3;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int mv88e6185_g1_stu_data_read(struct mv88e6xxx_chip *chip,
|
||||
struct mv88e6xxx_vtu_entry *entry)
|
||||
{
|
||||
u16 regs[3];
|
||||
int err;
|
||||
int i;
|
||||
|
||||
err = mv88e6185_g1_vtu_stu_data_read(chip, regs);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
/* Extract PortState data */
|
||||
for (i = 0; i < mv88e6xxx_num_ports(chip); ++i) {
|
||||
unsigned int state_offset = (i % 4) * 4 + 2;
|
||||
|
||||
entry->state[i] = (regs[i / 4] >> state_offset) & 0x3;
|
||||
}
|
||||
|
||||
@@ -322,6 +353,10 @@ int mv88e6185_g1_vtu_getnext(struct mv88e6xxx_chip *chip,
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
err = mv88e6185_g1_stu_data_read(chip, entry);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
/* VTU DBNum[3:0] are located in VTU Operation 3:0
|
||||
* VTU DBNum[7:4] are located in VTU Operation 11:8
|
||||
*/
|
||||
@@ -347,11 +382,6 @@ int mv88e6352_g1_vtu_getnext(struct mv88e6xxx_chip *chip,
|
||||
return err;
|
||||
|
||||
if (entry->valid) {
|
||||
/* Fetch (and mask) VLAN PortState data from the STU */
|
||||
err = mv88e6xxx_g1_vtu_stu_get(chip, entry);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
err = mv88e6185_g1_vtu_data_read(chip, entry);
|
||||
if (err)
|
||||
return err;
|
||||
@@ -359,6 +389,15 @@ int mv88e6352_g1_vtu_getnext(struct mv88e6xxx_chip *chip,
|
||||
err = mv88e6xxx_g1_vtu_fid_read(chip, entry);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
/* Fetch VLAN PortState data from the STU */
|
||||
err = mv88e6xxx_g1_vtu_stu_get(chip, entry);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
err = mv88e6185_g1_stu_data_read(chip, entry);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -2389,7 +2389,8 @@ static int b44_init_one(struct ssb_device *sdev,
|
||||
goto err_out_free_dev;
|
||||
}
|
||||
|
||||
if (dma_set_mask_and_coherent(sdev->dma_dev, DMA_BIT_MASK(30))) {
|
||||
err = dma_set_mask_and_coherent(sdev->dma_dev, DMA_BIT_MASK(30));
|
||||
if (err) {
|
||||
dev_err(sdev->dev,
|
||||
"Required 30BIT DMA mask unsupported by the system\n");
|
||||
goto err_out_powerdown;
|
||||
|
||||
@@ -2300,7 +2300,7 @@ static int bnxt_get_module_eeprom(struct net_device *dev,
|
||||
/* Read A2 portion of the EEPROM */
|
||||
if (length) {
|
||||
start -= ETH_MODULE_SFF_8436_LEN;
|
||||
rc = bnxt_read_sfp_module_eeprom_info(bp, I2C_DEV_ADDR_A2, 1,
|
||||
rc = bnxt_read_sfp_module_eeprom_info(bp, I2C_DEV_ADDR_A2, 0,
|
||||
start, length, data);
|
||||
}
|
||||
return rc;
|
||||
|
||||
@@ -1884,6 +1884,8 @@ static int ftgmac100_probe(struct platform_device *pdev)
|
||||
return 0;
|
||||
|
||||
err_ncsi_dev:
|
||||
if (priv->ndev)
|
||||
ncsi_unregister_dev(priv->ndev);
|
||||
err_register_netdev:
|
||||
ftgmac100_destroy_mdio(netdev);
|
||||
err_setup_mdio:
|
||||
@@ -1904,6 +1906,8 @@ static int ftgmac100_remove(struct platform_device *pdev)
|
||||
netdev = platform_get_drvdata(pdev);
|
||||
priv = netdev_priv(netdev);
|
||||
|
||||
if (priv->ndev)
|
||||
ncsi_unregister_dev(priv->ndev);
|
||||
unregister_netdev(netdev);
|
||||
|
||||
clk_disable_unprepare(priv->clk);
|
||||
|
||||
@@ -1861,8 +1861,8 @@ int mlx4_INIT_HCA(struct mlx4_dev *dev, struct mlx4_init_hca_param *param)
|
||||
#define INIT_HCA_LOG_RD_OFFSET (INIT_HCA_QPC_OFFSET + 0x77)
|
||||
#define INIT_HCA_MCAST_OFFSET 0x0c0
|
||||
#define INIT_HCA_MC_BASE_OFFSET (INIT_HCA_MCAST_OFFSET + 0x00)
|
||||
#define INIT_HCA_LOG_MC_ENTRY_SZ_OFFSET (INIT_HCA_MCAST_OFFSET + 0x12)
|
||||
#define INIT_HCA_LOG_MC_HASH_SZ_OFFSET (INIT_HCA_MCAST_OFFSET + 0x16)
|
||||
#define INIT_HCA_LOG_MC_ENTRY_SZ_OFFSET (INIT_HCA_MCAST_OFFSET + 0x13)
|
||||
#define INIT_HCA_LOG_MC_HASH_SZ_OFFSET (INIT_HCA_MCAST_OFFSET + 0x17)
|
||||
#define INIT_HCA_UC_STEERING_OFFSET (INIT_HCA_MCAST_OFFSET + 0x18)
|
||||
#define INIT_HCA_LOG_MC_TABLE_SZ_OFFSET (INIT_HCA_MCAST_OFFSET + 0x1b)
|
||||
#define INIT_HCA_DEVICE_MANAGED_FLOW_STEERING_EN 0x6
|
||||
@@ -1870,7 +1870,7 @@ int mlx4_INIT_HCA(struct mlx4_dev *dev, struct mlx4_init_hca_param *param)
|
||||
#define INIT_HCA_DRIVER_VERSION_SZ 0x40
|
||||
#define INIT_HCA_FS_PARAM_OFFSET 0x1d0
|
||||
#define INIT_HCA_FS_BASE_OFFSET (INIT_HCA_FS_PARAM_OFFSET + 0x00)
|
||||
#define INIT_HCA_FS_LOG_ENTRY_SZ_OFFSET (INIT_HCA_FS_PARAM_OFFSET + 0x12)
|
||||
#define INIT_HCA_FS_LOG_ENTRY_SZ_OFFSET (INIT_HCA_FS_PARAM_OFFSET + 0x13)
|
||||
#define INIT_HCA_FS_A0_OFFSET (INIT_HCA_FS_PARAM_OFFSET + 0x18)
|
||||
#define INIT_HCA_FS_LOG_TABLE_SZ_OFFSET (INIT_HCA_FS_PARAM_OFFSET + 0x1b)
|
||||
#define INIT_HCA_FS_ETH_BITS_OFFSET (INIT_HCA_FS_PARAM_OFFSET + 0x21)
|
||||
|
||||
@@ -182,8 +182,8 @@ struct mlx4_init_hca_param {
|
||||
u64 cmpt_base;
|
||||
u64 mtt_base;
|
||||
u64 global_caps;
|
||||
u16 log_mc_entry_sz;
|
||||
u16 log_mc_hash_sz;
|
||||
u8 log_mc_entry_sz;
|
||||
u8 log_mc_hash_sz;
|
||||
u16 hca_core_clock; /* Internal Clock Frequency (in MHz) */
|
||||
u8 log_num_qps;
|
||||
u8 log_num_srqs;
|
||||
|
||||
@@ -1999,12 +1999,15 @@ static u32 calculate_vports_min_rate_divider(struct mlx5_eswitch *esw)
|
||||
max_guarantee = evport->info.min_rate;
|
||||
}
|
||||
|
||||
return max_t(u32, max_guarantee / fw_max_bw_share, 1);
|
||||
if (max_guarantee)
|
||||
return max_t(u32, max_guarantee / fw_max_bw_share, 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int normalize_vports_min_rate(struct mlx5_eswitch *esw, u32 divider)
|
||||
static int normalize_vports_min_rate(struct mlx5_eswitch *esw)
|
||||
{
|
||||
u32 fw_max_bw_share = MLX5_CAP_QOS(esw->dev, max_tsar_bw_share);
|
||||
u32 divider = calculate_vports_min_rate_divider(esw);
|
||||
struct mlx5_vport *evport;
|
||||
u32 vport_max_rate;
|
||||
u32 vport_min_rate;
|
||||
@@ -2018,9 +2021,9 @@ static int normalize_vports_min_rate(struct mlx5_eswitch *esw, u32 divider)
|
||||
continue;
|
||||
vport_min_rate = evport->info.min_rate;
|
||||
vport_max_rate = evport->info.max_rate;
|
||||
bw_share = MLX5_MIN_BW_SHARE;
|
||||
bw_share = 0;
|
||||
|
||||
if (vport_min_rate)
|
||||
if (divider)
|
||||
bw_share = MLX5_RATE_TO_BW_SHARE(vport_min_rate,
|
||||
divider,
|
||||
fw_max_bw_share);
|
||||
@@ -2045,7 +2048,6 @@ int mlx5_eswitch_set_vport_rate(struct mlx5_eswitch *esw, int vport,
|
||||
struct mlx5_vport *evport;
|
||||
u32 fw_max_bw_share;
|
||||
u32 previous_min_rate;
|
||||
u32 divider;
|
||||
bool min_rate_supported;
|
||||
bool max_rate_supported;
|
||||
int err = 0;
|
||||
@@ -2071,8 +2073,7 @@ int mlx5_eswitch_set_vport_rate(struct mlx5_eswitch *esw, int vport,
|
||||
|
||||
previous_min_rate = evport->info.min_rate;
|
||||
evport->info.min_rate = min_rate;
|
||||
divider = calculate_vports_min_rate_divider(esw);
|
||||
err = normalize_vports_min_rate(esw, divider);
|
||||
err = normalize_vports_min_rate(esw);
|
||||
if (err) {
|
||||
evport->info.min_rate = previous_min_rate;
|
||||
goto unlock;
|
||||
|
||||
@@ -439,7 +439,8 @@ static void mlxsw_emad_trans_timeout_schedule(struct mlxsw_reg_trans *trans)
|
||||
if (trans->core->fw_flash_in_progress)
|
||||
timeout = msecs_to_jiffies(MLXSW_EMAD_TIMEOUT_DURING_FW_FLASH_MS);
|
||||
|
||||
queue_delayed_work(trans->core->emad_wq, &trans->timeout_dw, timeout);
|
||||
queue_delayed_work(trans->core->emad_wq, &trans->timeout_dw,
|
||||
timeout << trans->retries);
|
||||
}
|
||||
|
||||
static int mlxsw_emad_transmit(struct mlxsw_core *mlxsw_core,
|
||||
|
||||
@@ -145,7 +145,8 @@ static void lan743x_intr_software_isr(void *context)
|
||||
|
||||
int_sts = lan743x_csr_read(adapter, INT_STS);
|
||||
if (int_sts & INT_BIT_SW_GP_) {
|
||||
lan743x_csr_write(adapter, INT_STS, INT_BIT_SW_GP_);
|
||||
/* disable the interrupt to prevent repeated re-triggering */
|
||||
lan743x_csr_write(adapter, INT_EN_CLR, INT_BIT_SW_GP_);
|
||||
intr->software_isr_flag = 1;
|
||||
}
|
||||
}
|
||||
@@ -1245,13 +1246,13 @@ clean_up_data_descriptor:
|
||||
goto clear_active;
|
||||
|
||||
if (!(buffer_info->flags & TX_BUFFER_INFO_FLAG_TIMESTAMP_REQUESTED)) {
|
||||
dev_kfree_skb(buffer_info->skb);
|
||||
dev_kfree_skb_any(buffer_info->skb);
|
||||
goto clear_skb;
|
||||
}
|
||||
|
||||
if (cleanup) {
|
||||
lan743x_ptp_unrequest_tx_timestamp(tx->adapter);
|
||||
dev_kfree_skb(buffer_info->skb);
|
||||
dev_kfree_skb_any(buffer_info->skb);
|
||||
} else {
|
||||
ignore_sync = (buffer_info->flags &
|
||||
TX_BUFFER_INFO_FLAG_IGNORE_SYNC) != 0;
|
||||
@@ -1561,7 +1562,7 @@ static netdev_tx_t lan743x_tx_xmit_frame(struct lan743x_tx *tx,
|
||||
if (required_number_of_descriptors >
|
||||
lan743x_tx_get_avail_desc(tx)) {
|
||||
if (required_number_of_descriptors > (tx->ring_size - 1)) {
|
||||
dev_kfree_skb(skb);
|
||||
dev_kfree_skb_irq(skb);
|
||||
} else {
|
||||
/* save to overflow buffer */
|
||||
tx->overflow_skb = skb;
|
||||
@@ -1594,7 +1595,7 @@ static netdev_tx_t lan743x_tx_xmit_frame(struct lan743x_tx *tx,
|
||||
start_frame_length,
|
||||
do_timestamp,
|
||||
skb->ip_summed == CHECKSUM_PARTIAL)) {
|
||||
dev_kfree_skb(skb);
|
||||
dev_kfree_skb_irq(skb);
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
@@ -1614,7 +1615,7 @@ static netdev_tx_t lan743x_tx_xmit_frame(struct lan743x_tx *tx,
|
||||
* frame assembler clean up was performed inside
|
||||
* lan743x_tx_frame_add_fragment
|
||||
*/
|
||||
dev_kfree_skb(skb);
|
||||
dev_kfree_skb_irq(skb);
|
||||
goto unlock;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2737,14 +2737,18 @@ qed_iwarp_ll2_start(struct qed_hwfn *p_hwfn,
|
||||
iwarp_info->partial_fpdus = kcalloc((u16)p_hwfn->p_rdma_info->num_qps,
|
||||
sizeof(*iwarp_info->partial_fpdus),
|
||||
GFP_KERNEL);
|
||||
if (!iwarp_info->partial_fpdus)
|
||||
if (!iwarp_info->partial_fpdus) {
|
||||
rc = -ENOMEM;
|
||||
goto err;
|
||||
}
|
||||
|
||||
iwarp_info->max_num_partial_fpdus = (u16)p_hwfn->p_rdma_info->num_qps;
|
||||
|
||||
iwarp_info->mpa_intermediate_buf = kzalloc(buff_size, GFP_KERNEL);
|
||||
if (!iwarp_info->mpa_intermediate_buf)
|
||||
if (!iwarp_info->mpa_intermediate_buf) {
|
||||
rc = -ENOMEM;
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* The mpa_bufs array serves for pending RX packets received on the
|
||||
* mpa ll2 that don't have place on the tx ring and require later
|
||||
@@ -2754,8 +2758,10 @@ qed_iwarp_ll2_start(struct qed_hwfn *p_hwfn,
|
||||
iwarp_info->mpa_bufs = kcalloc(data.input.rx_num_desc,
|
||||
sizeof(*iwarp_info->mpa_bufs),
|
||||
GFP_KERNEL);
|
||||
if (!iwarp_info->mpa_bufs)
|
||||
if (!iwarp_info->mpa_bufs) {
|
||||
rc = -ENOMEM;
|
||||
goto err;
|
||||
}
|
||||
|
||||
INIT_LIST_HEAD(&iwarp_info->mpa_buf_pending_list);
|
||||
INIT_LIST_HEAD(&iwarp_info->mpa_buf_list);
|
||||
|
||||
@@ -2251,7 +2251,8 @@ static int qlcnic_83xx_restart_hw(struct qlcnic_adapter *adapter)
|
||||
|
||||
/* Boot either flash image or firmware image from host file system */
|
||||
if (qlcnic_load_fw_file == 1) {
|
||||
if (qlcnic_83xx_load_fw_image_from_host(adapter))
|
||||
err = qlcnic_83xx_load_fw_image_from_host(adapter);
|
||||
if (err)
|
||||
return err;
|
||||
} else {
|
||||
QLC_SHARED_REG_WR32(adapter, QLCNIC_FW_IMG_VALID,
|
||||
|
||||
@@ -197,6 +197,11 @@ rx_handler_result_t rmnet_rx_handler(struct sk_buff **pskb)
|
||||
|
||||
dev = skb->dev;
|
||||
port = rmnet_get_port_rcu(dev);
|
||||
if (unlikely(!port)) {
|
||||
atomic_long_inc(&skb->dev->rx_nohandler);
|
||||
kfree_skb(skb);
|
||||
goto done;
|
||||
}
|
||||
|
||||
switch (port->rmnet_mode) {
|
||||
case RMNET_EPMODE_VND:
|
||||
|
||||
@@ -223,8 +223,7 @@ static void geneve_rx(struct geneve_dev *geneve, struct geneve_sock *gs,
|
||||
if (ip_tunnel_collect_metadata() || gs->collect_md) {
|
||||
__be16 flags;
|
||||
|
||||
flags = TUNNEL_KEY | TUNNEL_GENEVE_OPT |
|
||||
(gnvh->oam ? TUNNEL_OAM : 0) |
|
||||
flags = TUNNEL_KEY | (gnvh->oam ? TUNNEL_OAM : 0) |
|
||||
(gnvh->critical ? TUNNEL_CRIT_OPT : 0);
|
||||
|
||||
tun_dst = udp_tun_rx_dst(skb, geneve_get_sk_family(gs), flags,
|
||||
|
||||
@@ -1029,7 +1029,7 @@ static const struct usb_device_id products[] = {
|
||||
{QMI_FIXED_INTF(0x05c6, 0x9011, 4)},
|
||||
{QMI_FIXED_INTF(0x05c6, 0x9021, 1)},
|
||||
{QMI_FIXED_INTF(0x05c6, 0x9022, 2)},
|
||||
{QMI_FIXED_INTF(0x05c6, 0x9025, 4)}, /* Alcatel-sbell ASB TL131 TDD LTE (China Mobile) */
|
||||
{QMI_QUIRK_SET_DTR(0x05c6, 0x9025, 4)}, /* Alcatel-sbell ASB TL131 TDD LTE (China Mobile) */
|
||||
{QMI_FIXED_INTF(0x05c6, 0x9026, 3)},
|
||||
{QMI_FIXED_INTF(0x05c6, 0x902e, 5)},
|
||||
{QMI_FIXED_INTF(0x05c6, 0x9031, 5)},
|
||||
|
||||
@@ -2778,7 +2778,9 @@ static int rockchip_gpio_to_irq(struct gpio_chip *gc, unsigned offset)
|
||||
if (!bank->domain)
|
||||
return -ENXIO;
|
||||
|
||||
clk_enable(bank->clk);
|
||||
virq = irq_create_mapping(bank->domain, offset);
|
||||
clk_disable(bank->clk);
|
||||
|
||||
return (virq) ? : -ENXIO;
|
||||
}
|
||||
|
||||
@@ -1134,7 +1134,6 @@ static int _regulator_do_enable(struct regulator_dev *rdev);
|
||||
/**
|
||||
* set_machine_constraints - sets regulator constraints
|
||||
* @rdev: regulator source
|
||||
* @constraints: constraints to apply
|
||||
*
|
||||
* Allows platform initialisation code to define and constrain
|
||||
* regulator circuits e.g. valid voltage/current ranges, etc. NOTE:
|
||||
@@ -1142,21 +1141,11 @@ static int _regulator_do_enable(struct regulator_dev *rdev);
|
||||
* regulator operations to proceed i.e. set_voltage, set_current_limit,
|
||||
* set_mode.
|
||||
*/
|
||||
static int set_machine_constraints(struct regulator_dev *rdev,
|
||||
const struct regulation_constraints *constraints)
|
||||
static int set_machine_constraints(struct regulator_dev *rdev)
|
||||
{
|
||||
int ret = 0;
|
||||
const struct regulator_ops *ops = rdev->desc->ops;
|
||||
|
||||
if (constraints)
|
||||
rdev->constraints = kmemdup(constraints, sizeof(*constraints),
|
||||
GFP_KERNEL);
|
||||
else
|
||||
rdev->constraints = kzalloc(sizeof(*constraints),
|
||||
GFP_KERNEL);
|
||||
if (!rdev->constraints)
|
||||
return -ENOMEM;
|
||||
|
||||
ret = machine_constraints_voltage(rdev, rdev->constraints);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
@@ -1649,6 +1638,15 @@ static int regulator_resolve_supply(struct regulator_dev *rdev)
|
||||
}
|
||||
}
|
||||
|
||||
if (r == rdev) {
|
||||
dev_err(dev, "Supply for %s (%s) resolved to itself\n",
|
||||
rdev->desc->name, rdev->supply_name);
|
||||
if (!have_full_constraints())
|
||||
return -EINVAL;
|
||||
r = dummy_regulator_rdev;
|
||||
get_device(&r->dev);
|
||||
}
|
||||
|
||||
/*
|
||||
* If the supply's parent device is not the same as the
|
||||
* regulator's parent device, then ensure the parent device
|
||||
@@ -4290,7 +4288,6 @@ struct regulator_dev *
|
||||
regulator_register(const struct regulator_desc *regulator_desc,
|
||||
const struct regulator_config *cfg)
|
||||
{
|
||||
const struct regulation_constraints *constraints = NULL;
|
||||
const struct regulator_init_data *init_data;
|
||||
struct regulator_config *config = NULL;
|
||||
static atomic_t regulator_no = ATOMIC_INIT(-1);
|
||||
@@ -4391,14 +4388,23 @@ regulator_register(const struct regulator_desc *regulator_desc,
|
||||
|
||||
/* set regulator constraints */
|
||||
if (init_data)
|
||||
constraints = &init_data->constraints;
|
||||
rdev->constraints = kmemdup(&init_data->constraints,
|
||||
sizeof(*rdev->constraints),
|
||||
GFP_KERNEL);
|
||||
else
|
||||
rdev->constraints = kzalloc(sizeof(*rdev->constraints),
|
||||
GFP_KERNEL);
|
||||
if (!rdev->constraints) {
|
||||
ret = -ENOMEM;
|
||||
goto wash;
|
||||
}
|
||||
|
||||
if (init_data && init_data->supply_regulator)
|
||||
rdev->supply_name = init_data->supply_regulator;
|
||||
else if (regulator_desc->supply_name)
|
||||
rdev->supply_name = regulator_desc->supply_name;
|
||||
|
||||
ret = set_machine_constraints(rdev, constraints);
|
||||
ret = set_machine_constraints(rdev);
|
||||
if (ret == -EPROBE_DEFER) {
|
||||
/* Regulator might be in bypass mode and so needs its supply
|
||||
* to set the constraints */
|
||||
@@ -4407,7 +4413,7 @@ regulator_register(const struct regulator_desc *regulator_desc,
|
||||
* that is just being created */
|
||||
ret = regulator_resolve_supply(rdev);
|
||||
if (!ret)
|
||||
ret = set_machine_constraints(rdev, constraints);
|
||||
ret = set_machine_constraints(rdev);
|
||||
else
|
||||
rdev_dbg(rdev, "unable to resolve supply early: %pe\n",
|
||||
ERR_PTR(ret));
|
||||
|
||||
@@ -755,11 +755,14 @@ static int pfuze100_regulator_probe(struct i2c_client *client,
|
||||
* the switched regulator till yet.
|
||||
*/
|
||||
if (pfuze_chip->flags & PFUZE_FLAG_DISABLE_SW) {
|
||||
if (pfuze_chip->regulator_descs[i].sw_reg) {
|
||||
desc->ops = &pfuze100_sw_disable_regulator_ops;
|
||||
desc->enable_val = 0x8;
|
||||
desc->disable_val = 0x0;
|
||||
desc->enable_time = 500;
|
||||
if (pfuze_chip->chip_id == PFUZE100 ||
|
||||
pfuze_chip->chip_id == PFUZE200) {
|
||||
if (pfuze_chip->regulator_descs[i].sw_reg) {
|
||||
desc->ops = &pfuze100_sw_disable_regulator_ops;
|
||||
desc->enable_val = 0x8;
|
||||
desc->disable_val = 0x0;
|
||||
desc->enable_time = 500;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -342,8 +342,17 @@ static int ti_abb_set_voltage_sel(struct regulator_dev *rdev, unsigned sel)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* If data is exactly the same, then just update index, no change */
|
||||
info = &abb->info[sel];
|
||||
/*
|
||||
* When Linux kernel is starting up, we are'nt sure of the
|
||||
* Bias configuration that bootloader has configured.
|
||||
* So, we get to know the actual setting the first time
|
||||
* we are asked to transition.
|
||||
*/
|
||||
if (abb->current_info_idx == -EINVAL)
|
||||
goto just_set_abb;
|
||||
|
||||
/* If data is exactly the same, then just update index, no change */
|
||||
oinfo = &abb->info[abb->current_info_idx];
|
||||
if (!memcmp(info, oinfo, sizeof(*info))) {
|
||||
dev_dbg(dev, "%s: Same data new idx=%d, old idx=%d\n", __func__,
|
||||
@@ -351,6 +360,7 @@ static int ti_abb_set_voltage_sel(struct regulator_dev *rdev, unsigned sel)
|
||||
goto out;
|
||||
}
|
||||
|
||||
just_set_abb:
|
||||
ret = ti_abb_set_opp(rdev, abb, info);
|
||||
|
||||
out:
|
||||
|
||||
@@ -2833,6 +2833,12 @@ static int _dasd_requeue_request(struct dasd_ccw_req *cqr)
|
||||
|
||||
if (!block)
|
||||
return -EINVAL;
|
||||
/*
|
||||
* If the request is an ERP request there is nothing to requeue.
|
||||
* This will be done with the remaining original request.
|
||||
*/
|
||||
if (cqr->refers)
|
||||
return 0;
|
||||
spin_lock_irq(&cqr->dq->lock);
|
||||
req = (struct request *) cqr->callback_data;
|
||||
blk_mq_requeue_request(req, false);
|
||||
|
||||
@@ -1608,12 +1608,12 @@ start:
|
||||
* work and to enable clocks.
|
||||
*/
|
||||
case CLKS_OFF:
|
||||
ufshcd_scsi_block_requests(hba);
|
||||
hba->clk_gating.state = REQ_CLKS_ON;
|
||||
trace_ufshcd_clk_gating(dev_name(hba->dev),
|
||||
hba->clk_gating.state);
|
||||
queue_work(hba->clk_gating.clk_gating_workq,
|
||||
&hba->clk_gating.ungate_work);
|
||||
if (queue_work(hba->clk_gating.clk_gating_workq,
|
||||
&hba->clk_gating.ungate_work))
|
||||
ufshcd_scsi_block_requests(hba);
|
||||
/*
|
||||
* fall through to check if we should wait for this
|
||||
* work to be done or not.
|
||||
|
||||
@@ -20,6 +20,7 @@ static const struct sdio_device_id sdio_ids[] =
|
||||
{ SDIO_DEVICE(0x024c, 0x0525), },
|
||||
{ SDIO_DEVICE(0x024c, 0x0623), },
|
||||
{ SDIO_DEVICE(0x024c, 0x0626), },
|
||||
{ SDIO_DEVICE(0x024c, 0x0627), },
|
||||
{ SDIO_DEVICE(0x024c, 0xb723), },
|
||||
{ /* end: all zeroes */ },
|
||||
};
|
||||
|
||||
@@ -49,15 +49,25 @@ static int spk_ttyio_ldisc_open(struct tty_struct *tty)
|
||||
|
||||
if (tty->ops->write == NULL)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
mutex_lock(&speakup_tty_mutex);
|
||||
if (speakup_tty) {
|
||||
mutex_unlock(&speakup_tty_mutex);
|
||||
return -EBUSY;
|
||||
}
|
||||
speakup_tty = tty;
|
||||
|
||||
ldisc_data = kmalloc(sizeof(struct spk_ldisc_data), GFP_KERNEL);
|
||||
if (!ldisc_data)
|
||||
if (!ldisc_data) {
|
||||
speakup_tty = NULL;
|
||||
mutex_unlock(&speakup_tty_mutex);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
sema_init(&ldisc_data->sem, 0);
|
||||
ldisc_data->buf_free = true;
|
||||
speakup_tty->disc_data = ldisc_data;
|
||||
mutex_unlock(&speakup_tty_mutex);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1915,16 +1915,6 @@ imx_uart_console_write(struct console *co, const char *s, unsigned int count)
|
||||
unsigned int ucr1;
|
||||
unsigned long flags = 0;
|
||||
int locked = 1;
|
||||
int retval;
|
||||
|
||||
retval = clk_enable(sport->clk_per);
|
||||
if (retval)
|
||||
return;
|
||||
retval = clk_enable(sport->clk_ipg);
|
||||
if (retval) {
|
||||
clk_disable(sport->clk_per);
|
||||
return;
|
||||
}
|
||||
|
||||
if (sport->port.sysrq)
|
||||
locked = 0;
|
||||
@@ -1960,9 +1950,6 @@ imx_uart_console_write(struct console *co, const char *s, unsigned int count)
|
||||
|
||||
if (locked)
|
||||
spin_unlock_irqrestore(&sport->port.lock, flags);
|
||||
|
||||
clk_disable(sport->clk_ipg);
|
||||
clk_disable(sport->clk_per);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2063,15 +2050,14 @@ imx_uart_console_setup(struct console *co, char *options)
|
||||
|
||||
retval = uart_set_options(&sport->port, co, baud, parity, bits, flow);
|
||||
|
||||
clk_disable(sport->clk_ipg);
|
||||
if (retval) {
|
||||
clk_unprepare(sport->clk_ipg);
|
||||
clk_disable_unprepare(sport->clk_ipg);
|
||||
goto error_console;
|
||||
}
|
||||
|
||||
retval = clk_prepare(sport->clk_per);
|
||||
retval = clk_prepare_enable(sport->clk_per);
|
||||
if (retval)
|
||||
clk_unprepare(sport->clk_ipg);
|
||||
clk_disable_unprepare(sport->clk_ipg);
|
||||
|
||||
error_console:
|
||||
return retval;
|
||||
|
||||
@@ -23,6 +23,7 @@ LIST_HEAD(efivarfs_list);
|
||||
static void efivarfs_evict_inode(struct inode *inode)
|
||||
{
|
||||
clear_inode(inode);
|
||||
kfree(inode->i_private);
|
||||
}
|
||||
|
||||
static const struct super_operations efivarfs_ops = {
|
||||
|
||||
@@ -2522,7 +2522,8 @@ void ext4_insert_dentry(struct inode *dir, struct inode *inode,
|
||||
struct ext4_filename *fname);
|
||||
static inline void ext4_update_dx_flag(struct inode *inode)
|
||||
{
|
||||
if (!ext4_has_feature_dir_index(inode->i_sb)) {
|
||||
if (!ext4_has_feature_dir_index(inode->i_sb) &&
|
||||
ext4_test_inode_flag(inode, EXT4_INODE_INDEX)) {
|
||||
/* ext4_iget() should have caught this... */
|
||||
WARN_ON_ONCE(ext4_has_feature_metadata_csum(inode->i_sb));
|
||||
ext4_clear_inode_flag(inode, EXT4_INODE_INDEX);
|
||||
|
||||
@@ -870,7 +870,7 @@ ssize_t simple_attr_write(struct file *file, const char __user *buf,
|
||||
size_t len, loff_t *ppos)
|
||||
{
|
||||
struct simple_attr *attr;
|
||||
u64 val;
|
||||
unsigned long long val;
|
||||
size_t size;
|
||||
ssize_t ret;
|
||||
|
||||
@@ -888,7 +888,9 @@ ssize_t simple_attr_write(struct file *file, const char __user *buf,
|
||||
goto out;
|
||||
|
||||
attr->set_buf[size] = '\0';
|
||||
val = simple_strtoll(attr->set_buf, NULL, 0);
|
||||
ret = kstrtoull(attr->set_buf, 0, &val);
|
||||
if (ret)
|
||||
goto out;
|
||||
ret = attr->set(attr->data, val);
|
||||
if (ret == 0)
|
||||
ret = len; /* on success, claim we got the whole input */
|
||||
|
||||
33
fs/super.c
33
fs/super.c
@@ -1380,36 +1380,11 @@ EXPORT_SYMBOL(__sb_end_write);
|
||||
*/
|
||||
int __sb_start_write(struct super_block *sb, int level, bool wait)
|
||||
{
|
||||
bool force_trylock = false;
|
||||
int ret = 1;
|
||||
if (!wait)
|
||||
return percpu_down_read_trylock(sb->s_writers.rw_sem + level-1);
|
||||
|
||||
#ifdef CONFIG_LOCKDEP
|
||||
/*
|
||||
* We want lockdep to tell us about possible deadlocks with freezing
|
||||
* but it's it bit tricky to properly instrument it. Getting a freeze
|
||||
* protection works as getting a read lock but there are subtle
|
||||
* problems. XFS for example gets freeze protection on internal level
|
||||
* twice in some cases, which is OK only because we already hold a
|
||||
* freeze protection also on higher level. Due to these cases we have
|
||||
* to use wait == F (trylock mode) which must not fail.
|
||||
*/
|
||||
if (wait) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < level - 1; i++)
|
||||
if (percpu_rwsem_is_held(sb->s_writers.rw_sem + i)) {
|
||||
force_trylock = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (wait && !force_trylock)
|
||||
percpu_down_read(sb->s_writers.rw_sem + level-1);
|
||||
else
|
||||
ret = percpu_down_read_trylock(sb->s_writers.rw_sem + level-1);
|
||||
|
||||
WARN_ON(force_trylock && !ret);
|
||||
return ret;
|
||||
percpu_down_read(sb->s_writers.rw_sem + level-1);
|
||||
return 1;
|
||||
}
|
||||
EXPORT_SYMBOL(__sb_start_write);
|
||||
|
||||
|
||||
@@ -247,8 +247,8 @@ xfs_rmapbt_key_diff(
|
||||
else if (y > x)
|
||||
return -1;
|
||||
|
||||
x = be64_to_cpu(kp->rm_offset);
|
||||
y = xfs_rmap_irec_offset_pack(rec);
|
||||
x = XFS_RMAP_OFF(be64_to_cpu(kp->rm_offset));
|
||||
y = rec->rm_offset;
|
||||
if (x > y)
|
||||
return 1;
|
||||
else if (y > x)
|
||||
@@ -279,8 +279,8 @@ xfs_rmapbt_diff_two_keys(
|
||||
else if (y > x)
|
||||
return -1;
|
||||
|
||||
x = be64_to_cpu(kp1->rm_offset);
|
||||
y = be64_to_cpu(kp2->rm_offset);
|
||||
x = XFS_RMAP_OFF(be64_to_cpu(kp1->rm_offset));
|
||||
y = XFS_RMAP_OFF(be64_to_cpu(kp2->rm_offset));
|
||||
if (x > y)
|
||||
return 1;
|
||||
else if (y > x)
|
||||
@@ -393,8 +393,8 @@ xfs_rmapbt_keys_inorder(
|
||||
return 1;
|
||||
else if (a > b)
|
||||
return 0;
|
||||
a = be64_to_cpu(k1->rmap.rm_offset);
|
||||
b = be64_to_cpu(k2->rmap.rm_offset);
|
||||
a = XFS_RMAP_OFF(be64_to_cpu(k1->rmap.rm_offset));
|
||||
b = XFS_RMAP_OFF(be64_to_cpu(k2->rmap.rm_offset));
|
||||
if (a <= b)
|
||||
return 1;
|
||||
return 0;
|
||||
@@ -423,8 +423,8 @@ xfs_rmapbt_recs_inorder(
|
||||
return 1;
|
||||
else if (a > b)
|
||||
return 0;
|
||||
a = be64_to_cpu(r1->rmap.rm_offset);
|
||||
b = be64_to_cpu(r2->rmap.rm_offset);
|
||||
a = XFS_RMAP_OFF(be64_to_cpu(r1->rmap.rm_offset));
|
||||
b = XFS_RMAP_OFF(be64_to_cpu(r2->rmap.rm_offset));
|
||||
if (a <= b)
|
||||
return 1;
|
||||
return 0;
|
||||
|
||||
@@ -225,13 +225,13 @@ xchk_bmap_xref_rmap(
|
||||
* which doesn't track unwritten state.
|
||||
*/
|
||||
if (owner != XFS_RMAP_OWN_COW &&
|
||||
irec->br_state == XFS_EXT_UNWRITTEN &&
|
||||
!(rmap.rm_flags & XFS_RMAP_UNWRITTEN))
|
||||
!!(irec->br_state == XFS_EXT_UNWRITTEN) !=
|
||||
!!(rmap.rm_flags & XFS_RMAP_UNWRITTEN))
|
||||
xchk_fblock_xref_set_corrupt(info->sc, info->whichfork,
|
||||
irec->br_startoff);
|
||||
|
||||
if (info->whichfork == XFS_ATTR_FORK &&
|
||||
!(rmap.rm_flags & XFS_RMAP_ATTR_FORK))
|
||||
if (!!(info->whichfork == XFS_ATTR_FORK) !=
|
||||
!!(rmap.rm_flags & XFS_RMAP_ATTR_FORK))
|
||||
xchk_fblock_xref_set_corrupt(info->sc, info->whichfork,
|
||||
irec->br_startoff);
|
||||
if (rmap.rm_flags & XFS_RMAP_BMBT_BLOCK)
|
||||
|
||||
@@ -450,32 +450,41 @@ xchk_btree_check_minrecs(
|
||||
int level,
|
||||
struct xfs_btree_block *block)
|
||||
{
|
||||
unsigned int numrecs;
|
||||
int ok_level;
|
||||
|
||||
numrecs = be16_to_cpu(block->bb_numrecs);
|
||||
struct xfs_btree_cur *cur = bs->cur;
|
||||
unsigned int root_level = cur->bc_nlevels - 1;
|
||||
unsigned int numrecs = be16_to_cpu(block->bb_numrecs);
|
||||
|
||||
/* More records than minrecs means the block is ok. */
|
||||
if (numrecs >= bs->cur->bc_ops->get_minrecs(bs->cur, level))
|
||||
if (numrecs >= cur->bc_ops->get_minrecs(cur, level))
|
||||
return;
|
||||
|
||||
/*
|
||||
* Certain btree blocks /can/ have fewer than minrecs records. Any
|
||||
* level greater than or equal to the level of the highest dedicated
|
||||
* btree block are allowed to violate this constraint.
|
||||
*
|
||||
* For a btree rooted in a block, the btree root can have fewer than
|
||||
* minrecs records. If the btree is rooted in an inode and does not
|
||||
* store records in the root, the direct children of the root and the
|
||||
* root itself can have fewer than minrecs records.
|
||||
* For btrees rooted in the inode, it's possible that the root block
|
||||
* contents spilled into a regular ondisk block because there wasn't
|
||||
* enough space in the inode root. The number of records in that
|
||||
* child block might be less than the standard minrecs, but that's ok
|
||||
* provided that there's only one direct child of the root.
|
||||
*/
|
||||
ok_level = bs->cur->bc_nlevels - 1;
|
||||
if (bs->cur->bc_flags & XFS_BTREE_ROOT_IN_INODE)
|
||||
ok_level--;
|
||||
if (level >= ok_level)
|
||||
return;
|
||||
if ((cur->bc_flags & XFS_BTREE_ROOT_IN_INODE) &&
|
||||
level == cur->bc_nlevels - 2) {
|
||||
struct xfs_btree_block *root_block;
|
||||
struct xfs_buf *root_bp;
|
||||
int root_maxrecs;
|
||||
|
||||
xchk_btree_set_corrupt(bs->sc, bs->cur, level);
|
||||
root_block = xfs_btree_get_block(cur, root_level, &root_bp);
|
||||
root_maxrecs = cur->bc_ops->get_dmaxrecs(cur, root_level);
|
||||
if (be16_to_cpu(root_block->bb_numrecs) != 1 ||
|
||||
numrecs <= root_maxrecs)
|
||||
xchk_btree_set_corrupt(bs->sc, cur, level);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Otherwise, only the root level is allowed to have fewer than minrecs
|
||||
* records or keyptrs.
|
||||
*/
|
||||
if (level < root_level)
|
||||
xchk_btree_set_corrupt(bs->sc, cur, level);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -491,9 +491,11 @@ static inline void ip_tunnel_info_opts_set(struct ip_tunnel_info *info,
|
||||
const void *from, int len,
|
||||
__be16 flags)
|
||||
{
|
||||
memcpy(ip_tunnel_info_opts(info), from, len);
|
||||
info->options_len = len;
|
||||
info->key.tun_flags |= flags;
|
||||
if (len > 0) {
|
||||
memcpy(ip_tunnel_info_opts(info), from, len);
|
||||
info->key.tun_flags |= flags;
|
||||
}
|
||||
}
|
||||
|
||||
static inline struct ip_tunnel_info *lwt_tun_info(struct lwtunnel_state *lwtstate)
|
||||
@@ -539,7 +541,6 @@ static inline void ip_tunnel_info_opts_set(struct ip_tunnel_info *info,
|
||||
__be16 flags)
|
||||
{
|
||||
info->options_len = 0;
|
||||
info->key.tun_flags |= flags;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_INET */
|
||||
|
||||
@@ -261,7 +261,7 @@ static ssize_t fei_write(struct file *file, const char __user *buffer,
|
||||
|
||||
if (copy_from_user(buf, buffer, count)) {
|
||||
ret = -EFAULT;
|
||||
goto out;
|
||||
goto out_free;
|
||||
}
|
||||
buf[count] = '\0';
|
||||
sym = strstrip(buf);
|
||||
@@ -315,8 +315,9 @@ static ssize_t fei_write(struct file *file, const char __user *buffer,
|
||||
ret = count;
|
||||
}
|
||||
out:
|
||||
kfree(buf);
|
||||
mutex_unlock(&fei_lock);
|
||||
out_free:
|
||||
kfree(buf);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -258,17 +258,11 @@ static int ptrace_check_attach(struct task_struct *child, bool ignore_state)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static bool ptrace_has_cap(const struct cred *cred, struct user_namespace *ns,
|
||||
unsigned int mode)
|
||||
static bool ptrace_has_cap(struct user_namespace *ns, unsigned int mode)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (mode & PTRACE_MODE_NOAUDIT)
|
||||
ret = security_capable(cred, ns, CAP_SYS_PTRACE, CAP_OPT_NOAUDIT);
|
||||
else
|
||||
ret = security_capable(cred, ns, CAP_SYS_PTRACE, CAP_OPT_NONE);
|
||||
|
||||
return ret == 0;
|
||||
return ns_capable_noaudit(ns, CAP_SYS_PTRACE);
|
||||
return ns_capable(ns, CAP_SYS_PTRACE);
|
||||
}
|
||||
|
||||
/* Returns 0 on success, -errno on denial. */
|
||||
@@ -320,7 +314,7 @@ static int __ptrace_may_access(struct task_struct *task, unsigned int mode)
|
||||
gid_eq(caller_gid, tcred->sgid) &&
|
||||
gid_eq(caller_gid, tcred->gid))
|
||||
goto ok;
|
||||
if (ptrace_has_cap(cred, tcred->user_ns, mode))
|
||||
if (ptrace_has_cap(tcred->user_ns, mode))
|
||||
goto ok;
|
||||
rcu_read_unlock();
|
||||
return -EPERM;
|
||||
@@ -339,7 +333,7 @@ ok:
|
||||
mm = task->mm;
|
||||
if (mm &&
|
||||
((get_dumpable(mm) != SUID_DUMP_USER) &&
|
||||
!ptrace_has_cap(cred, mm->user_ns, mode)))
|
||||
!ptrace_has_cap(mm->user_ns, mode)))
|
||||
return -EPERM;
|
||||
|
||||
return security_ptrace_access_check(task, mode);
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include <linux/filter.h>
|
||||
#include <linux/pid.h>
|
||||
#include <linux/ptrace.h>
|
||||
#include <linux/security.h>
|
||||
#include <linux/capability.h>
|
||||
#include <linux/tracehook.h>
|
||||
#include <linux/uaccess.h>
|
||||
|
||||
@@ -383,8 +383,7 @@ static struct seccomp_filter *seccomp_prepare_filter(struct sock_fprog *fprog)
|
||||
* behavior of privileged children.
|
||||
*/
|
||||
if (!task_no_new_privs(current) &&
|
||||
security_capable(current_cred(), current_user_ns(),
|
||||
CAP_SYS_ADMIN, CAP_OPT_NOAUDIT) != 0)
|
||||
!ns_capable_noaudit(current_user_ns(), CAP_SYS_ADMIN))
|
||||
return ERR_PTR(-EACCES);
|
||||
|
||||
/* Allocate a new seccomp_filter */
|
||||
|
||||
@@ -694,7 +694,6 @@ vm_fault_t do_huge_pmd_anonymous_page(struct vm_fault *vmf)
|
||||
transparent_hugepage_use_zero_page()) {
|
||||
pgtable_t pgtable;
|
||||
struct page *zero_page;
|
||||
bool set;
|
||||
vm_fault_t ret;
|
||||
pgtable = pte_alloc_one(vma->vm_mm, haddr);
|
||||
if (unlikely(!pgtable))
|
||||
@@ -707,25 +706,25 @@ vm_fault_t do_huge_pmd_anonymous_page(struct vm_fault *vmf)
|
||||
}
|
||||
vmf->ptl = pmd_lock(vma->vm_mm, vmf->pmd);
|
||||
ret = 0;
|
||||
set = false;
|
||||
if (pmd_none(*vmf->pmd)) {
|
||||
ret = check_stable_address_space(vma->vm_mm);
|
||||
if (ret) {
|
||||
spin_unlock(vmf->ptl);
|
||||
pte_free(vma->vm_mm, pgtable);
|
||||
} else if (userfaultfd_missing(vma)) {
|
||||
spin_unlock(vmf->ptl);
|
||||
pte_free(vma->vm_mm, pgtable);
|
||||
ret = handle_userfault(vmf, VM_UFFD_MISSING);
|
||||
VM_BUG_ON(ret & VM_FAULT_FALLBACK);
|
||||
} else {
|
||||
set_huge_zero_page(pgtable, vma->vm_mm, vma,
|
||||
haddr, vmf->pmd, zero_page);
|
||||
spin_unlock(vmf->ptl);
|
||||
set = true;
|
||||
}
|
||||
} else
|
||||
} else {
|
||||
spin_unlock(vmf->ptl);
|
||||
if (!set)
|
||||
pte_free(vma->vm_mm, pgtable);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
gfp = alloc_hugepage_direct_gfpmask(vma);
|
||||
|
||||
@@ -4710,6 +4710,11 @@ refill:
|
||||
if (!page_ref_sub_and_test(page, nc->pagecnt_bias))
|
||||
goto refill;
|
||||
|
||||
if (unlikely(nc->pfmemalloc)) {
|
||||
free_the_page(page, compound_order(page));
|
||||
goto refill;
|
||||
}
|
||||
|
||||
#if (PAGE_SIZE < PAGE_FRAG_CACHE_MAX_SIZE)
|
||||
/* if size can vary use size else just use PAGE_SIZE */
|
||||
size = nc->size;
|
||||
|
||||
@@ -215,6 +215,7 @@ static void br_get_stats64(struct net_device *dev,
|
||||
sum.rx_packets += tmp.rx_packets;
|
||||
}
|
||||
|
||||
netdev_stats_to_stats64(stats, &dev->stats);
|
||||
stats->tx_bytes = sum.tx_bytes;
|
||||
stats->tx_packets = sum.tx_packets;
|
||||
stats->rx_bytes = sum.rx_bytes;
|
||||
|
||||
@@ -722,16 +722,25 @@ static int can_rcv(struct sk_buff *skb, struct net_device *dev,
|
||||
{
|
||||
struct canfd_frame *cfd = (struct canfd_frame *)skb->data;
|
||||
|
||||
if (unlikely(dev->type != ARPHRD_CAN || skb->len != CAN_MTU ||
|
||||
cfd->len > CAN_MAX_DLEN)) {
|
||||
pr_warn_once("PF_CAN: dropped non conform CAN skbuf: dev type %d, len %d, datalen %d\n",
|
||||
if (unlikely(dev->type != ARPHRD_CAN || skb->len != CAN_MTU)) {
|
||||
pr_warn_once("PF_CAN: dropped non conform CAN skbuff: dev type %d, len %d\n",
|
||||
dev->type, skb->len);
|
||||
goto free_skb;
|
||||
}
|
||||
|
||||
/* This check is made separately since cfd->len would be uninitialized if skb->len = 0. */
|
||||
if (unlikely(cfd->len > CAN_MAX_DLEN)) {
|
||||
pr_warn_once("PF_CAN: dropped non conform CAN skbuff: dev type %d, len %d, datalen %d\n",
|
||||
dev->type, skb->len, cfd->len);
|
||||
kfree_skb(skb);
|
||||
return NET_RX_DROP;
|
||||
goto free_skb;
|
||||
}
|
||||
|
||||
can_receive(skb, dev);
|
||||
return NET_RX_SUCCESS;
|
||||
|
||||
free_skb:
|
||||
kfree_skb(skb);
|
||||
return NET_RX_DROP;
|
||||
}
|
||||
|
||||
static int canfd_rcv(struct sk_buff *skb, struct net_device *dev,
|
||||
@@ -739,16 +748,25 @@ static int canfd_rcv(struct sk_buff *skb, struct net_device *dev,
|
||||
{
|
||||
struct canfd_frame *cfd = (struct canfd_frame *)skb->data;
|
||||
|
||||
if (unlikely(dev->type != ARPHRD_CAN || skb->len != CANFD_MTU ||
|
||||
cfd->len > CANFD_MAX_DLEN)) {
|
||||
pr_warn_once("PF_CAN: dropped non conform CAN FD skbuf: dev type %d, len %d, datalen %d\n",
|
||||
if (unlikely(dev->type != ARPHRD_CAN || skb->len != CANFD_MTU)) {
|
||||
pr_warn_once("PF_CAN: dropped non conform CAN FD skbuff: dev type %d, len %d\n",
|
||||
dev->type, skb->len);
|
||||
goto free_skb;
|
||||
}
|
||||
|
||||
/* This check is made separately since cfd->len would be uninitialized if skb->len = 0. */
|
||||
if (unlikely(cfd->len > CANFD_MAX_DLEN)) {
|
||||
pr_warn_once("PF_CAN: dropped non conform CAN FD skbuff: dev type %d, len %d, datalen %d\n",
|
||||
dev->type, skb->len, cfd->len);
|
||||
kfree_skb(skb);
|
||||
return NET_RX_DROP;
|
||||
goto free_skb;
|
||||
}
|
||||
|
||||
can_receive(skb, dev);
|
||||
return NET_RX_SUCCESS;
|
||||
|
||||
free_skb:
|
||||
kfree_skb(skb);
|
||||
return NET_RX_DROP;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1113,7 +1113,7 @@ static int devlink_nl_sb_port_pool_fill(struct sk_buff *msg,
|
||||
err = ops->sb_occ_port_pool_get(devlink_port, devlink_sb->index,
|
||||
pool_index, &cur, &max);
|
||||
if (err && err != -EOPNOTSUPP)
|
||||
return err;
|
||||
goto sb_occ_get_failure;
|
||||
if (!err) {
|
||||
if (nla_put_u32(msg, DEVLINK_ATTR_SB_OCC_CUR, cur))
|
||||
goto nla_put_failure;
|
||||
@@ -1126,8 +1126,10 @@ static int devlink_nl_sb_port_pool_fill(struct sk_buff *msg,
|
||||
return 0;
|
||||
|
||||
nla_put_failure:
|
||||
err = -EMSGSIZE;
|
||||
sb_occ_get_failure:
|
||||
genlmsg_cancel(msg, hdr);
|
||||
return -EMSGSIZE;
|
||||
return err;
|
||||
}
|
||||
|
||||
static int devlink_nl_cmd_sb_port_pool_get_doit(struct sk_buff *skb,
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/if_vlan.h>
|
||||
#include <net/dsa.h>
|
||||
#include <net/tcp.h>
|
||||
#include <net/udp.h>
|
||||
#include <net/addrconf.h>
|
||||
@@ -638,15 +639,15 @@ EXPORT_SYMBOL_GPL(__netpoll_setup);
|
||||
|
||||
int netpoll_setup(struct netpoll *np)
|
||||
{
|
||||
struct net_device *ndev = NULL;
|
||||
struct net_device *ndev = NULL, *dev = NULL;
|
||||
struct net *net = current->nsproxy->net_ns;
|
||||
struct in_device *in_dev;
|
||||
int err;
|
||||
|
||||
rtnl_lock();
|
||||
if (np->dev_name[0]) {
|
||||
struct net *net = current->nsproxy->net_ns;
|
||||
if (np->dev_name[0])
|
||||
ndev = __dev_get_by_name(net, np->dev_name);
|
||||
}
|
||||
|
||||
if (!ndev) {
|
||||
np_err(np, "%s doesn't exist, aborting\n", np->dev_name);
|
||||
err = -ENODEV;
|
||||
@@ -654,6 +655,19 @@ int netpoll_setup(struct netpoll *np)
|
||||
}
|
||||
dev_hold(ndev);
|
||||
|
||||
/* bring up DSA management network devices up first */
|
||||
for_each_netdev(net, dev) {
|
||||
if (!netdev_uses_dsa(dev))
|
||||
continue;
|
||||
|
||||
err = dev_change_flags(dev, dev->flags | IFF_UP);
|
||||
if (err < 0) {
|
||||
np_err(np, "%s failed to open %s\n",
|
||||
np->dev_name, dev->name);
|
||||
goto put;
|
||||
}
|
||||
}
|
||||
|
||||
if (netdev_master_upper_dev_get(ndev)) {
|
||||
np_err(np, "%s is a slave device, aborting\n", np->dev_name);
|
||||
err = -EBUSY;
|
||||
|
||||
@@ -392,8 +392,10 @@ static int inet_req_diag_fill(struct sock *sk, struct sk_buff *skb,
|
||||
r->idiag_inode = 0;
|
||||
|
||||
if (net_admin && nla_put_u32(skb, INET_DIAG_MARK,
|
||||
inet_rsk(reqsk)->ir_mark))
|
||||
inet_rsk(reqsk)->ir_mark)) {
|
||||
nlmsg_cancel(skb, nlh);
|
||||
return -EMSGSIZE;
|
||||
}
|
||||
|
||||
nlmsg_end(skb, nlh);
|
||||
return 0;
|
||||
|
||||
@@ -917,7 +917,7 @@ static void bbr_update_min_rtt(struct sock *sk, const struct rate_sample *rs)
|
||||
filter_expired = after(tcp_jiffies32,
|
||||
bbr->min_rtt_stamp + bbr_min_rtt_win_sec * HZ);
|
||||
if (rs->rtt_us >= 0 &&
|
||||
(rs->rtt_us <= bbr->min_rtt_us ||
|
||||
(rs->rtt_us < bbr->min_rtt_us ||
|
||||
(filter_expired && !rs->is_ack_delayed))) {
|
||||
bbr->min_rtt_us = rs->rtt_us;
|
||||
bbr->min_rtt_stamp = tcp_jiffies32;
|
||||
|
||||
@@ -600,7 +600,8 @@ static int ah6_input(struct xfrm_state *x, struct sk_buff *skb)
|
||||
memcpy(auth_data, ah->auth_data, ahp->icv_trunc_len);
|
||||
memset(ah->auth_data, 0, ahp->icv_trunc_len);
|
||||
|
||||
if (ipv6_clear_mutable_options(ip6h, hdr_len, XFRM_POLICY_IN))
|
||||
err = ipv6_clear_mutable_options(ip6h, hdr_len, XFRM_POLICY_IN);
|
||||
if (err)
|
||||
goto out_free;
|
||||
|
||||
ip6h->priority = 0;
|
||||
|
||||
@@ -276,7 +276,7 @@ minstrel_tx_status(void *priv, struct ieee80211_supported_band *sband,
|
||||
success = !!(info->flags & IEEE80211_TX_STAT_ACK);
|
||||
|
||||
for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) {
|
||||
if (ar[i].idx < 0)
|
||||
if (ar[i].idx < 0 || !ar[i].count)
|
||||
break;
|
||||
|
||||
ndx = rix_to_ndx(mi, ar[i].idx);
|
||||
@@ -289,12 +289,6 @@ minstrel_tx_status(void *priv, struct ieee80211_supported_band *sband,
|
||||
mi->r[ndx].stats.success += success;
|
||||
}
|
||||
|
||||
if ((info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE) && (i >= 0))
|
||||
mi->sample_packets++;
|
||||
|
||||
if (mi->sample_deferred > 0)
|
||||
mi->sample_deferred--;
|
||||
|
||||
if (time_after(jiffies, mi->last_stats_update +
|
||||
(mp->update_interval * HZ) / 1000))
|
||||
minstrel_update_stats(mp, mi);
|
||||
@@ -373,7 +367,7 @@ minstrel_get_rate(void *priv, struct ieee80211_sta *sta,
|
||||
return;
|
||||
|
||||
delta = (mi->total_packets * sampling_ratio / 100) -
|
||||
(mi->sample_packets + mi->sample_deferred / 2);
|
||||
mi->sample_packets;
|
||||
|
||||
/* delta < 0: no sampling required */
|
||||
prev_sample = mi->prev_sample;
|
||||
@@ -382,7 +376,6 @@ minstrel_get_rate(void *priv, struct ieee80211_sta *sta,
|
||||
return;
|
||||
|
||||
if (mi->total_packets >= 10000) {
|
||||
mi->sample_deferred = 0;
|
||||
mi->sample_packets = 0;
|
||||
mi->total_packets = 0;
|
||||
} else if (delta > mi->n_rates * 2) {
|
||||
@@ -407,19 +400,8 @@ minstrel_get_rate(void *priv, struct ieee80211_sta *sta,
|
||||
* rate sampling method should be used.
|
||||
* Respect such rates that are not sampled for 20 interations.
|
||||
*/
|
||||
if (mrr_capable &&
|
||||
msr->perfect_tx_time > mr->perfect_tx_time &&
|
||||
msr->stats.sample_skipped < 20) {
|
||||
/* Only use IEEE80211_TX_CTL_RATE_CTRL_PROBE to mark
|
||||
* packets that have the sampling rate deferred to the
|
||||
* second MRR stage. Increase the sample counter only
|
||||
* if the deferred sample rate was actually used.
|
||||
* Use the sample_deferred counter to make sure that
|
||||
* the sampling is not done in large bursts */
|
||||
info->flags |= IEEE80211_TX_CTL_RATE_CTRL_PROBE;
|
||||
rate++;
|
||||
mi->sample_deferred++;
|
||||
} else {
|
||||
if (msr->perfect_tx_time < mr->perfect_tx_time ||
|
||||
msr->stats.sample_skipped >= 20) {
|
||||
if (!msr->sample_limit)
|
||||
return;
|
||||
|
||||
@@ -439,6 +421,7 @@ minstrel_get_rate(void *priv, struct ieee80211_sta *sta,
|
||||
|
||||
rate->idx = mi->r[ndx].rix;
|
||||
rate->count = minstrel_get_retry_count(&mi->r[ndx], info);
|
||||
info->flags |= IEEE80211_TX_CTL_RATE_CTRL_PROBE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -98,7 +98,6 @@ struct minstrel_sta_info {
|
||||
u8 max_prob_rate;
|
||||
unsigned int total_packets;
|
||||
unsigned int sample_packets;
|
||||
int sample_deferred;
|
||||
|
||||
unsigned int sample_row;
|
||||
unsigned int sample_column;
|
||||
|
||||
@@ -634,7 +634,7 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU)
|
||||
out_drop_sta:
|
||||
local->num_sta--;
|
||||
synchronize_net();
|
||||
__cleanup_single_sta(sta);
|
||||
cleanup_single_sta(sta);
|
||||
out_err:
|
||||
mutex_unlock(&local->sta_mtx);
|
||||
kfree(sinfo);
|
||||
@@ -653,19 +653,13 @@ int sta_info_insert_rcu(struct sta_info *sta) __acquires(RCU)
|
||||
|
||||
err = sta_info_insert_check(sta);
|
||||
if (err) {
|
||||
sta_info_free(local, sta);
|
||||
mutex_unlock(&local->sta_mtx);
|
||||
rcu_read_lock();
|
||||
goto out_free;
|
||||
return err;
|
||||
}
|
||||
|
||||
err = sta_info_insert_finish(sta);
|
||||
if (err)
|
||||
goto out_free;
|
||||
|
||||
return 0;
|
||||
out_free:
|
||||
sta_info_free(local, sta);
|
||||
return err;
|
||||
return sta_info_insert_finish(sta);
|
||||
}
|
||||
|
||||
int sta_info_insert(struct sta_info *sta)
|
||||
|
||||
@@ -1484,9 +1484,6 @@ struct ncsi_dev *ncsi_register_dev(struct net_device *dev,
|
||||
ndp->ptype.dev = dev;
|
||||
dev_add_pack(&ndp->ptype);
|
||||
|
||||
/* Set up generic netlink interface */
|
||||
ncsi_init_netlink(dev);
|
||||
|
||||
return nd;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ncsi_register_dev);
|
||||
@@ -1566,8 +1563,6 @@ void ncsi_unregister_dev(struct ncsi_dev *nd)
|
||||
#endif
|
||||
spin_unlock_irqrestore(&ncsi_dev_lock, flags);
|
||||
|
||||
ncsi_unregister_netlink(nd->dev);
|
||||
|
||||
kfree(ndp);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ncsi_unregister_dev);
|
||||
|
||||
@@ -397,24 +397,8 @@ static struct genl_family ncsi_genl_family __ro_after_init = {
|
||||
.n_ops = ARRAY_SIZE(ncsi_ops),
|
||||
};
|
||||
|
||||
int ncsi_init_netlink(struct net_device *dev)
|
||||
static int __init ncsi_init_netlink(void)
|
||||
{
|
||||
int rc;
|
||||
|
||||
rc = genl_register_family(&ncsi_genl_family);
|
||||
if (rc)
|
||||
netdev_err(dev, "ncsi: failed to register netlink family\n");
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
int ncsi_unregister_netlink(struct net_device *dev)
|
||||
{
|
||||
int rc;
|
||||
|
||||
rc = genl_unregister_family(&ncsi_genl_family);
|
||||
if (rc)
|
||||
netdev_err(dev, "ncsi: failed to unregister netlink family\n");
|
||||
|
||||
return rc;
|
||||
return genl_register_family(&ncsi_genl_family);
|
||||
}
|
||||
subsys_initcall(ncsi_init_netlink);
|
||||
|
||||
@@ -14,7 +14,4 @@
|
||||
|
||||
#include "internal.h"
|
||||
|
||||
int ncsi_init_netlink(struct net_device *dev);
|
||||
int ncsi_unregister_netlink(struct net_device *dev);
|
||||
|
||||
#endif /* __NCSI_NETLINK_H__ */
|
||||
|
||||
@@ -1179,12 +1179,13 @@ static int netlbl_unlabel_staticlist(struct sk_buff *skb,
|
||||
struct netlbl_unlhsh_walk_arg cb_arg;
|
||||
u32 skip_bkt = cb->args[0];
|
||||
u32 skip_chain = cb->args[1];
|
||||
u32 iter_bkt;
|
||||
u32 iter_chain = 0, iter_addr4 = 0, iter_addr6 = 0;
|
||||
u32 skip_addr4 = cb->args[2];
|
||||
u32 iter_bkt, iter_chain = 0, iter_addr4 = 0, iter_addr6 = 0;
|
||||
struct netlbl_unlhsh_iface *iface;
|
||||
struct list_head *iter_list;
|
||||
struct netlbl_af4list *addr4;
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
u32 skip_addr6 = cb->args[3];
|
||||
struct netlbl_af6list *addr6;
|
||||
#endif
|
||||
|
||||
@@ -1195,7 +1196,7 @@ static int netlbl_unlabel_staticlist(struct sk_buff *skb,
|
||||
rcu_read_lock();
|
||||
for (iter_bkt = skip_bkt;
|
||||
iter_bkt < rcu_dereference(netlbl_unlhsh)->size;
|
||||
iter_bkt++, iter_chain = 0, iter_addr4 = 0, iter_addr6 = 0) {
|
||||
iter_bkt++) {
|
||||
iter_list = &rcu_dereference(netlbl_unlhsh)->tbl[iter_bkt];
|
||||
list_for_each_entry_rcu(iface, iter_list, list) {
|
||||
if (!iface->valid ||
|
||||
@@ -1203,7 +1204,7 @@ static int netlbl_unlabel_staticlist(struct sk_buff *skb,
|
||||
continue;
|
||||
netlbl_af4list_foreach_rcu(addr4,
|
||||
&iface->addr4_list) {
|
||||
if (iter_addr4++ < cb->args[2])
|
||||
if (iter_addr4++ < skip_addr4)
|
||||
continue;
|
||||
if (netlbl_unlabel_staticlist_gen(
|
||||
NLBL_UNLABEL_C_STATICLIST,
|
||||
@@ -1216,10 +1217,12 @@ static int netlbl_unlabel_staticlist(struct sk_buff *skb,
|
||||
goto unlabel_staticlist_return;
|
||||
}
|
||||
}
|
||||
iter_addr4 = 0;
|
||||
skip_addr4 = 0;
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
netlbl_af6list_foreach_rcu(addr6,
|
||||
&iface->addr6_list) {
|
||||
if (iter_addr6++ < cb->args[3])
|
||||
if (iter_addr6++ < skip_addr6)
|
||||
continue;
|
||||
if (netlbl_unlabel_staticlist_gen(
|
||||
NLBL_UNLABEL_C_STATICLIST,
|
||||
@@ -1232,8 +1235,12 @@ static int netlbl_unlabel_staticlist(struct sk_buff *skb,
|
||||
goto unlabel_staticlist_return;
|
||||
}
|
||||
}
|
||||
iter_addr6 = 0;
|
||||
skip_addr6 = 0;
|
||||
#endif /* IPv6 */
|
||||
}
|
||||
iter_chain = 0;
|
||||
skip_chain = 0;
|
||||
}
|
||||
|
||||
unlabel_staticlist_return:
|
||||
|
||||
@@ -461,7 +461,7 @@ void sctp_icmp_proto_unreachable(struct sock *sk,
|
||||
else {
|
||||
if (!mod_timer(&t->proto_unreach_timer,
|
||||
jiffies + (HZ/20)))
|
||||
sctp_association_hold(asoc);
|
||||
sctp_transport_hold(t);
|
||||
}
|
||||
} else {
|
||||
struct net *net = sock_net(sk);
|
||||
@@ -470,7 +470,7 @@ void sctp_icmp_proto_unreachable(struct sock *sk,
|
||||
"encountered!\n", __func__);
|
||||
|
||||
if (del_timer(&t->proto_unreach_timer))
|
||||
sctp_association_put(asoc);
|
||||
sctp_transport_put(t);
|
||||
|
||||
sctp_do_sm(net, SCTP_EVENT_T_OTHER,
|
||||
SCTP_ST_OTHER(SCTP_EVENT_ICMP_PROTO_UNREACH),
|
||||
|
||||
@@ -434,7 +434,7 @@ void sctp_generate_proto_unreach_event(struct timer_list *t)
|
||||
/* Try again later. */
|
||||
if (!mod_timer(&transport->proto_unreach_timer,
|
||||
jiffies + (HZ/20)))
|
||||
sctp_association_hold(asoc);
|
||||
sctp_transport_hold(transport);
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
@@ -450,7 +450,7 @@ void sctp_generate_proto_unreach_event(struct timer_list *t)
|
||||
|
||||
out_unlock:
|
||||
bh_unlock_sock(sk);
|
||||
sctp_association_put(asoc);
|
||||
sctp_transport_put(transport);
|
||||
}
|
||||
|
||||
/* Handle the timeout of the RE-CONFIG timer. */
|
||||
|
||||
@@ -148,7 +148,7 @@ void sctp_transport_free(struct sctp_transport *transport)
|
||||
|
||||
/* Delete the ICMP proto unreachable timer if it's active. */
|
||||
if (del_timer(&transport->proto_unreach_timer))
|
||||
sctp_association_put(transport->asoc);
|
||||
sctp_transport_put(transport);
|
||||
|
||||
sctp_transport_put(transport);
|
||||
}
|
||||
|
||||
@@ -1049,6 +1049,7 @@ int x25_rx_call_request(struct sk_buff *skb, struct x25_neigh *nb,
|
||||
makex25->lci = lci;
|
||||
makex25->dest_addr = dest_addr;
|
||||
makex25->source_addr = source_addr;
|
||||
x25_neigh_hold(nb);
|
||||
makex25->neighbour = nb;
|
||||
makex25->facilities = facilities;
|
||||
makex25->dte_facilities= dte_facilities;
|
||||
|
||||
@@ -1388,7 +1388,7 @@ static int snd_ctl_elem_add(struct snd_ctl_file *file,
|
||||
|
||||
unlock:
|
||||
up_write(&card->controls_rwsem);
|
||||
return 0;
|
||||
return err;
|
||||
}
|
||||
|
||||
static int snd_ctl_elem_add_user(struct snd_ctl_file *file,
|
||||
|
||||
@@ -124,7 +124,7 @@ copy_resp_to_buf(struct snd_efw *efw, void *data, size_t length, int *rcode)
|
||||
t = (struct snd_efw_transaction *)data;
|
||||
length = min_t(size_t, be32_to_cpu(t->length) * sizeof(u32), length);
|
||||
|
||||
spin_lock_irq(&efw->lock);
|
||||
spin_lock(&efw->lock);
|
||||
|
||||
if (efw->push_ptr < efw->pull_ptr)
|
||||
capacity = (unsigned int)(efw->pull_ptr - efw->push_ptr);
|
||||
@@ -191,7 +191,7 @@ handle_resp_for_user(struct fw_card *card, int generation, int source,
|
||||
|
||||
copy_resp_to_buf(efw, data, length, rcode);
|
||||
end:
|
||||
spin_unlock_irq(&instances_lock);
|
||||
spin_unlock(&instances_lock);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -2498,13 +2498,23 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3),
|
||||
SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX),
|
||||
SND_PCI_QUIRK(0x1558, 0x9501, "Clevo P950HR", ALC1220_FIXUP_CLEVO_P950),
|
||||
SND_PCI_QUIRK(0x1558, 0x9506, "Clevo P955HQ", ALC1220_FIXUP_CLEVO_P950),
|
||||
SND_PCI_QUIRK(0x1558, 0x950A, "Clevo P955H[PR]", ALC1220_FIXUP_CLEVO_P950),
|
||||
SND_PCI_QUIRK(0x1558, 0x95e1, "Clevo P95xER", ALC1220_FIXUP_CLEVO_P950),
|
||||
SND_PCI_QUIRK(0x1558, 0x95e2, "Clevo P950ER", ALC1220_FIXUP_CLEVO_P950),
|
||||
SND_PCI_QUIRK(0x1558, 0x95e3, "Clevo P955[ER]T", ALC1220_FIXUP_CLEVO_P950),
|
||||
SND_PCI_QUIRK(0x1558, 0x95e4, "Clevo P955ER", ALC1220_FIXUP_CLEVO_P950),
|
||||
SND_PCI_QUIRK(0x1558, 0x95e5, "Clevo P955EE6", ALC1220_FIXUP_CLEVO_P950),
|
||||
SND_PCI_QUIRK(0x1558, 0x95e6, "Clevo P950R[CDF]", ALC1220_FIXUP_CLEVO_P950),
|
||||
SND_PCI_QUIRK(0x1558, 0x96e1, "Clevo P960[ER][CDFN]-K", ALC1220_FIXUP_CLEVO_P950),
|
||||
SND_PCI_QUIRK(0x1558, 0x97e1, "Clevo P970[ER][CDFN]", ALC1220_FIXUP_CLEVO_P950),
|
||||
SND_PCI_QUIRK(0x1558, 0x65d1, "Clevo PB51[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
|
||||
SND_PCI_QUIRK(0x1558, 0x67d1, "Clevo PB71[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
|
||||
SND_PCI_QUIRK(0x1558, 0x97e2, "Clevo P970RC-M", ALC1220_FIXUP_CLEVO_P950),
|
||||
SND_PCI_QUIRK(0x1558, 0x50d3, "Clevo PC50[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
|
||||
SND_PCI_QUIRK(0x1558, 0x65d1, "Clevo PB51[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
|
||||
SND_PCI_QUIRK(0x1558, 0x65d2, "Clevo PB51R[CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
|
||||
SND_PCI_QUIRK(0x1558, 0x65e1, "Clevo PB51[ED][DF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
|
||||
SND_PCI_QUIRK(0x1558, 0x67d1, "Clevo PB71[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
|
||||
SND_PCI_QUIRK(0x1558, 0x67e1, "Clevo PB71[DE][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
|
||||
SND_PCI_QUIRK(0x1558, 0x70d1, "Clevo PC70[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
|
||||
SND_PCI_QUIRK(0x1558, 0x7714, "Clevo X170", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
|
||||
SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD),
|
||||
@@ -7114,11 +7124,49 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC),
|
||||
SND_PCI_QUIRK(0x1462, 0xb120, "MSI Cubi MS-B120", ALC283_FIXUP_HEADSET_MIC),
|
||||
SND_PCI_QUIRK(0x1462, 0xb171, "Cubi N 8GL (MS-B171)", ALC283_FIXUP_HEADSET_MIC),
|
||||
SND_PCI_QUIRK(0x1558, 0x1323, "Clevo N130ZU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x1325, "System76 Darter Pro (darp5)", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x1401, "Clevo L140[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x1403, "Clevo N140CU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x1404, "Clevo N150CU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x14a1, "Clevo L141MU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x4018, "Clevo NV40M[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x4019, "Clevo NV40MZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x4020, "Clevo NV40MB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x40a1, "Clevo NL40GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x40c1, "Clevo NL40[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x40d1, "Clevo NL41DU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x50a3, "Clevo NJ51GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x50b3, "Clevo NK50S[BEZ]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x50b6, "Clevo NK50S5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x50b8, "Clevo NK50SZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x50d5, "Clevo NP50D5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x50f0, "Clevo NH50A[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x50f3, "Clevo NH58DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x5101, "Clevo S510WU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x5157, "Clevo W517GU1", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x51a1, "Clevo NS50MU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x70a1, "Clevo NB70T[HJK]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x70b3, "Clevo NK70SB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x8228, "Clevo NR40BU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x8520, "Clevo NH50D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x8521, "Clevo NH77D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x8535, "Clevo NH50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x8536, "Clevo NH79D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x8550, "System76 Gazelle (gaze14)", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x8551, "System76 Gazelle (gaze14)", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x8560, "System76 Gazelle (gaze14)", ALC269_FIXUP_HEADSET_MIC),
|
||||
SND_PCI_QUIRK(0x1558, 0x8561, "System76 Gazelle (gaze14)", ALC269_FIXUP_HEADSET_MIC),
|
||||
SND_PCI_QUIRK(0x1558, 0x8668, "Clevo NP50B[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x8680, "Clevo NJ50LU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x8686, "Clevo NH50[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x8a20, "Clevo NH55DCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x8a51, "Clevo NH70RCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x8d50, "Clevo NH55RCQ-M", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x951d, "Clevo N950T[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x961d, "Clevo N960S[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x971d, "Clevo N970T[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0xa500, "Clevo NL53RU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC233_FIXUP_LENOVO_MULTI_CODECS),
|
||||
SND_PCI_QUIRK(0x17aa, 0x1048, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
|
||||
SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE),
|
||||
|
||||
@@ -83,7 +83,6 @@ static int get_msg(struct mixart_mgr *mgr, struct mixart_msg *resp,
|
||||
unsigned int i;
|
||||
#endif
|
||||
|
||||
mutex_lock(&mgr->msg_lock);
|
||||
err = 0;
|
||||
|
||||
/* copy message descriptor from miXart to driver */
|
||||
@@ -132,8 +131,6 @@ static int get_msg(struct mixart_mgr *mgr, struct mixart_msg *resp,
|
||||
writel_be(headptr, MIXART_MEM(mgr, MSG_OUTBOUND_FREE_HEAD));
|
||||
|
||||
_clean_exit:
|
||||
mutex_unlock(&mgr->msg_lock);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -271,7 +268,9 @@ int snd_mixart_send_msg(struct mixart_mgr *mgr, struct mixart_msg *request, int
|
||||
resp.data = resp_data;
|
||||
resp.size = max_resp_size;
|
||||
|
||||
mutex_lock(&mgr->msg_lock);
|
||||
err = get_msg(mgr, &resp, msg_frame);
|
||||
mutex_unlock(&mgr->msg_lock);
|
||||
|
||||
if( request->message_id != resp.message_id )
|
||||
dev_err(&mgr->pci->dev, "RESPONSE ERROR!\n");
|
||||
|
||||
@@ -81,8 +81,10 @@ static int lpass_platform_pcmops_open(struct snd_pcm_substream *substream)
|
||||
else
|
||||
dma_ch = 0;
|
||||
|
||||
if (dma_ch < 0)
|
||||
if (dma_ch < 0) {
|
||||
kfree(data);
|
||||
return dma_ch;
|
||||
}
|
||||
|
||||
drvdata->substream[dma_ch] = substream;
|
||||
|
||||
@@ -103,6 +105,7 @@ static int lpass_platform_pcmops_open(struct snd_pcm_substream *substream)
|
||||
ret = snd_pcm_hw_constraint_integer(runtime,
|
||||
SNDRV_PCM_HW_PARAM_PERIODS);
|
||||
if (ret < 0) {
|
||||
kfree(data);
|
||||
dev_err(soc_runtime->dev, "setting constraints failed: %d\n",
|
||||
ret);
|
||||
return -EINVAL;
|
||||
|
||||
@@ -1335,13 +1335,13 @@ void snd_usb_ctl_msg_quirk(struct usb_device *dev, unsigned int pipe,
|
||||
&& (requesttype & USB_TYPE_MASK) == USB_TYPE_CLASS)
|
||||
msleep(20);
|
||||
|
||||
/* Zoom R16/24, Logitech H650e/H570e, Jabra 550a, Kingston HyperX
|
||||
* needs a tiny delay here, otherwise requests like get/set
|
||||
* frequency return as failed despite actually succeeding.
|
||||
/* Zoom R16/24, many Logitech(at least H650e/H570e/BCC950),
|
||||
* Jabra 550a, Kingston HyperX needs a tiny delay here,
|
||||
* otherwise requests like get/set frequency return
|
||||
* as failed despite actually succeeding.
|
||||
*/
|
||||
if ((chip->usb_id == USB_ID(0x1686, 0x00dd) ||
|
||||
chip->usb_id == USB_ID(0x046d, 0x0a46) ||
|
||||
chip->usb_id == USB_ID(0x046d, 0x0a56) ||
|
||||
USB_ID_VENDOR(chip->usb_id) == 0x046d || /* Logitech */
|
||||
chip->usb_id == USB_ID(0x0b0e, 0x0349) ||
|
||||
chip->usb_id == USB_ID(0x0951, 0x16ad)) &&
|
||||
(requesttype & USB_TYPE_MASK) == USB_TYPE_CLASS)
|
||||
|
||||
@@ -620,7 +620,7 @@ static int report_lock_release_event(struct perf_evsel *evsel,
|
||||
case SEQ_STATE_READ_ACQUIRED:
|
||||
seq->read_count--;
|
||||
BUG_ON(seq->read_count < 0);
|
||||
if (!seq->read_count) {
|
||||
if (seq->read_count) {
|
||||
ls->nr_release++;
|
||||
goto end;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ enum x86_register {
|
||||
struct desc64 {
|
||||
uint16_t limit0;
|
||||
uint16_t base0;
|
||||
unsigned base1:8, s:1, type:4, dpl:2, p:1;
|
||||
unsigned base1:8, type:4, s:1, dpl:2, p:1;
|
||||
unsigned limit1:4, avl:1, l:1, db:1, g:1, base2:8;
|
||||
uint32_t base3;
|
||||
uint32_t zero1;
|
||||
|
||||
@@ -449,11 +449,12 @@ static void kvm_seg_fill_gdt_64bit(struct kvm_vm *vm, struct kvm_segment *segp)
|
||||
desc->limit0 = segp->limit & 0xFFFF;
|
||||
desc->base0 = segp->base & 0xFFFF;
|
||||
desc->base1 = segp->base >> 16;
|
||||
desc->s = segp->s;
|
||||
desc->type = segp->type;
|
||||
desc->s = segp->s;
|
||||
desc->dpl = segp->dpl;
|
||||
desc->p = segp->present;
|
||||
desc->limit1 = segp->limit >> 16;
|
||||
desc->avl = segp->avl;
|
||||
desc->l = segp->l;
|
||||
desc->db = segp->db;
|
||||
desc->g = segp->g;
|
||||
|
||||
Reference in New Issue
Block a user