This is the 4.19.15 stable release
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAlw6+/8ACgkQONu9yGCS
aT6VKw/9FUsbfy4MzFMH4XmTn/k9AHhcYdQ+gSEIcJbt/JLT13fU64e/O8QlQ3PF
5GWNY5ObA+HKlReCufSuW+AuAw5s/FLVaGLn8HZQ/FU27ZgTrGpFjb3vcnYSjsU0
vurXjstzndiRmpSahNufU6t2X7fkgyd41M94572pyidcT5NcP+ngVICwXtQOsXjH
QkIaMZHTmr4le0Z1oNvDraNkESJnxo7+D2eJebx5yDReD/Mdm3gAl2q0UkDXpZzk
qb3tH1oronm7ZfiEBCZYrewxMfz78ugJW3hpOu//JCbrVI2Ja0sBSh3VB6EFceoY
WI9z8JkZ3xQeLQnCdiabdQ66mGQa9XiLUwj7+sR//P7OduwJEv8HTYpDi8iqA6Vj
SigQmjEunjSHccqBWaPy1ZMAIXoNWQBC4EJ2erv3pAPyJr2FBw9o2Bmu6JAV18ow
iX94YnQtllZp8cJsEKEUWEmXZPLcTy6mXLMLoQ922P4p4KRJVQUhde4EeZZLFn27
6sPwASnrfEW9RS/i1XuxdDPbnMYg6uE0UoRfxp1tAUBKaVArjMglyIAj7t9GA07W
4480c3AegmDFZ+GxX+w5+duKRZnxBi+sHw8aBbZRi5m9mlxeFCSWSe0hPPRR2LIQ
fZrFySHmgbl1NtTP4cvZOb7bTxoyfjcIQfiqu7cwNsYGXtbfOuk=
=A6Ro
-----END PGP SIGNATURE-----
Merge 4.19.15 into android-4.19
Changes in 4.19.15
ARM: dts: sun8i: a83t: bananapi-m3: increase vcc-pd voltage to 3.3V
pinctrl: meson: fix pull enable register calculation
arm64: dts: mt7622: fix no more console output on rfb1
powerpc: Fix COFF zImage booting on old powermacs
powerpc/mm: Fix linux page tables build with some configs
HID: ite: Add USB id match for another ITE based keyboard rfkill key quirk
ARM: dts: imx7d-pico: Describe the Wifi clock
ARM: imx: update the cpu power up timing setting on i.mx6sx
ARM: dts: imx7d-nitrogen7: Fix the description of the Wifi clock
IB/mlx5: Block DEVX umem from the non applicable cases
Input: restore EV_ABS ABS_RESERVED
powerpc/mm: Fallback to RAM if the altmap is unusable
drm/amdgpu: Fix DEBUG_LOCKS_WARN_ON(depth <= 0) in amdgpu_ctx.lock
IB/core: Fix oops in netdev_next_upper_dev_rcu()
checkstack.pl: fix for aarch64
xfrm: Fix error return code in xfrm_output_one()
xfrm: Fix bucket count reported to userspace
xfrm: Fix NULL pointer dereference in xfrm_input when skb_dst_force clears the dst_entry.
ieee802154: hwsim: fix off-by-one in parse nested
netfilter: nf_tables: fix suspicious RCU usage in nft_chain_stats_replace()
netfilter: seqadj: re-load tcp header pointer after possible head reallocation
Revert "scsi: qla2xxx: Fix NVMe Target discovery"
scsi: bnx2fc: Fix NULL dereference in error handling
Input: omap-keypad - fix idle configuration to not block SoC idle states
Input: synaptics - enable RMI on ThinkPad T560
ibmvnic: Convert reset work item mutex to spin lock
ibmvnic: Fix non-atomic memory allocation in IRQ context
ieee802154: ca8210: fix possible u8 overflow in ca8210_rx_done
x86/mm: Fix guard hole handling
x86/dump_pagetables: Fix LDT remap address marker
i40e: fix mac filter delete when setting mac address
ixgbe: Fix race when the VF driver does a reset
netfilter: ipset: do not call ipset_nest_end after nla_nest_cancel
netfilter: nat: can't use dst_hold on noref dst
netfilter: nf_conncount: use rb_link_node_rcu() instead of rb_link_node()
bnx2x: Clear fip MAC when fcoe offload support is disabled
bnx2x: Remove configured vlans as part of unload sequence.
bnx2x: Send update-svid ramrod with retry/poll flags enabled
scsi: target: iscsi: cxgbit: fix csk leak
scsi: target: iscsi: cxgbit: add missing spin_lock_init()
mt76: fix potential NULL pointer dereference in mt76_stop_tx_queues
x86, hyperv: remove PCI dependency
drivers: net: xgene: Remove unnecessary forward declarations
net/tls: Init routines in create_ctx
w90p910_ether: remove incorrect __init annotation
net: hns: Incorrect offset address used for some registers.
net: hns: All ports can not work when insmod hns ko after rmmod.
net: hns: Some registers use wrong address according to the datasheet.
net: hns: Fixed bug that netdev was opened twice
net: hns: Clean rx fbd when ae stopped.
net: hns: Free irq when exit from abnormal branch
net: hns: Avoid net reset caused by pause frames storm
net: hns: Fix ntuple-filters status error.
net: hns: Add mac pcs config when enable|disable mac
net: hns: Fix ping failed when use net bridge and send multicast
mac80211: fix a kernel panic when TXing after TXQ teardown
SUNRPC: Fix a race with XPRT_CONNECTING
qed: Fix an error code qed_ll2_start_xmit()
net: macb: fix random memory corruption on RX with 64-bit DMA
net: macb: fix dropped RX frames due to a race
net: macb: add missing barriers when reading descriptors
lan743x: Expand phy search for LAN7431
lan78xx: Resolve issue with changing MAC address
vxge: ensure data0 is initialized in when fetching firmware version information
nl80211: fix memory leak if validate_pae_over_nl80211() fails
mac80211: free skb fraglist before freeing the skb
kbuild: fix false positive warning/error about missing libelf
m68k: Fix memblock-related crashes
virtio: fix test build after uio.h change
lan743x: Remove MAC Reset from initialization
gpio: mvebu: only fail on missing clk if pwm is actually to be used
Input: synaptics - enable SMBus for HP EliteBook 840 G4
net: netxen: fix a missing check and an uninitialized use
qmi_wwan: Fix qmap header retrieval in qmimux_rx_fixup
serial/sunsu: fix refcount leak
auxdisplay: charlcd: fix x/y command parsing
scsi: zfcp: fix posting too many status read buffers leading to adapter shutdown
scsi: lpfc: do not set queue->page_count to 0 if pc_sli4_params.wqpcnt is invalid
fork: record start_time late
zram: fix double free backing device
hwpoison, memory_hotplug: allow hwpoisoned pages to be offlined
mm, devm_memremap_pages: mark devm_memremap_pages() EXPORT_SYMBOL_GPL
mm, devm_memremap_pages: kill mapping "System RAM" support
mm, devm_memremap_pages: fix shutdown handling
mm, devm_memremap_pages: add MEMORY_DEVICE_PRIVATE support
mm, hmm: use devm semantics for hmm_devmem_{add, remove}
mm, hmm: mark hmm_devmem_{add, add_resource} EXPORT_SYMBOL_GPL
mm, swap: fix swapoff with KSM pages
memcg, oom: notify on oom killer invocation from the charge path
sunrpc: fix cache_head leak due to queued request
sunrpc: use SVC_NET() in svcauth_gss_* functions
powerpc: remove old GCC version checks
powerpc: consolidate -mno-sched-epilog into FTRACE flags
powerpc: avoid -mno-sched-epilog on GCC 4.9 and newer
powerpc: Disable -Wbuiltin-requires-header when setjmp is used
kbuild: add -no-integrated-as Clang option unconditionally
kbuild: consolidate Clang compiler flags
Makefile: Export clang toolchain variables
powerpc/boot: Set target when cross-compiling for clang
raid6/ppc: Fix build for clang
dma-direct: do not include SME mask in the DMA supported check
mt76x0: init hw capabilities
media: cx23885: only reset DMA on problematic CPUs
ALSA: cs46xx: Potential NULL dereference in probe
ALSA: usb-audio: Avoid access before bLength check in build_audio_procunit()
ALSA: usb-audio: Check mixer unit descriptors more strictly
ALSA: usb-audio: Fix an out-of-bound read in create_composite_quirks
ALSA: usb-audio: Always check descriptor sizes in parser code
srcu: Lock srcu_data structure in srcu_gp_start()
driver core: Add missing dev->bus->need_parent_lock checks
Fix failure path in alloc_pid()
block: deactivate blk_stat timer in wbt_disable_default()
block: mq-deadline: Fix write completion handling
dlm: fixed memory leaks after failed ls_remove_names allocation
dlm: possible memory leak on error path in create_lkb()
dlm: lost put_lkb on error path in receive_convert() and receive_unlock()
dlm: memory leaks on error path in dlm_user_request()
gfs2: Get rid of potential double-freeing in gfs2_create_inode
gfs2: Fix loop in gfs2_rbm_find
b43: Fix error in cordic routine
selinux: policydb - fix byte order and alignment issues
PCI / PM: Allow runtime PM without callback functions
lockd: Show pid of lockd for remote locks
nfsd4: zero-length WRITE should succeed
arm64: drop linker script hack to hide __efistub_ symbols
arm64: relocatable: fix inconsistencies in linker script and options
leds: pwm: silently error out on EPROBE_DEFER
Revert "powerpc/tm: Unset MSR[TS] if not recheckpointing"
powerpc/tm: Set MSR[TS] just prior to recheckpoint
iio: dac: ad5686: fix bit shift read register
9p/net: put a lower bound on msize
rxe: fix error completion wr_id and qp_num
RDMA/srpt: Fix a use-after-free in the channel release code
iommu/vt-d: Handle domain agaw being less than iommu agaw
sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b
ceph: don't update importing cap's mseq when handing cap export
video: fbdev: pxafb: Fix "WARNING: invalid free of devm_ allocated data"
drivers/perf: hisi: Fixup one DDRC PMU register offset
genwqe: Fix size check
intel_th: msu: Fix an off-by-one in attribute store
power: supply: olpc_battery: correct the temperature units
of: of_node_get()/of_node_put() nodes held in phandle cache
of: __of_detach_node() - remove node from phandle cache
lib: fix build failure in CONFIG_DEBUG_VIRTUAL test
drm/nouveau/drm/nouveau: Check rc from drm_dp_mst_topology_mgr_resume()
drm/vc4: Set ->is_yuv to false when num_planes == 1
drm/rockchip: psr: do not dereference encoder before it is null checked.
drm/amd/display: Fix unintialized max_bpc state values
bnx2x: Fix NULL pointer dereference in bnx2x_del_all_vlans() on some hw
Linux 4.19.15
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
commit
caf54339d3
152 changed files with 1477 additions and 827 deletions
28
Makefile
28
Makefile
|
@ -1,7 +1,7 @@
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
VERSION = 4
|
VERSION = 4
|
||||||
PATCHLEVEL = 19
|
PATCHLEVEL = 19
|
||||||
SUBLEVEL = 14
|
SUBLEVEL = 15
|
||||||
EXTRAVERSION =
|
EXTRAVERSION =
|
||||||
NAME = "People's Front"
|
NAME = "People's Front"
|
||||||
|
|
||||||
|
@ -487,17 +487,18 @@ CLANG_TARGET := --target=$(notdir $(CLANG_TRIPLE:%-=%))
|
||||||
ifeq ($(shell $(srctree)/scripts/clang-android.sh $(CC) $(CLANG_TARGET)), y)
|
ifeq ($(shell $(srctree)/scripts/clang-android.sh $(CC) $(CLANG_TARGET)), y)
|
||||||
$(error "Clang with Android --target detected. Did you specify CLANG_TRIPLE?")
|
$(error "Clang with Android --target detected. Did you specify CLANG_TRIPLE?")
|
||||||
endif
|
endif
|
||||||
|
CLANG_FLAGS := --target=$(notdir $(CROSS_COMPILE:%-=%))
|
||||||
GCC_TOOLCHAIN_DIR := $(dir $(shell which $(LD)))
|
GCC_TOOLCHAIN_DIR := $(dir $(shell which $(LD)))
|
||||||
CLANG_PREFIX := --prefix=$(GCC_TOOLCHAIN_DIR)
|
CLANG_FLAGS += --prefix=$(GCC_TOOLCHAIN_DIR)
|
||||||
GCC_TOOLCHAIN := $(realpath $(GCC_TOOLCHAIN_DIR)/..)
|
GCC_TOOLCHAIN := $(realpath $(GCC_TOOLCHAIN_DIR)/..)
|
||||||
endif
|
endif
|
||||||
ifneq ($(GCC_TOOLCHAIN),)
|
ifneq ($(GCC_TOOLCHAIN),)
|
||||||
CLANG_GCC_TC := --gcc-toolchain=$(GCC_TOOLCHAIN)
|
CLANG_FLAGS += --gcc-toolchain=$(GCC_TOOLCHAIN)
|
||||||
endif
|
endif
|
||||||
KBUILD_CFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) $(CLANG_PREFIX)
|
CLANG_FLAGS += -no-integrated-as
|
||||||
KBUILD_AFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) $(CLANG_PREFIX)
|
KBUILD_CFLAGS += $(CLANG_FLAGS)
|
||||||
KBUILD_CFLAGS += $(call cc-option, -no-integrated-as)
|
KBUILD_AFLAGS += $(CLANG_FLAGS)
|
||||||
KBUILD_AFLAGS += $(call cc-option, -no-integrated-as)
|
export CLANG_FLAGS
|
||||||
endif
|
endif
|
||||||
|
|
||||||
RETPOLINE_CFLAGS_GCC := -mindirect-branch=thunk-extern -mindirect-branch-register
|
RETPOLINE_CFLAGS_GCC := -mindirect-branch=thunk-extern -mindirect-branch-register
|
||||||
|
@ -957,11 +958,6 @@ ifdef CONFIG_STACK_VALIDATION
|
||||||
ifeq ($(has_libelf),1)
|
ifeq ($(has_libelf),1)
|
||||||
objtool_target := tools/objtool FORCE
|
objtool_target := tools/objtool FORCE
|
||||||
else
|
else
|
||||||
ifdef CONFIG_UNWINDER_ORC
|
|
||||||
$(error "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel")
|
|
||||||
else
|
|
||||||
$(warning "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel")
|
|
||||||
endif
|
|
||||||
SKIP_STACK_VALIDATION := 1
|
SKIP_STACK_VALIDATION := 1
|
||||||
export SKIP_STACK_VALIDATION
|
export SKIP_STACK_VALIDATION
|
||||||
endif
|
endif
|
||||||
|
@ -1118,6 +1114,14 @@ uapi-asm-generic:
|
||||||
|
|
||||||
PHONY += prepare-objtool
|
PHONY += prepare-objtool
|
||||||
prepare-objtool: $(objtool_target)
|
prepare-objtool: $(objtool_target)
|
||||||
|
ifeq ($(SKIP_STACK_VALIDATION),1)
|
||||||
|
ifdef CONFIG_UNWINDER_ORC
|
||||||
|
@echo "error: Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel" >&2
|
||||||
|
@false
|
||||||
|
else
|
||||||
|
@echo "warning: Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel" >&2
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# Generate some files
|
# Generate some files
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
|
|
@ -86,13 +86,17 @@
|
||||||
compatible = "regulator-fixed";
|
compatible = "regulator-fixed";
|
||||||
regulator-min-microvolt = <3300000>;
|
regulator-min-microvolt = <3300000>;
|
||||||
regulator-max-microvolt = <3300000>;
|
regulator-max-microvolt = <3300000>;
|
||||||
clocks = <&clks IMX7D_CLKO2_ROOT_DIV>;
|
|
||||||
clock-names = "slow";
|
|
||||||
regulator-name = "reg_wlan";
|
regulator-name = "reg_wlan";
|
||||||
startup-delay-us = <70000>;
|
startup-delay-us = <70000>;
|
||||||
gpio = <&gpio4 21 GPIO_ACTIVE_HIGH>;
|
gpio = <&gpio4 21 GPIO_ACTIVE_HIGH>;
|
||||||
enable-active-high;
|
enable-active-high;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
usdhc2_pwrseq: usdhc2_pwrseq {
|
||||||
|
compatible = "mmc-pwrseq-simple";
|
||||||
|
clocks = <&clks IMX7D_CLKO2_ROOT_DIV>;
|
||||||
|
clock-names = "ext_clock";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&adc1 {
|
&adc1 {
|
||||||
|
@ -375,6 +379,7 @@
|
||||||
bus-width = <4>;
|
bus-width = <4>;
|
||||||
non-removable;
|
non-removable;
|
||||||
vmmc-supply = <®_wlan>;
|
vmmc-supply = <®_wlan>;
|
||||||
|
mmc-pwrseq = <&usdhc2_pwrseq>;
|
||||||
cap-power-off-card;
|
cap-power-off-card;
|
||||||
keep-power-in-suspend;
|
keep-power-in-suspend;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
|
@ -100,6 +100,19 @@
|
||||||
regulator-min-microvolt = <1800000>;
|
regulator-min-microvolt = <1800000>;
|
||||||
regulator-max-microvolt = <1800000>;
|
regulator-max-microvolt = <1800000>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
usdhc2_pwrseq: usdhc2_pwrseq {
|
||||||
|
compatible = "mmc-pwrseq-simple";
|
||||||
|
clocks = <&clks IMX7D_CLKO2_ROOT_DIV>;
|
||||||
|
clock-names = "ext_clock";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&clks {
|
||||||
|
assigned-clocks = <&clks IMX7D_CLKO2_ROOT_SRC>,
|
||||||
|
<&clks IMX7D_CLKO2_ROOT_DIV>;
|
||||||
|
assigned-clock-parents = <&clks IMX7D_CKIL>;
|
||||||
|
assigned-clock-rates = <0>, <32768>;
|
||||||
};
|
};
|
||||||
|
|
||||||
&i2c4 {
|
&i2c4 {
|
||||||
|
@ -199,12 +212,13 @@
|
||||||
|
|
||||||
&usdhc2 { /* Wifi SDIO */
|
&usdhc2 { /* Wifi SDIO */
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&pinctrl_usdhc2>;
|
pinctrl-0 = <&pinctrl_usdhc2 &pinctrl_wifi_clk>;
|
||||||
no-1-8-v;
|
no-1-8-v;
|
||||||
non-removable;
|
non-removable;
|
||||||
keep-power-in-suspend;
|
keep-power-in-suspend;
|
||||||
wakeup-source;
|
wakeup-source;
|
||||||
vmmc-supply = <®_ap6212>;
|
vmmc-supply = <®_ap6212>;
|
||||||
|
mmc-pwrseq = <&usdhc2_pwrseq>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -301,6 +315,12 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
&iomuxc_lpsr {
|
&iomuxc_lpsr {
|
||||||
|
pinctrl_wifi_clk: wificlkgrp {
|
||||||
|
fsl,pins = <
|
||||||
|
MX7D_PAD_LPSR_GPIO1_IO03__CCM_CLKO2 0x7d
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
pinctrl_wdog: wdoggrp {
|
pinctrl_wdog: wdoggrp {
|
||||||
fsl,pins = <
|
fsl,pins = <
|
||||||
MX7D_PAD_LPSR_GPIO1_IO00__WDOG1_WDOG_B 0x74
|
MX7D_PAD_LPSR_GPIO1_IO00__WDOG1_WDOG_B 0x74
|
||||||
|
|
|
@ -309,8 +309,8 @@
|
||||||
|
|
||||||
®_dldo3 {
|
®_dldo3 {
|
||||||
regulator-always-on;
|
regulator-always-on;
|
||||||
regulator-min-microvolt = <2500000>;
|
regulator-min-microvolt = <3300000>;
|
||||||
regulator-max-microvolt = <2500000>;
|
regulator-max-microvolt = <3300000>;
|
||||||
regulator-name = "vcc-pd";
|
regulator-name = "vcc-pd";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,7 @@ int __init imx6sx_cpuidle_init(void)
|
||||||
* except for power up sw2iso which need to be
|
* except for power up sw2iso which need to be
|
||||||
* larger than LDO ramp up time.
|
* larger than LDO ramp up time.
|
||||||
*/
|
*/
|
||||||
imx_gpc_set_arm_power_up_timing(2, 1);
|
imx_gpc_set_arm_power_up_timing(0xf, 1);
|
||||||
imx_gpc_set_arm_power_down_timing(1, 1);
|
imx_gpc_set_arm_power_down_timing(1, 1);
|
||||||
|
|
||||||
return cpuidle_register(&imx6sx_cpuidle_driver, NULL);
|
return cpuidle_register(&imx6sx_cpuidle_driver, NULL);
|
||||||
|
|
|
@ -18,7 +18,7 @@ ifeq ($(CONFIG_RELOCATABLE), y)
|
||||||
# Pass --no-apply-dynamic-relocs to restore pre-binutils-2.27 behaviour
|
# Pass --no-apply-dynamic-relocs to restore pre-binutils-2.27 behaviour
|
||||||
# for relative relocs, since this leads to better Image compression
|
# for relative relocs, since this leads to better Image compression
|
||||||
# with the relocation offsets always being zero.
|
# with the relocation offsets always being zero.
|
||||||
LDFLAGS_vmlinux += -pie -shared -Bsymbolic \
|
LDFLAGS_vmlinux += -shared -Bsymbolic -z notext -z norelro \
|
||||||
$(call ld-option, --no-apply-dynamic-relocs)
|
$(call ld-option, --no-apply-dynamic-relocs)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,13 @@
|
||||||
model = "MediaTek MT7622 RFB1 board";
|
model = "MediaTek MT7622 RFB1 board";
|
||||||
compatible = "mediatek,mt7622-rfb1", "mediatek,mt7622";
|
compatible = "mediatek,mt7622-rfb1", "mediatek,mt7622";
|
||||||
|
|
||||||
|
aliases {
|
||||||
|
serial0 = &uart0;
|
||||||
|
};
|
||||||
|
|
||||||
chosen {
|
chosen {
|
||||||
bootargs = "earlycon=uart8250,mmio32,0x11002000 console=ttyS0,115200n1 swiotlb=512";
|
stdout-path = "serial0:115200n8";
|
||||||
|
bootargs = "earlycon=uart8250,mmio32,0x11002000 swiotlb=512";
|
||||||
};
|
};
|
||||||
|
|
||||||
cpus {
|
cpus {
|
||||||
|
|
|
@ -75,16 +75,6 @@
|
||||||
|
|
||||||
__efistub_stext_offset = stext - _text;
|
__efistub_stext_offset = stext - _text;
|
||||||
|
|
||||||
/*
|
|
||||||
* Prevent the symbol aliases below from being emitted into the kallsyms
|
|
||||||
* table, by forcing them to be absolute symbols (which are conveniently
|
|
||||||
* ignored by scripts/kallsyms) rather than section relative symbols.
|
|
||||||
* The distinction is only relevant for partial linking, and only for symbols
|
|
||||||
* that are defined within a section declaration (which is not the case for
|
|
||||||
* the definitions below) so the resulting values will be identical.
|
|
||||||
*/
|
|
||||||
#define KALLSYMS_HIDE(sym) ABSOLUTE(sym)
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The EFI stub has its own symbol namespace prefixed by __efistub_, to
|
* The EFI stub has its own symbol namespace prefixed by __efistub_, to
|
||||||
* isolate it from the kernel proper. The following symbols are legally
|
* isolate it from the kernel proper. The following symbols are legally
|
||||||
|
@ -94,28 +84,28 @@ __efistub_stext_offset = stext - _text;
|
||||||
* linked at. The routines below are all implemented in assembler in a
|
* linked at. The routines below are all implemented in assembler in a
|
||||||
* position independent manner
|
* position independent manner
|
||||||
*/
|
*/
|
||||||
__efistub_memcmp = KALLSYMS_HIDE(__pi_memcmp);
|
__efistub_memcmp = __pi_memcmp;
|
||||||
__efistub_memchr = KALLSYMS_HIDE(__pi_memchr);
|
__efistub_memchr = __pi_memchr;
|
||||||
__efistub_memcpy = KALLSYMS_HIDE(__pi_memcpy);
|
__efistub_memcpy = __pi_memcpy;
|
||||||
__efistub_memmove = KALLSYMS_HIDE(__pi_memmove);
|
__efistub_memmove = __pi_memmove;
|
||||||
__efistub_memset = KALLSYMS_HIDE(__pi_memset);
|
__efistub_memset = __pi_memset;
|
||||||
__efistub_strlen = KALLSYMS_HIDE(__pi_strlen);
|
__efistub_strlen = __pi_strlen;
|
||||||
__efistub_strnlen = KALLSYMS_HIDE(__pi_strnlen);
|
__efistub_strnlen = __pi_strnlen;
|
||||||
__efistub_strcmp = KALLSYMS_HIDE(__pi_strcmp);
|
__efistub_strcmp = __pi_strcmp;
|
||||||
__efistub_strncmp = KALLSYMS_HIDE(__pi_strncmp);
|
__efistub_strncmp = __pi_strncmp;
|
||||||
__efistub_strrchr = KALLSYMS_HIDE(__pi_strrchr);
|
__efistub_strrchr = __pi_strrchr;
|
||||||
__efistub___flush_dcache_area = KALLSYMS_HIDE(__pi___flush_dcache_area);
|
__efistub___flush_dcache_area = __pi___flush_dcache_area;
|
||||||
|
|
||||||
#ifdef CONFIG_KASAN
|
#ifdef CONFIG_KASAN
|
||||||
__efistub___memcpy = KALLSYMS_HIDE(__pi_memcpy);
|
__efistub___memcpy = __pi_memcpy;
|
||||||
__efistub___memmove = KALLSYMS_HIDE(__pi_memmove);
|
__efistub___memmove = __pi_memmove;
|
||||||
__efistub___memset = KALLSYMS_HIDE(__pi_memset);
|
__efistub___memset = __pi_memset;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
__efistub__text = KALLSYMS_HIDE(_text);
|
__efistub__text = _text;
|
||||||
__efistub__end = KALLSYMS_HIDE(_end);
|
__efistub__end = _end;
|
||||||
__efistub__edata = KALLSYMS_HIDE(_edata);
|
__efistub__edata = _edata;
|
||||||
__efistub_screen_info = KALLSYMS_HIDE(screen_info);
|
__efistub_screen_info = screen_info;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,8 @@ SECTIONS
|
||||||
*(.discard)
|
*(.discard)
|
||||||
*(.discard.*)
|
*(.discard.*)
|
||||||
*(.interp .dynamic)
|
*(.interp .dynamic)
|
||||||
*(.dynsym .dynstr .hash)
|
*(.dynsym .dynstr .hash .gnu.hash)
|
||||||
|
*(.eh_frame)
|
||||||
}
|
}
|
||||||
|
|
||||||
. = KIMAGE_VADDR + TEXT_OFFSET;
|
. = KIMAGE_VADDR + TEXT_OFFSET;
|
||||||
|
@ -176,12 +177,12 @@ SECTIONS
|
||||||
|
|
||||||
PERCPU_SECTION(L1_CACHE_BYTES)
|
PERCPU_SECTION(L1_CACHE_BYTES)
|
||||||
|
|
||||||
.rela : ALIGN(8) {
|
.rela.dyn : ALIGN(8) {
|
||||||
*(.rela .rela*)
|
*(.rela .rela*)
|
||||||
}
|
}
|
||||||
|
|
||||||
__rela_offset = ABSOLUTE(ADDR(.rela) - KIMAGE_VADDR);
|
__rela_offset = ABSOLUTE(ADDR(.rela.dyn) - KIMAGE_VADDR);
|
||||||
__rela_size = SIZEOF(.rela);
|
__rela_size = SIZEOF(.rela.dyn);
|
||||||
|
|
||||||
. = ALIGN(SEGMENT_ALIGN);
|
. = ALIGN(SEGMENT_ALIGN);
|
||||||
__initdata_end = .;
|
__initdata_end = .;
|
||||||
|
|
|
@ -165,8 +165,6 @@ static void __init m68k_parse_bootinfo(const struct bi_record *record)
|
||||||
be32_to_cpu(m->addr);
|
be32_to_cpu(m->addr);
|
||||||
m68k_memory[m68k_num_memory].size =
|
m68k_memory[m68k_num_memory].size =
|
||||||
be32_to_cpu(m->size);
|
be32_to_cpu(m->size);
|
||||||
memblock_add(m68k_memory[m68k_num_memory].addr,
|
|
||||||
m68k_memory[m68k_num_memory].size);
|
|
||||||
m68k_num_memory++;
|
m68k_num_memory++;
|
||||||
} else
|
} else
|
||||||
pr_warn("%s: too many memory chunks\n",
|
pr_warn("%s: too many memory chunks\n",
|
||||||
|
|
|
@ -228,6 +228,7 @@ void __init paging_init(void)
|
||||||
|
|
||||||
min_addr = m68k_memory[0].addr;
|
min_addr = m68k_memory[0].addr;
|
||||||
max_addr = min_addr + m68k_memory[0].size;
|
max_addr = min_addr + m68k_memory[0].size;
|
||||||
|
memblock_add(m68k_memory[0].addr, m68k_memory[0].size);
|
||||||
for (i = 1; i < m68k_num_memory;) {
|
for (i = 1; i < m68k_num_memory;) {
|
||||||
if (m68k_memory[i].addr < min_addr) {
|
if (m68k_memory[i].addr < min_addr) {
|
||||||
printk("Ignoring memory chunk at 0x%lx:0x%lx before the first chunk\n",
|
printk("Ignoring memory chunk at 0x%lx:0x%lx before the first chunk\n",
|
||||||
|
@ -238,6 +239,7 @@ void __init paging_init(void)
|
||||||
(m68k_num_memory - i) * sizeof(struct m68k_mem_info));
|
(m68k_num_memory - i) * sizeof(struct m68k_mem_info));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
memblock_add(m68k_memory[i].addr, m68k_memory[i].size);
|
||||||
addr = m68k_memory[i].addr + m68k_memory[i].size;
|
addr = m68k_memory[i].addr + m68k_memory[i].size;
|
||||||
if (addr > max_addr)
|
if (addr > max_addr)
|
||||||
max_addr = addr;
|
max_addr = addr;
|
||||||
|
|
|
@ -160,8 +160,17 @@ else
|
||||||
CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=powerpc64
|
CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=powerpc64
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifdef CONFIG_FUNCTION_TRACER
|
||||||
|
CC_FLAGS_FTRACE := -pg
|
||||||
ifdef CONFIG_MPROFILE_KERNEL
|
ifdef CONFIG_MPROFILE_KERNEL
|
||||||
CC_FLAGS_FTRACE := -pg -mprofile-kernel
|
CC_FLAGS_FTRACE += -mprofile-kernel
|
||||||
|
endif
|
||||||
|
# Work around gcc code-gen bugs with -pg / -fno-omit-frame-pointer in gcc <= 4.8
|
||||||
|
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44199
|
||||||
|
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52828
|
||||||
|
ifneq ($(cc-name),clang)
|
||||||
|
CC_FLAGS_FTRACE += $(call cc-ifversion, -lt, 0409, -mno-sched-epilog)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CFLAGS-$(CONFIG_TARGET_CPU_BOOL) += $(call cc-option,-mcpu=$(CONFIG_TARGET_CPU))
|
CFLAGS-$(CONFIG_TARGET_CPU_BOOL) += $(call cc-option,-mcpu=$(CONFIG_TARGET_CPU))
|
||||||
|
@ -229,11 +238,6 @@ ifdef CONFIG_6xx
|
||||||
KBUILD_CFLAGS += -mcpu=powerpc
|
KBUILD_CFLAGS += -mcpu=powerpc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Work around a gcc code-gen bug with -fno-omit-frame-pointer.
|
|
||||||
ifdef CONFIG_FUNCTION_TRACER
|
|
||||||
KBUILD_CFLAGS += -mno-sched-epilog
|
|
||||||
endif
|
|
||||||
|
|
||||||
cpu-as-$(CONFIG_4xx) += -Wa,-m405
|
cpu-as-$(CONFIG_4xx) += -Wa,-m405
|
||||||
cpu-as-$(CONFIG_ALTIVEC) += $(call as-option,-Wa$(comma)-maltivec)
|
cpu-as-$(CONFIG_ALTIVEC) += $(call as-option,-Wa$(comma)-maltivec)
|
||||||
cpu-as-$(CONFIG_E200) += -Wa,-me200
|
cpu-as-$(CONFIG_E200) += -Wa,-me200
|
||||||
|
@ -408,36 +412,9 @@ archprepare: checkbin
|
||||||
# to stdout and these checks are run even on install targets.
|
# to stdout and these checks are run even on install targets.
|
||||||
TOUT := .tmp_gas_check
|
TOUT := .tmp_gas_check
|
||||||
|
|
||||||
# Check gcc and binutils versions:
|
# Check toolchain versions:
|
||||||
# - gcc-3.4 and binutils-2.14 are a fatal combination
|
# - gcc-4.6 is the minimum kernel-wide version so nothing required.
|
||||||
# - Require gcc 4.0 or above on 64-bit
|
|
||||||
# - gcc-4.2.0 has issues compiling modules on 64-bit
|
|
||||||
checkbin:
|
checkbin:
|
||||||
@if test "$(cc-name)" != "clang" \
|
|
||||||
&& test "$(cc-version)" = "0304" ; then \
|
|
||||||
if ! /bin/echo mftb 5 | $(AS) -v -mppc -many -o $(TOUT) >/dev/null 2>&1 ; then \
|
|
||||||
echo -n '*** ${VERSION}.${PATCHLEVEL} kernels no longer build '; \
|
|
||||||
echo 'correctly with gcc-3.4 and your version of binutils.'; \
|
|
||||||
echo '*** Please upgrade your binutils or downgrade your gcc'; \
|
|
||||||
false; \
|
|
||||||
fi ; \
|
|
||||||
fi
|
|
||||||
@if test "$(cc-name)" != "clang" \
|
|
||||||
&& test "$(cc-version)" -lt "0400" \
|
|
||||||
&& test "x${CONFIG_PPC64}" = "xy" ; then \
|
|
||||||
echo -n "Sorry, GCC v4.0 or above is required to build " ; \
|
|
||||||
echo "the 64-bit powerpc kernel." ; \
|
|
||||||
false ; \
|
|
||||||
fi
|
|
||||||
@if test "$(cc-name)" != "clang" \
|
|
||||||
&& test "$(cc-fullversion)" = "040200" \
|
|
||||||
&& test "x${CONFIG_MODULES}${CONFIG_PPC64}" = "xyy" ; then \
|
|
||||||
echo -n '*** GCC-4.2.0 cannot compile the 64-bit powerpc ' ; \
|
|
||||||
echo 'kernel with modules enabled.' ; \
|
|
||||||
echo -n '*** Please use a different GCC version or ' ; \
|
|
||||||
echo 'disable kernel modules' ; \
|
|
||||||
false ; \
|
|
||||||
fi
|
|
||||||
@if test "x${CONFIG_CPU_LITTLE_ENDIAN}" = "xy" \
|
@if test "x${CONFIG_CPU_LITTLE_ENDIAN}" = "xy" \
|
||||||
&& $(LD) --version | head -1 | grep ' 2\.24$$' >/dev/null ; then \
|
&& $(LD) --version | head -1 | grep ' 2\.24$$' >/dev/null ; then \
|
||||||
echo -n '*** binutils 2.24 miscompiles weak symbols ' ; \
|
echo -n '*** binutils 2.24 miscompiles weak symbols ' ; \
|
||||||
|
|
|
@ -55,6 +55,11 @@ BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc
|
||||||
|
|
||||||
BOOTARFLAGS := -cr$(KBUILD_ARFLAGS)
|
BOOTARFLAGS := -cr$(KBUILD_ARFLAGS)
|
||||||
|
|
||||||
|
ifdef CONFIG_CC_IS_CLANG
|
||||||
|
BOOTCFLAGS += $(CLANG_FLAGS)
|
||||||
|
BOOTAFLAGS += $(CLANG_FLAGS)
|
||||||
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_DEBUG_INFO
|
ifdef CONFIG_DEBUG_INFO
|
||||||
BOOTCFLAGS += -g
|
BOOTCFLAGS += -g
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
RELA = 7
|
RELA = 7
|
||||||
RELACOUNT = 0x6ffffff9
|
RELACOUNT = 0x6ffffff9
|
||||||
|
|
||||||
.text
|
.data
|
||||||
/* A procedure descriptor used when booting this as a COFF file.
|
/* A procedure descriptor used when booting this as a COFF file.
|
||||||
* When making COFF, this comes first in the link and we're
|
* When making COFF, this comes first in the link and we're
|
||||||
* linked at 0x500000.
|
* linked at 0x500000.
|
||||||
|
@ -23,6 +23,8 @@ RELACOUNT = 0x6ffffff9
|
||||||
.globl _zimage_start_opd
|
.globl _zimage_start_opd
|
||||||
_zimage_start_opd:
|
_zimage_start_opd:
|
||||||
.long 0x500000, 0, 0, 0
|
.long 0x500000, 0, 0, 0
|
||||||
|
.text
|
||||||
|
b _zimage_start
|
||||||
|
|
||||||
#ifdef __powerpc64__
|
#ifdef __powerpc64__
|
||||||
.balign 8
|
.balign 8
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
|
|
||||||
CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"'
|
CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"'
|
||||||
|
|
||||||
|
# Disable clang warning for using setjmp without setjmp.h header
|
||||||
|
CFLAGS_crash.o += $(call cc-disable-warning, builtin-requires-header)
|
||||||
|
|
||||||
subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
|
subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
|
||||||
|
|
||||||
ifdef CONFIG_PPC64
|
ifdef CONFIG_PPC64
|
||||||
|
@ -22,10 +25,10 @@ CFLAGS_prom.o += $(DISABLE_LATENT_ENTROPY_PLUGIN)
|
||||||
|
|
||||||
ifdef CONFIG_FUNCTION_TRACER
|
ifdef CONFIG_FUNCTION_TRACER
|
||||||
# Do not trace early boot code
|
# Do not trace early boot code
|
||||||
CFLAGS_REMOVE_cputable.o = -mno-sched-epilog $(CC_FLAGS_FTRACE)
|
CFLAGS_REMOVE_cputable.o = $(CC_FLAGS_FTRACE)
|
||||||
CFLAGS_REMOVE_prom_init.o = -mno-sched-epilog $(CC_FLAGS_FTRACE)
|
CFLAGS_REMOVE_prom_init.o = $(CC_FLAGS_FTRACE)
|
||||||
CFLAGS_REMOVE_btext.o = -mno-sched-epilog $(CC_FLAGS_FTRACE)
|
CFLAGS_REMOVE_btext.o = $(CC_FLAGS_FTRACE)
|
||||||
CFLAGS_REMOVE_prom.o = -mno-sched-epilog $(CC_FLAGS_FTRACE)
|
CFLAGS_REMOVE_prom.o = $(CC_FLAGS_FTRACE)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
obj-y := cputable.o ptrace.o syscalls.o \
|
obj-y := cputable.o ptrace.o syscalls.o \
|
||||||
|
|
|
@ -848,7 +848,23 @@ static long restore_tm_user_regs(struct pt_regs *regs,
|
||||||
/* If TM bits are set to the reserved value, it's an invalid context */
|
/* If TM bits are set to the reserved value, it's an invalid context */
|
||||||
if (MSR_TM_RESV(msr_hi))
|
if (MSR_TM_RESV(msr_hi))
|
||||||
return 1;
|
return 1;
|
||||||
/* Pull in the MSR TM bits from the user context */
|
|
||||||
|
/*
|
||||||
|
* Disabling preemption, since it is unsafe to be preempted
|
||||||
|
* with MSR[TS] set without recheckpointing.
|
||||||
|
*/
|
||||||
|
preempt_disable();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* CAUTION:
|
||||||
|
* After regs->MSR[TS] being updated, make sure that get_user(),
|
||||||
|
* put_user() or similar functions are *not* called. These
|
||||||
|
* functions can generate page faults which will cause the process
|
||||||
|
* to be de-scheduled with MSR[TS] set but without calling
|
||||||
|
* tm_recheckpoint(). This can cause a bug.
|
||||||
|
*
|
||||||
|
* Pull in the MSR TM bits from the user context
|
||||||
|
*/
|
||||||
regs->msr = (regs->msr & ~MSR_TS_MASK) | (msr_hi & MSR_TS_MASK);
|
regs->msr = (regs->msr & ~MSR_TS_MASK) | (msr_hi & MSR_TS_MASK);
|
||||||
/* Now, recheckpoint. This loads up all of the checkpointed (older)
|
/* Now, recheckpoint. This loads up all of the checkpointed (older)
|
||||||
* registers, including FP and V[S]Rs. After recheckpointing, the
|
* registers, including FP and V[S]Rs. After recheckpointing, the
|
||||||
|
@ -873,6 +889,8 @@ static long restore_tm_user_regs(struct pt_regs *regs,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
preempt_enable();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -1140,11 +1158,11 @@ SYSCALL_DEFINE0(rt_sigreturn)
|
||||||
{
|
{
|
||||||
struct rt_sigframe __user *rt_sf;
|
struct rt_sigframe __user *rt_sf;
|
||||||
struct pt_regs *regs = current_pt_regs();
|
struct pt_regs *regs = current_pt_regs();
|
||||||
int tm_restore = 0;
|
|
||||||
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
|
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
|
||||||
struct ucontext __user *uc_transact;
|
struct ucontext __user *uc_transact;
|
||||||
unsigned long msr_hi;
|
unsigned long msr_hi;
|
||||||
unsigned long tmp;
|
unsigned long tmp;
|
||||||
|
int tm_restore = 0;
|
||||||
#endif
|
#endif
|
||||||
/* Always make any pending restarted system calls return -EINTR */
|
/* Always make any pending restarted system calls return -EINTR */
|
||||||
current->restart_block.fn = do_no_restart_syscall;
|
current->restart_block.fn = do_no_restart_syscall;
|
||||||
|
@ -1192,19 +1210,11 @@ SYSCALL_DEFINE0(rt_sigreturn)
|
||||||
goto bad;
|
goto bad;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!tm_restore) {
|
|
||||||
/*
|
|
||||||
* Unset regs->msr because ucontext MSR TS is not
|
|
||||||
* set, and recheckpoint was not called. This avoid
|
|
||||||
* hitting a TM Bad thing at RFID
|
|
||||||
*/
|
|
||||||
regs->msr &= ~MSR_TS_MASK;
|
|
||||||
}
|
|
||||||
/* Fall through, for non-TM restore */
|
|
||||||
#endif
|
|
||||||
if (!tm_restore)
|
if (!tm_restore)
|
||||||
if (do_setcontext(&rt_sf->uc, regs, 1))
|
/* Fall through, for non-TM restore */
|
||||||
goto bad;
|
#endif
|
||||||
|
if (do_setcontext(&rt_sf->uc, regs, 1))
|
||||||
|
goto bad;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* It's not clear whether or why it is desirable to save the
|
* It's not clear whether or why it is desirable to save the
|
||||||
|
|
|
@ -467,20 +467,6 @@ static long restore_tm_sigcontexts(struct task_struct *tsk,
|
||||||
if (MSR_TM_RESV(msr))
|
if (MSR_TM_RESV(msr))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
/* pull in MSR TS bits from user context */
|
|
||||||
regs->msr = (regs->msr & ~MSR_TS_MASK) | (msr & MSR_TS_MASK);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Ensure that TM is enabled in regs->msr before we leave the signal
|
|
||||||
* handler. It could be the case that (a) user disabled the TM bit
|
|
||||||
* through the manipulation of the MSR bits in uc_mcontext or (b) the
|
|
||||||
* TM bit was disabled because a sufficient number of context switches
|
|
||||||
* happened whilst in the signal handler and load_tm overflowed,
|
|
||||||
* disabling the TM bit. In either case we can end up with an illegal
|
|
||||||
* TM state leading to a TM Bad Thing when we return to userspace.
|
|
||||||
*/
|
|
||||||
regs->msr |= MSR_TM;
|
|
||||||
|
|
||||||
/* pull in MSR LE from user context */
|
/* pull in MSR LE from user context */
|
||||||
regs->msr = (regs->msr & ~MSR_LE) | (msr & MSR_LE);
|
regs->msr = (regs->msr & ~MSR_LE) | (msr & MSR_LE);
|
||||||
|
|
||||||
|
@ -572,6 +558,34 @@ static long restore_tm_sigcontexts(struct task_struct *tsk,
|
||||||
tm_enable();
|
tm_enable();
|
||||||
/* Make sure the transaction is marked as failed */
|
/* Make sure the transaction is marked as failed */
|
||||||
tsk->thread.tm_texasr |= TEXASR_FS;
|
tsk->thread.tm_texasr |= TEXASR_FS;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Disabling preemption, since it is unsafe to be preempted
|
||||||
|
* with MSR[TS] set without recheckpointing.
|
||||||
|
*/
|
||||||
|
preempt_disable();
|
||||||
|
|
||||||
|
/* pull in MSR TS bits from user context */
|
||||||
|
regs->msr = (regs->msr & ~MSR_TS_MASK) | (msr & MSR_TS_MASK);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Ensure that TM is enabled in regs->msr before we leave the signal
|
||||||
|
* handler. It could be the case that (a) user disabled the TM bit
|
||||||
|
* through the manipulation of the MSR bits in uc_mcontext or (b) the
|
||||||
|
* TM bit was disabled because a sufficient number of context switches
|
||||||
|
* happened whilst in the signal handler and load_tm overflowed,
|
||||||
|
* disabling the TM bit. In either case we can end up with an illegal
|
||||||
|
* TM state leading to a TM Bad Thing when we return to userspace.
|
||||||
|
*
|
||||||
|
* CAUTION:
|
||||||
|
* After regs->MSR[TS] being updated, make sure that get_user(),
|
||||||
|
* put_user() or similar functions are *not* called. These
|
||||||
|
* functions can generate page faults which will cause the process
|
||||||
|
* to be de-scheduled with MSR[TS] set but without calling
|
||||||
|
* tm_recheckpoint(). This can cause a bug.
|
||||||
|
*/
|
||||||
|
regs->msr |= MSR_TM;
|
||||||
|
|
||||||
/* This loads the checkpointed FP/VEC state, if used */
|
/* This loads the checkpointed FP/VEC state, if used */
|
||||||
tm_recheckpoint(&tsk->thread);
|
tm_recheckpoint(&tsk->thread);
|
||||||
|
|
||||||
|
@ -585,6 +599,8 @@ static long restore_tm_sigcontexts(struct task_struct *tsk,
|
||||||
regs->msr |= MSR_VEC;
|
regs->msr |= MSR_VEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
preempt_enable();
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -740,23 +756,11 @@ SYSCALL_DEFINE0(rt_sigreturn)
|
||||||
&uc_transact->uc_mcontext))
|
&uc_transact->uc_mcontext))
|
||||||
goto badframe;
|
goto badframe;
|
||||||
}
|
}
|
||||||
#endif
|
else
|
||||||
/* Fall through, for non-TM restore */
|
/* Fall through, for non-TM restore */
|
||||||
if (!MSR_TM_ACTIVE(msr)) {
|
#endif
|
||||||
/*
|
if (restore_sigcontext(current, NULL, 1, &uc->uc_mcontext))
|
||||||
* Unset MSR[TS] on the thread regs since MSR from user
|
goto badframe;
|
||||||
* context does not have MSR active, and recheckpoint was
|
|
||||||
* not called since restore_tm_sigcontexts() was not called
|
|
||||||
* also.
|
|
||||||
*
|
|
||||||
* If not unsetting it, the code can RFID to userspace with
|
|
||||||
* MSR[TS] set, but without CPU in the proper state,
|
|
||||||
* causing a TM bad thing.
|
|
||||||
*/
|
|
||||||
current->thread.regs->msr &= ~MSR_TS_MASK;
|
|
||||||
if (restore_sigcontext(current, NULL, 1, &uc->uc_mcontext))
|
|
||||||
goto badframe;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (restore_altstack(&uc->uc_stack))
|
if (restore_altstack(&uc->uc_stack))
|
||||||
goto badframe;
|
goto badframe;
|
||||||
|
|
|
@ -7,7 +7,7 @@ subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
|
||||||
|
|
||||||
ifdef CONFIG_FUNCTION_TRACER
|
ifdef CONFIG_FUNCTION_TRACER
|
||||||
# do not trace tracer code
|
# do not trace tracer code
|
||||||
CFLAGS_REMOVE_ftrace.o = -mno-sched-epilog $(CC_FLAGS_FTRACE)
|
CFLAGS_REMOVE_ftrace.o = $(CC_FLAGS_FTRACE)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
obj32-$(CONFIG_FUNCTION_TRACER) += ftrace_32.o
|
obj32-$(CONFIG_FUNCTION_TRACER) += ftrace_32.o
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#include <linux/hugetlb.h>
|
#include <linux/hugetlb.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
#include <linux/mm.h>
|
#include <linux/mm.h>
|
||||||
|
#include <linux/highmem.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
#include <linux/seq_file.h>
|
#include <linux/seq_file.h>
|
||||||
#include <asm/fixmap.h>
|
#include <asm/fixmap.h>
|
||||||
|
|
|
@ -188,15 +188,20 @@ int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node,
|
||||||
pr_debug("vmemmap_populate %lx..%lx, node %d\n", start, end, node);
|
pr_debug("vmemmap_populate %lx..%lx, node %d\n", start, end, node);
|
||||||
|
|
||||||
for (; start < end; start += page_size) {
|
for (; start < end; start += page_size) {
|
||||||
void *p;
|
void *p = NULL;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
if (vmemmap_populated(start, page_size))
|
if (vmemmap_populated(start, page_size))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Allocate from the altmap first if we have one. This may
|
||||||
|
* fail due to alignment issues when using 16MB hugepages, so
|
||||||
|
* fall back to system memory if the altmap allocation fail.
|
||||||
|
*/
|
||||||
if (altmap)
|
if (altmap)
|
||||||
p = altmap_alloc_block_buf(page_size, altmap);
|
p = altmap_alloc_block_buf(page_size, altmap);
|
||||||
else
|
if (!p)
|
||||||
p = vmemmap_alloc_block_buf(page_size, node);
|
p = vmemmap_alloc_block_buf(page_size, node);
|
||||||
if (!p)
|
if (!p)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
@ -255,8 +260,15 @@ void __ref vmemmap_free(unsigned long start, unsigned long end,
|
||||||
{
|
{
|
||||||
unsigned long page_size = 1 << mmu_psize_defs[mmu_vmemmap_psize].shift;
|
unsigned long page_size = 1 << mmu_psize_defs[mmu_vmemmap_psize].shift;
|
||||||
unsigned long page_order = get_order(page_size);
|
unsigned long page_order = get_order(page_size);
|
||||||
|
unsigned long alt_start = ~0, alt_end = ~0;
|
||||||
|
unsigned long base_pfn;
|
||||||
|
|
||||||
start = _ALIGN_DOWN(start, page_size);
|
start = _ALIGN_DOWN(start, page_size);
|
||||||
|
if (altmap) {
|
||||||
|
alt_start = altmap->base_pfn;
|
||||||
|
alt_end = altmap->base_pfn + altmap->reserve +
|
||||||
|
altmap->free + altmap->alloc + altmap->align;
|
||||||
|
}
|
||||||
|
|
||||||
pr_debug("vmemmap_free %lx...%lx\n", start, end);
|
pr_debug("vmemmap_free %lx...%lx\n", start, end);
|
||||||
|
|
||||||
|
@ -280,8 +292,9 @@ void __ref vmemmap_free(unsigned long start, unsigned long end,
|
||||||
page = pfn_to_page(addr >> PAGE_SHIFT);
|
page = pfn_to_page(addr >> PAGE_SHIFT);
|
||||||
section_base = pfn_to_page(vmemmap_section_start(start));
|
section_base = pfn_to_page(vmemmap_section_start(start));
|
||||||
nr_pages = 1 << page_order;
|
nr_pages = 1 << page_order;
|
||||||
|
base_pfn = PHYS_PFN(addr);
|
||||||
|
|
||||||
if (altmap) {
|
if (base_pfn >= alt_start && base_pfn < alt_end) {
|
||||||
vmem_altmap_free(altmap, nr_pages);
|
vmem_altmap_free(altmap, nr_pages);
|
||||||
} else if (PageReserved(page)) {
|
} else if (PageReserved(page)) {
|
||||||
/* allocated from bootmem */
|
/* allocated from bootmem */
|
||||||
|
|
|
@ -3,7 +3,7 @@ CFLAGS_bootx_init.o += -fPIC
|
||||||
|
|
||||||
ifdef CONFIG_FUNCTION_TRACER
|
ifdef CONFIG_FUNCTION_TRACER
|
||||||
# Do not trace early boot code
|
# Do not trace early boot code
|
||||||
CFLAGS_REMOVE_bootx_init.o = -mno-sched-epilog $(CC_FLAGS_FTRACE)
|
CFLAGS_REMOVE_bootx_init.o = $(CC_FLAGS_FTRACE)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
obj-y += pic.o setup.o time.o feature.o pci.o \
|
obj-y += pic.o setup.o time.o feature.o pci.o \
|
||||||
|
|
|
@ -1,14 +1,17 @@
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
# Makefile for xmon
|
# Makefile for xmon
|
||||||
|
|
||||||
subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
|
# Disable clang warning for using setjmp without setjmp.h header
|
||||||
|
subdir-ccflags-y := $(call cc-disable-warning, builtin-requires-header)
|
||||||
|
|
||||||
|
subdir-ccflags-$(CONFIG_PPC_WERROR) += -Werror
|
||||||
|
|
||||||
GCOV_PROFILE := n
|
GCOV_PROFILE := n
|
||||||
UBSAN_SANITIZE := n
|
UBSAN_SANITIZE := n
|
||||||
|
|
||||||
# Disable ftrace for the entire directory
|
# Disable ftrace for the entire directory
|
||||||
ORIG_CFLAGS := $(KBUILD_CFLAGS)
|
ORIG_CFLAGS := $(KBUILD_CFLAGS)
|
||||||
KBUILD_CFLAGS = $(subst -mno-sched-epilog,,$(subst $(CC_FLAGS_FTRACE),,$(ORIG_CFLAGS)))
|
KBUILD_CFLAGS = $(subst $(CC_FLAGS_FTRACE),,$(ORIG_CFLAGS))
|
||||||
|
|
||||||
ccflags-$(CONFIG_PPC64) := $(NO_MINIMAL_TOC)
|
ccflags-$(CONFIG_PPC64) := $(NO_MINIMAL_TOC)
|
||||||
|
|
||||||
|
|
|
@ -111,6 +111,11 @@ extern unsigned int ptrs_per_p4d;
|
||||||
*/
|
*/
|
||||||
#define MAXMEM (1UL << MAX_PHYSMEM_BITS)
|
#define MAXMEM (1UL << MAX_PHYSMEM_BITS)
|
||||||
|
|
||||||
|
#define GUARD_HOLE_PGD_ENTRY -256UL
|
||||||
|
#define GUARD_HOLE_SIZE (16UL << PGDIR_SHIFT)
|
||||||
|
#define GUARD_HOLE_BASE_ADDR (GUARD_HOLE_PGD_ENTRY << PGDIR_SHIFT)
|
||||||
|
#define GUARD_HOLE_END_ADDR (GUARD_HOLE_BASE_ADDR + GUARD_HOLE_SIZE)
|
||||||
|
|
||||||
#define LDT_PGD_ENTRY -240UL
|
#define LDT_PGD_ENTRY -240UL
|
||||||
#define LDT_BASE_ADDR (LDT_PGD_ENTRY << PGDIR_SHIFT)
|
#define LDT_BASE_ADDR (LDT_PGD_ENTRY << PGDIR_SHIFT)
|
||||||
#define LDT_END_ADDR (LDT_BASE_ADDR + PGDIR_SIZE)
|
#define LDT_END_ADDR (LDT_BASE_ADDR + PGDIR_SIZE)
|
||||||
|
|
|
@ -53,10 +53,10 @@ struct addr_marker {
|
||||||
enum address_markers_idx {
|
enum address_markers_idx {
|
||||||
USER_SPACE_NR = 0,
|
USER_SPACE_NR = 0,
|
||||||
KERNEL_SPACE_NR,
|
KERNEL_SPACE_NR,
|
||||||
LOW_KERNEL_NR,
|
#ifdef CONFIG_MODIFY_LDT_SYSCALL
|
||||||
#if defined(CONFIG_MODIFY_LDT_SYSCALL) && defined(CONFIG_X86_5LEVEL)
|
|
||||||
LDT_NR,
|
LDT_NR,
|
||||||
#endif
|
#endif
|
||||||
|
LOW_KERNEL_NR,
|
||||||
VMALLOC_START_NR,
|
VMALLOC_START_NR,
|
||||||
VMEMMAP_START_NR,
|
VMEMMAP_START_NR,
|
||||||
#ifdef CONFIG_KASAN
|
#ifdef CONFIG_KASAN
|
||||||
|
@ -64,9 +64,6 @@ enum address_markers_idx {
|
||||||
KASAN_SHADOW_END_NR,
|
KASAN_SHADOW_END_NR,
|
||||||
#endif
|
#endif
|
||||||
CPU_ENTRY_AREA_NR,
|
CPU_ENTRY_AREA_NR,
|
||||||
#if defined(CONFIG_MODIFY_LDT_SYSCALL) && !defined(CONFIG_X86_5LEVEL)
|
|
||||||
LDT_NR,
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_X86_ESPFIX64
|
#ifdef CONFIG_X86_ESPFIX64
|
||||||
ESPFIX_START_NR,
|
ESPFIX_START_NR,
|
||||||
#endif
|
#endif
|
||||||
|
@ -493,11 +490,11 @@ static inline bool is_hypervisor_range(int idx)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_X86_64
|
#ifdef CONFIG_X86_64
|
||||||
/*
|
/*
|
||||||
* ffff800000000000 - ffff87ffffffffff is reserved for
|
* A hole in the beginning of kernel address space reserved
|
||||||
* the hypervisor.
|
* for a hypervisor.
|
||||||
*/
|
*/
|
||||||
return (idx >= pgd_index(__PAGE_OFFSET) - 16) &&
|
return (idx >= pgd_index(GUARD_HOLE_BASE_ADDR)) &&
|
||||||
(idx < pgd_index(__PAGE_OFFSET));
|
(idx < pgd_index(GUARD_HOLE_END_ADDR));
|
||||||
#else
|
#else
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -640,19 +640,20 @@ static int __xen_pgd_walk(struct mm_struct *mm, pgd_t *pgd,
|
||||||
unsigned long limit)
|
unsigned long limit)
|
||||||
{
|
{
|
||||||
int i, nr, flush = 0;
|
int i, nr, flush = 0;
|
||||||
unsigned hole_low, hole_high;
|
unsigned hole_low = 0, hole_high = 0;
|
||||||
|
|
||||||
/* The limit is the last byte to be touched */
|
/* The limit is the last byte to be touched */
|
||||||
limit--;
|
limit--;
|
||||||
BUG_ON(limit >= FIXADDR_TOP);
|
BUG_ON(limit >= FIXADDR_TOP);
|
||||||
|
|
||||||
|
#ifdef CONFIG_X86_64
|
||||||
/*
|
/*
|
||||||
* 64-bit has a great big hole in the middle of the address
|
* 64-bit has a great big hole in the middle of the address
|
||||||
* space, which contains the Xen mappings. On 32-bit these
|
* space, which contains the Xen mappings.
|
||||||
* will end up making a zero-sized hole and so is a no-op.
|
|
||||||
*/
|
*/
|
||||||
hole_low = pgd_index(USER_LIMIT);
|
hole_low = pgd_index(GUARD_HOLE_BASE_ADDR);
|
||||||
hole_high = pgd_index(PAGE_OFFSET);
|
hole_high = pgd_index(GUARD_HOLE_END_ADDR);
|
||||||
|
#endif
|
||||||
|
|
||||||
nr = pgd_index(limit) + 1;
|
nr = pgd_index(limit) + 1;
|
||||||
for (i = 0; i < nr; i++) {
|
for (i = 0; i < nr; i++) {
|
||||||
|
|
|
@ -54,13 +54,14 @@ void blk_mq_sched_assign_ioc(struct request *rq, struct bio *bio)
|
||||||
* Mark a hardware queue as needing a restart. For shared queues, maintain
|
* Mark a hardware queue as needing a restart. For shared queues, maintain
|
||||||
* a count of how many hardware queues are marked for restart.
|
* a count of how many hardware queues are marked for restart.
|
||||||
*/
|
*/
|
||||||
static void blk_mq_sched_mark_restart_hctx(struct blk_mq_hw_ctx *hctx)
|
void blk_mq_sched_mark_restart_hctx(struct blk_mq_hw_ctx *hctx)
|
||||||
{
|
{
|
||||||
if (test_bit(BLK_MQ_S_SCHED_RESTART, &hctx->state))
|
if (test_bit(BLK_MQ_S_SCHED_RESTART, &hctx->state))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
set_bit(BLK_MQ_S_SCHED_RESTART, &hctx->state);
|
set_bit(BLK_MQ_S_SCHED_RESTART, &hctx->state);
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(blk_mq_sched_mark_restart_hctx);
|
||||||
|
|
||||||
void blk_mq_sched_restart(struct blk_mq_hw_ctx *hctx)
|
void blk_mq_sched_restart(struct blk_mq_hw_ctx *hctx)
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,6 +15,7 @@ bool blk_mq_sched_try_merge(struct request_queue *q, struct bio *bio,
|
||||||
struct request **merged_request);
|
struct request **merged_request);
|
||||||
bool __blk_mq_sched_bio_merge(struct request_queue *q, struct bio *bio);
|
bool __blk_mq_sched_bio_merge(struct request_queue *q, struct bio *bio);
|
||||||
bool blk_mq_sched_try_insert_merge(struct request_queue *q, struct request *rq);
|
bool blk_mq_sched_try_insert_merge(struct request_queue *q, struct request *rq);
|
||||||
|
void blk_mq_sched_mark_restart_hctx(struct blk_mq_hw_ctx *hctx);
|
||||||
void blk_mq_sched_restart(struct blk_mq_hw_ctx *hctx);
|
void blk_mq_sched_restart(struct blk_mq_hw_ctx *hctx);
|
||||||
|
|
||||||
void blk_mq_sched_insert_request(struct request *rq, bool at_head,
|
void blk_mq_sched_insert_request(struct request *rq, bool at_head,
|
||||||
|
|
|
@ -145,6 +145,11 @@ static inline void blk_stat_activate_nsecs(struct blk_stat_callback *cb,
|
||||||
mod_timer(&cb->timer, jiffies + nsecs_to_jiffies(nsecs));
|
mod_timer(&cb->timer, jiffies + nsecs_to_jiffies(nsecs));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void blk_stat_deactivate(struct blk_stat_callback *cb)
|
||||||
|
{
|
||||||
|
del_timer_sync(&cb->timer);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* blk_stat_activate_msecs() - Gather block statistics during a time window in
|
* blk_stat_activate_msecs() - Gather block statistics during a time window in
|
||||||
* milliseconds.
|
* milliseconds.
|
||||||
|
|
|
@ -760,8 +760,10 @@ void wbt_disable_default(struct request_queue *q)
|
||||||
if (!rqos)
|
if (!rqos)
|
||||||
return;
|
return;
|
||||||
rwb = RQWB(rqos);
|
rwb = RQWB(rqos);
|
||||||
if (rwb->enable_state == WBT_STATE_ON_DEFAULT)
|
if (rwb->enable_state == WBT_STATE_ON_DEFAULT) {
|
||||||
|
blk_stat_deactivate(rwb->cb);
|
||||||
rwb->wb_normal = 0;
|
rwb->wb_normal = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(wbt_disable_default);
|
EXPORT_SYMBOL_GPL(wbt_disable_default);
|
||||||
|
|
||||||
|
|
|
@ -373,9 +373,16 @@ static struct request *__dd_dispatch_request(struct deadline_data *dd)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* One confusing aspect here is that we get called for a specific
|
* One confusing aspect here is that we get called for a specific
|
||||||
* hardware queue, but we return a request that may not be for a
|
* hardware queue, but we may return a request that is for a
|
||||||
* different hardware queue. This is because mq-deadline has shared
|
* different hardware queue. This is because mq-deadline has shared
|
||||||
* state for all hardware queues, in terms of sorting, FIFOs, etc.
|
* state for all hardware queues, in terms of sorting, FIFOs, etc.
|
||||||
|
*
|
||||||
|
* For a zoned block device, __dd_dispatch_request() may return NULL
|
||||||
|
* if all the queued write requests are directed at zones that are already
|
||||||
|
* locked due to on-going write requests. In this case, make sure to mark
|
||||||
|
* the queue as needing a restart to ensure that the queue is run again
|
||||||
|
* and the pending writes dispatched once the target zones for the ongoing
|
||||||
|
* write requests are unlocked in dd_finish_request().
|
||||||
*/
|
*/
|
||||||
static struct request *dd_dispatch_request(struct blk_mq_hw_ctx *hctx)
|
static struct request *dd_dispatch_request(struct blk_mq_hw_ctx *hctx)
|
||||||
{
|
{
|
||||||
|
@ -384,6 +391,9 @@ static struct request *dd_dispatch_request(struct blk_mq_hw_ctx *hctx)
|
||||||
|
|
||||||
spin_lock(&dd->lock);
|
spin_lock(&dd->lock);
|
||||||
rq = __dd_dispatch_request(dd);
|
rq = __dd_dispatch_request(dd);
|
||||||
|
if (!rq && blk_queue_is_zoned(hctx->queue) &&
|
||||||
|
!list_empty(&dd->fifo_list[WRITE]))
|
||||||
|
blk_mq_sched_mark_restart_hctx(hctx);
|
||||||
spin_unlock(&dd->lock);
|
spin_unlock(&dd->lock);
|
||||||
|
|
||||||
return rq;
|
return rq;
|
||||||
|
|
|
@ -538,6 +538,9 @@ static inline int handle_lcd_special_code(struct charlcd *lcd)
|
||||||
}
|
}
|
||||||
case 'x': /* gotoxy : LxXXX[yYYY]; */
|
case 'x': /* gotoxy : LxXXX[yYYY]; */
|
||||||
case 'y': /* gotoxy : LyYYY[xXXX]; */
|
case 'y': /* gotoxy : LyYYY[xXXX]; */
|
||||||
|
if (priv->esc_seq.buf[priv->esc_seq.len - 1] != ';')
|
||||||
|
break;
|
||||||
|
|
||||||
/* If the command is valid, move to the new address */
|
/* If the command is valid, move to the new address */
|
||||||
if (parse_xy(esc, &priv->addr.x, &priv->addr.y))
|
if (parse_xy(esc, &priv->addr.x, &priv->addr.y))
|
||||||
charlcd_gotoxy(lcd);
|
charlcd_gotoxy(lcd);
|
||||||
|
|
|
@ -931,11 +931,11 @@ static void __device_release_driver(struct device *dev, struct device *parent)
|
||||||
|
|
||||||
while (device_links_busy(dev)) {
|
while (device_links_busy(dev)) {
|
||||||
device_unlock(dev);
|
device_unlock(dev);
|
||||||
if (parent)
|
if (parent && dev->bus->need_parent_lock)
|
||||||
device_unlock(parent);
|
device_unlock(parent);
|
||||||
|
|
||||||
device_links_unbind_consumers(dev);
|
device_links_unbind_consumers(dev);
|
||||||
if (parent)
|
if (parent && dev->bus->need_parent_lock)
|
||||||
device_lock(parent);
|
device_lock(parent);
|
||||||
|
|
||||||
device_lock(dev);
|
device_lock(dev);
|
||||||
|
|
|
@ -382,8 +382,10 @@ static ssize_t backing_dev_store(struct device *dev,
|
||||||
|
|
||||||
bdev = bdgrab(I_BDEV(inode));
|
bdev = bdgrab(I_BDEV(inode));
|
||||||
err = blkdev_get(bdev, FMODE_READ | FMODE_WRITE | FMODE_EXCL, zram);
|
err = blkdev_get(bdev, FMODE_READ | FMODE_WRITE | FMODE_EXCL, zram);
|
||||||
if (err < 0)
|
if (err < 0) {
|
||||||
|
bdev = NULL;
|
||||||
goto out;
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
nr_pages = i_size_read(inode) >> PAGE_SHIFT;
|
nr_pages = i_size_read(inode) >> PAGE_SHIFT;
|
||||||
bitmap_sz = BITS_TO_LONGS(nr_pages) * sizeof(long);
|
bitmap_sz = BITS_TO_LONGS(nr_pages) * sizeof(long);
|
||||||
|
|
|
@ -48,9 +48,8 @@ static void dax_pmem_percpu_exit(void *data)
|
||||||
percpu_ref_exit(ref);
|
percpu_ref_exit(ref);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dax_pmem_percpu_kill(void *data)
|
static void dax_pmem_percpu_kill(struct percpu_ref *ref)
|
||||||
{
|
{
|
||||||
struct percpu_ref *ref = data;
|
|
||||||
struct dax_pmem *dax_pmem = to_dax_pmem(ref);
|
struct dax_pmem *dax_pmem = to_dax_pmem(ref);
|
||||||
|
|
||||||
dev_dbg(dax_pmem->dev, "trace\n");
|
dev_dbg(dax_pmem->dev, "trace\n");
|
||||||
|
@ -112,17 +111,10 @@ static int dax_pmem_probe(struct device *dev)
|
||||||
}
|
}
|
||||||
|
|
||||||
dax_pmem->pgmap.ref = &dax_pmem->ref;
|
dax_pmem->pgmap.ref = &dax_pmem->ref;
|
||||||
|
dax_pmem->pgmap.kill = dax_pmem_percpu_kill;
|
||||||
addr = devm_memremap_pages(dev, &dax_pmem->pgmap);
|
addr = devm_memremap_pages(dev, &dax_pmem->pgmap);
|
||||||
if (IS_ERR(addr)) {
|
if (IS_ERR(addr))
|
||||||
devm_remove_action(dev, dax_pmem_percpu_exit, &dax_pmem->ref);
|
|
||||||
percpu_ref_exit(&dax_pmem->ref);
|
|
||||||
return PTR_ERR(addr);
|
return PTR_ERR(addr);
|
||||||
}
|
|
||||||
|
|
||||||
rc = devm_add_action_or_reset(dev, dax_pmem_percpu_kill,
|
|
||||||
&dax_pmem->ref);
|
|
||||||
if (rc)
|
|
||||||
return rc;
|
|
||||||
|
|
||||||
/* adjust the dax_region resource to the start of data */
|
/* adjust the dax_region resource to the start of data */
|
||||||
memcpy(&res, &dax_pmem->pgmap.res, sizeof(res));
|
memcpy(&res, &dax_pmem->pgmap.res, sizeof(res));
|
||||||
|
|
|
@ -773,9 +773,6 @@ static int mvebu_pwm_probe(struct platform_device *pdev,
|
||||||
"marvell,armada-370-gpio"))
|
"marvell,armada-370-gpio"))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (IS_ERR(mvchip->clk))
|
|
||||||
return PTR_ERR(mvchip->clk);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* There are only two sets of PWM configuration registers for
|
* There are only two sets of PWM configuration registers for
|
||||||
* all the GPIO lines on those SoCs which this driver reserves
|
* all the GPIO lines on those SoCs which this driver reserves
|
||||||
|
@ -786,6 +783,9 @@ static int mvebu_pwm_probe(struct platform_device *pdev,
|
||||||
if (!res)
|
if (!res)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if (IS_ERR(mvchip->clk))
|
||||||
|
return PTR_ERR(mvchip->clk);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Use set A for lines of GPIO chip with id 0, B for GPIO chip
|
* Use set A for lines of GPIO chip with id 0, B for GPIO chip
|
||||||
* with id 1. Don't allow further GPIO chips to be used for PWM.
|
* with id 1. Don't allow further GPIO chips to be used for PWM.
|
||||||
|
|
|
@ -122,14 +122,14 @@ static int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p, union drm_amdgpu_cs
|
||||||
goto free_chunk;
|
goto free_chunk;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mutex_lock(&p->ctx->lock);
|
||||||
|
|
||||||
/* skip guilty context job */
|
/* skip guilty context job */
|
||||||
if (atomic_read(&p->ctx->guilty) == 1) {
|
if (atomic_read(&p->ctx->guilty) == 1) {
|
||||||
ret = -ECANCELED;
|
ret = -ECANCELED;
|
||||||
goto free_chunk;
|
goto free_chunk;
|
||||||
}
|
}
|
||||||
|
|
||||||
mutex_lock(&p->ctx->lock);
|
|
||||||
|
|
||||||
/* get chunks */
|
/* get chunks */
|
||||||
chunk_array_user = u64_to_user_ptr(cs->in.chunks);
|
chunk_array_user = u64_to_user_ptr(cs->in.chunks);
|
||||||
if (copy_from_user(chunk_array, chunk_array_user,
|
if (copy_from_user(chunk_array, chunk_array_user,
|
||||||
|
|
|
@ -2894,6 +2894,7 @@ void amdgpu_dm_connector_funcs_reset(struct drm_connector *connector)
|
||||||
state->underscan_enable = false;
|
state->underscan_enable = false;
|
||||||
state->underscan_hborder = 0;
|
state->underscan_hborder = 0;
|
||||||
state->underscan_vborder = 0;
|
state->underscan_vborder = 0;
|
||||||
|
state->max_bpc = 8;
|
||||||
|
|
||||||
__drm_atomic_helper_connector_reset(connector, &state->base);
|
__drm_atomic_helper_connector_reset(connector, &state->base);
|
||||||
}
|
}
|
||||||
|
@ -2911,6 +2912,7 @@ amdgpu_dm_connector_atomic_duplicate_state(struct drm_connector *connector)
|
||||||
if (new_state) {
|
if (new_state) {
|
||||||
__drm_atomic_helper_connector_duplicate_state(connector,
|
__drm_atomic_helper_connector_duplicate_state(connector,
|
||||||
&new_state->base);
|
&new_state->base);
|
||||||
|
new_state->max_bpc = state->max_bpc;
|
||||||
return &new_state->base;
|
return &new_state->base;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1224,8 +1224,16 @@ nv50_mstm_fini(struct nv50_mstm *mstm)
|
||||||
static void
|
static void
|
||||||
nv50_mstm_init(struct nv50_mstm *mstm)
|
nv50_mstm_init(struct nv50_mstm *mstm)
|
||||||
{
|
{
|
||||||
if (mstm && mstm->mgr.mst_state)
|
int ret;
|
||||||
drm_dp_mst_topology_mgr_resume(&mstm->mgr);
|
|
||||||
|
if (!mstm || !mstm->mgr.mst_state)
|
||||||
|
return;
|
||||||
|
|
||||||
|
ret = drm_dp_mst_topology_mgr_resume(&mstm->mgr);
|
||||||
|
if (ret == -1) {
|
||||||
|
drm_dp_mst_topology_mgr_set_mst(&mstm->mgr, false);
|
||||||
|
drm_kms_helper_hotplug_event(mstm->mgr.dev);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -189,12 +189,14 @@ EXPORT_SYMBOL(rockchip_drm_psr_flush_all);
|
||||||
int rockchip_drm_psr_register(struct drm_encoder *encoder,
|
int rockchip_drm_psr_register(struct drm_encoder *encoder,
|
||||||
int (*psr_set)(struct drm_encoder *, bool enable))
|
int (*psr_set)(struct drm_encoder *, bool enable))
|
||||||
{
|
{
|
||||||
struct rockchip_drm_private *drm_drv = encoder->dev->dev_private;
|
struct rockchip_drm_private *drm_drv;
|
||||||
struct psr_drv *psr;
|
struct psr_drv *psr;
|
||||||
|
|
||||||
if (!encoder || !psr_set)
|
if (!encoder || !psr_set)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
drm_drv = encoder->dev->dev_private;
|
||||||
|
|
||||||
psr = kzalloc(sizeof(struct psr_drv), GFP_KERNEL);
|
psr = kzalloc(sizeof(struct psr_drv), GFP_KERNEL);
|
||||||
if (!psr)
|
if (!psr)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
|
@ -322,6 +322,7 @@ static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state)
|
||||||
if (vc4_state->is_unity)
|
if (vc4_state->is_unity)
|
||||||
vc4_state->x_scaling[0] = VC4_SCALING_PPF;
|
vc4_state->x_scaling[0] = VC4_SCALING_PPF;
|
||||||
} else {
|
} else {
|
||||||
|
vc4_state->is_yuv = false;
|
||||||
vc4_state->x_scaling[1] = VC4_SCALING_NONE;
|
vc4_state->x_scaling[1] = VC4_SCALING_NONE;
|
||||||
vc4_state->y_scaling[1] = VC4_SCALING_NONE;
|
vc4_state->y_scaling[1] = VC4_SCALING_NONE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,9 @@
|
||||||
#ifndef HID_IDS_H_FILE
|
#ifndef HID_IDS_H_FILE
|
||||||
#define HID_IDS_H_FILE
|
#define HID_IDS_H_FILE
|
||||||
|
|
||||||
|
#define USB_VENDOR_ID_258A 0x258a
|
||||||
|
#define USB_DEVICE_ID_258A_6A88 0x6a88
|
||||||
|
|
||||||
#define USB_VENDOR_ID_3M 0x0596
|
#define USB_VENDOR_ID_3M 0x0596
|
||||||
#define USB_DEVICE_ID_3M1968 0x0500
|
#define USB_DEVICE_ID_3M1968 0x0500
|
||||||
#define USB_DEVICE_ID_3M2256 0x0502
|
#define USB_DEVICE_ID_3M2256 0x0502
|
||||||
|
|
|
@ -42,6 +42,7 @@ static int ite_event(struct hid_device *hdev, struct hid_field *field,
|
||||||
|
|
||||||
static const struct hid_device_id ite_devices[] = {
|
static const struct hid_device_id ite_devices[] = {
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ITE, USB_DEVICE_ID_ITE8595) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_ITE, USB_DEVICE_ID_ITE8595) },
|
||||||
|
{ HID_USB_DEVICE(USB_VENDOR_ID_258A, USB_DEVICE_ID_258A_6A88) },
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(hid, ite_devices);
|
MODULE_DEVICE_TABLE(hid, ite_devices);
|
||||||
|
|
|
@ -4,7 +4,7 @@ menu "Microsoft Hyper-V guest support"
|
||||||
|
|
||||||
config HYPERV
|
config HYPERV
|
||||||
tristate "Microsoft Hyper-V client drivers"
|
tristate "Microsoft Hyper-V client drivers"
|
||||||
depends on X86 && ACPI && PCI && X86_LOCAL_APIC && HYPERVISOR_GUEST
|
depends on X86 && ACPI && X86_LOCAL_APIC && HYPERVISOR_GUEST
|
||||||
select PARAVIRT
|
select PARAVIRT
|
||||||
help
|
help
|
||||||
Select this option to run Linux as a Hyper-V client operating
|
Select this option to run Linux as a Hyper-V client operating
|
||||||
|
|
|
@ -1423,7 +1423,8 @@ nr_pages_store(struct device *dev, struct device_attribute *attr,
|
||||||
if (!end)
|
if (!end)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
len -= end - p;
|
/* consume the number and the following comma, hence +1 */
|
||||||
|
len -= end - p + 1;
|
||||||
p = end + 1;
|
p = end + 1;
|
||||||
} while (len);
|
} while (len);
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,8 @@ static int ad5686_read_raw(struct iio_dev *indio_dev,
|
||||||
mutex_unlock(&indio_dev->mlock);
|
mutex_unlock(&indio_dev->mlock);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
*val = ret;
|
*val = (ret >> chan->scan_type.shift) &
|
||||||
|
GENMASK(chan->scan_type.realbits - 1, 0);
|
||||||
return IIO_VAL_INT;
|
return IIO_VAL_INT;
|
||||||
case IIO_CHAN_INFO_SCALE:
|
case IIO_CHAN_INFO_SCALE:
|
||||||
*val = st->vref_mv;
|
*val = st->vref_mv;
|
||||||
|
|
|
@ -267,6 +267,9 @@ is_upper_ndev_bond_master_filter(struct ib_device *ib_dev, u8 port,
|
||||||
struct net_device *cookie_ndev = cookie;
|
struct net_device *cookie_ndev = cookie;
|
||||||
bool match = false;
|
bool match = false;
|
||||||
|
|
||||||
|
if (!rdma_ndev)
|
||||||
|
return false;
|
||||||
|
|
||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
if (netif_is_bond_master(cookie_ndev) &&
|
if (netif_is_bond_master(cookie_ndev) &&
|
||||||
rdma_is_upper_dev_rcu(rdma_ndev, cookie_ndev))
|
rdma_is_upper_dev_rcu(rdma_ndev, cookie_ndev))
|
||||||
|
|
|
@ -857,7 +857,9 @@ static int devx_umem_get(struct mlx5_ib_dev *dev, struct ib_ucontext *ucontext,
|
||||||
|
|
||||||
err = uverbs_get_flags32(&access, attrs,
|
err = uverbs_get_flags32(&access, attrs,
|
||||||
MLX5_IB_ATTR_DEVX_UMEM_REG_ACCESS,
|
MLX5_IB_ATTR_DEVX_UMEM_REG_ACCESS,
|
||||||
IB_ACCESS_SUPPORTED);
|
IB_ACCESS_LOCAL_WRITE |
|
||||||
|
IB_ACCESS_REMOTE_WRITE |
|
||||||
|
IB_ACCESS_REMOTE_READ);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
|
|
@ -844,11 +844,16 @@ static enum resp_states do_complete(struct rxe_qp *qp,
|
||||||
|
|
||||||
memset(&cqe, 0, sizeof(cqe));
|
memset(&cqe, 0, sizeof(cqe));
|
||||||
|
|
||||||
wc->wr_id = wqe->wr_id;
|
if (qp->rcq->is_user) {
|
||||||
wc->status = qp->resp.status;
|
uwc->status = qp->resp.status;
|
||||||
wc->qp = &qp->ibqp;
|
uwc->qp_num = qp->ibqp.qp_num;
|
||||||
|
uwc->wr_id = wqe->wr_id;
|
||||||
|
} else {
|
||||||
|
wc->status = qp->resp.status;
|
||||||
|
wc->qp = &qp->ibqp;
|
||||||
|
wc->wr_id = wqe->wr_id;
|
||||||
|
}
|
||||||
|
|
||||||
/* fields after status are not required for errors */
|
|
||||||
if (wc->status == IB_WC_SUCCESS) {
|
if (wc->status == IB_WC_SUCCESS) {
|
||||||
wc->opcode = (pkt->mask & RXE_IMMDT_MASK &&
|
wc->opcode = (pkt->mask & RXE_IMMDT_MASK &&
|
||||||
pkt->mask & RXE_WRITE_MASK) ?
|
pkt->mask & RXE_WRITE_MASK) ?
|
||||||
|
|
|
@ -2009,6 +2009,14 @@ static void srpt_free_ch(struct kref *kref)
|
||||||
kfree_rcu(ch, rcu);
|
kfree_rcu(ch, rcu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Shut down the SCSI target session, tell the connection manager to
|
||||||
|
* disconnect the associated RDMA channel, transition the QP to the error
|
||||||
|
* state and remove the channel from the channel list. This function is
|
||||||
|
* typically called from inside srpt_zerolength_write_done(). Concurrent
|
||||||
|
* srpt_zerolength_write() calls from inside srpt_close_ch() are possible
|
||||||
|
* as long as the channel is on sport->nexus_list.
|
||||||
|
*/
|
||||||
static void srpt_release_channel_work(struct work_struct *w)
|
static void srpt_release_channel_work(struct work_struct *w)
|
||||||
{
|
{
|
||||||
struct srpt_rdma_ch *ch;
|
struct srpt_rdma_ch *ch;
|
||||||
|
@ -2036,6 +2044,11 @@ static void srpt_release_channel_work(struct work_struct *w)
|
||||||
else
|
else
|
||||||
ib_destroy_cm_id(ch->ib_cm.cm_id);
|
ib_destroy_cm_id(ch->ib_cm.cm_id);
|
||||||
|
|
||||||
|
sport = ch->sport;
|
||||||
|
mutex_lock(&sport->mutex);
|
||||||
|
list_del_rcu(&ch->list);
|
||||||
|
mutex_unlock(&sport->mutex);
|
||||||
|
|
||||||
srpt_destroy_ch_ib(ch);
|
srpt_destroy_ch_ib(ch);
|
||||||
|
|
||||||
srpt_free_ioctx_ring((struct srpt_ioctx **)ch->ioctx_ring,
|
srpt_free_ioctx_ring((struct srpt_ioctx **)ch->ioctx_ring,
|
||||||
|
@ -2046,11 +2059,6 @@ static void srpt_release_channel_work(struct work_struct *w)
|
||||||
sdev, ch->rq_size,
|
sdev, ch->rq_size,
|
||||||
srp_max_req_size, DMA_FROM_DEVICE);
|
srp_max_req_size, DMA_FROM_DEVICE);
|
||||||
|
|
||||||
sport = ch->sport;
|
|
||||||
mutex_lock(&sport->mutex);
|
|
||||||
list_del_rcu(&ch->list);
|
|
||||||
mutex_unlock(&sport->mutex);
|
|
||||||
|
|
||||||
wake_up(&sport->ch_releaseQ);
|
wake_up(&sport->ch_releaseQ);
|
||||||
|
|
||||||
kref_put(&ch->kref, srpt_free_ch);
|
kref_put(&ch->kref, srpt_free_ch);
|
||||||
|
|
|
@ -126,12 +126,8 @@ static irqreturn_t omap4_keypad_irq_handler(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
struct omap4_keypad *keypad_data = dev_id;
|
struct omap4_keypad *keypad_data = dev_id;
|
||||||
|
|
||||||
if (kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS)) {
|
if (kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS))
|
||||||
/* Disable interrupts */
|
|
||||||
kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQENABLE,
|
|
||||||
OMAP4_VAL_IRQDISABLE);
|
|
||||||
return IRQ_WAKE_THREAD;
|
return IRQ_WAKE_THREAD;
|
||||||
}
|
|
||||||
|
|
||||||
return IRQ_NONE;
|
return IRQ_NONE;
|
||||||
}
|
}
|
||||||
|
@ -173,11 +169,6 @@ static irqreturn_t omap4_keypad_irq_thread_fn(int irq, void *dev_id)
|
||||||
kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS,
|
kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS,
|
||||||
kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS));
|
kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS));
|
||||||
|
|
||||||
/* enable interrupts */
|
|
||||||
kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQENABLE,
|
|
||||||
OMAP4_DEF_IRQENABLE_EVENTEN |
|
|
||||||
OMAP4_DEF_IRQENABLE_LONGKEY);
|
|
||||||
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -214,9 +205,10 @@ static void omap4_keypad_close(struct input_dev *input)
|
||||||
|
|
||||||
disable_irq(keypad_data->irq);
|
disable_irq(keypad_data->irq);
|
||||||
|
|
||||||
/* Disable interrupts */
|
/* Disable interrupts and wake-up events */
|
||||||
kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQENABLE,
|
kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQENABLE,
|
||||||
OMAP4_VAL_IRQDISABLE);
|
OMAP4_VAL_IRQDISABLE);
|
||||||
|
kbd_writel(keypad_data, OMAP4_KBD_WAKEUPENABLE, 0);
|
||||||
|
|
||||||
/* clear pending interrupts */
|
/* clear pending interrupts */
|
||||||
kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS,
|
kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS,
|
||||||
|
@ -365,7 +357,7 @@ static int omap4_keypad_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
error = request_threaded_irq(keypad_data->irq, omap4_keypad_irq_handler,
|
error = request_threaded_irq(keypad_data->irq, omap4_keypad_irq_handler,
|
||||||
omap4_keypad_irq_thread_fn, 0,
|
omap4_keypad_irq_thread_fn, IRQF_ONESHOT,
|
||||||
"omap4-keypad", keypad_data);
|
"omap4-keypad", keypad_data);
|
||||||
if (error) {
|
if (error) {
|
||||||
dev_err(&pdev->dev, "failed to register interrupt\n");
|
dev_err(&pdev->dev, "failed to register interrupt\n");
|
||||||
|
|
|
@ -171,6 +171,7 @@ static const char * const smbus_pnp_ids[] = {
|
||||||
"LEN0046", /* X250 */
|
"LEN0046", /* X250 */
|
||||||
"LEN004a", /* W541 */
|
"LEN004a", /* W541 */
|
||||||
"LEN005b", /* P50 */
|
"LEN005b", /* P50 */
|
||||||
|
"LEN005e", /* T560 */
|
||||||
"LEN0071", /* T480 */
|
"LEN0071", /* T480 */
|
||||||
"LEN0072", /* X1 Carbon Gen 5 (2017) - Elan/ALPS trackpoint */
|
"LEN0072", /* X1 Carbon Gen 5 (2017) - Elan/ALPS trackpoint */
|
||||||
"LEN0073", /* X1 Carbon G5 (Elantech) */
|
"LEN0073", /* X1 Carbon G5 (Elantech) */
|
||||||
|
@ -178,6 +179,7 @@ static const char * const smbus_pnp_ids[] = {
|
||||||
"LEN0096", /* X280 */
|
"LEN0096", /* X280 */
|
||||||
"LEN0097", /* X280 -> ALPS trackpoint */
|
"LEN0097", /* X280 -> ALPS trackpoint */
|
||||||
"LEN200f", /* T450s */
|
"LEN200f", /* T450s */
|
||||||
|
"SYN3052", /* HP EliteBook 840 G4 */
|
||||||
"SYN3221", /* HP 15-ay000 */
|
"SYN3221", /* HP 15-ay000 */
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
|
@ -2069,7 +2069,7 @@ static int domain_context_mapping_one(struct dmar_domain *domain,
|
||||||
* than default. Unnecessary for PT mode.
|
* than default. Unnecessary for PT mode.
|
||||||
*/
|
*/
|
||||||
if (translation != CONTEXT_TT_PASS_THROUGH) {
|
if (translation != CONTEXT_TT_PASS_THROUGH) {
|
||||||
for (agaw = domain->agaw; agaw != iommu->agaw; agaw--) {
|
for (agaw = domain->agaw; agaw > iommu->agaw; agaw--) {
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
pgd = phys_to_virt(dma_pte_addr(pgd));
|
pgd = phys_to_virt(dma_pte_addr(pgd));
|
||||||
if (!dma_pte_present(pgd))
|
if (!dma_pte_present(pgd))
|
||||||
|
@ -2083,7 +2083,7 @@ static int domain_context_mapping_one(struct dmar_domain *domain,
|
||||||
translation = CONTEXT_TT_MULTI_LEVEL;
|
translation = CONTEXT_TT_MULTI_LEVEL;
|
||||||
|
|
||||||
context_set_address_root(context, virt_to_phys(pgd));
|
context_set_address_root(context, virt_to_phys(pgd));
|
||||||
context_set_address_width(context, iommu->agaw);
|
context_set_address_width(context, agaw);
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* In pass through mode, AW must be programmed to
|
* In pass through mode, AW must be programmed to
|
||||||
|
|
|
@ -100,8 +100,9 @@ static int led_pwm_add(struct device *dev, struct led_pwm_priv *priv,
|
||||||
led_data->pwm = devm_pwm_get(dev, led->name);
|
led_data->pwm = devm_pwm_get(dev, led->name);
|
||||||
if (IS_ERR(led_data->pwm)) {
|
if (IS_ERR(led_data->pwm)) {
|
||||||
ret = PTR_ERR(led_data->pwm);
|
ret = PTR_ERR(led_data->pwm);
|
||||||
dev_err(dev, "unable to request PWM for %s: %d\n",
|
if (ret != -EPROBE_DEFER)
|
||||||
led->name, ret);
|
dev_err(dev, "unable to request PWM for %s: %d\n",
|
||||||
|
led->name, ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include <linux/moduleparam.h>
|
#include <linux/moduleparam.h>
|
||||||
#include <linux/kmod.h>
|
#include <linux/kmod.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
|
#include <linux/pci.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
|
@ -41,6 +42,18 @@ MODULE_AUTHOR("Steven Toth <stoth@linuxtv.org>");
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
MODULE_VERSION(CX23885_VERSION);
|
MODULE_VERSION(CX23885_VERSION);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Some platforms have been found to require periodic resetting of the DMA
|
||||||
|
* engine. Ryzen and XEON platforms are known to be affected. The symptom
|
||||||
|
* encountered is "mpeg risc op code error". Only Ryzen platforms employ
|
||||||
|
* this workaround if the option equals 1. The workaround can be explicitly
|
||||||
|
* disabled for all platforms by setting to 0, the workaround can be forced
|
||||||
|
* on for any platform by setting to 2.
|
||||||
|
*/
|
||||||
|
static unsigned int dma_reset_workaround = 1;
|
||||||
|
module_param(dma_reset_workaround, int, 0644);
|
||||||
|
MODULE_PARM_DESC(dma_reset_workaround, "periodic RiSC dma engine reset; 0-force disable, 1-driver detect (default), 2-force enable");
|
||||||
|
|
||||||
static unsigned int debug;
|
static unsigned int debug;
|
||||||
module_param(debug, int, 0644);
|
module_param(debug, int, 0644);
|
||||||
MODULE_PARM_DESC(debug, "enable debug messages");
|
MODULE_PARM_DESC(debug, "enable debug messages");
|
||||||
|
@ -603,8 +616,13 @@ static void cx23885_risc_disasm(struct cx23885_tsport *port,
|
||||||
|
|
||||||
static void cx23885_clear_bridge_error(struct cx23885_dev *dev)
|
static void cx23885_clear_bridge_error(struct cx23885_dev *dev)
|
||||||
{
|
{
|
||||||
uint32_t reg1_val = cx_read(TC_REQ); /* read-only */
|
uint32_t reg1_val, reg2_val;
|
||||||
uint32_t reg2_val = cx_read(TC_REQ_SET);
|
|
||||||
|
if (!dev->need_dma_reset)
|
||||||
|
return;
|
||||||
|
|
||||||
|
reg1_val = cx_read(TC_REQ); /* read-only */
|
||||||
|
reg2_val = cx_read(TC_REQ_SET);
|
||||||
|
|
||||||
if (reg1_val && reg2_val) {
|
if (reg1_val && reg2_val) {
|
||||||
cx_write(TC_REQ, reg1_val);
|
cx_write(TC_REQ, reg1_val);
|
||||||
|
@ -2058,6 +2076,37 @@ void cx23885_gpio_enable(struct cx23885_dev *dev, u32 mask, int asoutput)
|
||||||
/* TODO: 23-19 */
|
/* TODO: 23-19 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static struct {
|
||||||
|
int vendor, dev;
|
||||||
|
} const broken_dev_id[] = {
|
||||||
|
/* According with
|
||||||
|
* https://openbenchmarking.org/system/1703021-RI-AMDZEN08075/Ryzen%207%201800X/lspci,
|
||||||
|
* 0x1451 is PCI ID for the IOMMU found on Ryzen
|
||||||
|
*/
|
||||||
|
{ PCI_VENDOR_ID_AMD, 0x1451 },
|
||||||
|
};
|
||||||
|
|
||||||
|
static bool cx23885_does_need_dma_reset(void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
struct pci_dev *pdev = NULL;
|
||||||
|
|
||||||
|
if (dma_reset_workaround == 0)
|
||||||
|
return false;
|
||||||
|
else if (dma_reset_workaround == 2)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
for (i = 0; i < ARRAY_SIZE(broken_dev_id); i++) {
|
||||||
|
pdev = pci_get_device(broken_dev_id[i].vendor,
|
||||||
|
broken_dev_id[i].dev, NULL);
|
||||||
|
if (pdev) {
|
||||||
|
pci_dev_put(pdev);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
static int cx23885_initdev(struct pci_dev *pci_dev,
|
static int cx23885_initdev(struct pci_dev *pci_dev,
|
||||||
const struct pci_device_id *pci_id)
|
const struct pci_device_id *pci_id)
|
||||||
{
|
{
|
||||||
|
@ -2069,6 +2118,8 @@ static int cx23885_initdev(struct pci_dev *pci_dev,
|
||||||
if (NULL == dev)
|
if (NULL == dev)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
dev->need_dma_reset = cx23885_does_need_dma_reset();
|
||||||
|
|
||||||
err = v4l2_device_register(&pci_dev->dev, &dev->v4l2_dev);
|
err = v4l2_device_register(&pci_dev->dev, &dev->v4l2_dev);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto fail_free;
|
goto fail_free;
|
||||||
|
|
|
@ -451,6 +451,8 @@ struct cx23885_dev {
|
||||||
/* Analog raw audio */
|
/* Analog raw audio */
|
||||||
struct cx23885_audio_dev *audio_dev;
|
struct cx23885_audio_dev *audio_dev;
|
||||||
|
|
||||||
|
/* Does the system require periodic DMA resets? */
|
||||||
|
unsigned int need_dma_reset:1;
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline struct cx23885_dev *to_cx23885(struct v4l2_device *v4l2_dev)
|
static inline struct cx23885_dev *to_cx23885(struct v4l2_device *v4l2_dev)
|
||||||
|
|
|
@ -217,7 +217,7 @@ u32 genwqe_crc32(u8 *buff, size_t len, u32 init)
|
||||||
void *__genwqe_alloc_consistent(struct genwqe_dev *cd, size_t size,
|
void *__genwqe_alloc_consistent(struct genwqe_dev *cd, size_t size,
|
||||||
dma_addr_t *dma_handle)
|
dma_addr_t *dma_handle)
|
||||||
{
|
{
|
||||||
if (get_order(size) > MAX_ORDER)
|
if (get_order(size) >= MAX_ORDER)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
return dma_zalloc_coherent(&cd->pci_dev->dev, size, dma_handle,
|
return dma_zalloc_coherent(&cd->pci_dev->dev, size, dma_handle,
|
||||||
|
|
|
@ -29,9 +29,6 @@
|
||||||
#define RES_RING_CSR 1
|
#define RES_RING_CSR 1
|
||||||
#define RES_RING_CMD 2
|
#define RES_RING_CMD 2
|
||||||
|
|
||||||
static const struct of_device_id xgene_enet_of_match[];
|
|
||||||
static const struct acpi_device_id xgene_enet_acpi_match[];
|
|
||||||
|
|
||||||
static void xgene_enet_init_bufpool(struct xgene_enet_desc_ring *buf_pool)
|
static void xgene_enet_init_bufpool(struct xgene_enet_desc_ring *buf_pool)
|
||||||
{
|
{
|
||||||
struct xgene_enet_raw_desc16 *raw_desc;
|
struct xgene_enet_raw_desc16 *raw_desc;
|
||||||
|
|
|
@ -1282,6 +1282,7 @@ enum sp_rtnl_flag {
|
||||||
BNX2X_SP_RTNL_TX_STOP,
|
BNX2X_SP_RTNL_TX_STOP,
|
||||||
BNX2X_SP_RTNL_GET_DRV_VERSION,
|
BNX2X_SP_RTNL_GET_DRV_VERSION,
|
||||||
BNX2X_SP_RTNL_CHANGE_UDP_PORT,
|
BNX2X_SP_RTNL_CHANGE_UDP_PORT,
|
||||||
|
BNX2X_SP_RTNL_UPDATE_SVID,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum bnx2x_iov_flag {
|
enum bnx2x_iov_flag {
|
||||||
|
|
|
@ -2925,6 +2925,10 @@ static void bnx2x_handle_update_svid_cmd(struct bnx2x *bp)
|
||||||
func_params.f_obj = &bp->func_obj;
|
func_params.f_obj = &bp->func_obj;
|
||||||
func_params.cmd = BNX2X_F_CMD_SWITCH_UPDATE;
|
func_params.cmd = BNX2X_F_CMD_SWITCH_UPDATE;
|
||||||
|
|
||||||
|
/* Prepare parameters for function state transitions */
|
||||||
|
__set_bit(RAMROD_COMP_WAIT, &func_params.ramrod_flags);
|
||||||
|
__set_bit(RAMROD_RETRY, &func_params.ramrod_flags);
|
||||||
|
|
||||||
if (IS_MF_UFP(bp) || IS_MF_BD(bp)) {
|
if (IS_MF_UFP(bp) || IS_MF_BD(bp)) {
|
||||||
int func = BP_ABS_FUNC(bp);
|
int func = BP_ABS_FUNC(bp);
|
||||||
u32 val;
|
u32 val;
|
||||||
|
@ -4301,7 +4305,8 @@ static void bnx2x_attn_int_deasserted3(struct bnx2x *bp, u32 attn)
|
||||||
bnx2x_handle_eee_event(bp);
|
bnx2x_handle_eee_event(bp);
|
||||||
|
|
||||||
if (val & DRV_STATUS_OEM_UPDATE_SVID)
|
if (val & DRV_STATUS_OEM_UPDATE_SVID)
|
||||||
bnx2x_handle_update_svid_cmd(bp);
|
bnx2x_schedule_sp_rtnl(bp,
|
||||||
|
BNX2X_SP_RTNL_UPDATE_SVID, 0);
|
||||||
|
|
||||||
if (bp->link_vars.periodic_flags &
|
if (bp->link_vars.periodic_flags &
|
||||||
PERIODIC_FLAGS_LINK_EVENT) {
|
PERIODIC_FLAGS_LINK_EVENT) {
|
||||||
|
@ -8462,6 +8467,7 @@ int bnx2x_set_vlan_one(struct bnx2x *bp, u16 vlan,
|
||||||
/* Fill a user request section if needed */
|
/* Fill a user request section if needed */
|
||||||
if (!test_bit(RAMROD_CONT, ramrod_flags)) {
|
if (!test_bit(RAMROD_CONT, ramrod_flags)) {
|
||||||
ramrod_param.user_req.u.vlan.vlan = vlan;
|
ramrod_param.user_req.u.vlan.vlan = vlan;
|
||||||
|
__set_bit(BNX2X_VLAN, &ramrod_param.user_req.vlan_mac_flags);
|
||||||
/* Set the command: ADD or DEL */
|
/* Set the command: ADD or DEL */
|
||||||
if (set)
|
if (set)
|
||||||
ramrod_param.user_req.cmd = BNX2X_VLAN_MAC_ADD;
|
ramrod_param.user_req.cmd = BNX2X_VLAN_MAC_ADD;
|
||||||
|
@ -8482,6 +8488,27 @@ int bnx2x_set_vlan_one(struct bnx2x *bp, u16 vlan,
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int bnx2x_del_all_vlans(struct bnx2x *bp)
|
||||||
|
{
|
||||||
|
struct bnx2x_vlan_mac_obj *vlan_obj = &bp->sp_objs[0].vlan_obj;
|
||||||
|
unsigned long ramrod_flags = 0, vlan_flags = 0;
|
||||||
|
struct bnx2x_vlan_entry *vlan;
|
||||||
|
int rc;
|
||||||
|
|
||||||
|
__set_bit(RAMROD_COMP_WAIT, &ramrod_flags);
|
||||||
|
__set_bit(BNX2X_VLAN, &vlan_flags);
|
||||||
|
rc = vlan_obj->delete_all(bp, vlan_obj, &vlan_flags, &ramrod_flags);
|
||||||
|
if (rc)
|
||||||
|
return rc;
|
||||||
|
|
||||||
|
/* Mark that hw forgot all entries */
|
||||||
|
list_for_each_entry(vlan, &bp->vlan_reg, link)
|
||||||
|
vlan->hw = false;
|
||||||
|
bp->vlan_cnt = 0;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int bnx2x_del_all_macs(struct bnx2x *bp,
|
int bnx2x_del_all_macs(struct bnx2x *bp,
|
||||||
struct bnx2x_vlan_mac_obj *mac_obj,
|
struct bnx2x_vlan_mac_obj *mac_obj,
|
||||||
int mac_type, bool wait_for_comp)
|
int mac_type, bool wait_for_comp)
|
||||||
|
@ -9320,6 +9347,17 @@ void bnx2x_chip_cleanup(struct bnx2x *bp, int unload_mode, bool keep_link)
|
||||||
BNX2X_ERR("Failed to schedule DEL commands for UC MACs list: %d\n",
|
BNX2X_ERR("Failed to schedule DEL commands for UC MACs list: %d\n",
|
||||||
rc);
|
rc);
|
||||||
|
|
||||||
|
/* The whole *vlan_obj structure may be not initialized if VLAN
|
||||||
|
* filtering offload is not supported by hardware. Currently this is
|
||||||
|
* true for all hardware covered by CHIP_IS_E1x().
|
||||||
|
*/
|
||||||
|
if (!CHIP_IS_E1x(bp)) {
|
||||||
|
/* Remove all currently configured VLANs */
|
||||||
|
rc = bnx2x_del_all_vlans(bp);
|
||||||
|
if (rc < 0)
|
||||||
|
BNX2X_ERR("Failed to delete all VLANs\n");
|
||||||
|
}
|
||||||
|
|
||||||
/* Disable LLH */
|
/* Disable LLH */
|
||||||
if (!CHIP_IS_E1(bp))
|
if (!CHIP_IS_E1(bp))
|
||||||
REG_WR(bp, NIG_REG_LLH0_FUNC_EN + port*8, 0);
|
REG_WR(bp, NIG_REG_LLH0_FUNC_EN + port*8, 0);
|
||||||
|
@ -10349,6 +10387,9 @@ static void bnx2x_sp_rtnl_task(struct work_struct *work)
|
||||||
&bp->sp_rtnl_state))
|
&bp->sp_rtnl_state))
|
||||||
bnx2x_update_mng_version(bp);
|
bnx2x_update_mng_version(bp);
|
||||||
|
|
||||||
|
if (test_and_clear_bit(BNX2X_SP_RTNL_UPDATE_SVID, &bp->sp_rtnl_state))
|
||||||
|
bnx2x_handle_update_svid_cmd(bp);
|
||||||
|
|
||||||
if (test_and_clear_bit(BNX2X_SP_RTNL_CHANGE_UDP_PORT,
|
if (test_and_clear_bit(BNX2X_SP_RTNL_CHANGE_UDP_PORT,
|
||||||
&bp->sp_rtnl_state)) {
|
&bp->sp_rtnl_state)) {
|
||||||
if (bnx2x_udp_port_update(bp)) {
|
if (bnx2x_udp_port_update(bp)) {
|
||||||
|
@ -11740,8 +11781,10 @@ static void bnx2x_get_fcoe_info(struct bnx2x *bp)
|
||||||
* If maximum allowed number of connections is zero -
|
* If maximum allowed number of connections is zero -
|
||||||
* disable the feature.
|
* disable the feature.
|
||||||
*/
|
*/
|
||||||
if (!bp->cnic_eth_dev.max_fcoe_conn)
|
if (!bp->cnic_eth_dev.max_fcoe_conn) {
|
||||||
bp->flags |= NO_FCOE_FLAG;
|
bp->flags |= NO_FCOE_FLAG;
|
||||||
|
eth_zero_addr(bp->fip_mac);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void bnx2x_get_cnic_info(struct bnx2x *bp)
|
static void bnx2x_get_cnic_info(struct bnx2x *bp)
|
||||||
|
@ -13014,13 +13057,6 @@ static void bnx2x_vlan_configure(struct bnx2x *bp, bool set_rx_mode)
|
||||||
|
|
||||||
int bnx2x_vlan_reconfigure_vid(struct bnx2x *bp)
|
int bnx2x_vlan_reconfigure_vid(struct bnx2x *bp)
|
||||||
{
|
{
|
||||||
struct bnx2x_vlan_entry *vlan;
|
|
||||||
|
|
||||||
/* The hw forgot all entries after reload */
|
|
||||||
list_for_each_entry(vlan, &bp->vlan_reg, link)
|
|
||||||
vlan->hw = false;
|
|
||||||
bp->vlan_cnt = 0;
|
|
||||||
|
|
||||||
/* Don't set rx mode here. Our caller will do it. */
|
/* Don't set rx mode here. Our caller will do it. */
|
||||||
bnx2x_vlan_configure(bp, false);
|
bnx2x_vlan_configure(bp, false);
|
||||||
|
|
||||||
|
|
|
@ -265,6 +265,7 @@ enum {
|
||||||
BNX2X_ETH_MAC,
|
BNX2X_ETH_MAC,
|
||||||
BNX2X_ISCSI_ETH_MAC,
|
BNX2X_ISCSI_ETH_MAC,
|
||||||
BNX2X_NETQ_ETH_MAC,
|
BNX2X_NETQ_ETH_MAC,
|
||||||
|
BNX2X_VLAN,
|
||||||
BNX2X_DONT_CONSUME_CAM_CREDIT,
|
BNX2X_DONT_CONSUME_CAM_CREDIT,
|
||||||
BNX2X_DONT_CONSUME_CAM_CREDIT_DEST,
|
BNX2X_DONT_CONSUME_CAM_CREDIT_DEST,
|
||||||
};
|
};
|
||||||
|
@ -272,7 +273,8 @@ enum {
|
||||||
#define BNX2X_VLAN_MAC_CMP_MASK (1 << BNX2X_UC_LIST_MAC | \
|
#define BNX2X_VLAN_MAC_CMP_MASK (1 << BNX2X_UC_LIST_MAC | \
|
||||||
1 << BNX2X_ETH_MAC | \
|
1 << BNX2X_ETH_MAC | \
|
||||||
1 << BNX2X_ISCSI_ETH_MAC | \
|
1 << BNX2X_ISCSI_ETH_MAC | \
|
||||||
1 << BNX2X_NETQ_ETH_MAC)
|
1 << BNX2X_NETQ_ETH_MAC | \
|
||||||
|
1 << BNX2X_VLAN)
|
||||||
#define BNX2X_VLAN_MAC_CMP_FLAGS(flags) \
|
#define BNX2X_VLAN_MAC_CMP_FLAGS(flags) \
|
||||||
((flags) & BNX2X_VLAN_MAC_CMP_MASK)
|
((flags) & BNX2X_VLAN_MAC_CMP_MASK)
|
||||||
|
|
||||||
|
|
|
@ -682,6 +682,11 @@ static void macb_set_addr(struct macb *bp, struct macb_dma_desc *desc, dma_addr_
|
||||||
if (bp->hw_dma_cap & HW_DMA_CAP_64B) {
|
if (bp->hw_dma_cap & HW_DMA_CAP_64B) {
|
||||||
desc_64 = macb_64b_desc(bp, desc);
|
desc_64 = macb_64b_desc(bp, desc);
|
||||||
desc_64->addrh = upper_32_bits(addr);
|
desc_64->addrh = upper_32_bits(addr);
|
||||||
|
/* The low bits of RX address contain the RX_USED bit, clearing
|
||||||
|
* of which allows packet RX. Make sure the high bits are also
|
||||||
|
* visible to HW at that point.
|
||||||
|
*/
|
||||||
|
dma_wmb();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
desc->addr = lower_32_bits(addr);
|
desc->addr = lower_32_bits(addr);
|
||||||
|
@ -930,14 +935,19 @@ static void gem_rx_refill(struct macb_queue *queue)
|
||||||
|
|
||||||
if (entry == bp->rx_ring_size - 1)
|
if (entry == bp->rx_ring_size - 1)
|
||||||
paddr |= MACB_BIT(RX_WRAP);
|
paddr |= MACB_BIT(RX_WRAP);
|
||||||
macb_set_addr(bp, desc, paddr);
|
|
||||||
desc->ctrl = 0;
|
desc->ctrl = 0;
|
||||||
|
/* Setting addr clears RX_USED and allows reception,
|
||||||
|
* make sure ctrl is cleared first to avoid a race.
|
||||||
|
*/
|
||||||
|
dma_wmb();
|
||||||
|
macb_set_addr(bp, desc, paddr);
|
||||||
|
|
||||||
/* properly align Ethernet header */
|
/* properly align Ethernet header */
|
||||||
skb_reserve(skb, NET_IP_ALIGN);
|
skb_reserve(skb, NET_IP_ALIGN);
|
||||||
} else {
|
} else {
|
||||||
desc->addr &= ~MACB_BIT(RX_USED);
|
|
||||||
desc->ctrl = 0;
|
desc->ctrl = 0;
|
||||||
|
dma_wmb();
|
||||||
|
desc->addr &= ~MACB_BIT(RX_USED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -991,11 +1001,15 @@ static int gem_rx(struct macb_queue *queue, int budget)
|
||||||
|
|
||||||
rxused = (desc->addr & MACB_BIT(RX_USED)) ? true : false;
|
rxused = (desc->addr & MACB_BIT(RX_USED)) ? true : false;
|
||||||
addr = macb_get_addr(bp, desc);
|
addr = macb_get_addr(bp, desc);
|
||||||
ctrl = desc->ctrl;
|
|
||||||
|
|
||||||
if (!rxused)
|
if (!rxused)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
/* Ensure ctrl is at least as up-to-date as rxused */
|
||||||
|
dma_rmb();
|
||||||
|
|
||||||
|
ctrl = desc->ctrl;
|
||||||
|
|
||||||
queue->rx_tail++;
|
queue->rx_tail++;
|
||||||
count++;
|
count++;
|
||||||
|
|
||||||
|
@ -1170,11 +1184,14 @@ static int macb_rx(struct macb_queue *queue, int budget)
|
||||||
/* Make hw descriptor updates visible to CPU */
|
/* Make hw descriptor updates visible to CPU */
|
||||||
rmb();
|
rmb();
|
||||||
|
|
||||||
ctrl = desc->ctrl;
|
|
||||||
|
|
||||||
if (!(desc->addr & MACB_BIT(RX_USED)))
|
if (!(desc->addr & MACB_BIT(RX_USED)))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
/* Ensure ctrl is at least as up-to-date as addr */
|
||||||
|
dma_rmb();
|
||||||
|
|
||||||
|
ctrl = desc->ctrl;
|
||||||
|
|
||||||
if (ctrl & MACB_BIT(RX_SOF)) {
|
if (ctrl & MACB_BIT(RX_SOF)) {
|
||||||
if (first_frag != -1)
|
if (first_frag != -1)
|
||||||
discard_partial_frame(queue, first_frag, tail);
|
discard_partial_frame(queue, first_frag, tail);
|
||||||
|
|
|
@ -319,6 +319,8 @@ int gem_ptp_txstamp(struct macb_queue *queue, struct sk_buff *skb,
|
||||||
desc_ptp = macb_ptp_desc(queue->bp, desc);
|
desc_ptp = macb_ptp_desc(queue->bp, desc);
|
||||||
tx_timestamp = &queue->tx_timestamps[head];
|
tx_timestamp = &queue->tx_timestamps[head];
|
||||||
tx_timestamp->skb = skb;
|
tx_timestamp->skb = skb;
|
||||||
|
/* ensure ts_1/ts_2 is loaded after ctrl (TX_USED check) */
|
||||||
|
dma_rmb();
|
||||||
tx_timestamp->desc_ptp.ts_1 = desc_ptp->ts_1;
|
tx_timestamp->desc_ptp.ts_1 = desc_ptp->ts_1;
|
||||||
tx_timestamp->desc_ptp.ts_2 = desc_ptp->ts_2;
|
tx_timestamp->desc_ptp.ts_2 = desc_ptp->ts_2;
|
||||||
/* move head */
|
/* move head */
|
||||||
|
|
|
@ -379,6 +379,9 @@ static void hns_ae_stop(struct hnae_handle *handle)
|
||||||
|
|
||||||
hns_ae_ring_enable_all(handle, 0);
|
hns_ae_ring_enable_all(handle, 0);
|
||||||
|
|
||||||
|
/* clean rx fbd. */
|
||||||
|
hns_rcb_wait_fbd_clean(handle->qs, handle->q_num, RCB_INT_FLAG_RX);
|
||||||
|
|
||||||
(void)hns_mac_vm_config_bc_en(mac_cb, 0, false);
|
(void)hns_mac_vm_config_bc_en(mac_cb, 0, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,11 +67,14 @@ static void hns_gmac_enable(void *mac_drv, enum mac_commom_mode mode)
|
||||||
struct mac_driver *drv = (struct mac_driver *)mac_drv;
|
struct mac_driver *drv = (struct mac_driver *)mac_drv;
|
||||||
|
|
||||||
/*enable GE rX/tX */
|
/*enable GE rX/tX */
|
||||||
if ((mode == MAC_COMM_MODE_TX) || (mode == MAC_COMM_MODE_RX_AND_TX))
|
if (mode == MAC_COMM_MODE_TX || mode == MAC_COMM_MODE_RX_AND_TX)
|
||||||
dsaf_set_dev_bit(drv, GMAC_PORT_EN_REG, GMAC_PORT_TX_EN_B, 1);
|
dsaf_set_dev_bit(drv, GMAC_PORT_EN_REG, GMAC_PORT_TX_EN_B, 1);
|
||||||
|
|
||||||
if ((mode == MAC_COMM_MODE_RX) || (mode == MAC_COMM_MODE_RX_AND_TX))
|
if (mode == MAC_COMM_MODE_RX || mode == MAC_COMM_MODE_RX_AND_TX) {
|
||||||
|
/* enable rx pcs */
|
||||||
|
dsaf_set_dev_bit(drv, GMAC_PCS_RX_EN_REG, 0, 0);
|
||||||
dsaf_set_dev_bit(drv, GMAC_PORT_EN_REG, GMAC_PORT_RX_EN_B, 1);
|
dsaf_set_dev_bit(drv, GMAC_PORT_EN_REG, GMAC_PORT_RX_EN_B, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void hns_gmac_disable(void *mac_drv, enum mac_commom_mode mode)
|
static void hns_gmac_disable(void *mac_drv, enum mac_commom_mode mode)
|
||||||
|
@ -79,11 +82,14 @@ static void hns_gmac_disable(void *mac_drv, enum mac_commom_mode mode)
|
||||||
struct mac_driver *drv = (struct mac_driver *)mac_drv;
|
struct mac_driver *drv = (struct mac_driver *)mac_drv;
|
||||||
|
|
||||||
/*disable GE rX/tX */
|
/*disable GE rX/tX */
|
||||||
if ((mode == MAC_COMM_MODE_TX) || (mode == MAC_COMM_MODE_RX_AND_TX))
|
if (mode == MAC_COMM_MODE_TX || mode == MAC_COMM_MODE_RX_AND_TX)
|
||||||
dsaf_set_dev_bit(drv, GMAC_PORT_EN_REG, GMAC_PORT_TX_EN_B, 0);
|
dsaf_set_dev_bit(drv, GMAC_PORT_EN_REG, GMAC_PORT_TX_EN_B, 0);
|
||||||
|
|
||||||
if ((mode == MAC_COMM_MODE_RX) || (mode == MAC_COMM_MODE_RX_AND_TX))
|
if (mode == MAC_COMM_MODE_RX || mode == MAC_COMM_MODE_RX_AND_TX) {
|
||||||
|
/* disable rx pcs */
|
||||||
|
dsaf_set_dev_bit(drv, GMAC_PCS_RX_EN_REG, 0, 1);
|
||||||
dsaf_set_dev_bit(drv, GMAC_PORT_EN_REG, GMAC_PORT_RX_EN_B, 0);
|
dsaf_set_dev_bit(drv, GMAC_PORT_EN_REG, GMAC_PORT_RX_EN_B, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* hns_gmac_get_en - get port enable
|
/* hns_gmac_get_en - get port enable
|
||||||
|
|
|
@ -778,6 +778,17 @@ static int hns_mac_register_phy(struct hns_mac_cb *mac_cb)
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void hns_mac_remove_phydev(struct hns_mac_cb *mac_cb)
|
||||||
|
{
|
||||||
|
if (!to_acpi_device_node(mac_cb->fw_port) || !mac_cb->phy_dev)
|
||||||
|
return;
|
||||||
|
|
||||||
|
phy_device_remove(mac_cb->phy_dev);
|
||||||
|
phy_device_free(mac_cb->phy_dev);
|
||||||
|
|
||||||
|
mac_cb->phy_dev = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
#define MAC_MEDIA_TYPE_MAX_LEN 16
|
#define MAC_MEDIA_TYPE_MAX_LEN 16
|
||||||
|
|
||||||
static const struct {
|
static const struct {
|
||||||
|
@ -1117,7 +1128,11 @@ void hns_mac_uninit(struct dsaf_device *dsaf_dev)
|
||||||
int max_port_num = hns_mac_get_max_port_num(dsaf_dev);
|
int max_port_num = hns_mac_get_max_port_num(dsaf_dev);
|
||||||
|
|
||||||
for (i = 0; i < max_port_num; i++) {
|
for (i = 0; i < max_port_num; i++) {
|
||||||
|
if (!dsaf_dev->mac_cb[i])
|
||||||
|
continue;
|
||||||
|
|
||||||
dsaf_dev->misc_op->cpld_reset_led(dsaf_dev->mac_cb[i]);
|
dsaf_dev->misc_op->cpld_reset_led(dsaf_dev->mac_cb[i]);
|
||||||
|
hns_mac_remove_phydev(dsaf_dev->mac_cb[i]);
|
||||||
dsaf_dev->mac_cb[i] = NULL;
|
dsaf_dev->mac_cb[i] = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -934,6 +934,62 @@ static void hns_dsaf_tcam_mc_cfg(
|
||||||
spin_unlock_bh(&dsaf_dev->tcam_lock);
|
spin_unlock_bh(&dsaf_dev->tcam_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hns_dsaf_tcam_uc_cfg_vague - INT
|
||||||
|
* @dsaf_dev: dsa fabric device struct pointer
|
||||||
|
* @address,
|
||||||
|
* @ptbl_tcam_data,
|
||||||
|
*/
|
||||||
|
static void hns_dsaf_tcam_uc_cfg_vague(struct dsaf_device *dsaf_dev,
|
||||||
|
u32 address,
|
||||||
|
struct dsaf_tbl_tcam_data *tcam_data,
|
||||||
|
struct dsaf_tbl_tcam_data *tcam_mask,
|
||||||
|
struct dsaf_tbl_tcam_ucast_cfg *tcam_uc)
|
||||||
|
{
|
||||||
|
spin_lock_bh(&dsaf_dev->tcam_lock);
|
||||||
|
hns_dsaf_tbl_tcam_addr_cfg(dsaf_dev, address);
|
||||||
|
hns_dsaf_tbl_tcam_data_cfg(dsaf_dev, tcam_data);
|
||||||
|
hns_dsaf_tbl_tcam_ucast_cfg(dsaf_dev, tcam_uc);
|
||||||
|
hns_dsaf_tbl_tcam_match_cfg(dsaf_dev, tcam_mask);
|
||||||
|
hns_dsaf_tbl_tcam_data_ucast_pul(dsaf_dev);
|
||||||
|
|
||||||
|
/*Restore Match Data*/
|
||||||
|
tcam_mask->tbl_tcam_data_high = 0xffffffff;
|
||||||
|
tcam_mask->tbl_tcam_data_low = 0xffffffff;
|
||||||
|
hns_dsaf_tbl_tcam_match_cfg(dsaf_dev, tcam_mask);
|
||||||
|
|
||||||
|
spin_unlock_bh(&dsaf_dev->tcam_lock);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hns_dsaf_tcam_mc_cfg_vague - INT
|
||||||
|
* @dsaf_dev: dsa fabric device struct pointer
|
||||||
|
* @address,
|
||||||
|
* @ptbl_tcam_data,
|
||||||
|
* @ptbl_tcam_mask
|
||||||
|
* @ptbl_tcam_mcast
|
||||||
|
*/
|
||||||
|
static void hns_dsaf_tcam_mc_cfg_vague(struct dsaf_device *dsaf_dev,
|
||||||
|
u32 address,
|
||||||
|
struct dsaf_tbl_tcam_data *tcam_data,
|
||||||
|
struct dsaf_tbl_tcam_data *tcam_mask,
|
||||||
|
struct dsaf_tbl_tcam_mcast_cfg *tcam_mc)
|
||||||
|
{
|
||||||
|
spin_lock_bh(&dsaf_dev->tcam_lock);
|
||||||
|
hns_dsaf_tbl_tcam_addr_cfg(dsaf_dev, address);
|
||||||
|
hns_dsaf_tbl_tcam_data_cfg(dsaf_dev, tcam_data);
|
||||||
|
hns_dsaf_tbl_tcam_mcast_cfg(dsaf_dev, tcam_mc);
|
||||||
|
hns_dsaf_tbl_tcam_match_cfg(dsaf_dev, tcam_mask);
|
||||||
|
hns_dsaf_tbl_tcam_data_mcast_pul(dsaf_dev);
|
||||||
|
|
||||||
|
/*Restore Match Data*/
|
||||||
|
tcam_mask->tbl_tcam_data_high = 0xffffffff;
|
||||||
|
tcam_mask->tbl_tcam_data_low = 0xffffffff;
|
||||||
|
hns_dsaf_tbl_tcam_match_cfg(dsaf_dev, tcam_mask);
|
||||||
|
|
||||||
|
spin_unlock_bh(&dsaf_dev->tcam_lock);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hns_dsaf_tcam_mc_invld - INT
|
* hns_dsaf_tcam_mc_invld - INT
|
||||||
* @dsaf_id: dsa fabric id
|
* @dsaf_id: dsa fabric id
|
||||||
|
@ -1492,6 +1548,27 @@ static u16 hns_dsaf_find_empty_mac_entry(struct dsaf_device *dsaf_dev)
|
||||||
return DSAF_INVALID_ENTRY_IDX;
|
return DSAF_INVALID_ENTRY_IDX;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hns_dsaf_find_empty_mac_entry_reverse
|
||||||
|
* search dsa fabric soft empty-entry from the end
|
||||||
|
* @dsaf_dev: dsa fabric device struct pointer
|
||||||
|
*/
|
||||||
|
static u16 hns_dsaf_find_empty_mac_entry_reverse(struct dsaf_device *dsaf_dev)
|
||||||
|
{
|
||||||
|
struct dsaf_drv_priv *priv = hns_dsaf_dev_priv(dsaf_dev);
|
||||||
|
struct dsaf_drv_soft_mac_tbl *soft_mac_entry;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
soft_mac_entry = priv->soft_mac_tbl + (DSAF_TCAM_SUM - 1);
|
||||||
|
for (i = (DSAF_TCAM_SUM - 1); i > 0; i--) {
|
||||||
|
/* search all entry from end to start.*/
|
||||||
|
if (soft_mac_entry->index == DSAF_INVALID_ENTRY_IDX)
|
||||||
|
return i;
|
||||||
|
soft_mac_entry--;
|
||||||
|
}
|
||||||
|
return DSAF_INVALID_ENTRY_IDX;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hns_dsaf_set_mac_key - set mac key
|
* hns_dsaf_set_mac_key - set mac key
|
||||||
* @dsaf_dev: dsa fabric device struct pointer
|
* @dsaf_dev: dsa fabric device struct pointer
|
||||||
|
@ -2166,9 +2243,9 @@ void hns_dsaf_update_stats(struct dsaf_device *dsaf_dev, u32 node_num)
|
||||||
DSAF_INODE_LOCAL_ADDR_FALSE_NUM_0_REG + 0x80 * (u64)node_num);
|
DSAF_INODE_LOCAL_ADDR_FALSE_NUM_0_REG + 0x80 * (u64)node_num);
|
||||||
|
|
||||||
hw_stats->vlan_drop += dsaf_read_dev(dsaf_dev,
|
hw_stats->vlan_drop += dsaf_read_dev(dsaf_dev,
|
||||||
DSAF_INODE_SW_VLAN_TAG_DISC_0_REG + 0x80 * (u64)node_num);
|
DSAF_INODE_SW_VLAN_TAG_DISC_0_REG + 4 * (u64)node_num);
|
||||||
hw_stats->stp_drop += dsaf_read_dev(dsaf_dev,
|
hw_stats->stp_drop += dsaf_read_dev(dsaf_dev,
|
||||||
DSAF_INODE_IN_DATA_STP_DISC_0_REG + 0x80 * (u64)node_num);
|
DSAF_INODE_IN_DATA_STP_DISC_0_REG + 4 * (u64)node_num);
|
||||||
|
|
||||||
/* pfc pause frame statistics stored in dsaf inode*/
|
/* pfc pause frame statistics stored in dsaf inode*/
|
||||||
if ((node_num < DSAF_SERVICE_NW_NUM) && !is_ver1) {
|
if ((node_num < DSAF_SERVICE_NW_NUM) && !is_ver1) {
|
||||||
|
@ -2285,237 +2362,237 @@ void hns_dsaf_get_regs(struct dsaf_device *ddev, u32 port, void *data)
|
||||||
DSAF_INODE_BD_ORDER_STATUS_0_REG + j * 4);
|
DSAF_INODE_BD_ORDER_STATUS_0_REG + j * 4);
|
||||||
p[223 + i] = dsaf_read_dev(ddev,
|
p[223 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_INODE_SW_VLAN_TAG_DISC_0_REG + j * 4);
|
DSAF_INODE_SW_VLAN_TAG_DISC_0_REG + j * 4);
|
||||||
p[224 + i] = dsaf_read_dev(ddev,
|
p[226 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_INODE_IN_DATA_STP_DISC_0_REG + j * 4);
|
DSAF_INODE_IN_DATA_STP_DISC_0_REG + j * 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
p[227] = dsaf_read_dev(ddev, DSAF_INODE_GE_FC_EN_0_REG + port * 4);
|
p[229] = dsaf_read_dev(ddev, DSAF_INODE_GE_FC_EN_0_REG + port * 4);
|
||||||
|
|
||||||
for (i = 0; i < DSAF_INODE_NUM / DSAF_COMM_CHN; i++) {
|
for (i = 0; i < DSAF_INODE_NUM / DSAF_COMM_CHN; i++) {
|
||||||
j = i * DSAF_COMM_CHN + port;
|
j = i * DSAF_COMM_CHN + port;
|
||||||
p[228 + i] = dsaf_read_dev(ddev,
|
p[230 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_INODE_VC0_IN_PKT_NUM_0_REG + j * 4);
|
DSAF_INODE_VC0_IN_PKT_NUM_0_REG + j * 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
p[231] = dsaf_read_dev(ddev,
|
p[233] = dsaf_read_dev(ddev,
|
||||||
DSAF_INODE_VC1_IN_PKT_NUM_0_REG + port * 4);
|
DSAF_INODE_VC1_IN_PKT_NUM_0_REG + port * 0x80);
|
||||||
|
|
||||||
/* dsaf inode registers */
|
/* dsaf inode registers */
|
||||||
for (i = 0; i < HNS_DSAF_SBM_NUM(ddev) / DSAF_COMM_CHN; i++) {
|
for (i = 0; i < HNS_DSAF_SBM_NUM(ddev) / DSAF_COMM_CHN; i++) {
|
||||||
j = i * DSAF_COMM_CHN + port;
|
j = i * DSAF_COMM_CHN + port;
|
||||||
p[232 + i] = dsaf_read_dev(ddev,
|
p[234 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_SBM_CFG_REG_0_REG + j * 0x80);
|
DSAF_SBM_CFG_REG_0_REG + j * 0x80);
|
||||||
p[235 + i] = dsaf_read_dev(ddev,
|
p[237 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_SBM_BP_CFG_0_XGE_REG_0_REG + j * 0x80);
|
DSAF_SBM_BP_CFG_0_XGE_REG_0_REG + j * 0x80);
|
||||||
p[238 + i] = dsaf_read_dev(ddev,
|
p[240 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_SBM_BP_CFG_1_REG_0_REG + j * 0x80);
|
DSAF_SBM_BP_CFG_1_REG_0_REG + j * 0x80);
|
||||||
p[241 + i] = dsaf_read_dev(ddev,
|
p[243 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_SBM_BP_CFG_2_XGE_REG_0_REG + j * 0x80);
|
DSAF_SBM_BP_CFG_2_XGE_REG_0_REG + j * 0x80);
|
||||||
p[244 + i] = dsaf_read_dev(ddev,
|
p[246 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_SBM_FREE_CNT_0_0_REG + j * 0x80);
|
DSAF_SBM_FREE_CNT_0_0_REG + j * 0x80);
|
||||||
p[245 + i] = dsaf_read_dev(ddev,
|
p[249 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_SBM_FREE_CNT_1_0_REG + j * 0x80);
|
DSAF_SBM_FREE_CNT_1_0_REG + j * 0x80);
|
||||||
p[248 + i] = dsaf_read_dev(ddev,
|
p[252 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_SBM_BP_CNT_0_0_REG + j * 0x80);
|
DSAF_SBM_BP_CNT_0_0_REG + j * 0x80);
|
||||||
p[251 + i] = dsaf_read_dev(ddev,
|
p[255 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_SBM_BP_CNT_1_0_REG + j * 0x80);
|
DSAF_SBM_BP_CNT_1_0_REG + j * 0x80);
|
||||||
p[254 + i] = dsaf_read_dev(ddev,
|
p[258 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_SBM_BP_CNT_2_0_REG + j * 0x80);
|
DSAF_SBM_BP_CNT_2_0_REG + j * 0x80);
|
||||||
p[257 + i] = dsaf_read_dev(ddev,
|
p[261 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_SBM_BP_CNT_3_0_REG + j * 0x80);
|
DSAF_SBM_BP_CNT_3_0_REG + j * 0x80);
|
||||||
p[260 + i] = dsaf_read_dev(ddev,
|
p[264 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_SBM_INER_ST_0_REG + j * 0x80);
|
DSAF_SBM_INER_ST_0_REG + j * 0x80);
|
||||||
p[263 + i] = dsaf_read_dev(ddev,
|
p[267 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_SBM_MIB_REQ_FAILED_TC_0_REG + j * 0x80);
|
DSAF_SBM_MIB_REQ_FAILED_TC_0_REG + j * 0x80);
|
||||||
p[266 + i] = dsaf_read_dev(ddev,
|
p[270 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_SBM_LNK_INPORT_CNT_0_REG + j * 0x80);
|
DSAF_SBM_LNK_INPORT_CNT_0_REG + j * 0x80);
|
||||||
p[269 + i] = dsaf_read_dev(ddev,
|
p[273 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_SBM_LNK_DROP_CNT_0_REG + j * 0x80);
|
DSAF_SBM_LNK_DROP_CNT_0_REG + j * 0x80);
|
||||||
p[272 + i] = dsaf_read_dev(ddev,
|
p[276 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_SBM_INF_OUTPORT_CNT_0_REG + j * 0x80);
|
DSAF_SBM_INF_OUTPORT_CNT_0_REG + j * 0x80);
|
||||||
p[275 + i] = dsaf_read_dev(ddev,
|
p[279 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_SBM_LNK_INPORT_TC0_CNT_0_REG + j * 0x80);
|
DSAF_SBM_LNK_INPORT_TC0_CNT_0_REG + j * 0x80);
|
||||||
p[278 + i] = dsaf_read_dev(ddev,
|
p[282 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_SBM_LNK_INPORT_TC1_CNT_0_REG + j * 0x80);
|
DSAF_SBM_LNK_INPORT_TC1_CNT_0_REG + j * 0x80);
|
||||||
p[281 + i] = dsaf_read_dev(ddev,
|
p[285 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_SBM_LNK_INPORT_TC2_CNT_0_REG + j * 0x80);
|
DSAF_SBM_LNK_INPORT_TC2_CNT_0_REG + j * 0x80);
|
||||||
p[284 + i] = dsaf_read_dev(ddev,
|
p[288 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_SBM_LNK_INPORT_TC3_CNT_0_REG + j * 0x80);
|
DSAF_SBM_LNK_INPORT_TC3_CNT_0_REG + j * 0x80);
|
||||||
p[287 + i] = dsaf_read_dev(ddev,
|
p[291 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_SBM_LNK_INPORT_TC4_CNT_0_REG + j * 0x80);
|
DSAF_SBM_LNK_INPORT_TC4_CNT_0_REG + j * 0x80);
|
||||||
p[290 + i] = dsaf_read_dev(ddev,
|
p[294 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_SBM_LNK_INPORT_TC5_CNT_0_REG + j * 0x80);
|
DSAF_SBM_LNK_INPORT_TC5_CNT_0_REG + j * 0x80);
|
||||||
p[293 + i] = dsaf_read_dev(ddev,
|
p[297 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_SBM_LNK_INPORT_TC6_CNT_0_REG + j * 0x80);
|
DSAF_SBM_LNK_INPORT_TC6_CNT_0_REG + j * 0x80);
|
||||||
p[296 + i] = dsaf_read_dev(ddev,
|
p[300 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_SBM_LNK_INPORT_TC7_CNT_0_REG + j * 0x80);
|
DSAF_SBM_LNK_INPORT_TC7_CNT_0_REG + j * 0x80);
|
||||||
p[299 + i] = dsaf_read_dev(ddev,
|
p[303 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_SBM_LNK_REQ_CNT_0_REG + j * 0x80);
|
DSAF_SBM_LNK_REQ_CNT_0_REG + j * 0x80);
|
||||||
p[302 + i] = dsaf_read_dev(ddev,
|
p[306 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_SBM_LNK_RELS_CNT_0_REG + j * 0x80);
|
DSAF_SBM_LNK_RELS_CNT_0_REG + j * 0x80);
|
||||||
p[305 + i] = dsaf_read_dev(ddev,
|
p[309 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_SBM_BP_CFG_3_REG_0_REG + j * 0x80);
|
DSAF_SBM_BP_CFG_3_REG_0_REG + j * 0x80);
|
||||||
p[308 + i] = dsaf_read_dev(ddev,
|
p[312 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_SBM_BP_CFG_4_REG_0_REG + j * 0x80);
|
DSAF_SBM_BP_CFG_4_REG_0_REG + j * 0x80);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* dsaf onode registers */
|
/* dsaf onode registers */
|
||||||
for (i = 0; i < DSAF_XOD_NUM; i++) {
|
for (i = 0; i < DSAF_XOD_NUM; i++) {
|
||||||
p[311 + i] = dsaf_read_dev(ddev,
|
p[315 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_XOD_ETS_TSA_TC0_TC3_CFG_0_REG + i * 0x90);
|
DSAF_XOD_ETS_TSA_TC0_TC3_CFG_0_REG + i * 0x90);
|
||||||
p[319 + i] = dsaf_read_dev(ddev,
|
p[323 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_XOD_ETS_TSA_TC4_TC7_CFG_0_REG + i * 0x90);
|
DSAF_XOD_ETS_TSA_TC4_TC7_CFG_0_REG + i * 0x90);
|
||||||
p[327 + i] = dsaf_read_dev(ddev,
|
p[331 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_XOD_ETS_BW_TC0_TC3_CFG_0_REG + i * 0x90);
|
DSAF_XOD_ETS_BW_TC0_TC3_CFG_0_REG + i * 0x90);
|
||||||
p[335 + i] = dsaf_read_dev(ddev,
|
p[339 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_XOD_ETS_BW_TC4_TC7_CFG_0_REG + i * 0x90);
|
DSAF_XOD_ETS_BW_TC4_TC7_CFG_0_REG + i * 0x90);
|
||||||
p[343 + i] = dsaf_read_dev(ddev,
|
p[347 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_XOD_ETS_BW_OFFSET_CFG_0_REG + i * 0x90);
|
DSAF_XOD_ETS_BW_OFFSET_CFG_0_REG + i * 0x90);
|
||||||
p[351 + i] = dsaf_read_dev(ddev,
|
p[355 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_XOD_ETS_TOKEN_CFG_0_REG + i * 0x90);
|
DSAF_XOD_ETS_TOKEN_CFG_0_REG + i * 0x90);
|
||||||
}
|
}
|
||||||
|
|
||||||
p[359] = dsaf_read_dev(ddev, DSAF_XOD_PFS_CFG_0_0_REG + port * 0x90);
|
p[363] = dsaf_read_dev(ddev, DSAF_XOD_PFS_CFG_0_0_REG + port * 0x90);
|
||||||
p[360] = dsaf_read_dev(ddev, DSAF_XOD_PFS_CFG_1_0_REG + port * 0x90);
|
p[364] = dsaf_read_dev(ddev, DSAF_XOD_PFS_CFG_1_0_REG + port * 0x90);
|
||||||
p[361] = dsaf_read_dev(ddev, DSAF_XOD_PFS_CFG_2_0_REG + port * 0x90);
|
p[365] = dsaf_read_dev(ddev, DSAF_XOD_PFS_CFG_2_0_REG + port * 0x90);
|
||||||
|
|
||||||
for (i = 0; i < DSAF_XOD_BIG_NUM / DSAF_COMM_CHN; i++) {
|
for (i = 0; i < DSAF_XOD_BIG_NUM / DSAF_COMM_CHN; i++) {
|
||||||
j = i * DSAF_COMM_CHN + port;
|
j = i * DSAF_COMM_CHN + port;
|
||||||
p[362 + i] = dsaf_read_dev(ddev,
|
p[366 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_XOD_GNT_L_0_REG + j * 0x90);
|
DSAF_XOD_GNT_L_0_REG + j * 0x90);
|
||||||
p[365 + i] = dsaf_read_dev(ddev,
|
p[369 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_XOD_GNT_H_0_REG + j * 0x90);
|
DSAF_XOD_GNT_H_0_REG + j * 0x90);
|
||||||
p[368 + i] = dsaf_read_dev(ddev,
|
p[372 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_XOD_CONNECT_STATE_0_REG + j * 0x90);
|
DSAF_XOD_CONNECT_STATE_0_REG + j * 0x90);
|
||||||
p[371 + i] = dsaf_read_dev(ddev,
|
p[375 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_XOD_RCVPKT_CNT_0_REG + j * 0x90);
|
DSAF_XOD_RCVPKT_CNT_0_REG + j * 0x90);
|
||||||
p[374 + i] = dsaf_read_dev(ddev,
|
p[378 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_XOD_RCVTC0_CNT_0_REG + j * 0x90);
|
DSAF_XOD_RCVTC0_CNT_0_REG + j * 0x90);
|
||||||
p[377 + i] = dsaf_read_dev(ddev,
|
p[381 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_XOD_RCVTC1_CNT_0_REG + j * 0x90);
|
DSAF_XOD_RCVTC1_CNT_0_REG + j * 0x90);
|
||||||
p[380 + i] = dsaf_read_dev(ddev,
|
p[384 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_XOD_RCVTC2_CNT_0_REG + j * 0x90);
|
DSAF_XOD_RCVTC2_CNT_0_REG + j * 0x90);
|
||||||
p[383 + i] = dsaf_read_dev(ddev,
|
p[387 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_XOD_RCVTC3_CNT_0_REG + j * 0x90);
|
DSAF_XOD_RCVTC3_CNT_0_REG + j * 0x90);
|
||||||
p[386 + i] = dsaf_read_dev(ddev,
|
p[390 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_XOD_RCVVC0_CNT_0_REG + j * 0x90);
|
DSAF_XOD_RCVVC0_CNT_0_REG + j * 0x90);
|
||||||
p[389 + i] = dsaf_read_dev(ddev,
|
p[393 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_XOD_RCVVC1_CNT_0_REG + j * 0x90);
|
DSAF_XOD_RCVVC1_CNT_0_REG + j * 0x90);
|
||||||
}
|
}
|
||||||
|
|
||||||
p[392] = dsaf_read_dev(ddev,
|
|
||||||
DSAF_XOD_XGE_RCVIN0_CNT_0_REG + port * 0x90);
|
|
||||||
p[393] = dsaf_read_dev(ddev,
|
|
||||||
DSAF_XOD_XGE_RCVIN1_CNT_0_REG + port * 0x90);
|
|
||||||
p[394] = dsaf_read_dev(ddev,
|
|
||||||
DSAF_XOD_XGE_RCVIN2_CNT_0_REG + port * 0x90);
|
|
||||||
p[395] = dsaf_read_dev(ddev,
|
|
||||||
DSAF_XOD_XGE_RCVIN3_CNT_0_REG + port * 0x90);
|
|
||||||
p[396] = dsaf_read_dev(ddev,
|
p[396] = dsaf_read_dev(ddev,
|
||||||
DSAF_XOD_XGE_RCVIN4_CNT_0_REG + port * 0x90);
|
DSAF_XOD_XGE_RCVIN0_CNT_0_REG + port * 0x90);
|
||||||
p[397] = dsaf_read_dev(ddev,
|
p[397] = dsaf_read_dev(ddev,
|
||||||
DSAF_XOD_XGE_RCVIN5_CNT_0_REG + port * 0x90);
|
DSAF_XOD_XGE_RCVIN1_CNT_0_REG + port * 0x90);
|
||||||
p[398] = dsaf_read_dev(ddev,
|
p[398] = dsaf_read_dev(ddev,
|
||||||
DSAF_XOD_XGE_RCVIN6_CNT_0_REG + port * 0x90);
|
DSAF_XOD_XGE_RCVIN2_CNT_0_REG + port * 0x90);
|
||||||
p[399] = dsaf_read_dev(ddev,
|
p[399] = dsaf_read_dev(ddev,
|
||||||
DSAF_XOD_XGE_RCVIN7_CNT_0_REG + port * 0x90);
|
DSAF_XOD_XGE_RCVIN3_CNT_0_REG + port * 0x90);
|
||||||
p[400] = dsaf_read_dev(ddev,
|
p[400] = dsaf_read_dev(ddev,
|
||||||
DSAF_XOD_PPE_RCVIN0_CNT_0_REG + port * 0x90);
|
DSAF_XOD_XGE_RCVIN4_CNT_0_REG + port * 0x90);
|
||||||
p[401] = dsaf_read_dev(ddev,
|
p[401] = dsaf_read_dev(ddev,
|
||||||
DSAF_XOD_PPE_RCVIN1_CNT_0_REG + port * 0x90);
|
DSAF_XOD_XGE_RCVIN5_CNT_0_REG + port * 0x90);
|
||||||
p[402] = dsaf_read_dev(ddev,
|
p[402] = dsaf_read_dev(ddev,
|
||||||
DSAF_XOD_ROCEE_RCVIN0_CNT_0_REG + port * 0x90);
|
DSAF_XOD_XGE_RCVIN6_CNT_0_REG + port * 0x90);
|
||||||
p[403] = dsaf_read_dev(ddev,
|
p[403] = dsaf_read_dev(ddev,
|
||||||
DSAF_XOD_ROCEE_RCVIN1_CNT_0_REG + port * 0x90);
|
DSAF_XOD_XGE_RCVIN7_CNT_0_REG + port * 0x90);
|
||||||
p[404] = dsaf_read_dev(ddev,
|
p[404] = dsaf_read_dev(ddev,
|
||||||
|
DSAF_XOD_PPE_RCVIN0_CNT_0_REG + port * 0x90);
|
||||||
|
p[405] = dsaf_read_dev(ddev,
|
||||||
|
DSAF_XOD_PPE_RCVIN1_CNT_0_REG + port * 0x90);
|
||||||
|
p[406] = dsaf_read_dev(ddev,
|
||||||
|
DSAF_XOD_ROCEE_RCVIN0_CNT_0_REG + port * 0x90);
|
||||||
|
p[407] = dsaf_read_dev(ddev,
|
||||||
|
DSAF_XOD_ROCEE_RCVIN1_CNT_0_REG + port * 0x90);
|
||||||
|
p[408] = dsaf_read_dev(ddev,
|
||||||
DSAF_XOD_FIFO_STATUS_0_REG + port * 0x90);
|
DSAF_XOD_FIFO_STATUS_0_REG + port * 0x90);
|
||||||
|
|
||||||
/* dsaf voq registers */
|
/* dsaf voq registers */
|
||||||
for (i = 0; i < DSAF_VOQ_NUM / DSAF_COMM_CHN; i++) {
|
for (i = 0; i < DSAF_VOQ_NUM / DSAF_COMM_CHN; i++) {
|
||||||
j = (i * DSAF_COMM_CHN + port) * 0x90;
|
j = (i * DSAF_COMM_CHN + port) * 0x90;
|
||||||
p[405 + i] = dsaf_read_dev(ddev,
|
p[409 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_VOQ_ECC_INVERT_EN_0_REG + j);
|
DSAF_VOQ_ECC_INVERT_EN_0_REG + j);
|
||||||
p[408 + i] = dsaf_read_dev(ddev,
|
p[412 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_VOQ_SRAM_PKT_NUM_0_REG + j);
|
DSAF_VOQ_SRAM_PKT_NUM_0_REG + j);
|
||||||
p[411 + i] = dsaf_read_dev(ddev, DSAF_VOQ_IN_PKT_NUM_0_REG + j);
|
p[415 + i] = dsaf_read_dev(ddev, DSAF_VOQ_IN_PKT_NUM_0_REG + j);
|
||||||
p[414 + i] = dsaf_read_dev(ddev,
|
p[418 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_VOQ_OUT_PKT_NUM_0_REG + j);
|
DSAF_VOQ_OUT_PKT_NUM_0_REG + j);
|
||||||
p[417 + i] = dsaf_read_dev(ddev,
|
p[421 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_VOQ_ECC_ERR_ADDR_0_REG + j);
|
DSAF_VOQ_ECC_ERR_ADDR_0_REG + j);
|
||||||
p[420 + i] = dsaf_read_dev(ddev, DSAF_VOQ_BP_STATUS_0_REG + j);
|
p[424 + i] = dsaf_read_dev(ddev, DSAF_VOQ_BP_STATUS_0_REG + j);
|
||||||
p[423 + i] = dsaf_read_dev(ddev, DSAF_VOQ_SPUP_IDLE_0_REG + j);
|
p[427 + i] = dsaf_read_dev(ddev, DSAF_VOQ_SPUP_IDLE_0_REG + j);
|
||||||
p[426 + i] = dsaf_read_dev(ddev,
|
p[430 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_VOQ_XGE_XOD_REQ_0_0_REG + j);
|
DSAF_VOQ_XGE_XOD_REQ_0_0_REG + j);
|
||||||
p[429 + i] = dsaf_read_dev(ddev,
|
p[433 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_VOQ_XGE_XOD_REQ_1_0_REG + j);
|
DSAF_VOQ_XGE_XOD_REQ_1_0_REG + j);
|
||||||
p[432 + i] = dsaf_read_dev(ddev,
|
p[436 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_VOQ_PPE_XOD_REQ_0_REG + j);
|
DSAF_VOQ_PPE_XOD_REQ_0_REG + j);
|
||||||
p[435 + i] = dsaf_read_dev(ddev,
|
p[439 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_VOQ_ROCEE_XOD_REQ_0_REG + j);
|
DSAF_VOQ_ROCEE_XOD_REQ_0_REG + j);
|
||||||
p[438 + i] = dsaf_read_dev(ddev,
|
p[442 + i] = dsaf_read_dev(ddev,
|
||||||
DSAF_VOQ_BP_ALL_THRD_0_REG + j);
|
DSAF_VOQ_BP_ALL_THRD_0_REG + j);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* dsaf tbl registers */
|
/* dsaf tbl registers */
|
||||||
p[441] = dsaf_read_dev(ddev, DSAF_TBL_CTRL_0_REG);
|
p[445] = dsaf_read_dev(ddev, DSAF_TBL_CTRL_0_REG);
|
||||||
p[442] = dsaf_read_dev(ddev, DSAF_TBL_INT_MSK_0_REG);
|
p[446] = dsaf_read_dev(ddev, DSAF_TBL_INT_MSK_0_REG);
|
||||||
p[443] = dsaf_read_dev(ddev, DSAF_TBL_INT_SRC_0_REG);
|
p[447] = dsaf_read_dev(ddev, DSAF_TBL_INT_SRC_0_REG);
|
||||||
p[444] = dsaf_read_dev(ddev, DSAF_TBL_INT_STS_0_REG);
|
p[448] = dsaf_read_dev(ddev, DSAF_TBL_INT_STS_0_REG);
|
||||||
p[445] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_ADDR_0_REG);
|
p[449] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_ADDR_0_REG);
|
||||||
p[446] = dsaf_read_dev(ddev, DSAF_TBL_LINE_ADDR_0_REG);
|
p[450] = dsaf_read_dev(ddev, DSAF_TBL_LINE_ADDR_0_REG);
|
||||||
p[447] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_HIGH_0_REG);
|
p[451] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_HIGH_0_REG);
|
||||||
p[448] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_LOW_0_REG);
|
p[452] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_LOW_0_REG);
|
||||||
p[449] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_MCAST_CFG_4_0_REG);
|
p[453] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_MCAST_CFG_4_0_REG);
|
||||||
p[450] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_MCAST_CFG_3_0_REG);
|
p[454] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_MCAST_CFG_3_0_REG);
|
||||||
p[451] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_MCAST_CFG_2_0_REG);
|
p[455] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_MCAST_CFG_2_0_REG);
|
||||||
p[452] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_MCAST_CFG_1_0_REG);
|
p[456] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_MCAST_CFG_1_0_REG);
|
||||||
p[453] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_MCAST_CFG_0_0_REG);
|
p[457] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_MCAST_CFG_0_0_REG);
|
||||||
p[454] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_UCAST_CFG_0_REG);
|
p[458] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_UCAST_CFG_0_REG);
|
||||||
p[455] = dsaf_read_dev(ddev, DSAF_TBL_LIN_CFG_0_REG);
|
p[459] = dsaf_read_dev(ddev, DSAF_TBL_LIN_CFG_0_REG);
|
||||||
p[456] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_RDATA_HIGH_0_REG);
|
p[460] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_RDATA_HIGH_0_REG);
|
||||||
p[457] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_RDATA_LOW_0_REG);
|
p[461] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_RDATA_LOW_0_REG);
|
||||||
p[458] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_RAM_RDATA4_0_REG);
|
p[462] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_RAM_RDATA4_0_REG);
|
||||||
p[459] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_RAM_RDATA3_0_REG);
|
p[463] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_RAM_RDATA3_0_REG);
|
||||||
p[460] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_RAM_RDATA2_0_REG);
|
p[464] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_RAM_RDATA2_0_REG);
|
||||||
p[461] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_RAM_RDATA1_0_REG);
|
p[465] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_RAM_RDATA1_0_REG);
|
||||||
p[462] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_RAM_RDATA0_0_REG);
|
p[466] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_RAM_RDATA0_0_REG);
|
||||||
p[463] = dsaf_read_dev(ddev, DSAF_TBL_LIN_RDATA_0_REG);
|
p[467] = dsaf_read_dev(ddev, DSAF_TBL_LIN_RDATA_0_REG);
|
||||||
|
|
||||||
for (i = 0; i < DSAF_SW_PORT_NUM; i++) {
|
for (i = 0; i < DSAF_SW_PORT_NUM; i++) {
|
||||||
j = i * 0x8;
|
j = i * 0x8;
|
||||||
p[464 + 2 * i] = dsaf_read_dev(ddev,
|
p[468 + 2 * i] = dsaf_read_dev(ddev,
|
||||||
DSAF_TBL_DA0_MIS_INFO1_0_REG + j);
|
DSAF_TBL_DA0_MIS_INFO1_0_REG + j);
|
||||||
p[465 + 2 * i] = dsaf_read_dev(ddev,
|
p[469 + 2 * i] = dsaf_read_dev(ddev,
|
||||||
DSAF_TBL_DA0_MIS_INFO0_0_REG + j);
|
DSAF_TBL_DA0_MIS_INFO0_0_REG + j);
|
||||||
}
|
}
|
||||||
|
|
||||||
p[480] = dsaf_read_dev(ddev, DSAF_TBL_SA_MIS_INFO2_0_REG);
|
p[484] = dsaf_read_dev(ddev, DSAF_TBL_SA_MIS_INFO2_0_REG);
|
||||||
p[481] = dsaf_read_dev(ddev, DSAF_TBL_SA_MIS_INFO1_0_REG);
|
p[485] = dsaf_read_dev(ddev, DSAF_TBL_SA_MIS_INFO1_0_REG);
|
||||||
p[482] = dsaf_read_dev(ddev, DSAF_TBL_SA_MIS_INFO0_0_REG);
|
p[486] = dsaf_read_dev(ddev, DSAF_TBL_SA_MIS_INFO0_0_REG);
|
||||||
p[483] = dsaf_read_dev(ddev, DSAF_TBL_PUL_0_REG);
|
p[487] = dsaf_read_dev(ddev, DSAF_TBL_PUL_0_REG);
|
||||||
p[484] = dsaf_read_dev(ddev, DSAF_TBL_OLD_RSLT_0_REG);
|
p[488] = dsaf_read_dev(ddev, DSAF_TBL_OLD_RSLT_0_REG);
|
||||||
p[485] = dsaf_read_dev(ddev, DSAF_TBL_OLD_SCAN_VAL_0_REG);
|
p[489] = dsaf_read_dev(ddev, DSAF_TBL_OLD_SCAN_VAL_0_REG);
|
||||||
p[486] = dsaf_read_dev(ddev, DSAF_TBL_DFX_CTRL_0_REG);
|
p[490] = dsaf_read_dev(ddev, DSAF_TBL_DFX_CTRL_0_REG);
|
||||||
p[487] = dsaf_read_dev(ddev, DSAF_TBL_DFX_STAT_0_REG);
|
p[491] = dsaf_read_dev(ddev, DSAF_TBL_DFX_STAT_0_REG);
|
||||||
p[488] = dsaf_read_dev(ddev, DSAF_TBL_DFX_STAT_2_0_REG);
|
p[492] = dsaf_read_dev(ddev, DSAF_TBL_DFX_STAT_2_0_REG);
|
||||||
p[489] = dsaf_read_dev(ddev, DSAF_TBL_LKUP_NUM_I_0_REG);
|
p[493] = dsaf_read_dev(ddev, DSAF_TBL_LKUP_NUM_I_0_REG);
|
||||||
p[490] = dsaf_read_dev(ddev, DSAF_TBL_LKUP_NUM_O_0_REG);
|
p[494] = dsaf_read_dev(ddev, DSAF_TBL_LKUP_NUM_O_0_REG);
|
||||||
p[491] = dsaf_read_dev(ddev, DSAF_TBL_UCAST_BCAST_MIS_INFO_0_0_REG);
|
p[495] = dsaf_read_dev(ddev, DSAF_TBL_UCAST_BCAST_MIS_INFO_0_0_REG);
|
||||||
|
|
||||||
/* dsaf other registers */
|
/* dsaf other registers */
|
||||||
p[492] = dsaf_read_dev(ddev, DSAF_INODE_FIFO_WL_0_REG + port * 0x4);
|
p[496] = dsaf_read_dev(ddev, DSAF_INODE_FIFO_WL_0_REG + port * 0x4);
|
||||||
p[493] = dsaf_read_dev(ddev, DSAF_ONODE_FIFO_WL_0_REG + port * 0x4);
|
p[497] = dsaf_read_dev(ddev, DSAF_ONODE_FIFO_WL_0_REG + port * 0x4);
|
||||||
p[494] = dsaf_read_dev(ddev, DSAF_XGE_GE_WORK_MODE_0_REG + port * 0x4);
|
p[498] = dsaf_read_dev(ddev, DSAF_XGE_GE_WORK_MODE_0_REG + port * 0x4);
|
||||||
p[495] = dsaf_read_dev(ddev,
|
p[499] = dsaf_read_dev(ddev,
|
||||||
DSAF_XGE_APP_RX_LINK_UP_0_REG + port * 0x4);
|
DSAF_XGE_APP_RX_LINK_UP_0_REG + port * 0x4);
|
||||||
p[496] = dsaf_read_dev(ddev, DSAF_NETPORT_CTRL_SIG_0_REG + port * 0x4);
|
p[500] = dsaf_read_dev(ddev, DSAF_NETPORT_CTRL_SIG_0_REG + port * 0x4);
|
||||||
p[497] = dsaf_read_dev(ddev, DSAF_XGE_CTRL_SIG_CFG_0_REG + port * 0x4);
|
p[501] = dsaf_read_dev(ddev, DSAF_XGE_CTRL_SIG_CFG_0_REG + port * 0x4);
|
||||||
|
|
||||||
if (!is_ver1)
|
if (!is_ver1)
|
||||||
p[498] = dsaf_read_dev(ddev, DSAF_PAUSE_CFG_REG + port * 0x4);
|
p[502] = dsaf_read_dev(ddev, DSAF_PAUSE_CFG_REG + port * 0x4);
|
||||||
|
|
||||||
/* mark end of dsaf regs */
|
/* mark end of dsaf regs */
|
||||||
for (i = 499; i < 504; i++)
|
for (i = 503; i < 504; i++)
|
||||||
p[i] = 0xdddddddd;
|
p[i] = 0xdddddddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2673,58 +2750,156 @@ int hns_dsaf_get_regs_count(void)
|
||||||
return DSAF_DUMP_REGS_NUM;
|
return DSAF_DUMP_REGS_NUM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void set_promisc_tcam_enable(struct dsaf_device *dsaf_dev, u32 port)
|
||||||
|
{
|
||||||
|
struct dsaf_tbl_tcam_ucast_cfg tbl_tcam_ucast = {0, 1, 0, 0, 0x80};
|
||||||
|
struct dsaf_tbl_tcam_data tbl_tcam_data_mc = {0x01000000, port};
|
||||||
|
struct dsaf_tbl_tcam_data tbl_tcam_mask_uc = {0x01000000, 0xf};
|
||||||
|
struct dsaf_tbl_tcam_mcast_cfg tbl_tcam_mcast = {0, 0, {0} };
|
||||||
|
struct dsaf_drv_priv *priv = hns_dsaf_dev_priv(dsaf_dev);
|
||||||
|
struct dsaf_tbl_tcam_data tbl_tcam_data_uc = {0, port};
|
||||||
|
struct dsaf_drv_mac_single_dest_entry mask_entry;
|
||||||
|
struct dsaf_drv_tbl_tcam_key temp_key, mask_key;
|
||||||
|
struct dsaf_drv_soft_mac_tbl *soft_mac_entry;
|
||||||
|
u16 entry_index = DSAF_INVALID_ENTRY_IDX;
|
||||||
|
struct dsaf_drv_tbl_tcam_key mac_key;
|
||||||
|
struct hns_mac_cb *mac_cb;
|
||||||
|
u8 addr[ETH_ALEN] = {0};
|
||||||
|
u8 port_num;
|
||||||
|
u16 mskid;
|
||||||
|
|
||||||
|
/* promisc use vague table match with vlanid = 0 & macaddr = 0 */
|
||||||
|
hns_dsaf_set_mac_key(dsaf_dev, &mac_key, 0x00, port, addr);
|
||||||
|
entry_index = hns_dsaf_find_soft_mac_entry(dsaf_dev, &mac_key);
|
||||||
|
if (entry_index != DSAF_INVALID_ENTRY_IDX)
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* put promisc tcam entry in the end. */
|
||||||
|
/* 1. set promisc unicast vague tcam entry. */
|
||||||
|
entry_index = hns_dsaf_find_empty_mac_entry_reverse(dsaf_dev);
|
||||||
|
if (entry_index == DSAF_INVALID_ENTRY_IDX) {
|
||||||
|
dev_err(dsaf_dev->dev,
|
||||||
|
"enable uc promisc failed (port:%#x)\n",
|
||||||
|
port);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
mac_cb = dsaf_dev->mac_cb[port];
|
||||||
|
(void)hns_mac_get_inner_port_num(mac_cb, 0, &port_num);
|
||||||
|
tbl_tcam_ucast.tbl_ucast_out_port = port_num;
|
||||||
|
|
||||||
|
/* config uc vague table */
|
||||||
|
hns_dsaf_tcam_uc_cfg_vague(dsaf_dev, entry_index, &tbl_tcam_data_uc,
|
||||||
|
&tbl_tcam_mask_uc, &tbl_tcam_ucast);
|
||||||
|
|
||||||
|
/* update software entry */
|
||||||
|
soft_mac_entry = priv->soft_mac_tbl;
|
||||||
|
soft_mac_entry += entry_index;
|
||||||
|
soft_mac_entry->index = entry_index;
|
||||||
|
soft_mac_entry->tcam_key.high.val = mac_key.high.val;
|
||||||
|
soft_mac_entry->tcam_key.low.val = mac_key.low.val;
|
||||||
|
/* step back to the START for mc. */
|
||||||
|
soft_mac_entry = priv->soft_mac_tbl;
|
||||||
|
|
||||||
|
/* 2. set promisc multicast vague tcam entry. */
|
||||||
|
entry_index = hns_dsaf_find_empty_mac_entry_reverse(dsaf_dev);
|
||||||
|
if (entry_index == DSAF_INVALID_ENTRY_IDX) {
|
||||||
|
dev_err(dsaf_dev->dev,
|
||||||
|
"enable mc promisc failed (port:%#x)\n",
|
||||||
|
port);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
memset(&mask_entry, 0x0, sizeof(mask_entry));
|
||||||
|
memset(&mask_key, 0x0, sizeof(mask_key));
|
||||||
|
memset(&temp_key, 0x0, sizeof(temp_key));
|
||||||
|
mask_entry.addr[0] = 0x01;
|
||||||
|
hns_dsaf_set_mac_key(dsaf_dev, &mask_key, mask_entry.in_vlan_id,
|
||||||
|
port, mask_entry.addr);
|
||||||
|
tbl_tcam_mcast.tbl_mcast_item_vld = 1;
|
||||||
|
tbl_tcam_mcast.tbl_mcast_old_en = 0;
|
||||||
|
|
||||||
|
if (port < DSAF_SERVICE_NW_NUM) {
|
||||||
|
mskid = port;
|
||||||
|
} else if (port >= DSAF_BASE_INNER_PORT_NUM) {
|
||||||
|
mskid = port - DSAF_BASE_INNER_PORT_NUM + DSAF_SERVICE_NW_NUM;
|
||||||
|
} else {
|
||||||
|
dev_err(dsaf_dev->dev, "%s,pnum(%d)error,key(%#x:%#x)\n",
|
||||||
|
dsaf_dev->ae_dev.name, port,
|
||||||
|
mask_key.high.val, mask_key.low.val);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
dsaf_set_bit(tbl_tcam_mcast.tbl_mcast_port_msk[mskid / 32],
|
||||||
|
mskid % 32, 1);
|
||||||
|
memcpy(&temp_key, &mask_key, sizeof(mask_key));
|
||||||
|
hns_dsaf_tcam_mc_cfg_vague(dsaf_dev, entry_index, &tbl_tcam_data_mc,
|
||||||
|
(struct dsaf_tbl_tcam_data *)(&mask_key),
|
||||||
|
&tbl_tcam_mcast);
|
||||||
|
|
||||||
|
/* update software entry */
|
||||||
|
soft_mac_entry += entry_index;
|
||||||
|
soft_mac_entry->index = entry_index;
|
||||||
|
soft_mac_entry->tcam_key.high.val = temp_key.high.val;
|
||||||
|
soft_mac_entry->tcam_key.low.val = temp_key.low.val;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void set_promisc_tcam_disable(struct dsaf_device *dsaf_dev, u32 port)
|
||||||
|
{
|
||||||
|
struct dsaf_tbl_tcam_data tbl_tcam_data_mc = {0x01000000, port};
|
||||||
|
struct dsaf_tbl_tcam_ucast_cfg tbl_tcam_ucast = {0, 0, 0, 0, 0};
|
||||||
|
struct dsaf_tbl_tcam_mcast_cfg tbl_tcam_mcast = {0, 0, {0} };
|
||||||
|
struct dsaf_drv_priv *priv = hns_dsaf_dev_priv(dsaf_dev);
|
||||||
|
struct dsaf_tbl_tcam_data tbl_tcam_data_uc = {0, 0};
|
||||||
|
struct dsaf_tbl_tcam_data tbl_tcam_mask = {0, 0};
|
||||||
|
struct dsaf_drv_soft_mac_tbl *soft_mac_entry;
|
||||||
|
u16 entry_index = DSAF_INVALID_ENTRY_IDX;
|
||||||
|
struct dsaf_drv_tbl_tcam_key mac_key;
|
||||||
|
u8 addr[ETH_ALEN] = {0};
|
||||||
|
|
||||||
|
/* 1. delete uc vague tcam entry. */
|
||||||
|
/* promisc use vague table match with vlanid = 0 & macaddr = 0 */
|
||||||
|
hns_dsaf_set_mac_key(dsaf_dev, &mac_key, 0x00, port, addr);
|
||||||
|
entry_index = hns_dsaf_find_soft_mac_entry(dsaf_dev, &mac_key);
|
||||||
|
|
||||||
|
if (entry_index == DSAF_INVALID_ENTRY_IDX)
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* config uc vague table */
|
||||||
|
hns_dsaf_tcam_uc_cfg_vague(dsaf_dev, entry_index, &tbl_tcam_data_uc,
|
||||||
|
&tbl_tcam_mask, &tbl_tcam_ucast);
|
||||||
|
/* update soft management table. */
|
||||||
|
soft_mac_entry = priv->soft_mac_tbl;
|
||||||
|
soft_mac_entry += entry_index;
|
||||||
|
soft_mac_entry->index = DSAF_INVALID_ENTRY_IDX;
|
||||||
|
/* step back to the START for mc. */
|
||||||
|
soft_mac_entry = priv->soft_mac_tbl;
|
||||||
|
|
||||||
|
/* 2. delete mc vague tcam entry. */
|
||||||
|
addr[0] = 0x01;
|
||||||
|
memset(&mac_key, 0x0, sizeof(mac_key));
|
||||||
|
hns_dsaf_set_mac_key(dsaf_dev, &mac_key, 0x00, port, addr);
|
||||||
|
entry_index = hns_dsaf_find_soft_mac_entry(dsaf_dev, &mac_key);
|
||||||
|
|
||||||
|
if (entry_index == DSAF_INVALID_ENTRY_IDX)
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* config mc vague table */
|
||||||
|
hns_dsaf_tcam_mc_cfg_vague(dsaf_dev, entry_index, &tbl_tcam_data_mc,
|
||||||
|
&tbl_tcam_mask, &tbl_tcam_mcast);
|
||||||
|
/* update soft management table. */
|
||||||
|
soft_mac_entry += entry_index;
|
||||||
|
soft_mac_entry->index = DSAF_INVALID_ENTRY_IDX;
|
||||||
|
}
|
||||||
|
|
||||||
/* Reserve the last TCAM entry for promisc support */
|
/* Reserve the last TCAM entry for promisc support */
|
||||||
#define dsaf_promisc_tcam_entry(port) \
|
|
||||||
(DSAF_TCAM_SUM - DSAFV2_MAC_FUZZY_TCAM_NUM + (port))
|
|
||||||
void hns_dsaf_set_promisc_tcam(struct dsaf_device *dsaf_dev,
|
void hns_dsaf_set_promisc_tcam(struct dsaf_device *dsaf_dev,
|
||||||
u32 port, bool enable)
|
u32 port, bool enable)
|
||||||
{
|
{
|
||||||
struct dsaf_drv_priv *priv = hns_dsaf_dev_priv(dsaf_dev);
|
if (enable)
|
||||||
struct dsaf_drv_soft_mac_tbl *soft_mac_entry = priv->soft_mac_tbl;
|
set_promisc_tcam_enable(dsaf_dev, port);
|
||||||
u16 entry_index;
|
else
|
||||||
struct dsaf_drv_tbl_tcam_key tbl_tcam_data, tbl_tcam_mask;
|
set_promisc_tcam_disable(dsaf_dev, port);
|
||||||
struct dsaf_tbl_tcam_mcast_cfg mac_data = {0};
|
|
||||||
|
|
||||||
if ((AE_IS_VER1(dsaf_dev->dsaf_ver)) || HNS_DSAF_IS_DEBUG(dsaf_dev))
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* find the tcam entry index for promisc */
|
|
||||||
entry_index = dsaf_promisc_tcam_entry(port);
|
|
||||||
|
|
||||||
memset(&tbl_tcam_data, 0, sizeof(tbl_tcam_data));
|
|
||||||
memset(&tbl_tcam_mask, 0, sizeof(tbl_tcam_mask));
|
|
||||||
|
|
||||||
/* config key mask */
|
|
||||||
if (enable) {
|
|
||||||
dsaf_set_field(tbl_tcam_data.low.bits.port_vlan,
|
|
||||||
DSAF_TBL_TCAM_KEY_PORT_M,
|
|
||||||
DSAF_TBL_TCAM_KEY_PORT_S, port);
|
|
||||||
dsaf_set_field(tbl_tcam_mask.low.bits.port_vlan,
|
|
||||||
DSAF_TBL_TCAM_KEY_PORT_M,
|
|
||||||
DSAF_TBL_TCAM_KEY_PORT_S, 0xf);
|
|
||||||
|
|
||||||
/* SUB_QID */
|
|
||||||
dsaf_set_bit(mac_data.tbl_mcast_port_msk[0],
|
|
||||||
DSAF_SERVICE_NW_NUM, true);
|
|
||||||
mac_data.tbl_mcast_item_vld = true; /* item_vld bit */
|
|
||||||
} else {
|
|
||||||
mac_data.tbl_mcast_item_vld = false; /* item_vld bit */
|
|
||||||
}
|
|
||||||
|
|
||||||
dev_dbg(dsaf_dev->dev,
|
|
||||||
"set_promisc_entry, %s Mac key(%#x:%#x) entry_index%d\n",
|
|
||||||
dsaf_dev->ae_dev.name, tbl_tcam_data.high.val,
|
|
||||||
tbl_tcam_data.low.val, entry_index);
|
|
||||||
|
|
||||||
/* config promisc entry with mask */
|
|
||||||
hns_dsaf_tcam_mc_cfg(dsaf_dev, entry_index,
|
|
||||||
(struct dsaf_tbl_tcam_data *)&tbl_tcam_data,
|
|
||||||
(struct dsaf_tbl_tcam_data *)&tbl_tcam_mask,
|
|
||||||
&mac_data);
|
|
||||||
|
|
||||||
/* config software entry */
|
|
||||||
soft_mac_entry += entry_index;
|
|
||||||
soft_mac_entry->index = enable ? entry_index : DSAF_INVALID_ENTRY_IDX;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int hns_dsaf_wait_pkt_clean(struct dsaf_device *dsaf_dev, int port)
|
int hns_dsaf_wait_pkt_clean(struct dsaf_device *dsaf_dev, int port)
|
||||||
|
|
|
@ -176,7 +176,7 @@
|
||||||
#define DSAF_INODE_IN_DATA_STP_DISC_0_REG 0x1A50
|
#define DSAF_INODE_IN_DATA_STP_DISC_0_REG 0x1A50
|
||||||
#define DSAF_INODE_GE_FC_EN_0_REG 0x1B00
|
#define DSAF_INODE_GE_FC_EN_0_REG 0x1B00
|
||||||
#define DSAF_INODE_VC0_IN_PKT_NUM_0_REG 0x1B50
|
#define DSAF_INODE_VC0_IN_PKT_NUM_0_REG 0x1B50
|
||||||
#define DSAF_INODE_VC1_IN_PKT_NUM_0_REG 0x1C00
|
#define DSAF_INODE_VC1_IN_PKT_NUM_0_REG 0x103C
|
||||||
#define DSAF_INODE_IN_PRIO_PAUSE_BASE_REG 0x1C00
|
#define DSAF_INODE_IN_PRIO_PAUSE_BASE_REG 0x1C00
|
||||||
#define DSAF_INODE_IN_PRIO_PAUSE_BASE_OFFSET 0x100
|
#define DSAF_INODE_IN_PRIO_PAUSE_BASE_OFFSET 0x100
|
||||||
#define DSAF_INODE_IN_PRIO_PAUSE_OFFSET 0x50
|
#define DSAF_INODE_IN_PRIO_PAUSE_OFFSET 0x50
|
||||||
|
@ -404,11 +404,11 @@
|
||||||
#define RCB_ECC_ERR_ADDR4_REG 0x460
|
#define RCB_ECC_ERR_ADDR4_REG 0x460
|
||||||
#define RCB_ECC_ERR_ADDR5_REG 0x464
|
#define RCB_ECC_ERR_ADDR5_REG 0x464
|
||||||
|
|
||||||
#define RCB_COM_SF_CFG_INTMASK_RING 0x480
|
#define RCB_COM_SF_CFG_INTMASK_RING 0x470
|
||||||
#define RCB_COM_SF_CFG_RING_STS 0x484
|
#define RCB_COM_SF_CFG_RING_STS 0x474
|
||||||
#define RCB_COM_SF_CFG_RING 0x488
|
#define RCB_COM_SF_CFG_RING 0x478
|
||||||
#define RCB_COM_SF_CFG_INTMASK_BD 0x48C
|
#define RCB_COM_SF_CFG_INTMASK_BD 0x47C
|
||||||
#define RCB_COM_SF_CFG_BD_RINT_STS 0x470
|
#define RCB_COM_SF_CFG_BD_RINT_STS 0x480
|
||||||
#define RCB_COM_RCB_RD_BD_BUSY 0x490
|
#define RCB_COM_RCB_RD_BD_BUSY 0x490
|
||||||
#define RCB_COM_RCB_FBD_CRT_EN 0x494
|
#define RCB_COM_RCB_FBD_CRT_EN 0x494
|
||||||
#define RCB_COM_AXI_WR_ERR_INTMASK 0x498
|
#define RCB_COM_AXI_WR_ERR_INTMASK 0x498
|
||||||
|
@ -534,6 +534,7 @@
|
||||||
#define GMAC_LD_LINK_COUNTER_REG 0x01D0UL
|
#define GMAC_LD_LINK_COUNTER_REG 0x01D0UL
|
||||||
#define GMAC_LOOP_REG 0x01DCUL
|
#define GMAC_LOOP_REG 0x01DCUL
|
||||||
#define GMAC_RECV_CONTROL_REG 0x01E0UL
|
#define GMAC_RECV_CONTROL_REG 0x01E0UL
|
||||||
|
#define GMAC_PCS_RX_EN_REG 0x01E4UL
|
||||||
#define GMAC_VLAN_CODE_REG 0x01E8UL
|
#define GMAC_VLAN_CODE_REG 0x01E8UL
|
||||||
#define GMAC_RX_OVERRUN_CNT_REG 0x01ECUL
|
#define GMAC_RX_OVERRUN_CNT_REG 0x01ECUL
|
||||||
#define GMAC_RX_LENGTHFIELD_ERR_CNT_REG 0x01F4UL
|
#define GMAC_RX_LENGTHFIELD_ERR_CNT_REG 0x01F4UL
|
||||||
|
|
|
@ -1186,6 +1186,9 @@ int hns_nic_init_phy(struct net_device *ndev, struct hnae_handle *h)
|
||||||
if (h->phy_if == PHY_INTERFACE_MODE_XGMII)
|
if (h->phy_if == PHY_INTERFACE_MODE_XGMII)
|
||||||
phy_dev->autoneg = false;
|
phy_dev->autoneg = false;
|
||||||
|
|
||||||
|
if (h->phy_if == PHY_INTERFACE_MODE_SGMII)
|
||||||
|
phy_stop(phy_dev);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1281,6 +1284,22 @@ static int hns_nic_init_affinity_mask(int q_num, int ring_idx,
|
||||||
return cpu;
|
return cpu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void hns_nic_free_irq(int q_num, struct hns_nic_priv *priv)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < q_num * 2; i++) {
|
||||||
|
if (priv->ring_data[i].ring->irq_init_flag == RCB_IRQ_INITED) {
|
||||||
|
irq_set_affinity_hint(priv->ring_data[i].ring->irq,
|
||||||
|
NULL);
|
||||||
|
free_irq(priv->ring_data[i].ring->irq,
|
||||||
|
&priv->ring_data[i]);
|
||||||
|
priv->ring_data[i].ring->irq_init_flag =
|
||||||
|
RCB_IRQ_NOT_INITED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static int hns_nic_init_irq(struct hns_nic_priv *priv)
|
static int hns_nic_init_irq(struct hns_nic_priv *priv)
|
||||||
{
|
{
|
||||||
struct hnae_handle *h = priv->ae_handle;
|
struct hnae_handle *h = priv->ae_handle;
|
||||||
|
@ -1306,7 +1325,7 @@ static int hns_nic_init_irq(struct hns_nic_priv *priv)
|
||||||
if (ret) {
|
if (ret) {
|
||||||
netdev_err(priv->netdev, "request irq(%d) fail\n",
|
netdev_err(priv->netdev, "request irq(%d) fail\n",
|
||||||
rd->ring->irq);
|
rd->ring->irq);
|
||||||
return ret;
|
goto out_free_irq;
|
||||||
}
|
}
|
||||||
disable_irq(rd->ring->irq);
|
disable_irq(rd->ring->irq);
|
||||||
|
|
||||||
|
@ -1321,6 +1340,10 @@ static int hns_nic_init_irq(struct hns_nic_priv *priv)
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
out_free_irq:
|
||||||
|
hns_nic_free_irq(h->q_num, priv);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int hns_nic_net_up(struct net_device *ndev)
|
static int hns_nic_net_up(struct net_device *ndev)
|
||||||
|
@ -1330,6 +1353,9 @@ static int hns_nic_net_up(struct net_device *ndev)
|
||||||
int i, j;
|
int i, j;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
if (!test_bit(NIC_STATE_DOWN, &priv->state))
|
||||||
|
return 0;
|
||||||
|
|
||||||
ret = hns_nic_init_irq(priv);
|
ret = hns_nic_init_irq(priv);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
netdev_err(ndev, "hns init irq failed! ret=%d\n", ret);
|
netdev_err(ndev, "hns init irq failed! ret=%d\n", ret);
|
||||||
|
@ -1365,6 +1391,7 @@ static int hns_nic_net_up(struct net_device *ndev)
|
||||||
for (j = i - 1; j >= 0; j--)
|
for (j = i - 1; j >= 0; j--)
|
||||||
hns_nic_ring_close(ndev, j);
|
hns_nic_ring_close(ndev, j);
|
||||||
|
|
||||||
|
hns_nic_free_irq(h->q_num, priv);
|
||||||
set_bit(NIC_STATE_DOWN, &priv->state);
|
set_bit(NIC_STATE_DOWN, &priv->state);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -1482,11 +1509,19 @@ static int hns_nic_net_stop(struct net_device *ndev)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void hns_tx_timeout_reset(struct hns_nic_priv *priv);
|
static void hns_tx_timeout_reset(struct hns_nic_priv *priv);
|
||||||
|
#define HNS_TX_TIMEO_LIMIT (40 * HZ)
|
||||||
static void hns_nic_net_timeout(struct net_device *ndev)
|
static void hns_nic_net_timeout(struct net_device *ndev)
|
||||||
{
|
{
|
||||||
struct hns_nic_priv *priv = netdev_priv(ndev);
|
struct hns_nic_priv *priv = netdev_priv(ndev);
|
||||||
|
|
||||||
hns_tx_timeout_reset(priv);
|
if (ndev->watchdog_timeo < HNS_TX_TIMEO_LIMIT) {
|
||||||
|
ndev->watchdog_timeo *= 2;
|
||||||
|
netdev_info(ndev, "watchdog_timo changed to %d.\n",
|
||||||
|
ndev->watchdog_timeo);
|
||||||
|
} else {
|
||||||
|
ndev->watchdog_timeo = HNS_NIC_TX_TIMEOUT;
|
||||||
|
hns_tx_timeout_reset(priv);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int hns_nic_do_ioctl(struct net_device *netdev, struct ifreq *ifr,
|
static int hns_nic_do_ioctl(struct net_device *netdev, struct ifreq *ifr,
|
||||||
|
@ -2049,11 +2084,11 @@ static void hns_nic_service_task(struct work_struct *work)
|
||||||
= container_of(work, struct hns_nic_priv, service_task);
|
= container_of(work, struct hns_nic_priv, service_task);
|
||||||
struct hnae_handle *h = priv->ae_handle;
|
struct hnae_handle *h = priv->ae_handle;
|
||||||
|
|
||||||
|
hns_nic_reset_subtask(priv);
|
||||||
hns_nic_update_link_status(priv->netdev);
|
hns_nic_update_link_status(priv->netdev);
|
||||||
h->dev->ops->update_led_status(h);
|
h->dev->ops->update_led_status(h);
|
||||||
hns_nic_update_stats(priv->netdev);
|
hns_nic_update_stats(priv->netdev);
|
||||||
|
|
||||||
hns_nic_reset_subtask(priv);
|
|
||||||
hns_nic_service_event_complete(priv);
|
hns_nic_service_event_complete(priv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2339,7 +2374,7 @@ static int hns_nic_dev_probe(struct platform_device *pdev)
|
||||||
ndev->min_mtu = MAC_MIN_MTU;
|
ndev->min_mtu = MAC_MIN_MTU;
|
||||||
switch (priv->enet_ver) {
|
switch (priv->enet_ver) {
|
||||||
case AE_VERSION_2:
|
case AE_VERSION_2:
|
||||||
ndev->features |= NETIF_F_TSO | NETIF_F_TSO6;
|
ndev->features |= NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_NTUPLE;
|
||||||
ndev->hw_features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
|
ndev->hw_features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
|
||||||
NETIF_F_RXCSUM | NETIF_F_SG | NETIF_F_GSO |
|
NETIF_F_RXCSUM | NETIF_F_SG | NETIF_F_GSO |
|
||||||
NETIF_F_GRO | NETIF_F_TSO | NETIF_F_TSO6;
|
NETIF_F_GRO | NETIF_F_TSO | NETIF_F_TSO6;
|
||||||
|
|
|
@ -1939,8 +1939,9 @@ static int do_hard_reset(struct ibmvnic_adapter *adapter,
|
||||||
static struct ibmvnic_rwi *get_next_rwi(struct ibmvnic_adapter *adapter)
|
static struct ibmvnic_rwi *get_next_rwi(struct ibmvnic_adapter *adapter)
|
||||||
{
|
{
|
||||||
struct ibmvnic_rwi *rwi;
|
struct ibmvnic_rwi *rwi;
|
||||||
|
unsigned long flags;
|
||||||
|
|
||||||
mutex_lock(&adapter->rwi_lock);
|
spin_lock_irqsave(&adapter->rwi_lock, flags);
|
||||||
|
|
||||||
if (!list_empty(&adapter->rwi_list)) {
|
if (!list_empty(&adapter->rwi_list)) {
|
||||||
rwi = list_first_entry(&adapter->rwi_list, struct ibmvnic_rwi,
|
rwi = list_first_entry(&adapter->rwi_list, struct ibmvnic_rwi,
|
||||||
|
@ -1950,7 +1951,7 @@ static struct ibmvnic_rwi *get_next_rwi(struct ibmvnic_adapter *adapter)
|
||||||
rwi = NULL;
|
rwi = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
mutex_unlock(&adapter->rwi_lock);
|
spin_unlock_irqrestore(&adapter->rwi_lock, flags);
|
||||||
return rwi;
|
return rwi;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2025,6 +2026,7 @@ static int ibmvnic_reset(struct ibmvnic_adapter *adapter,
|
||||||
struct list_head *entry, *tmp_entry;
|
struct list_head *entry, *tmp_entry;
|
||||||
struct ibmvnic_rwi *rwi, *tmp;
|
struct ibmvnic_rwi *rwi, *tmp;
|
||||||
struct net_device *netdev = adapter->netdev;
|
struct net_device *netdev = adapter->netdev;
|
||||||
|
unsigned long flags;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (adapter->state == VNIC_REMOVING ||
|
if (adapter->state == VNIC_REMOVING ||
|
||||||
|
@ -2041,21 +2043,21 @@ static int ibmvnic_reset(struct ibmvnic_adapter *adapter,
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
mutex_lock(&adapter->rwi_lock);
|
spin_lock_irqsave(&adapter->rwi_lock, flags);
|
||||||
|
|
||||||
list_for_each(entry, &adapter->rwi_list) {
|
list_for_each(entry, &adapter->rwi_list) {
|
||||||
tmp = list_entry(entry, struct ibmvnic_rwi, list);
|
tmp = list_entry(entry, struct ibmvnic_rwi, list);
|
||||||
if (tmp->reset_reason == reason) {
|
if (tmp->reset_reason == reason) {
|
||||||
netdev_dbg(netdev, "Skipping matching reset\n");
|
netdev_dbg(netdev, "Skipping matching reset\n");
|
||||||
mutex_unlock(&adapter->rwi_lock);
|
spin_unlock_irqrestore(&adapter->rwi_lock, flags);
|
||||||
ret = EBUSY;
|
ret = EBUSY;
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rwi = kzalloc(sizeof(*rwi), GFP_KERNEL);
|
rwi = kzalloc(sizeof(*rwi), GFP_ATOMIC);
|
||||||
if (!rwi) {
|
if (!rwi) {
|
||||||
mutex_unlock(&adapter->rwi_lock);
|
spin_unlock_irqrestore(&adapter->rwi_lock, flags);
|
||||||
ibmvnic_close(netdev);
|
ibmvnic_close(netdev);
|
||||||
ret = ENOMEM;
|
ret = ENOMEM;
|
||||||
goto err;
|
goto err;
|
||||||
|
@ -2069,7 +2071,7 @@ static int ibmvnic_reset(struct ibmvnic_adapter *adapter,
|
||||||
}
|
}
|
||||||
rwi->reset_reason = reason;
|
rwi->reset_reason = reason;
|
||||||
list_add_tail(&rwi->list, &adapter->rwi_list);
|
list_add_tail(&rwi->list, &adapter->rwi_list);
|
||||||
mutex_unlock(&adapter->rwi_lock);
|
spin_unlock_irqrestore(&adapter->rwi_lock, flags);
|
||||||
adapter->resetting = true;
|
adapter->resetting = true;
|
||||||
netdev_dbg(adapter->netdev, "Scheduling reset (reason %d)\n", reason);
|
netdev_dbg(adapter->netdev, "Scheduling reset (reason %d)\n", reason);
|
||||||
schedule_work(&adapter->ibmvnic_reset);
|
schedule_work(&adapter->ibmvnic_reset);
|
||||||
|
@ -4700,7 +4702,7 @@ static int ibmvnic_probe(struct vio_dev *dev, const struct vio_device_id *id)
|
||||||
|
|
||||||
INIT_WORK(&adapter->ibmvnic_reset, __ibmvnic_reset);
|
INIT_WORK(&adapter->ibmvnic_reset, __ibmvnic_reset);
|
||||||
INIT_LIST_HEAD(&adapter->rwi_list);
|
INIT_LIST_HEAD(&adapter->rwi_list);
|
||||||
mutex_init(&adapter->rwi_lock);
|
spin_lock_init(&adapter->rwi_lock);
|
||||||
adapter->resetting = false;
|
adapter->resetting = false;
|
||||||
|
|
||||||
adapter->mac_change_pending = false;
|
adapter->mac_change_pending = false;
|
||||||
|
|
|
@ -1068,7 +1068,7 @@ struct ibmvnic_adapter {
|
||||||
struct tasklet_struct tasklet;
|
struct tasklet_struct tasklet;
|
||||||
enum vnic_state state;
|
enum vnic_state state;
|
||||||
enum ibmvnic_reset_reason reset_reason;
|
enum ibmvnic_reset_reason reset_reason;
|
||||||
struct mutex rwi_lock;
|
spinlock_t rwi_lock;
|
||||||
struct list_head rwi_list;
|
struct list_head rwi_list;
|
||||||
struct work_struct ibmvnic_reset;
|
struct work_struct ibmvnic_reset;
|
||||||
bool resetting;
|
bool resetting;
|
||||||
|
|
|
@ -1539,17 +1539,17 @@ static int i40e_set_mac(struct net_device *netdev, void *p)
|
||||||
netdev_info(netdev, "set new mac address %pM\n", addr->sa_data);
|
netdev_info(netdev, "set new mac address %pM\n", addr->sa_data);
|
||||||
|
|
||||||
/* Copy the address first, so that we avoid a possible race with
|
/* Copy the address first, so that we avoid a possible race with
|
||||||
* .set_rx_mode(). If we copy after changing the address in the filter
|
* .set_rx_mode().
|
||||||
* list, we might open ourselves to a narrow race window where
|
* - Remove old address from MAC filter
|
||||||
* .set_rx_mode could delete our dev_addr filter and prevent traffic
|
* - Copy new address
|
||||||
* from passing.
|
* - Add new address to MAC filter
|
||||||
*/
|
*/
|
||||||
ether_addr_copy(netdev->dev_addr, addr->sa_data);
|
|
||||||
|
|
||||||
spin_lock_bh(&vsi->mac_filter_hash_lock);
|
spin_lock_bh(&vsi->mac_filter_hash_lock);
|
||||||
i40e_del_mac_filter(vsi, netdev->dev_addr);
|
i40e_del_mac_filter(vsi, netdev->dev_addr);
|
||||||
i40e_add_mac_filter(vsi, addr->sa_data);
|
ether_addr_copy(netdev->dev_addr, addr->sa_data);
|
||||||
|
i40e_add_mac_filter(vsi, netdev->dev_addr);
|
||||||
spin_unlock_bh(&vsi->mac_filter_hash_lock);
|
spin_unlock_bh(&vsi->mac_filter_hash_lock);
|
||||||
|
|
||||||
if (vsi->type == I40E_VSI_MAIN) {
|
if (vsi->type == I40E_VSI_MAIN) {
|
||||||
i40e_status ret;
|
i40e_status ret;
|
||||||
|
|
||||||
|
|
|
@ -699,7 +699,6 @@ static inline void ixgbe_vf_reset_event(struct ixgbe_adapter *adapter, u32 vf)
|
||||||
u8 num_tcs = adapter->hw_tcs;
|
u8 num_tcs = adapter->hw_tcs;
|
||||||
u32 reg_val;
|
u32 reg_val;
|
||||||
u32 queue;
|
u32 queue;
|
||||||
u32 word;
|
|
||||||
|
|
||||||
/* remove VLAN filters beloning to this VF */
|
/* remove VLAN filters beloning to this VF */
|
||||||
ixgbe_clear_vf_vlans(adapter, vf);
|
ixgbe_clear_vf_vlans(adapter, vf);
|
||||||
|
@ -754,6 +753,14 @@ static inline void ixgbe_vf_reset_event(struct ixgbe_adapter *adapter, u32 vf)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IXGBE_WRITE_FLUSH(hw);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void ixgbe_vf_clear_mbx(struct ixgbe_adapter *adapter, u32 vf)
|
||||||
|
{
|
||||||
|
struct ixgbe_hw *hw = &adapter->hw;
|
||||||
|
u32 word;
|
||||||
|
|
||||||
/* Clear VF's mailbox memory */
|
/* Clear VF's mailbox memory */
|
||||||
for (word = 0; word < IXGBE_VFMAILBOX_SIZE; word++)
|
for (word = 0; word < IXGBE_VFMAILBOX_SIZE; word++)
|
||||||
IXGBE_WRITE_REG_ARRAY(hw, IXGBE_PFMBMEM(vf), word, 0);
|
IXGBE_WRITE_REG_ARRAY(hw, IXGBE_PFMBMEM(vf), word, 0);
|
||||||
|
@ -827,6 +834,8 @@ static int ixgbe_vf_reset_msg(struct ixgbe_adapter *adapter, u32 vf)
|
||||||
/* reset the filters for the device */
|
/* reset the filters for the device */
|
||||||
ixgbe_vf_reset_event(adapter, vf);
|
ixgbe_vf_reset_event(adapter, vf);
|
||||||
|
|
||||||
|
ixgbe_vf_clear_mbx(adapter, vf);
|
||||||
|
|
||||||
/* set vf mac address */
|
/* set vf mac address */
|
||||||
if (!is_zero_ether_addr(vf_mac))
|
if (!is_zero_ether_addr(vf_mac))
|
||||||
ixgbe_set_vf_mac(adapter, vf, vf_mac);
|
ixgbe_set_vf_mac(adapter, vf, vf_mac);
|
||||||
|
|
|
@ -802,14 +802,8 @@ static int lan743x_mac_init(struct lan743x_adapter *adapter)
|
||||||
u32 mac_addr_hi = 0;
|
u32 mac_addr_hi = 0;
|
||||||
u32 mac_addr_lo = 0;
|
u32 mac_addr_lo = 0;
|
||||||
u32 data;
|
u32 data;
|
||||||
int ret;
|
|
||||||
|
|
||||||
netdev = adapter->netdev;
|
netdev = adapter->netdev;
|
||||||
lan743x_csr_write(adapter, MAC_CR, MAC_CR_RST_);
|
|
||||||
ret = lan743x_csr_wait_for_bit(adapter, MAC_CR, MAC_CR_RST_,
|
|
||||||
0, 1000, 20000, 100);
|
|
||||||
if (ret)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
/* setup auto duplex, and speed detection */
|
/* setup auto duplex, and speed detection */
|
||||||
data = lan743x_csr_read(adapter, MAC_CR);
|
data = lan743x_csr_read(adapter, MAC_CR);
|
||||||
|
@ -2722,8 +2716,9 @@ static int lan743x_mdiobus_init(struct lan743x_adapter *adapter)
|
||||||
snprintf(adapter->mdiobus->id, MII_BUS_ID_SIZE,
|
snprintf(adapter->mdiobus->id, MII_BUS_ID_SIZE,
|
||||||
"pci-%s", pci_name(adapter->pdev));
|
"pci-%s", pci_name(adapter->pdev));
|
||||||
|
|
||||||
/* set to internal PHY id */
|
if ((adapter->csr.id_rev & ID_REV_ID_MASK_) == ID_REV_ID_LAN7430_)
|
||||||
adapter->mdiobus->phy_mask = ~(u32)BIT(1);
|
/* LAN7430 uses internal phy at address 1 */
|
||||||
|
adapter->mdiobus->phy_mask = ~(u32)BIT(1);
|
||||||
|
|
||||||
/* register mdiobus */
|
/* register mdiobus */
|
||||||
ret = mdiobus_register(adapter->mdiobus);
|
ret = mdiobus_register(adapter->mdiobus);
|
||||||
|
|
|
@ -807,7 +807,7 @@ __vxge_hw_vpath_fw_ver_get(struct __vxge_hw_virtualpath *vpath,
|
||||||
struct vxge_hw_device_date *fw_date = &hw_info->fw_date;
|
struct vxge_hw_device_date *fw_date = &hw_info->fw_date;
|
||||||
struct vxge_hw_device_version *flash_version = &hw_info->flash_version;
|
struct vxge_hw_device_version *flash_version = &hw_info->flash_version;
|
||||||
struct vxge_hw_device_date *flash_date = &hw_info->flash_date;
|
struct vxge_hw_device_date *flash_date = &hw_info->flash_date;
|
||||||
u64 data0, data1 = 0, steer_ctrl = 0;
|
u64 data0 = 0, data1 = 0, steer_ctrl = 0;
|
||||||
enum vxge_hw_status status;
|
enum vxge_hw_status status;
|
||||||
|
|
||||||
status = vxge_hw_vpath_fw_api(vpath,
|
status = vxge_hw_vpath_fw_api(vpath,
|
||||||
|
|
|
@ -912,7 +912,7 @@ static const struct net_device_ops w90p910_ether_netdev_ops = {
|
||||||
.ndo_validate_addr = eth_validate_addr,
|
.ndo_validate_addr = eth_validate_addr,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void __init get_mac_address(struct net_device *dev)
|
static void get_mac_address(struct net_device *dev)
|
||||||
{
|
{
|
||||||
struct w90p910_ether *ether = netdev_priv(dev);
|
struct w90p910_ether *ether = netdev_priv(dev);
|
||||||
struct platform_device *pdev;
|
struct platform_device *pdev;
|
||||||
|
|
|
@ -1125,7 +1125,8 @@ netxen_validate_firmware(struct netxen_adapter *adapter)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
val = nx_get_bios_version(adapter);
|
val = nx_get_bios_version(adapter);
|
||||||
netxen_rom_fast_read(adapter, NX_BIOS_VERSION_OFFSET, (int *)&bios);
|
if (netxen_rom_fast_read(adapter, NX_BIOS_VERSION_OFFSET, (int *)&bios))
|
||||||
|
return -EIO;
|
||||||
if ((__force u32)val != bios) {
|
if ((__force u32)val != bios) {
|
||||||
dev_err(&pdev->dev, "%s: firmware bios is incompatible\n",
|
dev_err(&pdev->dev, "%s: firmware bios is incompatible\n",
|
||||||
fw_name[fw_type]);
|
fw_name[fw_type]);
|
||||||
|
|
|
@ -2485,6 +2485,7 @@ static int qed_ll2_start_xmit(struct qed_dev *cdev, struct sk_buff *skb,
|
||||||
if (unlikely(dma_mapping_error(&cdev->pdev->dev, mapping))) {
|
if (unlikely(dma_mapping_error(&cdev->pdev->dev, mapping))) {
|
||||||
DP_NOTICE(cdev,
|
DP_NOTICE(cdev,
|
||||||
"Unable to map frag - dropping packet\n");
|
"Unable to map frag - dropping packet\n");
|
||||||
|
rc = -ENOMEM;
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -721,7 +721,7 @@ static void ca8210_mlme_reset_worker(struct work_struct *work)
|
||||||
static void ca8210_rx_done(struct cas_control *cas_ctl)
|
static void ca8210_rx_done(struct cas_control *cas_ctl)
|
||||||
{
|
{
|
||||||
u8 *buf;
|
u8 *buf;
|
||||||
u8 len;
|
unsigned int len;
|
||||||
struct work_priv_container *mlme_reset_wpc;
|
struct work_priv_container *mlme_reset_wpc;
|
||||||
struct ca8210_priv *priv = cas_ctl->priv;
|
struct ca8210_priv *priv = cas_ctl->priv;
|
||||||
|
|
||||||
|
@ -730,7 +730,7 @@ static void ca8210_rx_done(struct cas_control *cas_ctl)
|
||||||
if (len > CA8210_SPI_BUF_SIZE) {
|
if (len > CA8210_SPI_BUF_SIZE) {
|
||||||
dev_crit(
|
dev_crit(
|
||||||
&priv->spi->dev,
|
&priv->spi->dev,
|
||||||
"Received packet len (%d) erroneously long\n",
|
"Received packet len (%u) erroneously long\n",
|
||||||
len
|
len
|
||||||
);
|
);
|
||||||
goto finish;
|
goto finish;
|
||||||
|
|
|
@ -500,7 +500,7 @@ static int hwsim_del_edge_nl(struct sk_buff *msg, struct genl_info *info)
|
||||||
!info->attrs[MAC802154_HWSIM_ATTR_RADIO_EDGE])
|
!info->attrs[MAC802154_HWSIM_ATTR_RADIO_EDGE])
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (nla_parse_nested(edge_attrs, MAC802154_HWSIM_EDGE_ATTR_MAX + 1,
|
if (nla_parse_nested(edge_attrs, MAC802154_HWSIM_EDGE_ATTR_MAX,
|
||||||
info->attrs[MAC802154_HWSIM_ATTR_RADIO_EDGE],
|
info->attrs[MAC802154_HWSIM_ATTR_RADIO_EDGE],
|
||||||
hwsim_edge_policy, NULL))
|
hwsim_edge_policy, NULL))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -550,7 +550,7 @@ static int hwsim_set_edge_lqi(struct sk_buff *msg, struct genl_info *info)
|
||||||
!info->attrs[MAC802154_HWSIM_ATTR_RADIO_EDGE])
|
!info->attrs[MAC802154_HWSIM_ATTR_RADIO_EDGE])
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (nla_parse_nested(edge_attrs, MAC802154_HWSIM_EDGE_ATTR_MAX + 1,
|
if (nla_parse_nested(edge_attrs, MAC802154_HWSIM_EDGE_ATTR_MAX,
|
||||||
info->attrs[MAC802154_HWSIM_ATTR_RADIO_EDGE],
|
info->attrs[MAC802154_HWSIM_ATTR_RADIO_EDGE],
|
||||||
hwsim_edge_policy, NULL))
|
hwsim_edge_policy, NULL))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
|
@ -2335,6 +2335,10 @@ static int lan78xx_set_mac_addr(struct net_device *netdev, void *p)
|
||||||
ret = lan78xx_write_reg(dev, RX_ADDRL, addr_lo);
|
ret = lan78xx_write_reg(dev, RX_ADDRL, addr_lo);
|
||||||
ret = lan78xx_write_reg(dev, RX_ADDRH, addr_hi);
|
ret = lan78xx_write_reg(dev, RX_ADDRH, addr_hi);
|
||||||
|
|
||||||
|
/* Added to support MAC address changes */
|
||||||
|
ret = lan78xx_write_reg(dev, MAF_LO(0), addr_lo);
|
||||||
|
ret = lan78xx_write_reg(dev, MAF_HI(0), addr_hi | MAF_HI_VALID_);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -151,17 +151,18 @@ static bool qmimux_has_slaves(struct usbnet *dev)
|
||||||
|
|
||||||
static int qmimux_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
|
static int qmimux_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
|
||||||
{
|
{
|
||||||
unsigned int len, offset = sizeof(struct qmimux_hdr);
|
unsigned int len, offset = 0;
|
||||||
struct qmimux_hdr *hdr;
|
struct qmimux_hdr *hdr;
|
||||||
struct net_device *net;
|
struct net_device *net;
|
||||||
struct sk_buff *skbn;
|
struct sk_buff *skbn;
|
||||||
|
u8 qmimux_hdr_sz = sizeof(*hdr);
|
||||||
|
|
||||||
while (offset < skb->len) {
|
while (offset + qmimux_hdr_sz < skb->len) {
|
||||||
hdr = (struct qmimux_hdr *)skb->data;
|
hdr = (struct qmimux_hdr *)(skb->data + offset);
|
||||||
len = be16_to_cpu(hdr->pkt_len);
|
len = be16_to_cpu(hdr->pkt_len);
|
||||||
|
|
||||||
/* drop the packet, bogus length */
|
/* drop the packet, bogus length */
|
||||||
if (offset + len > skb->len)
|
if (offset + len + qmimux_hdr_sz > skb->len)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* control packet, we do not know what to do */
|
/* control packet, we do not know what to do */
|
||||||
|
@ -176,7 +177,7 @@ static int qmimux_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
|
||||||
return 0;
|
return 0;
|
||||||
skbn->dev = net;
|
skbn->dev = net;
|
||||||
|
|
||||||
switch (skb->data[offset] & 0xf0) {
|
switch (skb->data[offset + qmimux_hdr_sz] & 0xf0) {
|
||||||
case 0x40:
|
case 0x40:
|
||||||
skbn->protocol = htons(ETH_P_IP);
|
skbn->protocol = htons(ETH_P_IP);
|
||||||
break;
|
break;
|
||||||
|
@ -188,12 +189,12 @@ static int qmimux_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
|
||||||
goto skip;
|
goto skip;
|
||||||
}
|
}
|
||||||
|
|
||||||
skb_put_data(skbn, skb->data + offset, len);
|
skb_put_data(skbn, skb->data + offset + qmimux_hdr_sz, len);
|
||||||
if (netif_rx(skbn) != NET_RX_SUCCESS)
|
if (netif_rx(skbn) != NET_RX_SUCCESS)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
skip:
|
skip:
|
||||||
offset += len + sizeof(struct qmimux_hdr);
|
offset += len + qmimux_hdr_sz;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -616,7 +616,7 @@ struct b43_c32 b43_cordic(int theta)
|
||||||
u8 i;
|
u8 i;
|
||||||
s32 tmp;
|
s32 tmp;
|
||||||
s8 signx = 1;
|
s8 signx = 1;
|
||||||
u32 angle = 0;
|
s32 angle = 0;
|
||||||
struct b43_c32 ret = { .i = 39797, .q = 0, };
|
struct b43_c32 ret = { .i = 39797, .q = 0, };
|
||||||
|
|
||||||
while (theta > (180 << 16))
|
while (theta > (180 << 16))
|
||||||
|
|
|
@ -681,6 +681,7 @@ int mt76x0_register_device(struct mt76x0_dev *dev)
|
||||||
ieee80211_hw_set(hw, SUPPORTS_HT_CCK_RATES);
|
ieee80211_hw_set(hw, SUPPORTS_HT_CCK_RATES);
|
||||||
ieee80211_hw_set(hw, AMPDU_AGGREGATION);
|
ieee80211_hw_set(hw, AMPDU_AGGREGATION);
|
||||||
ieee80211_hw_set(hw, SUPPORTS_RC_TABLE);
|
ieee80211_hw_set(hw, SUPPORTS_RC_TABLE);
|
||||||
|
ieee80211_hw_set(hw, MFP_CAPABLE);
|
||||||
hw->max_rates = 1;
|
hw->max_rates = 1;
|
||||||
hw->max_report_rates = 7;
|
hw->max_report_rates = 7;
|
||||||
hw->max_rate_tries = 1;
|
hw->max_rate_tries = 1;
|
||||||
|
|
|
@ -385,7 +385,12 @@ void mt76_stop_tx_queues(struct mt76_dev *dev, struct ieee80211_sta *sta,
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(sta->txq); i++) {
|
for (i = 0; i < ARRAY_SIZE(sta->txq); i++) {
|
||||||
struct ieee80211_txq *txq = sta->txq[i];
|
struct ieee80211_txq *txq = sta->txq[i];
|
||||||
struct mt76_txq *mtxq = (struct mt76_txq *) txq->drv_priv;
|
struct mt76_txq *mtxq;
|
||||||
|
|
||||||
|
if (!txq)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
mtxq = (struct mt76_txq *)txq->drv_priv;
|
||||||
|
|
||||||
spin_lock_bh(&mtxq->hwq->lock);
|
spin_lock_bh(&mtxq->hwq->lock);
|
||||||
mtxq->send_bar = mtxq->aggr && send_bar;
|
mtxq->send_bar = mtxq->aggr && send_bar;
|
||||||
|
|
|
@ -309,8 +309,11 @@ static void pmem_release_queue(void *q)
|
||||||
blk_cleanup_queue(q);
|
blk_cleanup_queue(q);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pmem_freeze_queue(void *q)
|
static void pmem_freeze_queue(struct percpu_ref *ref)
|
||||||
{
|
{
|
||||||
|
struct request_queue *q;
|
||||||
|
|
||||||
|
q = container_of(ref, typeof(*q), q_usage_counter);
|
||||||
blk_freeze_queue_start(q);
|
blk_freeze_queue_start(q);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -402,6 +405,7 @@ static int pmem_attach_disk(struct device *dev,
|
||||||
|
|
||||||
pmem->pfn_flags = PFN_DEV;
|
pmem->pfn_flags = PFN_DEV;
|
||||||
pmem->pgmap.ref = &q->q_usage_counter;
|
pmem->pgmap.ref = &q->q_usage_counter;
|
||||||
|
pmem->pgmap.kill = pmem_freeze_queue;
|
||||||
if (is_nd_pfn(dev)) {
|
if (is_nd_pfn(dev)) {
|
||||||
if (setup_pagemap_fsdax(dev, &pmem->pgmap))
|
if (setup_pagemap_fsdax(dev, &pmem->pgmap))
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
@ -427,13 +431,6 @@ static int pmem_attach_disk(struct device *dev,
|
||||||
memcpy(&bb_res, &nsio->res, sizeof(bb_res));
|
memcpy(&bb_res, &nsio->res, sizeof(bb_res));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* At release time the queue must be frozen before
|
|
||||||
* devm_memremap_pages is unwound
|
|
||||||
*/
|
|
||||||
if (devm_add_action_or_reset(dev, pmem_freeze_queue, q))
|
|
||||||
return -ENOMEM;
|
|
||||||
|
|
||||||
if (IS_ERR(addr))
|
if (IS_ERR(addr))
|
||||||
return PTR_ERR(addr);
|
return PTR_ERR(addr);
|
||||||
pmem->virt_addr = addr;
|
pmem->virt_addr = addr;
|
||||||
|
|
|
@ -115,9 +115,6 @@ int __weak of_node_to_nid(struct device_node *np)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static struct device_node **phandle_cache;
|
|
||||||
static u32 phandle_cache_mask;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Assumptions behind phandle_cache implementation:
|
* Assumptions behind phandle_cache implementation:
|
||||||
* - phandle property values are in a contiguous range of 1..n
|
* - phandle property values are in a contiguous range of 1..n
|
||||||
|
@ -126,6 +123,66 @@ static u32 phandle_cache_mask;
|
||||||
* - the phandle lookup overhead reduction provided by the cache
|
* - the phandle lookup overhead reduction provided by the cache
|
||||||
* will likely be less
|
* will likely be less
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
static struct device_node **phandle_cache;
|
||||||
|
static u32 phandle_cache_mask;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Caller must hold devtree_lock.
|
||||||
|
*/
|
||||||
|
static void __of_free_phandle_cache(void)
|
||||||
|
{
|
||||||
|
u32 cache_entries = phandle_cache_mask + 1;
|
||||||
|
u32 k;
|
||||||
|
|
||||||
|
if (!phandle_cache)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (k = 0; k < cache_entries; k++)
|
||||||
|
of_node_put(phandle_cache[k]);
|
||||||
|
|
||||||
|
kfree(phandle_cache);
|
||||||
|
phandle_cache = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
int of_free_phandle_cache(void)
|
||||||
|
{
|
||||||
|
unsigned long flags;
|
||||||
|
|
||||||
|
raw_spin_lock_irqsave(&devtree_lock, flags);
|
||||||
|
|
||||||
|
__of_free_phandle_cache();
|
||||||
|
|
||||||
|
raw_spin_unlock_irqrestore(&devtree_lock, flags);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#if !defined(CONFIG_MODULES)
|
||||||
|
late_initcall_sync(of_free_phandle_cache);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Caller must hold devtree_lock.
|
||||||
|
*/
|
||||||
|
void __of_free_phandle_cache_entry(phandle handle)
|
||||||
|
{
|
||||||
|
phandle masked_handle;
|
||||||
|
struct device_node *np;
|
||||||
|
|
||||||
|
if (!handle)
|
||||||
|
return;
|
||||||
|
|
||||||
|
masked_handle = handle & phandle_cache_mask;
|
||||||
|
|
||||||
|
if (phandle_cache) {
|
||||||
|
np = phandle_cache[masked_handle];
|
||||||
|
if (np && handle == np->phandle) {
|
||||||
|
of_node_put(np);
|
||||||
|
phandle_cache[masked_handle] = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void of_populate_phandle_cache(void)
|
void of_populate_phandle_cache(void)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
@ -135,8 +192,7 @@ void of_populate_phandle_cache(void)
|
||||||
|
|
||||||
raw_spin_lock_irqsave(&devtree_lock, flags);
|
raw_spin_lock_irqsave(&devtree_lock, flags);
|
||||||
|
|
||||||
kfree(phandle_cache);
|
__of_free_phandle_cache();
|
||||||
phandle_cache = NULL;
|
|
||||||
|
|
||||||
for_each_of_allnodes(np)
|
for_each_of_allnodes(np)
|
||||||
if (np->phandle && np->phandle != OF_PHANDLE_ILLEGAL)
|
if (np->phandle && np->phandle != OF_PHANDLE_ILLEGAL)
|
||||||
|
@ -154,30 +210,15 @@ void of_populate_phandle_cache(void)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
for_each_of_allnodes(np)
|
for_each_of_allnodes(np)
|
||||||
if (np->phandle && np->phandle != OF_PHANDLE_ILLEGAL)
|
if (np->phandle && np->phandle != OF_PHANDLE_ILLEGAL) {
|
||||||
|
of_node_get(np);
|
||||||
phandle_cache[np->phandle & phandle_cache_mask] = np;
|
phandle_cache[np->phandle & phandle_cache_mask] = np;
|
||||||
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
raw_spin_unlock_irqrestore(&devtree_lock, flags);
|
raw_spin_unlock_irqrestore(&devtree_lock, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
int of_free_phandle_cache(void)
|
|
||||||
{
|
|
||||||
unsigned long flags;
|
|
||||||
|
|
||||||
raw_spin_lock_irqsave(&devtree_lock, flags);
|
|
||||||
|
|
||||||
kfree(phandle_cache);
|
|
||||||
phandle_cache = NULL;
|
|
||||||
|
|
||||||
raw_spin_unlock_irqrestore(&devtree_lock, flags);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#if !defined(CONFIG_MODULES)
|
|
||||||
late_initcall_sync(of_free_phandle_cache);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void __init of_core_init(void)
|
void __init of_core_init(void)
|
||||||
{
|
{
|
||||||
struct device_node *np;
|
struct device_node *np;
|
||||||
|
@ -1150,13 +1191,23 @@ struct device_node *of_find_node_by_phandle(phandle handle)
|
||||||
if (phandle_cache[masked_handle] &&
|
if (phandle_cache[masked_handle] &&
|
||||||
handle == phandle_cache[masked_handle]->phandle)
|
handle == phandle_cache[masked_handle]->phandle)
|
||||||
np = phandle_cache[masked_handle];
|
np = phandle_cache[masked_handle];
|
||||||
|
if (np && of_node_check_flag(np, OF_DETACHED)) {
|
||||||
|
WARN_ON(1); /* did not uncache np on node removal */
|
||||||
|
of_node_put(np);
|
||||||
|
phandle_cache[masked_handle] = NULL;
|
||||||
|
np = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!np) {
|
if (!np) {
|
||||||
for_each_of_allnodes(np)
|
for_each_of_allnodes(np)
|
||||||
if (np->phandle == handle) {
|
if (np->phandle == handle &&
|
||||||
if (phandle_cache)
|
!of_node_check_flag(np, OF_DETACHED)) {
|
||||||
|
if (phandle_cache) {
|
||||||
|
/* will put when removed from cache */
|
||||||
|
of_node_get(np);
|
||||||
phandle_cache[masked_handle] = np;
|
phandle_cache[masked_handle] = np;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -268,6 +268,9 @@ void __of_detach_node(struct device_node *np)
|
||||||
}
|
}
|
||||||
|
|
||||||
of_node_set_flag(np, OF_DETACHED);
|
of_node_set_flag(np, OF_DETACHED);
|
||||||
|
|
||||||
|
/* race with of_find_node_by_phandle() prevented by devtree_lock */
|
||||||
|
__of_free_phandle_cache_entry(np->phandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -76,6 +76,10 @@ static inline void __of_detach_node_sysfs(struct device_node *np) {}
|
||||||
int of_resolve_phandles(struct device_node *tree);
|
int of_resolve_phandles(struct device_node *tree);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(CONFIG_OF_DYNAMIC)
|
||||||
|
void __of_free_phandle_cache_entry(phandle handle);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_OF_OVERLAY)
|
#if defined(CONFIG_OF_OVERLAY)
|
||||||
void of_overlay_mutex_lock(void);
|
void of_overlay_mutex_lock(void);
|
||||||
void of_overlay_mutex_unlock(void);
|
void of_overlay_mutex_unlock(void);
|
||||||
|
|
|
@ -1251,30 +1251,29 @@ static int pci_pm_runtime_suspend(struct device *dev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pm || !pm->runtime_suspend)
|
|
||||||
return -ENOSYS;
|
|
||||||
|
|
||||||
pci_dev->state_saved = false;
|
pci_dev->state_saved = false;
|
||||||
error = pm->runtime_suspend(dev);
|
if (pm && pm->runtime_suspend) {
|
||||||
if (error) {
|
error = pm->runtime_suspend(dev);
|
||||||
/*
|
/*
|
||||||
* -EBUSY and -EAGAIN is used to request the runtime PM core
|
* -EBUSY and -EAGAIN is used to request the runtime PM core
|
||||||
* to schedule a new suspend, so log the event only with debug
|
* to schedule a new suspend, so log the event only with debug
|
||||||
* log level.
|
* log level.
|
||||||
*/
|
*/
|
||||||
if (error == -EBUSY || error == -EAGAIN)
|
if (error == -EBUSY || error == -EAGAIN) {
|
||||||
dev_dbg(dev, "can't suspend now (%pf returned %d)\n",
|
dev_dbg(dev, "can't suspend now (%pf returned %d)\n",
|
||||||
pm->runtime_suspend, error);
|
pm->runtime_suspend, error);
|
||||||
else
|
return error;
|
||||||
|
} else if (error) {
|
||||||
dev_err(dev, "can't suspend (%pf returned %d)\n",
|
dev_err(dev, "can't suspend (%pf returned %d)\n",
|
||||||
pm->runtime_suspend, error);
|
pm->runtime_suspend, error);
|
||||||
|
return error;
|
||||||
return error;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pci_fixup_device(pci_fixup_suspend, pci_dev);
|
pci_fixup_device(pci_fixup_suspend, pci_dev);
|
||||||
|
|
||||||
if (!pci_dev->state_saved && pci_dev->current_state != PCI_D0
|
if (pm && pm->runtime_suspend
|
||||||
|
&& !pci_dev->state_saved && pci_dev->current_state != PCI_D0
|
||||||
&& pci_dev->current_state != PCI_UNKNOWN) {
|
&& pci_dev->current_state != PCI_UNKNOWN) {
|
||||||
WARN_ONCE(pci_dev->current_state != prev,
|
WARN_ONCE(pci_dev->current_state != prev,
|
||||||
"PCI PM: State of device not saved by %pF\n",
|
"PCI PM: State of device not saved by %pF\n",
|
||||||
|
@ -1292,7 +1291,7 @@ static int pci_pm_runtime_suspend(struct device *dev)
|
||||||
|
|
||||||
static int pci_pm_runtime_resume(struct device *dev)
|
static int pci_pm_runtime_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc = 0;
|
||||||
struct pci_dev *pci_dev = to_pci_dev(dev);
|
struct pci_dev *pci_dev = to_pci_dev(dev);
|
||||||
const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
|
const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
|
||||||
|
|
||||||
|
@ -1306,14 +1305,12 @@ static int pci_pm_runtime_resume(struct device *dev)
|
||||||
if (!pci_dev->driver)
|
if (!pci_dev->driver)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (!pm || !pm->runtime_resume)
|
|
||||||
return -ENOSYS;
|
|
||||||
|
|
||||||
pci_fixup_device(pci_fixup_resume_early, pci_dev);
|
pci_fixup_device(pci_fixup_resume_early, pci_dev);
|
||||||
pci_enable_wake(pci_dev, PCI_D0, false);
|
pci_enable_wake(pci_dev, PCI_D0, false);
|
||||||
pci_fixup_device(pci_fixup_resume, pci_dev);
|
pci_fixup_device(pci_fixup_resume, pci_dev);
|
||||||
|
|
||||||
rc = pm->runtime_resume(dev);
|
if (pm && pm->runtime_resume)
|
||||||
|
rc = pm->runtime_resume(dev);
|
||||||
|
|
||||||
pci_dev->runtime_d3cold = false;
|
pci_dev->runtime_d3cold = false;
|
||||||
|
|
||||||
|
|
|
@ -30,8 +30,8 @@
|
||||||
#define DDRC_FLUX_RCMD 0x38c
|
#define DDRC_FLUX_RCMD 0x38c
|
||||||
#define DDRC_PRE_CMD 0x3c0
|
#define DDRC_PRE_CMD 0x3c0
|
||||||
#define DDRC_ACT_CMD 0x3c4
|
#define DDRC_ACT_CMD 0x3c4
|
||||||
#define DDRC_BNK_CHG 0x3c8
|
|
||||||
#define DDRC_RNK_CHG 0x3cc
|
#define DDRC_RNK_CHG 0x3cc
|
||||||
|
#define DDRC_RW_CHG 0x3d0
|
||||||
#define DDRC_EVENT_CTRL 0x6C0
|
#define DDRC_EVENT_CTRL 0x6C0
|
||||||
#define DDRC_INT_MASK 0x6c8
|
#define DDRC_INT_MASK 0x6c8
|
||||||
#define DDRC_INT_STATUS 0x6cc
|
#define DDRC_INT_STATUS 0x6cc
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
|
|
||||||
static const u32 ddrc_reg_off[] = {
|
static const u32 ddrc_reg_off[] = {
|
||||||
DDRC_FLUX_WR, DDRC_FLUX_RD, DDRC_FLUX_WCMD, DDRC_FLUX_RCMD,
|
DDRC_FLUX_WR, DDRC_FLUX_RD, DDRC_FLUX_WCMD, DDRC_FLUX_RCMD,
|
||||||
DDRC_PRE_CMD, DDRC_ACT_CMD, DDRC_BNK_CHG, DDRC_RNK_CHG
|
DDRC_PRE_CMD, DDRC_ACT_CMD, DDRC_RNK_CHG, DDRC_RW_CHG
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -191,7 +191,8 @@ static int meson_pinconf_set(struct pinctrl_dev *pcdev, unsigned int pin,
|
||||||
case PIN_CONFIG_BIAS_DISABLE:
|
case PIN_CONFIG_BIAS_DISABLE:
|
||||||
dev_dbg(pc->dev, "pin %u: disable bias\n", pin);
|
dev_dbg(pc->dev, "pin %u: disable bias\n", pin);
|
||||||
|
|
||||||
meson_calc_reg_and_bit(bank, pin, REG_PULL, ®, &bit);
|
meson_calc_reg_and_bit(bank, pin, REG_PULLEN, ®,
|
||||||
|
&bit);
|
||||||
ret = regmap_update_bits(pc->reg_pullen, reg,
|
ret = regmap_update_bits(pc->reg_pullen, reg,
|
||||||
BIT(bit), 0);
|
BIT(bit), 0);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
|
|
@ -428,14 +428,14 @@ static int olpc_bat_get_property(struct power_supply *psy,
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
val->intval = (s16)be16_to_cpu(ec_word) * 100 / 256;
|
val->intval = (s16)be16_to_cpu(ec_word) * 10 / 256;
|
||||||
break;
|
break;
|
||||||
case POWER_SUPPLY_PROP_TEMP_AMBIENT:
|
case POWER_SUPPLY_PROP_TEMP_AMBIENT:
|
||||||
ret = olpc_ec_cmd(EC_AMB_TEMP, NULL, 0, (void *)&ec_word, 2);
|
ret = olpc_ec_cmd(EC_AMB_TEMP, NULL, 0, (void *)&ec_word, 2);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
val->intval = (int)be16_to_cpu(ec_word) * 100 / 256;
|
val->intval = (int)be16_to_cpu(ec_word) * 10 / 256;
|
||||||
break;
|
break;
|
||||||
case POWER_SUPPLY_PROP_CHARGE_COUNTER:
|
case POWER_SUPPLY_PROP_CHARGE_COUNTER:
|
||||||
ret = olpc_ec_cmd(EC_BAT_ACR, NULL, 0, (void *)&ec_word, 2);
|
ret = olpc_ec_cmd(EC_BAT_ACR, NULL, 0, (void *)&ec_word, 2);
|
||||||
|
|
|
@ -275,16 +275,16 @@ static void zfcp_free_low_mem_buffers(struct zfcp_adapter *adapter)
|
||||||
*/
|
*/
|
||||||
int zfcp_status_read_refill(struct zfcp_adapter *adapter)
|
int zfcp_status_read_refill(struct zfcp_adapter *adapter)
|
||||||
{
|
{
|
||||||
while (atomic_read(&adapter->stat_miss) > 0)
|
while (atomic_add_unless(&adapter->stat_miss, -1, 0))
|
||||||
if (zfcp_fsf_status_read(adapter->qdio)) {
|
if (zfcp_fsf_status_read(adapter->qdio)) {
|
||||||
|
atomic_inc(&adapter->stat_miss); /* undo add -1 */
|
||||||
if (atomic_read(&adapter->stat_miss) >=
|
if (atomic_read(&adapter->stat_miss) >=
|
||||||
adapter->stat_read_buf_num) {
|
adapter->stat_read_buf_num) {
|
||||||
zfcp_erp_adapter_reopen(adapter, 0, "axsref1");
|
zfcp_erp_adapter_reopen(adapter, 0, "axsref1");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
} else
|
}
|
||||||
atomic_dec(&adapter->stat_miss);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2371,7 +2371,7 @@ static int _bnx2fc_create(struct net_device *netdev,
|
||||||
if (!interface) {
|
if (!interface) {
|
||||||
printk(KERN_ERR PFX "bnx2fc_interface_create failed\n");
|
printk(KERN_ERR PFX "bnx2fc_interface_create failed\n");
|
||||||
rc = -ENOMEM;
|
rc = -ENOMEM;
|
||||||
goto ifput_err;
|
goto netdev_err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_vlan_dev(netdev)) {
|
if (is_vlan_dev(netdev)) {
|
||||||
|
|
|
@ -14221,7 +14221,8 @@ lpfc_sli4_queue_alloc(struct lpfc_hba *phba, uint32_t page_size,
|
||||||
hw_page_size))/hw_page_size;
|
hw_page_size))/hw_page_size;
|
||||||
|
|
||||||
/* If needed, Adjust page count to match the max the adapter supports */
|
/* If needed, Adjust page count to match the max the adapter supports */
|
||||||
if (queue->page_count > phba->sli4_hba.pc_sli4_params.wqpcnt)
|
if (phba->sli4_hba.pc_sli4_params.wqpcnt &&
|
||||||
|
(queue->page_count > phba->sli4_hba.pc_sli4_params.wqpcnt))
|
||||||
queue->page_count = phba->sli4_hba.pc_sli4_params.wqpcnt;
|
queue->page_count = phba->sli4_hba.pc_sli4_params.wqpcnt;
|
||||||
|
|
||||||
INIT_LIST_HEAD(&queue->list);
|
INIT_LIST_HEAD(&queue->list);
|
||||||
|
|
|
@ -4808,10 +4808,10 @@ void qla24xx_create_new_sess(struct scsi_qla_host *vha, struct qla_work_evt *e)
|
||||||
fcport->d_id = e->u.new_sess.id;
|
fcport->d_id = e->u.new_sess.id;
|
||||||
fcport->flags |= FCF_FABRIC_DEVICE;
|
fcport->flags |= FCF_FABRIC_DEVICE;
|
||||||
fcport->fw_login_state = DSC_LS_PLOGI_PEND;
|
fcport->fw_login_state = DSC_LS_PLOGI_PEND;
|
||||||
if (e->u.new_sess.fc4_type & FS_FC4TYPE_FCP)
|
if (e->u.new_sess.fc4_type == FS_FC4TYPE_FCP)
|
||||||
fcport->fc4_type = FC4_TYPE_FCP_SCSI;
|
fcport->fc4_type = FC4_TYPE_FCP_SCSI;
|
||||||
|
|
||||||
if (e->u.new_sess.fc4_type & FS_FC4TYPE_NVME) {
|
if (e->u.new_sess.fc4_type == FS_FC4TYPE_NVME) {
|
||||||
fcport->fc4_type = FC4_TYPE_OTHER;
|
fcport->fc4_type = FC4_TYPE_OTHER;
|
||||||
fcport->fc4f_nvme = FC4_TYPE_NVME;
|
fcport->fc4f_nvme = FC4_TYPE_NVME;
|
||||||
}
|
}
|
||||||
|
|
|
@ -631,8 +631,11 @@ static void cxgbit_send_halfclose(struct cxgbit_sock *csk)
|
||||||
|
|
||||||
static void cxgbit_arp_failure_discard(void *handle, struct sk_buff *skb)
|
static void cxgbit_arp_failure_discard(void *handle, struct sk_buff *skb)
|
||||||
{
|
{
|
||||||
|
struct cxgbit_sock *csk = handle;
|
||||||
|
|
||||||
pr_debug("%s cxgbit_device %p\n", __func__, handle);
|
pr_debug("%s cxgbit_device %p\n", __func__, handle);
|
||||||
kfree_skb(skb);
|
kfree_skb(skb);
|
||||||
|
cxgbit_put_csk(csk);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cxgbit_abort_arp_failure(void *handle, struct sk_buff *skb)
|
static void cxgbit_abort_arp_failure(void *handle, struct sk_buff *skb)
|
||||||
|
@ -1190,7 +1193,7 @@ cxgbit_pass_accept_rpl(struct cxgbit_sock *csk, struct cpl_pass_accept_req *req)
|
||||||
rpl5->opt0 = cpu_to_be64(opt0);
|
rpl5->opt0 = cpu_to_be64(opt0);
|
||||||
rpl5->opt2 = cpu_to_be32(opt2);
|
rpl5->opt2 = cpu_to_be32(opt2);
|
||||||
set_wr_txq(skb, CPL_PRIORITY_SETUP, csk->ctrlq_idx);
|
set_wr_txq(skb, CPL_PRIORITY_SETUP, csk->ctrlq_idx);
|
||||||
t4_set_arp_err_handler(skb, NULL, cxgbit_arp_failure_discard);
|
t4_set_arp_err_handler(skb, csk, cxgbit_arp_failure_discard);
|
||||||
cxgbit_l2t_send(csk->com.cdev, skb, csk->l2t);
|
cxgbit_l2t_send(csk->com.cdev, skb, csk->l2t);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,7 @@ static void *cxgbit_uld_add(const struct cxgb4_lld_info *lldi)
|
||||||
return ERR_PTR(-ENOMEM);
|
return ERR_PTR(-ENOMEM);
|
||||||
|
|
||||||
kref_init(&cdev->kref);
|
kref_init(&cdev->kref);
|
||||||
|
spin_lock_init(&cdev->np_lock);
|
||||||
|
|
||||||
cdev->lldi = *lldi;
|
cdev->lldi = *lldi;
|
||||||
|
|
||||||
|
|
|
@ -1394,22 +1394,43 @@ static inline struct console *SUNSU_CONSOLE(void)
|
||||||
static enum su_type su_get_type(struct device_node *dp)
|
static enum su_type su_get_type(struct device_node *dp)
|
||||||
{
|
{
|
||||||
struct device_node *ap = of_find_node_by_path("/aliases");
|
struct device_node *ap = of_find_node_by_path("/aliases");
|
||||||
|
enum su_type rc = SU_PORT_PORT;
|
||||||
|
|
||||||
if (ap) {
|
if (ap) {
|
||||||
const char *keyb = of_get_property(ap, "keyboard", NULL);
|
const char *keyb = of_get_property(ap, "keyboard", NULL);
|
||||||
const char *ms = of_get_property(ap, "mouse", NULL);
|
const char *ms = of_get_property(ap, "mouse", NULL);
|
||||||
|
struct device_node *match;
|
||||||
|
|
||||||
if (keyb) {
|
if (keyb) {
|
||||||
if (dp == of_find_node_by_path(keyb))
|
match = of_find_node_by_path(keyb);
|
||||||
return SU_PORT_KBD;
|
|
||||||
|
/*
|
||||||
|
* The pointer is used as an identifier not
|
||||||
|
* as a pointer, we can drop the refcount on
|
||||||
|
* the of__node immediately after getting it.
|
||||||
|
*/
|
||||||
|
of_node_put(match);
|
||||||
|
|
||||||
|
if (dp == match) {
|
||||||
|
rc = SU_PORT_KBD;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (ms) {
|
if (ms) {
|
||||||
if (dp == of_find_node_by_path(ms))
|
match = of_find_node_by_path(ms);
|
||||||
return SU_PORT_MS;
|
|
||||||
|
of_node_put(match);
|
||||||
|
|
||||||
|
if (dp == match) {
|
||||||
|
rc = SU_PORT_MS;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return SU_PORT_PORT;
|
out:
|
||||||
|
of_node_put(ap);
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int su_probe(struct platform_device *op)
|
static int su_probe(struct platform_device *op)
|
||||||
|
|
|
@ -2234,10 +2234,8 @@ static struct pxafb_mach_info *of_pxafb_of_mach_info(struct device *dev)
|
||||||
if (!info)
|
if (!info)
|
||||||
return ERR_PTR(-ENOMEM);
|
return ERR_PTR(-ENOMEM);
|
||||||
ret = of_get_pxafb_mode_info(dev, info);
|
ret = of_get_pxafb_mode_info(dev, info);
|
||||||
if (ret) {
|
if (ret)
|
||||||
kfree(info->modes);
|
|
||||||
return ERR_PTR(ret);
|
return ERR_PTR(ret);
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* On purpose, neither lccrX registers nor video memory size can be
|
* On purpose, neither lccrX registers nor video memory size can be
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue