mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
Merge 6.1.96 into android14-6.1-lts
Changes in 6.1.96 padata: Disable BH when taking works lock on MT path crypto: hisilicon/sec - Fix memory leak for sec resource release io_uring/sqpoll: work around a potential audit memory leak rcutorture: Fix rcu_torture_one_read() pipe_count overflow comment rcutorture: Make stall-tasks directly exit when rcutorture tests end rcutorture: Fix invalid context warning when enable srcu barrier testing block/ioctl: prefer different overflow check selftests/bpf: Prevent client connect before server bind in test_tc_tunnel.sh selftests/bpf: Fix flaky test btf_map_in_map/lookup_update batman-adv: bypass empty buckets in batadv_purge_orig_ref() wifi: ath9k: work around memset overflow warning af_packet: avoid a false positive warning in packet_setsockopt() drop_monitor: replace spin_lock by raw_spin_lock scsi: qedi: Fix crash while reading debugfs attribute net/sched: fix false lockdep warning on qdisc root lock kselftest: arm64: Add a null pointer check net: dsa: realtek: keep default LED state in rtl8366rb netpoll: Fix race condition in netpoll_owner_active wifi: mt76: mt7921s: fix potential hung tasks during chip recovery HID: Add quirk for Logitech Casa touchpad HID: asus: fix more n-key report descriptors if n-key quirked Bluetooth: ath3k: Fix multiple issues reported by checkpatch.pl drm/amd/display: Exit idle optimizations before HDCP execution platform/x86: toshiba_acpi: Add quirk for buttons on Z830 ASoC: Intel: sof_sdw: add JD2 quirk for HP Omen 14 drm/lima: add mask irq callback to gp and pp drm/lima: mask irqs in timeout path before hard reset ALSA: hda/realtek: Add quirks for Lenovo 13X powerpc/pseries: Enforce hcall result buffer validity and size powerpc/io: Avoid clang null pointer arithmetic warnings platform/x86: p2sb: Don't init until unassigned resources have been assigned power: supply: cros_usbpd: provide ID table for avoiding fallback match iommu/arm-smmu-v3: Free MSIs in case of ENOMEM f2fs: remove clear SB_INLINECRYPT flag in default_options usb: misc: uss720: check for incompatible versions of the Belkin F5U002 Avoid hw_desc array overrun in dw-axi-dmac usb: dwc3: pci: Don't set "linux,phy_charger_detect" property on Lenovo Yoga Tab2 1380 udf: udftime: prevent overflow in udf_disk_stamp_to_time() PCI/PM: Avoid D3cold for HP Pavilion 17 PC/1972 PCIe Ports MIPS: Octeon: Add PCIe link status check serial: imx: Introduce timeout when waiting on transmitter empty serial: exar: adding missing CTI and Exar PCI ids usb: gadget: function: Remove usage of the deprecated ida_simple_xx() API tty: add the option to have a tty reject a new ldisc MIPS: Routerboard 532: Fix vendor retry check code mips: bmips: BCM6358: make sure CBR is correctly set tracing: Build event generation tests only as modules ALSA: hda/realtek: Remove Framework Laptop 16 from quirks ALSA/hda: intel-dsp-config: Document AVS as dsp_driver option ice: move RDMA init to ice_idc.c ice: avoid IRQ collision to fix init failure on ACPI S3 resume cipso: fix total option length computation bpf: Avoid splat in pskb_pull_reason ALSA: hda/realtek: Enable headset mic on IdeaPad 330-17IKB 81DM netrom: Fix a memory leak in nr_heartbeat_expiry() ipv6: prevent possible NULL deref in fib6_nh_init() ipv6: prevent possible NULL dereference in rt6_probe() xfrm6: check ip6_dst_idev() return value in xfrm6_get_saddr() netns: Make get_net_ns() handle zero refcount net qca_spi: Make interrupt remembering atomic net: lan743x: disable WOL upon resume to restore full data path operation net: lan743x: Support WOL at both the PHY and MAC appropriately net: phy: mxl-gpy: enhance delay time required by loopback disable function net: phy: mxl-gpy: Remove interrupt mask clearing from config_init net/sched: act_api: rely on rcu in tcf_idr_check_alloc net/sched: act_api: fix possible infinite loop in tcf_idr_check_alloc() tipc: force a dst refcount before doing decryption sched: act_ct: add netns into the key of tcf_ct_flow_table ptp: fix integer overflow in max_vclocks_store net: stmmac: No need to calculate speed divider when offload is disabled virtio_net: checksum offloading handling fix octeontx2-pf: Add error handling to VLAN unoffload handling netfilter: ipset: Fix suspicious rcu_dereference_protected() seg6: fix parameter passing when calling NF_HOOK() in End.DX4 and End.DX6 behaviors ice: Fix VSI list rule with ICE_SW_LKUP_LAST type bnxt_en: Restore PTP tx_avail count in case of skb_pad() error net: usb: rtl8150 fix unintiatilzed variables in rtl8150_get_link_ksettings regulator: core: Fix modpost error "regulator_get_regmap" undefined dmaengine: idxd: Fix possible Use-After-Free in irq_process_work_list dmaengine: ioat: Drop redundant pci_enable_pcie_error_reporting() dmaengine: ioatdma: Fix leaking on version mismatch dmaengine: ioat: use PCI core macros for PCIe Capability dmaengine: ioatdma: Fix error path in ioat3_dma_probe() dmaengine: ioatdma: Fix kmemleak in ioat_pci_probe() dmaengine: ioatdma: Fix missing kmem_cache_destroy() regulator: bd71815: fix ramp values arm64: dts: imx93-11x11-evk: Remove the 'no-sdio' property arm64: dts: freescale: imx8mm-verdin: enable hysteresis on slow input pin ACPICA: Revert "ACPICA: avoid Info: mapping multiple BARs. Your kernel is fine." firmware: psci: Fix return value from psci_system_suspend() RDMA/mlx5: Add check for srq max_sge attribute kbuild: Remove support for Clang's ThinLTO caching MIPS: dts: bcm63268: Add missing properties to the TWD node net: stmmac: Assign configured channel value to EXTTS event net: usb: ax88179_178a: improve reset check net: do not leave a dangling sk pointer, when socket creation fails btrfs: retry block group reclaim without infinite loop cifs: fix typo in module parameter enable_gcm_256 KVM: Fix a data race on last_boosted_vcpu in kvm_vcpu_on_spin() KVM: arm64: Disassociate vcpus from redistributor region on teardown KVM: x86: Always sync PIR to IRR prior to scanning I/O APIC routes ALSA: hda/realtek: fix mute/micmute LEDs don't work for ProBook 445/465 G11. ALSA: hda/realtek: Limit mic boost on N14AP7 drm/i915/mso: using joiner is not possible with eDP MSO drm/radeon: fix UBSAN warning in kv_dpm.c drm/amdgpu: fix UBSAN warning in kv_dpm.c gcov: add support for GCC 14 kcov: don't lose track of remote references during softirqs mm: mmap: allow for the maximum number of bits for randomizing mmap_base by default tcp: clear tp->retrans_stamp in tcp_rcv_fastopen_synack() mm/page_table_check: fix crash on ZONE_DEVICE i2c: ocores: set IACK bit after core is enabled dt-bindings: i2c: google,cros-ec-i2c-tunnel: correct path to i2c-controller schema spi: stm32: qspi: Fix dual flash mode sanity test in stm32_qspi_setup() arm64: dts: imx8qm-mek: fix gpio number for reg_usdhc2_vmmc spi: stm32: qspi: Clamp stm32_qspi_get_mode() output to CCR_BUSWIDTH_4 perf: script: add raw|disasm arguments to --insn-trace option perf script: Show also errors for --insn-trace option ARM: dts: samsung: smdkv310: fix keypad no-autorepeat ARM: dts: samsung: exynos4412-origen: fix keypad no-autorepeat ARM: dts: samsung: smdk4412: fix keypad no-autorepeat pmdomain: ti-sci: Fix duplicate PD referrals tracing: Add MODULE_DESCRIPTION() to preemptirq_delay_test x86/cpu/vfm: Add new macros to work with (vendor/family/model) values x86/cpu: Fix x86_match_cpu() to match just X86_VENDOR_INTEL Revert "kheaders: substituting --sort in archive creation" kheaders: explicitly define file modes for archived headers drm/amd/display: revert Exit idle optimizations before HDCP execution net/sched: unregister lockdep keys in qdisc_create/qdisc_alloc error path hid: asus: asus_report_fixup: fix potential read out of bounds Revert "mm: mmap: allow for the maximum number of bits for randomizing mmap_base by default" Linux 6.1.96 Change-Id: I55dfcaa259f72fd6c57ec6efca60bed3e3abbd43 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -21,7 +21,7 @@ description: |
|
||||
google,cros-ec-spi or google,cros-ec-i2c.
|
||||
|
||||
allOf:
|
||||
- $ref: i2c-controller.yaml#
|
||||
- $ref: /schemas/i2c/i2c-controller.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
|
||||
7
Makefile
7
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 6
|
||||
PATCHLEVEL = 1
|
||||
SUBLEVEL = 95
|
||||
SUBLEVEL = 96
|
||||
EXTRAVERSION =
|
||||
NAME = Curry Ramen
|
||||
|
||||
@@ -1002,7 +1002,6 @@ endif
|
||||
ifdef CONFIG_LTO_CLANG
|
||||
ifdef CONFIG_LTO_CLANG_THIN
|
||||
CC_FLAGS_LTO := -flto=thin -fsplit-lto-unit
|
||||
KBUILD_LDFLAGS += --thinlto-cache-dir=$(extmod_prefix).thinlto-cache
|
||||
else
|
||||
CC_FLAGS_LTO := -flto
|
||||
endif
|
||||
@@ -1629,7 +1628,7 @@ endif # CONFIG_MODULES
|
||||
# Directories & files removed with 'make clean'
|
||||
CLEAN_FILES += include/ksym vmlinux.symvers modules-only.symvers \
|
||||
modules.builtin modules.builtin.modinfo modules.nsdeps \
|
||||
compile_commands.json .thinlto-cache rust/test rust/doc \
|
||||
compile_commands.json rust/test rust/doc \
|
||||
.vmlinux.objs .vmlinux.export.c
|
||||
|
||||
# Directories & files removed with 'make mrproper'
|
||||
@@ -1925,7 +1924,7 @@ PHONY += compile_commands.json
|
||||
|
||||
clean-dirs := $(KBUILD_EXTMOD)
|
||||
clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers $(KBUILD_EXTMOD)/modules.nsdeps \
|
||||
$(KBUILD_EXTMOD)/compile_commands.json $(KBUILD_EXTMOD)/.thinlto-cache
|
||||
$(KBUILD_EXTMOD)/compile_commands.json
|
||||
|
||||
PHONY += prepare
|
||||
# now expand this into a simple variable to reduce the cost of shell evaluations
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
&keypad {
|
||||
samsung,keypad-num-rows = <2>;
|
||||
samsung,keypad-num-columns = <8>;
|
||||
linux,keypad-no-autorepeat;
|
||||
linux,input-no-autorepeat;
|
||||
wakeup-source;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&keypad_rows &keypad_cols>;
|
||||
|
||||
@@ -448,7 +448,7 @@
|
||||
&keypad {
|
||||
samsung,keypad-num-rows = <3>;
|
||||
samsung,keypad-num-columns = <2>;
|
||||
linux,keypad-no-autorepeat;
|
||||
linux,input-no-autorepeat;
|
||||
wakeup-source;
|
||||
pinctrl-0 = <&keypad_rows &keypad_cols>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
&keypad {
|
||||
samsung,keypad-num-rows = <3>;
|
||||
samsung,keypad-num-columns = <8>;
|
||||
linux,keypad-no-autorepeat;
|
||||
linux,input-no-autorepeat;
|
||||
wakeup-source;
|
||||
pinctrl-0 = <&keypad_rows &keypad_cols>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
@@ -930,7 +930,7 @@
|
||||
/* Verdin GPIO_9_DSI (pulled-up as active-low) */
|
||||
pinctrl_gpio_9_dsi: gpio9dsigrp {
|
||||
fsl,pins =
|
||||
<MX8MM_IOMUXC_NAND_RE_B_GPIO3_IO15 0x146>; /* SODIMM 17 */
|
||||
<MX8MM_IOMUXC_NAND_RE_B_GPIO3_IO15 0x1c6>; /* SODIMM 17 */
|
||||
};
|
||||
|
||||
/* Verdin GPIO_10_DSI (pulled-up as active-low) */
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
regulator-name = "SD1_SPWR";
|
||||
regulator-min-microvolt = <3000000>;
|
||||
regulator-max-microvolt = <3000000>;
|
||||
gpio = <&lsio_gpio4 19 GPIO_ACTIVE_HIGH>;
|
||||
gpio = <&lsio_gpio4 7 GPIO_ACTIVE_HIGH>;
|
||||
enable-active-high;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -60,7 +60,6 @@
|
||||
vmmc-supply = <®_usdhc2_vmmc>;
|
||||
bus-width = <4>;
|
||||
status = "okay";
|
||||
no-sdio;
|
||||
no-mmc;
|
||||
};
|
||||
|
||||
|
||||
@@ -355,7 +355,7 @@ static void kvm_vgic_dist_destroy(struct kvm *kvm)
|
||||
|
||||
if (dist->vgic_model == KVM_DEV_TYPE_ARM_VGIC_V3) {
|
||||
list_for_each_entry_safe(rdreg, next, &dist->rd_regions, list)
|
||||
vgic_v3_free_redist_region(rdreg);
|
||||
vgic_v3_free_redist_region(kvm, rdreg);
|
||||
INIT_LIST_HEAD(&dist->rd_regions);
|
||||
} else {
|
||||
dist->vgic_cpu_base = VGIC_ADDR_UNDEF;
|
||||
|
||||
@@ -942,8 +942,19 @@ free:
|
||||
return ret;
|
||||
}
|
||||
|
||||
void vgic_v3_free_redist_region(struct vgic_redist_region *rdreg)
|
||||
void vgic_v3_free_redist_region(struct kvm *kvm, struct vgic_redist_region *rdreg)
|
||||
{
|
||||
struct kvm_vcpu *vcpu;
|
||||
unsigned long c;
|
||||
|
||||
lockdep_assert_held(&kvm->arch.config_lock);
|
||||
|
||||
/* Garbage collect the region */
|
||||
kvm_for_each_vcpu(c, vcpu, kvm) {
|
||||
if (vcpu->arch.vgic_cpu.rdreg == rdreg)
|
||||
vcpu->arch.vgic_cpu.rdreg = NULL;
|
||||
}
|
||||
|
||||
list_del(&rdreg->list);
|
||||
kfree(rdreg);
|
||||
}
|
||||
@@ -968,7 +979,7 @@ int vgic_v3_set_redist_base(struct kvm *kvm, u32 index, u64 addr, u32 count)
|
||||
|
||||
mutex_lock(&kvm->arch.config_lock);
|
||||
rdreg = vgic_v3_rdist_region_from_index(kvm, index);
|
||||
vgic_v3_free_redist_region(rdreg);
|
||||
vgic_v3_free_redist_region(kvm, rdreg);
|
||||
mutex_unlock(&kvm->arch.config_lock);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -310,7 +310,7 @@ vgic_v3_rd_region_size(struct kvm *kvm, struct vgic_redist_region *rdreg)
|
||||
|
||||
struct vgic_redist_region *vgic_v3_rdist_region_from_index(struct kvm *kvm,
|
||||
u32 index);
|
||||
void vgic_v3_free_redist_region(struct vgic_redist_region *rdreg);
|
||||
void vgic_v3_free_redist_region(struct kvm *kvm, struct vgic_redist_region *rdreg);
|
||||
|
||||
bool vgic_v3_rdist_overlap(struct kvm *kvm, gpa_t base, size_t size);
|
||||
|
||||
|
||||
@@ -111,7 +111,8 @@ static void bcm6358_quirks(void)
|
||||
* RAC flush causes kernel panics on BCM6358 when booting from TP1
|
||||
* because the bootloader is not initializing it properly.
|
||||
*/
|
||||
bmips_rac_flush_disable = !!(read_c0_brcm_cmt_local() & (1 << 31));
|
||||
bmips_rac_flush_disable = !!(read_c0_brcm_cmt_local() & (1 << 31)) ||
|
||||
!!BMIPS_GET_CBR();
|
||||
}
|
||||
|
||||
static void bcm6368_quirks(void)
|
||||
|
||||
@@ -109,6 +109,8 @@
|
||||
compatible = "brcm,bcm7038-twd", "simple-mfd", "syscon";
|
||||
reg = <0x10000080 0x30>;
|
||||
ranges = <0x0 0x10000080 0x30>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
wdt: watchdog@1c {
|
||||
compatible = "brcm,bcm7038-wdt";
|
||||
|
||||
@@ -112,8 +112,8 @@ retry:
|
||||
* gives them time to settle
|
||||
*/
|
||||
if (where == PCI_VENDOR_ID) {
|
||||
if (ret == 0xffffffff || ret == 0x00000000 ||
|
||||
ret == 0x0000ffff || ret == 0xffff0000) {
|
||||
if (*val == 0xffffffff || *val == 0x00000000 ||
|
||||
*val == 0x0000ffff || *val == 0xffff0000) {
|
||||
if (delay > 4)
|
||||
return 0;
|
||||
delay *= 2;
|
||||
|
||||
6
arch/mips/pci/pcie-octeon.c
Normal file → Executable file
6
arch/mips/pci/pcie-octeon.c
Normal file → Executable file
@@ -230,12 +230,18 @@ static inline uint64_t __cvmx_pcie_build_config_addr(int pcie_port, int bus,
|
||||
{
|
||||
union cvmx_pcie_address pcie_addr;
|
||||
union cvmx_pciercx_cfg006 pciercx_cfg006;
|
||||
union cvmx_pciercx_cfg032 pciercx_cfg032;
|
||||
|
||||
pciercx_cfg006.u32 =
|
||||
cvmx_pcie_cfgx_read(pcie_port, CVMX_PCIERCX_CFG006(pcie_port));
|
||||
if ((bus <= pciercx_cfg006.s.pbnum) && (dev != 0))
|
||||
return 0;
|
||||
|
||||
pciercx_cfg032.u32 =
|
||||
cvmx_pcie_cfgx_read(pcie_port, CVMX_PCIERCX_CFG032(pcie_port));
|
||||
if ((pciercx_cfg032.s.dlla == 0) || (pciercx_cfg032.s.lt == 1))
|
||||
return 0;
|
||||
|
||||
pcie_addr.u64 = 0;
|
||||
pcie_addr.config.upper = 2;
|
||||
pcie_addr.config.io = 1;
|
||||
|
||||
@@ -493,7 +493,7 @@ long plpar_hcall_norets_notrace(unsigned long opcode, ...);
|
||||
* Used for all but the craziest of phyp interfaces (see plpar_hcall9)
|
||||
*/
|
||||
#define PLPAR_HCALL_BUFSIZE 4
|
||||
long plpar_hcall(unsigned long opcode, unsigned long *retbuf, ...);
|
||||
long plpar_hcall(unsigned long opcode, unsigned long retbuf[static PLPAR_HCALL_BUFSIZE], ...);
|
||||
|
||||
/**
|
||||
* plpar_hcall_raw: - Make a hypervisor call without calculating hcall stats
|
||||
@@ -507,7 +507,7 @@ long plpar_hcall(unsigned long opcode, unsigned long *retbuf, ...);
|
||||
* plpar_hcall, but plpar_hcall_raw works in real mode and does not
|
||||
* calculate hypervisor call statistics.
|
||||
*/
|
||||
long plpar_hcall_raw(unsigned long opcode, unsigned long *retbuf, ...);
|
||||
long plpar_hcall_raw(unsigned long opcode, unsigned long retbuf[static PLPAR_HCALL_BUFSIZE], ...);
|
||||
|
||||
/**
|
||||
* plpar_hcall9: - Make a pseries hypervisor call with up to 9 return arguments
|
||||
@@ -518,8 +518,8 @@ long plpar_hcall_raw(unsigned long opcode, unsigned long *retbuf, ...);
|
||||
* PLPAR_HCALL9_BUFSIZE to size the return argument buffer.
|
||||
*/
|
||||
#define PLPAR_HCALL9_BUFSIZE 9
|
||||
long plpar_hcall9(unsigned long opcode, unsigned long *retbuf, ...);
|
||||
long plpar_hcall9_raw(unsigned long opcode, unsigned long *retbuf, ...);
|
||||
long plpar_hcall9(unsigned long opcode, unsigned long retbuf[static PLPAR_HCALL9_BUFSIZE], ...);
|
||||
long plpar_hcall9_raw(unsigned long opcode, unsigned long retbuf[static PLPAR_HCALL9_BUFSIZE], ...);
|
||||
|
||||
/* pseries hcall tracing */
|
||||
extern struct static_key hcall_tracepoint_key;
|
||||
|
||||
@@ -553,12 +553,12 @@ __do_out_asm(_rec_outl, "stwbrx")
|
||||
#define __do_inw(port) _rec_inw(port)
|
||||
#define __do_inl(port) _rec_inl(port)
|
||||
#else /* CONFIG_PPC32 */
|
||||
#define __do_outb(val, port) writeb(val,(PCI_IO_ADDR)_IO_BASE+port);
|
||||
#define __do_outw(val, port) writew(val,(PCI_IO_ADDR)_IO_BASE+port);
|
||||
#define __do_outl(val, port) writel(val,(PCI_IO_ADDR)_IO_BASE+port);
|
||||
#define __do_inb(port) readb((PCI_IO_ADDR)_IO_BASE + port);
|
||||
#define __do_inw(port) readw((PCI_IO_ADDR)_IO_BASE + port);
|
||||
#define __do_inl(port) readl((PCI_IO_ADDR)_IO_BASE + port);
|
||||
#define __do_outb(val, port) writeb(val,(PCI_IO_ADDR)(_IO_BASE+port));
|
||||
#define __do_outw(val, port) writew(val,(PCI_IO_ADDR)(_IO_BASE+port));
|
||||
#define __do_outl(val, port) writel(val,(PCI_IO_ADDR)(_IO_BASE+port));
|
||||
#define __do_inb(port) readb((PCI_IO_ADDR)(_IO_BASE + port));
|
||||
#define __do_inw(port) readw((PCI_IO_ADDR)(_IO_BASE + port));
|
||||
#define __do_inl(port) readl((PCI_IO_ADDR)(_IO_BASE + port));
|
||||
#endif /* !CONFIG_PPC32 */
|
||||
|
||||
#ifdef CONFIG_EEH
|
||||
@@ -574,12 +574,12 @@ __do_out_asm(_rec_outl, "stwbrx")
|
||||
#define __do_writesw(a, b, n) _outsw(PCI_FIX_ADDR(a),(b),(n))
|
||||
#define __do_writesl(a, b, n) _outsl(PCI_FIX_ADDR(a),(b),(n))
|
||||
|
||||
#define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
|
||||
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
|
||||
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
|
||||
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
|
||||
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
|
||||
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
|
||||
#define __do_insb(p, b, n) readsb((PCI_IO_ADDR)(_IO_BASE+(p)), (b), (n))
|
||||
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)(_IO_BASE+(p)), (b), (n))
|
||||
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)(_IO_BASE+(p)), (b), (n))
|
||||
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)(_IO_BASE+(p)),(b),(n))
|
||||
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)(_IO_BASE+(p)),(b),(n))
|
||||
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)(_IO_BASE+(p)),(b),(n))
|
||||
|
||||
#define __do_memset_io(addr, c, n) \
|
||||
_memset_io(PCI_FIX_ADDR(addr), c, n)
|
||||
|
||||
@@ -2,6 +2,39 @@
|
||||
#ifndef _ASM_X86_CPU_DEVICE_ID
|
||||
#define _ASM_X86_CPU_DEVICE_ID
|
||||
|
||||
/*
|
||||
* Can't use <linux/bitfield.h> because it generates expressions that
|
||||
* cannot be used in structure initializers. Bitfield construction
|
||||
* here must match the union in struct cpuinfo_86:
|
||||
* union {
|
||||
* struct {
|
||||
* __u8 x86_model;
|
||||
* __u8 x86;
|
||||
* __u8 x86_vendor;
|
||||
* __u8 x86_reserved;
|
||||
* };
|
||||
* __u32 x86_vfm;
|
||||
* };
|
||||
*/
|
||||
#define VFM_MODEL_BIT 0
|
||||
#define VFM_FAMILY_BIT 8
|
||||
#define VFM_VENDOR_BIT 16
|
||||
#define VFM_RSVD_BIT 24
|
||||
|
||||
#define VFM_MODEL_MASK GENMASK(VFM_FAMILY_BIT - 1, VFM_MODEL_BIT)
|
||||
#define VFM_FAMILY_MASK GENMASK(VFM_VENDOR_BIT - 1, VFM_FAMILY_BIT)
|
||||
#define VFM_VENDOR_MASK GENMASK(VFM_RSVD_BIT - 1, VFM_VENDOR_BIT)
|
||||
|
||||
#define VFM_MODEL(vfm) (((vfm) & VFM_MODEL_MASK) >> VFM_MODEL_BIT)
|
||||
#define VFM_FAMILY(vfm) (((vfm) & VFM_FAMILY_MASK) >> VFM_FAMILY_BIT)
|
||||
#define VFM_VENDOR(vfm) (((vfm) & VFM_VENDOR_MASK) >> VFM_VENDOR_BIT)
|
||||
|
||||
#define VFM_MAKE(_vendor, _family, _model) ( \
|
||||
((_model) << VFM_MODEL_BIT) | \
|
||||
((_family) << VFM_FAMILY_BIT) | \
|
||||
((_vendor) << VFM_VENDOR_BIT) \
|
||||
)
|
||||
|
||||
/*
|
||||
* Declare drivers belonging to specific x86 CPUs
|
||||
* Similar in spirit to pci_device_id and related PCI functions
|
||||
@@ -20,6 +53,9 @@
|
||||
#define X86_CENTAUR_FAM6_C7_D 0xd
|
||||
#define X86_CENTAUR_FAM6_NANO 0xf
|
||||
|
||||
/* x86_cpu_id::flags */
|
||||
#define X86_CPU_ID_FLAG_ENTRY_VALID BIT(0)
|
||||
|
||||
#define X86_STEPPINGS(mins, maxs) GENMASK(maxs, mins)
|
||||
/**
|
||||
* X86_MATCH_VENDOR_FAM_MODEL_STEPPINGS_FEATURE - Base macro for CPU matching
|
||||
@@ -46,6 +82,18 @@
|
||||
.model = _model, \
|
||||
.steppings = _steppings, \
|
||||
.feature = _feature, \
|
||||
.flags = X86_CPU_ID_FLAG_ENTRY_VALID, \
|
||||
.driver_data = (unsigned long) _data \
|
||||
}
|
||||
|
||||
#define X86_MATCH_VENDORID_FAM_MODEL_STEPPINGS_FEATURE(_vendor, _family, _model, \
|
||||
_steppings, _feature, _data) { \
|
||||
.vendor = _vendor, \
|
||||
.family = _family, \
|
||||
.model = _model, \
|
||||
.steppings = _steppings, \
|
||||
.feature = _feature, \
|
||||
.flags = X86_CPU_ID_FLAG_ENTRY_VALID, \
|
||||
.driver_data = (unsigned long) _data \
|
||||
}
|
||||
|
||||
@@ -164,6 +212,56 @@
|
||||
X86_MATCH_VENDOR_FAM_MODEL_STEPPINGS_FEATURE(INTEL, 6, INTEL_FAM6_##model, \
|
||||
steppings, X86_FEATURE_ANY, data)
|
||||
|
||||
/**
|
||||
* X86_MATCH_VFM - Match encoded vendor/family/model
|
||||
* @vfm: Encoded 8-bits each for vendor, family, model
|
||||
* @data: Driver specific data or NULL. The internal storage
|
||||
* format is unsigned long. The supplied value, pointer
|
||||
* etc. is cast to unsigned long internally.
|
||||
*
|
||||
* Stepping and feature are set to wildcards
|
||||
*/
|
||||
#define X86_MATCH_VFM(vfm, data) \
|
||||
X86_MATCH_VENDORID_FAM_MODEL_STEPPINGS_FEATURE( \
|
||||
VFM_VENDOR(vfm), \
|
||||
VFM_FAMILY(vfm), \
|
||||
VFM_MODEL(vfm), \
|
||||
X86_STEPPING_ANY, X86_FEATURE_ANY, data)
|
||||
|
||||
/**
|
||||
* X86_MATCH_VFM_STEPPINGS - Match encoded vendor/family/model/stepping
|
||||
* @vfm: Encoded 8-bits each for vendor, family, model
|
||||
* @steppings: Bitmask of steppings to match
|
||||
* @data: Driver specific data or NULL. The internal storage
|
||||
* format is unsigned long. The supplied value, pointer
|
||||
* etc. is cast to unsigned long internally.
|
||||
*
|
||||
* feature is set to wildcard
|
||||
*/
|
||||
#define X86_MATCH_VFM_STEPPINGS(vfm, steppings, data) \
|
||||
X86_MATCH_VENDORID_FAM_MODEL_STEPPINGS_FEATURE( \
|
||||
VFM_VENDOR(vfm), \
|
||||
VFM_FAMILY(vfm), \
|
||||
VFM_MODEL(vfm), \
|
||||
steppings, X86_FEATURE_ANY, data)
|
||||
|
||||
/**
|
||||
* X86_MATCH_VFM_FEATURE - Match encoded vendor/family/model/feature
|
||||
* @vfm: Encoded 8-bits each for vendor, family, model
|
||||
* @feature: A X86_FEATURE bit
|
||||
* @data: Driver specific data or NULL. The internal storage
|
||||
* format is unsigned long. The supplied value, pointer
|
||||
* etc. is cast to unsigned long internally.
|
||||
*
|
||||
* Steppings is set to wildcard
|
||||
*/
|
||||
#define X86_MATCH_VFM_FEATURE(vfm, feature, data) \
|
||||
X86_MATCH_VENDORID_FAM_MODEL_STEPPINGS_FEATURE( \
|
||||
VFM_VENDOR(vfm), \
|
||||
VFM_FAMILY(vfm), \
|
||||
VFM_MODEL(vfm), \
|
||||
X86_STEPPING_ANY, feature, data)
|
||||
|
||||
/*
|
||||
* Match specific microcode revisions.
|
||||
*
|
||||
|
||||
@@ -39,9 +39,7 @@ const struct x86_cpu_id *x86_match_cpu(const struct x86_cpu_id *match)
|
||||
const struct x86_cpu_id *m;
|
||||
struct cpuinfo_x86 *c = &boot_cpu_data;
|
||||
|
||||
for (m = match;
|
||||
m->vendor | m->family | m->model | m->steppings | m->feature;
|
||||
m++) {
|
||||
for (m = match; m->flags & X86_CPU_ID_FLAG_ENTRY_VALID; m++) {
|
||||
if (m->vendor != X86_VENDOR_ANY && c->x86_vendor != m->vendor)
|
||||
continue;
|
||||
if (m->family != X86_FAMILY_ANY && c->x86 != m->family)
|
||||
|
||||
@@ -10523,13 +10523,12 @@ static void vcpu_scan_ioapic(struct kvm_vcpu *vcpu)
|
||||
|
||||
bitmap_zero(vcpu->arch.ioapic_handled_vectors, 256);
|
||||
|
||||
static_call_cond(kvm_x86_sync_pir_to_irr)(vcpu);
|
||||
|
||||
if (irqchip_split(vcpu->kvm))
|
||||
kvm_scan_ioapic_routes(vcpu, vcpu->arch.ioapic_handled_vectors);
|
||||
else {
|
||||
static_call_cond(kvm_x86_sync_pir_to_irr)(vcpu);
|
||||
if (ioapic_in_kernel(vcpu->kvm))
|
||||
kvm_ioapic_scan_entry(vcpu, vcpu->arch.ioapic_handled_vectors);
|
||||
}
|
||||
else if (ioapic_in_kernel(vcpu->kvm))
|
||||
kvm_ioapic_scan_entry(vcpu, vcpu->arch.ioapic_handled_vectors);
|
||||
|
||||
if (is_guest_mode(vcpu))
|
||||
vcpu->arch.load_eoi_exitmap_pending = true;
|
||||
|
||||
@@ -33,7 +33,7 @@ static int blkpg_do_ioctl(struct block_device *bdev,
|
||||
if (op == BLKPG_DEL_PARTITION)
|
||||
return bdev_del_partition(disk, p.pno);
|
||||
|
||||
if (p.start < 0 || p.length <= 0 || p.start + p.length < 0)
|
||||
if (p.start < 0 || p.length <= 0 || LLONG_MAX - p.length < p.start)
|
||||
return -EINVAL;
|
||||
/* Check that the partition is aligned to the block size */
|
||||
if (!IS_ALIGNED(p.start | p.length, bdev_logical_block_size(bdev)))
|
||||
|
||||
@@ -44,7 +44,6 @@ acpi_ex_system_memory_space_handler(u32 function,
|
||||
struct acpi_mem_mapping *mm = mem_info->cur_mm;
|
||||
u32 length;
|
||||
acpi_size map_length;
|
||||
acpi_size page_boundary_map_length;
|
||||
#ifdef ACPI_MISALIGNMENT_NOT_SUPPORTED
|
||||
u32 remainder;
|
||||
#endif
|
||||
@@ -138,26 +137,8 @@ acpi_ex_system_memory_space_handler(u32 function,
|
||||
map_length = (acpi_size)
|
||||
((mem_info->address + mem_info->length) - address);
|
||||
|
||||
/*
|
||||
* If mapping the entire remaining portion of the region will cross
|
||||
* a page boundary, just map up to the page boundary, do not cross.
|
||||
* On some systems, crossing a page boundary while mapping regions
|
||||
* can cause warnings if the pages have different attributes
|
||||
* due to resource management.
|
||||
*
|
||||
* This has the added benefit of constraining a single mapping to
|
||||
* one page, which is similar to the original code that used a 4k
|
||||
* maximum window.
|
||||
*/
|
||||
page_boundary_map_length = (acpi_size)
|
||||
(ACPI_ROUND_UP(address, ACPI_DEFAULT_PAGE_SIZE) - address);
|
||||
if (page_boundary_map_length == 0) {
|
||||
page_boundary_map_length = ACPI_DEFAULT_PAGE_SIZE;
|
||||
}
|
||||
|
||||
if (map_length > page_boundary_map_length) {
|
||||
map_length = page_boundary_map_length;
|
||||
}
|
||||
if (map_length > ACPI_DEFAULT_PAGE_SIZE)
|
||||
map_length = ACPI_DEFAULT_PAGE_SIZE;
|
||||
|
||||
/* Create a new mapping starting at the address given */
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
* Copyright (c) 2008-2009 Atheros Communications Inc.
|
||||
*/
|
||||
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
@@ -128,7 +127,6 @@ MODULE_DEVICE_TABLE(usb, ath3k_table);
|
||||
* for AR3012
|
||||
*/
|
||||
static const struct usb_device_id ath3k_blist_tbl[] = {
|
||||
|
||||
/* Atheros AR3012 with sflash firmware*/
|
||||
{ USB_DEVICE(0x0489, 0xe04e), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x0489, 0xe04d), .driver_info = BTUSB_ATH3012 },
|
||||
@@ -202,7 +200,7 @@ static inline void ath3k_log_failed_loading(int err, int len, int size,
|
||||
#define TIMEGAP_USEC_MAX 100
|
||||
|
||||
static int ath3k_load_firmware(struct usb_device *udev,
|
||||
const struct firmware *firmware)
|
||||
const struct firmware *firmware)
|
||||
{
|
||||
u8 *send_buf;
|
||||
int len = 0;
|
||||
@@ -237,9 +235,9 @@ static int ath3k_load_firmware(struct usb_device *udev,
|
||||
memcpy(send_buf, firmware->data + sent, size);
|
||||
|
||||
err = usb_bulk_msg(udev, pipe, send_buf, size,
|
||||
&len, 3000);
|
||||
&len, 3000);
|
||||
|
||||
if (err || (len != size)) {
|
||||
if (err || len != size) {
|
||||
ath3k_log_failed_loading(err, len, size, count);
|
||||
goto error;
|
||||
}
|
||||
@@ -262,7 +260,7 @@ static int ath3k_get_state(struct usb_device *udev, unsigned char *state)
|
||||
}
|
||||
|
||||
static int ath3k_get_version(struct usb_device *udev,
|
||||
struct ath3k_version *version)
|
||||
struct ath3k_version *version)
|
||||
{
|
||||
return usb_control_msg_recv(udev, 0, ATH3K_GETVERSION,
|
||||
USB_TYPE_VENDOR | USB_DIR_IN, 0, 0,
|
||||
@@ -271,7 +269,7 @@ static int ath3k_get_version(struct usb_device *udev,
|
||||
}
|
||||
|
||||
static int ath3k_load_fwfile(struct usb_device *udev,
|
||||
const struct firmware *firmware)
|
||||
const struct firmware *firmware)
|
||||
{
|
||||
u8 *send_buf;
|
||||
int len = 0;
|
||||
@@ -310,8 +308,8 @@ static int ath3k_load_fwfile(struct usb_device *udev,
|
||||
memcpy(send_buf, firmware->data + sent, size);
|
||||
|
||||
err = usb_bulk_msg(udev, pipe, send_buf, size,
|
||||
&len, 3000);
|
||||
if (err || (len != size)) {
|
||||
&len, 3000);
|
||||
if (err || len != size) {
|
||||
ath3k_log_failed_loading(err, len, size, count);
|
||||
kfree(send_buf);
|
||||
return err;
|
||||
@@ -425,7 +423,6 @@ static int ath3k_load_syscfg(struct usb_device *udev)
|
||||
}
|
||||
|
||||
switch (fw_version.ref_clock) {
|
||||
|
||||
case ATH3K_XTAL_FREQ_26M:
|
||||
clk_value = 26;
|
||||
break;
|
||||
@@ -441,7 +438,7 @@ static int ath3k_load_syscfg(struct usb_device *udev)
|
||||
}
|
||||
|
||||
snprintf(filename, ATH3K_NAME_LEN, "ar3k/ramps_0x%08x_%d%s",
|
||||
le32_to_cpu(fw_version.rom_version), clk_value, ".dfu");
|
||||
le32_to_cpu(fw_version.rom_version), clk_value, ".dfu");
|
||||
|
||||
ret = request_firmware(&firmware, filename, &udev->dev);
|
||||
if (ret < 0) {
|
||||
@@ -456,7 +453,7 @@ static int ath3k_load_syscfg(struct usb_device *udev)
|
||||
}
|
||||
|
||||
static int ath3k_probe(struct usb_interface *intf,
|
||||
const struct usb_device_id *id)
|
||||
const struct usb_device_id *id)
|
||||
{
|
||||
const struct firmware *firmware;
|
||||
struct usb_device *udev = interface_to_usbdev(intf);
|
||||
@@ -505,10 +502,10 @@ static int ath3k_probe(struct usb_interface *intf,
|
||||
if (ret < 0) {
|
||||
if (ret == -ENOENT)
|
||||
BT_ERR("Firmware file \"%s\" not found",
|
||||
ATH3K_FIRMWARE);
|
||||
ATH3K_FIRMWARE);
|
||||
else
|
||||
BT_ERR("Firmware file \"%s\" request failed (err=%d)",
|
||||
ATH3K_FIRMWARE, ret);
|
||||
ATH3K_FIRMWARE, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -479,8 +479,10 @@ static void sec_alg_resource_free(struct sec_ctx *ctx,
|
||||
|
||||
if (ctx->pbuf_supported)
|
||||
sec_free_pbuf_resource(dev, qp_ctx->res);
|
||||
if (ctx->alg_type == SEC_AEAD)
|
||||
if (ctx->alg_type == SEC_AEAD) {
|
||||
sec_free_mac_resource(dev, qp_ctx->res);
|
||||
sec_free_aiv_resource(dev, qp_ctx->res);
|
||||
}
|
||||
}
|
||||
|
||||
static int sec_alloc_qp_ctx_resource(struct hisi_qm *qm, struct sec_ctx *ctx,
|
||||
|
||||
@@ -250,6 +250,7 @@ static struct axi_dma_desc *axi_desc_alloc(u32 num)
|
||||
kfree(desc);
|
||||
return NULL;
|
||||
}
|
||||
desc->nr_hw_descs = num;
|
||||
|
||||
return desc;
|
||||
}
|
||||
@@ -276,7 +277,7 @@ static struct axi_dma_lli *axi_desc_get(struct axi_dma_chan *chan,
|
||||
static void axi_desc_put(struct axi_dma_desc *desc)
|
||||
{
|
||||
struct axi_dma_chan *chan = desc->chan;
|
||||
int count = atomic_read(&chan->descs_allocated);
|
||||
int count = desc->nr_hw_descs;
|
||||
struct axi_dma_hw_desc *hw_desc;
|
||||
int descs_put;
|
||||
|
||||
@@ -1087,9 +1088,6 @@ static void axi_chan_block_xfer_complete(struct axi_dma_chan *chan)
|
||||
/* Remove the completed descriptor from issued list before completing */
|
||||
list_del(&vd->node);
|
||||
vchan_cookie_complete(vd);
|
||||
|
||||
/* Submit queued descriptors after processing the completed ones */
|
||||
axi_chan_start_first_queued(chan);
|
||||
}
|
||||
|
||||
out:
|
||||
|
||||
@@ -103,6 +103,7 @@ struct axi_dma_desc {
|
||||
u32 completed_blocks;
|
||||
u32 length;
|
||||
u32 period_len;
|
||||
u32 nr_hw_descs;
|
||||
};
|
||||
|
||||
struct axi_dma_chan_config {
|
||||
|
||||
@@ -454,11 +454,13 @@ static void irq_process_work_list(struct idxd_irq_entry *irq_entry)
|
||||
|
||||
spin_unlock(&irq_entry->list_lock);
|
||||
|
||||
list_for_each_entry(desc, &flist, list) {
|
||||
list_for_each_entry_safe(desc, n, &flist, list) {
|
||||
/*
|
||||
* Check against the original status as ABORT is software defined
|
||||
* and 0xff, which DSA_COMP_STATUS_MASK can mask out.
|
||||
*/
|
||||
list_del(&desc->list);
|
||||
|
||||
if (unlikely(desc->completion->status == IDXD_COMP_DESC_ABORT)) {
|
||||
idxd_dma_complete_txd(desc, IDXD_COMPLETE_ABORT, true);
|
||||
continue;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/prefetch.h>
|
||||
#include <linux/dca.h>
|
||||
#include <linux/aer.h>
|
||||
#include <linux/sizes.h>
|
||||
#include "dma.h"
|
||||
#include "registers.h"
|
||||
@@ -535,18 +534,6 @@ err_out:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int ioat_register(struct ioatdma_device *ioat_dma)
|
||||
{
|
||||
int err = dma_async_device_register(&ioat_dma->dma_dev);
|
||||
|
||||
if (err) {
|
||||
ioat_disable_interrupts(ioat_dma);
|
||||
dma_pool_destroy(ioat_dma->completion_pool);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
static void ioat_dma_remove(struct ioatdma_device *ioat_dma)
|
||||
{
|
||||
struct dma_device *dma = &ioat_dma->dma_dev;
|
||||
@@ -1181,9 +1168,9 @@ static int ioat3_dma_probe(struct ioatdma_device *ioat_dma, int dca)
|
||||
ioat_chan->reg_base + IOAT_DCACTRL_OFFSET);
|
||||
}
|
||||
|
||||
err = ioat_register(ioat_dma);
|
||||
err = dma_async_device_register(&ioat_dma->dma_dev);
|
||||
if (err)
|
||||
return err;
|
||||
goto err_disable_interrupts;
|
||||
|
||||
ioat_kobject_add(ioat_dma, &ioat_ktype);
|
||||
|
||||
@@ -1191,21 +1178,30 @@ static int ioat3_dma_probe(struct ioatdma_device *ioat_dma, int dca)
|
||||
ioat_dma->dca = ioat_dca_init(pdev, ioat_dma->reg_base);
|
||||
|
||||
/* disable relaxed ordering */
|
||||
err = pcie_capability_read_word(pdev, IOAT_DEVCTRL_OFFSET, &val16);
|
||||
if (err)
|
||||
return pcibios_err_to_errno(err);
|
||||
err = pcie_capability_read_word(pdev, PCI_EXP_DEVCTL, &val16);
|
||||
if (err) {
|
||||
err = pcibios_err_to_errno(err);
|
||||
goto err_disable_interrupts;
|
||||
}
|
||||
|
||||
/* clear relaxed ordering enable */
|
||||
val16 &= ~IOAT_DEVCTRL_ROE;
|
||||
err = pcie_capability_write_word(pdev, IOAT_DEVCTRL_OFFSET, val16);
|
||||
if (err)
|
||||
return pcibios_err_to_errno(err);
|
||||
val16 &= ~PCI_EXP_DEVCTL_RELAX_EN;
|
||||
err = pcie_capability_write_word(pdev, PCI_EXP_DEVCTL, val16);
|
||||
if (err) {
|
||||
err = pcibios_err_to_errno(err);
|
||||
goto err_disable_interrupts;
|
||||
}
|
||||
|
||||
if (ioat_dma->cap & IOAT_CAP_DPS)
|
||||
writeb(ioat_pending_level + 1,
|
||||
ioat_dma->reg_base + IOAT_PREFETCH_LIMIT_OFFSET);
|
||||
|
||||
return 0;
|
||||
|
||||
err_disable_interrupts:
|
||||
ioat_disable_interrupts(ioat_dma);
|
||||
dma_pool_destroy(ioat_dma->completion_pool);
|
||||
return err;
|
||||
}
|
||||
|
||||
static void ioat_shutdown(struct pci_dev *pdev)
|
||||
@@ -1350,6 +1346,8 @@ static int ioat_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
void __iomem * const *iomap;
|
||||
struct device *dev = &pdev->dev;
|
||||
struct ioatdma_device *device;
|
||||
unsigned int i;
|
||||
u8 version;
|
||||
int err;
|
||||
|
||||
err = pcim_enable_device(pdev);
|
||||
@@ -1363,6 +1361,10 @@ static int ioat_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
if (!iomap)
|
||||
return -ENOMEM;
|
||||
|
||||
version = readb(iomap[IOAT_MMIO_BAR] + IOAT_VER_OFFSET);
|
||||
if (version < IOAT_VER_3_0)
|
||||
return -ENODEV;
|
||||
|
||||
err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
|
||||
if (err)
|
||||
return err;
|
||||
@@ -1373,22 +1375,19 @@ static int ioat_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
pci_set_master(pdev);
|
||||
pci_set_drvdata(pdev, device);
|
||||
|
||||
device->version = readb(device->reg_base + IOAT_VER_OFFSET);
|
||||
device->version = version;
|
||||
if (device->version >= IOAT_VER_3_4)
|
||||
ioat_dca_enabled = 0;
|
||||
if (device->version >= IOAT_VER_3_0) {
|
||||
if (is_skx_ioat(pdev))
|
||||
device->version = IOAT_VER_3_2;
|
||||
err = ioat3_dma_probe(device, ioat_dca_enabled);
|
||||
|
||||
if (device->version >= IOAT_VER_3_3)
|
||||
pci_enable_pcie_error_reporting(pdev);
|
||||
} else
|
||||
return -ENODEV;
|
||||
if (is_skx_ioat(pdev))
|
||||
device->version = IOAT_VER_3_2;
|
||||
|
||||
err = ioat3_dma_probe(device, ioat_dca_enabled);
|
||||
if (err) {
|
||||
for (i = 0; i < IOAT_MAX_CHANS; i++)
|
||||
kfree(device->idx[i]);
|
||||
kfree(device);
|
||||
dev_err(dev, "Intel(R) I/OAT DMA Engine init failed\n");
|
||||
pci_disable_pcie_error_reporting(pdev);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
@@ -1411,7 +1410,6 @@ static void ioat_remove(struct pci_dev *pdev)
|
||||
device->dca = NULL;
|
||||
}
|
||||
|
||||
pci_disable_pcie_error_reporting(pdev);
|
||||
ioat_dma_remove(device);
|
||||
}
|
||||
|
||||
@@ -1450,6 +1448,7 @@ module_init(ioat_init_module);
|
||||
static void __exit ioat_exit_module(void)
|
||||
{
|
||||
pci_unregister_driver(&ioat_pci_driver);
|
||||
kmem_cache_destroy(ioat_sed_cache);
|
||||
kmem_cache_destroy(ioat_cache);
|
||||
}
|
||||
module_exit(ioat_exit_module);
|
||||
|
||||
@@ -14,13 +14,6 @@
|
||||
#define IOAT_PCI_CHANERR_INT_OFFSET 0x180
|
||||
#define IOAT_PCI_CHANERRMASK_INT_OFFSET 0x184
|
||||
|
||||
/* PCIe config registers */
|
||||
|
||||
/* EXPCAPID + N */
|
||||
#define IOAT_DEVCTRL_OFFSET 0x8
|
||||
/* relaxed ordering enable */
|
||||
#define IOAT_DEVCTRL_ROE 0x10
|
||||
|
||||
/* MMIO Device Registers */
|
||||
#define IOAT_CHANCNT_OFFSET 0x00 /* 8-bit */
|
||||
|
||||
|
||||
@@ -497,10 +497,12 @@ int psci_cpu_suspend_enter(u32 state)
|
||||
|
||||
static int psci_system_suspend(unsigned long unused)
|
||||
{
|
||||
int err;
|
||||
phys_addr_t pa_cpu_resume = __pa_symbol(cpu_resume);
|
||||
|
||||
return invoke_psci_fn(PSCI_FN_NATIVE(1_0, SYSTEM_SUSPEND),
|
||||
err = invoke_psci_fn(PSCI_FN_NATIVE(1_0, SYSTEM_SUSPEND),
|
||||
pa_cpu_resume, 0, 0);
|
||||
return psci_to_linux_errno(err);
|
||||
}
|
||||
|
||||
static int psci_system_suspend_enter(suspend_state_t state)
|
||||
|
||||
@@ -164,6 +164,8 @@ static void sumo_construct_vid_mapping_table(struct amdgpu_device *adev,
|
||||
|
||||
for (i = 0; i < SUMO_MAX_HARDWARE_POWERLEVELS; i++) {
|
||||
if (table[i].ulSupportedSCLK != 0) {
|
||||
if (table[i].usVoltageIndex >= SUMO_MAX_NUMBER_VOLTAGES)
|
||||
continue;
|
||||
vid_mapping_table->entries[table[i].usVoltageIndex].vid_7bit =
|
||||
table[i].usVoltageID;
|
||||
vid_mapping_table->entries[table[i].usVoltageIndex].vid_2bit =
|
||||
|
||||
@@ -390,6 +390,10 @@ bool intel_dp_can_bigjoiner(struct intel_dp *intel_dp)
|
||||
struct intel_encoder *encoder = &intel_dig_port->base;
|
||||
struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
|
||||
|
||||
/* eDP MSO is not compatible with joiner */
|
||||
if (intel_dp->mso_link_count)
|
||||
return false;
|
||||
|
||||
return DISPLAY_VER(dev_priv) >= 12 ||
|
||||
(DISPLAY_VER(dev_priv) == 11 &&
|
||||
encoder->port != PORT_A);
|
||||
|
||||
@@ -43,6 +43,18 @@ void lima_bcast_suspend(struct lima_ip *ip)
|
||||
|
||||
}
|
||||
|
||||
int lima_bcast_mask_irq(struct lima_ip *ip)
|
||||
{
|
||||
bcast_write(LIMA_BCAST_BROADCAST_MASK, 0);
|
||||
bcast_write(LIMA_BCAST_INTERRUPT_MASK, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int lima_bcast_reset(struct lima_ip *ip)
|
||||
{
|
||||
return lima_bcast_hw_init(ip);
|
||||
}
|
||||
|
||||
int lima_bcast_init(struct lima_ip *ip)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -13,4 +13,7 @@ void lima_bcast_fini(struct lima_ip *ip);
|
||||
|
||||
void lima_bcast_enable(struct lima_device *dev, int num_pp);
|
||||
|
||||
int lima_bcast_mask_irq(struct lima_ip *ip);
|
||||
int lima_bcast_reset(struct lima_ip *ip);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -212,6 +212,13 @@ static void lima_gp_task_mmu_error(struct lima_sched_pipe *pipe)
|
||||
lima_sched_pipe_task_done(pipe);
|
||||
}
|
||||
|
||||
static void lima_gp_task_mask_irq(struct lima_sched_pipe *pipe)
|
||||
{
|
||||
struct lima_ip *ip = pipe->processor[0];
|
||||
|
||||
gp_write(LIMA_GP_INT_MASK, 0);
|
||||
}
|
||||
|
||||
static int lima_gp_task_recover(struct lima_sched_pipe *pipe)
|
||||
{
|
||||
struct lima_ip *ip = pipe->processor[0];
|
||||
@@ -344,6 +351,7 @@ int lima_gp_pipe_init(struct lima_device *dev)
|
||||
pipe->task_error = lima_gp_task_error;
|
||||
pipe->task_mmu_error = lima_gp_task_mmu_error;
|
||||
pipe->task_recover = lima_gp_task_recover;
|
||||
pipe->task_mask_irq = lima_gp_task_mask_irq;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -408,6 +408,9 @@ static void lima_pp_task_error(struct lima_sched_pipe *pipe)
|
||||
|
||||
lima_pp_hard_reset(ip);
|
||||
}
|
||||
|
||||
if (pipe->bcast_processor)
|
||||
lima_bcast_reset(pipe->bcast_processor);
|
||||
}
|
||||
|
||||
static void lima_pp_task_mmu_error(struct lima_sched_pipe *pipe)
|
||||
@@ -416,6 +419,20 @@ static void lima_pp_task_mmu_error(struct lima_sched_pipe *pipe)
|
||||
lima_sched_pipe_task_done(pipe);
|
||||
}
|
||||
|
||||
static void lima_pp_task_mask_irq(struct lima_sched_pipe *pipe)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < pipe->num_processor; i++) {
|
||||
struct lima_ip *ip = pipe->processor[i];
|
||||
|
||||
pp_write(LIMA_PP_INT_MASK, 0);
|
||||
}
|
||||
|
||||
if (pipe->bcast_processor)
|
||||
lima_bcast_mask_irq(pipe->bcast_processor);
|
||||
}
|
||||
|
||||
static struct kmem_cache *lima_pp_task_slab;
|
||||
static int lima_pp_task_slab_refcnt;
|
||||
|
||||
@@ -447,6 +464,7 @@ int lima_pp_pipe_init(struct lima_device *dev)
|
||||
pipe->task_fini = lima_pp_task_fini;
|
||||
pipe->task_error = lima_pp_task_error;
|
||||
pipe->task_mmu_error = lima_pp_task_mmu_error;
|
||||
pipe->task_mask_irq = lima_pp_task_mask_irq;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -402,6 +402,13 @@ static enum drm_gpu_sched_stat lima_sched_timedout_job(struct drm_sched_job *job
|
||||
struct lima_sched_task *task = to_lima_task(job);
|
||||
struct lima_device *ldev = pipe->ldev;
|
||||
|
||||
/*
|
||||
* The task might still finish while this timeout handler runs.
|
||||
* To prevent a race condition on its completion, mask all irqs
|
||||
* on the running core until the next hard reset completes.
|
||||
*/
|
||||
pipe->task_mask_irq(pipe);
|
||||
|
||||
if (!pipe->error)
|
||||
DRM_ERROR("lima job timeout\n");
|
||||
|
||||
|
||||
@@ -80,6 +80,7 @@ struct lima_sched_pipe {
|
||||
void (*task_error)(struct lima_sched_pipe *pipe);
|
||||
void (*task_mmu_error)(struct lima_sched_pipe *pipe);
|
||||
int (*task_recover)(struct lima_sched_pipe *pipe);
|
||||
void (*task_mask_irq)(struct lima_sched_pipe *pipe);
|
||||
|
||||
struct work_struct recover_work;
|
||||
};
|
||||
|
||||
@@ -1621,6 +1621,8 @@ void sumo_construct_vid_mapping_table(struct radeon_device *rdev,
|
||||
|
||||
for (i = 0; i < SUMO_MAX_HARDWARE_POWERLEVELS; i++) {
|
||||
if (table[i].ulSupportedSCLK != 0) {
|
||||
if (table[i].usVoltageIndex >= SUMO_MAX_NUMBER_VOLTAGES)
|
||||
continue;
|
||||
vid_mapping_table->entries[table[i].usVoltageIndex].vid_7bit =
|
||||
table[i].usVoltageID;
|
||||
vid_mapping_table->entries[table[i].usVoltageIndex].vid_2bit =
|
||||
|
||||
@@ -334,36 +334,20 @@ static int asus_raw_event(struct hid_device *hdev,
|
||||
if (drvdata->quirks & QUIRK_MEDION_E1239T)
|
||||
return asus_e1239t_event(drvdata, data, size);
|
||||
|
||||
if (drvdata->quirks & QUIRK_USE_KBD_BACKLIGHT) {
|
||||
/*
|
||||
* Skip these report ID, the device emits a continuous stream associated
|
||||
* with the AURA mode it is in which looks like an 'echo'.
|
||||
*/
|
||||
if (report->id == FEATURE_KBD_LED_REPORT_ID1 || report->id == FEATURE_KBD_LED_REPORT_ID2)
|
||||
return -1;
|
||||
if (drvdata->quirks & QUIRK_ROG_NKEY_KEYBOARD) {
|
||||
/*
|
||||
* Skip these report ID, the device emits a continuous stream associated
|
||||
* with the AURA mode it is in which looks like an 'echo'.
|
||||
* G713 and G733 send these codes on some keypresses, depending on
|
||||
* the key pressed it can trigger a shutdown event if not caught.
|
||||
*/
|
||||
if (report->id == FEATURE_KBD_LED_REPORT_ID1 ||
|
||||
report->id == FEATURE_KBD_LED_REPORT_ID2) {
|
||||
if (data[0] == 0x02 && data[1] == 0x30) {
|
||||
return -1;
|
||||
/* Additional report filtering */
|
||||
} else if (report->id == FEATURE_KBD_REPORT_ID) {
|
||||
/*
|
||||
* G14 and G15 send these codes on some keypresses with no
|
||||
* discernable reason for doing so. We'll filter them out to avoid
|
||||
* unmapped warning messages later.
|
||||
*/
|
||||
if (data[1] == 0xea || data[1] == 0xec || data[1] == 0x02 ||
|
||||
data[1] == 0x8a || data[1] == 0x9e) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if (drvdata->quirks & QUIRK_ROG_NKEY_KEYBOARD) {
|
||||
/*
|
||||
* G713 and G733 send these codes on some keypresses, depending on
|
||||
* the key pressed it can trigger a shutdown event if not caught.
|
||||
*/
|
||||
if(data[0] == 0x02 && data[1] == 0x30) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (drvdata->quirks & QUIRK_ROG_CLAYMORE_II_KEYBOARD) {
|
||||
@@ -1262,6 +1246,19 @@ static __u8 *asus_report_fixup(struct hid_device *hdev, __u8 *rdesc,
|
||||
rdesc[205] = 0x01;
|
||||
}
|
||||
|
||||
/* match many more n-key devices */
|
||||
if (drvdata->quirks & QUIRK_ROG_NKEY_KEYBOARD && *rsize > 15) {
|
||||
for (int i = 0; i < *rsize - 15; i++) {
|
||||
/* offset to the count from 0x5a report part always 14 */
|
||||
if (rdesc[i] == 0x85 && rdesc[i + 1] == 0x5a &&
|
||||
rdesc[i + 14] == 0x95 && rdesc[i + 15] == 0x05) {
|
||||
hid_info(hdev, "Fixing up Asus N-Key report descriptor\n");
|
||||
rdesc[i + 15] = 0x01;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return rdesc;
|
||||
}
|
||||
|
||||
|
||||
@@ -802,6 +802,7 @@
|
||||
#define USB_DEVICE_ID_LOGITECH_AUDIOHUB 0x0a0e
|
||||
#define USB_DEVICE_ID_LOGITECH_T651 0xb00c
|
||||
#define USB_DEVICE_ID_LOGITECH_DINOVO_EDGE_KBD 0xb309
|
||||
#define USB_DEVICE_ID_LOGITECH_CASA_TOUCHPAD 0xbb00
|
||||
#define USB_DEVICE_ID_LOGITECH_C007 0xc007
|
||||
#define USB_DEVICE_ID_LOGITECH_C077 0xc077
|
||||
#define USB_DEVICE_ID_LOGITECH_RECEIVER 0xc101
|
||||
|
||||
@@ -2084,6 +2084,12 @@ static const struct hid_device_id mt_devices[] = {
|
||||
USB_VENDOR_ID_LENOVO,
|
||||
USB_DEVICE_ID_LENOVO_X12_TAB) },
|
||||
|
||||
/* Logitech devices */
|
||||
{ .driver_data = MT_CLS_NSMU,
|
||||
HID_DEVICE(BUS_BLUETOOTH, HID_GROUP_MULTITOUCH_WIN_8,
|
||||
USB_VENDOR_ID_LOGITECH,
|
||||
USB_DEVICE_ID_LOGITECH_CASA_TOUCHPAD) },
|
||||
|
||||
/* MosArt panels */
|
||||
{ .driver_data = MT_CLS_CONFIDENCE_MINUS_ONE,
|
||||
MT_USB_DEVICE(USB_VENDOR_ID_ASUS,
|
||||
|
||||
@@ -442,8 +442,8 @@ static int ocores_init(struct device *dev, struct ocores_i2c *i2c)
|
||||
oc_setreg(i2c, OCI2C_PREHIGH, prescale >> 8);
|
||||
|
||||
/* Init the device */
|
||||
oc_setreg(i2c, OCI2C_CMD, OCI2C_CMD_IACK);
|
||||
oc_setreg(i2c, OCI2C_CONTROL, ctrl | OCI2C_CTRL_EN);
|
||||
oc_setreg(i2c, OCI2C_CMD, OCI2C_CMD_IACK);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -199,17 +199,20 @@ int mlx5_ib_create_srq(struct ib_srq *ib_srq,
|
||||
int err;
|
||||
struct mlx5_srq_attr in = {};
|
||||
__u32 max_srq_wqes = 1 << MLX5_CAP_GEN(dev->mdev, log_max_srq_sz);
|
||||
__u32 max_sge_sz = MLX5_CAP_GEN(dev->mdev, max_wqe_sz_rq) /
|
||||
sizeof(struct mlx5_wqe_data_seg);
|
||||
|
||||
if (init_attr->srq_type != IB_SRQT_BASIC &&
|
||||
init_attr->srq_type != IB_SRQT_XRC &&
|
||||
init_attr->srq_type != IB_SRQT_TM)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
/* Sanity check SRQ size before proceeding */
|
||||
if (init_attr->attr.max_wr >= max_srq_wqes) {
|
||||
mlx5_ib_dbg(dev, "max_wr %d, cap %d\n",
|
||||
init_attr->attr.max_wr,
|
||||
max_srq_wqes);
|
||||
/* Sanity check SRQ and sge size before proceeding */
|
||||
if (init_attr->attr.max_wr >= max_srq_wqes ||
|
||||
init_attr->attr.max_sge > max_sge_sz) {
|
||||
mlx5_ib_dbg(dev, "max_wr %d,wr_cap %d,max_sge %d, sge_cap:%d\n",
|
||||
init_attr->attr.max_wr, max_srq_wqes,
|
||||
init_attr->attr.max_sge, max_sge_sz);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
||||
@@ -3211,7 +3211,7 @@ static void arm_smmu_setup_msis(struct arm_smmu_device *smmu)
|
||||
smmu->priq.q.irq = msi_get_virq(dev, PRIQ_MSI_INDEX);
|
||||
|
||||
/* Add callback to free MSIs on teardown */
|
||||
devm_add_action(dev, arm_smmu_free_msis, dev);
|
||||
devm_add_action_or_reset(dev, arm_smmu_free_msis, dev);
|
||||
}
|
||||
|
||||
static void arm_smmu_setup_unique_irqs(struct arm_smmu_device *smmu)
|
||||
|
||||
@@ -186,7 +186,12 @@
|
||||
#define RTL8366RB_LED_BLINKRATE_222MS 0x0004
|
||||
#define RTL8366RB_LED_BLINKRATE_446MS 0x0005
|
||||
|
||||
/* LED trigger event for each group */
|
||||
#define RTL8366RB_LED_CTRL_REG 0x0431
|
||||
#define RTL8366RB_LED_CTRL_OFFSET(led_group) \
|
||||
(4 * (led_group))
|
||||
#define RTL8366RB_LED_CTRL_MASK(led_group) \
|
||||
(0xf << RTL8366RB_LED_CTRL_OFFSET(led_group))
|
||||
#define RTL8366RB_LED_OFF 0x0
|
||||
#define RTL8366RB_LED_DUP_COL 0x1
|
||||
#define RTL8366RB_LED_LINK_ACT 0x2
|
||||
@@ -203,6 +208,11 @@
|
||||
#define RTL8366RB_LED_LINK_TX 0xd
|
||||
#define RTL8366RB_LED_MASTER 0xe
|
||||
#define RTL8366RB_LED_FORCE 0xf
|
||||
|
||||
/* The RTL8366RB_LED_X_X registers are used to manually set the LED state only
|
||||
* when the corresponding LED group in RTL8366RB_LED_CTRL_REG is
|
||||
* RTL8366RB_LED_FORCE. Otherwise, it is ignored.
|
||||
*/
|
||||
#define RTL8366RB_LED_0_1_CTRL_REG 0x0432
|
||||
#define RTL8366RB_LED_1_OFFSET 6
|
||||
#define RTL8366RB_LED_2_3_CTRL_REG 0x0433
|
||||
@@ -998,28 +1008,20 @@ static int rtl8366rb_setup(struct dsa_switch *ds)
|
||||
*/
|
||||
if (priv->leds_disabled) {
|
||||
/* Turn everything off */
|
||||
regmap_update_bits(priv->map,
|
||||
RTL8366RB_LED_0_1_CTRL_REG,
|
||||
0x0FFF, 0);
|
||||
regmap_update_bits(priv->map,
|
||||
RTL8366RB_LED_2_3_CTRL_REG,
|
||||
0x0FFF, 0);
|
||||
regmap_update_bits(priv->map,
|
||||
RTL8366RB_INTERRUPT_CONTROL_REG,
|
||||
RTL8366RB_P4_RGMII_LED,
|
||||
0);
|
||||
val = RTL8366RB_LED_OFF;
|
||||
} else {
|
||||
/* TODO: make this configurable per LED */
|
||||
val = RTL8366RB_LED_FORCE;
|
||||
}
|
||||
for (i = 0; i < 4; i++) {
|
||||
ret = regmap_update_bits(priv->map,
|
||||
RTL8366RB_LED_CTRL_REG,
|
||||
0xf << (i * 4),
|
||||
val << (i * 4));
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
for (i = 0; i < RTL8366RB_NUM_LEDGROUPS; i++) {
|
||||
val = RTL8366RB_LED_OFF << RTL8366RB_LED_CTRL_OFFSET(i);
|
||||
ret = regmap_update_bits(priv->map,
|
||||
RTL8366RB_LED_CTRL_REG,
|
||||
RTL8366RB_LED_CTRL_MASK(i),
|
||||
val);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
ret = rtl8366_reset_vlan(priv);
|
||||
@@ -1108,52 +1110,6 @@ rtl8366rb_mac_link_down(struct dsa_switch *ds, int port, unsigned int mode,
|
||||
}
|
||||
}
|
||||
|
||||
static void rb8366rb_set_port_led(struct realtek_priv *priv,
|
||||
int port, bool enable)
|
||||
{
|
||||
u16 val = enable ? 0x3f : 0;
|
||||
int ret;
|
||||
|
||||
if (priv->leds_disabled)
|
||||
return;
|
||||
|
||||
switch (port) {
|
||||
case 0:
|
||||
ret = regmap_update_bits(priv->map,
|
||||
RTL8366RB_LED_0_1_CTRL_REG,
|
||||
0x3F, val);
|
||||
break;
|
||||
case 1:
|
||||
ret = regmap_update_bits(priv->map,
|
||||
RTL8366RB_LED_0_1_CTRL_REG,
|
||||
0x3F << RTL8366RB_LED_1_OFFSET,
|
||||
val << RTL8366RB_LED_1_OFFSET);
|
||||
break;
|
||||
case 2:
|
||||
ret = regmap_update_bits(priv->map,
|
||||
RTL8366RB_LED_2_3_CTRL_REG,
|
||||
0x3F, val);
|
||||
break;
|
||||
case 3:
|
||||
ret = regmap_update_bits(priv->map,
|
||||
RTL8366RB_LED_2_3_CTRL_REG,
|
||||
0x3F << RTL8366RB_LED_3_OFFSET,
|
||||
val << RTL8366RB_LED_3_OFFSET);
|
||||
break;
|
||||
case 4:
|
||||
ret = regmap_update_bits(priv->map,
|
||||
RTL8366RB_INTERRUPT_CONTROL_REG,
|
||||
RTL8366RB_P4_RGMII_LED,
|
||||
enable ? RTL8366RB_P4_RGMII_LED : 0);
|
||||
break;
|
||||
default:
|
||||
dev_err(priv->dev, "no LED for port %d\n", port);
|
||||
return;
|
||||
}
|
||||
if (ret)
|
||||
dev_err(priv->dev, "error updating LED on port %d\n", port);
|
||||
}
|
||||
|
||||
static int
|
||||
rtl8366rb_port_enable(struct dsa_switch *ds, int port,
|
||||
struct phy_device *phy)
|
||||
@@ -1167,7 +1123,6 @@ rtl8366rb_port_enable(struct dsa_switch *ds, int port,
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
rb8366rb_set_port_led(priv, port, true);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1182,8 +1137,6 @@ rtl8366rb_port_disable(struct dsa_switch *ds, int port)
|
||||
BIT(port));
|
||||
if (ret)
|
||||
return;
|
||||
|
||||
rb8366rb_set_port_led(priv, port, false);
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
@@ -617,9 +617,6 @@ tx_done:
|
||||
return NETDEV_TX_OK;
|
||||
|
||||
tx_dma_error:
|
||||
if (BNXT_TX_PTP_IS_SET(lflags))
|
||||
atomic_inc(&bp->ptp_cfg->tx_avail);
|
||||
|
||||
last_frag = i;
|
||||
|
||||
/* start back at beginning and unmap skb */
|
||||
@@ -641,6 +638,8 @@ tx_dma_error:
|
||||
tx_free:
|
||||
dev_kfree_skb_any(skb);
|
||||
tx_kick_pending:
|
||||
if (BNXT_TX_PTP_IS_SET(lflags))
|
||||
atomic_inc(&bp->ptp_cfg->tx_avail);
|
||||
if (txr->kick_pending)
|
||||
bnxt_txr_db_kick(bp, txr, txr->tx_prod);
|
||||
txr->tx_buf_ring[txr->tx_prod].skb = NULL;
|
||||
|
||||
@@ -901,6 +901,7 @@ void ice_print_link_msg(struct ice_vsi *vsi, bool isup);
|
||||
int ice_plug_aux_dev(struct ice_pf *pf);
|
||||
void ice_unplug_aux_dev(struct ice_pf *pf);
|
||||
int ice_init_rdma(struct ice_pf *pf);
|
||||
void ice_deinit_rdma(struct ice_pf *pf);
|
||||
const char *ice_aq_str(enum ice_aq_err aq_err);
|
||||
bool ice_is_wol_supported(struct ice_hw *hw);
|
||||
void ice_fdir_del_all_fltrs(struct ice_vsi *vsi);
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
#include "ice_lib.h"
|
||||
#include "ice_dcb_lib.h"
|
||||
|
||||
static DEFINE_IDA(ice_aux_ida);
|
||||
|
||||
/**
|
||||
* ice_get_auxiliary_drv - retrieve iidc_auxiliary_drv struct
|
||||
* @pf: pointer to PF struct
|
||||
@@ -245,6 +247,17 @@ static int ice_reserve_rdma_qvector(struct ice_pf *pf)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* ice_free_rdma_qvector - free vector resources reserved for RDMA driver
|
||||
* @pf: board private structure to initialize
|
||||
*/
|
||||
static void ice_free_rdma_qvector(struct ice_pf *pf)
|
||||
{
|
||||
pf->num_avail_sw_msix -= pf->num_rdma_msix;
|
||||
ice_free_res(pf->irq_tracker, pf->rdma_base_vector,
|
||||
ICE_RES_RDMA_VEC_ID);
|
||||
}
|
||||
|
||||
/**
|
||||
* ice_adev_release - function to be mapped to AUX dev's release op
|
||||
* @dev: pointer to device to free
|
||||
@@ -331,12 +344,47 @@ int ice_init_rdma(struct ice_pf *pf)
|
||||
struct device *dev = &pf->pdev->dev;
|
||||
int ret;
|
||||
|
||||
if (!ice_is_rdma_ena(pf)) {
|
||||
dev_warn(dev, "RDMA is not supported on this device\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
pf->aux_idx = ida_alloc(&ice_aux_ida, GFP_KERNEL);
|
||||
if (pf->aux_idx < 0) {
|
||||
dev_err(dev, "Failed to allocate device ID for AUX driver\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
/* Reserve vector resources */
|
||||
ret = ice_reserve_rdma_qvector(pf);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "failed to reserve vectors for RDMA\n");
|
||||
return ret;
|
||||
goto err_reserve_rdma_qvector;
|
||||
}
|
||||
pf->rdma_mode |= IIDC_RDMA_PROTOCOL_ROCEV2;
|
||||
return ice_plug_aux_dev(pf);
|
||||
ret = ice_plug_aux_dev(pf);
|
||||
if (ret)
|
||||
goto err_plug_aux_dev;
|
||||
return 0;
|
||||
|
||||
err_plug_aux_dev:
|
||||
ice_free_rdma_qvector(pf);
|
||||
err_reserve_rdma_qvector:
|
||||
pf->adev = NULL;
|
||||
ida_free(&ice_aux_ida, pf->aux_idx);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* ice_deinit_rdma - deinitialize RDMA on PF
|
||||
* @pf: ptr to ice_pf
|
||||
*/
|
||||
void ice_deinit_rdma(struct ice_pf *pf)
|
||||
{
|
||||
if (!ice_is_rdma_ena(pf))
|
||||
return;
|
||||
|
||||
ice_unplug_aux_dev(pf);
|
||||
ice_free_rdma_qvector(pf);
|
||||
ida_free(&ice_aux_ida, pf->aux_idx);
|
||||
}
|
||||
|
||||
@@ -45,7 +45,6 @@ MODULE_PARM_DESC(debug, "netif level (0=none,...,16=all), hw debug_mask (0x8XXXX
|
||||
MODULE_PARM_DESC(debug, "netif level (0=none,...,16=all)");
|
||||
#endif /* !CONFIG_DYNAMIC_DEBUG */
|
||||
|
||||
static DEFINE_IDA(ice_aux_ida);
|
||||
DEFINE_STATIC_KEY_FALSE(ice_xdp_locking_key);
|
||||
EXPORT_SYMBOL(ice_xdp_locking_key);
|
||||
|
||||
@@ -4971,30 +4970,16 @@ probe_done:
|
||||
|
||||
/* ready to go, so clear down state bit */
|
||||
clear_bit(ICE_DOWN, pf->state);
|
||||
if (ice_is_rdma_ena(pf)) {
|
||||
pf->aux_idx = ida_alloc(&ice_aux_ida, GFP_KERNEL);
|
||||
if (pf->aux_idx < 0) {
|
||||
dev_err(dev, "Failed to allocate device ID for AUX driver\n");
|
||||
err = -ENOMEM;
|
||||
goto err_devlink_reg_param;
|
||||
}
|
||||
|
||||
err = ice_init_rdma(pf);
|
||||
if (err) {
|
||||
dev_err(dev, "Failed to initialize RDMA: %d\n", err);
|
||||
err = -EIO;
|
||||
goto err_init_aux_unroll;
|
||||
}
|
||||
} else {
|
||||
dev_warn(dev, "RDMA is not supported on this device\n");
|
||||
err = ice_init_rdma(pf);
|
||||
if (err) {
|
||||
dev_err(dev, "Failed to initialize RDMA: %d\n", err);
|
||||
err = -EIO;
|
||||
goto err_devlink_reg_param;
|
||||
}
|
||||
|
||||
ice_devlink_register(pf);
|
||||
return 0;
|
||||
|
||||
err_init_aux_unroll:
|
||||
pf->adev = NULL;
|
||||
ida_free(&ice_aux_ida, pf->aux_idx);
|
||||
err_devlink_reg_param:
|
||||
ice_devlink_unregister_params(pf);
|
||||
err_netdev_reg:
|
||||
@@ -5106,9 +5091,7 @@ static void ice_remove(struct pci_dev *pdev)
|
||||
ice_service_task_stop(pf);
|
||||
|
||||
ice_aq_cancel_waiting_tasks(pf);
|
||||
ice_unplug_aux_dev(pf);
|
||||
if (pf->aux_idx >= 0)
|
||||
ida_free(&ice_aux_ida, pf->aux_idx);
|
||||
ice_deinit_rdma(pf);
|
||||
ice_devlink_unregister_params(pf);
|
||||
set_bit(ICE_DOWN, pf->state);
|
||||
|
||||
@@ -5268,7 +5251,7 @@ static int __maybe_unused ice_suspend(struct device *dev)
|
||||
*/
|
||||
disabled = ice_service_task_stop(pf);
|
||||
|
||||
ice_unplug_aux_dev(pf);
|
||||
ice_deinit_rdma(pf);
|
||||
|
||||
/* Already suspended?, then there is nothing to do */
|
||||
if (test_and_set_bit(ICE_SUSPENDED, pf->state)) {
|
||||
@@ -5348,6 +5331,11 @@ static int __maybe_unused ice_resume(struct device *dev)
|
||||
if (ret)
|
||||
dev_err(dev, "Cannot restore interrupt scheme: %d\n", ret);
|
||||
|
||||
ret = ice_init_rdma(pf);
|
||||
if (ret)
|
||||
dev_err(dev, "Reinitialize RDMA during resume failed: %d\n",
|
||||
ret);
|
||||
|
||||
clear_bit(ICE_DOWN, pf->state);
|
||||
/* Now perform PF reset and rebuild */
|
||||
reset_type = ICE_RESET_PFR;
|
||||
|
||||
@@ -1838,7 +1838,8 @@ ice_aq_alloc_free_vsi_list(struct ice_hw *hw, u16 *vsi_list_id,
|
||||
lkup_type == ICE_SW_LKUP_ETHERTYPE_MAC ||
|
||||
lkup_type == ICE_SW_LKUP_PROMISC ||
|
||||
lkup_type == ICE_SW_LKUP_PROMISC_VLAN ||
|
||||
lkup_type == ICE_SW_LKUP_DFLT) {
|
||||
lkup_type == ICE_SW_LKUP_DFLT ||
|
||||
lkup_type == ICE_SW_LKUP_LAST) {
|
||||
sw_buf->res_type = cpu_to_le16(ICE_AQC_RES_TYPE_VSI_LIST_REP);
|
||||
} else if (lkup_type == ICE_SW_LKUP_VLAN) {
|
||||
sw_buf->res_type =
|
||||
@@ -2764,7 +2765,8 @@ ice_update_vsi_list_rule(struct ice_hw *hw, u16 *vsi_handle_arr, u16 num_vsi,
|
||||
lkup_type == ICE_SW_LKUP_ETHERTYPE_MAC ||
|
||||
lkup_type == ICE_SW_LKUP_PROMISC ||
|
||||
lkup_type == ICE_SW_LKUP_PROMISC_VLAN ||
|
||||
lkup_type == ICE_SW_LKUP_DFLT)
|
||||
lkup_type == ICE_SW_LKUP_DFLT ||
|
||||
lkup_type == ICE_SW_LKUP_LAST)
|
||||
rule_type = remove ? ICE_AQC_SW_RULES_T_VSI_LIST_CLEAR :
|
||||
ICE_AQC_SW_RULES_T_VSI_LIST_SET;
|
||||
else if (lkup_type == ICE_SW_LKUP_VLAN)
|
||||
|
||||
@@ -1152,8 +1152,11 @@ bool otx2_sq_append_skb(struct net_device *netdev, struct otx2_snd_queue *sq,
|
||||
|
||||
if (skb_shinfo(skb)->gso_size && !is_hw_tso_supported(pfvf, skb)) {
|
||||
/* Insert vlan tag before giving pkt to tso */
|
||||
if (skb_vlan_tag_present(skb))
|
||||
if (skb_vlan_tag_present(skb)) {
|
||||
skb = __vlan_hwaccel_push_inside(skb);
|
||||
if (!skb)
|
||||
return true;
|
||||
}
|
||||
otx2_sq_append_tso(pfvf, sq, skb, qidx);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1146,8 +1146,12 @@ static void lan743x_ethtool_get_wol(struct net_device *netdev,
|
||||
if (netdev->phydev)
|
||||
phy_ethtool_get_wol(netdev->phydev, wol);
|
||||
|
||||
wol->supported |= WAKE_BCAST | WAKE_UCAST | WAKE_MCAST |
|
||||
WAKE_MAGIC | WAKE_PHY | WAKE_ARP;
|
||||
if (wol->supported != adapter->phy_wol_supported)
|
||||
netif_warn(adapter, drv, adapter->netdev,
|
||||
"PHY changed its supported WOL! old=%x, new=%x\n",
|
||||
adapter->phy_wol_supported, wol->supported);
|
||||
|
||||
wol->supported |= MAC_SUPPORTED_WAKES;
|
||||
|
||||
if (adapter->is_pci11x1x)
|
||||
wol->supported |= WAKE_MAGICSECURE;
|
||||
@@ -1162,7 +1166,39 @@ static int lan743x_ethtool_set_wol(struct net_device *netdev,
|
||||
{
|
||||
struct lan743x_adapter *adapter = netdev_priv(netdev);
|
||||
|
||||
/* WAKE_MAGICSEGURE is a modifier of and only valid together with
|
||||
* WAKE_MAGIC
|
||||
*/
|
||||
if ((wol->wolopts & WAKE_MAGICSECURE) && !(wol->wolopts & WAKE_MAGIC))
|
||||
return -EINVAL;
|
||||
|
||||
if (netdev->phydev) {
|
||||
struct ethtool_wolinfo phy_wol;
|
||||
int ret;
|
||||
|
||||
phy_wol.wolopts = wol->wolopts & adapter->phy_wol_supported;
|
||||
|
||||
/* If WAKE_MAGICSECURE was requested, filter out WAKE_MAGIC
|
||||
* for PHYs that do not support WAKE_MAGICSECURE
|
||||
*/
|
||||
if (wol->wolopts & WAKE_MAGICSECURE &&
|
||||
!(adapter->phy_wol_supported & WAKE_MAGICSECURE))
|
||||
phy_wol.wolopts &= ~WAKE_MAGIC;
|
||||
|
||||
ret = phy_ethtool_set_wol(netdev->phydev, &phy_wol);
|
||||
if (ret && (ret != -EOPNOTSUPP))
|
||||
return ret;
|
||||
|
||||
if (ret == -EOPNOTSUPP)
|
||||
adapter->phy_wolopts = 0;
|
||||
else
|
||||
adapter->phy_wolopts = phy_wol.wolopts;
|
||||
} else {
|
||||
adapter->phy_wolopts = 0;
|
||||
}
|
||||
|
||||
adapter->wolopts = 0;
|
||||
wol->wolopts &= ~adapter->phy_wolopts;
|
||||
if (wol->wolopts & WAKE_UCAST)
|
||||
adapter->wolopts |= WAKE_UCAST;
|
||||
if (wol->wolopts & WAKE_MCAST)
|
||||
@@ -1183,10 +1219,10 @@ static int lan743x_ethtool_set_wol(struct net_device *netdev,
|
||||
memset(adapter->sopass, 0, sizeof(u8) * SOPASS_MAX);
|
||||
}
|
||||
|
||||
wol->wolopts = adapter->wolopts | adapter->phy_wolopts;
|
||||
device_set_wakeup_enable(&adapter->pdev->dev, (bool)wol->wolopts);
|
||||
|
||||
return netdev->phydev ? phy_ethtool_set_wol(netdev->phydev, wol)
|
||||
: -ENETDOWN;
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
|
||||
@@ -3056,6 +3056,17 @@ static int lan743x_netdev_open(struct net_device *netdev)
|
||||
if (ret)
|
||||
goto close_tx;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
if (adapter->netdev->phydev) {
|
||||
struct ethtool_wolinfo wol = { .cmd = ETHTOOL_GWOL };
|
||||
|
||||
phy_ethtool_get_wol(netdev->phydev, &wol);
|
||||
adapter->phy_wol_supported = wol.supported;
|
||||
adapter->phy_wolopts = wol.wolopts;
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
||||
close_tx:
|
||||
@@ -3513,7 +3524,7 @@ static void lan743x_pm_set_wol(struct lan743x_adapter *adapter)
|
||||
|
||||
/* clear wake settings */
|
||||
pmtctl = lan743x_csr_read(adapter, PMT_CTL);
|
||||
pmtctl |= PMT_CTL_WUPS_MASK_;
|
||||
pmtctl |= PMT_CTL_WUPS_MASK_ | PMT_CTL_RES_CLR_WKP_MASK_;
|
||||
pmtctl &= ~(PMT_CTL_GPIO_WAKEUP_EN_ | PMT_CTL_EEE_WAKEUP_EN_ |
|
||||
PMT_CTL_WOL_EN_ | PMT_CTL_MAC_D3_RX_CLK_OVR_ |
|
||||
PMT_CTL_RX_FCT_RFE_D3_CLK_OVR_ | PMT_CTL_ETH_PHY_WAKE_EN_);
|
||||
@@ -3525,10 +3536,9 @@ static void lan743x_pm_set_wol(struct lan743x_adapter *adapter)
|
||||
|
||||
pmtctl |= PMT_CTL_ETH_PHY_D3_COLD_OVR_ | PMT_CTL_ETH_PHY_D3_OVR_;
|
||||
|
||||
if (adapter->wolopts & WAKE_PHY) {
|
||||
pmtctl |= PMT_CTL_ETH_PHY_EDPD_PLL_CTL_;
|
||||
if (adapter->phy_wolopts)
|
||||
pmtctl |= PMT_CTL_ETH_PHY_WAKE_EN_;
|
||||
}
|
||||
|
||||
if (adapter->wolopts & WAKE_MAGIC) {
|
||||
wucsr |= MAC_WUCSR_MPEN_;
|
||||
macrx |= MAC_RX_RXEN_;
|
||||
@@ -3624,7 +3634,7 @@ static int lan743x_pm_suspend(struct device *dev)
|
||||
lan743x_csr_write(adapter, MAC_WUCSR2, 0);
|
||||
lan743x_csr_write(adapter, MAC_WK_SRC, 0xFFFFFFFF);
|
||||
|
||||
if (adapter->wolopts)
|
||||
if (adapter->wolopts || adapter->phy_wolopts)
|
||||
lan743x_pm_set_wol(adapter);
|
||||
|
||||
if (adapter->is_pci11x1x) {
|
||||
@@ -3648,6 +3658,7 @@ static int lan743x_pm_resume(struct device *dev)
|
||||
struct pci_dev *pdev = to_pci_dev(dev);
|
||||
struct net_device *netdev = pci_get_drvdata(pdev);
|
||||
struct lan743x_adapter *adapter = netdev_priv(netdev);
|
||||
u32 data;
|
||||
int ret;
|
||||
|
||||
pci_set_power_state(pdev, PCI_D0);
|
||||
@@ -3666,6 +3677,30 @@ static int lan743x_pm_resume(struct device *dev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = lan743x_csr_read(adapter, MAC_WK_SRC);
|
||||
netif_dbg(adapter, drv, adapter->netdev,
|
||||
"Wakeup source : 0x%08X\n", ret);
|
||||
|
||||
/* Clear the wol configuration and status bits. Note that
|
||||
* the status bits are "Write One to Clear (W1C)"
|
||||
*/
|
||||
data = MAC_WUCSR_EEE_TX_WAKE_ | MAC_WUCSR_EEE_RX_WAKE_ |
|
||||
MAC_WUCSR_RFE_WAKE_FR_ | MAC_WUCSR_PFDA_FR_ | MAC_WUCSR_WUFR_ |
|
||||
MAC_WUCSR_MPR_ | MAC_WUCSR_BCAST_FR_;
|
||||
lan743x_csr_write(adapter, MAC_WUCSR, data);
|
||||
|
||||
data = MAC_WUCSR2_NS_RCD_ | MAC_WUCSR2_ARP_RCD_ |
|
||||
MAC_WUCSR2_IPV6_TCPSYN_RCD_ | MAC_WUCSR2_IPV4_TCPSYN_RCD_;
|
||||
lan743x_csr_write(adapter, MAC_WUCSR2, data);
|
||||
|
||||
data = MAC_WK_SRC_ETH_PHY_WK_ | MAC_WK_SRC_IPV6_TCPSYN_RCD_WK_ |
|
||||
MAC_WK_SRC_IPV4_TCPSYN_RCD_WK_ | MAC_WK_SRC_EEE_TX_WK_ |
|
||||
MAC_WK_SRC_EEE_RX_WK_ | MAC_WK_SRC_RFE_FR_WK_ |
|
||||
MAC_WK_SRC_PFDA_FR_WK_ | MAC_WK_SRC_MP_FR_WK_ |
|
||||
MAC_WK_SRC_BCAST_FR_WK_ | MAC_WK_SRC_WU_FR_WK_ |
|
||||
MAC_WK_SRC_WK_FR_SAVED_;
|
||||
lan743x_csr_write(adapter, MAC_WK_SRC, data);
|
||||
|
||||
/* open netdev when netdev is at running state while resume.
|
||||
* For instance, it is true when system wakesup after pm-suspend
|
||||
* However, it is false when system wakes up after suspend GUI menu
|
||||
@@ -3674,9 +3709,6 @@ static int lan743x_pm_resume(struct device *dev)
|
||||
lan743x_netdev_open(netdev);
|
||||
|
||||
netif_device_attach(netdev);
|
||||
ret = lan743x_csr_read(adapter, MAC_WK_SRC);
|
||||
netif_info(adapter, drv, adapter->netdev,
|
||||
"Wakeup source : 0x%08X\n", ret);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
#define PMT_CTL_RX_FCT_RFE_D3_CLK_OVR_ BIT(18)
|
||||
#define PMT_CTL_GPIO_WAKEUP_EN_ BIT(15)
|
||||
#define PMT_CTL_EEE_WAKEUP_EN_ BIT(13)
|
||||
#define PMT_CTL_RES_CLR_WKP_MASK_ GENMASK(9, 8)
|
||||
#define PMT_CTL_READY_ BIT(7)
|
||||
#define PMT_CTL_ETH_PHY_RST_ BIT(4)
|
||||
#define PMT_CTL_WOL_EN_ BIT(3)
|
||||
@@ -227,12 +228,31 @@
|
||||
#define MAC_WUCSR (0x140)
|
||||
#define MAC_MP_SO_EN_ BIT(21)
|
||||
#define MAC_WUCSR_RFE_WAKE_EN_ BIT(14)
|
||||
#define MAC_WUCSR_EEE_TX_WAKE_ BIT(13)
|
||||
#define MAC_WUCSR_EEE_RX_WAKE_ BIT(11)
|
||||
#define MAC_WUCSR_RFE_WAKE_FR_ BIT(9)
|
||||
#define MAC_WUCSR_PFDA_FR_ BIT(7)
|
||||
#define MAC_WUCSR_WUFR_ BIT(6)
|
||||
#define MAC_WUCSR_MPR_ BIT(5)
|
||||
#define MAC_WUCSR_BCAST_FR_ BIT(4)
|
||||
#define MAC_WUCSR_PFDA_EN_ BIT(3)
|
||||
#define MAC_WUCSR_WAKE_EN_ BIT(2)
|
||||
#define MAC_WUCSR_MPEN_ BIT(1)
|
||||
#define MAC_WUCSR_BCST_EN_ BIT(0)
|
||||
|
||||
#define MAC_WK_SRC (0x144)
|
||||
#define MAC_WK_SRC_ETH_PHY_WK_ BIT(17)
|
||||
#define MAC_WK_SRC_IPV6_TCPSYN_RCD_WK_ BIT(16)
|
||||
#define MAC_WK_SRC_IPV4_TCPSYN_RCD_WK_ BIT(15)
|
||||
#define MAC_WK_SRC_EEE_TX_WK_ BIT(14)
|
||||
#define MAC_WK_SRC_EEE_RX_WK_ BIT(13)
|
||||
#define MAC_WK_SRC_RFE_FR_WK_ BIT(12)
|
||||
#define MAC_WK_SRC_PFDA_FR_WK_ BIT(11)
|
||||
#define MAC_WK_SRC_MP_FR_WK_ BIT(10)
|
||||
#define MAC_WK_SRC_BCAST_FR_WK_ BIT(9)
|
||||
#define MAC_WK_SRC_WU_FR_WK_ BIT(8)
|
||||
#define MAC_WK_SRC_WK_FR_SAVED_ BIT(7)
|
||||
|
||||
#define MAC_MP_SO_HI (0x148)
|
||||
#define MAC_MP_SO_LO (0x14C)
|
||||
|
||||
@@ -295,6 +315,10 @@
|
||||
#define RFE_INDX(index) (0x580 + (index << 2))
|
||||
|
||||
#define MAC_WUCSR2 (0x600)
|
||||
#define MAC_WUCSR2_NS_RCD_ BIT(7)
|
||||
#define MAC_WUCSR2_ARP_RCD_ BIT(6)
|
||||
#define MAC_WUCSR2_IPV6_TCPSYN_RCD_ BIT(5)
|
||||
#define MAC_WUCSR2_IPV4_TCPSYN_RCD_ BIT(4)
|
||||
|
||||
#define SGMII_ACC (0x720)
|
||||
#define SGMII_ACC_SGMII_BZY_ BIT(31)
|
||||
@@ -1010,6 +1034,8 @@ enum lan743x_sgmii_lsd {
|
||||
LINK_2500_SLAVE
|
||||
};
|
||||
|
||||
#define MAC_SUPPORTED_WAKES (WAKE_BCAST | WAKE_UCAST | WAKE_MCAST | \
|
||||
WAKE_MAGIC | WAKE_ARP)
|
||||
struct lan743x_adapter {
|
||||
struct net_device *netdev;
|
||||
struct mii_bus *mdiobus;
|
||||
@@ -1017,6 +1043,8 @@ struct lan743x_adapter {
|
||||
#ifdef CONFIG_PM
|
||||
u32 wolopts;
|
||||
u8 sopass[SOPASS_MAX];
|
||||
u32 phy_wolopts;
|
||||
u32 phy_wol_supported;
|
||||
#endif
|
||||
struct pci_dev *pdev;
|
||||
struct lan743x_csr csr;
|
||||
|
||||
@@ -111,10 +111,8 @@ qcaspi_info_show(struct seq_file *s, void *what)
|
||||
|
||||
seq_printf(s, "IRQ : %d\n",
|
||||
qca->spi_dev->irq);
|
||||
seq_printf(s, "INTR REQ : %u\n",
|
||||
qca->intr_req);
|
||||
seq_printf(s, "INTR SVC : %u\n",
|
||||
qca->intr_svc);
|
||||
seq_printf(s, "INTR : %lx\n",
|
||||
qca->intr);
|
||||
|
||||
seq_printf(s, "SPI max speed : %lu\n",
|
||||
(unsigned long)qca->spi_dev->max_speed_hz);
|
||||
|
||||
@@ -49,6 +49,8 @@
|
||||
|
||||
#define MAX_DMA_BURST_LEN 5000
|
||||
|
||||
#define SPI_INTR 0
|
||||
|
||||
/* Modules parameters */
|
||||
#define QCASPI_CLK_SPEED_MIN 1000000
|
||||
#define QCASPI_CLK_SPEED_MAX 16000000
|
||||
@@ -593,14 +595,14 @@ qcaspi_spi_thread(void *data)
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((qca->intr_req == qca->intr_svc) &&
|
||||
if (!test_bit(SPI_INTR, &qca->intr) &&
|
||||
!qca->txr.skb[qca->txr.head])
|
||||
schedule();
|
||||
|
||||
set_current_state(TASK_RUNNING);
|
||||
|
||||
netdev_dbg(qca->net_dev, "have work to do. int: %d, tx_skb: %p\n",
|
||||
qca->intr_req - qca->intr_svc,
|
||||
netdev_dbg(qca->net_dev, "have work to do. int: %lu, tx_skb: %p\n",
|
||||
qca->intr,
|
||||
qca->txr.skb[qca->txr.head]);
|
||||
|
||||
qcaspi_qca7k_sync(qca, QCASPI_EVENT_UPDATE);
|
||||
@@ -614,8 +616,7 @@ qcaspi_spi_thread(void *data)
|
||||
msleep(QCASPI_QCA7K_REBOOT_TIME_MS);
|
||||
}
|
||||
|
||||
if (qca->intr_svc != qca->intr_req) {
|
||||
qca->intr_svc = qca->intr_req;
|
||||
if (test_and_clear_bit(SPI_INTR, &qca->intr)) {
|
||||
start_spi_intr_handling(qca, &intr_cause);
|
||||
|
||||
if (intr_cause & SPI_INT_CPU_ON) {
|
||||
@@ -677,7 +678,7 @@ qcaspi_intr_handler(int irq, void *data)
|
||||
{
|
||||
struct qcaspi *qca = data;
|
||||
|
||||
qca->intr_req++;
|
||||
set_bit(SPI_INTR, &qca->intr);
|
||||
if (qca->spi_thread)
|
||||
wake_up_process(qca->spi_thread);
|
||||
|
||||
@@ -693,8 +694,7 @@ qcaspi_netdev_open(struct net_device *dev)
|
||||
if (!qca)
|
||||
return -EINVAL;
|
||||
|
||||
qca->intr_req = 1;
|
||||
qca->intr_svc = 0;
|
||||
set_bit(SPI_INTR, &qca->intr);
|
||||
qca->sync = QCASPI_SYNC_UNKNOWN;
|
||||
qcafrm_fsm_init_spi(&qca->frm_handle);
|
||||
|
||||
|
||||
@@ -93,8 +93,7 @@ struct qcaspi {
|
||||
struct qcafrm_handle frm_handle;
|
||||
struct sk_buff *rx_skb;
|
||||
|
||||
unsigned int intr_req;
|
||||
unsigned int intr_svc;
|
||||
unsigned long intr;
|
||||
u16 reset_count;
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
|
||||
@@ -176,6 +176,7 @@ static void timestamp_interrupt(struct stmmac_priv *priv)
|
||||
{
|
||||
u32 num_snapshot, ts_status, tsync_int;
|
||||
struct ptp_clock_event event;
|
||||
u32 acr_value, channel;
|
||||
unsigned long flags;
|
||||
u64 ptp_time;
|
||||
int i;
|
||||
@@ -201,12 +202,15 @@ static void timestamp_interrupt(struct stmmac_priv *priv)
|
||||
num_snapshot = (ts_status & GMAC_TIMESTAMP_ATSNS_MASK) >>
|
||||
GMAC_TIMESTAMP_ATSNS_SHIFT;
|
||||
|
||||
acr_value = readl(priv->ptpaddr + PTP_ACR);
|
||||
channel = ilog2(FIELD_GET(PTP_ACR_MASK, acr_value));
|
||||
|
||||
for (i = 0; i < num_snapshot; i++) {
|
||||
read_lock_irqsave(&priv->ptp_lock, flags);
|
||||
get_ptptime(priv->ptpaddr, &ptp_time);
|
||||
read_unlock_irqrestore(&priv->ptp_lock, flags);
|
||||
event.type = PTP_CLOCK_EXTTS;
|
||||
event.index = 0;
|
||||
event.index = channel;
|
||||
event.timestamp = ptp_time;
|
||||
ptp_clock_event(priv->ptp_clock, &event);
|
||||
}
|
||||
|
||||
@@ -358,24 +358,28 @@ static int tc_setup_cbs(struct stmmac_priv *priv,
|
||||
|
||||
port_transmit_rate_kbps = qopt->idleslope - qopt->sendslope;
|
||||
|
||||
/* Port Transmit Rate and Speed Divider */
|
||||
switch (div_s64(port_transmit_rate_kbps, 1000)) {
|
||||
case SPEED_10000:
|
||||
case SPEED_5000:
|
||||
ptr = 32;
|
||||
break;
|
||||
case SPEED_2500:
|
||||
case SPEED_1000:
|
||||
ptr = 8;
|
||||
break;
|
||||
case SPEED_100:
|
||||
ptr = 4;
|
||||
break;
|
||||
default:
|
||||
netdev_err(priv->dev,
|
||||
"Invalid portTransmitRate %lld (idleSlope - sendSlope)\n",
|
||||
port_transmit_rate_kbps);
|
||||
return -EINVAL;
|
||||
if (qopt->enable) {
|
||||
/* Port Transmit Rate and Speed Divider */
|
||||
switch (div_s64(port_transmit_rate_kbps, 1000)) {
|
||||
case SPEED_10000:
|
||||
case SPEED_5000:
|
||||
ptr = 32;
|
||||
break;
|
||||
case SPEED_2500:
|
||||
case SPEED_1000:
|
||||
ptr = 8;
|
||||
break;
|
||||
case SPEED_100:
|
||||
ptr = 4;
|
||||
break;
|
||||
default:
|
||||
netdev_err(priv->dev,
|
||||
"Invalid portTransmitRate %lld (idleSlope - sendSlope)\n",
|
||||
port_transmit_rate_kbps);
|
||||
return -EINVAL;
|
||||
}
|
||||
} else {
|
||||
ptr = 0;
|
||||
}
|
||||
|
||||
mode_to_use = priv->plat->tx_queues_cfg[queue].mode_to_use;
|
||||
|
||||
@@ -95,6 +95,14 @@ struct gpy_priv {
|
||||
|
||||
u8 fw_major;
|
||||
u8 fw_minor;
|
||||
u32 wolopts;
|
||||
|
||||
/* It takes 3 seconds to fully switch out of loopback mode before
|
||||
* it can safely re-enter loopback mode. Record the time when
|
||||
* loopback is disabled. Check and wait if necessary before loopback
|
||||
* is enabled.
|
||||
*/
|
||||
u64 lb_dis_to;
|
||||
};
|
||||
|
||||
static const struct {
|
||||
@@ -202,6 +210,15 @@ static int gpy_hwmon_register(struct phy_device *phydev)
|
||||
}
|
||||
#endif
|
||||
|
||||
static int gpy_ack_interrupt(struct phy_device *phydev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* Clear all pending interrupts */
|
||||
ret = phy_read(phydev, PHY_ISTAT);
|
||||
return ret < 0 ? ret : 0;
|
||||
}
|
||||
|
||||
static int gpy_mbox_read(struct phy_device *phydev, u32 addr)
|
||||
{
|
||||
struct gpy_priv *priv = phydev->priv;
|
||||
@@ -243,16 +260,8 @@ out:
|
||||
|
||||
static int gpy_config_init(struct phy_device *phydev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* Mask all interrupts */
|
||||
ret = phy_write(phydev, PHY_IMASK, 0);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* Clear all pending interrupts */
|
||||
ret = phy_read(phydev, PHY_ISTAT);
|
||||
return ret < 0 ? ret : 0;
|
||||
/* Nothing to configure. Configuration Requirement Placeholder */
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool gpy_has_broken_mdint(struct phy_device *phydev)
|
||||
@@ -533,11 +542,23 @@ static int gpy_read_status(struct phy_device *phydev)
|
||||
|
||||
static int gpy_config_intr(struct phy_device *phydev)
|
||||
{
|
||||
struct gpy_priv *priv = phydev->priv;
|
||||
u16 mask = 0;
|
||||
int ret;
|
||||
|
||||
ret = gpy_ack_interrupt(phydev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (phydev->interrupts == PHY_INTERRUPT_ENABLED)
|
||||
mask = PHY_IMASK_MASK;
|
||||
|
||||
if (priv->wolopts & WAKE_MAGIC)
|
||||
mask |= PHY_IMASK_WOL;
|
||||
|
||||
if (priv->wolopts & WAKE_PHY)
|
||||
mask |= PHY_IMASK_LSTC;
|
||||
|
||||
return phy_write(phydev, PHY_IMASK, mask);
|
||||
}
|
||||
|
||||
@@ -586,6 +607,7 @@ static int gpy_set_wol(struct phy_device *phydev,
|
||||
struct ethtool_wolinfo *wol)
|
||||
{
|
||||
struct net_device *attach_dev = phydev->attached_dev;
|
||||
struct gpy_priv *priv = phydev->priv;
|
||||
int ret;
|
||||
|
||||
if (wol->wolopts & WAKE_MAGIC) {
|
||||
@@ -633,6 +655,8 @@ static int gpy_set_wol(struct phy_device *phydev,
|
||||
ret = phy_read(phydev, PHY_ISTAT);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
priv->wolopts |= WAKE_MAGIC;
|
||||
} else {
|
||||
/* Disable magic packet matching */
|
||||
ret = phy_clear_bits_mmd(phydev, MDIO_MMD_VEND2,
|
||||
@@ -640,6 +664,13 @@ static int gpy_set_wol(struct phy_device *phydev,
|
||||
WOL_EN);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
/* Disable the WOL interrupt */
|
||||
ret = phy_clear_bits(phydev, PHY_IMASK, PHY_IMASK_WOL);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
priv->wolopts &= ~WAKE_MAGIC;
|
||||
}
|
||||
|
||||
if (wol->wolopts & WAKE_PHY) {
|
||||
@@ -656,9 +687,11 @@ static int gpy_set_wol(struct phy_device *phydev,
|
||||
if (ret & (PHY_IMASK_MASK & ~PHY_IMASK_LSTC))
|
||||
phy_trigger_machine(phydev);
|
||||
|
||||
priv->wolopts |= WAKE_PHY;
|
||||
return 0;
|
||||
}
|
||||
|
||||
priv->wolopts &= ~WAKE_PHY;
|
||||
/* Disable the link state change interrupt */
|
||||
return phy_clear_bits(phydev, PHY_IMASK, PHY_IMASK_LSTC);
|
||||
}
|
||||
@@ -666,34 +699,42 @@ static int gpy_set_wol(struct phy_device *phydev,
|
||||
static void gpy_get_wol(struct phy_device *phydev,
|
||||
struct ethtool_wolinfo *wol)
|
||||
{
|
||||
int ret;
|
||||
struct gpy_priv *priv = phydev->priv;
|
||||
|
||||
wol->supported = WAKE_MAGIC | WAKE_PHY;
|
||||
wol->wolopts = 0;
|
||||
|
||||
ret = phy_read_mmd(phydev, MDIO_MMD_VEND2, VPSPEC2_WOL_CTL);
|
||||
if (ret & WOL_EN)
|
||||
wol->wolopts |= WAKE_MAGIC;
|
||||
|
||||
ret = phy_read(phydev, PHY_IMASK);
|
||||
if (ret & PHY_IMASK_LSTC)
|
||||
wol->wolopts |= WAKE_PHY;
|
||||
wol->wolopts = priv->wolopts;
|
||||
}
|
||||
|
||||
static int gpy_loopback(struct phy_device *phydev, bool enable)
|
||||
{
|
||||
struct gpy_priv *priv = phydev->priv;
|
||||
u16 set = 0;
|
||||
int ret;
|
||||
|
||||
ret = phy_modify(phydev, MII_BMCR, BMCR_LOOPBACK,
|
||||
enable ? BMCR_LOOPBACK : 0);
|
||||
if (!ret) {
|
||||
/* It takes some time for PHY device to switch
|
||||
* into/out-of loopback mode.
|
||||
*/
|
||||
msleep(100);
|
||||
if (enable) {
|
||||
u64 now = get_jiffies_64();
|
||||
|
||||
/* wait until 3 seconds from last disable */
|
||||
if (time_before64(now, priv->lb_dis_to))
|
||||
msleep(jiffies64_to_msecs(priv->lb_dis_to - now));
|
||||
|
||||
set = BMCR_LOOPBACK;
|
||||
}
|
||||
|
||||
return ret;
|
||||
ret = phy_modify(phydev, MII_BMCR, BMCR_LOOPBACK, set);
|
||||
if (ret <= 0)
|
||||
return ret;
|
||||
|
||||
if (enable) {
|
||||
/* It takes some time for PHY device to switch into
|
||||
* loopback mode.
|
||||
*/
|
||||
msleep(100);
|
||||
} else {
|
||||
priv->lb_dis_to = get_jiffies_64() + HZ * 3;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int gpy115_loopback(struct phy_device *phydev, bool enable)
|
||||
|
||||
@@ -174,7 +174,6 @@ struct ax88179_data {
|
||||
u32 wol_supported;
|
||||
u32 wolopts;
|
||||
u8 disconnecting;
|
||||
u8 initialized;
|
||||
};
|
||||
|
||||
struct ax88179_int_data {
|
||||
|
||||
@@ -778,7 +778,8 @@ static int rtl8150_get_link_ksettings(struct net_device *netdev,
|
||||
struct ethtool_link_ksettings *ecmd)
|
||||
{
|
||||
rtl8150_t *dev = netdev_priv(netdev);
|
||||
short lpa, bmcr;
|
||||
short lpa = 0;
|
||||
short bmcr = 0;
|
||||
u32 supported;
|
||||
|
||||
supported = (SUPPORTED_10baseT_Half |
|
||||
|
||||
@@ -3818,8 +3818,16 @@ static int virtnet_probe(struct virtio_device *vdev)
|
||||
dev->features |= dev->hw_features & NETIF_F_ALL_TSO;
|
||||
/* (!csum && gso) case will be fixed by register_netdev() */
|
||||
}
|
||||
if (virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_CSUM))
|
||||
dev->features |= NETIF_F_RXCSUM;
|
||||
|
||||
/* 1. With VIRTIO_NET_F_GUEST_CSUM negotiation, the driver doesn't
|
||||
* need to calculate checksums for partially checksummed packets,
|
||||
* as they're considered valid by the upper layer.
|
||||
* 2. Without VIRTIO_NET_F_GUEST_CSUM negotiation, the driver only
|
||||
* receives fully checksummed packets. The device may assist in
|
||||
* validating these packets' checksums, so the driver won't have to.
|
||||
*/
|
||||
dev->features |= NETIF_F_RXCSUM;
|
||||
|
||||
if (virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_TSO4) ||
|
||||
virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_TSO6))
|
||||
dev->features |= NETIF_F_GRO_HW;
|
||||
|
||||
@@ -171,8 +171,10 @@ struct ath_common {
|
||||
unsigned int clockrate;
|
||||
|
||||
spinlock_t cc_lock;
|
||||
struct ath_cycle_counters cc_ani;
|
||||
struct ath_cycle_counters cc_survey;
|
||||
struct_group(cc,
|
||||
struct ath_cycle_counters cc_ani;
|
||||
struct ath_cycle_counters cc_survey;
|
||||
);
|
||||
|
||||
struct ath_regulatory regulatory;
|
||||
struct ath_regulatory reg_world_copy;
|
||||
|
||||
@@ -135,8 +135,7 @@ void ath9k_ps_wakeup(struct ath_softc *sc)
|
||||
if (power_mode != ATH9K_PM_AWAKE) {
|
||||
spin_lock(&common->cc_lock);
|
||||
ath_hw_cycle_counters_update(common);
|
||||
memset(&common->cc_survey, 0, sizeof(common->cc_survey));
|
||||
memset(&common->cc_ani, 0, sizeof(common->cc_ani));
|
||||
memset(&common->cc, 0, sizeof(common->cc));
|
||||
spin_unlock(&common->cc_lock);
|
||||
}
|
||||
|
||||
|
||||
@@ -883,6 +883,7 @@ void mt7921_mac_reset_work(struct work_struct *work)
|
||||
int i, ret;
|
||||
|
||||
dev_dbg(dev->mt76.dev, "chip reset\n");
|
||||
set_bit(MT76_RESET, &dev->mphy.state);
|
||||
dev->hw_full_reset = true;
|
||||
ieee80211_stop_queues(hw);
|
||||
|
||||
@@ -911,6 +912,7 @@ void mt7921_mac_reset_work(struct work_struct *work)
|
||||
}
|
||||
|
||||
dev->hw_full_reset = false;
|
||||
clear_bit(MT76_RESET, &dev->mphy.state);
|
||||
pm->suspended = false;
|
||||
ieee80211_wake_queues(hw);
|
||||
ieee80211_iterate_active_interfaces(hw,
|
||||
|
||||
@@ -78,7 +78,6 @@ int mt7921e_mac_reset(struct mt7921_dev *dev)
|
||||
mt76_wr(dev, MT_WFDMA0_HOST_INT_ENA, 0);
|
||||
mt76_wr(dev, MT_PCIE_MAC_INT_ENABLE, 0x0);
|
||||
|
||||
set_bit(MT76_RESET, &dev->mphy.state);
|
||||
set_bit(MT76_MCU_RESET, &dev->mphy.state);
|
||||
wake_up(&dev->mt76.mcu.wait);
|
||||
skb_queue_purge(&dev->mt76.mcu.res_q);
|
||||
@@ -129,7 +128,6 @@ int mt7921e_mac_reset(struct mt7921_dev *dev)
|
||||
|
||||
err = __mt7921_start(&dev->phy);
|
||||
out:
|
||||
clear_bit(MT76_RESET, &dev->mphy.state);
|
||||
|
||||
local_bh_disable();
|
||||
napi_enable(&dev->mt76.tx_napi);
|
||||
|
||||
@@ -98,7 +98,6 @@ int mt7921s_mac_reset(struct mt7921_dev *dev)
|
||||
mt76_connac_free_pending_tx_skbs(&dev->pm, NULL);
|
||||
mt76_txq_schedule_all(&dev->mphy);
|
||||
mt76_worker_disable(&dev->mt76.tx_worker);
|
||||
set_bit(MT76_RESET, &dev->mphy.state);
|
||||
set_bit(MT76_MCU_RESET, &dev->mphy.state);
|
||||
wake_up(&dev->mt76.mcu.wait);
|
||||
skb_queue_purge(&dev->mt76.mcu.res_q);
|
||||
@@ -135,7 +134,6 @@ int mt7921s_mac_reset(struct mt7921_dev *dev)
|
||||
|
||||
err = __mt7921_start(&dev->phy);
|
||||
out:
|
||||
clear_bit(MT76_RESET, &dev->mphy.state);
|
||||
|
||||
mt76_worker_enable(&dev->mt76.tx_worker);
|
||||
|
||||
|
||||
@@ -499,7 +499,8 @@ static void mt76s_tx_status_data(struct mt76_worker *worker)
|
||||
dev = container_of(sdio, struct mt76_dev, sdio);
|
||||
|
||||
while (true) {
|
||||
if (test_bit(MT76_REMOVED, &dev->phy.state))
|
||||
if (test_bit(MT76_RESET, &dev->phy.state) ||
|
||||
test_bit(MT76_REMOVED, &dev->phy.state))
|
||||
break;
|
||||
|
||||
if (!dev->drv->tx_status_data(dev, &update))
|
||||
|
||||
@@ -2991,6 +2991,18 @@ static const struct dmi_system_id bridge_d3_blacklist[] = {
|
||||
DMI_MATCH(DMI_BOARD_VERSION, "Continental Z2"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/*
|
||||
* Changing power state of root port dGPU is connected fails
|
||||
* https://gitlab.freedesktop.org/drm/amd/-/issues/3229
|
||||
*/
|
||||
.ident = "Hewlett-Packard HP Pavilion 17 Notebook PC/1972",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "1972"),
|
||||
DMI_MATCH(DMI_BOARD_VERSION, "95.33"),
|
||||
},
|
||||
},
|
||||
#endif
|
||||
{ }
|
||||
};
|
||||
|
||||
@@ -56,12 +56,9 @@ static int p2sb_get_devfn(unsigned int *devfn)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool p2sb_valid_resource(struct resource *res)
|
||||
static bool p2sb_valid_resource(const struct resource *res)
|
||||
{
|
||||
if (res->flags)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
return res->flags & ~IORESOURCE_UNSET;
|
||||
}
|
||||
|
||||
/* Copy resource from the first BAR of the device in question */
|
||||
@@ -220,16 +217,20 @@ EXPORT_SYMBOL_GPL(p2sb_bar);
|
||||
|
||||
static int __init p2sb_fs_init(void)
|
||||
{
|
||||
p2sb_cache_resources();
|
||||
return 0;
|
||||
return p2sb_cache_resources();
|
||||
}
|
||||
|
||||
/*
|
||||
* pci_rescan_remove_lock to avoid access to unhidden P2SB devices can
|
||||
* not be locked in sysfs pci bus rescan path because of deadlock. To
|
||||
* avoid the deadlock, access to P2SB devices with the lock at an early
|
||||
* step in kernel initialization and cache required resources. This
|
||||
* should happen after subsys_initcall which initializes PCI subsystem
|
||||
* and before device_initcall which requires P2SB resources.
|
||||
* pci_rescan_remove_lock() can not be locked in sysfs PCI bus rescan path
|
||||
* because of deadlock. To avoid the deadlock, access P2SB devices with the lock
|
||||
* at an early step in kernel initialization and cache required resources.
|
||||
*
|
||||
* We want to run as early as possible. If the P2SB was assigned a bad BAR,
|
||||
* we'll need to wait on pcibios_assign_resources() to fix it. So, our list of
|
||||
* initcall dependencies looks something like this:
|
||||
*
|
||||
* ...
|
||||
* subsys_initcall (pci_subsys_init)
|
||||
* fs_initcall (pcibios_assign_resources)
|
||||
*/
|
||||
fs_initcall(p2sb_fs_init);
|
||||
fs_initcall_sync(p2sb_fs_init);
|
||||
|
||||
@@ -57,6 +57,11 @@ module_param(turn_on_panel_on_resume, int, 0644);
|
||||
MODULE_PARM_DESC(turn_on_panel_on_resume,
|
||||
"Call HCI_PANEL_POWER_ON on resume (-1 = auto, 0 = no, 1 = yes");
|
||||
|
||||
static int hci_hotkey_quickstart = -1;
|
||||
module_param(hci_hotkey_quickstart, int, 0644);
|
||||
MODULE_PARM_DESC(hci_hotkey_quickstart,
|
||||
"Call HCI_HOTKEY_EVENT with value 0x5 for quickstart button support (-1 = auto, 0 = no, 1 = yes");
|
||||
|
||||
#define TOSHIBA_WMI_EVENT_GUID "59142400-C6A3-40FA-BADB-8A2652834100"
|
||||
|
||||
/* Scan code for Fn key on TOS1900 models */
|
||||
@@ -136,6 +141,7 @@ MODULE_PARM_DESC(turn_on_panel_on_resume,
|
||||
#define HCI_ACCEL_MASK 0x7fff
|
||||
#define HCI_ACCEL_DIRECTION_MASK 0x8000
|
||||
#define HCI_HOTKEY_DISABLE 0x0b
|
||||
#define HCI_HOTKEY_ENABLE_QUICKSTART 0x05
|
||||
#define HCI_HOTKEY_ENABLE 0x09
|
||||
#define HCI_HOTKEY_SPECIAL_FUNCTIONS 0x10
|
||||
#define HCI_LCD_BRIGHTNESS_BITS 3
|
||||
@@ -2730,10 +2736,15 @@ static int toshiba_acpi_enable_hotkeys(struct toshiba_acpi_dev *dev)
|
||||
return -ENODEV;
|
||||
|
||||
/*
|
||||
* Enable quickstart buttons if supported.
|
||||
*
|
||||
* Enable the "Special Functions" mode only if they are
|
||||
* supported and if they are activated.
|
||||
*/
|
||||
if (dev->kbd_function_keys_supported && dev->special_functions)
|
||||
if (hci_hotkey_quickstart)
|
||||
result = hci_write(dev, HCI_HOTKEY_EVENT,
|
||||
HCI_HOTKEY_ENABLE_QUICKSTART);
|
||||
else if (dev->kbd_function_keys_supported && dev->special_functions)
|
||||
result = hci_write(dev, HCI_HOTKEY_EVENT,
|
||||
HCI_HOTKEY_SPECIAL_FUNCTIONS);
|
||||
else
|
||||
@@ -3259,7 +3270,14 @@ static const char *find_hci_method(acpi_handle handle)
|
||||
* works. toshiba_acpi_resume() uses HCI_PANEL_POWER_ON to avoid changing
|
||||
* the configured brightness level.
|
||||
*/
|
||||
static const struct dmi_system_id turn_on_panel_on_resume_dmi_ids[] = {
|
||||
#define QUIRK_TURN_ON_PANEL_ON_RESUME BIT(0)
|
||||
/*
|
||||
* Some Toshibas use "quickstart" keys. On these, HCI_HOTKEY_EVENT must use
|
||||
* the value HCI_HOTKEY_ENABLE_QUICKSTART.
|
||||
*/
|
||||
#define QUIRK_HCI_HOTKEY_QUICKSTART BIT(1)
|
||||
|
||||
static const struct dmi_system_id toshiba_dmi_quirks[] = {
|
||||
{
|
||||
/* Toshiba Portégé R700 */
|
||||
/* https://bugzilla.kernel.org/show_bug.cgi?id=21012 */
|
||||
@@ -3267,6 +3285,7 @@ static const struct dmi_system_id turn_on_panel_on_resume_dmi_ids[] = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "PORTEGE R700"),
|
||||
},
|
||||
.driver_data = (void *)QUIRK_TURN_ON_PANEL_ON_RESUME,
|
||||
},
|
||||
{
|
||||
/* Toshiba Satellite/Portégé R830 */
|
||||
@@ -3276,6 +3295,7 @@ static const struct dmi_system_id turn_on_panel_on_resume_dmi_ids[] = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "R830"),
|
||||
},
|
||||
.driver_data = (void *)QUIRK_TURN_ON_PANEL_ON_RESUME,
|
||||
},
|
||||
{
|
||||
/* Toshiba Satellite/Portégé Z830 */
|
||||
@@ -3283,6 +3303,7 @@ static const struct dmi_system_id turn_on_panel_on_resume_dmi_ids[] = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Z830"),
|
||||
},
|
||||
.driver_data = (void *)(QUIRK_TURN_ON_PANEL_ON_RESUME | QUIRK_HCI_HOTKEY_QUICKSTART),
|
||||
},
|
||||
};
|
||||
|
||||
@@ -3291,6 +3312,8 @@ static int toshiba_acpi_add(struct acpi_device *acpi_dev)
|
||||
struct toshiba_acpi_dev *dev;
|
||||
const char *hci_method;
|
||||
u32 dummy;
|
||||
const struct dmi_system_id *dmi_id;
|
||||
long quirks = 0;
|
||||
int ret = 0;
|
||||
|
||||
if (toshiba_acpi)
|
||||
@@ -3443,8 +3466,15 @@ iio_error:
|
||||
}
|
||||
#endif
|
||||
|
||||
dmi_id = dmi_first_match(toshiba_dmi_quirks);
|
||||
if (dmi_id)
|
||||
quirks = (long)dmi_id->driver_data;
|
||||
|
||||
if (turn_on_panel_on_resume == -1)
|
||||
turn_on_panel_on_resume = dmi_check_system(turn_on_panel_on_resume_dmi_ids);
|
||||
turn_on_panel_on_resume = !!(quirks & QUIRK_TURN_ON_PANEL_ON_RESUME);
|
||||
|
||||
if (hci_hotkey_quickstart == -1)
|
||||
hci_hotkey_quickstart = !!(quirks & QUIRK_HCI_HOTKEY_QUICKSTART);
|
||||
|
||||
toshiba_wwan_available(dev);
|
||||
if (dev->wwan_supported)
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
* Copyright (c) 2014 - 2018 Google, Inc
|
||||
*/
|
||||
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_data/cros_ec_commands.h>
|
||||
#include <linux/platform_data/cros_ec_proto.h>
|
||||
@@ -711,16 +712,22 @@ static int cros_usbpd_charger_resume(struct device *dev)
|
||||
static SIMPLE_DEV_PM_OPS(cros_usbpd_charger_pm_ops, NULL,
|
||||
cros_usbpd_charger_resume);
|
||||
|
||||
static const struct platform_device_id cros_usbpd_charger_id[] = {
|
||||
{ DRV_NAME, 0 },
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(platform, cros_usbpd_charger_id);
|
||||
|
||||
static struct platform_driver cros_usbpd_charger_driver = {
|
||||
.driver = {
|
||||
.name = DRV_NAME,
|
||||
.pm = &cros_usbpd_charger_pm_ops,
|
||||
},
|
||||
.probe = cros_usbpd_charger_probe
|
||||
.probe = cros_usbpd_charger_probe,
|
||||
.id_table = cros_usbpd_charger_id,
|
||||
};
|
||||
|
||||
module_platform_driver(cros_usbpd_charger_driver);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_DESCRIPTION("ChromeOS EC USBPD charger");
|
||||
MODULE_ALIAS("platform:" DRV_NAME);
|
||||
|
||||
@@ -283,8 +283,7 @@ static ssize_t max_vclocks_store(struct device *dev,
|
||||
if (max < ptp->n_vclocks)
|
||||
goto out;
|
||||
|
||||
size = sizeof(int) * max;
|
||||
vclock_index = kzalloc(size, GFP_KERNEL);
|
||||
vclock_index = kcalloc(max, sizeof(int), GFP_KERNEL);
|
||||
if (!vclock_index) {
|
||||
err = -ENOMEM;
|
||||
goto out;
|
||||
|
||||
@@ -257,7 +257,7 @@ static int buck12_set_hw_dvs_levels(struct device_node *np,
|
||||
* 10: 2.50mV/usec 10mV 4uS
|
||||
* 11: 1.25mV/usec 10mV 8uS
|
||||
*/
|
||||
static const unsigned int bd7181x_ramp_table[] = { 1250, 2500, 5000, 10000 };
|
||||
static const unsigned int bd7181x_ramp_table[] = { 10000, 5000, 2500, 1250 };
|
||||
|
||||
static int bd7181x_led_set_current_limit(struct regulator_dev *rdev,
|
||||
int min_uA, int max_uA)
|
||||
|
||||
@@ -3341,6 +3341,7 @@ struct regmap *regulator_get_regmap(struct regulator *regulator)
|
||||
|
||||
return map ? map : ERR_PTR(-EOPNOTSUPP);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(regulator_get_regmap);
|
||||
|
||||
/**
|
||||
* regulator_get_hardware_vsel_register - get the HW voltage selector register
|
||||
|
||||
@@ -120,15 +120,11 @@ static ssize_t
|
||||
qedi_dbg_do_not_recover_cmd_read(struct file *filp, char __user *buffer,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
size_t cnt = 0;
|
||||
char buf[64];
|
||||
int len;
|
||||
|
||||
if (*ppos)
|
||||
return 0;
|
||||
|
||||
cnt = sprintf(buffer, "do_not_recover=%d\n", qedi_do_not_recover);
|
||||
cnt = min_t(int, count, cnt - *ppos);
|
||||
*ppos += cnt;
|
||||
return cnt;
|
||||
len = sprintf(buf, "do_not_recover=%d\n", qedi_do_not_recover);
|
||||
return simple_read_from_buffer(buffer, count, ppos, buf, len);
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
@@ -114,6 +114,18 @@ static const struct of_device_id ti_sci_pm_domain_matches[] = {
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, ti_sci_pm_domain_matches);
|
||||
|
||||
static bool ti_sci_pm_idx_exists(struct ti_sci_genpd_provider *pd_provider, u32 idx)
|
||||
{
|
||||
struct ti_sci_pm_domain *pd;
|
||||
|
||||
list_for_each_entry(pd, &pd_provider->pd_list, node) {
|
||||
if (pd->idx == idx)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static int ti_sci_pm_domain_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
@@ -153,8 +165,14 @@ static int ti_sci_pm_domain_probe(struct platform_device *pdev)
|
||||
break;
|
||||
|
||||
if (args.args_count >= 1 && args.np == dev->of_node) {
|
||||
if (args.args[0] > max_id)
|
||||
if (args.args[0] > max_id) {
|
||||
max_id = args.args[0];
|
||||
} else {
|
||||
if (ti_sci_pm_idx_exists(pd_provider, args.args[0])) {
|
||||
index++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
pd = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL);
|
||||
if (!pd)
|
||||
|
||||
@@ -350,7 +350,7 @@ static int stm32_qspi_wait_poll_status(struct stm32_qspi *qspi)
|
||||
|
||||
static int stm32_qspi_get_mode(u8 buswidth)
|
||||
{
|
||||
if (buswidth == 4)
|
||||
if (buswidth >= 4)
|
||||
return CCR_BUSWIDTH_4;
|
||||
|
||||
return buswidth;
|
||||
@@ -654,9 +654,7 @@ static int stm32_qspi_setup(struct spi_device *spi)
|
||||
return -EINVAL;
|
||||
|
||||
mode = spi->mode & (SPI_TX_OCTAL | SPI_RX_OCTAL);
|
||||
if ((mode == SPI_TX_OCTAL || mode == SPI_RX_OCTAL) ||
|
||||
((mode == (SPI_TX_OCTAL | SPI_RX_OCTAL)) &&
|
||||
gpiod_count(qspi->dev, "cs") == -ENOENT)) {
|
||||
if (mode && gpiod_count(qspi->dev, "cs") == -ENOENT) {
|
||||
dev_err(qspi->dev, "spi-rx-bus-width\\/spi-tx-bus-width\\/cs-gpios\n");
|
||||
dev_err(qspi->dev, "configuration not supported\n");
|
||||
|
||||
@@ -677,10 +675,10 @@ static int stm32_qspi_setup(struct spi_device *spi)
|
||||
qspi->cr_reg = CR_APMS | 3 << CR_FTHRES_SHIFT | CR_SSHIFT | CR_EN;
|
||||
|
||||
/*
|
||||
* Dual flash mode is only enable in case SPI_TX_OCTAL and SPI_TX_OCTAL
|
||||
* are both set in spi->mode and "cs-gpios" properties is found in DT
|
||||
* Dual flash mode is only enable in case SPI_TX_OCTAL or SPI_RX_OCTAL
|
||||
* is set in spi->mode and "cs-gpios" properties is found in DT
|
||||
*/
|
||||
if (mode == (SPI_TX_OCTAL | SPI_RX_OCTAL)) {
|
||||
if (mode) {
|
||||
qspi->cr_reg |= CR_DFM;
|
||||
dev_dbg(qspi->dev, "Dual flash mode enable");
|
||||
}
|
||||
|
||||
@@ -41,8 +41,50 @@
|
||||
#define PCI_DEVICE_ID_COMMTECH_4228PCIE 0x0021
|
||||
#define PCI_DEVICE_ID_COMMTECH_4222PCIE 0x0022
|
||||
|
||||
#define PCI_VENDOR_ID_CONNECT_TECH 0x12c4
|
||||
#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_SP_OPTO 0x0340
|
||||
#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_SP_OPTO_A 0x0341
|
||||
#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_SP_OPTO_B 0x0342
|
||||
#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_XPRS 0x0350
|
||||
#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_XPRS_A 0x0351
|
||||
#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_XPRS_B 0x0352
|
||||
#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_XPRS 0x0353
|
||||
#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_16_XPRS_A 0x0354
|
||||
#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_16_XPRS_B 0x0355
|
||||
#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_XPRS_OPTO 0x0360
|
||||
#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_XPRS_OPTO_A 0x0361
|
||||
#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_XPRS_OPTO_B 0x0362
|
||||
#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_SP 0x0370
|
||||
#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_SP_232 0x0371
|
||||
#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_SP_485 0x0372
|
||||
#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_4_SP 0x0373
|
||||
#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_6_2_SP 0x0374
|
||||
#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_6_SP 0x0375
|
||||
#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_SP_232_NS 0x0376
|
||||
#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_XP_OPTO_LEFT 0x0380
|
||||
#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_XP_OPTO_RIGHT 0x0381
|
||||
#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_XP_OPTO 0x0382
|
||||
#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_4_XPRS_OPTO 0x0392
|
||||
#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_XPRS_LP 0x03A0
|
||||
#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_XPRS_LP_232 0x03A1
|
||||
#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_XPRS_LP_485 0x03A2
|
||||
#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_XPRS_LP_232_NS 0x03A3
|
||||
#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCIE_XEG001 0x0602
|
||||
#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCIE_XR35X_BASE 0x1000
|
||||
#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCIE_XR35X_2 0x1002
|
||||
#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCIE_XR35X_4 0x1004
|
||||
#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCIE_XR35X_8 0x1008
|
||||
#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCIE_XR35X_12 0x100C
|
||||
#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCIE_XR35X_16 0x1010
|
||||
#define PCI_DEVICE_ID_CONNECT_TECH_PCI_XR79X_12_XIG00X 0x110c
|
||||
#define PCI_DEVICE_ID_CONNECT_TECH_PCI_XR79X_12_XIG01X 0x110d
|
||||
#define PCI_DEVICE_ID_CONNECT_TECH_PCI_XR79X_16 0x1110
|
||||
|
||||
#define PCI_DEVICE_ID_EXAR_XR17V4358 0x4358
|
||||
#define PCI_DEVICE_ID_EXAR_XR17V8358 0x8358
|
||||
#define PCI_DEVICE_ID_EXAR_XR17V252 0x0252
|
||||
#define PCI_DEVICE_ID_EXAR_XR17V254 0x0254
|
||||
#define PCI_DEVICE_ID_EXAR_XR17V258 0x0258
|
||||
|
||||
#define PCI_SUBDEVICE_ID_USR_2980 0x0128
|
||||
#define PCI_SUBDEVICE_ID_USR_2981 0x0129
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/iopoll.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
|
||||
#include <asm/irq.h>
|
||||
@@ -2028,7 +2029,7 @@ imx_uart_console_write(struct console *co, const char *s, unsigned int count)
|
||||
struct imx_port *sport = imx_uart_ports[co->index];
|
||||
struct imx_port_ucrs old_ucr;
|
||||
unsigned long flags;
|
||||
unsigned int ucr1;
|
||||
unsigned int ucr1, usr2;
|
||||
int locked = 1;
|
||||
|
||||
if (sport->port.sysrq)
|
||||
@@ -2059,8 +2060,8 @@ imx_uart_console_write(struct console *co, const char *s, unsigned int count)
|
||||
* Finally, wait for transmitter to become empty
|
||||
* and restore UCR1/2/3
|
||||
*/
|
||||
while (!(imx_uart_readl(sport, USR2) & USR2_TXDC));
|
||||
|
||||
read_poll_timeout_atomic(imx_uart_readl, usr2, usr2 & USR2_TXDC,
|
||||
0, USEC_PER_SEC, false, sport, USR2);
|
||||
imx_uart_ucrs_restore(sport, &old_ucr);
|
||||
|
||||
if (locked)
|
||||
|
||||
@@ -546,6 +546,12 @@ int tty_set_ldisc(struct tty_struct *tty, int disc)
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (tty->ops->ldisc_ok) {
|
||||
retval = tty->ops->ldisc_ok(tty, disc);
|
||||
if (retval)
|
||||
goto out;
|
||||
}
|
||||
|
||||
old_ldisc = tty->ldisc;
|
||||
|
||||
/* Shutdown the old discipline. */
|
||||
|
||||
@@ -3440,6 +3440,15 @@ static void con_cleanup(struct tty_struct *tty)
|
||||
tty_port_put(&vc->port);
|
||||
}
|
||||
|
||||
/*
|
||||
* We can't deal with anything but the N_TTY ldisc,
|
||||
* because we can sleep in our write() routine.
|
||||
*/
|
||||
static int con_ldisc_ok(struct tty_struct *tty, int ldisc)
|
||||
{
|
||||
return ldisc == N_TTY ? 0 : -EINVAL;
|
||||
}
|
||||
|
||||
static int default_color = 7; /* white */
|
||||
static int default_italic_color = 2; // green (ASCII)
|
||||
static int default_underline_color = 3; // cyan (ASCII)
|
||||
@@ -3566,6 +3575,7 @@ static const struct tty_operations con_ops = {
|
||||
.resize = vt_resize,
|
||||
.shutdown = con_shutdown,
|
||||
.cleanup = con_cleanup,
|
||||
.ldisc_ok = con_ldisc_ok,
|
||||
};
|
||||
|
||||
static struct cdev vc0_cdev;
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
* Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
*/
|
||||
|
||||
#include <linux/dmi.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/slab.h>
|
||||
@@ -219,6 +220,7 @@ static int dwc3_pci_quirks(struct dwc3_pci *dwc,
|
||||
|
||||
if (pdev->device == PCI_DEVICE_ID_INTEL_BYT) {
|
||||
struct gpio_desc *gpio;
|
||||
const char *bios_ver;
|
||||
int ret;
|
||||
|
||||
/* On BYT the FW does not always enable the refclock */
|
||||
@@ -276,8 +278,12 @@ static int dwc3_pci_quirks(struct dwc3_pci *dwc,
|
||||
* detection. These can be identified by them _not_
|
||||
* using the standard ACPI battery and ac drivers.
|
||||
*/
|
||||
bios_ver = dmi_get_system_info(DMI_BIOS_VERSION);
|
||||
if (acpi_dev_present("INT33FD", "1", 2) &&
|
||||
acpi_quirk_skip_acpi_ac_and_battery()) {
|
||||
acpi_quirk_skip_acpi_ac_and_battery() &&
|
||||
/* Lenovo Yoga Tablet 2 Pro 1380 uses LC824206XA instead */
|
||||
!(bios_ver &&
|
||||
strstarts(bios_ver, "BLADE_21.X64.0005.R00.1504101516"))) {
|
||||
dev_info(&pdev->dev, "Using TUSB1211 phy for charger detection\n");
|
||||
swnode = &dwc3_pci_intel_phy_charger_detect_swnode;
|
||||
}
|
||||
|
||||
@@ -1025,9 +1025,9 @@ static inline int hidg_get_minor(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = ida_simple_get(&hidg_ida, 0, 0, GFP_KERNEL);
|
||||
ret = ida_alloc(&hidg_ida, GFP_KERNEL);
|
||||
if (ret >= HIDG_MINORS) {
|
||||
ida_simple_remove(&hidg_ida, ret);
|
||||
ida_free(&hidg_ida, ret);
|
||||
ret = -ENODEV;
|
||||
}
|
||||
|
||||
@@ -1172,7 +1172,7 @@ static const struct config_item_type hid_func_type = {
|
||||
|
||||
static inline void hidg_put_minor(int minor)
|
||||
{
|
||||
ida_simple_remove(&hidg_ida, minor);
|
||||
ida_free(&hidg_ida, minor);
|
||||
}
|
||||
|
||||
static void hidg_free_inst(struct usb_function_instance *f)
|
||||
|
||||
@@ -1316,9 +1316,9 @@ static inline int gprinter_get_minor(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = ida_simple_get(&printer_ida, 0, 0, GFP_KERNEL);
|
||||
ret = ida_alloc(&printer_ida, GFP_KERNEL);
|
||||
if (ret >= PRINTER_MINORS) {
|
||||
ida_simple_remove(&printer_ida, ret);
|
||||
ida_free(&printer_ida, ret);
|
||||
ret = -ENODEV;
|
||||
}
|
||||
|
||||
@@ -1327,7 +1327,7 @@ static inline int gprinter_get_minor(void)
|
||||
|
||||
static inline void gprinter_put_minor(int minor)
|
||||
{
|
||||
ida_simple_remove(&printer_ida, minor);
|
||||
ida_free(&printer_ida, minor);
|
||||
}
|
||||
|
||||
static int gprinter_setup(int);
|
||||
|
||||
@@ -869,12 +869,12 @@ EXPORT_SYMBOL_GPL(rndis_msg_parser);
|
||||
|
||||
static inline int rndis_get_nr(void)
|
||||
{
|
||||
return ida_simple_get(&rndis_ida, 0, 1000, GFP_KERNEL);
|
||||
return ida_alloc_max(&rndis_ida, 999, GFP_KERNEL);
|
||||
}
|
||||
|
||||
static inline void rndis_put_nr(int nr)
|
||||
{
|
||||
ida_simple_remove(&rndis_ida, nr);
|
||||
ida_free(&rndis_ida, nr);
|
||||
}
|
||||
|
||||
struct rndis_params *rndis_register(void (*resp_avail)(void *v), void *v)
|
||||
|
||||
@@ -677,7 +677,7 @@ static int uss720_probe(struct usb_interface *intf,
|
||||
struct parport_uss720_private *priv;
|
||||
struct parport *pp;
|
||||
unsigned char reg;
|
||||
int i;
|
||||
int ret;
|
||||
|
||||
dev_dbg(&intf->dev, "probe: vendor id 0x%x, device id 0x%x\n",
|
||||
le16_to_cpu(usbdev->descriptor.idVendor),
|
||||
@@ -688,8 +688,8 @@ static int uss720_probe(struct usb_interface *intf,
|
||||
usb_put_dev(usbdev);
|
||||
return -ENODEV;
|
||||
}
|
||||
i = usb_set_interface(usbdev, intf->altsetting->desc.bInterfaceNumber, 2);
|
||||
dev_dbg(&intf->dev, "set interface result %d\n", i);
|
||||
ret = usb_set_interface(usbdev, intf->altsetting->desc.bInterfaceNumber, 2);
|
||||
dev_dbg(&intf->dev, "set interface result %d\n", ret);
|
||||
|
||||
interface = intf->cur_altsetting;
|
||||
|
||||
@@ -725,12 +725,18 @@ static int uss720_probe(struct usb_interface *intf,
|
||||
set_1284_register(pp, 7, 0x00, GFP_KERNEL);
|
||||
set_1284_register(pp, 6, 0x30, GFP_KERNEL); /* PS/2 mode */
|
||||
set_1284_register(pp, 2, 0x0c, GFP_KERNEL);
|
||||
/* debugging */
|
||||
get_1284_register(pp, 0, ®, GFP_KERNEL);
|
||||
dev_dbg(&intf->dev, "reg: %7ph\n", priv->reg);
|
||||
|
||||
i = usb_find_last_int_in_endpoint(interface, &epd);
|
||||
if (!i) {
|
||||
/* The Belkin F5U002 Rev 2 P80453-B USB parallel port adapter shares the
|
||||
* device ID 050d:0002 with some other device that works with this
|
||||
* driver, but it itself does not. Detect and handle the bad cable
|
||||
* here. */
|
||||
ret = get_1284_register(pp, 0, ®, GFP_KERNEL);
|
||||
dev_dbg(&intf->dev, "reg: %7ph\n", priv->reg);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
ret = usb_find_last_int_in_endpoint(interface, &epd);
|
||||
if (!ret) {
|
||||
dev_dbg(&intf->dev, "epaddr %d interval %d\n",
|
||||
epd->bEndpointAddress, epd->bInterval);
|
||||
}
|
||||
|
||||
@@ -1615,6 +1615,7 @@ void btrfs_reclaim_bgs_work(struct work_struct *work)
|
||||
container_of(work, struct btrfs_fs_info, reclaim_bgs_work);
|
||||
struct btrfs_block_group *bg;
|
||||
struct btrfs_space_info *space_info;
|
||||
LIST_HEAD(retry_list);
|
||||
|
||||
if (!test_bit(BTRFS_FS_OPEN, &fs_info->flags))
|
||||
return;
|
||||
@@ -1717,8 +1718,11 @@ void btrfs_reclaim_bgs_work(struct work_struct *work)
|
||||
}
|
||||
|
||||
next:
|
||||
if (ret)
|
||||
btrfs_mark_bg_to_reclaim(bg);
|
||||
if (ret) {
|
||||
/* Refcount held by the reclaim_bgs list after splice. */
|
||||
btrfs_get_block_group(bg);
|
||||
list_add_tail(&bg->bg_list, &retry_list);
|
||||
}
|
||||
btrfs_put_block_group(bg);
|
||||
|
||||
mutex_unlock(&fs_info->reclaim_bgs_lock);
|
||||
@@ -1738,6 +1742,9 @@ next:
|
||||
spin_unlock(&fs_info->unused_bgs_lock);
|
||||
mutex_unlock(&fs_info->reclaim_bgs_lock);
|
||||
end:
|
||||
spin_lock(&fs_info->unused_bgs_lock);
|
||||
list_splice_tail(&retry_list, &fs_info->reclaim_bgs);
|
||||
spin_unlock(&fs_info->unused_bgs_lock);
|
||||
btrfs_exclop_finish(fs_info);
|
||||
sb_end_write(fs_info->sb);
|
||||
}
|
||||
|
||||
@@ -2124,8 +2124,6 @@ static void default_options(struct f2fs_sb_info *sbi)
|
||||
F2FS_OPTION(sbi).bggc_mode = BGGC_MODE_ON;
|
||||
F2FS_OPTION(sbi).memory_mode = MEMORY_MODE_NORMAL;
|
||||
|
||||
sbi->sb->s_flags &= ~SB_INLINECRYPT;
|
||||
|
||||
set_opt(sbi, INLINE_XATTR);
|
||||
set_opt(sbi, INLINE_DATA);
|
||||
set_opt(sbi, INLINE_DENTRY);
|
||||
|
||||
@@ -128,7 +128,7 @@ module_param(enable_oplocks, bool, 0644);
|
||||
MODULE_PARM_DESC(enable_oplocks, "Enable or disable oplocks. Default: y/Y/1");
|
||||
|
||||
module_param(enable_gcm_256, bool, 0644);
|
||||
MODULE_PARM_DESC(enable_gcm_256, "Enable requesting strongest (256 bit) GCM encryption. Default: n/N/0");
|
||||
MODULE_PARM_DESC(enable_gcm_256, "Enable requesting strongest (256 bit) GCM encryption. Default: y/Y/0");
|
||||
|
||||
module_param(require_gcm_256, bool, 0644);
|
||||
MODULE_PARM_DESC(require_gcm_256, "Require strongest (256 bit) GCM encryption. Default: n/N/0");
|
||||
|
||||
@@ -60,13 +60,18 @@ udf_disk_stamp_to_time(struct timespec64 *dest, struct timestamp src)
|
||||
dest->tv_sec = mktime64(year, src.month, src.day, src.hour, src.minute,
|
||||
src.second);
|
||||
dest->tv_sec -= offset * 60;
|
||||
dest->tv_nsec = 1000 * (src.centiseconds * 10000 +
|
||||
src.hundredsOfMicroseconds * 100 + src.microseconds);
|
||||
|
||||
/*
|
||||
* Sanitize nanosecond field since reportedly some filesystems are
|
||||
* recorded with bogus sub-second values.
|
||||
*/
|
||||
dest->tv_nsec %= NSEC_PER_SEC;
|
||||
if (src.centiseconds < 100 && src.hundredsOfMicroseconds < 100 &&
|
||||
src.microseconds < 100) {
|
||||
dest->tv_nsec = 1000 * (src.centiseconds * 10000 +
|
||||
src.hundredsOfMicroseconds * 100 + src.microseconds);
|
||||
} else {
|
||||
dest->tv_nsec = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -21,6 +21,8 @@ enum kcov_mode {
|
||||
KCOV_MODE_TRACE_PC = 2,
|
||||
/* Collecting comparison operands mode. */
|
||||
KCOV_MODE_TRACE_CMP = 3,
|
||||
/* The process owns a KCOV remote reference. */
|
||||
KCOV_MODE_REMOTE = 4,
|
||||
};
|
||||
|
||||
#define KCOV_IN_CTXSW (1 << 30)
|
||||
|
||||
@@ -676,6 +676,8 @@ struct x86_cpu_id {
|
||||
__u16 model;
|
||||
__u16 steppings;
|
||||
__u16 feature; /* bit index */
|
||||
/* Solely for kernel-internal use: DO NOT EXPORT to userspace! */
|
||||
__u16 flags;
|
||||
kernel_ulong_t driver_data;
|
||||
};
|
||||
|
||||
|
||||
@@ -156,6 +156,13 @@ struct serial_struct;
|
||||
*
|
||||
* Optional. Called under the @tty->termios_rwsem. May sleep.
|
||||
*
|
||||
* @ldisc_ok: ``int ()(struct tty_struct *tty, int ldisc)``
|
||||
*
|
||||
* This routine allows the @tty driver to decide if it can deal
|
||||
* with a particular @ldisc.
|
||||
*
|
||||
* Optional. Called under the @tty->ldisc_sem and @tty->termios_rwsem.
|
||||
*
|
||||
* @set_ldisc: ``void ()(struct tty_struct *tty)``
|
||||
*
|
||||
* This routine allows the @tty driver to be notified when the device's
|
||||
@@ -375,6 +382,7 @@ struct tty_operations {
|
||||
void (*hangup)(struct tty_struct *tty);
|
||||
int (*break_ctl)(struct tty_struct *tty, int state);
|
||||
void (*flush_buffer)(struct tty_struct *tty);
|
||||
int (*ldisc_ok)(struct tty_struct *tty, int ldisc);
|
||||
void (*set_ldisc)(struct tty_struct *tty);
|
||||
void (*wait_until_sent)(struct tty_struct *tty, int timeout);
|
||||
void (*send_xchar)(struct tty_struct *tty, char ch);
|
||||
|
||||
@@ -127,6 +127,7 @@ struct Qdisc {
|
||||
|
||||
struct rcu_head rcu;
|
||||
netdevice_tracker dev_tracker;
|
||||
struct lock_class_key root_lock_key;
|
||||
|
||||
ANDROID_KABI_RESERVE(1);
|
||||
|
||||
|
||||
@@ -241,6 +241,14 @@ static int io_sq_thread(void *data)
|
||||
}
|
||||
current->flags |= PF_NO_SETAFFINITY;
|
||||
|
||||
/*
|
||||
* Force audit context to get setup, in case we do prep side async
|
||||
* operations that would trigger an audit call before any issue side
|
||||
* audit has been done.
|
||||
*/
|
||||
audit_uring_entry(IORING_OP_NOP);
|
||||
audit_uring_exit(true, 0);
|
||||
|
||||
mutex_lock(&sqd->lock);
|
||||
while (1) {
|
||||
bool cap_entries, sqt_spin = false;
|
||||
|
||||
@@ -18,7 +18,9 @@
|
||||
#include <linux/mm.h>
|
||||
#include "gcov.h"
|
||||
|
||||
#if (__GNUC__ >= 10)
|
||||
#if (__GNUC__ >= 14)
|
||||
#define GCOV_COUNTERS 9
|
||||
#elif (__GNUC__ >= 10)
|
||||
#define GCOV_COUNTERS 8
|
||||
#elif (__GNUC__ >= 7)
|
||||
#define GCOV_COUNTERS 9
|
||||
|
||||
@@ -630,6 +630,7 @@ static int kcov_ioctl_locked(struct kcov *kcov, unsigned int cmd,
|
||||
return -EINVAL;
|
||||
kcov->mode = mode;
|
||||
t->kcov = kcov;
|
||||
t->kcov_mode = KCOV_MODE_REMOTE;
|
||||
kcov->t = t;
|
||||
kcov->remote = true;
|
||||
kcov->remote_size = remote_arg->area_size;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user