mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
This is the 4.14.67 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAlt/52wACgkQONu9yGCS aT4qyA//eiAXOs6i7QlqYm3oHxK2ByCskQmQuL+lz1dhCIRPglZ/tdrk0JGdKin/ 7QGXshq1IqcUwl+qfyeK9X9gD38+Q+5AzUeBq4rZloCv4iW0Ys4IPnvXTzd0I2OE FbLDXOtoTYCljtMySqqFuBDgNmhaF/KJMGXN5zbo1UgXGEj9wD5eGgp+S9xNJ2uF VZTbL1PiNGKjFByBhK4bOLEzgGClCVpVFjvblGIYlzVjJ9Ye45mDzt2S3x07/vJ/ YOx78tVQSqA7LpdkIufwXWLhQpxurEOvmzQQZKKZJ6zl7vqopVdBhtrejf1p1zY0 qpHyGPKxY7F2npTERK82ZbWZggugjc9/g869fwnRikaz12GFBxoTQTKBKIYk9wXz 8ej9wnA4XsqD5rgteBl2PA05wCt79wYoNrnFWk/j7BWjZqyCNIvQLudEPcCJQN9k gL6skpWw3tFB/LlMfUmJ5pEPDt6LNSV5o4gQ95oK7KUULekkx1A/dmJr0F2iyLC5 gLVjsEjf2gBLEg/F+7UrTPcwi579dqH/9QAdfMUaDQwacThW+VW21PAOz8+c9ftu 4TZlRr04njx5javc5jn73ccWLYXpEAPrrqd/iyJK1/EIjUlJmRAsP1/n9ZgvFYQB 0pajA3wb6DpSH9ImLJjuQhVxSGNmGcqCNq+UmnOZiAyNm6fl3f0= =bSpC -----END PGP SIGNATURE----- Merge 4.14.67 into android-4.14-p Changes in 4.14.67 ext4: fix spectre gadget in ext4_mb_regular_allocator() drm/i915/kvmgt: Fix potential Spectre v1 EDAC: Add missing MEM_LRDDR4 entry in edac_mem_types[] pty: fix O_CLOEXEC for TIOCGPTPEER arm: dts: armada: Fix "#cooling-cells" property's name vfio: ccw: fix error return in vfio_ccw_sch_event perf tools: Fix error index for pmu event parser Input: synaptics-rmi4 - fix axis-swap behavior IB/mlx4: Fix an error handling path in 'mlx4_ib_rereg_user_mr()' drm/bridge/sii8620: fix loops in EDID fetch logic drm/bridge/sii8620: fix potential buffer overflow ARC: Explicitly add -mmedium-calls to CFLAGS hwmon: (nct6775) Fix loop limit soc: imx: gpcv2: correct PGC offset usb: dwc3: pci: add support for Intel IceLake usb: gadget: ffs: Fix BUG when userland exits with submitted AIO transfers usb: dwc2: gadget: Fix issue in dwc2_gadget_start_isoc() usb: dwc3: of-simple: fix use-after-free on remove ACPI / EC: Use ec_no_wakeup on Thinkpad X1 Carbon 6th netfilter: ipv6: nf_defrag: reduce struct net memory waste netfilter: nf_ct_helper: Fix possible panic after nf_conntrack_helper_unregister selftests: pstore: return Kselftest Skip code for skipped tests selftests: static_keys: return Kselftest Skip code for skipped tests selftests: sysctl: return Kselftest Skip code for skipped tests selftests: user: return Kselftest Skip code for skipped tests selftests: zram: return Kselftest Skip code for skipped tests selftests: vm: return Kselftest Skip code for skipped tests selftests: sync: add config fragment for testing sync framework ARM: dts: NSP: Fix i2c controller interrupt type ARM: dts: NSP: Fix PCIe controllers interrupt types ARM: dts: BCM5301x: Fix i2c controller interrupt type ARM: dts: Cygnus: Fix I2C controller interrupt type ARM: dts: Cygnus: Fix PCIe controller interrupt type arm64: dts: specify 1.8V EMMC capabilities for bcm958742k arm64: dts: specify 1.8V EMMC capabilities for bcm958742t arm64: dts: ns2: Fix I2C controller interrupt type arm64: dts: ns2: Fix PCIe controller interrupt type arm64: dts: Stingray: Fix I2C controller interrupt type drivers/perf: xgene_pmu: Fix IOB SLOW PMU parser error drm: mali-dp: Enable Global SE interrupts mask for DP500 drm/arm/malidp: Preserve LAYER_FORMAT contents when setting format IB/rxe: Fix missing completion for mem_reg work requests libahci: Fix possible Spectre-v1 pmp indexing in ahci_led_store() usb: dwc2: alloc dma aligned buffer for isoc split in usb: dwc2: fix isoc split in transfer with no data usb: gadget: composite: fix delayed_status race condition when set_interface usb: gadget: dwc2: fix memory leak in gadget_init() dwc2: gadget: Fix ISOC IN DDMA PID bitfield value calculation xen: add error handling for xenbus_printf pNFS: Always free the session slot on error in nfs4_layoutget_handle_exception scsi: xen-scsifront: add error handling for xenbus_printf xen/scsiback: add error handling for xenbus_printf arm64: dma-mapping: clear buffers allocated with FORCE_CONTIGUOUS flag arm64: make secondary_start_kernel() notrace qed: Fix possible memory leak in Rx error path handling. qed: Add sanity check for SIMD fastpath handler. qed: Do not advertise DCBX_LLD_MANAGED capability. enic: initialize enic->rfs_h.lock in enic_probe net: hamradio: use eth_broadcast_addr net: propagate dev_get_valid_name return code net: stmmac: socfpga: add additional ocp reset line for Stratix10 nvmet: reset keep alive timer in controller enable block: sed-opal: Fix a couple off by one bugs ARC: Enable machine_desc->init_per_cpu for !CONFIG_SMP nbd: Add the nbd NBD_DISCONNECT_ON_CLOSE config flag. net: davinci_emac: match the mdio device against its compatible if possible sctp: fix erroneous inc of snmp SctpFragUsrMsgs KVM: arm/arm64: Drop resource size check for GICV window drm/bridge/sii8620: fix display of packed pixel modes in MHL2 locking/lockdep: Do not record IRQ state within lockdep code selftests: bpf: notification about privilege required to run test_kmod.sh testing script mtd: dataflash: Use ULL suffix for 64-bit constants x86/microcode/intel: Fix memleak in save_microcode_patch() ipv6: mcast: fix unsolicited report interval after receiving querys Smack: Mark inode instant in smack_task_to_inode arm64: dts: msm8916: fix Coresight ETF graph connections batman-adv: Fix bat_ogm_iv best gw refcnt after netlink dump batman-adv: Fix bat_v best gw refcnt after netlink dump batman-adv: Avoid storing non-TT-sync flags on singular entries too batman-adv: Fix multicast TT issues with bogus ROAM flags cxgb4: when disabling dcb set txq dcb priority to 0 iio: pressure: bmp280: fix relative humidity unit brcmfmac: stop watchdog before detach and free everything ARM: dts: am437x: make edt-ft5x06 a wakeup source ALSA: seq: Fix UBSAN warning at SNDRV_SEQ_IOCTL_QUERY_NEXT_CLIENT ioctl usb: xhci: remove the code build warning usb: xhci: increase CRS timeout value NFC: pn533: Fix wrong GFP flag usage typec: tcpm: Fix a msecs vs jiffies bug kconfig: fix line numbers for if-entries in menu tree perf record: Support s390 random socket_id assignment perf test session topology: Fix test on s390 perf report powerpc: Fix crash if callchain is empty perf tools: Fix a clang 7.0 compilation error perf bench: Fix numa report output code ARM: davinci: board-da850-evm: fix WP pin polarity for MMC/SD netfilter: nf_log: fix uninit read in nf_log_proc_dostring ceph: fix dentry leak in splice_dentry() net/mlx5: E-Switch, Disallow vlan/spoofcheck setup if not being esw manager nfp: cast sizeof() to int when comparing with error code selftests/x86/sigreturn/64: Fix spurious failures on AMD CPUs selftests/x86/sigreturn: Do minor cleanups ARM: dts: da850: Fix interrups property for gpio ARM64: dts: meson-gxl: fix Mali GPU compatible string dmaengine: pl330: report BURST residue granularity dmaengine: k3dma: Off by one in k3_of_dma_simple_xlate() ath10k: update the phymode along with bandwidth change request md/raid10: fix that replacement cannot complete recovery after reassemble dev-dax: check_vma: ratelimit dev_info-s nl80211: relax ht operation checks for mesh nl80211: check nla_parse_nested() return values drm/exynos: gsc: Fix support for NV16/61, YUV420/YVU420 and YUV422 modes drm/exynos: decon5433: Fix per-plane global alpha for XRGB modes drm/exynos: decon5433: Fix WINCONx reset value drbd: Fix drbd_request_prepare() discard handling bpf, s390: fix potential memleak when later bpf_jit_prog fails PCI: xilinx: Add missing of_node_put() PCI: xilinx-nwl: Add missing of_node_put() PCI: faraday: Add missing of_node_put() bnx2x: Fix receiving tx-timeout in error or recovery state. fsl/fman: fix parser reporting bad checksum on short frames dpaa_eth: DPAA SGT needs to be 256B acpi/nfit: fix cmd_rc for acpi_nfit_ctl to always return a value openrisc: entry: Fix delay slot exception detection m68k: fix "bad page state" oops on ColdFire boot objtool: Support GCC 8 '-fnoreorder-functions' ipvlan: call dev_change_flags when ipvlan mode is reset drm/amdgpu: fix swapped emit_ib_size in vce3 x86/mm/32: Initialize the CR4 shadow before __flush_tlb_all() HID: wacom: Correct touch maximum XY of 2nd-gen Intuos ARM: imx_v6_v7_defconfig: Select ULPI support ARM: imx_v4_v5_defconfig: Select ULPI support bpf: hash map: decrement counter on error tracing: Use __printf markup to silence compiler kasan: fix shadow_size calculation error in kasan_module_alloc smsc75xx: Add workaround for gigabit link up hardware errata. drm/bridge/sii8620: Fix display of packed pixel modes samples/bpf: add missing <linux/if_vlan.h> samples/bpf: Check the result of system() samples/bpf: Check the error of write() and read() ieee802154: 6lowpan: set IFLA_LINK netfilter: x_tables: set module owner for icmp(6) matches ipv6: make ipv6_renew_options() interrupt/kernel safe net: qrtr: Broadcast messages only from control port sh_eth: fix invalid context bug while calling auto-negotiation by ethtool sh_eth: fix invalid context bug while changing link options by ethtool ravb: fix invalid context bug while calling auto-negotiation by ethtool ravb: fix invalid context bug while changing link options by ethtool ARM: pxa: irq: fix handling of ICMR registers in suspend/resume net/sched: act_tunnel_key: fix NULL dereference when 'goto chain' is used nvmem: Don't let a NULL cell_id for nvmem_cell_get() crash us ieee802154: at86rf230: switch from BUG_ON() to WARN_ON() on problem ieee802154: at86rf230: use __func__ macro for debug messages ieee802154: fakelb: switch from BUG_ON() to WARN_ON() on problem gpu: host1x: Check whether size of unpin isn't 0 drm/tegra: Fix comparison operator for buffer size drm/armada: fix colorkey mode property drm/armada: fix irq handling netfilter: nft_compat: explicitly reject ERROR and standard target netfilter: nf_conntrack: Fix possible possible crash on module loading. ARC: Improve cmpxchg syscall implementation bnxt_en: Fix inconsistent BNXT_FLAG_AGG_RINGS logic. bnxt_en: Always set output parameters in bnxt_get_max_rings(). bnxt_en: Fix for system hang if request_irq fails scsi: qedf: Send the driver state to MFW scsi: qedi: Send driver state to MFW perf llvm-utils: Remove bashism from kernel include fetch script perf tools: Fix compilation errors on gcc8 perf script python: Fix dict reference counting nfit: fix unchecked dereference in acpi_nfit_ctl RDMA/mlx5: Fix memory leak in mlx5_ib_create_srq() error path ARM: 8780/1: ftrace: Only set kernel memory back to read-only after boot ARM: DRA7/OMAP5: Enable ACTLR[0] (Enable invalidates of BTB) for secondary cores ARM: dts: am3517.dtsi: Disable reference to OMAP3 OTG controller ixgbe: Be more careful when modifying MAC filters tools: build: Use HOSTLDFLAGS with fixdep kbuild: suppress warnings from 'getconf LFS_*' packet: reset network header if packet shorter than ll reserved space qlogic: check kstrtoul() for errors tcp: remove DELAYED ACK events in DCTCP pinctrl: ingenic: Fix inverted direction for < JZ4770 pinctrl: nsp: off by ones in nsp_pinmux_enable() pinctrl: nsp: Fix potential NULL dereference drm/nouveau/gem: off by one bugs in nouveau_gem_pushbuf_reloc_apply() hv/netvsc: fix handling of fallback to single queue mode net/ethernet/freescale/fman: fix cross-build error ibmvnic: Fix error recovery on login failure btrfs: scrub: Don't use inode page cache in scrub_handle_errored_block() octeon_mgmt: Fix MIX registers configuration on MTU setup net: usb: rtl8150: demote allmulti message to dev_dbg() kvmclock: fix TSC calibration for nested guests PCI: OF: Fix I/O space page leak PCI: versatile: Fix I/O space page leak net: qca_spi: Avoid packet drop during initial sync net: qca_spi: Make sure the QCA7000 reset is triggered net: qca_spi: Fix log level if probe fails tcp: identify cryptic messages as TCP seq # bugs soc: imx: gpc: restrict register range for regmap access ACPI / EC: Use ec_no_wakeup on more Thinkpad X1 Carbon 6th systems ARM: dts: imx6: RDU2: fix irq type for mv88e6xxx switch nvme: fix handling of metadata_len for NVME_IOCTL_IO_CMD KVM: irqfd: fix race between EPOLLHUP and irq_bypass_register_consumer f2fs: return error during fill_super f2fs: sanity check for total valid node blocks parisc: Remove ordered stores from syscall.S xfrm_user: prevent leaking 2 bytes of kernel memory netfilter: conntrack: dccp: treat SYNC/SYNCACK as invalid if no prior state packet: refine ring v3 block size test to hold one frame net/smc: no shutdown in state SMC_LISTEN parisc: Remove unnecessary barriers from spinlock.h PCI: hotplug: Don't leak pci_slot on registration failure PCI: Skip MPS logic for Virtual Functions (VFs) PCI: pciehp: Fix use-after-free on unplug PCI: pciehp: Fix unprotected list iteration in IRQ handler i2c: core: ACPI: Properly set status byte to 0 for multi-byte writes i2c: imx: Fix race condition in dma read reiserfs: fix broken xattr handling (heap corruption, bad retval) Linux 4.14.67 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
commit
75ac55a8f1
8
Makefile
8
Makefile
@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 14
|
||||
SUBLEVEL = 66
|
||||
SUBLEVEL = 67
|
||||
EXTRAVERSION =
|
||||
NAME = Petit Gorille
|
||||
|
||||
@ -357,9 +357,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
|
||||
else if [ -x /bin/bash ]; then echo /bin/bash; \
|
||||
else echo sh; fi ; fi)
|
||||
|
||||
HOST_LFS_CFLAGS := $(shell getconf LFS_CFLAGS)
|
||||
HOST_LFS_LDFLAGS := $(shell getconf LFS_LDFLAGS)
|
||||
HOST_LFS_LIBS := $(shell getconf LFS_LIBS)
|
||||
HOST_LFS_CFLAGS := $(shell getconf LFS_CFLAGS 2>/dev/null)
|
||||
HOST_LFS_LDFLAGS := $(shell getconf LFS_LDFLAGS 2>/dev/null)
|
||||
HOST_LFS_LIBS := $(shell getconf LFS_LIBS 2>/dev/null)
|
||||
|
||||
HOSTCC = gcc
|
||||
HOSTCXX = g++
|
||||
|
@ -16,7 +16,7 @@ endif
|
||||
|
||||
KBUILD_DEFCONFIG := nsim_700_defconfig
|
||||
|
||||
cflags-y += -fno-common -pipe -fno-builtin -D__linux__
|
||||
cflags-y += -fno-common -pipe -fno-builtin -mmedium-calls -D__linux__
|
||||
cflags-$(CONFIG_ISA_ARCOMPACT) += -mA7
|
||||
cflags-$(CONFIG_ISA_ARCV2) += -mcpu=archs
|
||||
|
||||
@ -140,16 +140,3 @@ dtbs: scripts
|
||||
|
||||
archclean:
|
||||
$(Q)$(MAKE) $(clean)=$(boot)
|
||||
|
||||
# Hacks to enable final link due to absence of link-time branch relexation
|
||||
# and gcc choosing optimal(shorter) branches at -O3
|
||||
#
|
||||
# vineetg Feb 2010: -mlong-calls switched off for overall kernel build
|
||||
# However lib/decompress_inflate.o (.init.text) calls
|
||||
# zlib_inflate_workspacesize (.text) causing relocation errors.
|
||||
# Thus forcing all exten calls in this file to be long calls
|
||||
export CFLAGS_decompress_inflate.o = -mmedium-calls
|
||||
export CFLAGS_initramfs.o = -mmedium-calls
|
||||
ifdef CONFIG_SMP
|
||||
export CFLAGS_core.o = -mmedium-calls
|
||||
endif
|
||||
|
@ -34,9 +34,7 @@ struct machine_desc {
|
||||
const char *name;
|
||||
const char **dt_compat;
|
||||
void (*init_early)(void);
|
||||
#ifdef CONFIG_SMP
|
||||
void (*init_per_cpu)(unsigned int);
|
||||
#endif
|
||||
void (*init_machine)(void);
|
||||
void (*init_late)(void);
|
||||
|
||||
|
@ -31,10 +31,10 @@ void __init init_IRQ(void)
|
||||
/* a SMP H/w block could do IPI IRQ request here */
|
||||
if (plat_smp_ops.init_per_cpu)
|
||||
plat_smp_ops.init_per_cpu(smp_processor_id());
|
||||
#endif
|
||||
|
||||
if (machine_desc->init_per_cpu)
|
||||
machine_desc->init_per_cpu(smp_processor_id());
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -47,7 +47,8 @@ SYSCALL_DEFINE0(arc_gettls)
|
||||
SYSCALL_DEFINE3(arc_usr_cmpxchg, int *, uaddr, int, expected, int, new)
|
||||
{
|
||||
struct pt_regs *regs = current_pt_regs();
|
||||
int uval = -EFAULT;
|
||||
u32 uval;
|
||||
int ret;
|
||||
|
||||
/*
|
||||
* This is only for old cores lacking LLOCK/SCOND, which by defintion
|
||||
@ -60,23 +61,47 @@ SYSCALL_DEFINE3(arc_usr_cmpxchg, int *, uaddr, int, expected, int, new)
|
||||
/* Z indicates to userspace if operation succeded */
|
||||
regs->status32 &= ~STATUS_Z_MASK;
|
||||
|
||||
if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int)))
|
||||
return -EFAULT;
|
||||
ret = access_ok(VERIFY_WRITE, uaddr, sizeof(*uaddr));
|
||||
if (!ret)
|
||||
goto fail;
|
||||
|
||||
again:
|
||||
preempt_disable();
|
||||
|
||||
if (__get_user(uval, uaddr))
|
||||
goto done;
|
||||
ret = __get_user(uval, uaddr);
|
||||
if (ret)
|
||||
goto fault;
|
||||
|
||||
if (uval != expected)
|
||||
goto out;
|
||||
|
||||
ret = __put_user(new, uaddr);
|
||||
if (ret)
|
||||
goto fault;
|
||||
|
||||
if (uval == expected) {
|
||||
if (!__put_user(new, uaddr))
|
||||
regs->status32 |= STATUS_Z_MASK;
|
||||
}
|
||||
|
||||
done:
|
||||
out:
|
||||
preempt_enable();
|
||||
return uval;
|
||||
|
||||
fault:
|
||||
preempt_enable();
|
||||
|
||||
return uval;
|
||||
if (unlikely(ret != -EFAULT))
|
||||
goto fail;
|
||||
|
||||
down_read(¤t->mm->mmap_sem);
|
||||
ret = fixup_user_fault(current, current->mm, (unsigned long) uaddr,
|
||||
FAULT_FLAG_WRITE, NULL);
|
||||
up_read(¤t->mm->mmap_sem);
|
||||
|
||||
if (likely(!ret))
|
||||
goto again;
|
||||
|
||||
fail:
|
||||
force_sig(SIGSEGV, current);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ISA_ARCV2
|
||||
|
@ -87,6 +87,11 @@
|
||||
};
|
||||
};
|
||||
|
||||
/* Table Table 5-79 of the TRM shows 480ab000 is reserved */
|
||||
&usb_otg_hs {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&iva {
|
||||
status = "disabled";
|
||||
};
|
||||
|
@ -535,6 +535,8 @@
|
||||
|
||||
touchscreen-size-x = <480>;
|
||||
touchscreen-size-y = <272>;
|
||||
|
||||
wakeup-source;
|
||||
};
|
||||
|
||||
tlv320aic3106: tlv320aic3106@1b {
|
||||
|
@ -170,7 +170,7 @@
|
||||
3700 5
|
||||
3900 6
|
||||
4000 7>;
|
||||
cooling-cells = <2>;
|
||||
#cooling-cells = <2>;
|
||||
};
|
||||
|
||||
gpio-leds {
|
||||
|
@ -216,7 +216,7 @@
|
||||
reg = <0x18008000 0x100>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
interrupts = <GIC_SPI 85 IRQ_TYPE_NONE>;
|
||||
interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clock-frequency = <100000>;
|
||||
status = "disabled";
|
||||
};
|
||||
@ -245,7 +245,7 @@
|
||||
reg = <0x1800b000 0x100>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
interrupts = <GIC_SPI 86 IRQ_TYPE_NONE>;
|
||||
interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clock-frequency = <100000>;
|
||||
status = "disabled";
|
||||
};
|
||||
@ -256,7 +256,7 @@
|
||||
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &gic GIC_SPI 100 IRQ_TYPE_NONE>;
|
||||
interrupt-map = <0 0 0 0 &gic GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
linux,pci-domain = <0>;
|
||||
|
||||
@ -278,10 +278,10 @@
|
||||
compatible = "brcm,iproc-msi";
|
||||
msi-controller;
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <GIC_SPI 96 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 97 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 98 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 99 IRQ_TYPE_NONE>;
|
||||
interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
@ -291,7 +291,7 @@
|
||||
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &gic GIC_SPI 106 IRQ_TYPE_NONE>;
|
||||
interrupt-map = <0 0 0 0 &gic GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
linux,pci-domain = <1>;
|
||||
|
||||
@ -313,10 +313,10 @@
|
||||
compatible = "brcm,iproc-msi";
|
||||
msi-controller;
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <GIC_SPI 102 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 103 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 104 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 105 IRQ_TYPE_NONE>;
|
||||
interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -391,7 +391,7 @@
|
||||
reg = <0x38000 0x50>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
interrupts = <GIC_SPI 89 IRQ_TYPE_NONE>;
|
||||
interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clock-frequency = <100000>;
|
||||
dma-coherent;
|
||||
status = "disabled";
|
||||
@ -496,7 +496,7 @@
|
||||
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &gic GIC_SPI 131 IRQ_TYPE_NONE>;
|
||||
interrupt-map = <0 0 0 0 &gic GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
linux,pci-domain = <0>;
|
||||
|
||||
@ -519,10 +519,10 @@
|
||||
compatible = "brcm,iproc-msi";
|
||||
msi-controller;
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <GIC_SPI 127 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 128 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 129 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 130 IRQ_TYPE_NONE>;
|
||||
interrupts = <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>;
|
||||
brcm,pcie-msi-inten;
|
||||
};
|
||||
};
|
||||
@ -533,7 +533,7 @@
|
||||
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &gic GIC_SPI 137 IRQ_TYPE_NONE>;
|
||||
interrupt-map = <0 0 0 0 &gic GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
linux,pci-domain = <1>;
|
||||
|
||||
@ -556,10 +556,10 @@
|
||||
compatible = "brcm,iproc-msi";
|
||||
msi-controller;
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <GIC_SPI 133 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 134 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 135 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 136 IRQ_TYPE_NONE>;
|
||||
interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>;
|
||||
brcm,pcie-msi-inten;
|
||||
};
|
||||
};
|
||||
@ -570,7 +570,7 @@
|
||||
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &gic GIC_SPI 143 IRQ_TYPE_NONE>;
|
||||
interrupt-map = <0 0 0 0 &gic GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
linux,pci-domain = <2>;
|
||||
|
||||
@ -593,10 +593,10 @@
|
||||
compatible = "brcm,iproc-msi";
|
||||
msi-controller;
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <GIC_SPI 139 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 140 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 141 IRQ_TYPE_NONE>,
|
||||
<GIC_SPI 142 IRQ_TYPE_NONE>;
|
||||
interrupts = <GIC_SPI 139 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>;
|
||||
brcm,pcie-msi-inten;
|
||||
};
|
||||
};
|
||||
|
@ -365,7 +365,7 @@
|
||||
i2c0: i2c@18009000 {
|
||||
compatible = "brcm,iproc-i2c";
|
||||
reg = <0x18009000 0x50>;
|
||||
interrupts = <GIC_SPI 121 IRQ_TYPE_NONE>;
|
||||
interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
clock-frequency = <100000>;
|
||||
|
@ -518,11 +518,7 @@
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
reg = <0x226000 0x1000>;
|
||||
interrupts = <42 IRQ_TYPE_EDGE_BOTH
|
||||
43 IRQ_TYPE_EDGE_BOTH 44 IRQ_TYPE_EDGE_BOTH
|
||||
45 IRQ_TYPE_EDGE_BOTH 46 IRQ_TYPE_EDGE_BOTH
|
||||
47 IRQ_TYPE_EDGE_BOTH 48 IRQ_TYPE_EDGE_BOTH
|
||||
49 IRQ_TYPE_EDGE_BOTH 50 IRQ_TYPE_EDGE_BOTH>;
|
||||
interrupts = <42 43 44 45 46 47 48 49 50>;
|
||||
ti,ngpio = <144>;
|
||||
ti,davinci-gpio-unbanked = <0>;
|
||||
status = "disabled";
|
||||
|
@ -644,7 +644,7 @@
|
||||
dsa,member = <0 0>;
|
||||
eeprom-length = <512>;
|
||||
interrupt-parent = <&gpio6>;
|
||||
interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
|
||||
interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
|
||||
|
@ -144,9 +144,11 @@ CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_CHIPIDEA=y
|
||||
CONFIG_USB_CHIPIDEA_UDC=y
|
||||
CONFIG_USB_CHIPIDEA_HOST=y
|
||||
CONFIG_USB_CHIPIDEA_ULPI=y
|
||||
CONFIG_NOP_USB_XCEIV=y
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_ETH=m
|
||||
CONFIG_USB_ULPI_BUS=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
|
@ -289,6 +289,7 @@ CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_CHIPIDEA=y
|
||||
CONFIG_USB_CHIPIDEA_UDC=y
|
||||
CONFIG_USB_CHIPIDEA_HOST=y
|
||||
CONFIG_USB_CHIPIDEA_ULPI=y
|
||||
CONFIG_USB_SERIAL=m
|
||||
CONFIG_USB_SERIAL_GENERIC=y
|
||||
CONFIG_USB_SERIAL_FTDI_SIO=m
|
||||
@ -325,6 +326,7 @@ CONFIG_USB_GADGETFS=m
|
||||
CONFIG_USB_FUNCTIONFS=m
|
||||
CONFIG_USB_MASS_STORAGE=m
|
||||
CONFIG_USB_G_SERIAL=m
|
||||
CONFIG_USB_ULPI_BUS=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
|
@ -773,7 +773,7 @@ static struct gpiod_lookup_table mmc_gpios_table = {
|
||||
GPIO_LOOKUP("davinci_gpio.0", DA850_MMCSD_CD_PIN, "cd",
|
||||
GPIO_ACTIVE_LOW),
|
||||
GPIO_LOOKUP("davinci_gpio.0", DA850_MMCSD_WP_PIN, "wp",
|
||||
GPIO_ACTIVE_LOW),
|
||||
GPIO_ACTIVE_HIGH),
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -109,6 +109,45 @@ void omap5_erratum_workaround_801819(void)
|
||||
static inline void omap5_erratum_workaround_801819(void) { }
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_HARDEN_BRANCH_PREDICTOR
|
||||
/*
|
||||
* Configure ACR and enable ACTLR[0] (Enable invalidates of BTB with
|
||||
* ICIALLU) to activate the workaround for secondary Core.
|
||||
* NOTE: it is assumed that the primary core's configuration is done
|
||||
* by the boot loader (kernel will detect a misconfiguration and complain
|
||||
* if this is not done).
|
||||
*
|
||||
* In General Purpose(GP) devices, ACR bit settings can only be done
|
||||
* by ROM code in "secure world" using the smc call and there is no
|
||||
* option to update the "firmware" on such devices. This also works for
|
||||
* High security(HS) devices, as a backup option in case the
|
||||
* "update" is not done in the "security firmware".
|
||||
*/
|
||||
static void omap5_secondary_harden_predictor(void)
|
||||
{
|
||||
u32 acr, acr_mask;
|
||||
|
||||
asm volatile ("mrc p15, 0, %0, c1, c0, 1" : "=r" (acr));
|
||||
|
||||
/*
|
||||
* ACTLR[0] (Enable invalidates of BTB with ICIALLU)
|
||||
*/
|
||||
acr_mask = BIT(0);
|
||||
|
||||
/* Do we already have it done.. if yes, skip expensive smc */
|
||||
if ((acr & acr_mask) == acr_mask)
|
||||
return;
|
||||
|
||||
acr |= acr_mask;
|
||||
omap_smc1(OMAP5_DRA7_MON_SET_ACR_INDEX, acr);
|
||||
|
||||
pr_debug("%s: ARM ACR setup for CVE_2017_5715 applied on CPU%d\n",
|
||||
__func__, smp_processor_id());
|
||||
}
|
||||
#else
|
||||
static inline void omap5_secondary_harden_predictor(void) { }
|
||||
#endif
|
||||
|
||||
static void omap4_secondary_init(unsigned int cpu)
|
||||
{
|
||||
/*
|
||||
@ -131,6 +170,8 @@ static void omap4_secondary_init(unsigned int cpu)
|
||||
set_cntfreq();
|
||||
/* Configure ACR to disable streaming WA for 801819 */
|
||||
omap5_erratum_workaround_801819();
|
||||
/* Enable ACR to allow for ICUALLU workaround */
|
||||
omap5_secondary_harden_predictor();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -185,7 +185,7 @@ static int pxa_irq_suspend(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < pxa_internal_irq_nr / 32; i++) {
|
||||
for (i = 0; i < DIV_ROUND_UP(pxa_internal_irq_nr, 32); i++) {
|
||||
void __iomem *base = irq_base(i);
|
||||
|
||||
saved_icmr[i] = __raw_readl(base + ICMR);
|
||||
@ -204,7 +204,7 @@ static void pxa_irq_resume(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < pxa_internal_irq_nr / 32; i++) {
|
||||
for (i = 0; i < DIV_ROUND_UP(pxa_internal_irq_nr, 32); i++) {
|
||||
void __iomem *base = irq_base(i);
|
||||
|
||||
__raw_writel(saved_icmr[i], base + ICMR);
|
||||
|
@ -745,19 +745,28 @@ static int __mark_rodata_ro(void *unused)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int kernel_set_to_readonly __read_mostly;
|
||||
|
||||
void mark_rodata_ro(void)
|
||||
{
|
||||
kernel_set_to_readonly = 1;
|
||||
stop_machine(__mark_rodata_ro, NULL, NULL);
|
||||
}
|
||||
|
||||
void set_kernel_text_rw(void)
|
||||
{
|
||||
if (!kernel_set_to_readonly)
|
||||
return;
|
||||
|
||||
set_section_perms(ro_perms, ARRAY_SIZE(ro_perms), false,
|
||||
current->active_mm);
|
||||
}
|
||||
|
||||
void set_kernel_text_ro(void)
|
||||
{
|
||||
if (!kernel_set_to_readonly)
|
||||
return;
|
||||
|
||||
set_section_perms(ro_perms, ARRAY_SIZE(ro_perms), true,
|
||||
current->active_mm);
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
&apb {
|
||||
mali: gpu@c0000 {
|
||||
compatible = "amlogic,meson-gxbb-mali", "arm,mali-450";
|
||||
compatible = "amlogic,meson-gxl-mali", "arm,mali-450";
|
||||
reg = <0x0 0xc0000 0x0 0x40000>;
|
||||
interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>,
|
||||
|
@ -118,7 +118,7 @@
|
||||
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &gic 0 GIC_SPI 281 IRQ_TYPE_NONE>;
|
||||
interrupt-map = <0 0 0 0 &gic 0 GIC_SPI 281 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
linux,pci-domain = <0>;
|
||||
|
||||
@ -149,7 +149,7 @@
|
||||
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &gic 0 GIC_SPI 305 IRQ_TYPE_NONE>;
|
||||
interrupt-map = <0 0 0 0 &gic 0 GIC_SPI 305 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
linux,pci-domain = <4>;
|
||||
|
||||
@ -566,7 +566,7 @@
|
||||
reg = <0x66080000 0x100>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
interrupts = <GIC_SPI 394 IRQ_TYPE_NONE>;
|
||||
interrupts = <GIC_SPI 394 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clock-frequency = <100000>;
|
||||
status = "disabled";
|
||||
};
|
||||
@ -594,7 +594,7 @@
|
||||
reg = <0x660b0000 0x100>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
interrupts = <GIC_SPI 395 IRQ_TYPE_NONE>;
|
||||
interrupts = <GIC_SPI 395 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clock-frequency = <100000>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
@ -43,6 +43,10 @@
|
||||
enet-phy-lane-swap;
|
||||
};
|
||||
|
||||
&sdio0 {
|
||||
mmc-ddr-1_8v;
|
||||
};
|
||||
|
||||
&uart2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
@ -42,3 +42,7 @@
|
||||
&gphy0 {
|
||||
enet-phy-lane-swap;
|
||||
};
|
||||
|
||||
&sdio0 {
|
||||
mmc-ddr-1_8v;
|
||||
};
|
||||
|
@ -409,7 +409,7 @@
|
||||
reg = <0x000b0000 0x100>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
interrupts = <GIC_SPI 177 IRQ_TYPE_NONE>;
|
||||
interrupts = <GIC_SPI 177 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clock-frequency = <100000>;
|
||||
status = "disabled";
|
||||
};
|
||||
@ -453,7 +453,7 @@
|
||||
reg = <0x000e0000 0x100>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
interrupts = <GIC_SPI 178 IRQ_TYPE_NONE>;
|
||||
interrupts = <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clock-frequency = <100000>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
@ -1132,14 +1132,14 @@
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
etf_out: endpoint {
|
||||
etf_in: endpoint {
|
||||
slave-mode;
|
||||
remote-endpoint = <&funnel0_out>;
|
||||
};
|
||||
};
|
||||
port@1 {
|
||||
reg = <0>;
|
||||
etf_in: endpoint {
|
||||
etf_out: endpoint {
|
||||
remote-endpoint = <&replicator_in>;
|
||||
};
|
||||
};
|
||||
|
@ -214,7 +214,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle)
|
||||
* This is the secondary CPU boot entry. We're using this CPUs
|
||||
* idle thread stack, but a set of temporary page tables.
|
||||
*/
|
||||
asmlinkage void secondary_start_kernel(void)
|
||||
asmlinkage notrace void secondary_start_kernel(void)
|
||||
{
|
||||
struct mm_struct *mm = &init_mm;
|
||||
unsigned int cpu;
|
||||
|
@ -629,13 +629,14 @@ static void *__iommu_alloc_attrs(struct device *dev, size_t size,
|
||||
size >> PAGE_SHIFT);
|
||||
return NULL;
|
||||
}
|
||||
if (!coherent)
|
||||
__dma_flush_area(page_to_virt(page), iosize);
|
||||
|
||||
addr = dma_common_contiguous_remap(page, size, VM_USERMAP,
|
||||
prot,
|
||||
__builtin_return_address(0));
|
||||
if (!addr) {
|
||||
if (addr) {
|
||||
memset(addr, 0, size);
|
||||
if (!coherent)
|
||||
__dma_flush_area(page_to_virt(page), iosize);
|
||||
} else {
|
||||
iommu_dma_unmap_page(dev, *handle, iosize, 0, attrs);
|
||||
dma_release_from_contiguous(dev, page,
|
||||
size >> PAGE_SHIFT);
|
||||
|
@ -44,6 +44,7 @@ extern inline pmd_t *pmd_alloc_kernel(pgd_t *pgd, unsigned long address)
|
||||
static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t page,
|
||||
unsigned long address)
|
||||
{
|
||||
pgtable_page_dtor(page);
|
||||
__free_page(page);
|
||||
}
|
||||
|
||||
@ -74,8 +75,9 @@ static inline struct page *pte_alloc_one(struct mm_struct *mm,
|
||||
return page;
|
||||
}
|
||||
|
||||
extern inline void pte_free(struct mm_struct *mm, struct page *page)
|
||||
static inline void pte_free(struct mm_struct *mm, struct page *page)
|
||||
{
|
||||
pgtable_page_dtor(page);
|
||||
__free_page(page);
|
||||
}
|
||||
|
||||
|
@ -221,12 +221,6 @@ EXCEPTION_ENTRY(_data_page_fault_handler)
|
||||
l.addi r3,r1,0 // pt_regs
|
||||
/* r4 set be EXCEPTION_HANDLE */ // effective address of fault
|
||||
|
||||
/*
|
||||
* __PHX__: TODO
|
||||
*
|
||||
* all this can be written much simpler. look at
|
||||
* DTLB miss handler in the CONFIG_GUARD_PROTECTED_CORE part
|
||||
*/
|
||||
#ifdef CONFIG_OPENRISC_NO_SPR_SR_DSX
|
||||
l.lwz r6,PT_PC(r3) // address of an offending insn
|
||||
l.lwz r6,0(r6) // instruction that caused pf
|
||||
@ -258,7 +252,7 @@ EXCEPTION_ENTRY(_data_page_fault_handler)
|
||||
|
||||
#else
|
||||
|
||||
l.lwz r6,PT_SR(r3) // SR
|
||||
l.mfspr r6,r0,SPR_SR // SR
|
||||
l.andi r6,r6,SPR_SR_DSX // check for delay slot exception
|
||||
l.sfne r6,r0 // exception happened in delay slot
|
||||
l.bnf 7f
|
||||
|
@ -141,8 +141,7 @@
|
||||
* r4 - EEAR exception EA
|
||||
* r10 - current pointing to current_thread_info struct
|
||||
* r12 - syscall 0, since we didn't come from syscall
|
||||
* r13 - temp it actually contains new SR, not needed anymore
|
||||
* r31 - handler address of the handler we'll jump to
|
||||
* r30 - handler address of the handler we'll jump to
|
||||
*
|
||||
* handler has to save remaining registers to the exception
|
||||
* ksp frame *before* tainting them!
|
||||
@ -178,6 +177,7 @@
|
||||
/* r1 is KSP, r30 is __pa(KSP) */ ;\
|
||||
tophys (r30,r1) ;\
|
||||
l.sw PT_GPR12(r30),r12 ;\
|
||||
/* r4 use for tmp before EA */ ;\
|
||||
l.mfspr r12,r0,SPR_EPCR_BASE ;\
|
||||
l.sw PT_PC(r30),r12 ;\
|
||||
l.mfspr r12,r0,SPR_ESR_BASE ;\
|
||||
@ -197,7 +197,10 @@
|
||||
/* r12 == 1 if we come from syscall */ ;\
|
||||
CLEAR_GPR(r12) ;\
|
||||
/* ----- turn on MMU ----- */ ;\
|
||||
l.ori r30,r0,(EXCEPTION_SR) ;\
|
||||
/* Carry DSX into exception SR */ ;\
|
||||
l.mfspr r30,r0,SPR_SR ;\
|
||||
l.andi r30,r30,SPR_SR_DSX ;\
|
||||
l.ori r30,r30,(EXCEPTION_SR) ;\
|
||||
l.mtspr r0,r30,SPR_ESR_BASE ;\
|
||||
/* r30: EA address of handler */ ;\
|
||||
LOAD_SYMBOL_2_GPR(r30,handler) ;\
|
||||
|
@ -358,7 +358,7 @@ static inline int in_delay_slot(struct pt_regs *regs)
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
return regs->sr & SPR_SR_DSX;
|
||||
return mfspr(SPR_SR) & SPR_SR_DSX;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,6 @@ static inline void arch_spin_lock_flags(arch_spinlock_t *x,
|
||||
{
|
||||
volatile unsigned int *a;
|
||||
|
||||
mb();
|
||||
a = __ldcw_align(x);
|
||||
while (__ldcw(a) == 0)
|
||||
while (*a == 0)
|
||||
@ -30,16 +29,15 @@ static inline void arch_spin_lock_flags(arch_spinlock_t *x,
|
||||
local_irq_disable();
|
||||
} else
|
||||
cpu_relax();
|
||||
mb();
|
||||
}
|
||||
|
||||
static inline void arch_spin_unlock(arch_spinlock_t *x)
|
||||
{
|
||||
volatile unsigned int *a;
|
||||
mb();
|
||||
|
||||
a = __ldcw_align(x);
|
||||
*a = 1;
|
||||
mb();
|
||||
*a = 1;
|
||||
}
|
||||
|
||||
static inline int arch_spin_trylock(arch_spinlock_t *x)
|
||||
@ -47,10 +45,8 @@ static inline int arch_spin_trylock(arch_spinlock_t *x)
|
||||
volatile unsigned int *a;
|
||||
int ret;
|
||||
|
||||
mb();
|
||||
a = __ldcw_align(x);
|
||||
ret = __ldcw(a) != 0;
|
||||
mb();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -629,12 +629,12 @@ cas_action:
|
||||
stw %r1, 4(%sr2,%r20)
|
||||
#endif
|
||||
/* The load and store could fail */
|
||||
1: ldw,ma 0(%r26), %r28
|
||||
1: ldw 0(%r26), %r28
|
||||
sub,<> %r28, %r25, %r0
|
||||
2: stw,ma %r24, 0(%r26)
|
||||
2: stw %r24, 0(%r26)
|
||||
/* Free lock */
|
||||
sync
|
||||
stw,ma %r20, 0(%sr2,%r20)
|
||||
stw %r20, 0(%sr2,%r20)
|
||||
#if ENABLE_LWS_DEBUG
|
||||
/* Clear thread register indicator */
|
||||
stw %r0, 4(%sr2,%r20)
|
||||
@ -798,30 +798,30 @@ cas2_action:
|
||||
ldo 1(%r0),%r28
|
||||
|
||||
/* 8bit CAS */
|
||||
13: ldb,ma 0(%r26), %r29
|
||||
13: ldb 0(%r26), %r29
|
||||
sub,= %r29, %r25, %r0
|
||||
b,n cas2_end
|
||||
14: stb,ma %r24, 0(%r26)
|
||||
14: stb %r24, 0(%r26)
|
||||
b cas2_end
|
||||
copy %r0, %r28
|
||||
nop
|
||||
nop
|
||||
|
||||
/* 16bit CAS */
|
||||
15: ldh,ma 0(%r26), %r29
|
||||
15: ldh 0(%r26), %r29
|
||||
sub,= %r29, %r25, %r0
|
||||
b,n cas2_end
|
||||
16: sth,ma %r24, 0(%r26)
|
||||
16: sth %r24, 0(%r26)
|
||||
b cas2_end
|
||||
copy %r0, %r28
|
||||
nop
|
||||
nop
|
||||
|
||||
/* 32bit CAS */
|
||||
17: ldw,ma 0(%r26), %r29
|
||||
17: ldw 0(%r26), %r29
|
||||
sub,= %r29, %r25, %r0
|
||||
b,n cas2_end
|
||||
18: stw,ma %r24, 0(%r26)
|
||||
18: stw %r24, 0(%r26)
|
||||
b cas2_end
|
||||
copy %r0, %r28
|
||||
nop
|
||||
@ -829,10 +829,10 @@ cas2_action:
|
||||
|
||||
/* 64bit CAS */
|
||||
#ifdef CONFIG_64BIT
|
||||
19: ldd,ma 0(%r26), %r29
|
||||
19: ldd 0(%r26), %r29
|
||||
sub,*= %r29, %r25, %r0
|
||||
b,n cas2_end
|
||||
20: std,ma %r24, 0(%r26)
|
||||
20: std %r24, 0(%r26)
|
||||
copy %r0, %r28
|
||||
#else
|
||||
/* Compare first word */
|
||||
@ -851,7 +851,7 @@ cas2_action:
|
||||
cas2_end:
|
||||
/* Free lock */
|
||||
sync
|
||||
stw,ma %r20, 0(%sr2,%r20)
|
||||
stw %r20, 0(%sr2,%r20)
|
||||
/* Enable interrupts */
|
||||
ssm PSW_SM_I, %r0
|
||||
/* Return to userspace, set no error */
|
||||
|
@ -1403,6 +1403,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *fp)
|
||||
goto free_addrs;
|
||||
}
|
||||
if (bpf_jit_prog(&jit, fp)) {
|
||||
bpf_jit_binary_free(header);
|
||||
fp = orig_fp;
|
||||
goto free_addrs;
|
||||
}
|
||||
|
@ -190,8 +190,11 @@ static void save_microcode_patch(void *data, unsigned int size)
|
||||
p = memdup_patch(data, size);
|
||||
if (!p)
|
||||
pr_err("Error allocating buffer %p\n", data);
|
||||
else
|
||||
else {
|
||||
list_replace(&iter->plist, &p->plist);
|
||||
kfree(iter->data);
|
||||
kfree(iter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -143,6 +143,7 @@ static unsigned long kvm_get_tsc_khz(void)
|
||||
src = &hv_clock[cpu].pvti;
|
||||
tsc_khz = pvclock_tsc_khz(src);
|
||||
put_cpu();
|
||||
setup_force_cpu_cap(X86_FEATURE_TSC_KNOWN_FREQ);
|
||||
return tsc_khz;
|
||||
}
|
||||
|
||||
|
@ -223,6 +223,11 @@ static void notrace start_secondary(void *unused)
|
||||
#ifdef CONFIG_X86_32
|
||||
/* switch away from the initial page table */
|
||||
load_cr3(swapper_pg_dir);
|
||||
/*
|
||||
* Initialize the CR4 shadow before doing anything that could
|
||||
* try to read it.
|
||||
*/
|
||||
cr4_init_shadow();
|
||||
__flush_tlb_all();
|
||||
#endif
|
||||
load_current_idt();
|
||||
|
@ -877,7 +877,7 @@ static size_t response_get_string(const struct parsed_resp *resp, int n,
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (n > resp->num) {
|
||||
if (n >= resp->num) {
|
||||
pr_debug("Response has %d tokens. Can't access %d\n",
|
||||
resp->num, n);
|
||||
return 0;
|
||||
@ -899,7 +899,7 @@ static u64 response_get_u64(const struct parsed_resp *resp, int n)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (n > resp->num) {
|
||||
if (n >= resp->num) {
|
||||
pr_debug("Response has %d tokens. Can't access %d\n",
|
||||
resp->num, n);
|
||||
return 0;
|
||||
|
@ -2031,6 +2031,17 @@ static inline void acpi_ec_query_exit(void)
|
||||
}
|
||||
}
|
||||
|
||||
static const struct dmi_system_id acpi_ec_no_wakeup[] = {
|
||||
{
|
||||
.ident = "Thinkpad X1 Carbon 6th",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_FAMILY, "Thinkpad X1 Carbon 6th"),
|
||||
},
|
||||
},
|
||||
{ },
|
||||
};
|
||||
|
||||
int __init acpi_ec_init(void)
|
||||
{
|
||||
int result;
|
||||
@ -2041,6 +2052,15 @@ int __init acpi_ec_init(void)
|
||||
if (result)
|
||||
return result;
|
||||
|
||||
/*
|
||||
* Disable EC wakeup on following systems to prevent periodic
|
||||
* wakeup from EC GPE.
|
||||
*/
|
||||
if (dmi_check_system(acpi_ec_no_wakeup)) {
|
||||
ec_no_wakeup = true;
|
||||
pr_debug("Disabling EC wakeup on suspend-to-idle\n");
|
||||
}
|
||||
|
||||
/* Drivers must be started after acpi_ec_query_init() */
|
||||
dsdt_fail = acpi_bus_register_driver(&acpi_ec_driver);
|
||||
/*
|
||||
|
@ -224,6 +224,8 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
|
||||
const guid_t *guid;
|
||||
int rc, i;
|
||||
|
||||
if (cmd_rc)
|
||||
*cmd_rc = -EINVAL;
|
||||
func = cmd;
|
||||
if (cmd == ND_CMD_CALL) {
|
||||
call_pkg = buf;
|
||||
@ -314,6 +316,8 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
|
||||
* If we return an error (like elsewhere) then caller wouldn't
|
||||
* be able to rely upon data returned to make calculation.
|
||||
*/
|
||||
if (cmd_rc)
|
||||
*cmd_rc = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/gfp.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/nospec.h>
|
||||
#include <linux/blkdev.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/interrupt.h>
|
||||
@ -1135,10 +1136,12 @@ static ssize_t ahci_led_store(struct ata_port *ap, const char *buf,
|
||||
|
||||
/* get the slot number from the message */
|
||||
pmp = (state & EM_MSG_LED_PMP_SLOT) >> 8;
|
||||
if (pmp < EM_MAX_SLOTS)
|
||||
if (pmp < EM_MAX_SLOTS) {
|
||||
pmp = array_index_nospec(pmp, EM_MAX_SLOTS);
|
||||
emp = &pp->em_priv[pmp];
|
||||
else
|
||||
} else {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* mask off the activity bits if we are in sw_activity
|
||||
* mode, user should turn off sw_activity before setting
|
||||
|
@ -1244,8 +1244,8 @@ drbd_request_prepare(struct drbd_device *device, struct bio *bio, unsigned long
|
||||
_drbd_start_io_acct(device, req);
|
||||
|
||||
/* process discards always from our submitter thread */
|
||||
if ((bio_op(bio) & REQ_OP_WRITE_ZEROES) ||
|
||||
(bio_op(bio) & REQ_OP_DISCARD))
|
||||
if (bio_op(bio) == REQ_OP_WRITE_ZEROES ||
|
||||
bio_op(bio) == REQ_OP_DISCARD)
|
||||
goto queue_for_submitter_thread;
|
||||
|
||||
if (rw == WRITE && req->private_bio && req->i.size
|
||||
|
@ -76,6 +76,7 @@ struct link_dead_args {
|
||||
#define NBD_HAS_CONFIG_REF 4
|
||||
#define NBD_BOUND 5
|
||||
#define NBD_DESTROY_ON_DISCONNECT 6
|
||||
#define NBD_DISCONNECT_ON_CLOSE 7
|
||||
|
||||
struct nbd_config {
|
||||
u32 flags;
|
||||
@ -138,6 +139,7 @@ static void nbd_config_put(struct nbd_device *nbd);
|
||||
static void nbd_connect_reply(struct genl_info *info, int index);
|
||||
static int nbd_genl_status(struct sk_buff *skb, struct genl_info *info);
|
||||
static void nbd_dead_link_work(struct work_struct *work);
|
||||
static void nbd_disconnect_and_put(struct nbd_device *nbd);
|
||||
|
||||
static inline struct device *nbd_to_dev(struct nbd_device *nbd)
|
||||
{
|
||||
@ -1291,6 +1293,12 @@ out:
|
||||
static void nbd_release(struct gendisk *disk, fmode_t mode)
|
||||
{
|
||||
struct nbd_device *nbd = disk->private_data;
|
||||
struct block_device *bdev = bdget_disk(disk, 0);
|
||||
|
||||
if (test_bit(NBD_DISCONNECT_ON_CLOSE, &nbd->config->runtime_flags) &&
|
||||
bdev->bd_openers == 0)
|
||||
nbd_disconnect_and_put(nbd);
|
||||
|
||||
nbd_config_put(nbd);
|
||||
nbd_put(nbd);
|
||||
}
|
||||
@ -1690,6 +1698,10 @@ again:
|
||||
&config->runtime_flags);
|
||||
put_dev = true;
|
||||
}
|
||||
if (flags & NBD_CFLAG_DISCONNECT_ON_CLOSE) {
|
||||
set_bit(NBD_DISCONNECT_ON_CLOSE,
|
||||
&config->runtime_flags);
|
||||
}
|
||||
}
|
||||
|
||||
if (info->attrs[NBD_ATTR_SOCKETS]) {
|
||||
@ -1734,6 +1746,16 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void nbd_disconnect_and_put(struct nbd_device *nbd)
|
||||
{
|
||||
mutex_lock(&nbd->config_lock);
|
||||
nbd_disconnect(nbd);
|
||||
mutex_unlock(&nbd->config_lock);
|
||||
if (test_and_clear_bit(NBD_HAS_CONFIG_REF,
|
||||
&nbd->config->runtime_flags))
|
||||
nbd_config_put(nbd);
|
||||
}
|
||||
|
||||
static int nbd_genl_disconnect(struct sk_buff *skb, struct genl_info *info)
|
||||
{
|
||||
struct nbd_device *nbd;
|
||||
@ -1766,12 +1788,7 @@ static int nbd_genl_disconnect(struct sk_buff *skb, struct genl_info *info)
|
||||
nbd_put(nbd);
|
||||
return 0;
|
||||
}
|
||||
mutex_lock(&nbd->config_lock);
|
||||
nbd_disconnect(nbd);
|
||||
mutex_unlock(&nbd->config_lock);
|
||||
if (test_and_clear_bit(NBD_HAS_CONFIG_REF,
|
||||
&nbd->config->runtime_flags))
|
||||
nbd_config_put(nbd);
|
||||
nbd_disconnect_and_put(nbd);
|
||||
nbd_config_put(nbd);
|
||||
nbd_put(nbd);
|
||||
return 0;
|
||||
@ -1782,7 +1799,7 @@ static int nbd_genl_reconfigure(struct sk_buff *skb, struct genl_info *info)
|
||||
struct nbd_device *nbd = NULL;
|
||||
struct nbd_config *config;
|
||||
int index;
|
||||
int ret = -EINVAL;
|
||||
int ret = 0;
|
||||
bool put_dev = false;
|
||||
|
||||
if (!netlink_capable(skb, CAP_SYS_ADMIN))
|
||||
@ -1822,6 +1839,7 @@ static int nbd_genl_reconfigure(struct sk_buff *skb, struct genl_info *info)
|
||||
!nbd->task_recv) {
|
||||
dev_err(nbd_to_dev(nbd),
|
||||
"not configured, cannot reconfigure\n");
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -1846,6 +1864,14 @@ static int nbd_genl_reconfigure(struct sk_buff *skb, struct genl_info *info)
|
||||
&config->runtime_flags))
|
||||
refcount_inc(&nbd->refs);
|
||||
}
|
||||
|
||||
if (flags & NBD_CFLAG_DISCONNECT_ON_CLOSE) {
|
||||
set_bit(NBD_DISCONNECT_ON_CLOSE,
|
||||
&config->runtime_flags);
|
||||
} else {
|
||||
clear_bit(NBD_DISCONNECT_ON_CLOSE,
|
||||
&config->runtime_flags);
|
||||
}
|
||||
}
|
||||
|
||||
if (info->attrs[NBD_ATTR_SOCKETS]) {
|
||||
|
@ -188,14 +188,16 @@ static int check_vma(struct dev_dax *dev_dax, struct vm_area_struct *vma,
|
||||
|
||||
/* prevent private mappings from being established */
|
||||
if ((vma->vm_flags & VM_MAYSHARE) != VM_MAYSHARE) {
|
||||
dev_info(dev, "%s: %s: fail, attempted private mapping\n",
|
||||
dev_info_ratelimited(dev,
|
||||
"%s: %s: fail, attempted private mapping\n",
|
||||
current->comm, func);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
mask = dax_region->align - 1;
|
||||
if (vma->vm_start & mask || vma->vm_end & mask) {
|
||||
dev_info(dev, "%s: %s: fail, unaligned vma (%#lx - %#lx, %#lx)\n",
|
||||
dev_info_ratelimited(dev,
|
||||
"%s: %s: fail, unaligned vma (%#lx - %#lx, %#lx)\n",
|
||||
current->comm, func, vma->vm_start, vma->vm_end,
|
||||
mask);
|
||||
return -EINVAL;
|
||||
@ -203,13 +205,15 @@ static int check_vma(struct dev_dax *dev_dax, struct vm_area_struct *vma,
|
||||
|
||||
if ((dax_region->pfn_flags & (PFN_DEV|PFN_MAP)) == PFN_DEV
|
||||
&& (vma->vm_flags & VM_DONTCOPY) == 0) {
|
||||
dev_info(dev, "%s: %s: fail, dax range requires MADV_DONTFORK\n",
|
||||
dev_info_ratelimited(dev,
|
||||
"%s: %s: fail, dax range requires MADV_DONTFORK\n",
|
||||
current->comm, func);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!vma_is_dax(vma)) {
|
||||
dev_info(dev, "%s: %s: fail, vma is not DAX capable\n",
|
||||
dev_info_ratelimited(dev,
|
||||
"%s: %s: fail, vma is not DAX capable\n",
|
||||
current->comm, func);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -787,7 +787,7 @@ static struct dma_chan *k3_of_dma_simple_xlate(struct of_phandle_args *dma_spec,
|
||||
struct k3_dma_dev *d = ofdma->of_dma_data;
|
||||
unsigned int request = dma_spec->args[0];
|
||||
|
||||
if (request > d->dma_requests)
|
||||
if (request >= d->dma_requests)
|
||||
return NULL;
|
||||
|
||||
return dma_get_slave_channel(&(d->chans[request].vc.chan));
|
||||
|
@ -2923,7 +2923,7 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id)
|
||||
pd->src_addr_widths = PL330_DMA_BUSWIDTHS;
|
||||
pd->dst_addr_widths = PL330_DMA_BUSWIDTHS;
|
||||
pd->directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
|
||||
pd->residue_granularity = DMA_RESIDUE_GRANULARITY_SEGMENT;
|
||||
pd->residue_granularity = DMA_RESIDUE_GRANULARITY_BURST;
|
||||
pd->max_burst = ((pl330->quirks & PL330_QUIRK_BROKEN_NO_FLUSHP) ?
|
||||
1 : PL330_MAX_BURST);
|
||||
|
||||
|
@ -215,6 +215,7 @@ const char * const edac_mem_types[] = {
|
||||
[MEM_LRDDR3] = "Load-Reduced DDR3 RAM",
|
||||
[MEM_DDR4] = "Unbuffered DDR4 RAM",
|
||||
[MEM_RDDR4] = "Registered DDR4 RAM",
|
||||
[MEM_LRDDR4] = "Load-Reduced-DDR4-RAM",
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(edac_mem_types);
|
||||
|
||||
|
@ -899,7 +899,7 @@ static const struct amdgpu_ring_funcs vce_v3_0_ring_phys_funcs = {
|
||||
.emit_frame_size =
|
||||
4 + /* vce_v3_0_emit_pipeline_sync */
|
||||
6, /* amdgpu_vce_ring_emit_fence x1 no user fence */
|
||||
.emit_ib_size = 5, /* vce_v3_0_ring_emit_ib */
|
||||
.emit_ib_size = 4, /* amdgpu_vce_ring_emit_ib */
|
||||
.emit_ib = amdgpu_vce_ring_emit_ib,
|
||||
.emit_fence = amdgpu_vce_ring_emit_fence,
|
||||
.test_ring = amdgpu_vce_ring_test_ring,
|
||||
@ -923,7 +923,7 @@ static const struct amdgpu_ring_funcs vce_v3_0_ring_vm_funcs = {
|
||||
6 + /* vce_v3_0_emit_vm_flush */
|
||||
4 + /* vce_v3_0_emit_pipeline_sync */
|
||||
6 + 6, /* amdgpu_vce_ring_emit_fence x2 vm fence */
|
||||
.emit_ib_size = 4, /* amdgpu_vce_ring_emit_ib */
|
||||
.emit_ib_size = 5, /* vce_v3_0_ring_emit_ib */
|
||||
.emit_ib = vce_v3_0_ring_emit_ib,
|
||||
.emit_vm_flush = vce_v3_0_emit_vm_flush,
|
||||
.emit_pipeline_sync = vce_v3_0_emit_pipeline_sync,
|
||||
|
@ -634,7 +634,8 @@ const struct malidp_hw_device malidp_device[MALIDP_MAX_DEVICES] = {
|
||||
.vsync_irq = MALIDP500_DE_IRQ_VSYNC,
|
||||
},
|
||||
.se_irq_map = {
|
||||
.irq_mask = MALIDP500_SE_IRQ_CONF_MODE,
|
||||
.irq_mask = MALIDP500_SE_IRQ_CONF_MODE |
|
||||
MALIDP500_SE_IRQ_GLOBAL,
|
||||
.vsync_irq = 0,
|
||||
},
|
||||
.dc_irq_map = {
|
||||
|
@ -23,6 +23,7 @@
|
||||
|
||||
/* Layer specific register offsets */
|
||||
#define MALIDP_LAYER_FORMAT 0x000
|
||||
#define LAYER_FORMAT_MASK 0x3f
|
||||
#define MALIDP_LAYER_CONTROL 0x004
|
||||
#define LAYER_ENABLE (1 << 0)
|
||||
#define LAYER_FLOWCFG_MASK 7
|
||||
@ -278,7 +279,9 @@ static void malidp_de_plane_update(struct drm_plane *plane,
|
||||
dest_w = plane->state->crtc_w;
|
||||
dest_h = plane->state->crtc_h;
|
||||
|
||||
malidp_hw_write(mp->hwdev, ms->format, mp->layer->base);
|
||||
val = malidp_hw_read(mp->hwdev, mp->layer->base);
|
||||
val = (val & ~LAYER_FORMAT_MASK) | ms->format;
|
||||
malidp_hw_write(mp->hwdev, val, mp->layer->base);
|
||||
|
||||
for (i = 0; i < ms->n_planes; i++) {
|
||||
/* calculate the offset for the layer's plane registers */
|
||||
|
@ -483,8 +483,9 @@ static irqreturn_t armada_drm_irq(int irq, void *arg)
|
||||
u32 v, stat = readl_relaxed(dcrtc->base + LCD_SPU_IRQ_ISR);
|
||||
|
||||
/*
|
||||
* This is rediculous - rather than writing bits to clear, we
|
||||
* have to set the actual status register value. This is racy.
|
||||
* Reading the ISR appears to clear bits provided CLEAN_SPU_IRQ_ISR
|
||||
* is set. Writing has some other effect to acknowledge the IRQ -
|
||||
* without this, we only get a single IRQ.
|
||||
*/
|
||||
writel_relaxed(0, dcrtc->base + LCD_SPU_IRQ_ISR);
|
||||
|
||||
@ -1104,16 +1105,22 @@ armada_drm_crtc_set_property(struct drm_crtc *crtc,
|
||||
static int armada_drm_crtc_enable_vblank(struct drm_crtc *crtc)
|
||||
{
|
||||
struct armada_crtc *dcrtc = drm_to_armada_crtc(crtc);
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&dcrtc->irq_lock, flags);
|
||||
armada_drm_crtc_enable_irq(dcrtc, VSYNC_IRQ_ENA);
|
||||
spin_unlock_irqrestore(&dcrtc->irq_lock, flags);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void armada_drm_crtc_disable_vblank(struct drm_crtc *crtc)
|
||||
{
|
||||
struct armada_crtc *dcrtc = drm_to_armada_crtc(crtc);
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&dcrtc->irq_lock, flags);
|
||||
armada_drm_crtc_disable_irq(dcrtc, VSYNC_IRQ_ENA);
|
||||
spin_unlock_irqrestore(&dcrtc->irq_lock, flags);
|
||||
}
|
||||
|
||||
static const struct drm_crtc_funcs armada_crtc_funcs = {
|
||||
@ -1221,6 +1228,7 @@ static int armada_drm_crtc_create(struct drm_device *drm, struct device *dev,
|
||||
CFG_PDWN64x66, dcrtc->base + LCD_SPU_SRAM_PARA1);
|
||||
writel_relaxed(0x2032ff81, dcrtc->base + LCD_SPU_DMA_CTRL1);
|
||||
writel_relaxed(dcrtc->irq_ena, dcrtc->base + LCD_SPU_IRQ_ENA);
|
||||
readl_relaxed(dcrtc->base + LCD_SPU_IRQ_ISR);
|
||||
writel_relaxed(0, dcrtc->base + LCD_SPU_IRQ_ISR);
|
||||
|
||||
ret = devm_request_irq(dev, irq, armada_drm_irq, 0, "armada_drm_crtc",
|
||||
|
@ -160,6 +160,7 @@ enum {
|
||||
CFG_ALPHAM_GRA = 0x1 << 16,
|
||||
CFG_ALPHAM_CFG = 0x2 << 16,
|
||||
CFG_ALPHA_MASK = 0xff << 8,
|
||||
#define CFG_ALPHA(x) ((x) << 8)
|
||||
CFG_PIXCMD_MASK = 0xff,
|
||||
};
|
||||
|
||||
|
@ -28,6 +28,7 @@ struct armada_ovl_plane_properties {
|
||||
uint16_t contrast;
|
||||
uint16_t saturation;
|
||||
uint32_t colorkey_mode;
|
||||
uint32_t colorkey_enable;
|
||||
};
|
||||
|
||||
struct armada_ovl_plane {
|
||||
@ -59,11 +60,13 @@ armada_ovl_update_attr(struct armada_ovl_plane_properties *prop,
|
||||
writel_relaxed(0x00002000, dcrtc->base + LCD_SPU_CBSH_HUE);
|
||||
|
||||
spin_lock_irq(&dcrtc->irq_lock);
|
||||
armada_updatel(prop->colorkey_mode | CFG_ALPHAM_GRA,
|
||||
armada_updatel(prop->colorkey_mode,
|
||||
CFG_CKMODE_MASK | CFG_ALPHAM_MASK | CFG_ALPHA_MASK,
|
||||
dcrtc->base + LCD_SPU_DMA_CTRL1);
|
||||
|
||||
armada_updatel(ADV_GRACOLORKEY, 0, dcrtc->base + LCD_SPU_ADV_REG);
|
||||
if (dcrtc->variant->has_spu_adv_reg)
|
||||
armada_updatel(prop->colorkey_enable,
|
||||
ADV_GRACOLORKEY | ADV_VIDCOLORKEY,
|
||||
dcrtc->base + LCD_SPU_ADV_REG);
|
||||
spin_unlock_irq(&dcrtc->irq_lock);
|
||||
}
|
||||
|
||||
@ -339,8 +342,17 @@ static int armada_ovl_plane_set_property(struct drm_plane *plane,
|
||||
dplane->prop.colorkey_vb |= K2B(val);
|
||||
update_attr = true;
|
||||
} else if (property == priv->colorkey_mode_prop) {
|
||||
dplane->prop.colorkey_mode &= ~CFG_CKMODE_MASK;
|
||||
dplane->prop.colorkey_mode |= CFG_CKMODE(val);
|
||||
if (val == CKMODE_DISABLE) {
|
||||
dplane->prop.colorkey_mode =
|
||||
CFG_CKMODE(CKMODE_DISABLE) |
|
||||
CFG_ALPHAM_CFG | CFG_ALPHA(255);
|
||||
dplane->prop.colorkey_enable = 0;
|
||||
} else {
|
||||
dplane->prop.colorkey_mode =
|
||||
CFG_CKMODE(val) |
|
||||
CFG_ALPHAM_GRA | CFG_ALPHA(0);
|
||||
dplane->prop.colorkey_enable = ADV_GRACOLORKEY;
|
||||
}
|
||||
update_attr = true;
|
||||
} else if (property == priv->brightness_prop) {
|
||||
dplane->prop.brightness = val - 256;
|
||||
@ -470,7 +482,9 @@ int armada_overlay_plane_create(struct drm_device *dev, unsigned long crtcs)
|
||||
dplane->prop.colorkey_yr = 0xfefefe00;
|
||||
dplane->prop.colorkey_ug = 0x01010100;
|
||||
dplane->prop.colorkey_vb = 0x01010100;
|
||||
dplane->prop.colorkey_mode = CFG_CKMODE(CKMODE_RGB);
|
||||
dplane->prop.colorkey_mode = CFG_CKMODE(CKMODE_RGB) |
|
||||
CFG_ALPHAM_GRA | CFG_ALPHA(0);
|
||||
dplane->prop.colorkey_enable = ADV_GRACOLORKEY;
|
||||
dplane->prop.brightness = 0;
|
||||
dplane->prop.contrast = 0x4000;
|
||||
dplane->prop.saturation = 0x4000;
|
||||
|
@ -788,6 +788,7 @@ static void sii8620_burst_rx_all(struct sii8620 *ctx)
|
||||
static void sii8620_fetch_edid(struct sii8620 *ctx)
|
||||
{
|
||||
u8 lm_ddc, ddc_cmd, int3, cbus;
|
||||
unsigned long timeout;
|
||||
int fetched, i;
|
||||
int edid_len = EDID_LENGTH;
|
||||
u8 *edid;
|
||||
@ -837,23 +838,31 @@ static void sii8620_fetch_edid(struct sii8620 *ctx)
|
||||
REG_DDC_CMD, ddc_cmd | VAL_DDC_CMD_ENH_DDC_READ_NO_ACK
|
||||
);
|
||||
|
||||
do {
|
||||
int3 = sii8620_readb(ctx, REG_INTR3);
|
||||
int3 = 0;
|
||||
timeout = jiffies + msecs_to_jiffies(200);
|
||||
for (;;) {
|
||||
cbus = sii8620_readb(ctx, REG_CBUS_STATUS);
|
||||
|
||||
if (int3 & BIT_DDC_CMD_DONE)
|
||||
break;
|
||||
|
||||
if (!(cbus & BIT_CBUS_STATUS_CBUS_CONNECTED)) {
|
||||
if (~cbus & BIT_CBUS_STATUS_CBUS_CONNECTED) {
|
||||
kfree(edid);
|
||||
edid = NULL;
|
||||
goto end;
|
||||
}
|
||||
if (int3 & BIT_DDC_CMD_DONE) {
|
||||
if (sii8620_readb(ctx, REG_DDC_DOUT_CNT)
|
||||
>= FETCH_SIZE)
|
||||
break;
|
||||
} else {
|
||||
int3 = sii8620_readb(ctx, REG_INTR3);
|
||||
}
|
||||
if (time_is_before_jiffies(timeout)) {
|
||||
ctx->error = -ETIMEDOUT;
|
||||
dev_err(ctx->dev, "timeout during EDID read\n");
|
||||
kfree(edid);
|
||||
edid = NULL;
|
||||
goto end;
|
||||
}
|
||||
} while (1);
|
||||
|
||||
sii8620_readb(ctx, REG_DDC_STATUS);
|
||||
while (sii8620_readb(ctx, REG_DDC_DOUT_CNT) < FETCH_SIZE)
|
||||
usleep_range(10, 20);
|
||||
}
|
||||
|
||||
sii8620_read_buf(ctx, REG_DDC_DATA, edid + fetched, FETCH_SIZE);
|
||||
if (fetched + FETCH_SIZE == EDID_LENGTH) {
|
||||
@ -1036,23 +1045,23 @@ static void sii8620_set_format(struct sii8620 *ctx)
|
||||
BIT_M3_P0CTRL_MHL3_P0_PIXEL_MODE_PACKED,
|
||||
ctx->use_packed_pixel ? ~0 : 0);
|
||||
} else {
|
||||
if (ctx->use_packed_pixel)
|
||||
if (ctx->use_packed_pixel) {
|
||||
sii8620_write_seq_static(ctx,
|
||||
REG_VID_MODE, BIT_VID_MODE_M1080P,
|
||||
REG_MHL_TOP_CTL, BIT_MHL_TOP_CTL_MHL_PP_SEL | 1,
|
||||
REG_MHLTX_CTL6, 0x60
|
||||
);
|
||||
else
|
||||
} else {
|
||||
sii8620_write_seq_static(ctx,
|
||||
REG_VID_MODE, 0,
|
||||
REG_MHL_TOP_CTL, 1,
|
||||
REG_MHLTX_CTL6, 0xa0
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (ctx->use_packed_pixel)
|
||||
out_fmt = VAL_TPI_FORMAT(YCBCR422, FULL) |
|
||||
BIT_TPI_OUTPUT_CSCMODE709;
|
||||
out_fmt = VAL_TPI_FORMAT(YCBCR422, FULL);
|
||||
else
|
||||
out_fmt = VAL_TPI_FORMAT(RGB, FULL);
|
||||
|
||||
@ -1187,7 +1196,7 @@ static void sii8620_start_hdmi(struct sii8620 *ctx)
|
||||
int clk = ctx->pixel_clock * (ctx->use_packed_pixel ? 2 : 3);
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(clk_spec); ++i)
|
||||
for (i = 0; i < ARRAY_SIZE(clk_spec) - 1; ++i)
|
||||
if (clk < clk_spec[i].max_clk)
|
||||
break;
|
||||
|
||||
|
@ -261,7 +261,7 @@ static void decon_win_set_pixfmt(struct decon_context *ctx, unsigned int win,
|
||||
unsigned long val;
|
||||
|
||||
val = readl(ctx->addr + DECON_WINCONx(win));
|
||||
val &= ~WINCONx_BPPMODE_MASK;
|
||||
val &= WINCONx_ENWIN_F;
|
||||
|
||||
switch (fb->format->format) {
|
||||
case DRM_FORMAT_XRGB1555:
|
||||
@ -352,8 +352,8 @@ static void decon_update_plane(struct exynos_drm_crtc *crtc,
|
||||
writel(val, ctx->addr + DECON_VIDOSDxB(win));
|
||||
}
|
||||
|
||||
val = VIDOSD_Wx_ALPHA_R_F(0x0) | VIDOSD_Wx_ALPHA_G_F(0x0) |
|
||||
VIDOSD_Wx_ALPHA_B_F(0x0);
|
||||
val = VIDOSD_Wx_ALPHA_R_F(0xff) | VIDOSD_Wx_ALPHA_G_F(0xff) |
|
||||
VIDOSD_Wx_ALPHA_B_F(0xff);
|
||||
writel(val, ctx->addr + DECON_VIDOSDxC(win));
|
||||
|
||||
val = VIDOSD_Wx_ALPHA_R_F(0x0) | VIDOSD_Wx_ALPHA_G_F(0x0) |
|
||||
|
@ -532,21 +532,25 @@ static int gsc_src_set_fmt(struct device *dev, u32 fmt)
|
||||
GSC_IN_CHROMA_ORDER_CRCB);
|
||||
break;
|
||||
case DRM_FORMAT_NV21:
|
||||
cfg |= (GSC_IN_CHROMA_ORDER_CRCB | GSC_IN_YUV420_2P);
|
||||
break;
|
||||
case DRM_FORMAT_NV61:
|
||||
cfg |= (GSC_IN_CHROMA_ORDER_CRCB |
|
||||
GSC_IN_YUV420_2P);
|
||||
cfg |= (GSC_IN_CHROMA_ORDER_CRCB | GSC_IN_YUV422_2P);
|
||||
break;
|
||||
case DRM_FORMAT_YUV422:
|
||||
cfg |= GSC_IN_YUV422_3P;
|
||||
break;
|
||||
case DRM_FORMAT_YUV420:
|
||||
cfg |= (GSC_IN_CHROMA_ORDER_CBCR | GSC_IN_YUV420_3P);
|
||||
break;
|
||||
case DRM_FORMAT_YVU420:
|
||||
cfg |= GSC_IN_YUV420_3P;
|
||||
cfg |= (GSC_IN_CHROMA_ORDER_CRCB | GSC_IN_YUV420_3P);
|
||||
break;
|
||||
case DRM_FORMAT_NV12:
|
||||
cfg |= (GSC_IN_CHROMA_ORDER_CBCR | GSC_IN_YUV420_2P);
|
||||
break;
|
||||
case DRM_FORMAT_NV16:
|
||||
cfg |= (GSC_IN_CHROMA_ORDER_CBCR |
|
||||
GSC_IN_YUV420_2P);
|
||||
cfg |= (GSC_IN_CHROMA_ORDER_CBCR | GSC_IN_YUV422_2P);
|
||||
break;
|
||||
default:
|
||||
dev_err(ippdrv->dev, "invalid target yuv order 0x%x.\n", fmt);
|
||||
@ -806,18 +810,25 @@ static int gsc_dst_set_fmt(struct device *dev, u32 fmt)
|
||||
GSC_OUT_CHROMA_ORDER_CRCB);
|
||||
break;
|
||||
case DRM_FORMAT_NV21:
|
||||
case DRM_FORMAT_NV61:
|
||||
cfg |= (GSC_OUT_CHROMA_ORDER_CRCB | GSC_OUT_YUV420_2P);
|
||||
break;
|
||||
case DRM_FORMAT_NV61:
|
||||
cfg |= (GSC_OUT_CHROMA_ORDER_CRCB | GSC_OUT_YUV422_2P);
|
||||
break;
|
||||
case DRM_FORMAT_YUV422:
|
||||
cfg |= GSC_OUT_YUV422_3P;
|
||||
break;
|
||||
case DRM_FORMAT_YUV420:
|
||||
cfg |= (GSC_OUT_CHROMA_ORDER_CBCR | GSC_OUT_YUV420_3P);
|
||||
break;
|
||||
case DRM_FORMAT_YVU420:
|
||||
cfg |= GSC_OUT_YUV420_3P;
|
||||
cfg |= (GSC_OUT_CHROMA_ORDER_CRCB | GSC_OUT_YUV420_3P);
|
||||
break;
|
||||
case DRM_FORMAT_NV12:
|
||||
cfg |= (GSC_OUT_CHROMA_ORDER_CBCR | GSC_OUT_YUV420_2P);
|
||||
break;
|
||||
case DRM_FORMAT_NV16:
|
||||
cfg |= (GSC_OUT_CHROMA_ORDER_CBCR |
|
||||
GSC_OUT_YUV420_2P);
|
||||
cfg |= (GSC_OUT_CHROMA_ORDER_CBCR | GSC_OUT_YUV422_2P);
|
||||
break;
|
||||
default:
|
||||
dev_err(ippdrv->dev, "invalid target yuv order 0x%x.\n", fmt);
|
||||
|
@ -138,6 +138,7 @@
|
||||
#define GSC_OUT_YUV420_3P (3 << 4)
|
||||
#define GSC_OUT_YUV422_1P (4 << 4)
|
||||
#define GSC_OUT_YUV422_2P (5 << 4)
|
||||
#define GSC_OUT_YUV422_3P (6 << 4)
|
||||
#define GSC_OUT_YUV444 (7 << 4)
|
||||
#define GSC_OUT_TILE_TYPE_MASK (1 << 2)
|
||||
#define GSC_OUT_TILE_C_16x8 (0 << 2)
|
||||
|
@ -42,6 +42,8 @@
|
||||
#include <linux/vfio.h>
|
||||
#include <linux/mdev.h>
|
||||
|
||||
#include <linux/nospec.h>
|
||||
|
||||
#include "i915_drv.h"
|
||||
#include "gvt.h"
|
||||
|
||||
@ -953,7 +955,8 @@ static long intel_vgpu_ioctl(struct mdev_device *mdev, unsigned int cmd,
|
||||
} else if (cmd == VFIO_DEVICE_GET_REGION_INFO) {
|
||||
struct vfio_region_info info;
|
||||
struct vfio_info_cap caps = { .buf = NULL, .size = 0 };
|
||||
int i, ret;
|
||||
unsigned int i;
|
||||
int ret;
|
||||
struct vfio_region_info_cap_sparse_mmap *sparse = NULL;
|
||||
size_t size;
|
||||
int nr_areas = 1;
|
||||
@ -1030,6 +1033,10 @@ static long intel_vgpu_ioctl(struct mdev_device *mdev, unsigned int cmd,
|
||||
if (info.index >= VFIO_PCI_NUM_REGIONS +
|
||||
vgpu->vdev.num_regions)
|
||||
return -EINVAL;
|
||||
info.index =
|
||||
array_index_nospec(info.index,
|
||||
VFIO_PCI_NUM_REGIONS +
|
||||
vgpu->vdev.num_regions);
|
||||
|
||||
i = info.index - VFIO_PCI_NUM_REGIONS;
|
||||
|
||||
|
@ -599,7 +599,7 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli,
|
||||
struct nouveau_bo *nvbo;
|
||||
uint32_t data;
|
||||
|
||||
if (unlikely(r->bo_index > req->nr_buffers)) {
|
||||
if (unlikely(r->bo_index >= req->nr_buffers)) {
|
||||
NV_PRINTK(err, cli, "reloc bo index invalid\n");
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
@ -609,7 +609,7 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli,
|
||||
if (b->presumed.valid)
|
||||
continue;
|
||||
|
||||
if (unlikely(r->reloc_bo_index > req->nr_buffers)) {
|
||||
if (unlikely(r->reloc_bo_index >= req->nr_buffers)) {
|
||||
NV_PRINTK(err, cli, "reloc container bo index invalid\n");
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
|
@ -470,7 +470,7 @@ int tegra_drm_submit(struct tegra_drm_context *context,
|
||||
* unaligned offset is malformed and cause commands stream
|
||||
* corruption on the buffer address relocation.
|
||||
*/
|
||||
if (offset & 3 || offset >= obj->gem.size) {
|
||||
if (offset & 3 || offset > obj->gem.size) {
|
||||
err = -EINVAL;
|
||||
goto fail;
|
||||
}
|
||||
|
@ -686,7 +686,8 @@ void host1x_job_unpin(struct host1x_job *job)
|
||||
for (i = 0; i < job->num_unpins; i++) {
|
||||
struct host1x_job_unpin_data *unpin = &job->unpins[i];
|
||||
|
||||
if (!IS_ENABLED(CONFIG_TEGRA_HOST1X_FIREWALL) && host->domain) {
|
||||
if (!IS_ENABLED(CONFIG_TEGRA_HOST1X_FIREWALL) &&
|
||||
unpin->size && host->domain) {
|
||||
iommu_unmap(host->domain, job->addr_phys[i],
|
||||
unpin->size);
|
||||
free_iova(&host->iova,
|
||||
|
@ -3212,9 +3212,15 @@ void wacom_setup_device_quirks(struct wacom *wacom)
|
||||
if (features->type >= INTUOSHT && features->type <= BAMBOO_PT)
|
||||
features->device_type |= WACOM_DEVICETYPE_PAD;
|
||||
|
||||
if (features->type == INTUOSHT2) {
|
||||
features->x_max = features->x_max / 10;
|
||||
features->y_max = features->y_max / 10;
|
||||
}
|
||||
else {
|
||||
features->x_max = 4096;
|
||||
features->y_max = 4096;
|
||||
}
|
||||
}
|
||||
else if (features->pktlen == WACOM_PKGLEN_BBTOUCH) {
|
||||
features->device_type |= WACOM_DEVICETYPE_PAD;
|
||||
}
|
||||
|
@ -4107,7 +4107,7 @@ static int nct6775_probe(struct platform_device *pdev)
|
||||
* The temperature is already monitored if the respective bit in <mask>
|
||||
* is set.
|
||||
*/
|
||||
for (i = 0; i < 32; i++) {
|
||||
for (i = 0; i < 31; i++) {
|
||||
if (!(data->temp_mask & BIT(i + 1)))
|
||||
continue;
|
||||
if (!reg_temp_alternate[i])
|
||||
|
@ -665,9 +665,6 @@ static int i2c_imx_dma_read(struct imx_i2c_struct *i2c_imx,
|
||||
struct imx_i2c_dma *dma = i2c_imx->dma;
|
||||
struct device *dev = &i2c_imx->adapter.dev;
|
||||
|
||||
temp = imx_i2c_read_reg(i2c_imx, IMX_I2C_I2CR);
|
||||
temp |= I2CR_DMAEN;
|
||||
imx_i2c_write_reg(temp, i2c_imx, IMX_I2C_I2CR);
|
||||
|
||||
dma->chan_using = dma->chan_rx;
|
||||
dma->dma_transfer_dir = DMA_DEV_TO_MEM;
|
||||
@ -780,6 +777,7 @@ static int i2c_imx_read(struct imx_i2c_struct *i2c_imx, struct i2c_msg *msgs, bo
|
||||
int i, result;
|
||||
unsigned int temp;
|
||||
int block_data = msgs->flags & I2C_M_RECV_LEN;
|
||||
int use_dma = i2c_imx->dma && msgs->len >= DMA_THRESHOLD && !block_data;
|
||||
|
||||
dev_dbg(&i2c_imx->adapter.dev,
|
||||
"<%s> write slave address: addr=0x%x\n",
|
||||
@ -806,12 +804,14 @@ static int i2c_imx_read(struct imx_i2c_struct *i2c_imx, struct i2c_msg *msgs, bo
|
||||
*/
|
||||
if ((msgs->len - 1) || block_data)
|
||||
temp &= ~I2CR_TXAK;
|
||||
if (use_dma)
|
||||
temp |= I2CR_DMAEN;
|
||||
imx_i2c_write_reg(temp, i2c_imx, IMX_I2C_I2CR);
|
||||
imx_i2c_read_reg(i2c_imx, IMX_I2C_I2DR); /* dummy read */
|
||||
|
||||
dev_dbg(&i2c_imx->adapter.dev, "<%s> read data\n", __func__);
|
||||
|
||||
if (i2c_imx->dma && msgs->len >= DMA_THRESHOLD && !block_data)
|
||||
if (use_dma)
|
||||
return i2c_imx_dma_read(i2c_imx, msgs, is_lastmsg);
|
||||
|
||||
/* read data */
|
||||
|
@ -475,11 +475,16 @@ static int acpi_gsb_i2c_write_bytes(struct i2c_client *client,
|
||||
msgs[0].buf = buffer;
|
||||
|
||||
ret = i2c_transfer(client->adapter, msgs, ARRAY_SIZE(msgs));
|
||||
if (ret < 0)
|
||||
dev_err(&client->adapter->dev, "i2c write failed\n");
|
||||
|
||||
kfree(buffer);
|
||||
|
||||
if (ret < 0) {
|
||||
dev_err(&client->adapter->dev, "i2c write failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* 1 transfer must have completed successfully */
|
||||
return (ret == 1) ? 0 : -EIO;
|
||||
}
|
||||
|
||||
static acpi_status
|
||||
|
@ -362,10 +362,9 @@ static int bmp280_read_humid(struct bmp280_data *data, int *val, int *val2)
|
||||
}
|
||||
comp_humidity = bmp280_compensate_humidity(data, adc_humidity);
|
||||
|
||||
*val = comp_humidity;
|
||||
*val2 = 1024;
|
||||
*val = comp_humidity * 1000 / 1024;
|
||||
|
||||
return IIO_VAL_FRACTIONAL;
|
||||
return IIO_VAL_INT;
|
||||
}
|
||||
|
||||
static int bmp280_read_raw(struct iio_dev *indio_dev,
|
||||
|
@ -247,8 +247,11 @@ int mlx4_ib_rereg_user_mr(struct ib_mr *mr, int flags,
|
||||
}
|
||||
|
||||
if (flags & IB_MR_REREG_ACCESS) {
|
||||
if (ib_access_writable(mr_access_flags) && !mmr->umem->writable)
|
||||
return -EPERM;
|
||||
if (ib_access_writable(mr_access_flags) &&
|
||||
!mmr->umem->writable) {
|
||||
err = -EPERM;
|
||||
goto release_mpt_entry;
|
||||
}
|
||||
|
||||
err = mlx4_mr_hw_change_access(dev->dev, *pmpt_entry,
|
||||
convert_access(mr_access_flags));
|
||||
|
@ -266,18 +266,24 @@ struct ib_srq *mlx5_ib_create_srq(struct ib_pd *pd,
|
||||
|
||||
desc_size = sizeof(struct mlx5_wqe_srq_next_seg) +
|
||||
srq->msrq.max_gs * sizeof(struct mlx5_wqe_data_seg);
|
||||
if (desc_size == 0 || srq->msrq.max_gs > desc_size)
|
||||
return ERR_PTR(-EINVAL);
|
||||
if (desc_size == 0 || srq->msrq.max_gs > desc_size) {
|
||||
err = -EINVAL;
|
||||
goto err_srq;
|
||||
}
|
||||
desc_size = roundup_pow_of_two(desc_size);
|
||||
desc_size = max_t(size_t, 32, desc_size);
|
||||
if (desc_size < sizeof(struct mlx5_wqe_srq_next_seg))
|
||||
return ERR_PTR(-EINVAL);
|
||||
if (desc_size < sizeof(struct mlx5_wqe_srq_next_seg)) {
|
||||
err = -EINVAL;
|
||||
goto err_srq;
|
||||
}
|
||||
srq->msrq.max_avail_gather = (desc_size - sizeof(struct mlx5_wqe_srq_next_seg)) /
|
||||
sizeof(struct mlx5_wqe_data_seg);
|
||||
srq->msrq.wqe_shift = ilog2(desc_size);
|
||||
buf_size = srq->msrq.max * desc_size;
|
||||
if (buf_size < desc_size)
|
||||
return ERR_PTR(-EINVAL);
|
||||
if (buf_size < desc_size) {
|
||||
err = -EINVAL;
|
||||
goto err_srq;
|
||||
}
|
||||
in.type = init_attr->srq_type;
|
||||
|
||||
if (pd->uobject)
|
||||
|
@ -645,6 +645,9 @@ next_wqe:
|
||||
} else {
|
||||
goto exit;
|
||||
}
|
||||
if ((wqe->wr.send_flags & IB_SEND_SIGNALED) ||
|
||||
qp->sq_sig_type == IB_SIGNAL_ALL_WR)
|
||||
rxe_run_task(&qp->comp.task, 1);
|
||||
qp->req.wqe_index = next_index(qp->sq.queue,
|
||||
qp->req.wqe_index);
|
||||
goto next_wqe;
|
||||
|
@ -32,15 +32,15 @@ void rmi_2d_sensor_abs_process(struct rmi_2d_sensor *sensor,
|
||||
if (obj->type == RMI_2D_OBJECT_NONE)
|
||||
return;
|
||||
|
||||
if (axis_align->swap_axes)
|
||||
swap(obj->x, obj->y);
|
||||
|
||||
if (axis_align->flip_x)
|
||||
obj->x = sensor->max_x - obj->x;
|
||||
|
||||
if (axis_align->flip_y)
|
||||
obj->y = sensor->max_y - obj->y;
|
||||
|
||||
if (axis_align->swap_axes)
|
||||
swap(obj->x, obj->y);
|
||||
|
||||
/*
|
||||
* Here checking if X offset or y offset are specified is
|
||||
* redundant. We just add the offsets or clip the values.
|
||||
@ -120,15 +120,15 @@ void rmi_2d_sensor_rel_report(struct rmi_2d_sensor *sensor, int x, int y)
|
||||
x = min(RMI_2D_REL_POS_MAX, max(RMI_2D_REL_POS_MIN, (int)x));
|
||||
y = min(RMI_2D_REL_POS_MAX, max(RMI_2D_REL_POS_MIN, (int)y));
|
||||
|
||||
if (axis_align->swap_axes)
|
||||
swap(x, y);
|
||||
|
||||
if (axis_align->flip_x)
|
||||
x = min(RMI_2D_REL_POS_MAX, -x);
|
||||
|
||||
if (axis_align->flip_y)
|
||||
y = min(RMI_2D_REL_POS_MAX, -y);
|
||||
|
||||
if (axis_align->swap_axes)
|
||||
swap(x, y);
|
||||
|
||||
if (x || y) {
|
||||
input_report_rel(sensor->input, REL_X, x);
|
||||
input_report_rel(sensor->input, REL_Y, y);
|
||||
@ -141,17 +141,10 @@ static void rmi_2d_sensor_set_input_params(struct rmi_2d_sensor *sensor)
|
||||
struct input_dev *input = sensor->input;
|
||||
int res_x;
|
||||
int res_y;
|
||||
int max_x, max_y;
|
||||
int input_flags = 0;
|
||||
|
||||
if (sensor->report_abs) {
|
||||
if (sensor->axis_align.swap_axes) {
|
||||
swap(sensor->max_x, sensor->max_y);
|
||||
swap(sensor->axis_align.clip_x_low,
|
||||
sensor->axis_align.clip_y_low);
|
||||
swap(sensor->axis_align.clip_x_high,
|
||||
sensor->axis_align.clip_y_high);
|
||||
}
|
||||
|
||||
sensor->min_x = sensor->axis_align.clip_x_low;
|
||||
if (sensor->axis_align.clip_x_high)
|
||||
sensor->max_x = min(sensor->max_x,
|
||||
@ -163,14 +156,19 @@ static void rmi_2d_sensor_set_input_params(struct rmi_2d_sensor *sensor)
|
||||
sensor->axis_align.clip_y_high);
|
||||
|
||||
set_bit(EV_ABS, input->evbit);
|
||||
input_set_abs_params(input, ABS_MT_POSITION_X, 0, sensor->max_x,
|
||||
0, 0);
|
||||
input_set_abs_params(input, ABS_MT_POSITION_Y, 0, sensor->max_y,
|
||||
0, 0);
|
||||
|
||||
max_x = sensor->max_x;
|
||||
max_y = sensor->max_y;
|
||||
if (sensor->axis_align.swap_axes)
|
||||
swap(max_x, max_y);
|
||||
input_set_abs_params(input, ABS_MT_POSITION_X, 0, max_x, 0, 0);
|
||||
input_set_abs_params(input, ABS_MT_POSITION_Y, 0, max_y, 0, 0);
|
||||
|
||||
if (sensor->x_mm && sensor->y_mm) {
|
||||
res_x = (sensor->max_x - sensor->min_x) / sensor->x_mm;
|
||||
res_y = (sensor->max_y - sensor->min_y) / sensor->y_mm;
|
||||
if (sensor->axis_align.swap_axes)
|
||||
swap(res_x, res_y);
|
||||
|
||||
input_abs_set_res(input, ABS_X, res_x);
|
||||
input_abs_set_res(input, ABS_Y, res_y);
|
||||
|
@ -3754,6 +3754,13 @@ static int raid10_run(struct mddev *mddev)
|
||||
disk->rdev->saved_raid_disk < 0)
|
||||
conf->fullsync = 1;
|
||||
}
|
||||
|
||||
if (disk->replacement &&
|
||||
!test_bit(In_sync, &disk->replacement->flags) &&
|
||||
disk->replacement->saved_raid_disk < 0) {
|
||||
conf->fullsync = 1;
|
||||
}
|
||||
|
||||
disk->recovery_disabled = mddev->recovery_disabled - 1;
|
||||
}
|
||||
|
||||
|
@ -737,8 +737,8 @@ static struct flash_info dataflash_data[] = {
|
||||
{ "AT45DB642x", 0x1f2800, 8192, 1056, 11, SUP_POW2PS},
|
||||
{ "at45db642d", 0x1f2800, 8192, 1024, 10, SUP_POW2PS | IS_POW2PS},
|
||||
|
||||
{ "AT45DB641E", 0x1f28000100, 32768, 264, 9, SUP_EXTID | SUP_POW2PS},
|
||||
{ "at45db641e", 0x1f28000100, 32768, 256, 8, SUP_EXTID | SUP_POW2PS | IS_POW2PS},
|
||||
{ "AT45DB641E", 0x1f28000100ULL, 32768, 264, 9, SUP_EXTID | SUP_POW2PS},
|
||||
{ "at45db641e", 0x1f28000100ULL, 32768, 256, 8, SUP_EXTID | SUP_POW2PS | IS_POW2PS},
|
||||
};
|
||||
|
||||
static struct flash_info *jedec_lookup(struct spi_device *spi,
|
||||
|
@ -1529,6 +1529,7 @@ struct bnx2x {
|
||||
struct link_vars link_vars;
|
||||
u32 link_cnt;
|
||||
struct bnx2x_link_report_data last_reported_link;
|
||||
bool force_link_down;
|
||||
|
||||
struct mdio_if_info mdio;
|
||||
|
||||
|
@ -1260,6 +1260,11 @@ void __bnx2x_link_report(struct bnx2x *bp)
|
||||
{
|
||||
struct bnx2x_link_report_data cur_data;
|
||||
|
||||
if (bp->force_link_down) {
|
||||
bp->link_vars.link_up = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
/* reread mf_cfg */
|
||||
if (IS_PF(bp) && !CHIP_IS_E1(bp))
|
||||
bnx2x_read_mf_cfg(bp);
|
||||
@ -2817,6 +2822,7 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
|
||||
bp->pending_max = 0;
|
||||
}
|
||||
|
||||
bp->force_link_down = false;
|
||||
if (bp->port.pmf) {
|
||||
rc = bnx2x_initial_phy_init(bp, load_mode);
|
||||
if (rc)
|
||||
|
@ -10279,6 +10279,12 @@ static void bnx2x_sp_rtnl_task(struct work_struct *work)
|
||||
bp->sp_rtnl_state = 0;
|
||||
smp_mb();
|
||||
|
||||
/* Immediately indicate link as down */
|
||||
bp->link_vars.link_up = 0;
|
||||
bp->force_link_down = true;
|
||||
netif_carrier_off(bp->dev);
|
||||
BNX2X_ERR("Indicating link is down due to Tx-timeout\n");
|
||||
|
||||
bnx2x_nic_unload(bp, UNLOAD_NORMAL, true);
|
||||
bnx2x_nic_load(bp, LOAD_NORMAL);
|
||||
|
||||
|
@ -6348,7 +6348,7 @@ static int __bnxt_open_nic(struct bnxt *bp, bool irq_re_init, bool link_re_init)
|
||||
rc = bnxt_request_irq(bp);
|
||||
if (rc) {
|
||||
netdev_err(bp->dev, "bnxt_request_irq err: %x\n", rc);
|
||||
goto open_err;
|
||||
goto open_err_irq;
|
||||
}
|
||||
}
|
||||
|
||||
@ -6386,6 +6386,8 @@ static int __bnxt_open_nic(struct bnxt *bp, bool irq_re_init, bool link_re_init)
|
||||
|
||||
open_err:
|
||||
bnxt_disable_napi(bp);
|
||||
|
||||
open_err_irq:
|
||||
bnxt_del_napi(bp);
|
||||
|
||||
open_err_free_mem:
|
||||
@ -7866,11 +7868,11 @@ int bnxt_get_max_rings(struct bnxt *bp, int *max_rx, int *max_tx, bool shared)
|
||||
int rx, tx, cp;
|
||||
|
||||
_bnxt_get_max_rings(bp, &rx, &tx, &cp);
|
||||
*max_rx = rx;
|
||||
*max_tx = tx;
|
||||
if (!rx || !tx || !cp)
|
||||
return -ENOMEM;
|
||||
|
||||
*max_rx = rx;
|
||||
*max_tx = tx;
|
||||
return bnxt_trim_rings(bp, max_rx, max_tx, cp, shared);
|
||||
}
|
||||
|
||||
@ -7884,8 +7886,11 @@ static int bnxt_get_dflt_rings(struct bnxt *bp, int *max_rx, int *max_tx,
|
||||
/* Not enough rings, try disabling agg rings. */
|
||||
bp->flags &= ~BNXT_FLAG_AGG_RINGS;
|
||||
rc = bnxt_get_max_rings(bp, max_rx, max_tx, shared);
|
||||
if (rc)
|
||||
if (rc) {
|
||||
/* set BNXT_FLAG_AGG_RINGS back for consistency */
|
||||
bp->flags |= BNXT_FLAG_AGG_RINGS;
|
||||
return rc;
|
||||
}
|
||||
bp->flags |= BNXT_FLAG_NO_AGG_RINGS;
|
||||
bp->dev->hw_features &= ~NETIF_F_LRO;
|
||||
bp->dev->features &= ~NETIF_F_LRO;
|
||||
|
@ -643,13 +643,21 @@ static int octeon_mgmt_set_mac_address(struct net_device *netdev, void *addr)
|
||||
static int octeon_mgmt_change_mtu(struct net_device *netdev, int new_mtu)
|
||||
{
|
||||
struct octeon_mgmt *p = netdev_priv(netdev);
|
||||
int size_without_fcs = new_mtu + OCTEON_MGMT_RX_HEADROOM;
|
||||
int max_packet = new_mtu + ETH_HLEN + ETH_FCS_LEN;
|
||||
|
||||
netdev->mtu = new_mtu;
|
||||
|
||||
cvmx_write_csr(p->agl + AGL_GMX_RX_FRM_MAX, size_without_fcs);
|
||||
/* HW lifts the limit if the frame is VLAN tagged
|
||||
* (+4 bytes per each tag, up to two tags)
|
||||
*/
|
||||
cvmx_write_csr(p->agl + AGL_GMX_RX_FRM_MAX, max_packet);
|
||||
/* Set the hardware to truncate packets larger than the MTU. The jabber
|
||||
* register must be set to a multiple of 8 bytes, so round up. JABBER is
|
||||
* an unconditional limit, so we need to account for two possible VLAN
|
||||
* tags.
|
||||
*/
|
||||
cvmx_write_csr(p->agl + AGL_GMX_RX_JABBER,
|
||||
(size_without_fcs + 7) & 0xfff8);
|
||||
(max_packet + 7 + VLAN_HLEN * 2) & 0xfff8);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -253,7 +253,7 @@ static void dcb_tx_queue_prio_enable(struct net_device *dev, int enable)
|
||||
"Can't %s DCB Priority on port %d, TX Queue %d: err=%d\n",
|
||||
enable ? "set" : "unset", pi->port_id, i, -err);
|
||||
else
|
||||
txq->dcb_prio = value;
|
||||
txq->dcb_prio = enable ? value : 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,6 @@ void enic_rfs_flw_tbl_init(struct enic *enic)
|
||||
enic->rfs_h.max = enic->config.num_arfs;
|
||||
enic->rfs_h.free = enic->rfs_h.max;
|
||||
enic->rfs_h.toclean = 0;
|
||||
enic_rfs_timer_start(enic);
|
||||
}
|
||||
|
||||
void enic_rfs_flw_tbl_free(struct enic *enic)
|
||||
@ -88,7 +87,6 @@ void enic_rfs_flw_tbl_free(struct enic *enic)
|
||||
|
||||
enic_rfs_timer_stop(enic);
|
||||
spin_lock_bh(&enic->rfs_h.lock);
|
||||
enic->rfs_h.free = 0;
|
||||
for (i = 0; i < (1 << ENIC_RFS_FLW_BITSHIFT); i++) {
|
||||
struct hlist_head *hhead;
|
||||
struct hlist_node *tmp;
|
||||
@ -99,6 +97,7 @@ void enic_rfs_flw_tbl_free(struct enic *enic)
|
||||
enic_delfltr(enic, n->fltr_id);
|
||||
hlist_del(&n->node);
|
||||
kfree(n);
|
||||
enic->rfs_h.free++;
|
||||
}
|
||||
}
|
||||
spin_unlock_bh(&enic->rfs_h.lock);
|
||||
|
@ -1930,7 +1930,7 @@ static int enic_open(struct net_device *netdev)
|
||||
vnic_intr_unmask(&enic->intr[i]);
|
||||
|
||||
enic_notify_timer_start(enic);
|
||||
enic_rfs_flw_tbl_init(enic);
|
||||
enic_rfs_timer_start(enic);
|
||||
|
||||
return 0;
|
||||
|
||||
@ -2854,6 +2854,7 @@ static int enic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
enic->notify_timer.function = enic_notify_timer;
|
||||
enic->notify_timer.data = (unsigned long)enic;
|
||||
|
||||
enic_rfs_flw_tbl_init(enic);
|
||||
enic_set_rx_coal_setting(enic);
|
||||
INIT_WORK(&enic->reset, enic_reset);
|
||||
INIT_WORK(&enic->tx_hang_reset, enic_tx_hang_reset);
|
||||
|
@ -125,6 +125,9 @@ MODULE_PARM_DESC(tx_timeout, "The Tx timeout in ms");
|
||||
/* Default alignment for start of data in an Rx FD */
|
||||
#define DPAA_FD_DATA_ALIGNMENT 16
|
||||
|
||||
/* The DPAA requires 256 bytes reserved and mapped for the SGT */
|
||||
#define DPAA_SGT_SIZE 256
|
||||
|
||||
/* Values for the L3R field of the FM Parse Results
|
||||
*/
|
||||
/* L3 Type field: First IP Present IPv4 */
|
||||
@ -1622,8 +1625,8 @@ static struct sk_buff *dpaa_cleanup_tx_fd(const struct dpaa_priv *priv,
|
||||
|
||||
if (unlikely(qm_fd_get_format(fd) == qm_fd_sg)) {
|
||||
nr_frags = skb_shinfo(skb)->nr_frags;
|
||||
dma_unmap_single(dev, addr, qm_fd_get_offset(fd) +
|
||||
sizeof(struct qm_sg_entry) * (1 + nr_frags),
|
||||
dma_unmap_single(dev, addr,
|
||||
qm_fd_get_offset(fd) + DPAA_SGT_SIZE,
|
||||
dma_dir);
|
||||
|
||||
/* The sgt buffer has been allocated with netdev_alloc_frag(),
|
||||
@ -1907,8 +1910,7 @@ static int skb_to_sg_fd(struct dpaa_priv *priv,
|
||||
void *sgt_buf;
|
||||
|
||||
/* get a page frag to store the SGTable */
|
||||
sz = SKB_DATA_ALIGN(priv->tx_headroom +
|
||||
sizeof(struct qm_sg_entry) * (1 + nr_frags));
|
||||
sz = SKB_DATA_ALIGN(priv->tx_headroom + DPAA_SGT_SIZE);
|
||||
sgt_buf = netdev_alloc_frag(sz);
|
||||
if (unlikely(!sgt_buf)) {
|
||||
netdev_err(net_dev, "netdev_alloc_frag() failed for size %d\n",
|
||||
@ -1976,9 +1978,8 @@ static int skb_to_sg_fd(struct dpaa_priv *priv,
|
||||
skbh = (struct sk_buff **)buffer_start;
|
||||
*skbh = skb;
|
||||
|
||||
addr = dma_map_single(dev, buffer_start, priv->tx_headroom +
|
||||
sizeof(struct qm_sg_entry) * (1 + nr_frags),
|
||||
dma_dir);
|
||||
addr = dma_map_single(dev, buffer_start,
|
||||
priv->tx_headroom + DPAA_SGT_SIZE, dma_dir);
|
||||
if (unlikely(dma_mapping_error(dev, addr))) {
|
||||
dev_err(dev, "DMA mapping failed");
|
||||
err = -EINVAL;
|
||||
|
@ -324,6 +324,10 @@ struct fman_port_qmi_regs {
|
||||
#define HWP_HXS_PHE_REPORT 0x00000800
|
||||
#define HWP_HXS_PCAC_PSTAT 0x00000100
|
||||
#define HWP_HXS_PCAC_PSTOP 0x00000001
|
||||
#define HWP_HXS_TCP_OFFSET 0xA
|
||||
#define HWP_HXS_UDP_OFFSET 0xB
|
||||
#define HWP_HXS_SH_PAD_REM 0x80000000
|
||||
|
||||
struct fman_port_hwp_regs {
|
||||
struct {
|
||||
u32 ssa; /* Soft Sequence Attachment */
|
||||
@ -728,6 +732,10 @@ static void init_hwp(struct fman_port *port)
|
||||
iowrite32be(0xffffffff, ®s->pmda[i].lcv);
|
||||
}
|
||||
|
||||
/* Short packet padding removal from checksum calculation */
|
||||
iowrite32be(HWP_HXS_SH_PAD_REM, ®s->pmda[HWP_HXS_TCP_OFFSET].ssa);
|
||||
iowrite32be(HWP_HXS_SH_PAD_REM, ®s->pmda[HWP_HXS_UDP_OFFSET].ssa);
|
||||
|
||||
start_port_hwp(port);
|
||||
}
|
||||
|
||||
|
@ -1463,8 +1463,8 @@ static int do_reset(struct ibmvnic_adapter *adapter,
|
||||
|
||||
rc = ibmvnic_login(netdev);
|
||||
if (rc) {
|
||||
adapter->state = VNIC_PROBED;
|
||||
return 0;
|
||||
adapter->state = reset_state;
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = reset_tx_pools(adapter);
|
||||
|
@ -1895,7 +1895,12 @@ s32 ixgbe_set_rar_generic(struct ixgbe_hw *hw, u32 index, u8 *addr, u32 vmdq,
|
||||
if (enable_addr != 0)
|
||||
rar_high |= IXGBE_RAH_AV;
|
||||
|
||||
/* Record lower 32 bits of MAC address and then make
|
||||
* sure that write is flushed to hardware before writing
|
||||
* the upper 16 bits and setting the valid bit.
|
||||
*/
|
||||
IXGBE_WRITE_REG(hw, IXGBE_RAL(index), rar_low);
|
||||
IXGBE_WRITE_FLUSH(hw);
|
||||
IXGBE_WRITE_REG(hw, IXGBE_RAH(index), rar_high);
|
||||
|
||||
return 0;
|
||||
@ -1927,8 +1932,13 @@ s32 ixgbe_clear_rar_generic(struct ixgbe_hw *hw, u32 index)
|
||||
rar_high = IXGBE_READ_REG(hw, IXGBE_RAH(index));
|
||||
rar_high &= ~(0x0000FFFF | IXGBE_RAH_AV);
|
||||
|
||||
IXGBE_WRITE_REG(hw, IXGBE_RAL(index), 0);
|
||||
/* Clear the address valid bit and upper 16 bits of the address
|
||||
* before clearing the lower bits. This way we aren't updating
|
||||
* a live filter.
|
||||
*/
|
||||
IXGBE_WRITE_REG(hw, IXGBE_RAH(index), rar_high);
|
||||
IXGBE_WRITE_FLUSH(hw);
|
||||
IXGBE_WRITE_REG(hw, IXGBE_RAL(index), 0);
|
||||
|
||||
/* clear VMDq pool/queue selection for this RAR */
|
||||
hw->mac.ops.clear_vmdq(hw, index, IXGBE_CLEAR_VMDQ_ALL);
|
||||
|
@ -1525,17 +1525,15 @@ static void esw_disable_vport(struct mlx5_eswitch *esw, int vport_num)
|
||||
}
|
||||
|
||||
/* Public E-Switch API */
|
||||
#define ESW_ALLOWED(esw) ((esw) && MLX5_VPORT_MANAGER((esw)->dev))
|
||||
#define ESW_ALLOWED(esw) ((esw) && MLX5_ESWITCH_MANAGER((esw)->dev))
|
||||
|
||||
|
||||
int mlx5_eswitch_enable_sriov(struct mlx5_eswitch *esw, int nvfs, int mode)
|
||||
{
|
||||
int err;
|
||||
int i, enabled_events;
|
||||
|
||||
if (!ESW_ALLOWED(esw))
|
||||
return 0;
|
||||
|
||||
if (!MLX5_ESWITCH_MANAGER(esw->dev) ||
|
||||
if (!ESW_ALLOWED(esw) ||
|
||||
!MLX5_CAP_ESW_FLOWTABLE_FDB(esw->dev, ft_support)) {
|
||||
esw_warn(esw->dev, "E-Switch FDB is not supported, aborting ...\n");
|
||||
return -EOPNOTSUPP;
|
||||
@ -1728,7 +1726,7 @@ int mlx5_eswitch_set_vport_mac(struct mlx5_eswitch *esw,
|
||||
u64 node_guid;
|
||||
int err = 0;
|
||||
|
||||
if (!ESW_ALLOWED(esw))
|
||||
if (!MLX5_CAP_GEN(esw->dev, vport_group_manager))
|
||||
return -EPERM;
|
||||
if (!LEGAL_VPORT(esw, vport) || is_multicast_ether_addr(mac))
|
||||
return -EINVAL;
|
||||
@ -1805,7 +1803,7 @@ int mlx5_eswitch_get_vport_config(struct mlx5_eswitch *esw,
|
||||
{
|
||||
struct mlx5_vport *evport;
|
||||
|
||||
if (!ESW_ALLOWED(esw))
|
||||
if (!MLX5_CAP_GEN(esw->dev, vport_group_manager))
|
||||
return -EPERM;
|
||||
if (!LEGAL_VPORT(esw, vport))
|
||||
return -EINVAL;
|
||||
|
@ -549,8 +549,6 @@ int mlx5_modify_nic_vport_node_guid(struct mlx5_core_dev *mdev,
|
||||
return -EINVAL;
|
||||
if (!MLX5_CAP_GEN(mdev, vport_group_manager))
|
||||
return -EACCES;
|
||||
if (!MLX5_CAP_ESW(mdev, nic_vport_node_guid_modify))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
in = kvzalloc(inlen, GFP_KERNEL);
|
||||
if (!in)
|
||||
|
@ -232,7 +232,7 @@ struct nfp_nffw_info *nfp_nffw_info_open(struct nfp_cpp *cpp)
|
||||
err = nfp_cpp_read(cpp, nfp_resource_cpp_id(state->res),
|
||||
nfp_resource_address(state->res),
|
||||
fwinf, sizeof(*fwinf));
|
||||
if (err < sizeof(*fwinf))
|
||||
if (err < (int)sizeof(*fwinf))
|
||||
goto err_release;
|
||||
|
||||
if (!nffw_res_flg_init_get(fwinf))
|
||||
|
@ -255,9 +255,8 @@ qed_dcbx_get_app_protocol_type(struct qed_hwfn *p_hwfn,
|
||||
*type = DCBX_PROTOCOL_ROCE_V2;
|
||||
} else {
|
||||
*type = DCBX_MAX_PROTOCOL_TYPE;
|
||||
DP_ERR(p_hwfn,
|
||||
"No action required, App TLV id = 0x%x app_prio_bitmap = 0x%x\n",
|
||||
id, app_prio_bitmap);
|
||||
DP_ERR(p_hwfn, "No action required, App TLV entry = 0x%x\n",
|
||||
app_prio_bitmap);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1472,8 +1471,8 @@ static u8 qed_dcbnl_getcap(struct qed_dev *cdev, int capid, u8 *cap)
|
||||
*cap = 0x80;
|
||||
break;
|
||||
case DCB_CAP_ATTR_DCBX:
|
||||
*cap = (DCB_CAP_DCBX_LLD_MANAGED | DCB_CAP_DCBX_VER_CEE |
|
||||
DCB_CAP_DCBX_VER_IEEE | DCB_CAP_DCBX_STATIC);
|
||||
*cap = (DCB_CAP_DCBX_VER_CEE | DCB_CAP_DCBX_VER_IEEE |
|
||||
DCB_CAP_DCBX_STATIC);
|
||||
break;
|
||||
default:
|
||||
*cap = false;
|
||||
@ -1541,8 +1540,6 @@ static u8 qed_dcbnl_getdcbx(struct qed_dev *cdev)
|
||||
if (!dcbx_info)
|
||||
return 0;
|
||||
|
||||
if (dcbx_info->operational.enabled)
|
||||
mode |= DCB_CAP_DCBX_LLD_MANAGED;
|
||||
if (dcbx_info->operational.ieee)
|
||||
mode |= DCB_CAP_DCBX_VER_IEEE;
|
||||
if (dcbx_info->operational.cee)
|
||||
|
@ -201,8 +201,9 @@ void qed_ll2b_complete_rx_packet(void *cxt, struct qed_ll2_comp_rx_data *data)
|
||||
|
||||
skb = build_skb(buffer->data, 0);
|
||||
if (!skb) {
|
||||
rc = -ENOMEM;
|
||||
goto out_post;
|
||||
DP_INFO(cdev, "Failed to build SKB\n");
|
||||
kfree(buffer->data);
|
||||
goto out_post1;
|
||||
}
|
||||
|
||||
data->u.placement_offset += NET_SKB_PAD;
|
||||
@ -224,8 +225,14 @@ void qed_ll2b_complete_rx_packet(void *cxt, struct qed_ll2_comp_rx_data *data)
|
||||
cdev->ll2->cbs->rx_cb(cdev->ll2->cb_cookie, skb,
|
||||
data->opaque_data_0,
|
||||
data->opaque_data_1);
|
||||
} else {
|
||||
DP_VERBOSE(p_hwfn, (NETIF_MSG_RX_STATUS | NETIF_MSG_PKTDATA |
|
||||
QED_MSG_LL2 | QED_MSG_STORAGE),
|
||||
"Dropping the packet\n");
|
||||
kfree(buffer->data);
|
||||
}
|
||||
|
||||
out_post1:
|
||||
/* Update Buffer information and update FW producer */
|
||||
buffer->data = new_data;
|
||||
buffer->phys_addr = new_phys_addr;
|
||||
|
@ -565,8 +565,16 @@ static irqreturn_t qed_single_int(int irq, void *dev_instance)
|
||||
/* Fastpath interrupts */
|
||||
for (j = 0; j < 64; j++) {
|
||||
if ((0x2ULL << j) & status) {
|
||||
hwfn->simd_proto_handler[j].func(
|
||||
hwfn->simd_proto_handler[j].token);
|
||||
struct qed_simd_fp_handler *p_handler =
|
||||
&hwfn->simd_proto_handler[j];
|
||||
|
||||
if (p_handler->func)
|
||||
p_handler->func(p_handler->token);
|
||||
else
|
||||
DP_NOTICE(hwfn,
|
||||
"Not calling fastpath handler as it is NULL [handler #%d, status 0x%llx]\n",
|
||||
j, status);
|
||||
|
||||
status &= ~(0x2ULL << j);
|
||||
rc = IRQ_HANDLED;
|
||||
}
|
||||
|
@ -1128,6 +1128,8 @@ static ssize_t qlcnic_83xx_sysfs_flash_write_handler(struct file *filp,
|
||||
struct qlcnic_adapter *adapter = dev_get_drvdata(dev);
|
||||
|
||||
ret = kstrtoul(buf, 16, &data);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
switch (data) {
|
||||
case QLC_83XX_FLASH_SECTOR_ERASE_CMD:
|
||||
|
@ -658,7 +658,7 @@ qcaspi_netdev_open(struct net_device *dev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
netif_start_queue(qca->net_dev);
|
||||
/* SPI thread takes care of TX queue */
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -761,6 +761,9 @@ qcaspi_netdev_tx_timeout(struct net_device *dev)
|
||||
qca->net_dev->stats.tx_errors++;
|
||||
/* Trigger tx queue flush and QCA7000 reset */
|
||||
qca->sync = QCASPI_SYNC_UNKNOWN;
|
||||
|
||||
if (qca->spi_thread)
|
||||
wake_up_process(qca->spi_thread);
|
||||
}
|
||||
|
||||
static int
|
||||
@ -879,21 +882,21 @@ qca_spi_probe(struct spi_device *spi)
|
||||
|
||||
if ((qcaspi_clkspeed < QCASPI_CLK_SPEED_MIN) ||
|
||||
(qcaspi_clkspeed > QCASPI_CLK_SPEED_MAX)) {
|
||||
dev_info(&spi->dev, "Invalid clkspeed: %d\n",
|
||||
dev_err(&spi->dev, "Invalid clkspeed: %d\n",
|
||||
qcaspi_clkspeed);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if ((qcaspi_burst_len < QCASPI_BURST_LEN_MIN) ||
|
||||
(qcaspi_burst_len > QCASPI_BURST_LEN_MAX)) {
|
||||
dev_info(&spi->dev, "Invalid burst len: %d\n",
|
||||
dev_err(&spi->dev, "Invalid burst len: %d\n",
|
||||
qcaspi_burst_len);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if ((qcaspi_pluggable < QCASPI_PLUGGABLE_MIN) ||
|
||||
(qcaspi_pluggable > QCASPI_PLUGGABLE_MAX)) {
|
||||
dev_info(&spi->dev, "Invalid pluggable: %d\n",
|
||||
dev_err(&spi->dev, "Invalid pluggable: %d\n",
|
||||
qcaspi_pluggable);
|
||||
return -EINVAL;
|
||||
}
|
||||
@ -956,7 +959,7 @@ qca_spi_probe(struct spi_device *spi)
|
||||
}
|
||||
|
||||
if (register_netdev(qcaspi_devs)) {
|
||||
dev_info(&spi->dev, "Unable to register net device %s\n",
|
||||
dev_err(&spi->dev, "Unable to register net device %s\n",
|
||||
qcaspi_devs->name);
|
||||
free_netdev(qcaspi_devs);
|
||||
return -EFAULT;
|
||||
|
@ -959,6 +959,13 @@ static void ravb_adjust_link(struct net_device *ndev)
|
||||
struct ravb_private *priv = netdev_priv(ndev);
|
||||
struct phy_device *phydev = ndev->phydev;
|
||||
bool new_state = false;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&priv->lock, flags);
|
||||
|
||||
/* Disable TX and RX right over here, if E-MAC change is ignored */
|
||||
if (priv->no_avb_link)
|
||||
ravb_rcv_snd_disable(ndev);
|
||||
|
||||
if (phydev->link) {
|
||||
if (phydev->duplex != priv->duplex) {
|
||||
@ -976,18 +983,21 @@ static void ravb_adjust_link(struct net_device *ndev)
|
||||
ravb_modify(ndev, ECMR, ECMR_TXF, 0);
|
||||
new_state = true;
|
||||
priv->link = phydev->link;
|
||||
if (priv->no_avb_link)
|
||||
ravb_rcv_snd_enable(ndev);
|
||||
}
|
||||
} else if (priv->link) {
|
||||
new_state = true;
|
||||
priv->link = 0;
|
||||
priv->speed = 0;
|
||||
priv->duplex = -1;
|
||||
if (priv->no_avb_link)
|
||||
ravb_rcv_snd_disable(ndev);
|
||||
}
|
||||
|
||||
/* Enable TX and RX right over here, if E-MAC change is ignored */
|
||||
if (priv->no_avb_link && phydev->link)
|
||||
ravb_rcv_snd_enable(ndev);
|
||||
|
||||
mmiowb();
|
||||
spin_unlock_irqrestore(&priv->lock, flags);
|
||||
|
||||
if (new_state && netif_msg_link(priv))
|
||||
phy_print_status(phydev);
|
||||
}
|
||||
@ -1094,52 +1104,18 @@ static int ravb_get_link_ksettings(struct net_device *ndev,
|
||||
static int ravb_set_link_ksettings(struct net_device *ndev,
|
||||
const struct ethtool_link_ksettings *cmd)
|
||||
{
|
||||
struct ravb_private *priv = netdev_priv(ndev);
|
||||
unsigned long flags;
|
||||
int error;
|
||||
|
||||
if (!ndev->phydev)
|
||||
return -ENODEV;
|
||||
|
||||
spin_lock_irqsave(&priv->lock, flags);
|
||||
|
||||
/* Disable TX and RX */
|
||||
ravb_rcv_snd_disable(ndev);
|
||||
|
||||
error = phy_ethtool_ksettings_set(ndev->phydev, cmd);
|
||||
if (error)
|
||||
goto error_exit;
|
||||
|
||||
if (cmd->base.duplex == DUPLEX_FULL)
|
||||
priv->duplex = 1;
|
||||
else
|
||||
priv->duplex = 0;
|
||||
|
||||
ravb_set_duplex(ndev);
|
||||
|
||||
error_exit:
|
||||
mdelay(1);
|
||||
|
||||
/* Enable TX and RX */
|
||||
ravb_rcv_snd_enable(ndev);
|
||||
|
||||
mmiowb();
|
||||
spin_unlock_irqrestore(&priv->lock, flags);
|
||||
|
||||
return error;
|
||||
return phy_ethtool_ksettings_set(ndev->phydev, cmd);
|
||||
}
|
||||
|
||||
static int ravb_nway_reset(struct net_device *ndev)
|
||||
{
|
||||
struct ravb_private *priv = netdev_priv(ndev);
|
||||
int error = -ENODEV;
|
||||
unsigned long flags;
|
||||
|
||||
if (ndev->phydev) {
|
||||
spin_lock_irqsave(&priv->lock, flags);
|
||||
if (ndev->phydev)
|
||||
error = phy_start_aneg(ndev->phydev);
|
||||
spin_unlock_irqrestore(&priv->lock, flags);
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
@ -1821,8 +1821,15 @@ static void sh_eth_adjust_link(struct net_device *ndev)
|
||||
{
|
||||
struct sh_eth_private *mdp = netdev_priv(ndev);
|
||||
struct phy_device *phydev = ndev->phydev;
|
||||
unsigned long flags;
|
||||
int new_state = 0;
|
||||
|
||||
spin_lock_irqsave(&mdp->lock, flags);
|
||||
|
||||
/* Disable TX and RX right over here, if E-MAC change is ignored */
|
||||
if (mdp->cd->no_psr || mdp->no_ether_link)
|
||||
sh_eth_rcv_snd_disable(ndev);
|
||||
|
||||
if (phydev->link) {
|
||||
if (phydev->duplex != mdp->duplex) {
|
||||
new_state = 1;
|
||||
@ -1841,18 +1848,21 @@ static void sh_eth_adjust_link(struct net_device *ndev)
|
||||
sh_eth_modify(ndev, ECMR, ECMR_TXF, 0);
|
||||
new_state = 1;
|
||||
mdp->link = phydev->link;
|
||||
if (mdp->cd->no_psr || mdp->no_ether_link)
|
||||
sh_eth_rcv_snd_enable(ndev);
|
||||
}
|
||||
} else if (mdp->link) {
|
||||
new_state = 1;
|
||||
mdp->link = 0;
|
||||
mdp->speed = 0;
|
||||
mdp->duplex = -1;
|
||||
if (mdp->cd->no_psr || mdp->no_ether_link)
|
||||
sh_eth_rcv_snd_disable(ndev);
|
||||
}
|
||||
|
||||
/* Enable TX and RX right over here, if E-MAC change is ignored */
|
||||
if ((mdp->cd->no_psr || mdp->no_ether_link) && phydev->link)
|
||||
sh_eth_rcv_snd_enable(ndev);
|
||||
|
||||
mmiowb();
|
||||
spin_unlock_irqrestore(&mdp->lock, flags);
|
||||
|
||||
if (new_state && netif_msg_link(mdp))
|
||||
phy_print_status(phydev);
|
||||
}
|
||||
@ -1933,39 +1943,10 @@ static int sh_eth_get_link_ksettings(struct net_device *ndev,
|
||||
static int sh_eth_set_link_ksettings(struct net_device *ndev,
|
||||
const struct ethtool_link_ksettings *cmd)
|
||||
{
|
||||
struct sh_eth_private *mdp = netdev_priv(ndev);
|
||||
unsigned long flags;
|
||||
int ret;
|
||||
|
||||
if (!ndev->phydev)
|
||||
return -ENODEV;
|
||||
|
||||
spin_lock_irqsave(&mdp->lock, flags);
|
||||
|
||||
/* disable tx and rx */
|
||||
sh_eth_rcv_snd_disable(ndev);
|
||||
|
||||
ret = phy_ethtool_ksettings_set(ndev->phydev, cmd);
|
||||
if (ret)
|
||||
goto error_exit;
|
||||
|
||||
if (cmd->base.duplex == DUPLEX_FULL)
|
||||
mdp->duplex = 1;
|
||||
else
|
||||
mdp->duplex = 0;
|
||||
|
||||
if (mdp->cd->set_duplex)
|
||||
mdp->cd->set_duplex(ndev);
|
||||
|
||||
error_exit:
|
||||
mdelay(1);
|
||||
|
||||
/* enable tx and rx */
|
||||
sh_eth_rcv_snd_enable(ndev);
|
||||
|
||||
spin_unlock_irqrestore(&mdp->lock, flags);
|
||||
|
||||
return ret;
|
||||
return phy_ethtool_ksettings_set(ndev->phydev, cmd);
|
||||
}
|
||||
|
||||
/* If it is ever necessary to increase SH_ETH_REG_DUMP_MAX_REGS, the
|
||||
@ -2156,18 +2137,10 @@ static void sh_eth_get_regs(struct net_device *ndev, struct ethtool_regs *regs,
|
||||
|
||||
static int sh_eth_nway_reset(struct net_device *ndev)
|
||||
{
|
||||
struct sh_eth_private *mdp = netdev_priv(ndev);
|
||||
unsigned long flags;
|
||||
int ret;
|
||||
|
||||
if (!ndev->phydev)
|
||||
return -ENODEV;
|
||||
|
||||
spin_lock_irqsave(&mdp->lock, flags);
|
||||
ret = phy_start_aneg(ndev->phydev);
|
||||
spin_unlock_irqrestore(&mdp->lock, flags);
|
||||
|
||||
return ret;
|
||||
return phy_start_aneg(ndev->phydev);
|
||||
}
|
||||
|
||||
static u32 sh_eth_get_msglevel(struct net_device *ndev)
|
||||
|
@ -111,7 +111,7 @@ config DWMAC_ROCKCHIP
|
||||
config DWMAC_SOCFPGA
|
||||
tristate "SOCFPGA dwmac support"
|
||||
default ARCH_SOCFPGA
|
||||
depends on OF && (ARCH_SOCFPGA || COMPILE_TEST)
|
||||
depends on OF && (ARCH_SOCFPGA || ARCH_STRATIX10 || COMPILE_TEST)
|
||||
select MFD_SYSCON
|
||||
help
|
||||
Support for ethernet controller on Altera SOCFPGA
|
||||
|
@ -55,6 +55,7 @@ struct socfpga_dwmac {
|
||||
struct device *dev;
|
||||
struct regmap *sys_mgr_base_addr;
|
||||
struct reset_control *stmmac_rst;
|
||||
struct reset_control *stmmac_ocp_rst;
|
||||
void __iomem *splitter_base;
|
||||
bool f2h_ptp_ref_clk;
|
||||
struct tse_pcs pcs;
|
||||
@ -262,7 +263,7 @@ static int socfpga_dwmac_set_phy_mode(struct socfpga_dwmac *dwmac)
|
||||
val = SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_GMII_MII;
|
||||
|
||||
/* Assert reset to the enet controller before changing the phy mode */
|
||||
if (dwmac->stmmac_rst)
|
||||
reset_control_assert(dwmac->stmmac_ocp_rst);
|
||||
reset_control_assert(dwmac->stmmac_rst);
|
||||
|
||||
regmap_read(sys_mgr_base_addr, reg_offset, &ctrl);
|
||||
@ -288,7 +289,7 @@ static int socfpga_dwmac_set_phy_mode(struct socfpga_dwmac *dwmac)
|
||||
/* Deassert reset for the phy configuration to be sampled by
|
||||
* the enet controller, and operation to start in requested mode
|
||||
*/
|
||||
if (dwmac->stmmac_rst)
|
||||
reset_control_deassert(dwmac->stmmac_ocp_rst);
|
||||
reset_control_deassert(dwmac->stmmac_rst);
|
||||
if (phymode == PHY_INTERFACE_MODE_SGMII) {
|
||||
if (tse_pcs_init(dwmac->pcs.tse_pcs_base, &dwmac->pcs) != 0) {
|
||||
@ -324,6 +325,15 @@ static int socfpga_dwmac_probe(struct platform_device *pdev)
|
||||
goto err_remove_config_dt;
|
||||
}
|
||||
|
||||
dwmac->stmmac_ocp_rst = devm_reset_control_get_optional(dev, "stmmaceth-ocp");
|
||||
if (IS_ERR(dwmac->stmmac_ocp_rst)) {
|
||||
ret = PTR_ERR(dwmac->stmmac_ocp_rst);
|
||||
dev_err(dev, "error getting reset control of ocp %d\n", ret);
|
||||
goto err_remove_config_dt;
|
||||
}
|
||||
|
||||
reset_control_deassert(dwmac->stmmac_ocp_rst);
|
||||
|
||||
ret = socfpga_dwmac_parse_data(dwmac, dev);
|
||||
if (ret) {
|
||||
dev_err(dev, "Unable to parse OF data\n");
|
||||
|
@ -1387,6 +1387,10 @@ static int emac_devioctl(struct net_device *ndev, struct ifreq *ifrq, int cmd)
|
||||
|
||||
static int match_first_device(struct device *dev, void *data)
|
||||
{
|
||||
if (dev->parent && dev->parent->of_node)
|
||||
return of_device_is_compatible(dev->parent->of_node,
|
||||
"ti,davinci_mdio");
|
||||
|
||||
return !strncmp(dev_name(dev), "davinci_mdio", 12);
|
||||
}
|
||||
|
||||
|
@ -89,10 +89,6 @@
|
||||
static const char banner[] __initconst = KERN_INFO \
|
||||
"AX.25: bpqether driver version 004\n";
|
||||
|
||||
static char bcast_addr[6]={0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
|
||||
|
||||
static char bpq_eth_addr[6];
|
||||
|
||||
static int bpq_rcv(struct sk_buff *, struct net_device *, struct packet_type *, struct net_device *);
|
||||
static int bpq_device_event(struct notifier_block *, unsigned long, void *);
|
||||
|
||||
@ -515,8 +511,8 @@ static int bpq_new_device(struct net_device *edev)
|
||||
bpq->ethdev = edev;
|
||||
bpq->axdev = ndev;
|
||||
|
||||
memcpy(bpq->dest_addr, bcast_addr, sizeof(bpq_eth_addr));
|
||||
memcpy(bpq->acpt_addr, bcast_addr, sizeof(bpq_eth_addr));
|
||||
eth_broadcast_addr(bpq->dest_addr);
|
||||
eth_broadcast_addr(bpq->acpt_addr);
|
||||
|
||||
err = register_netdevice(ndev);
|
||||
if (err)
|
||||
|
@ -1299,6 +1299,7 @@ out:
|
||||
/* setting up multiple channels failed */
|
||||
net_device->max_chn = 1;
|
||||
net_device->num_chn = 1;
|
||||
return 0;
|
||||
|
||||
err_dev_remv:
|
||||
rndis_filter_device_remove(dev, net_device);
|
||||
|
@ -940,7 +940,7 @@ at86rf230_xmit(struct ieee802154_hw *hw, struct sk_buff *skb)
|
||||
static int
|
||||
at86rf230_ed(struct ieee802154_hw *hw, u8 *level)
|
||||
{
|
||||
BUG_ON(!level);
|
||||
WARN_ON(!level);
|
||||
*level = 0xbe;
|
||||
return 0;
|
||||
}
|
||||
@ -1121,8 +1121,7 @@ at86rf230_set_hw_addr_filt(struct ieee802154_hw *hw,
|
||||
if (changed & IEEE802154_AFILT_SADDR_CHANGED) {
|
||||
u16 addr = le16_to_cpu(filt->short_addr);
|
||||
|
||||
dev_vdbg(&lp->spi->dev,
|
||||
"at86rf230_set_hw_addr_filt called for saddr\n");
|
||||
dev_vdbg(&lp->spi->dev, "%s called for saddr\n", __func__);
|
||||
__at86rf230_write(lp, RG_SHORT_ADDR_0, addr);
|
||||
__at86rf230_write(lp, RG_SHORT_ADDR_1, addr >> 8);
|
||||
}
|
||||
@ -1130,8 +1129,7 @@ at86rf230_set_hw_addr_filt(struct ieee802154_hw *hw,
|
||||
if (changed & IEEE802154_AFILT_PANID_CHANGED) {
|
||||
u16 pan = le16_to_cpu(filt->pan_id);
|
||||
|
||||
dev_vdbg(&lp->spi->dev,
|
||||
"at86rf230_set_hw_addr_filt called for pan id\n");
|
||||
dev_vdbg(&lp->spi->dev, "%s called for pan id\n", __func__);
|
||||
__at86rf230_write(lp, RG_PAN_ID_0, pan);
|
||||
__at86rf230_write(lp, RG_PAN_ID_1, pan >> 8);
|
||||
}
|
||||
@ -1140,15 +1138,13 @@ at86rf230_set_hw_addr_filt(struct ieee802154_hw *hw,
|
||||
u8 i, addr[8];
|
||||
|
||||
memcpy(addr, &filt->ieee_addr, 8);
|
||||
dev_vdbg(&lp->spi->dev,
|
||||
"at86rf230_set_hw_addr_filt called for IEEE addr\n");
|
||||
dev_vdbg(&lp->spi->dev, "%s called for IEEE addr\n", __func__);
|
||||
for (i = 0; i < 8; i++)
|
||||
__at86rf230_write(lp, RG_IEEE_ADDR_0 + i, addr[i]);
|
||||
}
|
||||
|
||||
if (changed & IEEE802154_AFILT_PANC_CHANGED) {
|
||||
dev_vdbg(&lp->spi->dev,
|
||||
"at86rf230_set_hw_addr_filt called for panc change\n");
|
||||
dev_vdbg(&lp->spi->dev, "%s called for panc change\n", __func__);
|
||||
if (filt->pan_coord)
|
||||
at86rf230_write_subreg(lp, SR_AACK_I_AM_COORD, 1);
|
||||
else
|
||||
@ -1252,7 +1248,6 @@ at86rf230_set_cca_mode(struct ieee802154_hw *hw,
|
||||
return at86rf230_write_subreg(lp, SR_CCA_MODE, val);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
at86rf230_set_cca_ed_level(struct ieee802154_hw *hw, s32 mbm)
|
||||
{
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user