Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Minor conflict in net/core/rtnetlink.c, David Ahern's bug fix in 'net' overlapped the renaming of a netlink attribute in net-next. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
6f41617bf2
|
@ -1,4 +1,4 @@
|
|||
Device-Tree bindings for input/gpio_keys.c keyboard driver
|
||||
Device-Tree bindings for input/keyboard/gpio_keys.c keyboard driver
|
||||
|
||||
Required properties:
|
||||
- compatible = "gpio-keys";
|
||||
|
|
|
@ -15,7 +15,8 @@ than x86. Check the v86d documentation for a list of currently supported
|
|||
arches.
|
||||
|
||||
v86d source code can be downloaded from the following website:
|
||||
http://dev.gentoo.org/~spock/projects/uvesafb
|
||||
|
||||
https://github.com/mjanusz/v86d
|
||||
|
||||
Please refer to the v86d documentation for detailed configuration and
|
||||
installation instructions.
|
||||
|
@ -177,7 +178,7 @@ from the Video BIOS if you set pixclock to 0 in fb_var_screeninfo.
|
|||
|
||||
--
|
||||
Michal Januszewski <spock@gentoo.org>
|
||||
Last updated: 2009-03-30
|
||||
Last updated: 2017-10-10
|
||||
|
||||
Documentation of the uvesafb options is loosely based on vesafb.txt.
|
||||
|
||||
|
|
|
@ -425,7 +425,7 @@ tcp_mtu_probing - INTEGER
|
|||
1 - Disabled by default, enabled when an ICMP black hole detected
|
||||
2 - Always enabled, use initial MSS of tcp_base_mss.
|
||||
|
||||
tcp_probe_interval - INTEGER
|
||||
tcp_probe_interval - UNSIGNED INTEGER
|
||||
Controls how often to start TCP Packetization-Layer Path MTU
|
||||
Discovery reprobe. The default is reprobing every 10 minutes as
|
||||
per RFC4821.
|
||||
|
|
34
MAINTAINERS
34
MAINTAINERS
|
@ -1251,7 +1251,7 @@ N: meson
|
|||
|
||||
ARM/Annapurna Labs ALPINE ARCHITECTURE
|
||||
M: Tsahee Zidenberg <tsahee@annapurnalabs.com>
|
||||
M: Antoine Tenart <antoine.tenart@free-electrons.com>
|
||||
M: Antoine Tenart <antoine.tenart@bootlin.com>
|
||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
S: Maintained
|
||||
F: arch/arm/mach-alpine/
|
||||
|
@ -2956,7 +2956,6 @@ F: include/linux/bcm963xx_tag.h
|
|||
|
||||
BROADCOM BNX2 GIGABIT ETHERNET DRIVER
|
||||
M: Rasesh Mody <rasesh.mody@cavium.com>
|
||||
M: Harish Patil <harish.patil@cavium.com>
|
||||
M: Dept-GELinuxNICDev@cavium.com
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
|
@ -2977,6 +2976,7 @@ F: drivers/scsi/bnx2i/
|
|||
|
||||
BROADCOM BNX2X 10 GIGABIT ETHERNET DRIVER
|
||||
M: Ariel Elior <ariel.elior@cavium.com>
|
||||
M: Sudarsana Kalluru <sudarsana.kalluru@cavium.com>
|
||||
M: everest-linux-l2@cavium.com
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
|
@ -5470,7 +5470,8 @@ S: Odd Fixes
|
|||
F: drivers/net/ethernet/agere/
|
||||
|
||||
ETHERNET BRIDGE
|
||||
M: Stephen Hemminger <stephen@networkplumber.org>
|
||||
M: Roopa Prabhu <roopa@cumulusnetworks.com>
|
||||
M: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
|
||||
L: bridge@lists.linux-foundation.org (moderated for non-subscribers)
|
||||
L: netdev@vger.kernel.org
|
||||
W: http://www.linuxfoundation.org/en/Net:Bridge
|
||||
|
@ -9725,13 +9726,6 @@ Q: http://patchwork.linuxtv.org/project/linux-media/list/
|
|||
S: Maintained
|
||||
F: drivers/media/dvb-frontends/mn88473*
|
||||
|
||||
PCI DRIVER FOR MOBIVEIL PCIE IP
|
||||
M: Subrahmanya Lingappa <l.subrahmanya@mobiveil.co.in>
|
||||
L: linux-pci@vger.kernel.org
|
||||
S: Supported
|
||||
F: Documentation/devicetree/bindings/pci/mobiveil-pcie.txt
|
||||
F: drivers/pci/controller/pcie-mobiveil.c
|
||||
|
||||
MODULE SUPPORT
|
||||
M: Jessica Yu <jeyu@kernel.org>
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux.git modules-next
|
||||
|
@ -10958,7 +10952,7 @@ M: Willy Tarreau <willy@haproxy.com>
|
|||
M: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
|
||||
S: Odd Fixes
|
||||
F: Documentation/auxdisplay/lcd-panel-cgram.txt
|
||||
F: drivers/misc/panel.c
|
||||
F: drivers/auxdisplay/panel.c
|
||||
|
||||
PARALLEL PORT SUBSYSTEM
|
||||
M: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
|
||||
|
@ -11146,6 +11140,13 @@ F: include/uapi/linux/switchtec_ioctl.h
|
|||
F: include/linux/switchtec.h
|
||||
F: drivers/ntb/hw/mscc/
|
||||
|
||||
PCI DRIVER FOR MOBIVEIL PCIE IP
|
||||
M: Subrahmanya Lingappa <l.subrahmanya@mobiveil.co.in>
|
||||
L: linux-pci@vger.kernel.org
|
||||
S: Supported
|
||||
F: Documentation/devicetree/bindings/pci/mobiveil-pcie.txt
|
||||
F: drivers/pci/controller/pcie-mobiveil.c
|
||||
|
||||
PCI DRIVER FOR MVEBU (Marvell Armada 370 and Armada XP SOC support)
|
||||
M: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
M: Jason Cooper <jason@lakedaemon.net>
|
||||
|
@ -11212,8 +11213,14 @@ F: tools/pci/
|
|||
|
||||
PCI ENHANCED ERROR HANDLING (EEH) FOR POWERPC
|
||||
M: Russell Currey <ruscur@russell.cc>
|
||||
M: Sam Bobroff <sbobroff@linux.ibm.com>
|
||||
M: Oliver O'Halloran <oohall@gmail.com>
|
||||
L: linuxppc-dev@lists.ozlabs.org
|
||||
S: Supported
|
||||
F: Documentation/PCI/pci-error-recovery.txt
|
||||
F: drivers/pci/pcie/aer.c
|
||||
F: drivers/pci/pcie/dpc.c
|
||||
F: drivers/pci/pcie/err.c
|
||||
F: Documentation/powerpc/eeh-pci-error-recovery.txt
|
||||
F: arch/powerpc/kernel/eeh*.c
|
||||
F: arch/powerpc/platforms/*/eeh*.c
|
||||
|
@ -11982,7 +11989,7 @@ F: Documentation/scsi/LICENSE.qla4xxx
|
|||
F: drivers/scsi/qla4xxx/
|
||||
|
||||
QLOGIC QLCNIC (1/10)Gb ETHERNET DRIVER
|
||||
M: Harish Patil <harish.patil@cavium.com>
|
||||
M: Shahed Shaikh <Shahed.Shaikh@cavium.com>
|
||||
M: Manish Chopra <manish.chopra@cavium.com>
|
||||
M: Dept-GELinuxNICDev@cavium.com
|
||||
L: netdev@vger.kernel.org
|
||||
|
@ -11990,7 +11997,6 @@ S: Supported
|
|||
F: drivers/net/ethernet/qlogic/qlcnic/
|
||||
|
||||
QLOGIC QLGE 10Gb ETHERNET DRIVER
|
||||
M: Harish Patil <harish.patil@cavium.com>
|
||||
M: Manish Chopra <manish.chopra@cavium.com>
|
||||
M: Dept-GELinuxNICDev@cavium.com
|
||||
L: netdev@vger.kernel.org
|
||||
|
@ -15398,7 +15404,7 @@ S: Maintained
|
|||
UVESAFB DRIVER
|
||||
M: Michal Januszewski <spock@gentoo.org>
|
||||
L: linux-fbdev@vger.kernel.org
|
||||
W: http://dev.gentoo.org/~spock/projects/uvesafb/
|
||||
W: https://github.com/mjanusz/v86d
|
||||
S: Maintained
|
||||
F: Documentation/fb/uvesafb.txt
|
||||
F: drivers/video/fbdev/uvesafb.*
|
||||
|
|
2
Makefile
2
Makefile
|
@ -2,7 +2,7 @@
|
|||
VERSION = 4
|
||||
PATCHLEVEL = 19
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc5
|
||||
EXTRAVERSION = -rc6
|
||||
NAME = Merciless Moray
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "sama5d2-pinfunc.h"
|
||||
#include <dt-bindings/mfd/atmel-flexcom.h>
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/pinctrl/at91.h>
|
||||
|
||||
/ {
|
||||
model = "Atmel SAMA5D2 PTC EK";
|
||||
|
@ -299,6 +300,7 @@
|
|||
<PIN_PA30__NWE_NANDWE>,
|
||||
<PIN_PB2__NRD_NANDOE>;
|
||||
bias-pull-up;
|
||||
atmel,drive-strength = <ATMEL_PIO_DRVSTR_ME>;
|
||||
};
|
||||
|
||||
ale_cle_rdy_cs {
|
||||
|
|
|
@ -106,21 +106,23 @@
|
|||
global_timer: timer@1e200 {
|
||||
compatible = "arm,cortex-a9-global-timer";
|
||||
reg = <0x1e200 0x20>;
|
||||
interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupts = <GIC_PPI 11 IRQ_TYPE_EDGE_RISING>;
|
||||
clocks = <&axi_clk>;
|
||||
};
|
||||
|
||||
local_timer: local-timer@1e600 {
|
||||
compatible = "arm,cortex-a9-twd-timer";
|
||||
reg = <0x1e600 0x20>;
|
||||
interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) |
|
||||
IRQ_TYPE_EDGE_RISING)>;
|
||||
clocks = <&axi_clk>;
|
||||
};
|
||||
|
||||
twd_watchdog: watchdog@1e620 {
|
||||
compatible = "arm,cortex-a9-twd-wdt";
|
||||
reg = <0x1e620 0x20>;
|
||||
interrupts = <GIC_PPI 14 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupts = <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) |
|
||||
IRQ_TYPE_LEVEL_HIGH)>;
|
||||
};
|
||||
|
||||
armpll: armpll {
|
||||
|
@ -158,7 +160,7 @@
|
|||
serial0: serial@600 {
|
||||
compatible = "brcm,bcm6345-uart";
|
||||
reg = <0x600 0x1b>;
|
||||
interrupts = <GIC_SPI 32 0>;
|
||||
interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&periph_clk>;
|
||||
clock-names = "periph";
|
||||
status = "disabled";
|
||||
|
@ -167,7 +169,7 @@
|
|||
serial1: serial@620 {
|
||||
compatible = "brcm,bcm6345-uart";
|
||||
reg = <0x620 0x1b>;
|
||||
interrupts = <GIC_SPI 33 0>;
|
||||
interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&periph_clk>;
|
||||
clock-names = "periph";
|
||||
status = "disabled";
|
||||
|
@ -180,7 +182,7 @@
|
|||
reg = <0x2000 0x600>, <0xf0 0x10>;
|
||||
reg-names = "nand", "nand-int-base";
|
||||
status = "disabled";
|
||||
interrupts = <GIC_SPI 38 0>;
|
||||
interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "nand";
|
||||
};
|
||||
|
||||
|
|
|
@ -1078,8 +1078,8 @@
|
|||
interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&rcc SPI6_K>;
|
||||
resets = <&rcc SPI6_R>;
|
||||
dmas = <&mdma1 34 0x0 0x40008 0x0 0x0 0>,
|
||||
<&mdma1 35 0x0 0x40002 0x0 0x0 0>;
|
||||
dmas = <&mdma1 34 0x0 0x40008 0x0 0x0>,
|
||||
<&mdma1 35 0x0 0x40002 0x0 0x0>;
|
||||
dma-names = "rx", "tx";
|
||||
status = "disabled";
|
||||
};
|
||||
|
|
|
@ -800,8 +800,7 @@
|
|||
};
|
||||
|
||||
hdmi_phy: hdmi-phy@1ef0000 {
|
||||
compatible = "allwinner,sun8i-r40-hdmi-phy",
|
||||
"allwinner,sun50i-a64-hdmi-phy";
|
||||
compatible = "allwinner,sun8i-r40-hdmi-phy";
|
||||
reg = <0x01ef0000 0x10000>;
|
||||
clocks = <&ccu CLK_BUS_HDMI1>, <&ccu CLK_HDMI_SLOW>,
|
||||
<&ccu 7>, <&ccu 16>;
|
||||
|
|
|
@ -57,6 +57,45 @@ static u64 core_reg_offset_from_id(u64 id)
|
|||
return id & ~(KVM_REG_ARCH_MASK | KVM_REG_SIZE_MASK | KVM_REG_ARM_CORE);
|
||||
}
|
||||
|
||||
static int validate_core_offset(const struct kvm_one_reg *reg)
|
||||
{
|
||||
u64 off = core_reg_offset_from_id(reg->id);
|
||||
int size;
|
||||
|
||||
switch (off) {
|
||||
case KVM_REG_ARM_CORE_REG(regs.regs[0]) ...
|
||||
KVM_REG_ARM_CORE_REG(regs.regs[30]):
|
||||
case KVM_REG_ARM_CORE_REG(regs.sp):
|
||||
case KVM_REG_ARM_CORE_REG(regs.pc):
|
||||
case KVM_REG_ARM_CORE_REG(regs.pstate):
|
||||
case KVM_REG_ARM_CORE_REG(sp_el1):
|
||||
case KVM_REG_ARM_CORE_REG(elr_el1):
|
||||
case KVM_REG_ARM_CORE_REG(spsr[0]) ...
|
||||
KVM_REG_ARM_CORE_REG(spsr[KVM_NR_SPSR - 1]):
|
||||
size = sizeof(__u64);
|
||||
break;
|
||||
|
||||
case KVM_REG_ARM_CORE_REG(fp_regs.vregs[0]) ...
|
||||
KVM_REG_ARM_CORE_REG(fp_regs.vregs[31]):
|
||||
size = sizeof(__uint128_t);
|
||||
break;
|
||||
|
||||
case KVM_REG_ARM_CORE_REG(fp_regs.fpsr):
|
||||
case KVM_REG_ARM_CORE_REG(fp_regs.fpcr):
|
||||
size = sizeof(__u32);
|
||||
break;
|
||||
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (KVM_REG_SIZE(reg->id) == size &&
|
||||
IS_ALIGNED(off, size / sizeof(__u32)))
|
||||
return 0;
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static int get_core_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg)
|
||||
{
|
||||
/*
|
||||
|
@ -76,6 +115,9 @@ static int get_core_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg)
|
|||
(off + (KVM_REG_SIZE(reg->id) / sizeof(__u32))) >= nr_regs)
|
||||
return -ENOENT;
|
||||
|
||||
if (validate_core_offset(reg))
|
||||
return -EINVAL;
|
||||
|
||||
if (copy_to_user(uaddr, ((u32 *)regs) + off, KVM_REG_SIZE(reg->id)))
|
||||
return -EFAULT;
|
||||
|
||||
|
@ -98,6 +140,9 @@ static int set_core_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg)
|
|||
(off + (KVM_REG_SIZE(reg->id) / sizeof(__u32))) >= nr_regs)
|
||||
return -ENOENT;
|
||||
|
||||
if (validate_core_offset(reg))
|
||||
return -EINVAL;
|
||||
|
||||
if (KVM_REG_SIZE(reg->id) > sizeof(tmp))
|
||||
return -EINVAL;
|
||||
|
||||
|
@ -107,17 +152,25 @@ static int set_core_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg)
|
|||
}
|
||||
|
||||
if (off == KVM_REG_ARM_CORE_REG(regs.pstate)) {
|
||||
u32 mode = (*(u32 *)valp) & PSR_AA32_MODE_MASK;
|
||||
u64 mode = (*(u64 *)valp) & PSR_AA32_MODE_MASK;
|
||||
switch (mode) {
|
||||
case PSR_AA32_MODE_USR:
|
||||
if (!system_supports_32bit_el0())
|
||||
return -EINVAL;
|
||||
break;
|
||||
case PSR_AA32_MODE_FIQ:
|
||||
case PSR_AA32_MODE_IRQ:
|
||||
case PSR_AA32_MODE_SVC:
|
||||
case PSR_AA32_MODE_ABT:
|
||||
case PSR_AA32_MODE_UND:
|
||||
if (!vcpu_el1_is_32bit(vcpu))
|
||||
return -EINVAL;
|
||||
break;
|
||||
case PSR_MODE_EL0t:
|
||||
case PSR_MODE_EL1t:
|
||||
case PSR_MODE_EL1h:
|
||||
if (vcpu_el1_is_32bit(vcpu))
|
||||
return -EINVAL;
|
||||
break;
|
||||
default:
|
||||
err = -EINVAL;
|
||||
|
|
|
@ -117,11 +117,14 @@ static pte_t get_clear_flush(struct mm_struct *mm,
|
|||
|
||||
/*
|
||||
* If HW_AFDBM is enabled, then the HW could turn on
|
||||
* the dirty bit for any page in the set, so check
|
||||
* them all. All hugetlb entries are already young.
|
||||
* the dirty or accessed bit for any page in the set,
|
||||
* so check them all.
|
||||
*/
|
||||
if (pte_dirty(pte))
|
||||
orig_pte = pte_mkdirty(orig_pte);
|
||||
|
||||
if (pte_young(pte))
|
||||
orig_pte = pte_mkyoung(orig_pte);
|
||||
}
|
||||
|
||||
if (valid) {
|
||||
|
@ -320,11 +323,40 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm,
|
|||
return get_clear_flush(mm, addr, ptep, pgsize, ncontig);
|
||||
}
|
||||
|
||||
/*
|
||||
* huge_ptep_set_access_flags will update access flags (dirty, accesssed)
|
||||
* and write permission.
|
||||
*
|
||||
* For a contiguous huge pte range we need to check whether or not write
|
||||
* permission has to change only on the first pte in the set. Then for
|
||||
* all the contiguous ptes we need to check whether or not there is a
|
||||
* discrepancy between dirty or young.
|
||||
*/
|
||||
static int __cont_access_flags_changed(pte_t *ptep, pte_t pte, int ncontig)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (pte_write(pte) != pte_write(huge_ptep_get(ptep)))
|
||||
return 1;
|
||||
|
||||
for (i = 0; i < ncontig; i++) {
|
||||
pte_t orig_pte = huge_ptep_get(ptep + i);
|
||||
|
||||
if (pte_dirty(pte) != pte_dirty(orig_pte))
|
||||
return 1;
|
||||
|
||||
if (pte_young(pte) != pte_young(orig_pte))
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int huge_ptep_set_access_flags(struct vm_area_struct *vma,
|
||||
unsigned long addr, pte_t *ptep,
|
||||
pte_t pte, int dirty)
|
||||
{
|
||||
int ncontig, i, changed = 0;
|
||||
int ncontig, i;
|
||||
size_t pgsize = 0;
|
||||
unsigned long pfn = pte_pfn(pte), dpfn;
|
||||
pgprot_t hugeprot;
|
||||
|
@ -336,19 +368,23 @@ int huge_ptep_set_access_flags(struct vm_area_struct *vma,
|
|||
ncontig = find_num_contig(vma->vm_mm, addr, ptep, &pgsize);
|
||||
dpfn = pgsize >> PAGE_SHIFT;
|
||||
|
||||
orig_pte = get_clear_flush(vma->vm_mm, addr, ptep, pgsize, ncontig);
|
||||
if (!pte_same(orig_pte, pte))
|
||||
changed = 1;
|
||||
if (!__cont_access_flags_changed(ptep, pte, ncontig))
|
||||
return 0;
|
||||
|
||||
/* Make sure we don't lose the dirty state */
|
||||
orig_pte = get_clear_flush(vma->vm_mm, addr, ptep, pgsize, ncontig);
|
||||
|
||||
/* Make sure we don't lose the dirty or young state */
|
||||
if (pte_dirty(orig_pte))
|
||||
pte = pte_mkdirty(pte);
|
||||
|
||||
if (pte_young(orig_pte))
|
||||
pte = pte_mkyoung(pte);
|
||||
|
||||
hugeprot = pte_pgprot(pte);
|
||||
for (i = 0; i < ncontig; i++, ptep++, addr += pgsize, pfn += dpfn)
|
||||
set_pte_at(vma->vm_mm, addr, ptep, pfn_pte(pfn, hugeprot));
|
||||
|
||||
return changed;
|
||||
return 1;
|
||||
}
|
||||
|
||||
void huge_ptep_set_wrprotect(struct mm_struct *mm,
|
||||
|
|
|
@ -9,6 +9,7 @@ extern void ppc_printk_progress(char *s, unsigned short hex);
|
|||
|
||||
extern unsigned int rtas_data;
|
||||
extern unsigned long long memory_limit;
|
||||
extern bool init_mem_is_free;
|
||||
extern unsigned long klimit;
|
||||
extern void *zalloc_maybe_bootmem(size_t size, gfp_t mask);
|
||||
|
||||
|
|
|
@ -1314,9 +1314,7 @@ EXC_REAL_BEGIN(denorm_exception_hv, 0x1500, 0x100)
|
|||
|
||||
#ifdef CONFIG_PPC_DENORMALISATION
|
||||
mfspr r10,SPRN_HSRR1
|
||||
mfspr r11,SPRN_HSRR0 /* save HSRR0 */
|
||||
andis. r10,r10,(HSRR1_DENORM)@h /* denorm? */
|
||||
addi r11,r11,-4 /* HSRR0 is next instruction */
|
||||
bne+ denorm_assist
|
||||
#endif
|
||||
|
||||
|
@ -1382,6 +1380,8 @@ END_FTR_SECTION_IFCLR(CPU_FTR_ARCH_207S)
|
|||
*/
|
||||
XVCPSGNDP32(32)
|
||||
denorm_done:
|
||||
mfspr r11,SPRN_HSRR0
|
||||
subi r11,r11,4
|
||||
mtspr SPRN_HSRR0,r11
|
||||
mtcrf 0x80,r9
|
||||
ld r9,PACA_EXGEN+EX_R9(r13)
|
||||
|
|
|
@ -176,13 +176,27 @@ _GLOBAL(tm_reclaim)
|
|||
std r1, PACATMSCRATCH(r13)
|
||||
ld r1, PACAR1(r13)
|
||||
|
||||
/* Store the PPR in r11 and reset to decent value */
|
||||
std r11, GPR11(r1) /* Temporary stash */
|
||||
|
||||
/*
|
||||
* Move the saved user r1 to the kernel stack in case PACATMSCRATCH is
|
||||
* clobbered by an exception once we turn on MSR_RI below.
|
||||
*/
|
||||
ld r11, PACATMSCRATCH(r13)
|
||||
std r11, GPR1(r1)
|
||||
|
||||
/*
|
||||
* Store r13 away so we can free up the scratch SPR for the SLB fault
|
||||
* handler (needed once we start accessing the thread_struct).
|
||||
*/
|
||||
GET_SCRATCH0(r11)
|
||||
std r11, GPR13(r1)
|
||||
|
||||
/* Reset MSR RI so we can take SLB faults again */
|
||||
li r11, MSR_RI
|
||||
mtmsrd r11, 1
|
||||
|
||||
/* Store the PPR in r11 and reset to decent value */
|
||||
mfspr r11, SPRN_PPR
|
||||
HMT_MEDIUM
|
||||
|
||||
|
@ -207,11 +221,11 @@ _GLOBAL(tm_reclaim)
|
|||
SAVE_GPR(8, r7) /* user r8 */
|
||||
SAVE_GPR(9, r7) /* user r9 */
|
||||
SAVE_GPR(10, r7) /* user r10 */
|
||||
ld r3, PACATMSCRATCH(r13) /* user r1 */
|
||||
ld r3, GPR1(r1) /* user r1 */
|
||||
ld r4, GPR7(r1) /* user r7 */
|
||||
ld r5, GPR11(r1) /* user r11 */
|
||||
ld r6, GPR12(r1) /* user r12 */
|
||||
GET_SCRATCH0(8) /* user r13 */
|
||||
ld r8, GPR13(r1) /* user r13 */
|
||||
std r3, GPR1(r7)
|
||||
std r4, GPR7(r7)
|
||||
std r5, GPR11(r7)
|
||||
|
|
|
@ -443,6 +443,9 @@ _GLOBAL(csum_ipv6_magic)
|
|||
addc r0, r8, r9
|
||||
ld r10, 0(r4)
|
||||
ld r11, 8(r4)
|
||||
#ifdef CONFIG_CPU_LITTLE_ENDIAN
|
||||
rotldi r5, r5, 8
|
||||
#endif
|
||||
adde r0, r0, r10
|
||||
add r5, r5, r7
|
||||
adde r0, r0, r11
|
||||
|
|
|
@ -28,6 +28,12 @@ static int __patch_instruction(unsigned int *exec_addr, unsigned int instr,
|
|||
{
|
||||
int err;
|
||||
|
||||
/* Make sure we aren't patching a freed init section */
|
||||
if (init_mem_is_free && init_section_contains(exec_addr, 4)) {
|
||||
pr_debug("Skipping init section patching addr: 0x%px\n", exec_addr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
__put_user_size(instr, patch_addr, 4, err);
|
||||
if (err)
|
||||
return err;
|
||||
|
|
|
@ -63,6 +63,7 @@
|
|||
#endif
|
||||
|
||||
unsigned long long memory_limit;
|
||||
bool init_mem_is_free;
|
||||
|
||||
#ifdef CONFIG_HIGHMEM
|
||||
pte_t *kmap_pte;
|
||||
|
@ -396,6 +397,7 @@ void free_initmem(void)
|
|||
{
|
||||
ppc_md.progress = ppc_printk_progress;
|
||||
mark_initmem_nx();
|
||||
init_mem_is_free = true;
|
||||
free_initmem_default(POISON_FREE_INITMEM);
|
||||
}
|
||||
|
||||
|
|
|
@ -1204,7 +1204,9 @@ int find_and_online_cpu_nid(int cpu)
|
|||
int new_nid;
|
||||
|
||||
/* Use associativity from first thread for all siblings */
|
||||
vphn_get_associativity(cpu, associativity);
|
||||
if (vphn_get_associativity(cpu, associativity))
|
||||
return cpu_to_node(cpu);
|
||||
|
||||
new_nid = associativity_to_nid(associativity);
|
||||
if (new_nid < 0 || !node_possible(new_nid))
|
||||
new_nid = first_online_node;
|
||||
|
@ -1452,7 +1454,8 @@ static struct timer_list topology_timer;
|
|||
|
||||
static void reset_topology_timer(void)
|
||||
{
|
||||
mod_timer(&topology_timer, jiffies + topology_timer_secs * HZ);
|
||||
if (vphn_enabled)
|
||||
mod_timer(&topology_timer, jiffies + topology_timer_secs * HZ);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
|
|
|
@ -45,7 +45,7 @@ static void scan_pkey_feature(void)
|
|||
* Since any pkey can be used for data or execute, we will just treat
|
||||
* all keys as equal and track them as one entity.
|
||||
*/
|
||||
pkeys_total = be32_to_cpu(vals[0]);
|
||||
pkeys_total = vals[0];
|
||||
pkeys_devtree_defined = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -276,7 +276,7 @@ long pnv_pci_ioda2_table_alloc_pages(int nid, __u64 bus_offset,
|
|||
level_shift = entries_shift + 3;
|
||||
level_shift = max_t(unsigned int, level_shift, PAGE_SHIFT);
|
||||
|
||||
if ((level_shift - 3) * levels + page_shift >= 60)
|
||||
if ((level_shift - 3) * levels + page_shift >= 55)
|
||||
return -EINVAL;
|
||||
|
||||
/* Allocate TCE table */
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef _ASM_RISCV_PROTOTYPES_H
|
||||
|
||||
#include <linux/ftrace.h>
|
||||
#include <asm-generic/asm-prototypes.h>
|
||||
|
||||
#endif /* _ASM_RISCV_PROTOTYPES_H */
|
|
@ -25,20 +25,6 @@ ENTRY(get_sev_encryption_bit)
|
|||
push %ebx
|
||||
push %ecx
|
||||
push %edx
|
||||
push %edi
|
||||
|
||||
/*
|
||||
* RIP-relative addressing is needed to access the encryption bit
|
||||
* variable. Since we are running in 32-bit mode we need this call/pop
|
||||
* sequence to get the proper relative addressing.
|
||||
*/
|
||||
call 1f
|
||||
1: popl %edi
|
||||
subl $1b, %edi
|
||||
|
||||
movl enc_bit(%edi), %eax
|
||||
cmpl $0, %eax
|
||||
jge .Lsev_exit
|
||||
|
||||
/* Check if running under a hypervisor */
|
||||
movl $1, %eax
|
||||
|
@ -69,15 +55,12 @@ ENTRY(get_sev_encryption_bit)
|
|||
|
||||
movl %ebx, %eax
|
||||
andl $0x3f, %eax /* Return the encryption bit location */
|
||||
movl %eax, enc_bit(%edi)
|
||||
jmp .Lsev_exit
|
||||
|
||||
.Lno_sev:
|
||||
xor %eax, %eax
|
||||
movl %eax, enc_bit(%edi)
|
||||
|
||||
.Lsev_exit:
|
||||
pop %edi
|
||||
pop %edx
|
||||
pop %ecx
|
||||
pop %ebx
|
||||
|
@ -113,8 +96,6 @@ ENTRY(set_sev_encryption_mask)
|
|||
ENDPROC(set_sev_encryption_mask)
|
||||
|
||||
.data
|
||||
enc_bit:
|
||||
.int 0xffffffff
|
||||
|
||||
#ifdef CONFIG_AMD_MEM_ENCRYPT
|
||||
.balign 8
|
||||
|
|
|
@ -322,16 +322,11 @@ void blk_mq_queue_tag_busy_iter(struct request_queue *q, busy_iter_fn *fn,
|
|||
|
||||
/*
|
||||
* __blk_mq_update_nr_hw_queues will update the nr_hw_queues and
|
||||
* queue_hw_ctx after freeze the queue. So we could use q_usage_counter
|
||||
* to avoid race with it. __blk_mq_update_nr_hw_queues will users
|
||||
* synchronize_rcu to ensure all of the users go out of the critical
|
||||
* section below and see zeroed q_usage_counter.
|
||||
* queue_hw_ctx after freeze the queue, so we use q_usage_counter
|
||||
* to avoid race with it.
|
||||
*/
|
||||
rcu_read_lock();
|
||||
if (percpu_ref_is_zero(&q->q_usage_counter)) {
|
||||
rcu_read_unlock();
|
||||
if (!percpu_ref_tryget(&q->q_usage_counter))
|
||||
return;
|
||||
}
|
||||
|
||||
queue_for_each_hw_ctx(q, hctx, i) {
|
||||
struct blk_mq_tags *tags = hctx->tags;
|
||||
|
@ -347,7 +342,7 @@ void blk_mq_queue_tag_busy_iter(struct request_queue *q, busy_iter_fn *fn,
|
|||
bt_for_each(hctx, &tags->breserved_tags, fn, priv, true);
|
||||
bt_for_each(hctx, &tags->bitmap_tags, fn, priv, false);
|
||||
}
|
||||
rcu_read_unlock();
|
||||
blk_queue_exit(q);
|
||||
}
|
||||
|
||||
static int bt_alloc(struct sbitmap_queue *bt, unsigned int depth,
|
||||
|
|
|
@ -1628,7 +1628,7 @@ void blk_mq_flush_plug_list(struct blk_plug *plug, bool from_schedule)
|
|||
BUG_ON(!rq->q);
|
||||
if (rq->mq_ctx != this_ctx) {
|
||||
if (this_ctx) {
|
||||
trace_block_unplug(this_q, depth, from_schedule);
|
||||
trace_block_unplug(this_q, depth, !from_schedule);
|
||||
blk_mq_sched_insert_requests(this_q, this_ctx,
|
||||
&ctx_list,
|
||||
from_schedule);
|
||||
|
@ -1648,7 +1648,7 @@ void blk_mq_flush_plug_list(struct blk_plug *plug, bool from_schedule)
|
|||
* on 'ctx_list'. Do those.
|
||||
*/
|
||||
if (this_ctx) {
|
||||
trace_block_unplug(this_q, depth, from_schedule);
|
||||
trace_block_unplug(this_q, depth, !from_schedule);
|
||||
blk_mq_sched_insert_requests(this_q, this_ctx, &ctx_list,
|
||||
from_schedule);
|
||||
}
|
||||
|
|
|
@ -609,7 +609,7 @@ void elv_drain_elevator(struct request_queue *q)
|
|||
|
||||
while (e->type->ops.sq.elevator_dispatch_fn(q, 1))
|
||||
;
|
||||
if (q->nr_sorted && printed++ < 10) {
|
||||
if (q->nr_sorted && !blk_queue_is_zoned(q) && printed++ < 10 ) {
|
||||
printk(KERN_ERR "%s: forced dispatching is broken "
|
||||
"(nr_sorted=%u), please report this\n",
|
||||
q->elevator->type->elevator_name, q->nr_sorted);
|
||||
|
|
|
@ -2670,8 +2670,8 @@ static void purge_persistent_grants(struct blkfront_info *info)
|
|||
list_del(&gnt_list_entry->node);
|
||||
gnttab_end_foreign_access(gnt_list_entry->gref, 0, 0UL);
|
||||
rinfo->persistent_gnts_c--;
|
||||
__free_page(gnt_list_entry->page);
|
||||
kfree(gnt_list_entry);
|
||||
gnt_list_entry->gref = GRANT_INVALID_REF;
|
||||
list_add_tail(&gnt_list_entry->node, &rinfo->grants);
|
||||
}
|
||||
|
||||
spin_unlock_irqrestore(&rinfo->ring_lock, flags);
|
||||
|
|
|
@ -180,26 +180,29 @@ static int __init at91sam926x_pit_dt_init(struct device_node *node)
|
|||
data->base = of_iomap(node, 0);
|
||||
if (!data->base) {
|
||||
pr_err("Could not map PIT address\n");
|
||||
return -ENXIO;
|
||||
ret = -ENXIO;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
data->mck = of_clk_get(node, 0);
|
||||
if (IS_ERR(data->mck)) {
|
||||
pr_err("Unable to get mck clk\n");
|
||||
return PTR_ERR(data->mck);
|
||||
ret = PTR_ERR(data->mck);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
ret = clk_prepare_enable(data->mck);
|
||||
if (ret) {
|
||||
pr_err("Unable to enable mck\n");
|
||||
return ret;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
/* Get the interrupts property */
|
||||
data->irq = irq_of_parse_and_map(node, 0);
|
||||
if (!data->irq) {
|
||||
pr_err("Unable to get IRQ from DT\n");
|
||||
return -EINVAL;
|
||||
ret = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -227,7 +230,7 @@ static int __init at91sam926x_pit_dt_init(struct device_node *node)
|
|||
ret = clocksource_register_hz(&data->clksrc, pit_rate);
|
||||
if (ret) {
|
||||
pr_err("Failed to register clocksource\n");
|
||||
return ret;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
/* Set up irq handler */
|
||||
|
@ -236,7 +239,8 @@ static int __init at91sam926x_pit_dt_init(struct device_node *node)
|
|||
"at91_tick", data);
|
||||
if (ret) {
|
||||
pr_err("Unable to setup IRQ\n");
|
||||
return ret;
|
||||
clocksource_unregister(&data->clksrc);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
/* Set up and register clockevents */
|
||||
|
@ -254,6 +258,10 @@ static int __init at91sam926x_pit_dt_init(struct device_node *node)
|
|||
clockevents_register_device(&data->clkevt);
|
||||
|
||||
return 0;
|
||||
|
||||
exit:
|
||||
kfree(data);
|
||||
return ret;
|
||||
}
|
||||
TIMER_OF_DECLARE(at91sam926x_pit, "atmel,at91sam9260-pit",
|
||||
at91sam926x_pit_dt_init);
|
||||
|
|
|
@ -130,13 +130,17 @@ static int fttmr010_timer_set_next_event(unsigned long cycles,
|
|||
cr &= ~fttmr010->t1_enable_val;
|
||||
writel(cr, fttmr010->base + TIMER_CR);
|
||||
|
||||
/* Setup the match register forward/backward in time */
|
||||
cr = readl(fttmr010->base + TIMER1_COUNT);
|
||||
if (fttmr010->count_down)
|
||||
cr -= cycles;
|
||||
else
|
||||
cr += cycles;
|
||||
writel(cr, fttmr010->base + TIMER1_MATCH1);
|
||||
if (fttmr010->count_down) {
|
||||
/*
|
||||
* ASPEED Timer Controller will load TIMER1_LOAD register
|
||||
* into TIMER1_COUNT register when the timer is re-enabled.
|
||||
*/
|
||||
writel(cycles, fttmr010->base + TIMER1_LOAD);
|
||||
} else {
|
||||
/* Setup the match register forward in time */
|
||||
cr = readl(fttmr010->base + TIMER1_COUNT);
|
||||
writel(cr + cycles, fttmr010->base + TIMER1_MATCH1);
|
||||
}
|
||||
|
||||
/* Start */
|
||||
cr = readl(fttmr010->base + TIMER_CR);
|
||||
|
|
|
@ -97,6 +97,9 @@ static int __init ti_32k_timer_init(struct device_node *np)
|
|||
return -ENXIO;
|
||||
}
|
||||
|
||||
if (!of_machine_is_compatible("ti,am43"))
|
||||
ti_32k_timer.cs.flags |= CLOCK_SOURCE_SUSPEND_NONSTOP;
|
||||
|
||||
ti_32k_timer.counter = ti_32k_timer.base;
|
||||
|
||||
/*
|
||||
|
|
|
@ -44,7 +44,7 @@ enum _msm8996_version {
|
|||
|
||||
struct platform_device *cpufreq_dt_pdev, *kryo_cpufreq_pdev;
|
||||
|
||||
static enum _msm8996_version __init qcom_cpufreq_kryo_get_msm_id(void)
|
||||
static enum _msm8996_version qcom_cpufreq_kryo_get_msm_id(void)
|
||||
{
|
||||
size_t len;
|
||||
u32 *msm_id;
|
||||
|
@ -222,7 +222,7 @@ static int __init qcom_cpufreq_kryo_init(void)
|
|||
}
|
||||
module_init(qcom_cpufreq_kryo_init);
|
||||
|
||||
static void __init qcom_cpufreq_kryo_exit(void)
|
||||
static void __exit qcom_cpufreq_kryo_exit(void)
|
||||
{
|
||||
platform_device_unregister(kryo_cpufreq_pdev);
|
||||
platform_driver_unregister(&qcom_cpufreq_kryo_driver);
|
||||
|
|
|
@ -535,6 +535,11 @@ static unsigned long dax_get_unmapped_area(struct file *filp,
|
|||
return current->mm->get_unmapped_area(filp, addr, len, pgoff, flags);
|
||||
}
|
||||
|
||||
static const struct address_space_operations dev_dax_aops = {
|
||||
.set_page_dirty = noop_set_page_dirty,
|
||||
.invalidatepage = noop_invalidatepage,
|
||||
};
|
||||
|
||||
static int dax_open(struct inode *inode, struct file *filp)
|
||||
{
|
||||
struct dax_device *dax_dev = inode_dax(inode);
|
||||
|
@ -544,6 +549,7 @@ static int dax_open(struct inode *inode, struct file *filp)
|
|||
dev_dbg(&dev_dax->dev, "trace\n");
|
||||
inode->i_mapping = __dax_inode->i_mapping;
|
||||
inode->i_mapping->host = __dax_inode;
|
||||
inode->i_mapping->a_ops = &dev_dax_aops;
|
||||
filp->f_mapping = inode->i_mapping;
|
||||
filp->f_wb_err = filemap_sample_wb_err(filp->f_mapping);
|
||||
filp->private_data = dev_dax;
|
||||
|
|
|
@ -258,6 +258,8 @@ int amdgpu_vce_suspend(struct amdgpu_device *adev)
|
|||
{
|
||||
int i;
|
||||
|
||||
cancel_delayed_work_sync(&adev->vce.idle_work);
|
||||
|
||||
if (adev->vce.vcpu_bo == NULL)
|
||||
return 0;
|
||||
|
||||
|
@ -268,7 +270,6 @@ int amdgpu_vce_suspend(struct amdgpu_device *adev)
|
|||
if (i == AMDGPU_MAX_VCE_HANDLES)
|
||||
return 0;
|
||||
|
||||
cancel_delayed_work_sync(&adev->vce.idle_work);
|
||||
/* TODO: suspending running encoding sessions isn't supported */
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
@ -153,11 +153,11 @@ int amdgpu_vcn_suspend(struct amdgpu_device *adev)
|
|||
unsigned size;
|
||||
void *ptr;
|
||||
|
||||
cancel_delayed_work_sync(&adev->vcn.idle_work);
|
||||
|
||||
if (adev->vcn.vcpu_bo == NULL)
|
||||
return 0;
|
||||
|
||||
cancel_delayed_work_sync(&adev->vcn.idle_work);
|
||||
|
||||
size = amdgpu_bo_size(adev->vcn.vcpu_bo);
|
||||
ptr = adev->vcn.cpu_addr;
|
||||
|
||||
|
|
|
@ -641,6 +641,87 @@ amdgpu_dm_find_first_crtc_matching_connector(struct drm_atomic_state *state,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static void emulated_link_detect(struct dc_link *link)
|
||||
{
|
||||
struct dc_sink_init_data sink_init_data = { 0 };
|
||||
struct display_sink_capability sink_caps = { 0 };
|
||||
enum dc_edid_status edid_status;
|
||||
struct dc_context *dc_ctx = link->ctx;
|
||||
struct dc_sink *sink = NULL;
|
||||
struct dc_sink *prev_sink = NULL;
|
||||
|
||||
link->type = dc_connection_none;
|
||||
prev_sink = link->local_sink;
|
||||
|
||||
if (prev_sink != NULL)
|
||||
dc_sink_retain(prev_sink);
|
||||
|
||||
switch (link->connector_signal) {
|
||||
case SIGNAL_TYPE_HDMI_TYPE_A: {
|
||||
sink_caps.transaction_type = DDC_TRANSACTION_TYPE_I2C;
|
||||
sink_caps.signal = SIGNAL_TYPE_HDMI_TYPE_A;
|
||||
break;
|
||||
}
|
||||
|
||||
case SIGNAL_TYPE_DVI_SINGLE_LINK: {
|
||||
sink_caps.transaction_type = DDC_TRANSACTION_TYPE_I2C;
|
||||
sink_caps.signal = SIGNAL_TYPE_DVI_SINGLE_LINK;
|
||||
break;
|
||||
}
|
||||
|
||||
case SIGNAL_TYPE_DVI_DUAL_LINK: {
|
||||
sink_caps.transaction_type = DDC_TRANSACTION_TYPE_I2C;
|
||||
sink_caps.signal = SIGNAL_TYPE_DVI_DUAL_LINK;
|
||||
break;
|
||||
}
|
||||
|
||||
case SIGNAL_TYPE_LVDS: {
|
||||
sink_caps.transaction_type = DDC_TRANSACTION_TYPE_I2C;
|
||||
sink_caps.signal = SIGNAL_TYPE_LVDS;
|
||||
break;
|
||||
}
|
||||
|
||||
case SIGNAL_TYPE_EDP: {
|
||||
sink_caps.transaction_type =
|
||||
DDC_TRANSACTION_TYPE_I2C_OVER_AUX;
|
||||
sink_caps.signal = SIGNAL_TYPE_EDP;
|
||||
break;
|
||||
}
|
||||
|
||||
case SIGNAL_TYPE_DISPLAY_PORT: {
|
||||
sink_caps.transaction_type =
|
||||
DDC_TRANSACTION_TYPE_I2C_OVER_AUX;
|
||||
sink_caps.signal = SIGNAL_TYPE_VIRTUAL;
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
DC_ERROR("Invalid connector type! signal:%d\n",
|
||||
link->connector_signal);
|
||||
return;
|
||||
}
|
||||
|
||||
sink_init_data.link = link;
|
||||
sink_init_data.sink_signal = sink_caps.signal;
|
||||
|
||||
sink = dc_sink_create(&sink_init_data);
|
||||
if (!sink) {
|
||||
DC_ERROR("Failed to create sink!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
link->local_sink = sink;
|
||||
|
||||
edid_status = dm_helpers_read_local_edid(
|
||||
link->ctx,
|
||||
link,
|
||||
sink);
|
||||
|
||||
if (edid_status != EDID_OK)
|
||||
DC_ERROR("Failed to read EDID");
|
||||
|
||||
}
|
||||
|
||||
static int dm_resume(void *handle)
|
||||
{
|
||||
struct amdgpu_device *adev = handle;
|
||||
|
@ -654,6 +735,7 @@ static int dm_resume(void *handle)
|
|||
struct drm_plane *plane;
|
||||
struct drm_plane_state *new_plane_state;
|
||||
struct dm_plane_state *dm_new_plane_state;
|
||||
enum dc_connection_type new_connection_type = dc_connection_none;
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
|
@ -684,7 +766,13 @@ static int dm_resume(void *handle)
|
|||
continue;
|
||||
|
||||
mutex_lock(&aconnector->hpd_lock);
|
||||
dc_link_detect(aconnector->dc_link, DETECT_REASON_HPD);
|
||||
if (!dc_link_detect_sink(aconnector->dc_link, &new_connection_type))
|
||||
DRM_ERROR("KMS: Failed to detect connector\n");
|
||||
|
||||
if (aconnector->base.force && new_connection_type == dc_connection_none)
|
||||
emulated_link_detect(aconnector->dc_link);
|
||||
else
|
||||
dc_link_detect(aconnector->dc_link, DETECT_REASON_HPD);
|
||||
|
||||
if (aconnector->fake_enable && aconnector->dc_link->local_sink)
|
||||
aconnector->fake_enable = false;
|
||||
|
@ -922,6 +1010,7 @@ static void handle_hpd_irq(void *param)
|
|||
struct amdgpu_dm_connector *aconnector = (struct amdgpu_dm_connector *)param;
|
||||
struct drm_connector *connector = &aconnector->base;
|
||||
struct drm_device *dev = connector->dev;
|
||||
enum dc_connection_type new_connection_type = dc_connection_none;
|
||||
|
||||
/* In case of failure or MST no need to update connector status or notify the OS
|
||||
* since (for MST case) MST does this in it's own context.
|
||||
|
@ -931,7 +1020,21 @@ static void handle_hpd_irq(void *param)
|
|||
if (aconnector->fake_enable)
|
||||
aconnector->fake_enable = false;
|
||||
|
||||
if (dc_link_detect(aconnector->dc_link, DETECT_REASON_HPD)) {
|
||||
if (!dc_link_detect_sink(aconnector->dc_link, &new_connection_type))
|
||||
DRM_ERROR("KMS: Failed to detect connector\n");
|
||||
|
||||
if (aconnector->base.force && new_connection_type == dc_connection_none) {
|
||||
emulated_link_detect(aconnector->dc_link);
|
||||
|
||||
|
||||
drm_modeset_lock_all(dev);
|
||||
dm_restore_drm_connector_state(dev, connector);
|
||||
drm_modeset_unlock_all(dev);
|
||||
|
||||
if (aconnector->base.force == DRM_FORCE_UNSPECIFIED)
|
||||
drm_kms_helper_hotplug_event(dev);
|
||||
|
||||
} else if (dc_link_detect(aconnector->dc_link, DETECT_REASON_HPD)) {
|
||||
amdgpu_dm_update_connector_after_detect(aconnector);
|
||||
|
||||
|
||||
|
@ -1031,6 +1134,7 @@ static void handle_hpd_rx_irq(void *param)
|
|||
struct drm_device *dev = connector->dev;
|
||||
struct dc_link *dc_link = aconnector->dc_link;
|
||||
bool is_mst_root_connector = aconnector->mst_mgr.mst_state;
|
||||
enum dc_connection_type new_connection_type = dc_connection_none;
|
||||
|
||||
/* TODO:Temporary add mutex to protect hpd interrupt not have a gpio
|
||||
* conflict, after implement i2c helper, this mutex should be
|
||||
|
@ -1042,7 +1146,24 @@ static void handle_hpd_rx_irq(void *param)
|
|||
if (dc_link_handle_hpd_rx_irq(dc_link, NULL, NULL) &&
|
||||
!is_mst_root_connector) {
|
||||
/* Downstream Port status changed. */
|
||||
if (dc_link_detect(dc_link, DETECT_REASON_HPDRX)) {
|
||||
if (!dc_link_detect_sink(dc_link, &new_connection_type))
|
||||
DRM_ERROR("KMS: Failed to detect connector\n");
|
||||
|
||||
if (aconnector->base.force && new_connection_type == dc_connection_none) {
|
||||
emulated_link_detect(dc_link);
|
||||
|
||||
if (aconnector->fake_enable)
|
||||
aconnector->fake_enable = false;
|
||||
|
||||
amdgpu_dm_update_connector_after_detect(aconnector);
|
||||
|
||||
|
||||
drm_modeset_lock_all(dev);
|
||||
dm_restore_drm_connector_state(dev, connector);
|
||||
drm_modeset_unlock_all(dev);
|
||||
|
||||
drm_kms_helper_hotplug_event(dev);
|
||||
} else if (dc_link_detect(dc_link, DETECT_REASON_HPDRX)) {
|
||||
|
||||
if (aconnector->fake_enable)
|
||||
aconnector->fake_enable = false;
|
||||
|
@ -1433,6 +1554,7 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
|
|||
struct amdgpu_mode_info *mode_info = &adev->mode_info;
|
||||
uint32_t link_cnt;
|
||||
int32_t total_overlay_planes, total_primary_planes;
|
||||
enum dc_connection_type new_connection_type = dc_connection_none;
|
||||
|
||||
link_cnt = dm->dc->caps.max_links;
|
||||
if (amdgpu_dm_mode_config_init(dm->adev)) {
|
||||
|
@ -1499,7 +1621,14 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
|
|||
|
||||
link = dc_get_link_at_index(dm->dc, i);
|
||||
|
||||
if (dc_link_detect(link, DETECT_REASON_BOOT)) {
|
||||
if (!dc_link_detect_sink(link, &new_connection_type))
|
||||
DRM_ERROR("KMS: Failed to detect connector\n");
|
||||
|
||||
if (aconnector->base.force && new_connection_type == dc_connection_none) {
|
||||
emulated_link_detect(link);
|
||||
amdgpu_dm_update_connector_after_detect(aconnector);
|
||||
|
||||
} else if (dc_link_detect(link, DETECT_REASON_BOOT)) {
|
||||
amdgpu_dm_update_connector_after_detect(aconnector);
|
||||
register_backlight_device(dm, link);
|
||||
}
|
||||
|
@ -2494,7 +2623,7 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector,
|
|||
if (dm_state && dm_state->freesync_capable)
|
||||
stream->ignore_msa_timing_param = true;
|
||||
finish:
|
||||
if (sink && sink->sink_signal == SIGNAL_TYPE_VIRTUAL)
|
||||
if (sink && sink->sink_signal == SIGNAL_TYPE_VIRTUAL && aconnector->base.force != DRM_FORCE_ON)
|
||||
dc_sink_release(sink);
|
||||
|
||||
return stream;
|
||||
|
|
|
@ -195,7 +195,7 @@ static bool program_hpd_filter(
|
|||
return result;
|
||||
}
|
||||
|
||||
static bool detect_sink(struct dc_link *link, enum dc_connection_type *type)
|
||||
bool dc_link_detect_sink(struct dc_link *link, enum dc_connection_type *type)
|
||||
{
|
||||
uint32_t is_hpd_high = 0;
|
||||
struct gpio *hpd_pin;
|
||||
|
@ -604,7 +604,7 @@ bool dc_link_detect(struct dc_link *link, enum dc_detect_reason reason)
|
|||
if (link->connector_signal == SIGNAL_TYPE_VIRTUAL)
|
||||
return false;
|
||||
|
||||
if (false == detect_sink(link, &new_connection_type)) {
|
||||
if (false == dc_link_detect_sink(link, &new_connection_type)) {
|
||||
BREAK_TO_DEBUGGER();
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -215,6 +215,7 @@ void dc_link_enable_hpd_filter(struct dc_link *link, bool enable);
|
|||
|
||||
bool dc_link_is_dp_sink_present(struct dc_link *link);
|
||||
|
||||
bool dc_link_detect_sink(struct dc_link *link, enum dc_connection_type *type);
|
||||
/*
|
||||
* DPCD access interfaces
|
||||
*/
|
||||
|
|
|
@ -2560,7 +2560,7 @@ static void pplib_apply_display_requirements(
|
|||
dc->prev_display_config = *pp_display_cfg;
|
||||
}
|
||||
|
||||
void dce110_set_bandwidth(
|
||||
static void dce110_set_bandwidth(
|
||||
struct dc *dc,
|
||||
struct dc_state *context,
|
||||
bool decrease_allowed)
|
||||
|
|
|
@ -68,11 +68,6 @@ void dce110_fill_display_configs(
|
|||
const struct dc_state *context,
|
||||
struct dm_pp_display_configuration *pp_display_cfg);
|
||||
|
||||
void dce110_set_bandwidth(
|
||||
struct dc *dc,
|
||||
struct dc_state *context,
|
||||
bool decrease_allowed);
|
||||
|
||||
uint32_t dce110_get_min_vblank_time_us(const struct dc_state *context);
|
||||
|
||||
void dp_receiver_power_ctrl(struct dc_link *link, bool on);
|
||||
|
|
|
@ -244,17 +244,6 @@ static void dce120_update_dchub(
|
|||
dh_data->dchub_info_valid = false;
|
||||
}
|
||||
|
||||
static void dce120_set_bandwidth(
|
||||
struct dc *dc,
|
||||
struct dc_state *context,
|
||||
bool decrease_allowed)
|
||||
{
|
||||
if (context->stream_count <= 0)
|
||||
return;
|
||||
|
||||
dce110_set_bandwidth(dc, context, decrease_allowed);
|
||||
}
|
||||
|
||||
void dce120_hw_sequencer_construct(struct dc *dc)
|
||||
{
|
||||
/* All registers used by dce11.2 match those in dce11 in offset and
|
||||
|
@ -263,6 +252,5 @@ void dce120_hw_sequencer_construct(struct dc *dc)
|
|||
dce110_hw_sequencer_construct(dc);
|
||||
dc->hwss.enable_display_power_gating = dce120_enable_display_power_gating;
|
||||
dc->hwss.update_dchub = dce120_update_dchub;
|
||||
dc->hwss.set_bandwidth = dce120_set_bandwidth;
|
||||
}
|
||||
|
||||
|
|
|
@ -754,6 +754,7 @@ static int malidp_bind(struct device *dev)
|
|||
drm->irq_enabled = true;
|
||||
|
||||
ret = drm_vblank_init(drm, drm->mode_config.num_crtc);
|
||||
drm_crtc_vblank_reset(&malidp->crtc);
|
||||
if (ret < 0) {
|
||||
DRM_ERROR("failed to initialise vblank\n");
|
||||
goto vblank_fail;
|
||||
|
|
|
@ -384,7 +384,8 @@ static long malidp500_se_calc_mclk(struct malidp_hw_device *hwdev,
|
|||
|
||||
static int malidp500_enable_memwrite(struct malidp_hw_device *hwdev,
|
||||
dma_addr_t *addrs, s32 *pitches,
|
||||
int num_planes, u16 w, u16 h, u32 fmt_id)
|
||||
int num_planes, u16 w, u16 h, u32 fmt_id,
|
||||
const s16 *rgb2yuv_coeffs)
|
||||
{
|
||||
u32 base = MALIDP500_SE_MEMWRITE_BASE;
|
||||
u32 de_base = malidp_get_block_base(hwdev, MALIDP_DE_BLOCK);
|
||||
|
@ -416,6 +417,16 @@ static int malidp500_enable_memwrite(struct malidp_hw_device *hwdev,
|
|||
|
||||
malidp_hw_write(hwdev, MALIDP_DE_H_ACTIVE(w) | MALIDP_DE_V_ACTIVE(h),
|
||||
MALIDP500_SE_MEMWRITE_OUT_SIZE);
|
||||
|
||||
if (rgb2yuv_coeffs) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < MALIDP_COLORADJ_NUM_COEFFS; i++) {
|
||||
malidp_hw_write(hwdev, rgb2yuv_coeffs[i],
|
||||
MALIDP500_SE_RGB_YUV_COEFFS + i * 4);
|
||||
}
|
||||
}
|
||||
|
||||
malidp_hw_setbits(hwdev, MALIDP_SE_MEMWRITE_EN, MALIDP500_SE_CONTROL);
|
||||
|
||||
return 0;
|
||||
|
@ -658,7 +669,8 @@ static long malidp550_se_calc_mclk(struct malidp_hw_device *hwdev,
|
|||
|
||||
static int malidp550_enable_memwrite(struct malidp_hw_device *hwdev,
|
||||
dma_addr_t *addrs, s32 *pitches,
|
||||
int num_planes, u16 w, u16 h, u32 fmt_id)
|
||||
int num_planes, u16 w, u16 h, u32 fmt_id,
|
||||
const s16 *rgb2yuv_coeffs)
|
||||
{
|
||||
u32 base = MALIDP550_SE_MEMWRITE_BASE;
|
||||
u32 de_base = malidp_get_block_base(hwdev, MALIDP_DE_BLOCK);
|
||||
|
@ -689,6 +701,15 @@ static int malidp550_enable_memwrite(struct malidp_hw_device *hwdev,
|
|||
malidp_hw_setbits(hwdev, MALIDP550_SE_MEMWRITE_ONESHOT | MALIDP_SE_MEMWRITE_EN,
|
||||
MALIDP550_SE_CONTROL);
|
||||
|
||||
if (rgb2yuv_coeffs) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < MALIDP_COLORADJ_NUM_COEFFS; i++) {
|
||||
malidp_hw_write(hwdev, rgb2yuv_coeffs[i],
|
||||
MALIDP550_SE_RGB_YUV_COEFFS + i * 4);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -191,7 +191,8 @@ struct malidp_hw {
|
|||
* @param fmt_id - internal format ID of output buffer
|
||||
*/
|
||||
int (*enable_memwrite)(struct malidp_hw_device *hwdev, dma_addr_t *addrs,
|
||||
s32 *pitches, int num_planes, u16 w, u16 h, u32 fmt_id);
|
||||
s32 *pitches, int num_planes, u16 w, u16 h, u32 fmt_id,
|
||||
const s16 *rgb2yuv_coeffs);
|
||||
|
||||
/*
|
||||
* Disable the writing to memory of the next frame's content.
|
||||
|
|
|
@ -26,6 +26,8 @@ struct malidp_mw_connector_state {
|
|||
s32 pitches[2];
|
||||
u8 format;
|
||||
u8 n_planes;
|
||||
bool rgb2yuv_initialized;
|
||||
const s16 *rgb2yuv_coeffs;
|
||||
};
|
||||
|
||||
static int malidp_mw_connector_get_modes(struct drm_connector *connector)
|
||||
|
@ -84,7 +86,7 @@ static void malidp_mw_connector_destroy(struct drm_connector *connector)
|
|||
static struct drm_connector_state *
|
||||
malidp_mw_connector_duplicate_state(struct drm_connector *connector)
|
||||
{
|
||||
struct malidp_mw_connector_state *mw_state;
|
||||
struct malidp_mw_connector_state *mw_state, *mw_current_state;
|
||||
|
||||
if (WARN_ON(!connector->state))
|
||||
return NULL;
|
||||
|
@ -93,7 +95,10 @@ malidp_mw_connector_duplicate_state(struct drm_connector *connector)
|
|||
if (!mw_state)
|
||||
return NULL;
|
||||
|
||||
/* No need to preserve any of our driver-local data */
|
||||
mw_current_state = to_mw_state(connector->state);
|
||||
mw_state->rgb2yuv_coeffs = mw_current_state->rgb2yuv_coeffs;
|
||||
mw_state->rgb2yuv_initialized = mw_current_state->rgb2yuv_initialized;
|
||||
|
||||
__drm_atomic_helper_connector_duplicate_state(connector, &mw_state->base);
|
||||
|
||||
return &mw_state->base;
|
||||
|
@ -108,6 +113,13 @@ static const struct drm_connector_funcs malidp_mw_connector_funcs = {
|
|||
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
|
||||
};
|
||||
|
||||
static const s16 rgb2yuv_coeffs_bt709_limited[MALIDP_COLORADJ_NUM_COEFFS] = {
|
||||
47, 157, 16,
|
||||
-26, -87, 112,
|
||||
112, -102, -10,
|
||||
16, 128, 128
|
||||
};
|
||||
|
||||
static int
|
||||
malidp_mw_encoder_atomic_check(struct drm_encoder *encoder,
|
||||
struct drm_crtc_state *crtc_state,
|
||||
|
@ -157,6 +169,9 @@ malidp_mw_encoder_atomic_check(struct drm_encoder *encoder,
|
|||
}
|
||||
mw_state->n_planes = n_planes;
|
||||
|
||||
if (fb->format->is_yuv)
|
||||
mw_state->rgb2yuv_coeffs = rgb2yuv_coeffs_bt709_limited;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -239,10 +254,12 @@ void malidp_mw_atomic_commit(struct drm_device *drm,
|
|||
|
||||
drm_writeback_queue_job(mw_conn, conn_state->writeback_job);
|
||||
conn_state->writeback_job = NULL;
|
||||
|
||||
hwdev->hw->enable_memwrite(hwdev, mw_state->addrs,
|
||||
mw_state->pitches, mw_state->n_planes,
|
||||
fb->width, fb->height, mw_state->format);
|
||||
fb->width, fb->height, mw_state->format,
|
||||
!mw_state->rgb2yuv_initialized ?
|
||||
mw_state->rgb2yuv_coeffs : NULL);
|
||||
mw_state->rgb2yuv_initialized = !!mw_state->rgb2yuv_coeffs;
|
||||
} else {
|
||||
DRM_DEV_DEBUG_DRIVER(drm->dev, "Disable memwrite\n");
|
||||
hwdev->hw->disable_memwrite(hwdev);
|
||||
|
|
|
@ -205,6 +205,7 @@
|
|||
#define MALIDP500_SE_BASE 0x00c00
|
||||
#define MALIDP500_SE_CONTROL 0x00c0c
|
||||
#define MALIDP500_SE_MEMWRITE_OUT_SIZE 0x00c2c
|
||||
#define MALIDP500_SE_RGB_YUV_COEFFS 0x00C74
|
||||
#define MALIDP500_SE_MEMWRITE_BASE 0x00e00
|
||||
#define MALIDP500_DC_IRQ_BASE 0x00f00
|
||||
#define MALIDP500_CONFIG_VALID 0x00f00
|
||||
|
@ -238,6 +239,7 @@
|
|||
#define MALIDP550_SE_CONTROL 0x08010
|
||||
#define MALIDP550_SE_MEMWRITE_ONESHOT (1 << 7)
|
||||
#define MALIDP550_SE_MEMWRITE_OUT_SIZE 0x08030
|
||||
#define MALIDP550_SE_RGB_YUV_COEFFS 0x08078
|
||||
#define MALIDP550_SE_MEMWRITE_BASE 0x08100
|
||||
#define MALIDP550_DC_BASE 0x0c000
|
||||
#define MALIDP550_DC_CONTROL 0x0c010
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include <linux/err.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
#include <drm/drm_device.h>
|
||||
#include <drm/drm_crtc.h>
|
||||
#include <drm/drm_panel.h>
|
||||
|
||||
|
@ -105,13 +104,6 @@ int drm_panel_attach(struct drm_panel *panel, struct drm_connector *connector)
|
|||
if (panel->connector)
|
||||
return -EBUSY;
|
||||
|
||||
panel->link = device_link_add(connector->dev->dev, panel->dev, 0);
|
||||
if (!panel->link) {
|
||||
dev_err(panel->dev, "failed to link panel to %s\n",
|
||||
dev_name(connector->dev->dev));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
panel->connector = connector;
|
||||
panel->drm = connector->dev;
|
||||
|
||||
|
@ -133,8 +125,6 @@ EXPORT_SYMBOL(drm_panel_attach);
|
|||
*/
|
||||
int drm_panel_detach(struct drm_panel *panel)
|
||||
{
|
||||
device_link_del(panel->link);
|
||||
|
||||
panel->connector = NULL;
|
||||
panel->drm = NULL;
|
||||
|
||||
|
|
|
@ -97,6 +97,8 @@ static int drm_syncobj_fence_get_or_add_callback(struct drm_syncobj *syncobj,
|
|||
{
|
||||
int ret;
|
||||
|
||||
WARN_ON(*fence);
|
||||
|
||||
*fence = drm_syncobj_fence_get(syncobj);
|
||||
if (*fence)
|
||||
return 1;
|
||||
|
@ -743,6 +745,9 @@ static signed long drm_syncobj_array_wait_timeout(struct drm_syncobj **syncobjs,
|
|||
|
||||
if (flags & DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT) {
|
||||
for (i = 0; i < count; ++i) {
|
||||
if (entries[i].fence)
|
||||
continue;
|
||||
|
||||
drm_syncobj_fence_get_or_add_callback(syncobjs[i],
|
||||
&entries[i].fence,
|
||||
&entries[i].syncobj_cb,
|
||||
|
|
|
@ -592,8 +592,6 @@ static int etnaviv_pdev_probe(struct platform_device *pdev)
|
|||
struct device *dev = &pdev->dev;
|
||||
struct component_match *match = NULL;
|
||||
|
||||
dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
|
||||
|
||||
if (!dev->platform_data) {
|
||||
struct device_node *core_node;
|
||||
|
||||
|
@ -655,13 +653,30 @@ static int __init etnaviv_init(void)
|
|||
for_each_compatible_node(np, NULL, "vivante,gc") {
|
||||
if (!of_device_is_available(np))
|
||||
continue;
|
||||
pdev = platform_device_register_simple("etnaviv", -1,
|
||||
NULL, 0);
|
||||
if (IS_ERR(pdev)) {
|
||||
ret = PTR_ERR(pdev);
|
||||
|
||||
pdev = platform_device_alloc("etnaviv", -1);
|
||||
if (!pdev) {
|
||||
ret = -ENOMEM;
|
||||
of_node_put(np);
|
||||
goto unregister_platform_driver;
|
||||
}
|
||||
pdev->dev.coherent_dma_mask = DMA_BIT_MASK(40);
|
||||
pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask;
|
||||
|
||||
/*
|
||||
* Apply the same DMA configuration to the virtual etnaviv
|
||||
* device as the GPU we found. This assumes that all Vivante
|
||||
* GPUs in the system share the same DMA constraints.
|
||||
*/
|
||||
of_dma_configure(&pdev->dev, np, true);
|
||||
|
||||
ret = platform_device_add(pdev);
|
||||
if (ret) {
|
||||
platform_device_put(pdev);
|
||||
of_node_put(np);
|
||||
goto unregister_platform_driver;
|
||||
}
|
||||
|
||||
etnaviv_drm = pdev;
|
||||
of_node_put(np);
|
||||
break;
|
||||
|
|
|
@ -976,7 +976,6 @@
|
|||
#define USB_DEVICE_ID_SIS817_TOUCH 0x0817
|
||||
#define USB_DEVICE_ID_SIS_TS 0x1013
|
||||
#define USB_DEVICE_ID_SIS1030_TOUCH 0x1030
|
||||
#define USB_DEVICE_ID_SIS10FB_TOUCH 0x10fb
|
||||
|
||||
#define USB_VENDOR_ID_SKYCABLE 0x1223
|
||||
#define USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER 0x3F07
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
/* quirks to control the device */
|
||||
#define I2C_HID_QUIRK_SET_PWR_WAKEUP_DEV BIT(0)
|
||||
#define I2C_HID_QUIRK_NO_IRQ_AFTER_RESET BIT(1)
|
||||
#define I2C_HID_QUIRK_RESEND_REPORT_DESCR BIT(2)
|
||||
#define I2C_HID_QUIRK_NO_RUNTIME_PM BIT(2)
|
||||
|
||||
/* flags */
|
||||
#define I2C_HID_STARTED 0
|
||||
|
@ -169,9 +169,8 @@ static const struct i2c_hid_quirks {
|
|||
{ USB_VENDOR_ID_WEIDA, USB_DEVICE_ID_WEIDA_8755,
|
||||
I2C_HID_QUIRK_SET_PWR_WAKEUP_DEV },
|
||||
{ I2C_VENDOR_ID_HANTICK, I2C_PRODUCT_ID_HANTICK_5288,
|
||||
I2C_HID_QUIRK_NO_IRQ_AFTER_RESET },
|
||||
{ USB_VENDOR_ID_SIS_TOUCH, USB_DEVICE_ID_SIS10FB_TOUCH,
|
||||
I2C_HID_QUIRK_RESEND_REPORT_DESCR },
|
||||
I2C_HID_QUIRK_NO_IRQ_AFTER_RESET |
|
||||
I2C_HID_QUIRK_NO_RUNTIME_PM },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
|
@ -1105,7 +1104,9 @@ static int i2c_hid_probe(struct i2c_client *client,
|
|||
goto err_mem_free;
|
||||
}
|
||||
|
||||
pm_runtime_put(&client->dev);
|
||||
if (!(ihid->quirks & I2C_HID_QUIRK_NO_RUNTIME_PM))
|
||||
pm_runtime_put(&client->dev);
|
||||
|
||||
return 0;
|
||||
|
||||
err_mem_free:
|
||||
|
@ -1130,7 +1131,8 @@ static int i2c_hid_remove(struct i2c_client *client)
|
|||
struct i2c_hid *ihid = i2c_get_clientdata(client);
|
||||
struct hid_device *hid;
|
||||
|
||||
pm_runtime_get_sync(&client->dev);
|
||||
if (!(ihid->quirks & I2C_HID_QUIRK_NO_RUNTIME_PM))
|
||||
pm_runtime_get_sync(&client->dev);
|
||||
pm_runtime_disable(&client->dev);
|
||||
pm_runtime_set_suspended(&client->dev);
|
||||
pm_runtime_put_noidle(&client->dev);
|
||||
|
@ -1236,22 +1238,13 @@ static int i2c_hid_resume(struct device *dev)
|
|||
|
||||
/* Instead of resetting device, simply powers the device on. This
|
||||
* solves "incomplete reports" on Raydium devices 2386:3118 and
|
||||
* 2386:4B33
|
||||
* 2386:4B33 and fixes various SIS touchscreens no longer sending
|
||||
* data after a suspend/resume.
|
||||
*/
|
||||
ret = i2c_hid_set_power(client, I2C_HID_PWR_ON);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* Some devices need to re-send report descr cmd
|
||||
* after resume, after this it will be back normal.
|
||||
* otherwise it issues too many incomplete reports.
|
||||
*/
|
||||
if (ihid->quirks & I2C_HID_QUIRK_RESEND_REPORT_DESCR) {
|
||||
ret = i2c_hid_command(client, &hid_report_descr_cmd, NULL, 0);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (hid->driver && hid->driver->reset_resume) {
|
||||
ret = hid->driver->reset_resume(hid);
|
||||
return ret;
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#define CNL_Ax_DEVICE_ID 0x9DFC
|
||||
#define GLK_Ax_DEVICE_ID 0x31A2
|
||||
#define CNL_H_DEVICE_ID 0xA37C
|
||||
#define ICL_MOBILE_DEVICE_ID 0x34FC
|
||||
#define SPT_H_DEVICE_ID 0xA135
|
||||
|
||||
#define REVISION_ID_CHT_A0 0x6
|
||||
|
|
|
@ -38,6 +38,7 @@ static const struct pci_device_id ish_pci_tbl[] = {
|
|||
{PCI_DEVICE(PCI_VENDOR_ID_INTEL, CNL_Ax_DEVICE_ID)},
|
||||
{PCI_DEVICE(PCI_VENDOR_ID_INTEL, GLK_Ax_DEVICE_ID)},
|
||||
{PCI_DEVICE(PCI_VENDOR_ID_INTEL, CNL_H_DEVICE_ID)},
|
||||
{PCI_DEVICE(PCI_VENDOR_ID_INTEL, ICL_MOBILE_DEVICE_ID)},
|
||||
{PCI_DEVICE(PCI_VENDOR_ID_INTEL, SPT_H_DEVICE_ID)},
|
||||
{0, }
|
||||
};
|
||||
|
|
|
@ -337,55 +337,6 @@ static int add_roce_gid(struct ib_gid_table_entry *entry)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* add_modify_gid - Add or modify GID table entry
|
||||
*
|
||||
* @table: GID table in which GID to be added or modified
|
||||
* @attr: Attributes of the GID
|
||||
*
|
||||
* Returns 0 on success or appropriate error code. It accepts zero
|
||||
* GID addition for non RoCE ports for HCA's who report them as valid
|
||||
* GID. However such zero GIDs are not added to the cache.
|
||||
*/
|
||||
static int add_modify_gid(struct ib_gid_table *table,
|
||||
const struct ib_gid_attr *attr)
|
||||
{
|
||||
struct ib_gid_table_entry *entry;
|
||||
int ret = 0;
|
||||
|
||||
/*
|
||||
* Invalidate any old entry in the table to make it safe to write to
|
||||
* this index.
|
||||
*/
|
||||
if (is_gid_entry_valid(table->data_vec[attr->index]))
|
||||
put_gid_entry(table->data_vec[attr->index]);
|
||||
|
||||
/*
|
||||
* Some HCA's report multiple GID entries with only one valid GID, and
|
||||
* leave other unused entries as the zero GID. Convert zero GIDs to
|
||||
* empty table entries instead of storing them.
|
||||
*/
|
||||
if (rdma_is_zero_gid(&attr->gid))
|
||||
return 0;
|
||||
|
||||
entry = alloc_gid_entry(attr);
|
||||
if (!entry)
|
||||
return -ENOMEM;
|
||||
|
||||
if (rdma_protocol_roce(attr->device, attr->port_num)) {
|
||||
ret = add_roce_gid(entry);
|
||||
if (ret)
|
||||
goto done;
|
||||
}
|
||||
|
||||
store_gid_entry(table, entry);
|
||||
return 0;
|
||||
|
||||
done:
|
||||
put_gid_entry(entry);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* del_gid - Delete GID table entry
|
||||
*
|
||||
|
@ -419,6 +370,55 @@ static void del_gid(struct ib_device *ib_dev, u8 port,
|
|||
put_gid_entry_locked(entry);
|
||||
}
|
||||
|
||||
/**
|
||||
* add_modify_gid - Add or modify GID table entry
|
||||
*
|
||||
* @table: GID table in which GID to be added or modified
|
||||
* @attr: Attributes of the GID
|
||||
*
|
||||
* Returns 0 on success or appropriate error code. It accepts zero
|
||||
* GID addition for non RoCE ports for HCA's who report them as valid
|
||||
* GID. However such zero GIDs are not added to the cache.
|
||||
*/
|
||||
static int add_modify_gid(struct ib_gid_table *table,
|
||||
const struct ib_gid_attr *attr)
|
||||
{
|
||||
struct ib_gid_table_entry *entry;
|
||||
int ret = 0;
|
||||
|
||||
/*
|
||||
* Invalidate any old entry in the table to make it safe to write to
|
||||
* this index.
|
||||
*/
|
||||
if (is_gid_entry_valid(table->data_vec[attr->index]))
|
||||
del_gid(attr->device, attr->port_num, table, attr->index);
|
||||
|
||||
/*
|
||||
* Some HCA's report multiple GID entries with only one valid GID, and
|
||||
* leave other unused entries as the zero GID. Convert zero GIDs to
|
||||
* empty table entries instead of storing them.
|
||||
*/
|
||||
if (rdma_is_zero_gid(&attr->gid))
|
||||
return 0;
|
||||
|
||||
entry = alloc_gid_entry(attr);
|
||||
if (!entry)
|
||||
return -ENOMEM;
|
||||
|
||||
if (rdma_protocol_roce(attr->device, attr->port_num)) {
|
||||
ret = add_roce_gid(entry);
|
||||
if (ret)
|
||||
goto done;
|
||||
}
|
||||
|
||||
store_gid_entry(table, entry);
|
||||
return 0;
|
||||
|
||||
done:
|
||||
put_gid_entry(entry);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* rwlock should be read locked, or lock should be held */
|
||||
static int find_gid(struct ib_gid_table *table, const union ib_gid *gid,
|
||||
const struct ib_gid_attr *val, bool default_gid,
|
||||
|
|
|
@ -1759,6 +1759,8 @@ static int ucma_close(struct inode *inode, struct file *filp)
|
|||
mutex_lock(&mut);
|
||||
if (!ctx->closing) {
|
||||
mutex_unlock(&mut);
|
||||
ucma_put_ctx(ctx);
|
||||
wait_for_completion(&ctx->comp);
|
||||
/* rdma_destroy_id ensures that no event handlers are
|
||||
* inflight for that id before releasing it.
|
||||
*/
|
||||
|
|
|
@ -2027,33 +2027,55 @@ static int modify_qp(struct ib_uverbs_file *file,
|
|||
|
||||
if ((cmd->base.attr_mask & IB_QP_CUR_STATE &&
|
||||
cmd->base.cur_qp_state > IB_QPS_ERR) ||
|
||||
cmd->base.qp_state > IB_QPS_ERR) {
|
||||
(cmd->base.attr_mask & IB_QP_STATE &&
|
||||
cmd->base.qp_state > IB_QPS_ERR)) {
|
||||
ret = -EINVAL;
|
||||
goto release_qp;
|
||||
}
|
||||
|
||||
attr->qp_state = cmd->base.qp_state;
|
||||
attr->cur_qp_state = cmd->base.cur_qp_state;
|
||||
attr->path_mtu = cmd->base.path_mtu;
|
||||
attr->path_mig_state = cmd->base.path_mig_state;
|
||||
attr->qkey = cmd->base.qkey;
|
||||
attr->rq_psn = cmd->base.rq_psn;
|
||||
attr->sq_psn = cmd->base.sq_psn;
|
||||
attr->dest_qp_num = cmd->base.dest_qp_num;
|
||||
attr->qp_access_flags = cmd->base.qp_access_flags;
|
||||
attr->pkey_index = cmd->base.pkey_index;
|
||||
attr->alt_pkey_index = cmd->base.alt_pkey_index;
|
||||
attr->en_sqd_async_notify = cmd->base.en_sqd_async_notify;
|
||||
attr->max_rd_atomic = cmd->base.max_rd_atomic;
|
||||
attr->max_dest_rd_atomic = cmd->base.max_dest_rd_atomic;
|
||||
attr->min_rnr_timer = cmd->base.min_rnr_timer;
|
||||
attr->port_num = cmd->base.port_num;
|
||||
attr->timeout = cmd->base.timeout;
|
||||
attr->retry_cnt = cmd->base.retry_cnt;
|
||||
attr->rnr_retry = cmd->base.rnr_retry;
|
||||
attr->alt_port_num = cmd->base.alt_port_num;
|
||||
attr->alt_timeout = cmd->base.alt_timeout;
|
||||
attr->rate_limit = cmd->rate_limit;
|
||||
if (cmd->base.attr_mask & IB_QP_STATE)
|
||||
attr->qp_state = cmd->base.qp_state;
|
||||
if (cmd->base.attr_mask & IB_QP_CUR_STATE)
|
||||
attr->cur_qp_state = cmd->base.cur_qp_state;
|
||||
if (cmd->base.attr_mask & IB_QP_PATH_MTU)
|
||||
attr->path_mtu = cmd->base.path_mtu;
|
||||
if (cmd->base.attr_mask & IB_QP_PATH_MIG_STATE)
|
||||
attr->path_mig_state = cmd->base.path_mig_state;
|
||||
if (cmd->base.attr_mask & IB_QP_QKEY)
|
||||
attr->qkey = cmd->base.qkey;
|
||||
if (cmd->base.attr_mask & IB_QP_RQ_PSN)
|
||||
attr->rq_psn = cmd->base.rq_psn;
|
||||
if (cmd->base.attr_mask & IB_QP_SQ_PSN)
|
||||
attr->sq_psn = cmd->base.sq_psn;
|
||||
if (cmd->base.attr_mask & IB_QP_DEST_QPN)
|
||||
attr->dest_qp_num = cmd->base.dest_qp_num;
|
||||
if (cmd->base.attr_mask & IB_QP_ACCESS_FLAGS)
|
||||
attr->qp_access_flags = cmd->base.qp_access_flags;
|
||||
if (cmd->base.attr_mask & IB_QP_PKEY_INDEX)
|
||||
attr->pkey_index = cmd->base.pkey_index;
|
||||
if (cmd->base.attr_mask & IB_QP_EN_SQD_ASYNC_NOTIFY)
|
||||
attr->en_sqd_async_notify = cmd->base.en_sqd_async_notify;
|
||||
if (cmd->base.attr_mask & IB_QP_MAX_QP_RD_ATOMIC)
|
||||
attr->max_rd_atomic = cmd->base.max_rd_atomic;
|
||||
if (cmd->base.attr_mask & IB_QP_MAX_DEST_RD_ATOMIC)
|
||||
attr->max_dest_rd_atomic = cmd->base.max_dest_rd_atomic;
|
||||
if (cmd->base.attr_mask & IB_QP_MIN_RNR_TIMER)
|
||||
attr->min_rnr_timer = cmd->base.min_rnr_timer;
|
||||
if (cmd->base.attr_mask & IB_QP_PORT)
|
||||
attr->port_num = cmd->base.port_num;
|
||||
if (cmd->base.attr_mask & IB_QP_TIMEOUT)
|
||||
attr->timeout = cmd->base.timeout;
|
||||
if (cmd->base.attr_mask & IB_QP_RETRY_CNT)
|
||||
attr->retry_cnt = cmd->base.retry_cnt;
|
||||
if (cmd->base.attr_mask & IB_QP_RNR_RETRY)
|
||||
attr->rnr_retry = cmd->base.rnr_retry;
|
||||
if (cmd->base.attr_mask & IB_QP_ALT_PATH) {
|
||||
attr->alt_port_num = cmd->base.alt_port_num;
|
||||
attr->alt_timeout = cmd->base.alt_timeout;
|
||||
attr->alt_pkey_index = cmd->base.alt_pkey_index;
|
||||
}
|
||||
if (cmd->base.attr_mask & IB_QP_RATE_LIMIT)
|
||||
attr->rate_limit = cmd->rate_limit;
|
||||
|
||||
if (cmd->base.attr_mask & IB_QP_AV)
|
||||
copy_ah_attr_from_uverbs(qp->device, &attr->ah_attr,
|
||||
|
|
|
@ -440,6 +440,7 @@ static int ib_uverbs_comp_event_close(struct inode *inode, struct file *filp)
|
|||
list_del(&entry->obj_list);
|
||||
kfree(entry);
|
||||
}
|
||||
file->ev_queue.is_closed = 1;
|
||||
spin_unlock_irq(&file->ev_queue.lock);
|
||||
|
||||
uverbs_close_fd(filp);
|
||||
|
|
|
@ -248,6 +248,7 @@ void uverbs_destroy_api(struct uverbs_api *uapi)
|
|||
kfree(rcu_dereference_protected(*slot, true));
|
||||
radix_tree_iter_delete(&uapi->radix, &iter, slot);
|
||||
}
|
||||
kfree(uapi);
|
||||
}
|
||||
|
||||
struct uverbs_api *uverbs_alloc_api(
|
||||
|
|
|
@ -78,7 +78,7 @@ static struct list_head bnxt_re_dev_list = LIST_HEAD_INIT(bnxt_re_dev_list);
|
|||
/* Mutex to protect the list of bnxt_re devices added */
|
||||
static DEFINE_MUTEX(bnxt_re_dev_lock);
|
||||
static struct workqueue_struct *bnxt_re_wq;
|
||||
static void bnxt_re_ib_unreg(struct bnxt_re_dev *rdev, bool lock_wait);
|
||||
static void bnxt_re_ib_unreg(struct bnxt_re_dev *rdev);
|
||||
|
||||
/* SR-IOV helper functions */
|
||||
|
||||
|
@ -182,7 +182,7 @@ static void bnxt_re_shutdown(void *p)
|
|||
if (!rdev)
|
||||
return;
|
||||
|
||||
bnxt_re_ib_unreg(rdev, false);
|
||||
bnxt_re_ib_unreg(rdev);
|
||||
}
|
||||
|
||||
static void bnxt_re_stop_irq(void *handle)
|
||||
|
@ -251,7 +251,7 @@ static struct bnxt_ulp_ops bnxt_re_ulp_ops = {
|
|||
/* Driver registration routines used to let the networking driver (bnxt_en)
|
||||
* to know that the RoCE driver is now installed
|
||||
*/
|
||||
static int bnxt_re_unregister_netdev(struct bnxt_re_dev *rdev, bool lock_wait)
|
||||
static int bnxt_re_unregister_netdev(struct bnxt_re_dev *rdev)
|
||||
{
|
||||
struct bnxt_en_dev *en_dev;
|
||||
int rc;
|
||||
|
@ -260,14 +260,9 @@ static int bnxt_re_unregister_netdev(struct bnxt_re_dev *rdev, bool lock_wait)
|
|||
return -EINVAL;
|
||||
|
||||
en_dev = rdev->en_dev;
|
||||
/* Acquire rtnl lock if it is not invokded from netdev event */
|
||||
if (lock_wait)
|
||||
rtnl_lock();
|
||||
|
||||
rc = en_dev->en_ops->bnxt_unregister_device(rdev->en_dev,
|
||||
BNXT_ROCE_ULP);
|
||||
if (lock_wait)
|
||||
rtnl_unlock();
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -281,14 +276,12 @@ static int bnxt_re_register_netdev(struct bnxt_re_dev *rdev)
|
|||
|
||||
en_dev = rdev->en_dev;
|
||||
|
||||
rtnl_lock();
|
||||
rc = en_dev->en_ops->bnxt_register_device(en_dev, BNXT_ROCE_ULP,
|
||||
&bnxt_re_ulp_ops, rdev);
|
||||
rtnl_unlock();
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int bnxt_re_free_msix(struct bnxt_re_dev *rdev, bool lock_wait)
|
||||
static int bnxt_re_free_msix(struct bnxt_re_dev *rdev)
|
||||
{
|
||||
struct bnxt_en_dev *en_dev;
|
||||
int rc;
|
||||
|
@ -298,13 +291,9 @@ static int bnxt_re_free_msix(struct bnxt_re_dev *rdev, bool lock_wait)
|
|||
|
||||
en_dev = rdev->en_dev;
|
||||
|
||||
if (lock_wait)
|
||||
rtnl_lock();
|
||||
|
||||
rc = en_dev->en_ops->bnxt_free_msix(rdev->en_dev, BNXT_ROCE_ULP);
|
||||
|
||||
if (lock_wait)
|
||||
rtnl_unlock();
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -320,7 +309,6 @@ static int bnxt_re_request_msix(struct bnxt_re_dev *rdev)
|
|||
|
||||
num_msix_want = min_t(u32, BNXT_RE_MAX_MSIX, num_online_cpus());
|
||||
|
||||
rtnl_lock();
|
||||
num_msix_got = en_dev->en_ops->bnxt_request_msix(en_dev, BNXT_ROCE_ULP,
|
||||
rdev->msix_entries,
|
||||
num_msix_want);
|
||||
|
@ -335,7 +323,6 @@ static int bnxt_re_request_msix(struct bnxt_re_dev *rdev)
|
|||
}
|
||||
rdev->num_msix = num_msix_got;
|
||||
done:
|
||||
rtnl_unlock();
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -358,24 +345,18 @@ static void bnxt_re_fill_fw_msg(struct bnxt_fw_msg *fw_msg, void *msg,
|
|||
fw_msg->timeout = timeout;
|
||||
}
|
||||
|
||||
static int bnxt_re_net_ring_free(struct bnxt_re_dev *rdev, u16 fw_ring_id,
|
||||
bool lock_wait)
|
||||
static int bnxt_re_net_ring_free(struct bnxt_re_dev *rdev, u16 fw_ring_id)
|
||||
{
|
||||
struct bnxt_en_dev *en_dev = rdev->en_dev;
|
||||
struct hwrm_ring_free_input req = {0};
|
||||
struct hwrm_ring_free_output resp;
|
||||
struct bnxt_fw_msg fw_msg;
|
||||
bool do_unlock = false;
|
||||
int rc = -EINVAL;
|
||||
|
||||
if (!en_dev)
|
||||
return rc;
|
||||
|
||||
memset(&fw_msg, 0, sizeof(fw_msg));
|
||||
if (lock_wait) {
|
||||
rtnl_lock();
|
||||
do_unlock = true;
|
||||
}
|
||||
|
||||
bnxt_re_init_hwrm_hdr(rdev, (void *)&req, HWRM_RING_FREE, -1, -1);
|
||||
req.ring_type = RING_ALLOC_REQ_RING_TYPE_L2_CMPL;
|
||||
|
@ -386,8 +367,6 @@ static int bnxt_re_net_ring_free(struct bnxt_re_dev *rdev, u16 fw_ring_id,
|
|||
if (rc)
|
||||
dev_err(rdev_to_dev(rdev),
|
||||
"Failed to free HW ring:%d :%#x", req.ring_id, rc);
|
||||
if (do_unlock)
|
||||
rtnl_unlock();
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -405,7 +384,6 @@ static int bnxt_re_net_ring_alloc(struct bnxt_re_dev *rdev, dma_addr_t *dma_arr,
|
|||
return rc;
|
||||
|
||||
memset(&fw_msg, 0, sizeof(fw_msg));
|
||||
rtnl_lock();
|
||||
bnxt_re_init_hwrm_hdr(rdev, (void *)&req, HWRM_RING_ALLOC, -1, -1);
|
||||
req.enables = 0;
|
||||
req.page_tbl_addr = cpu_to_le64(dma_arr[0]);
|
||||
|
@ -426,27 +404,21 @@ static int bnxt_re_net_ring_alloc(struct bnxt_re_dev *rdev, dma_addr_t *dma_arr,
|
|||
if (!rc)
|
||||
*fw_ring_id = le16_to_cpu(resp.ring_id);
|
||||
|
||||
rtnl_unlock();
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int bnxt_re_net_stats_ctx_free(struct bnxt_re_dev *rdev,
|
||||
u32 fw_stats_ctx_id, bool lock_wait)
|
||||
u32 fw_stats_ctx_id)
|
||||
{
|
||||
struct bnxt_en_dev *en_dev = rdev->en_dev;
|
||||
struct hwrm_stat_ctx_free_input req = {0};
|
||||
struct bnxt_fw_msg fw_msg;
|
||||
bool do_unlock = false;
|
||||
int rc = -EINVAL;
|
||||
|
||||
if (!en_dev)
|
||||
return rc;
|
||||
|
||||
memset(&fw_msg, 0, sizeof(fw_msg));
|
||||
if (lock_wait) {
|
||||
rtnl_lock();
|
||||
do_unlock = true;
|
||||
}
|
||||
|
||||
bnxt_re_init_hwrm_hdr(rdev, (void *)&req, HWRM_STAT_CTX_FREE, -1, -1);
|
||||
req.stat_ctx_id = cpu_to_le32(fw_stats_ctx_id);
|
||||
|
@ -457,8 +429,6 @@ static int bnxt_re_net_stats_ctx_free(struct bnxt_re_dev *rdev,
|
|||
dev_err(rdev_to_dev(rdev),
|
||||
"Failed to free HW stats context %#x", rc);
|
||||
|
||||
if (do_unlock)
|
||||
rtnl_unlock();
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -478,7 +448,6 @@ static int bnxt_re_net_stats_ctx_alloc(struct bnxt_re_dev *rdev,
|
|||
return rc;
|
||||
|
||||
memset(&fw_msg, 0, sizeof(fw_msg));
|
||||
rtnl_lock();
|
||||
|
||||
bnxt_re_init_hwrm_hdr(rdev, (void *)&req, HWRM_STAT_CTX_ALLOC, -1, -1);
|
||||
req.update_period_ms = cpu_to_le32(1000);
|
||||
|
@ -490,7 +459,6 @@ static int bnxt_re_net_stats_ctx_alloc(struct bnxt_re_dev *rdev,
|
|||
if (!rc)
|
||||
*fw_stats_ctx_id = le32_to_cpu(resp.stat_ctx_id);
|
||||
|
||||
rtnl_unlock();
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -929,19 +897,19 @@ fail:
|
|||
return rc;
|
||||
}
|
||||
|
||||
static void bnxt_re_free_nq_res(struct bnxt_re_dev *rdev, bool lock_wait)
|
||||
static void bnxt_re_free_nq_res(struct bnxt_re_dev *rdev)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < rdev->num_msix - 1; i++) {
|
||||
bnxt_re_net_ring_free(rdev, rdev->nq[i].ring_id, lock_wait);
|
||||
bnxt_re_net_ring_free(rdev, rdev->nq[i].ring_id);
|
||||
bnxt_qplib_free_nq(&rdev->nq[i]);
|
||||
}
|
||||
}
|
||||
|
||||
static void bnxt_re_free_res(struct bnxt_re_dev *rdev, bool lock_wait)
|
||||
static void bnxt_re_free_res(struct bnxt_re_dev *rdev)
|
||||
{
|
||||
bnxt_re_free_nq_res(rdev, lock_wait);
|
||||
bnxt_re_free_nq_res(rdev);
|
||||
|
||||
if (rdev->qplib_res.dpi_tbl.max) {
|
||||
bnxt_qplib_dealloc_dpi(&rdev->qplib_res,
|
||||
|
@ -1219,7 +1187,7 @@ static int bnxt_re_setup_qos(struct bnxt_re_dev *rdev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void bnxt_re_ib_unreg(struct bnxt_re_dev *rdev, bool lock_wait)
|
||||
static void bnxt_re_ib_unreg(struct bnxt_re_dev *rdev)
|
||||
{
|
||||
int i, rc;
|
||||
|
||||
|
@ -1234,28 +1202,27 @@ static void bnxt_re_ib_unreg(struct bnxt_re_dev *rdev, bool lock_wait)
|
|||
cancel_delayed_work(&rdev->worker);
|
||||
|
||||
bnxt_re_cleanup_res(rdev);
|
||||
bnxt_re_free_res(rdev, lock_wait);
|
||||
bnxt_re_free_res(rdev);
|
||||
|
||||
if (test_and_clear_bit(BNXT_RE_FLAG_RCFW_CHANNEL_EN, &rdev->flags)) {
|
||||
rc = bnxt_qplib_deinit_rcfw(&rdev->rcfw);
|
||||
if (rc)
|
||||
dev_warn(rdev_to_dev(rdev),
|
||||
"Failed to deinitialize RCFW: %#x", rc);
|
||||
bnxt_re_net_stats_ctx_free(rdev, rdev->qplib_ctx.stats.fw_id,
|
||||
lock_wait);
|
||||
bnxt_re_net_stats_ctx_free(rdev, rdev->qplib_ctx.stats.fw_id);
|
||||
bnxt_qplib_free_ctx(rdev->en_dev->pdev, &rdev->qplib_ctx);
|
||||
bnxt_qplib_disable_rcfw_channel(&rdev->rcfw);
|
||||
bnxt_re_net_ring_free(rdev, rdev->rcfw.creq_ring_id, lock_wait);
|
||||
bnxt_re_net_ring_free(rdev, rdev->rcfw.creq_ring_id);
|
||||
bnxt_qplib_free_rcfw_channel(&rdev->rcfw);
|
||||
}
|
||||
if (test_and_clear_bit(BNXT_RE_FLAG_GOT_MSIX, &rdev->flags)) {
|
||||
rc = bnxt_re_free_msix(rdev, lock_wait);
|
||||
rc = bnxt_re_free_msix(rdev);
|
||||
if (rc)
|
||||
dev_warn(rdev_to_dev(rdev),
|
||||
"Failed to free MSI-X vectors: %#x", rc);
|
||||
}
|
||||
if (test_and_clear_bit(BNXT_RE_FLAG_NETDEV_REGISTERED, &rdev->flags)) {
|
||||
rc = bnxt_re_unregister_netdev(rdev, lock_wait);
|
||||
rc = bnxt_re_unregister_netdev(rdev);
|
||||
if (rc)
|
||||
dev_warn(rdev_to_dev(rdev),
|
||||
"Failed to unregister with netdev: %#x", rc);
|
||||
|
@ -1276,6 +1243,12 @@ static int bnxt_re_ib_reg(struct bnxt_re_dev *rdev)
|
|||
{
|
||||
int i, j, rc;
|
||||
|
||||
bool locked;
|
||||
|
||||
/* Acquire rtnl lock through out this function */
|
||||
rtnl_lock();
|
||||
locked = true;
|
||||
|
||||
/* Registered a new RoCE device instance to netdev */
|
||||
rc = bnxt_re_register_netdev(rdev);
|
||||
if (rc) {
|
||||
|
@ -1374,12 +1347,16 @@ static int bnxt_re_ib_reg(struct bnxt_re_dev *rdev)
|
|||
schedule_delayed_work(&rdev->worker, msecs_to_jiffies(30000));
|
||||
}
|
||||
|
||||
rtnl_unlock();
|
||||
locked = false;
|
||||
|
||||
/* Register ib dev */
|
||||
rc = bnxt_re_register_ib(rdev);
|
||||
if (rc) {
|
||||
pr_err("Failed to register with IB: %#x\n", rc);
|
||||
goto fail;
|
||||
}
|
||||
set_bit(BNXT_RE_FLAG_IBDEV_REGISTERED, &rdev->flags);
|
||||
dev_info(rdev_to_dev(rdev), "Device registered successfully");
|
||||
for (i = 0; i < ARRAY_SIZE(bnxt_re_attributes); i++) {
|
||||
rc = device_create_file(&rdev->ibdev.dev,
|
||||
|
@ -1395,7 +1372,6 @@ static int bnxt_re_ib_reg(struct bnxt_re_dev *rdev)
|
|||
goto fail;
|
||||
}
|
||||
}
|
||||
set_bit(BNXT_RE_FLAG_IBDEV_REGISTERED, &rdev->flags);
|
||||
ib_get_eth_speed(&rdev->ibdev, 1, &rdev->active_speed,
|
||||
&rdev->active_width);
|
||||
set_bit(BNXT_RE_FLAG_ISSUE_ROCE_STATS, &rdev->flags);
|
||||
|
@ -1404,17 +1380,21 @@ static int bnxt_re_ib_reg(struct bnxt_re_dev *rdev)
|
|||
|
||||
return 0;
|
||||
free_sctx:
|
||||
bnxt_re_net_stats_ctx_free(rdev, rdev->qplib_ctx.stats.fw_id, true);
|
||||
bnxt_re_net_stats_ctx_free(rdev, rdev->qplib_ctx.stats.fw_id);
|
||||
free_ctx:
|
||||
bnxt_qplib_free_ctx(rdev->en_dev->pdev, &rdev->qplib_ctx);
|
||||
disable_rcfw:
|
||||
bnxt_qplib_disable_rcfw_channel(&rdev->rcfw);
|
||||
free_ring:
|
||||
bnxt_re_net_ring_free(rdev, rdev->rcfw.creq_ring_id, true);
|
||||
bnxt_re_net_ring_free(rdev, rdev->rcfw.creq_ring_id);
|
||||
free_rcfw:
|
||||
bnxt_qplib_free_rcfw_channel(&rdev->rcfw);
|
||||
fail:
|
||||
bnxt_re_ib_unreg(rdev, true);
|
||||
if (!locked)
|
||||
rtnl_lock();
|
||||
bnxt_re_ib_unreg(rdev);
|
||||
rtnl_unlock();
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -1567,7 +1547,7 @@ static int bnxt_re_netdev_event(struct notifier_block *notifier,
|
|||
*/
|
||||
if (atomic_read(&rdev->sched_count) > 0)
|
||||
goto exit;
|
||||
bnxt_re_ib_unreg(rdev, false);
|
||||
bnxt_re_ib_unreg(rdev);
|
||||
bnxt_re_remove_one(rdev);
|
||||
bnxt_re_dev_unreg(rdev);
|
||||
break;
|
||||
|
@ -1646,7 +1626,10 @@ static void __exit bnxt_re_mod_exit(void)
|
|||
*/
|
||||
flush_workqueue(bnxt_re_wq);
|
||||
bnxt_re_dev_stop(rdev);
|
||||
bnxt_re_ib_unreg(rdev, true);
|
||||
/* Acquire the rtnl_lock as the L2 resources are freed here */
|
||||
rtnl_lock();
|
||||
bnxt_re_ib_unreg(rdev);
|
||||
rtnl_unlock();
|
||||
bnxt_re_remove_one(rdev);
|
||||
bnxt_re_dev_unreg(rdev);
|
||||
}
|
||||
|
|
|
@ -6733,6 +6733,7 @@ void start_freeze_handling(struct hfi1_pportdata *ppd, int flags)
|
|||
struct hfi1_devdata *dd = ppd->dd;
|
||||
struct send_context *sc;
|
||||
int i;
|
||||
int sc_flags;
|
||||
|
||||
if (flags & FREEZE_SELF)
|
||||
write_csr(dd, CCE_CTRL, CCE_CTRL_SPC_FREEZE_SMASK);
|
||||
|
@ -6743,11 +6744,13 @@ void start_freeze_handling(struct hfi1_pportdata *ppd, int flags)
|
|||
/* notify all SDMA engines that they are going into a freeze */
|
||||
sdma_freeze_notify(dd, !!(flags & FREEZE_LINK_DOWN));
|
||||
|
||||
sc_flags = SCF_FROZEN | SCF_HALTED | (flags & FREEZE_LINK_DOWN ?
|
||||
SCF_LINK_DOWN : 0);
|
||||
/* do halt pre-handling on all enabled send contexts */
|
||||
for (i = 0; i < dd->num_send_contexts; i++) {
|
||||
sc = dd->send_contexts[i].sc;
|
||||
if (sc && (sc->flags & SCF_ENABLED))
|
||||
sc_stop(sc, SCF_FROZEN | SCF_HALTED);
|
||||
sc_stop(sc, sc_flags);
|
||||
}
|
||||
|
||||
/* Send context are frozen. Notify user space */
|
||||
|
@ -10674,6 +10677,7 @@ int set_link_state(struct hfi1_pportdata *ppd, u32 state)
|
|||
add_rcvctrl(dd, RCV_CTRL_RCV_PORT_ENABLE_SMASK);
|
||||
|
||||
handle_linkup_change(dd, 1);
|
||||
pio_kernel_linkup(dd);
|
||||
|
||||
/*
|
||||
* After link up, a new link width will have been set.
|
||||
|
|
|
@ -86,6 +86,7 @@ void pio_send_control(struct hfi1_devdata *dd, int op)
|
|||
unsigned long flags;
|
||||
int write = 1; /* write sendctrl back */
|
||||
int flush = 0; /* re-read sendctrl to make sure it is flushed */
|
||||
int i;
|
||||
|
||||
spin_lock_irqsave(&dd->sendctrl_lock, flags);
|
||||
|
||||
|
@ -95,9 +96,13 @@ void pio_send_control(struct hfi1_devdata *dd, int op)
|
|||
reg |= SEND_CTRL_SEND_ENABLE_SMASK;
|
||||
/* Fall through */
|
||||
case PSC_DATA_VL_ENABLE:
|
||||
mask = 0;
|
||||
for (i = 0; i < ARRAY_SIZE(dd->vld); i++)
|
||||
if (!dd->vld[i].mtu)
|
||||
mask |= BIT_ULL(i);
|
||||
/* Disallow sending on VLs not enabled */
|
||||
mask = (((~0ull) << num_vls) & SEND_CTRL_UNSUPPORTED_VL_MASK) <<
|
||||
SEND_CTRL_UNSUPPORTED_VL_SHIFT;
|
||||
mask = (mask & SEND_CTRL_UNSUPPORTED_VL_MASK) <<
|
||||
SEND_CTRL_UNSUPPORTED_VL_SHIFT;
|
||||
reg = (reg & ~SEND_CTRL_UNSUPPORTED_VL_SMASK) | mask;
|
||||
break;
|
||||
case PSC_GLOBAL_DISABLE:
|
||||
|
@ -921,20 +926,18 @@ void sc_free(struct send_context *sc)
|
|||
void sc_disable(struct send_context *sc)
|
||||
{
|
||||
u64 reg;
|
||||
unsigned long flags;
|
||||
struct pio_buf *pbuf;
|
||||
|
||||
if (!sc)
|
||||
return;
|
||||
|
||||
/* do all steps, even if already disabled */
|
||||
spin_lock_irqsave(&sc->alloc_lock, flags);
|
||||
spin_lock_irq(&sc->alloc_lock);
|
||||
reg = read_kctxt_csr(sc->dd, sc->hw_context, SC(CTRL));
|
||||
reg &= ~SC(CTRL_CTXT_ENABLE_SMASK);
|
||||
sc->flags &= ~SCF_ENABLED;
|
||||
sc_wait_for_packet_egress(sc, 1);
|
||||
write_kctxt_csr(sc->dd, sc->hw_context, SC(CTRL), reg);
|
||||
spin_unlock_irqrestore(&sc->alloc_lock, flags);
|
||||
|
||||
/*
|
||||
* Flush any waiters. Once the context is disabled,
|
||||
|
@ -944,7 +947,7 @@ void sc_disable(struct send_context *sc)
|
|||
* proceed with the flush.
|
||||
*/
|
||||
udelay(1);
|
||||
spin_lock_irqsave(&sc->release_lock, flags);
|
||||
spin_lock(&sc->release_lock);
|
||||
if (sc->sr) { /* this context has a shadow ring */
|
||||
while (sc->sr_tail != sc->sr_head) {
|
||||
pbuf = &sc->sr[sc->sr_tail].pbuf;
|
||||
|
@ -955,7 +958,8 @@ void sc_disable(struct send_context *sc)
|
|||
sc->sr_tail = 0;
|
||||
}
|
||||
}
|
||||
spin_unlock_irqrestore(&sc->release_lock, flags);
|
||||
spin_unlock(&sc->release_lock);
|
||||
spin_unlock_irq(&sc->alloc_lock);
|
||||
}
|
||||
|
||||
/* return SendEgressCtxtStatus.PacketOccupancy */
|
||||
|
@ -1178,11 +1182,39 @@ void pio_kernel_unfreeze(struct hfi1_devdata *dd)
|
|||
sc = dd->send_contexts[i].sc;
|
||||
if (!sc || !(sc->flags & SCF_FROZEN) || sc->type == SC_USER)
|
||||
continue;
|
||||
if (sc->flags & SCF_LINK_DOWN)
|
||||
continue;
|
||||
|
||||
sc_enable(sc); /* will clear the sc frozen flag */
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* pio_kernel_linkup() - Re-enable send contexts after linkup event
|
||||
* @dd: valid devive data
|
||||
*
|
||||
* When the link goes down, the freeze path is taken. However, a link down
|
||||
* event is different from a freeze because if the send context is re-enabled
|
||||
* whowever is sending data will start sending data again, which will hang
|
||||
* any QP that is sending data.
|
||||
*
|
||||
* The freeze path now looks at the type of event that occurs and takes this
|
||||
* path for link down event.
|
||||
*/
|
||||
void pio_kernel_linkup(struct hfi1_devdata *dd)
|
||||
{
|
||||
struct send_context *sc;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < dd->num_send_contexts; i++) {
|
||||
sc = dd->send_contexts[i].sc;
|
||||
if (!sc || !(sc->flags & SCF_LINK_DOWN) || sc->type == SC_USER)
|
||||
continue;
|
||||
|
||||
sc_enable(sc); /* will clear the sc link down flag */
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Wait for the SendPioInitCtxt.PioInitInProgress bit to clear.
|
||||
* Returns:
|
||||
|
@ -1382,11 +1414,10 @@ void sc_stop(struct send_context *sc, int flag)
|
|||
{
|
||||
unsigned long flags;
|
||||
|
||||
/* mark the context */
|
||||
sc->flags |= flag;
|
||||
|
||||
/* stop buffer allocations */
|
||||
spin_lock_irqsave(&sc->alloc_lock, flags);
|
||||
/* mark the context */
|
||||
sc->flags |= flag;
|
||||
sc->flags &= ~SCF_ENABLED;
|
||||
spin_unlock_irqrestore(&sc->alloc_lock, flags);
|
||||
wake_up(&sc->halt_wait);
|
||||
|
|
|
@ -139,6 +139,7 @@ struct send_context {
|
|||
#define SCF_IN_FREE 0x02
|
||||
#define SCF_HALTED 0x04
|
||||
#define SCF_FROZEN 0x08
|
||||
#define SCF_LINK_DOWN 0x10
|
||||
|
||||
struct send_context_info {
|
||||
struct send_context *sc; /* allocated working context */
|
||||
|
@ -306,6 +307,7 @@ void set_pio_integrity(struct send_context *sc);
|
|||
void pio_reset_all(struct hfi1_devdata *dd);
|
||||
void pio_freeze(struct hfi1_devdata *dd);
|
||||
void pio_kernel_unfreeze(struct hfi1_devdata *dd);
|
||||
void pio_kernel_linkup(struct hfi1_devdata *dd);
|
||||
|
||||
/* global PIO send control operations */
|
||||
#define PSC_GLOBAL_ENABLE 0
|
||||
|
|
|
@ -828,7 +828,7 @@ static int user_sdma_send_pkts(struct user_sdma_request *req, unsigned maxpkts)
|
|||
if (READ_ONCE(iovec->offset) == iovec->iov.iov_len) {
|
||||
if (++req->iov_idx == req->data_iovs) {
|
||||
ret = -EFAULT;
|
||||
goto free_txreq;
|
||||
goto free_tx;
|
||||
}
|
||||
iovec = &req->iovs[req->iov_idx];
|
||||
WARN_ON(iovec->offset);
|
||||
|
|
|
@ -1582,6 +1582,7 @@ static int hfi1_check_ah(struct ib_device *ibdev, struct rdma_ah_attr *ah_attr)
|
|||
struct hfi1_pportdata *ppd;
|
||||
struct hfi1_devdata *dd;
|
||||
u8 sc5;
|
||||
u8 sl;
|
||||
|
||||
if (hfi1_check_mcast(rdma_ah_get_dlid(ah_attr)) &&
|
||||
!(rdma_ah_get_ah_flags(ah_attr) & IB_AH_GRH))
|
||||
|
@ -1590,8 +1591,13 @@ static int hfi1_check_ah(struct ib_device *ibdev, struct rdma_ah_attr *ah_attr)
|
|||
/* test the mapping for validity */
|
||||
ibp = to_iport(ibdev, rdma_ah_get_port_num(ah_attr));
|
||||
ppd = ppd_from_ibp(ibp);
|
||||
sc5 = ibp->sl_to_sc[rdma_ah_get_sl(ah_attr)];
|
||||
dd = dd_from_ppd(ppd);
|
||||
|
||||
sl = rdma_ah_get_sl(ah_attr);
|
||||
if (sl >= ARRAY_SIZE(ibp->sl_to_sc))
|
||||
return -EINVAL;
|
||||
|
||||
sc5 = ibp->sl_to_sc[sl];
|
||||
if (sc_to_vlt(dd, sc5) > num_vls && sc_to_vlt(dd, sc5) != 0xf)
|
||||
return -EINVAL;
|
||||
return 0;
|
||||
|
|
|
@ -723,6 +723,7 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_OBJ_CREATE)(
|
|||
attrs, MLX5_IB_ATTR_DEVX_OBJ_CREATE_HANDLE);
|
||||
struct mlx5_ib_ucontext *c = to_mucontext(uobj->context);
|
||||
struct mlx5_ib_dev *dev = to_mdev(c->ibucontext.device);
|
||||
u32 out[MLX5_ST_SZ_DW(general_obj_out_cmd_hdr)];
|
||||
struct devx_obj *obj;
|
||||
int err;
|
||||
|
||||
|
@ -754,10 +755,12 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_OBJ_CREATE)(
|
|||
|
||||
err = uverbs_copy_to(attrs, MLX5_IB_ATTR_DEVX_OBJ_CREATE_CMD_OUT, cmd_out, cmd_out_len);
|
||||
if (err)
|
||||
goto obj_free;
|
||||
goto obj_destroy;
|
||||
|
||||
return 0;
|
||||
|
||||
obj_destroy:
|
||||
mlx5_cmd_exec(obj->mdev, obj->dinbox, obj->dinlen, out, sizeof(out));
|
||||
obj_free:
|
||||
kfree(obj);
|
||||
return err;
|
||||
|
|
|
@ -2951,7 +2951,7 @@ static int srp_reset_device(struct scsi_cmnd *scmnd)
|
|||
{
|
||||
struct srp_target_port *target = host_to_target(scmnd->device->host);
|
||||
struct srp_rdma_ch *ch;
|
||||
int i;
|
||||
int i, j;
|
||||
u8 status;
|
||||
|
||||
shost_printk(KERN_ERR, target->scsi_host, "SRP reset_device called\n");
|
||||
|
@ -2965,8 +2965,8 @@ static int srp_reset_device(struct scsi_cmnd *scmnd)
|
|||
|
||||
for (i = 0; i < target->ch_count; i++) {
|
||||
ch = &target->ch[i];
|
||||
for (i = 0; i < target->req_ring_size; ++i) {
|
||||
struct srp_request *req = &ch->req_ring[i];
|
||||
for (j = 0; j < target->req_ring_size; ++j) {
|
||||
struct srp_request *req = &ch->req_ring[j];
|
||||
|
||||
srp_finish_req(ch, req, scmnd->device, DID_RESET << 16);
|
||||
}
|
||||
|
|
|
@ -75,8 +75,7 @@ MODULE_LICENSE("GPL");
|
|||
*/
|
||||
|
||||
|
||||
static unsigned char atakbd_keycode[0x72] = { /* American layout */
|
||||
[0] = KEY_GRAVE,
|
||||
static unsigned char atakbd_keycode[0x73] = { /* American layout */
|
||||
[1] = KEY_ESC,
|
||||
[2] = KEY_1,
|
||||
[3] = KEY_2,
|
||||
|
@ -117,9 +116,9 @@ static unsigned char atakbd_keycode[0x72] = { /* American layout */
|
|||
[38] = KEY_L,
|
||||
[39] = KEY_SEMICOLON,
|
||||
[40] = KEY_APOSTROPHE,
|
||||
[41] = KEY_BACKSLASH, /* FIXME, '#' */
|
||||
[41] = KEY_GRAVE,
|
||||
[42] = KEY_LEFTSHIFT,
|
||||
[43] = KEY_GRAVE, /* FIXME: '~' */
|
||||
[43] = KEY_BACKSLASH,
|
||||
[44] = KEY_Z,
|
||||
[45] = KEY_X,
|
||||
[46] = KEY_C,
|
||||
|
@ -145,45 +144,34 @@ static unsigned char atakbd_keycode[0x72] = { /* American layout */
|
|||
[66] = KEY_F8,
|
||||
[67] = KEY_F9,
|
||||
[68] = KEY_F10,
|
||||
[69] = KEY_ESC,
|
||||
[70] = KEY_DELETE,
|
||||
[71] = KEY_KP7,
|
||||
[72] = KEY_KP8,
|
||||
[73] = KEY_KP9,
|
||||
[71] = KEY_HOME,
|
||||
[72] = KEY_UP,
|
||||
[74] = KEY_KPMINUS,
|
||||
[75] = KEY_KP4,
|
||||
[76] = KEY_KP5,
|
||||
[77] = KEY_KP6,
|
||||
[75] = KEY_LEFT,
|
||||
[77] = KEY_RIGHT,
|
||||
[78] = KEY_KPPLUS,
|
||||
[79] = KEY_KP1,
|
||||
[80] = KEY_KP2,
|
||||
[81] = KEY_KP3,
|
||||
[82] = KEY_KP0,
|
||||
[83] = KEY_KPDOT,
|
||||
[90] = KEY_KPLEFTPAREN,
|
||||
[91] = KEY_KPRIGHTPAREN,
|
||||
[92] = KEY_KPASTERISK, /* FIXME */
|
||||
[93] = KEY_KPASTERISK,
|
||||
[94] = KEY_KPPLUS,
|
||||
[95] = KEY_HELP,
|
||||
[80] = KEY_DOWN,
|
||||
[82] = KEY_INSERT,
|
||||
[83] = KEY_DELETE,
|
||||
[96] = KEY_102ND,
|
||||
[97] = KEY_KPASTERISK, /* FIXME */
|
||||
[98] = KEY_KPSLASH,
|
||||
[97] = KEY_UNDO,
|
||||
[98] = KEY_HELP,
|
||||
[99] = KEY_KPLEFTPAREN,
|
||||
[100] = KEY_KPRIGHTPAREN,
|
||||
[101] = KEY_KPSLASH,
|
||||
[102] = KEY_KPASTERISK,
|
||||
[103] = KEY_UP,
|
||||
[104] = KEY_KPASTERISK, /* FIXME */
|
||||
[105] = KEY_LEFT,
|
||||
[106] = KEY_RIGHT,
|
||||
[107] = KEY_KPASTERISK, /* FIXME */
|
||||
[108] = KEY_DOWN,
|
||||
[109] = KEY_KPASTERISK, /* FIXME */
|
||||
[110] = KEY_KPASTERISK, /* FIXME */
|
||||
[111] = KEY_KPASTERISK, /* FIXME */
|
||||
[112] = KEY_KPASTERISK, /* FIXME */
|
||||
[113] = KEY_KPASTERISK /* FIXME */
|
||||
[103] = KEY_KP7,
|
||||
[104] = KEY_KP8,
|
||||
[105] = KEY_KP9,
|
||||
[106] = KEY_KP4,
|
||||
[107] = KEY_KP5,
|
||||
[108] = KEY_KP6,
|
||||
[109] = KEY_KP1,
|
||||
[110] = KEY_KP2,
|
||||
[111] = KEY_KP3,
|
||||
[112] = KEY_KP0,
|
||||
[113] = KEY_KPDOT,
|
||||
[114] = KEY_KPENTER,
|
||||
};
|
||||
|
||||
static struct input_dev *atakbd_dev;
|
||||
|
@ -191,21 +179,15 @@ static struct input_dev *atakbd_dev;
|
|||
static void atakbd_interrupt(unsigned char scancode, char down)
|
||||
{
|
||||
|
||||
if (scancode < 0x72) { /* scancodes < 0xf2 are keys */
|
||||
if (scancode < 0x73) { /* scancodes < 0xf3 are keys */
|
||||
|
||||
// report raw events here?
|
||||
|
||||
scancode = atakbd_keycode[scancode];
|
||||
|
||||
if (scancode == KEY_CAPSLOCK) { /* CapsLock is a toggle switch key on Amiga */
|
||||
input_report_key(atakbd_dev, scancode, 1);
|
||||
input_report_key(atakbd_dev, scancode, 0);
|
||||
input_sync(atakbd_dev);
|
||||
} else {
|
||||
input_report_key(atakbd_dev, scancode, down);
|
||||
input_sync(atakbd_dev);
|
||||
}
|
||||
} else /* scancodes >= 0xf2 are mouse data, most likely */
|
||||
input_report_key(atakbd_dev, scancode, down);
|
||||
input_sync(atakbd_dev);
|
||||
} else /* scancodes >= 0xf3 are mouse data, most likely */
|
||||
printk(KERN_INFO "atakbd: unhandled scancode %x\n", scancode);
|
||||
|
||||
return;
|
||||
|
|
|
@ -410,7 +410,7 @@ static int uinput_validate_absinfo(struct input_dev *dev, unsigned int code,
|
|||
min = abs->minimum;
|
||||
max = abs->maximum;
|
||||
|
||||
if ((min != 0 || max != 0) && max <= min) {
|
||||
if ((min != 0 || max != 0) && max < min) {
|
||||
printk(KERN_DEBUG
|
||||
"%s: invalid abs[%02x] min:%d max:%d\n",
|
||||
UINPUT_NAME, code, min, max);
|
||||
|
|
|
@ -1178,6 +1178,8 @@ static const struct dmi_system_id elantech_dmi_has_middle_button[] = {
|
|||
static const char * const middle_button_pnp_ids[] = {
|
||||
"LEN2131", /* ThinkPad P52 w/ NFC */
|
||||
"LEN2132", /* ThinkPad P52 */
|
||||
"LEN2133", /* ThinkPad P72 w/ NFC */
|
||||
"LEN2134", /* ThinkPad P72 */
|
||||
NULL
|
||||
};
|
||||
|
||||
|
|
|
@ -241,6 +241,9 @@ static int __maybe_unused egalax_ts_suspend(struct device *dev)
|
|||
struct i2c_client *client = to_i2c_client(dev);
|
||||
int ret;
|
||||
|
||||
if (device_may_wakeup(dev))
|
||||
return enable_irq_wake(client->irq);
|
||||
|
||||
ret = i2c_master_send(client, suspend_cmd, MAX_I2C_DATA_LEN);
|
||||
return ret > 0 ? 0 : ret;
|
||||
}
|
||||
|
@ -249,6 +252,9 @@ static int __maybe_unused egalax_ts_resume(struct device *dev)
|
|||
{
|
||||
struct i2c_client *client = to_i2c_client(dev);
|
||||
|
||||
if (device_may_wakeup(dev))
|
||||
return disable_irq_wake(client->irq);
|
||||
|
||||
return egalax_wake_up_device(client);
|
||||
}
|
||||
|
||||
|
|
|
@ -246,7 +246,13 @@ static u16 get_alias(struct device *dev)
|
|||
|
||||
/* The callers make sure that get_device_id() does not fail here */
|
||||
devid = get_device_id(dev);
|
||||
|
||||
/* For ACPI HID devices, we simply return the devid as such */
|
||||
if (!dev_is_pci(dev))
|
||||
return devid;
|
||||
|
||||
ivrs_alias = amd_iommu_alias_table[devid];
|
||||
|
||||
pci_for_each_dma_alias(pdev, __last_alias, &pci_alias);
|
||||
|
||||
if (ivrs_alias == pci_alias)
|
||||
|
|
|
@ -2540,9 +2540,9 @@ static struct dmar_domain *dmar_insert_one_dev_info(struct intel_iommu *iommu,
|
|||
if (dev && dev_is_pci(dev) && info->pasid_supported) {
|
||||
ret = intel_pasid_alloc_table(dev);
|
||||
if (ret) {
|
||||
__dmar_remove_one_dev_info(info);
|
||||
spin_unlock_irqrestore(&device_domain_lock, flags);
|
||||
return NULL;
|
||||
pr_warn("No pasid table for %s, pasid disabled\n",
|
||||
dev_name(dev));
|
||||
info->pasid_supported = 0;
|
||||
}
|
||||
}
|
||||
spin_unlock_irqrestore(&device_domain_lock, flags);
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#define __INTEL_PASID_H
|
||||
|
||||
#define PASID_MIN 0x1
|
||||
#define PASID_MAX 0x100000
|
||||
#define PASID_MAX 0x20000
|
||||
|
||||
struct pasid_entry {
|
||||
u64 val;
|
||||
|
|
|
@ -1241,6 +1241,12 @@ err_unprepare_clocks:
|
|||
|
||||
static void rk_iommu_shutdown(struct platform_device *pdev)
|
||||
{
|
||||
struct rk_iommu *iommu = platform_get_drvdata(pdev);
|
||||
int i = 0, irq;
|
||||
|
||||
while ((irq = platform_get_irq(pdev, i++)) != -ENXIO)
|
||||
devm_free_irq(iommu->dev, irq, iommu);
|
||||
|
||||
pm_runtime_force_suspend(&pdev->dev);
|
||||
}
|
||||
|
||||
|
|
|
@ -965,6 +965,7 @@ void bch_prio_write(struct cache *ca);
|
|||
void bch_write_bdev_super(struct cached_dev *dc, struct closure *parent);
|
||||
|
||||
extern struct workqueue_struct *bcache_wq;
|
||||
extern struct workqueue_struct *bch_journal_wq;
|
||||
extern struct mutex bch_register_lock;
|
||||
extern struct list_head bch_cache_sets;
|
||||
|
||||
|
|
|
@ -485,7 +485,7 @@ static void do_journal_discard(struct cache *ca)
|
|||
|
||||
closure_get(&ca->set->cl);
|
||||
INIT_WORK(&ja->discard_work, journal_discard_work);
|
||||
schedule_work(&ja->discard_work);
|
||||
queue_work(bch_journal_wq, &ja->discard_work);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -592,7 +592,7 @@ static void journal_write_done(struct closure *cl)
|
|||
: &j->w[0];
|
||||
|
||||
__closure_wake_up(&w->wait);
|
||||
continue_at_nobarrier(cl, journal_write, system_wq);
|
||||
continue_at_nobarrier(cl, journal_write, bch_journal_wq);
|
||||
}
|
||||
|
||||
static void journal_write_unlock(struct closure *cl)
|
||||
|
@ -627,7 +627,7 @@ static void journal_write_unlocked(struct closure *cl)
|
|||
spin_unlock(&c->journal.lock);
|
||||
|
||||
btree_flush_write(c);
|
||||
continue_at(cl, journal_write, system_wq);
|
||||
continue_at(cl, journal_write, bch_journal_wq);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -47,6 +47,7 @@ static int bcache_major;
|
|||
static DEFINE_IDA(bcache_device_idx);
|
||||
static wait_queue_head_t unregister_wait;
|
||||
struct workqueue_struct *bcache_wq;
|
||||
struct workqueue_struct *bch_journal_wq;
|
||||
|
||||
#define BTREE_MAX_PAGES (256 * 1024 / PAGE_SIZE)
|
||||
/* limitation of partitions number on single bcache device */
|
||||
|
@ -2341,6 +2342,9 @@ static void bcache_exit(void)
|
|||
kobject_put(bcache_kobj);
|
||||
if (bcache_wq)
|
||||
destroy_workqueue(bcache_wq);
|
||||
if (bch_journal_wq)
|
||||
destroy_workqueue(bch_journal_wq);
|
||||
|
||||
if (bcache_major)
|
||||
unregister_blkdev(bcache_major, "bcache");
|
||||
unregister_reboot_notifier(&reboot);
|
||||
|
@ -2370,6 +2374,10 @@ static int __init bcache_init(void)
|
|||
if (!bcache_wq)
|
||||
goto err;
|
||||
|
||||
bch_journal_wq = alloc_workqueue("bch_journal", WQ_MEM_RECLAIM, 0);
|
||||
if (!bch_journal_wq)
|
||||
goto err;
|
||||
|
||||
bcache_kobj = kobject_create_and_add("bcache", fs_kobj);
|
||||
if (!bcache_kobj)
|
||||
goto err;
|
||||
|
|
|
@ -115,14 +115,6 @@ static void __v4l2_event_queue_fh(struct v4l2_fh *fh, const struct v4l2_event *e
|
|||
if (sev == NULL)
|
||||
return;
|
||||
|
||||
/*
|
||||
* If the event has been added to the fh->subscribed list, but its
|
||||
* add op has not completed yet elems will be 0, treat this as
|
||||
* not being subscribed.
|
||||
*/
|
||||
if (!sev->elems)
|
||||
return;
|
||||
|
||||
/* Increase event sequence number on fh. */
|
||||
fh->sequence++;
|
||||
|
||||
|
@ -208,6 +200,7 @@ int v4l2_event_subscribe(struct v4l2_fh *fh,
|
|||
struct v4l2_subscribed_event *sev, *found_ev;
|
||||
unsigned long flags;
|
||||
unsigned i;
|
||||
int ret = 0;
|
||||
|
||||
if (sub->type == V4L2_EVENT_ALL)
|
||||
return -EINVAL;
|
||||
|
@ -225,31 +218,36 @@ int v4l2_event_subscribe(struct v4l2_fh *fh,
|
|||
sev->flags = sub->flags;
|
||||
sev->fh = fh;
|
||||
sev->ops = ops;
|
||||
sev->elems = elems;
|
||||
|
||||
mutex_lock(&fh->subscribe_lock);
|
||||
|
||||
spin_lock_irqsave(&fh->vdev->fh_lock, flags);
|
||||
found_ev = v4l2_event_subscribed(fh, sub->type, sub->id);
|
||||
if (!found_ev)
|
||||
list_add(&sev->list, &fh->subscribed);
|
||||
spin_unlock_irqrestore(&fh->vdev->fh_lock, flags);
|
||||
|
||||
if (found_ev) {
|
||||
/* Already listening */
|
||||
kvfree(sev);
|
||||
return 0; /* Already listening */
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
if (sev->ops && sev->ops->add) {
|
||||
int ret = sev->ops->add(sev, elems);
|
||||
ret = sev->ops->add(sev, elems);
|
||||
if (ret) {
|
||||
sev->ops = NULL;
|
||||
v4l2_event_unsubscribe(fh, sub);
|
||||
return ret;
|
||||
kvfree(sev);
|
||||
goto out_unlock;
|
||||
}
|
||||
}
|
||||
|
||||
/* Mark as ready for use */
|
||||
sev->elems = elems;
|
||||
spin_lock_irqsave(&fh->vdev->fh_lock, flags);
|
||||
list_add(&sev->list, &fh->subscribed);
|
||||
spin_unlock_irqrestore(&fh->vdev->fh_lock, flags);
|
||||
|
||||
return 0;
|
||||
out_unlock:
|
||||
mutex_unlock(&fh->subscribe_lock);
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(v4l2_event_subscribe);
|
||||
|
||||
|
@ -288,6 +286,8 @@ int v4l2_event_unsubscribe(struct v4l2_fh *fh,
|
|||
return 0;
|
||||
}
|
||||
|
||||
mutex_lock(&fh->subscribe_lock);
|
||||
|
||||
spin_lock_irqsave(&fh->vdev->fh_lock, flags);
|
||||
|
||||
sev = v4l2_event_subscribed(fh, sub->type, sub->id);
|
||||
|
@ -305,6 +305,8 @@ int v4l2_event_unsubscribe(struct v4l2_fh *fh,
|
|||
if (sev && sev->ops && sev->ops->del)
|
||||
sev->ops->del(sev);
|
||||
|
||||
mutex_unlock(&fh->subscribe_lock);
|
||||
|
||||
kvfree(sev);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -45,6 +45,7 @@ void v4l2_fh_init(struct v4l2_fh *fh, struct video_device *vdev)
|
|||
INIT_LIST_HEAD(&fh->available);
|
||||
INIT_LIST_HEAD(&fh->subscribed);
|
||||
fh->sequence = -1;
|
||||
mutex_init(&fh->subscribe_lock);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(v4l2_fh_init);
|
||||
|
||||
|
@ -90,6 +91,7 @@ void v4l2_fh_exit(struct v4l2_fh *fh)
|
|||
return;
|
||||
v4l_disable_media_source(fh->vdev);
|
||||
v4l2_event_unsubscribe_all(fh);
|
||||
mutex_destroy(&fh->subscribe_lock);
|
||||
fh->vdev = NULL;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(v4l2_fh_exit);
|
||||
|
|
|
@ -235,7 +235,7 @@ int mmc_of_parse(struct mmc_host *host)
|
|||
host->caps |= MMC_CAP_NEEDS_POLL;
|
||||
|
||||
ret = mmc_gpiod_request_cd(host, "cd", 0, true,
|
||||
cd_debounce_delay_ms,
|
||||
cd_debounce_delay_ms * 1000,
|
||||
&cd_gpio_invert);
|
||||
if (!ret)
|
||||
dev_info(host->parent, "Got CD GPIO\n");
|
||||
|
|
|
@ -271,7 +271,7 @@ int mmc_gpiod_request_cd(struct mmc_host *host, const char *con_id,
|
|||
if (debounce) {
|
||||
ret = gpiod_set_debounce(desc, debounce);
|
||||
if (ret < 0)
|
||||
ctx->cd_debounce_delay_ms = debounce;
|
||||
ctx->cd_debounce_delay_ms = debounce / 1000;
|
||||
}
|
||||
|
||||
if (gpio_invert)
|
||||
|
|
|
@ -498,7 +498,8 @@ static const struct soc_device_attribute gen3_soc_whitelist[] = {
|
|||
|
||||
static int renesas_sdhi_sys_dmac_probe(struct platform_device *pdev)
|
||||
{
|
||||
if (of_device_get_match_data(&pdev->dev) == &of_rcar_gen3_compatible &&
|
||||
if ((of_device_get_match_data(&pdev->dev) == &of_rcar_gen3_compatible ||
|
||||
of_device_get_match_data(&pdev->dev) == &of_rcar_r8a7795_compatible) &&
|
||||
!soc_device_match(gen3_soc_whitelist))
|
||||
return -ENODEV;
|
||||
|
||||
|
|
|
@ -210,6 +210,7 @@ static void bond_get_stats(struct net_device *bond_dev,
|
|||
static void bond_slave_arr_handler(struct work_struct *work);
|
||||
static bool bond_time_in_interval(struct bonding *bond, unsigned long last_act,
|
||||
int mod);
|
||||
static void bond_netdev_notify_work(struct work_struct *work);
|
||||
|
||||
/*---------------------------- General routines -----------------------------*/
|
||||
|
||||
|
@ -1170,9 +1171,27 @@ static rx_handler_result_t bond_handle_frame(struct sk_buff **pskb)
|
|||
}
|
||||
}
|
||||
|
||||
/* don't change skb->dev for link-local packets */
|
||||
if (is_link_local_ether_addr(eth_hdr(skb)->h_dest))
|
||||
/* Link-local multicast packets should be passed to the
|
||||
* stack on the link they arrive as well as pass them to the
|
||||
* bond-master device. These packets are mostly usable when
|
||||
* stack receives it with the link on which they arrive
|
||||
* (e.g. LLDP) they also must be available on master. Some of
|
||||
* the use cases include (but are not limited to): LLDP agents
|
||||
* that must be able to operate both on enslaved interfaces as
|
||||
* well as on bonds themselves; linux bridges that must be able
|
||||
* to process/pass BPDUs from attached bonds when any kind of
|
||||
* STP version is enabled on the network.
|
||||
*/
|
||||
if (is_link_local_ether_addr(eth_hdr(skb)->h_dest)) {
|
||||
struct sk_buff *nskb = skb_clone(skb, GFP_ATOMIC);
|
||||
|
||||
if (nskb) {
|
||||
nskb->dev = bond->dev;
|
||||
nskb->queue_mapping = 0;
|
||||
netif_rx(nskb);
|
||||
}
|
||||
return RX_HANDLER_PASS;
|
||||
}
|
||||
if (bond_should_deliver_exact_match(skb, slave, bond))
|
||||
return RX_HANDLER_EXACT;
|
||||
|
||||
|
@ -1269,6 +1288,8 @@ static struct slave *bond_alloc_slave(struct bonding *bond)
|
|||
return NULL;
|
||||
}
|
||||
}
|
||||
INIT_DELAYED_WORK(&slave->notify_work, bond_netdev_notify_work);
|
||||
|
||||
return slave;
|
||||
}
|
||||
|
||||
|
@ -1276,6 +1297,7 @@ static void bond_free_slave(struct slave *slave)
|
|||
{
|
||||
struct bonding *bond = bond_get_bond_by_slave(slave);
|
||||
|
||||
cancel_delayed_work_sync(&slave->notify_work);
|
||||
if (BOND_MODE(bond) == BOND_MODE_8023AD)
|
||||
kfree(SLAVE_AD_INFO(slave));
|
||||
|
||||
|
@ -1297,39 +1319,26 @@ static void bond_fill_ifslave(struct slave *slave, struct ifslave *info)
|
|||
info->link_failure_count = slave->link_failure_count;
|
||||
}
|
||||
|
||||
static void bond_netdev_notify(struct net_device *dev,
|
||||
struct netdev_bonding_info *info)
|
||||
{
|
||||
rtnl_lock();
|
||||
netdev_bonding_info_change(dev, info);
|
||||
rtnl_unlock();
|
||||
}
|
||||
|
||||
static void bond_netdev_notify_work(struct work_struct *_work)
|
||||
{
|
||||
struct netdev_notify_work *w =
|
||||
container_of(_work, struct netdev_notify_work, work.work);
|
||||
struct slave *slave = container_of(_work, struct slave,
|
||||
notify_work.work);
|
||||
|
||||
bond_netdev_notify(w->dev, &w->bonding_info);
|
||||
dev_put(w->dev);
|
||||
kfree(w);
|
||||
if (rtnl_trylock()) {
|
||||
struct netdev_bonding_info binfo;
|
||||
|
||||
bond_fill_ifslave(slave, &binfo.slave);
|
||||
bond_fill_ifbond(slave->bond, &binfo.master);
|
||||
netdev_bonding_info_change(slave->dev, &binfo);
|
||||
rtnl_unlock();
|
||||
} else {
|
||||
queue_delayed_work(slave->bond->wq, &slave->notify_work, 1);
|
||||
}
|
||||
}
|
||||
|
||||
void bond_queue_slave_event(struct slave *slave)
|
||||
{
|
||||
struct bonding *bond = slave->bond;
|
||||
struct netdev_notify_work *nnw = kzalloc(sizeof(*nnw), GFP_ATOMIC);
|
||||
|
||||
if (!nnw)
|
||||
return;
|
||||
|
||||
dev_hold(slave->dev);
|
||||
nnw->dev = slave->dev;
|
||||
bond_fill_ifslave(slave, &nnw->bonding_info.slave);
|
||||
bond_fill_ifbond(bond, &nnw->bonding_info.master);
|
||||
INIT_DELAYED_WORK(&nnw->work, bond_netdev_notify_work);
|
||||
|
||||
queue_delayed_work(slave->bond->wq, &nnw->work, 0);
|
||||
queue_delayed_work(slave->bond->wq, &slave->notify_work, 0);
|
||||
}
|
||||
|
||||
void bond_lower_state_changed(struct slave *slave)
|
||||
|
|
|
@ -2184,25 +2184,6 @@ error_drop_packet:
|
|||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||
static void ena_netpoll(struct net_device *netdev)
|
||||
{
|
||||
struct ena_adapter *adapter = netdev_priv(netdev);
|
||||
int i;
|
||||
|
||||
/* Dont schedule NAPI if the driver is in the middle of reset
|
||||
* or netdev is down.
|
||||
*/
|
||||
|
||||
if (!test_bit(ENA_FLAG_DEV_UP, &adapter->flags) ||
|
||||
test_bit(ENA_FLAG_TRIGGER_RESET, &adapter->flags))
|
||||
return;
|
||||
|
||||
for (i = 0; i < adapter->num_queues; i++)
|
||||
napi_schedule(&adapter->ena_napi[i].napi);
|
||||
}
|
||||
#endif /* CONFIG_NET_POLL_CONTROLLER */
|
||||
|
||||
static u16 ena_select_queue(struct net_device *dev, struct sk_buff *skb,
|
||||
struct net_device *sb_dev,
|
||||
select_queue_fallback_t fallback)
|
||||
|
@ -2368,9 +2349,6 @@ static const struct net_device_ops ena_netdev_ops = {
|
|||
.ndo_change_mtu = ena_change_mtu,
|
||||
.ndo_set_mac_address = NULL,
|
||||
.ndo_validate_addr = eth_validate_addr,
|
||||
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||
.ndo_poll_controller = ena_netpoll,
|
||||
#endif /* CONFIG_NET_POLL_CONTROLLER */
|
||||
};
|
||||
|
||||
static int ena_device_validate_params(struct ena_adapter *adapter,
|
||||
|
|
|
@ -1031,6 +1031,7 @@ static int dec_lance_probe(struct device *bdev, const int type)
|
|||
int i, ret;
|
||||
unsigned long esar_base;
|
||||
unsigned char *esar;
|
||||
const char *desc;
|
||||
|
||||
if (dec_lance_debug && version_printed++ == 0)
|
||||
printk(version);
|
||||
|
@ -1216,19 +1217,20 @@ static int dec_lance_probe(struct device *bdev, const int type)
|
|||
*/
|
||||
switch (type) {
|
||||
case ASIC_LANCE:
|
||||
printk("%s: IOASIC onboard LANCE", name);
|
||||
desc = "IOASIC onboard LANCE";
|
||||
break;
|
||||
case PMAD_LANCE:
|
||||
printk("%s: PMAD-AA", name);
|
||||
desc = "PMAD-AA";
|
||||
break;
|
||||
case PMAX_LANCE:
|
||||
printk("%s: PMAX onboard LANCE", name);
|
||||
desc = "PMAX onboard LANCE";
|
||||
break;
|
||||
}
|
||||
for (i = 0; i < 6; i++)
|
||||
dev->dev_addr[i] = esar[i * 4];
|
||||
|
||||
printk(", addr = %pM, irq = %d\n", dev->dev_addr, dev->irq);
|
||||
printk("%s: %s, addr = %pM, irq = %d\n",
|
||||
name, desc, dev->dev_addr, dev->irq);
|
||||
|
||||
dev->netdev_ops = &lance_netdev_ops;
|
||||
dev->watchdog_timeo = 5*HZ;
|
||||
|
|
|
@ -1070,9 +1070,6 @@ static void bcm_sysport_resume_from_wol(struct bcm_sysport_priv *priv)
|
|||
{
|
||||
u32 reg;
|
||||
|
||||
/* Stop monitoring MPD interrupt */
|
||||
intrl2_0_mask_set(priv, INTRL2_0_MPD | INTRL2_0_BRCM_MATCH_TAG);
|
||||
|
||||
/* Disable RXCHK, active filters and Broadcom tag matching */
|
||||
reg = rxchk_readl(priv, RXCHK_CONTROL);
|
||||
reg &= ~(RXCHK_BRCM_TAG_MATCH_MASK <<
|
||||
|
@ -1082,6 +1079,17 @@ static void bcm_sysport_resume_from_wol(struct bcm_sysport_priv *priv)
|
|||
/* Clear the MagicPacket detection logic */
|
||||
mpd_enable_set(priv, false);
|
||||
|
||||
reg = intrl2_0_readl(priv, INTRL2_CPU_STATUS);
|
||||
if (reg & INTRL2_0_MPD)
|
||||
netdev_info(priv->netdev, "Wake-on-LAN (MPD) interrupt!\n");
|
||||
|
||||
if (reg & INTRL2_0_BRCM_MATCH_TAG) {
|
||||
reg = rxchk_readl(priv, RXCHK_BRCM_TAG_MATCH_STATUS) &
|
||||
RXCHK_BRCM_TAG_MATCH_MASK;
|
||||
netdev_info(priv->netdev,
|
||||
"Wake-on-LAN (filters 0x%02x) interrupt!\n", reg);
|
||||
}
|
||||
|
||||
netif_dbg(priv, wol, priv->netdev, "resumed from WOL\n");
|
||||
}
|
||||
|
||||
|
@ -1106,7 +1114,6 @@ static irqreturn_t bcm_sysport_rx_isr(int irq, void *dev_id)
|
|||
struct bcm_sysport_priv *priv = netdev_priv(dev);
|
||||
struct bcm_sysport_tx_ring *txr;
|
||||
unsigned int ring, ring_bit;
|
||||
u32 reg;
|
||||
|
||||
priv->irq0_stat = intrl2_0_readl(priv, INTRL2_CPU_STATUS) &
|
||||
~intrl2_0_readl(priv, INTRL2_CPU_MASK_STATUS);
|
||||
|
@ -1132,16 +1139,6 @@ static irqreturn_t bcm_sysport_rx_isr(int irq, void *dev_id)
|
|||
if (priv->irq0_stat & INTRL2_0_TX_RING_FULL)
|
||||
bcm_sysport_tx_reclaim_all(priv);
|
||||
|
||||
if (priv->irq0_stat & INTRL2_0_MPD)
|
||||
netdev_info(priv->netdev, "Wake-on-LAN (MPD) interrupt!\n");
|
||||
|
||||
if (priv->irq0_stat & INTRL2_0_BRCM_MATCH_TAG) {
|
||||
reg = rxchk_readl(priv, RXCHK_BRCM_TAG_MATCH_STATUS) &
|
||||
RXCHK_BRCM_TAG_MATCH_MASK;
|
||||
netdev_info(priv->netdev,
|
||||
"Wake-on-LAN (filters 0x%02x) interrupt!\n", reg);
|
||||
}
|
||||
|
||||
if (!priv->is_lite)
|
||||
goto out;
|
||||
|
||||
|
@ -2645,9 +2642,6 @@ static int bcm_sysport_suspend_to_wol(struct bcm_sysport_priv *priv)
|
|||
/* UniMAC receive needs to be turned on */
|
||||
umac_enable_set(priv, CMD_RX_EN, 1);
|
||||
|
||||
/* Enable the interrupt wake-up source */
|
||||
intrl2_0_mask_clear(priv, INTRL2_0_MPD | INTRL2_0_BRCM_MATCH_TAG);
|
||||
|
||||
netif_dbg(priv, wol, ndev, "entered WOL mode\n");
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -1884,8 +1884,11 @@ static int bnxt_poll_work(struct bnxt *bp, struct bnxt_napi *bnapi, int budget)
|
|||
if (TX_CMP_TYPE(txcmp) == CMP_TYPE_TX_L2_CMP) {
|
||||
tx_pkts++;
|
||||
/* return full budget so NAPI will complete. */
|
||||
if (unlikely(tx_pkts > bp->tx_wake_thresh))
|
||||
if (unlikely(tx_pkts > bp->tx_wake_thresh)) {
|
||||
rx_pkts = budget;
|
||||
raw_cons = NEXT_RAW_CMP(raw_cons);
|
||||
break;
|
||||
}
|
||||
} else if ((TX_CMP_TYPE(txcmp) & 0x30) == 0x10) {
|
||||
if (likely(budget))
|
||||
rc = bnxt_rx_pkt(bp, bnapi, &raw_cons, &event);
|
||||
|
@ -1913,7 +1916,7 @@ static int bnxt_poll_work(struct bnxt *bp, struct bnxt_napi *bnapi, int budget)
|
|||
}
|
||||
raw_cons = NEXT_RAW_CMP(raw_cons);
|
||||
|
||||
if (rx_pkts == budget)
|
||||
if (rx_pkts && rx_pkts == budget)
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -2027,8 +2030,12 @@ static int bnxt_poll(struct napi_struct *napi, int budget)
|
|||
while (1) {
|
||||
work_done += bnxt_poll_work(bp, bnapi, budget - work_done);
|
||||
|
||||
if (work_done >= budget)
|
||||
if (work_done >= budget) {
|
||||
if (!budget)
|
||||
BNXT_CP_DB_REARM(cpr->cp_doorbell,
|
||||
cpr->cp_raw_cons);
|
||||
break;
|
||||
}
|
||||
|
||||
if (!bnxt_has_work(bp, cpr)) {
|
||||
if (napi_complete_done(napi, work_done))
|
||||
|
|
|
@ -753,7 +753,6 @@ struct cpl_abort_req_rss {
|
|||
};
|
||||
|
||||
struct cpl_abort_req_rss6 {
|
||||
WR_HDR;
|
||||
union opcode_tid ot;
|
||||
__be32 srqidx_status;
|
||||
};
|
||||
|
|
|
@ -1158,7 +1158,7 @@ static void fec_enet_timeout_work(struct work_struct *work)
|
|||
napi_disable(&fep->napi);
|
||||
netif_tx_lock_bh(ndev);
|
||||
fec_restart(ndev);
|
||||
netif_wake_queue(ndev);
|
||||
netif_tx_wake_all_queues(ndev);
|
||||
netif_tx_unlock_bh(ndev);
|
||||
napi_enable(&fep->napi);
|
||||
}
|
||||
|
@ -1273,7 +1273,7 @@ skb_done:
|
|||
|
||||
/* Since we have freed up a buffer, the ring is no longer full
|
||||
*/
|
||||
if (netif_queue_stopped(ndev)) {
|
||||
if (netif_tx_queue_stopped(nq)) {
|
||||
entries_free = fec_enet_get_free_txdesc_num(txq);
|
||||
if (entries_free >= txq->tx_wake_threshold)
|
||||
netif_tx_wake_queue(nq);
|
||||
|
@ -1746,7 +1746,7 @@ static void fec_enet_adjust_link(struct net_device *ndev)
|
|||
napi_disable(&fep->napi);
|
||||
netif_tx_lock_bh(ndev);
|
||||
fec_restart(ndev);
|
||||
netif_wake_queue(ndev);
|
||||
netif_tx_wake_all_queues(ndev);
|
||||
netif_tx_unlock_bh(ndev);
|
||||
napi_enable(&fep->napi);
|
||||
}
|
||||
|
@ -2240,7 +2240,7 @@ static int fec_enet_set_pauseparam(struct net_device *ndev,
|
|||
napi_disable(&fep->napi);
|
||||
netif_tx_lock_bh(ndev);
|
||||
fec_restart(ndev);
|
||||
netif_wake_queue(ndev);
|
||||
netif_tx_wake_all_queues(ndev);
|
||||
netif_tx_unlock_bh(ndev);
|
||||
napi_enable(&fep->napi);
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ static void hnae_unmap_buffer(struct hnae_ring *ring, struct hnae_desc_cb *cb)
|
|||
if (cb->type == DESC_TYPE_SKB)
|
||||
dma_unmap_single(ring_to_dev(ring), cb->dma, cb->length,
|
||||
ring_to_dma_dir(ring));
|
||||
else
|
||||
else if (cb->length)
|
||||
dma_unmap_page(ring_to_dev(ring), cb->dma, cb->length,
|
||||
ring_to_dma_dir(ring));
|
||||
}
|
||||
|
|
|
@ -40,9 +40,9 @@
|
|||
#define SKB_TMP_LEN(SKB) \
|
||||
(((SKB)->transport_header - (SKB)->mac_header) + tcp_hdrlen(SKB))
|
||||
|
||||
static void fill_v2_desc(struct hnae_ring *ring, void *priv,
|
||||
int size, dma_addr_t dma, int frag_end,
|
||||
int buf_num, enum hns_desc_type type, int mtu)
|
||||
static void fill_v2_desc_hw(struct hnae_ring *ring, void *priv, int size,
|
||||
int send_sz, dma_addr_t dma, int frag_end,
|
||||
int buf_num, enum hns_desc_type type, int mtu)
|
||||
{
|
||||
struct hnae_desc *desc = &ring->desc[ring->next_to_use];
|
||||
struct hnae_desc_cb *desc_cb = &ring->desc_cb[ring->next_to_use];
|
||||
|
@ -64,7 +64,7 @@ static void fill_v2_desc(struct hnae_ring *ring, void *priv,
|
|||
desc_cb->type = type;
|
||||
|
||||
desc->addr = cpu_to_le64(dma);
|
||||
desc->tx.send_size = cpu_to_le16((u16)size);
|
||||
desc->tx.send_size = cpu_to_le16((u16)send_sz);
|
||||
|
||||
/* config bd buffer end */
|
||||
hnae_set_bit(rrcfv, HNSV2_TXD_VLD_B, 1);
|
||||
|
@ -133,6 +133,14 @@ static void fill_v2_desc(struct hnae_ring *ring, void *priv,
|
|||
ring_ptr_move_fw(ring, next_to_use);
|
||||
}
|
||||
|
||||
static void fill_v2_desc(struct hnae_ring *ring, void *priv,
|
||||
int size, dma_addr_t dma, int frag_end,
|
||||
int buf_num, enum hns_desc_type type, int mtu)
|
||||
{
|
||||
fill_v2_desc_hw(ring, priv, size, size, dma, frag_end,
|
||||
buf_num, type, mtu);
|
||||
}
|
||||
|
||||
static const struct acpi_device_id hns_enet_acpi_match[] = {
|
||||
{ "HISI00C1", 0 },
|
||||
{ "HISI00C2", 0 },
|
||||
|
@ -289,15 +297,15 @@ static void fill_tso_desc(struct hnae_ring *ring, void *priv,
|
|||
|
||||
/* when the frag size is bigger than hardware, split this frag */
|
||||
for (k = 0; k < frag_buf_num; k++)
|
||||
fill_v2_desc(ring, priv,
|
||||
(k == frag_buf_num - 1) ?
|
||||
fill_v2_desc_hw(ring, priv, k == 0 ? size : 0,
|
||||
(k == frag_buf_num - 1) ?
|
||||
sizeoflast : BD_MAX_SEND_SIZE,
|
||||
dma + BD_MAX_SEND_SIZE * k,
|
||||
frag_end && (k == frag_buf_num - 1) ? 1 : 0,
|
||||
buf_num,
|
||||
(type == DESC_TYPE_SKB && !k) ?
|
||||
dma + BD_MAX_SEND_SIZE * k,
|
||||
frag_end && (k == frag_buf_num - 1) ? 1 : 0,
|
||||
buf_num,
|
||||
(type == DESC_TYPE_SKB && !k) ?
|
||||
DESC_TYPE_SKB : DESC_TYPE_PAGE,
|
||||
mtu);
|
||||
mtu);
|
||||
}
|
||||
|
||||
netdev_tx_t hns_nic_net_xmit_hw(struct net_device *ndev,
|
||||
|
@ -1495,21 +1503,6 @@ static int hns_nic_do_ioctl(struct net_device *netdev, struct ifreq *ifr,
|
|||
return phy_mii_ioctl(phy_dev, ifr, cmd);
|
||||
}
|
||||
|
||||
/* use only for netconsole to poll with the device without interrupt */
|
||||
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||
static void hns_nic_poll_controller(struct net_device *ndev)
|
||||
{
|
||||
struct hns_nic_priv *priv = netdev_priv(ndev);
|
||||
unsigned long flags;
|
||||
int i;
|
||||
|
||||
local_irq_save(flags);
|
||||
for (i = 0; i < priv->ae_handle->q_num * 2; i++)
|
||||
napi_schedule(&priv->ring_data[i].napi);
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
#endif
|
||||
|
||||
static netdev_tx_t hns_nic_net_xmit(struct sk_buff *skb,
|
||||
struct net_device *ndev)
|
||||
{
|
||||
|
@ -1962,9 +1955,6 @@ static const struct net_device_ops hns_nic_netdev_ops = {
|
|||
.ndo_set_features = hns_nic_set_features,
|
||||
.ndo_fix_features = hns_nic_fix_features,
|
||||
.ndo_get_stats64 = hns_nic_get_stats64,
|
||||
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||
.ndo_poll_controller = hns_nic_poll_controller,
|
||||
#endif
|
||||
.ndo_set_rx_mode = hns_nic_set_rx_mode,
|
||||
.ndo_select_queue = hns_nic_select_queue,
|
||||
};
|
||||
|
|
|
@ -789,23 +789,6 @@ static void hinic_get_stats64(struct net_device *netdev,
|
|||
stats->tx_errors = nic_tx_stats->tx_dropped;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||
static void hinic_netpoll(struct net_device *netdev)
|
||||
{
|
||||
struct hinic_dev *nic_dev = netdev_priv(netdev);
|
||||
int i, num_qps;
|
||||
|
||||
num_qps = hinic_hwdev_num_qps(nic_dev->hwdev);
|
||||
for (i = 0; i < num_qps; i++) {
|
||||
struct hinic_txq *txq = &nic_dev->txqs[i];
|
||||
struct hinic_rxq *rxq = &nic_dev->rxqs[i];
|
||||
|
||||
napi_schedule(&txq->napi);
|
||||
napi_schedule(&rxq->napi);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static const struct net_device_ops hinic_netdev_ops = {
|
||||
.ndo_open = hinic_open,
|
||||
.ndo_stop = hinic_close,
|
||||
|
@ -818,9 +801,6 @@ static const struct net_device_ops hinic_netdev_ops = {
|
|||
.ndo_start_xmit = hinic_xmit_frame,
|
||||
.ndo_tx_timeout = hinic_tx_timeout,
|
||||
.ndo_get_stats64 = hinic_get_stats64,
|
||||
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||
.ndo_poll_controller = hinic_netpoll,
|
||||
#endif
|
||||
};
|
||||
|
||||
static void netdev_features_init(struct net_device *netdev)
|
||||
|
|
|
@ -920,17 +920,6 @@ static int ehea_poll(struct napi_struct *napi, int budget)
|
|||
return rx;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||
static void ehea_netpoll(struct net_device *dev)
|
||||
{
|
||||
struct ehea_port *port = netdev_priv(dev);
|
||||
int i;
|
||||
|
||||
for (i = 0; i < port->num_def_qps; i++)
|
||||
napi_schedule(&port->port_res[i].napi);
|
||||
}
|
||||
#endif
|
||||
|
||||
static irqreturn_t ehea_recv_irq_handler(int irq, void *param)
|
||||
{
|
||||
struct ehea_port_res *pr = param;
|
||||
|
@ -2952,9 +2941,6 @@ static const struct net_device_ops ehea_netdev_ops = {
|
|||
.ndo_open = ehea_open,
|
||||
.ndo_stop = ehea_stop,
|
||||
.ndo_start_xmit = ehea_start_xmit,
|
||||
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||
.ndo_poll_controller = ehea_netpoll,
|
||||
#endif
|
||||
.ndo_get_stats64 = ehea_get_stats64,
|
||||
.ndo_set_mac_address = ehea_set_mac_addr,
|
||||
.ndo_validate_addr = eth_validate_addr,
|
||||
|
|
|
@ -2207,19 +2207,6 @@ restart_poll:
|
|||
return frames_processed;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||
static void ibmvnic_netpoll_controller(struct net_device *dev)
|
||||
{
|
||||
struct ibmvnic_adapter *adapter = netdev_priv(dev);
|
||||
int i;
|
||||
|
||||
replenish_pools(netdev_priv(dev));
|
||||
for (i = 0; i < adapter->req_rx_queues; i++)
|
||||
ibmvnic_interrupt_rx(adapter->rx_scrq[i]->irq,
|
||||
adapter->rx_scrq[i]);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int wait_for_reset(struct ibmvnic_adapter *adapter)
|
||||
{
|
||||
int rc, ret;
|
||||
|
@ -2292,9 +2279,6 @@ static const struct net_device_ops ibmvnic_netdev_ops = {
|
|||
.ndo_set_mac_address = ibmvnic_set_mac,
|
||||
.ndo_validate_addr = eth_validate_addr,
|
||||
.ndo_tx_timeout = ibmvnic_tx_timeout,
|
||||
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||
.ndo_poll_controller = ibmvnic_netpoll_controller,
|
||||
#endif
|
||||
.ndo_change_mtu = ibmvnic_change_mtu,
|
||||
.ndo_features_check = ibmvnic_features_check,
|
||||
};
|
||||
|
|
|
@ -3197,11 +3197,13 @@ int ixgbe_poll(struct napi_struct *napi, int budget)
|
|||
return budget;
|
||||
|
||||
/* all work done, exit the polling mode */
|
||||
napi_complete_done(napi, work_done);
|
||||
if (adapter->rx_itr_setting & 1)
|
||||
ixgbe_set_itr(q_vector);
|
||||
if (!test_bit(__IXGBE_DOWN, &adapter->state))
|
||||
ixgbe_irq_enable_queues(adapter, BIT_ULL(q_vector->v_idx));
|
||||
if (likely(napi_complete_done(napi, work_done))) {
|
||||
if (adapter->rx_itr_setting & 1)
|
||||
ixgbe_set_itr(q_vector);
|
||||
if (!test_bit(__IXGBE_DOWN, &adapter->state))
|
||||
ixgbe_irq_enable_queues(adapter,
|
||||
BIT_ULL(q_vector->v_idx));
|
||||
}
|
||||
|
||||
return min(work_done, budget - 1);
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
#include "en_stats.h"
|
||||
#include "en/fs.h"
|
||||
|
||||
extern const struct net_device_ops mlx5e_netdev_ops;
|
||||
struct page_pool;
|
||||
|
||||
#define MLX5E_METADATA_ETHER_TYPE (0x8CE4)
|
||||
|
|
|
@ -16,6 +16,8 @@ struct mlx5e_tc_table {
|
|||
|
||||
DECLARE_HASHTABLE(mod_hdr_tbl, 8);
|
||||
DECLARE_HASHTABLE(hairpin_tbl, 8);
|
||||
|
||||
struct notifier_block netdevice_nb;
|
||||
};
|
||||
|
||||
struct mlx5e_flow_table {
|
||||
|
|
|
@ -4318,7 +4318,7 @@ static int mlx5e_xdp(struct net_device *dev, struct netdev_bpf *xdp)
|
|||
}
|
||||
}
|
||||
|
||||
static const struct net_device_ops mlx5e_netdev_ops = {
|
||||
const struct net_device_ops mlx5e_netdev_ops = {
|
||||
.ndo_open = mlx5e_open,
|
||||
.ndo_stop = mlx5e_close,
|
||||
.ndo_start_xmit = mlx5e_xmit,
|
||||
|
|
|
@ -1368,6 +1368,9 @@ static int __parse_cls_flower(struct mlx5e_priv *priv,
|
|||
|
||||
*match_level = MLX5_MATCH_L2;
|
||||
}
|
||||
} else {
|
||||
MLX5_SET(fte_match_set_lyr_2_4, headers_c, svlan_tag, 1);
|
||||
MLX5_SET(fte_match_set_lyr_2_4, headers_c, cvlan_tag, 1);
|
||||
}
|
||||
|
||||
if (dissector_uses_key(f->dissector, FLOW_DISSECTOR_KEY_CVLAN)) {
|
||||
|
@ -2946,14 +2949,71 @@ int mlx5e_stats_flower(struct mlx5e_priv *priv,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void mlx5e_tc_hairpin_update_dead_peer(struct mlx5e_priv *priv,
|
||||
struct mlx5e_priv *peer_priv)
|
||||
{
|
||||
struct mlx5_core_dev *peer_mdev = peer_priv->mdev;
|
||||
struct mlx5e_hairpin_entry *hpe;
|
||||
u16 peer_vhca_id;
|
||||
int bkt;
|
||||
|
||||
if (!same_hw_devs(priv, peer_priv))
|
||||
return;
|
||||
|
||||
peer_vhca_id = MLX5_CAP_GEN(peer_mdev, vhca_id);
|
||||
|
||||
hash_for_each(priv->fs.tc.hairpin_tbl, bkt, hpe, hairpin_hlist) {
|
||||
if (hpe->peer_vhca_id == peer_vhca_id)
|
||||
hpe->hp->pair->peer_gone = true;
|
||||
}
|
||||
}
|
||||
|
||||
static int mlx5e_tc_netdev_event(struct notifier_block *this,
|
||||
unsigned long event, void *ptr)
|
||||
{
|
||||
struct net_device *ndev = netdev_notifier_info_to_dev(ptr);
|
||||
struct mlx5e_flow_steering *fs;
|
||||
struct mlx5e_priv *peer_priv;
|
||||
struct mlx5e_tc_table *tc;
|
||||
struct mlx5e_priv *priv;
|
||||
|
||||
if (ndev->netdev_ops != &mlx5e_netdev_ops ||
|
||||
event != NETDEV_UNREGISTER ||
|
||||
ndev->reg_state == NETREG_REGISTERED)
|
||||
return NOTIFY_DONE;
|
||||
|
||||
tc = container_of(this, struct mlx5e_tc_table, netdevice_nb);
|
||||
fs = container_of(tc, struct mlx5e_flow_steering, tc);
|
||||
priv = container_of(fs, struct mlx5e_priv, fs);
|
||||
peer_priv = netdev_priv(ndev);
|
||||
if (priv == peer_priv ||
|
||||
!(priv->netdev->features & NETIF_F_HW_TC))
|
||||
return NOTIFY_DONE;
|
||||
|
||||
mlx5e_tc_hairpin_update_dead_peer(priv, peer_priv);
|
||||
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
|
||||
int mlx5e_tc_nic_init(struct mlx5e_priv *priv)
|
||||
{
|
||||
struct mlx5e_tc_table *tc = &priv->fs.tc;
|
||||
int err;
|
||||
|
||||
hash_init(tc->mod_hdr_tbl);
|
||||
hash_init(tc->hairpin_tbl);
|
||||
|
||||
return rhashtable_init(&tc->ht, &tc_ht_params);
|
||||
err = rhashtable_init(&tc->ht, &tc_ht_params);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
tc->netdevice_nb.notifier_call = mlx5e_tc_netdev_event;
|
||||
if (register_netdevice_notifier(&tc->netdevice_nb)) {
|
||||
tc->netdevice_nb.notifier_call = NULL;
|
||||
mlx5_core_warn(priv->mdev, "Failed to register netdev notifier\n");
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
static void _mlx5e_tc_del_flow(void *ptr, void *arg)
|
||||
|
@ -2969,6 +3029,9 @@ void mlx5e_tc_nic_cleanup(struct mlx5e_priv *priv)
|
|||
{
|
||||
struct mlx5e_tc_table *tc = &priv->fs.tc;
|
||||
|
||||
if (tc->netdevice_nb.notifier_call)
|
||||
unregister_netdevice_notifier(&tc->netdevice_nb);
|
||||
|
||||
rhashtable_free_and_destroy(&tc->ht, _mlx5e_tc_del_flow, NULL);
|
||||
|
||||
if (!IS_ERR_OR_NULL(tc->t)) {
|
||||
|
|
|
@ -2000,7 +2000,7 @@ static u32 calculate_vports_min_rate_divider(struct mlx5_eswitch *esw)
|
|||
u32 max_guarantee = 0;
|
||||
int i;
|
||||
|
||||
for (i = 0; i <= esw->total_vports; i++) {
|
||||
for (i = 0; i < esw->total_vports; i++) {
|
||||
evport = &esw->vports[i];
|
||||
if (!evport->enabled || evport->info.min_rate < max_guarantee)
|
||||
continue;
|
||||
|
@ -2020,7 +2020,7 @@ static int normalize_vports_min_rate(struct mlx5_eswitch *esw, u32 divider)
|
|||
int err;
|
||||
int i;
|
||||
|
||||
for (i = 0; i <= esw->total_vports; i++) {
|
||||
for (i = 0; i < esw->total_vports; i++) {
|
||||
evport = &esw->vports[i];
|
||||
if (!evport->enabled)
|
||||
continue;
|
||||
|
|
|
@ -475,7 +475,8 @@ static void mlx5_hairpin_destroy_queues(struct mlx5_hairpin *hp)
|
|||
|
||||
for (i = 0; i < hp->num_channels; i++) {
|
||||
mlx5_core_destroy_rq(hp->func_mdev, hp->rqn[i]);
|
||||
mlx5_core_destroy_sq(hp->peer_mdev, hp->sqn[i]);
|
||||
if (!hp->peer_gone)
|
||||
mlx5_core_destroy_sq(hp->peer_mdev, hp->sqn[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -567,6 +568,8 @@ static void mlx5_hairpin_unpair_queues(struct mlx5_hairpin *hp)
|
|||
MLX5_RQC_STATE_RST, 0, 0);
|
||||
|
||||
/* unset peer SQs */
|
||||
if (hp->peer_gone)
|
||||
return;
|
||||
for (i = 0; i < hp->num_channels; i++)
|
||||
mlx5_hairpin_modify_sq(hp->peer_mdev, hp->sqn[i], MLX5_SQC_STATE_RDY,
|
||||
MLX5_SQC_STATE_RST, 0, 0);
|
||||
|
|
|
@ -2077,14 +2077,17 @@ nfp_ctrl_rx_one(struct nfp_net *nn, struct nfp_net_dp *dp,
|
|||
return true;
|
||||
}
|
||||
|
||||
static void nfp_ctrl_rx(struct nfp_net_r_vector *r_vec)
|
||||
static bool nfp_ctrl_rx(struct nfp_net_r_vector *r_vec)
|
||||
{
|
||||
struct nfp_net_rx_ring *rx_ring = r_vec->rx_ring;
|
||||
struct nfp_net *nn = r_vec->nfp_net;
|
||||
struct nfp_net_dp *dp = &nn->dp;
|
||||
unsigned int budget = 512;
|
||||
|
||||
while (nfp_ctrl_rx_one(nn, dp, r_vec, rx_ring))
|
||||
while (nfp_ctrl_rx_one(nn, dp, r_vec, rx_ring) && budget--)
|
||||
continue;
|
||||
|
||||
return budget;
|
||||
}
|
||||
|
||||
static void nfp_ctrl_poll(unsigned long arg)
|
||||
|
@ -2096,9 +2099,13 @@ static void nfp_ctrl_poll(unsigned long arg)
|
|||
__nfp_ctrl_tx_queued(r_vec);
|
||||
spin_unlock(&r_vec->lock);
|
||||
|
||||
nfp_ctrl_rx(r_vec);
|
||||
|
||||
nfp_net_irq_unmask(r_vec->nfp_net, r_vec->irq_entry);
|
||||
if (nfp_ctrl_rx(r_vec)) {
|
||||
nfp_net_irq_unmask(r_vec->nfp_net, r_vec->irq_entry);
|
||||
} else {
|
||||
tasklet_schedule(&r_vec->tasklet);
|
||||
nn_dp_warn(&r_vec->nfp_net->dp,
|
||||
"control message budget exceeded!\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* Setup and Configuration
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue