mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
Merge 6441998e2e ("Merge tag 'audit-pr-20211216' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit") into android-mainline
Steps on the way to 5.16-rc6 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Ica4daeff9fcae47b1dfb5d6583e65da7311c50d9
This commit is contained in:
@@ -20,9 +20,9 @@ allOf:
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- apple,t8103-i2c
|
||||
- apple,i2c
|
||||
items:
|
||||
- const: apple,t8103-i2c
|
||||
- const: apple,i2c
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
@@ -51,7 +51,7 @@ unevaluatedProperties: false
|
||||
examples:
|
||||
- |
|
||||
i2c@35010000 {
|
||||
compatible = "apple,t8103-i2c";
|
||||
compatible = "apple,t8103-i2c", "apple,i2c";
|
||||
reg = <0x35010000 0x4000>;
|
||||
interrupt-parent = <&aic>;
|
||||
interrupts = <0 627 4>;
|
||||
|
||||
@@ -440,6 +440,22 @@ NOTE: For 82599-based network connections, if you are enabling jumbo frames in
|
||||
a virtual function (VF), jumbo frames must first be enabled in the physical
|
||||
function (PF). The VF MTU setting cannot be larger than the PF MTU.
|
||||
|
||||
NBASE-T Support
|
||||
---------------
|
||||
The ixgbe driver supports NBASE-T on some devices. However, the advertisement
|
||||
of NBASE-T speeds is suppressed by default, to accommodate broken network
|
||||
switches which cannot cope with advertised NBASE-T speeds. Use the ethtool
|
||||
command to enable advertising NBASE-T speeds on devices which support it::
|
||||
|
||||
ethtool -s eth? advertise 0x1800000001028
|
||||
|
||||
On Linux systems with INTERFACES(5), this can be specified as a pre-up command
|
||||
in /etc/network/interfaces so that the interface is always brought up with
|
||||
NBASE-T support, e.g.::
|
||||
|
||||
iface eth? inet dhcp
|
||||
pre-up ethtool -s eth? advertise 0x1800000001028 || true
|
||||
|
||||
Generic Receive Offload, aka GRO
|
||||
--------------------------------
|
||||
The driver supports the in-kernel software implementation of GRO. GRO has
|
||||
|
||||
12
MAINTAINERS
12
MAINTAINERS
@@ -3066,7 +3066,7 @@ F: Documentation/devicetree/bindings/phy/phy-ath79-usb.txt
|
||||
F: drivers/phy/qualcomm/phy-ath79-usb.c
|
||||
|
||||
ATHEROS ATH GENERIC UTILITIES
|
||||
M: Kalle Valo <kvalo@codeaurora.org>
|
||||
M: Kalle Valo <kvalo@kernel.org>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Supported
|
||||
F: drivers/net/wireless/ath/*
|
||||
@@ -3081,7 +3081,7 @@ W: https://wireless.wiki.kernel.org/en/users/Drivers/ath5k
|
||||
F: drivers/net/wireless/ath/ath5k/
|
||||
|
||||
ATHEROS ATH6KL WIRELESS DRIVER
|
||||
M: Kalle Valo <kvalo@codeaurora.org>
|
||||
M: Kalle Valo <kvalo@kernel.org>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Supported
|
||||
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath6kl
|
||||
@@ -13255,7 +13255,7 @@ F: include/uapi/linux/if_*
|
||||
F: include/uapi/linux/netdevice.h
|
||||
|
||||
NETWORKING DRIVERS (WIRELESS)
|
||||
M: Kalle Valo <kvalo@codeaurora.org>
|
||||
M: Kalle Valo <kvalo@kernel.org>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Maintained
|
||||
Q: http://patchwork.kernel.org/project/linux-wireless/list/
|
||||
@@ -15711,7 +15711,7 @@ T: git git://linuxtv.org/anttip/media_tree.git
|
||||
F: drivers/media/tuners/qt1010*
|
||||
|
||||
QUALCOMM ATHEROS ATH10K WIRELESS DRIVER
|
||||
M: Kalle Valo <kvalo@codeaurora.org>
|
||||
M: Kalle Valo <kvalo@kernel.org>
|
||||
L: ath10k@lists.infradead.org
|
||||
S: Supported
|
||||
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath10k
|
||||
@@ -15719,7 +15719,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
|
||||
F: drivers/net/wireless/ath/ath10k/
|
||||
|
||||
QUALCOMM ATHEROS ATH11K WIRELESS DRIVER
|
||||
M: Kalle Valo <kvalo@codeaurora.org>
|
||||
M: Kalle Valo <kvalo@kernel.org>
|
||||
L: ath11k@lists.infradead.org
|
||||
S: Supported
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
|
||||
@@ -15892,7 +15892,7 @@ F: Documentation/devicetree/bindings/media/*venus*
|
||||
F: drivers/media/platform/qcom/venus/
|
||||
|
||||
QUALCOMM WCN36XX WIRELESS DRIVER
|
||||
M: Kalle Valo <kvalo@codeaurora.org>
|
||||
M: Kalle Valo <kvalo@kernel.org>
|
||||
L: wcn36xx@lists.infradead.org
|
||||
S: Supported
|
||||
W: https://wireless.wiki.kernel.org/en/users/Drivers/wcn36xx
|
||||
|
||||
@@ -178,6 +178,8 @@
|
||||
label = "cpu";
|
||||
ethernet = <&fec>;
|
||||
phy-mode = "rgmii-id";
|
||||
rx-internal-delay-ps = <2000>;
|
||||
tx-internal-delay-ps = <2000>;
|
||||
|
||||
fixed-link {
|
||||
speed = <100>;
|
||||
|
||||
@@ -82,6 +82,6 @@
|
||||
#define MX6ULL_PAD_CSI_DATA04__ESAI_TX_FS 0x01F4 0x0480 0x0000 0x9 0x0
|
||||
#define MX6ULL_PAD_CSI_DATA05__ESAI_TX_CLK 0x01F8 0x0484 0x0000 0x9 0x0
|
||||
#define MX6ULL_PAD_CSI_DATA06__ESAI_TX5_RX0 0x01FC 0x0488 0x0000 0x9 0x0
|
||||
#define MX6ULL_PAD_CSI_DATA07__ESAI_T0 0x0200 0x048C 0x0000 0x9 0x0
|
||||
#define MX6ULL_PAD_CSI_DATA07__ESAI_TX0 0x0200 0x048C 0x0000 0x9 0x0
|
||||
|
||||
#endif /* __DTS_IMX6ULL_PINFUNC_H */
|
||||
|
||||
@@ -91,6 +91,8 @@
|
||||
/* Internal port connected to eth2 */
|
||||
ethernet = <&enet2>;
|
||||
phy-mode = "rgmii";
|
||||
rx-internal-delay-ps = <0>;
|
||||
tx-internal-delay-ps = <0>;
|
||||
reg = <4>;
|
||||
|
||||
fixed-link {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
flash0: n25q00@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "n25q00aa";
|
||||
compatible = "micron,mt25qu02g", "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <100000000>;
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
flash: flash@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "n25q256a";
|
||||
compatible = "micron,n25q256a", "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <100000000>;
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
flash0: n25q00@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "n25q00";
|
||||
compatible = "micron,mt25qu02g", "jedec,spi-nor";
|
||||
reg = <0>; /* chip select */
|
||||
spi-max-frequency = <100000000>;
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
flash: flash@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "n25q00";
|
||||
compatible = "micron,mt25qu02g", "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <100000000>;
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
flash: flash@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "n25q256a";
|
||||
compatible = "micron,n25q256a", "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <100000000>;
|
||||
m25p,fast-read;
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
flash0: n25q512a@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "n25q512a";
|
||||
compatible = "micron,n25q512a", "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <100000000>;
|
||||
|
||||
|
||||
@@ -224,7 +224,7 @@
|
||||
n25q128@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "n25q128";
|
||||
compatible = "micron,n25q128", "jedec,spi-nor";
|
||||
reg = <0>; /* chip select */
|
||||
spi-max-frequency = <100000000>;
|
||||
m25p,fast-read;
|
||||
@@ -241,7 +241,7 @@
|
||||
n25q00@1 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "n25q00";
|
||||
compatible = "micron,mt25qu02g", "jedec,spi-nor";
|
||||
reg = <1>; /* chip select */
|
||||
spi-max-frequency = <100000000>;
|
||||
m25p,fast-read;
|
||||
|
||||
@@ -189,7 +189,7 @@ static int __init rockchip_smp_prepare_sram(struct device_node *node)
|
||||
rockchip_boot_fn = __pa_symbol(secondary_startup);
|
||||
|
||||
/* copy the trampoline to sram, that runs during startup of the core */
|
||||
memcpy(sram_base_addr, &rockchip_secondary_trampoline, trampoline_sz);
|
||||
memcpy_toio(sram_base_addr, &rockchip_secondary_trampoline, trampoline_sz);
|
||||
flush_cache_all();
|
||||
outer_clean_range(0, trampoline_sz);
|
||||
|
||||
|
||||
@@ -161,7 +161,6 @@ config ARCH_MEDIATEK
|
||||
|
||||
config ARCH_MESON
|
||||
bool "Amlogic Platforms"
|
||||
select COMMON_CLK
|
||||
help
|
||||
This enables support for the arm64 based Amlogic SoCs
|
||||
such as the s905, S905X/D, S912, A113X/D or S905X/D2
|
||||
|
||||
@@ -134,23 +134,23 @@
|
||||
type = "critical";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
cpu_cooling_maps: cooling-maps {
|
||||
map0 {
|
||||
trip = <&cpu_passive>;
|
||||
cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
<&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
<&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
<&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
};
|
||||
cpu_cooling_maps: cooling-maps {
|
||||
map0 {
|
||||
trip = <&cpu_passive>;
|
||||
cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
<&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
<&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
<&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
};
|
||||
|
||||
map1 {
|
||||
trip = <&cpu_hot>;
|
||||
cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
<&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
<&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
<&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
map1 {
|
||||
trip = <&cpu_hot>;
|
||||
cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
<&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
<&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
<&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
&port02 {
|
||||
bus-range = <3 3>;
|
||||
ethernet0: pci@0,0 {
|
||||
ethernet0: ethernet@0,0 {
|
||||
reg = <0x30000 0x0 0x0 0x0 0x0>;
|
||||
/* To be filled by the loader */
|
||||
local-mac-address = [00 10 18 00 00 00];
|
||||
|
||||
@@ -144,6 +144,7 @@
|
||||
apple,npins = <212>;
|
||||
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
interrupt-parent = <&aic>;
|
||||
interrupts = <AIC_IRQ 190 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<AIC_IRQ 191 IRQ_TYPE_LEVEL_HIGH>,
|
||||
@@ -170,6 +171,7 @@
|
||||
apple,npins = <42>;
|
||||
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
interrupt-parent = <&aic>;
|
||||
interrupts = <AIC_IRQ 268 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<AIC_IRQ 269 IRQ_TYPE_LEVEL_HIGH>,
|
||||
@@ -190,6 +192,7 @@
|
||||
apple,npins = <23>;
|
||||
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
interrupt-parent = <&aic>;
|
||||
interrupts = <AIC_IRQ 330 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<AIC_IRQ 331 IRQ_TYPE_LEVEL_HIGH>,
|
||||
@@ -210,6 +213,7 @@
|
||||
apple,npins = <16>;
|
||||
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
interrupt-parent = <&aic>;
|
||||
interrupts = <AIC_IRQ 391 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<AIC_IRQ 392 IRQ_TYPE_LEVEL_HIGH>,
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
powerdn {
|
||||
label = "External Power Down";
|
||||
gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
|
||||
interrupts = <&gpio1 17 IRQ_TYPE_EDGE_FALLING>;
|
||||
linux,code = <KEY_POWER>;
|
||||
};
|
||||
|
||||
@@ -46,7 +45,6 @@
|
||||
admin {
|
||||
label = "ADMIN button";
|
||||
gpios = <&gpio3 8 GPIO_ACTIVE_HIGH>;
|
||||
interrupts = <&gpio3 8 IRQ_TYPE_EDGE_RISING>;
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -386,6 +386,8 @@
|
||||
reg = <2>;
|
||||
ethernet = <&dpmac17>;
|
||||
phy-mode = "rgmii-id";
|
||||
rx-internal-delay-ps = <2000>;
|
||||
tx-internal-delay-ps = <2000>;
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
@@ -529,6 +531,8 @@
|
||||
reg = <2>;
|
||||
ethernet = <&dpmac18>;
|
||||
phy-mode = "rgmii-id";
|
||||
rx-internal-delay-ps = <2000>;
|
||||
tx-internal-delay-ps = <2000>;
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
|
||||
@@ -524,8 +524,6 @@
|
||||
<&clk IMX8MQ_VIDEO_PLL1>,
|
||||
<&clk IMX8MQ_VIDEO_PLL1_OUT>;
|
||||
assigned-clock-rates = <0>, <0>, <0>, <594000000>;
|
||||
interconnects = <&noc IMX8MQ_ICM_LCDIF &noc IMX8MQ_ICS_DRAM>;
|
||||
interconnect-names = "dram";
|
||||
status = "disabled";
|
||||
|
||||
port@0 {
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
vim-supply = <&vcc_io>;
|
||||
vin-supply = <&vcc_io>;
|
||||
};
|
||||
|
||||
vdd_core: vdd-core {
|
||||
|
||||
@@ -705,7 +705,6 @@
|
||||
&sdhci {
|
||||
bus-width = <8>;
|
||||
mmc-hs400-1_8v;
|
||||
mmc-hs400-enhanced-strobe;
|
||||
non-removable;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -276,6 +276,7 @@
|
||||
clock-output-names = "xin32k", "rk808-clkout2";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pmic_int_l>;
|
||||
rockchip,system-power-controller;
|
||||
vcc1-supply = <&vcc5v0_sys>;
|
||||
vcc2-supply = <&vcc5v0_sys>;
|
||||
vcc3-supply = <&vcc5v0_sys>;
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
vim-supply = <&vcc3v3_sys>;
|
||||
vin-supply = <&vcc3v3_sys>;
|
||||
};
|
||||
|
||||
vcc3v3_sys: vcc3v3-sys {
|
||||
|
||||
@@ -502,7 +502,7 @@
|
||||
status = "okay";
|
||||
|
||||
bt656-supply = <&vcc_3v0>;
|
||||
audio-supply = <&vcc_3v0>;
|
||||
audio-supply = <&vcc1v8_codec>;
|
||||
sdmmc-supply = <&vcc_sdio>;
|
||||
gpio1830-supply = <&vcc_3v0>;
|
||||
};
|
||||
|
||||
@@ -149,6 +149,7 @@ int load_other_segments(struct kimage *image,
|
||||
initrd_len, cmdline, 0);
|
||||
if (!dtb) {
|
||||
pr_err("Preparing for new dtb failed\n");
|
||||
ret = -EINVAL;
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
|
||||
@@ -117,6 +117,7 @@ CONFIG_UNIX=y
|
||||
CONFIG_UNIX_DIAG=m
|
||||
CONFIG_XFRM_USER=m
|
||||
CONFIG_NET_KEY=m
|
||||
CONFIG_NET_SWITCHDEV=y
|
||||
CONFIG_SMC=m
|
||||
CONFIG_SMC_DIAG=m
|
||||
CONFIG_INET=y
|
||||
@@ -511,6 +512,7 @@ CONFIG_NLMON=m
|
||||
CONFIG_MLX4_EN=m
|
||||
CONFIG_MLX5_CORE=m
|
||||
CONFIG_MLX5_CORE_EN=y
|
||||
CONFIG_MLX5_ESWITCH=y
|
||||
# CONFIG_NET_VENDOR_MICREL is not set
|
||||
# CONFIG_NET_VENDOR_MICROCHIP is not set
|
||||
# CONFIG_NET_VENDOR_MICROSEMI is not set
|
||||
|
||||
@@ -109,6 +109,7 @@ CONFIG_UNIX=y
|
||||
CONFIG_UNIX_DIAG=m
|
||||
CONFIG_XFRM_USER=m
|
||||
CONFIG_NET_KEY=m
|
||||
CONFIG_NET_SWITCHDEV=y
|
||||
CONFIG_SMC=m
|
||||
CONFIG_SMC_DIAG=m
|
||||
CONFIG_INET=y
|
||||
@@ -502,6 +503,7 @@ CONFIG_NLMON=m
|
||||
CONFIG_MLX4_EN=m
|
||||
CONFIG_MLX5_CORE=m
|
||||
CONFIG_MLX5_CORE_EN=y
|
||||
CONFIG_MLX5_ESWITCH=y
|
||||
# CONFIG_NET_VENDOR_MICREL is not set
|
||||
# CONFIG_NET_VENDOR_MICROCHIP is not set
|
||||
# CONFIG_NET_VENDOR_MICROSEMI is not set
|
||||
|
||||
@@ -290,7 +290,6 @@ void kprobe_ftrace_handler(unsigned long ip, unsigned long parent_ip,
|
||||
return;
|
||||
|
||||
regs = ftrace_get_regs(fregs);
|
||||
preempt_disable_notrace();
|
||||
p = get_kprobe((kprobe_opcode_t *)ip);
|
||||
if (unlikely(!p) || kprobe_disabled(p))
|
||||
goto out;
|
||||
@@ -318,7 +317,6 @@ void kprobe_ftrace_handler(unsigned long ip, unsigned long parent_ip,
|
||||
}
|
||||
__this_cpu_write(current_kprobe, NULL);
|
||||
out:
|
||||
preempt_enable_notrace();
|
||||
ftrace_test_recursion_unlock(bit);
|
||||
}
|
||||
NOKPROBE_SYMBOL(kprobe_ftrace_handler);
|
||||
|
||||
@@ -138,7 +138,7 @@ void noinstr do_io_irq(struct pt_regs *regs)
|
||||
struct pt_regs *old_regs = set_irq_regs(regs);
|
||||
int from_idle;
|
||||
|
||||
irq_enter();
|
||||
irq_enter_rcu();
|
||||
|
||||
if (user_mode(regs)) {
|
||||
update_timer_sys();
|
||||
@@ -158,7 +158,8 @@ void noinstr do_io_irq(struct pt_regs *regs)
|
||||
do_irq_async(regs, IO_INTERRUPT);
|
||||
} while (MACHINE_IS_LPAR && irq_pending(regs));
|
||||
|
||||
irq_exit();
|
||||
irq_exit_rcu();
|
||||
|
||||
set_irq_regs(old_regs);
|
||||
irqentry_exit(regs, state);
|
||||
|
||||
@@ -172,7 +173,7 @@ void noinstr do_ext_irq(struct pt_regs *regs)
|
||||
struct pt_regs *old_regs = set_irq_regs(regs);
|
||||
int from_idle;
|
||||
|
||||
irq_enter();
|
||||
irq_enter_rcu();
|
||||
|
||||
if (user_mode(regs)) {
|
||||
update_timer_sys();
|
||||
@@ -190,7 +191,7 @@ void noinstr do_ext_irq(struct pt_regs *regs)
|
||||
|
||||
do_irq_async(regs, EXT_INTERRUPT);
|
||||
|
||||
irq_exit();
|
||||
irq_exit_rcu();
|
||||
set_irq_regs(old_regs);
|
||||
irqentry_exit(regs, state);
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
* Author(s): Philipp Rudo <prudo@linux.vnet.ibm.com>
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "kexec: " fmt
|
||||
|
||||
#include <linux/elf.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/kexec.h>
|
||||
@@ -290,8 +292,16 @@ int arch_kexec_apply_relocations_add(struct purgatory_info *pi,
|
||||
const Elf_Shdr *relsec,
|
||||
const Elf_Shdr *symtab)
|
||||
{
|
||||
const char *strtab, *name, *shstrtab;
|
||||
const Elf_Shdr *sechdrs;
|
||||
Elf_Rela *relas;
|
||||
int i, r_type;
|
||||
int ret;
|
||||
|
||||
/* String & section header string table */
|
||||
sechdrs = (void *)pi->ehdr + pi->ehdr->e_shoff;
|
||||
strtab = (char *)pi->ehdr + sechdrs[symtab->sh_link].sh_offset;
|
||||
shstrtab = (char *)pi->ehdr + sechdrs[pi->ehdr->e_shstrndx].sh_offset;
|
||||
|
||||
relas = (void *)pi->ehdr + relsec->sh_offset;
|
||||
|
||||
@@ -304,15 +314,27 @@ int arch_kexec_apply_relocations_add(struct purgatory_info *pi,
|
||||
sym = (void *)pi->ehdr + symtab->sh_offset;
|
||||
sym += ELF64_R_SYM(relas[i].r_info);
|
||||
|
||||
if (sym->st_shndx == SHN_UNDEF)
|
||||
return -ENOEXEC;
|
||||
if (sym->st_name)
|
||||
name = strtab + sym->st_name;
|
||||
else
|
||||
name = shstrtab + sechdrs[sym->st_shndx].sh_name;
|
||||
|
||||
if (sym->st_shndx == SHN_COMMON)
|
||||
if (sym->st_shndx == SHN_UNDEF) {
|
||||
pr_err("Undefined symbol: %s\n", name);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
if (sym->st_shndx == SHN_COMMON) {
|
||||
pr_err("symbol '%s' in common section\n", name);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
if (sym->st_shndx >= pi->ehdr->e_shnum &&
|
||||
sym->st_shndx != SHN_ABS)
|
||||
sym->st_shndx != SHN_ABS) {
|
||||
pr_err("Invalid section %d for symbol %s\n",
|
||||
sym->st_shndx, name);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
loc = pi->purgatory_buf;
|
||||
loc += section->sh_offset;
|
||||
@@ -326,7 +348,15 @@ int arch_kexec_apply_relocations_add(struct purgatory_info *pi,
|
||||
addr = section->sh_addr + relas[i].r_offset;
|
||||
|
||||
r_type = ELF64_R_TYPE(relas[i].r_info);
|
||||
arch_kexec_do_relocs(r_type, loc, val, addr);
|
||||
|
||||
if (r_type == R_390_PLT32DBL)
|
||||
r_type = R_390_PC32DBL;
|
||||
|
||||
ret = arch_kexec_do_relocs(r_type, loc, val, addr);
|
||||
if (ret) {
|
||||
pr_err("Unknown rela relocation: %d\n", r_type);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1252,19 +1252,54 @@ st: if (is_imm8(insn->off))
|
||||
case BPF_LDX | BPF_MEM | BPF_DW:
|
||||
case BPF_LDX | BPF_PROBE_MEM | BPF_DW:
|
||||
if (BPF_MODE(insn->code) == BPF_PROBE_MEM) {
|
||||
/* test src_reg, src_reg */
|
||||
maybe_emit_mod(&prog, src_reg, src_reg, true); /* always 1 byte */
|
||||
EMIT2(0x85, add_2reg(0xC0, src_reg, src_reg));
|
||||
/* jne start_of_ldx */
|
||||
EMIT2(X86_JNE, 0);
|
||||
/* Though the verifier prevents negative insn->off in BPF_PROBE_MEM
|
||||
* add abs(insn->off) to the limit to make sure that negative
|
||||
* offset won't be an issue.
|
||||
* insn->off is s16, so it won't affect valid pointers.
|
||||
*/
|
||||
u64 limit = TASK_SIZE_MAX + PAGE_SIZE + abs(insn->off);
|
||||
u8 *end_of_jmp1, *end_of_jmp2;
|
||||
|
||||
/* Conservatively check that src_reg + insn->off is a kernel address:
|
||||
* 1. src_reg + insn->off >= limit
|
||||
* 2. src_reg + insn->off doesn't become small positive.
|
||||
* Cannot do src_reg + insn->off >= limit in one branch,
|
||||
* since it needs two spare registers, but JIT has only one.
|
||||
*/
|
||||
|
||||
/* movabsq r11, limit */
|
||||
EMIT2(add_1mod(0x48, AUX_REG), add_1reg(0xB8, AUX_REG));
|
||||
EMIT((u32)limit, 4);
|
||||
EMIT(limit >> 32, 4);
|
||||
/* cmp src_reg, r11 */
|
||||
maybe_emit_mod(&prog, src_reg, AUX_REG, true);
|
||||
EMIT2(0x39, add_2reg(0xC0, src_reg, AUX_REG));
|
||||
/* if unsigned '<' goto end_of_jmp2 */
|
||||
EMIT2(X86_JB, 0);
|
||||
end_of_jmp1 = prog;
|
||||
|
||||
/* mov r11, src_reg */
|
||||
emit_mov_reg(&prog, true, AUX_REG, src_reg);
|
||||
/* add r11, insn->off */
|
||||
maybe_emit_1mod(&prog, AUX_REG, true);
|
||||
EMIT2_off32(0x81, add_1reg(0xC0, AUX_REG), insn->off);
|
||||
/* jmp if not carry to start_of_ldx
|
||||
* Otherwise ERR_PTR(-EINVAL) + 128 will be the user addr
|
||||
* that has to be rejected.
|
||||
*/
|
||||
EMIT2(0x73 /* JNC */, 0);
|
||||
end_of_jmp2 = prog;
|
||||
|
||||
/* xor dst_reg, dst_reg */
|
||||
emit_mov_imm32(&prog, false, dst_reg, 0);
|
||||
/* jmp byte_after_ldx */
|
||||
EMIT2(0xEB, 0);
|
||||
|
||||
/* populate jmp_offset for JNE above */
|
||||
temp[4] = prog - temp - 5 /* sizeof(test + jne) */;
|
||||
/* populate jmp_offset for JB above to jump to xor dst_reg */
|
||||
end_of_jmp1[-1] = end_of_jmp2 - end_of_jmp1;
|
||||
/* populate jmp_offset for JNC above to jump to start_of_ldx */
|
||||
start_of_ldx = prog;
|
||||
end_of_jmp2[-1] = start_of_ldx - end_of_jmp2;
|
||||
}
|
||||
emit_ldx(&prog, BPF_SIZE(insn->code), dst_reg, src_reg, insn->off);
|
||||
if (BPF_MODE(insn->code) == BPF_PROBE_MEM) {
|
||||
@@ -1305,7 +1340,7 @@ st: if (is_imm8(insn->off))
|
||||
* End result: x86 insn "mov rbx, qword ptr [rax+0x14]"
|
||||
* of 4 bytes will be ignored and rbx will be zero inited.
|
||||
*/
|
||||
ex->fixup = (prog - temp) | (reg2pt_regs[dst_reg] << 8);
|
||||
ex->fixup = (prog - start_of_ldx) | (reg2pt_regs[dst_reg] << 8);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -41,8 +41,7 @@ obj-$(CONFIG_DMADEVICES) += dma/
|
||||
# SOC specific infrastructure drivers.
|
||||
obj-y += soc/
|
||||
|
||||
obj-$(CONFIG_VIRTIO) += virtio/
|
||||
obj-$(CONFIG_VIRTIO_PCI_LIB) += virtio/
|
||||
obj-y += virtio/
|
||||
obj-$(CONFIG_VDPA) += vdpa/
|
||||
obj-$(CONFIG_XEN) += xen/
|
||||
|
||||
|
||||
@@ -3498,6 +3498,14 @@ static int __clk_core_init(struct clk_core *core)
|
||||
|
||||
clk_prepare_lock();
|
||||
|
||||
/*
|
||||
* Set hw->core after grabbing the prepare_lock to synchronize with
|
||||
* callers of clk_core_fill_parent_index() where we treat hw->core
|
||||
* being NULL as the clk not being registered yet. This is crucial so
|
||||
* that clks aren't parented until their parent is fully registered.
|
||||
*/
|
||||
core->hw->core = core;
|
||||
|
||||
ret = clk_pm_runtime_get(core);
|
||||
if (ret)
|
||||
goto unlock;
|
||||
@@ -3665,8 +3673,10 @@ static int __clk_core_init(struct clk_core *core)
|
||||
out:
|
||||
clk_pm_runtime_put(core);
|
||||
unlock:
|
||||
if (ret)
|
||||
if (ret) {
|
||||
hlist_del_init(&core->child_node);
|
||||
core->hw->core = NULL;
|
||||
}
|
||||
|
||||
clk_prepare_unlock();
|
||||
|
||||
@@ -3930,7 +3940,6 @@ __clk_register(struct device *dev, struct device_node *np, struct clk_hw *hw)
|
||||
core->num_parents = init->num_parents;
|
||||
core->min_rate = 0;
|
||||
core->max_rate = ULONG_MAX;
|
||||
hw->core = core;
|
||||
|
||||
ret = clk_core_populate_parent_map(core, init);
|
||||
if (ret)
|
||||
@@ -3948,7 +3957,7 @@ __clk_register(struct device *dev, struct device_node *np, struct clk_hw *hw)
|
||||
goto fail_create_clk;
|
||||
}
|
||||
|
||||
clk_core_link_consumer(hw->core, hw->clk);
|
||||
clk_core_link_consumer(core, hw->clk);
|
||||
|
||||
ret = __clk_core_init(core);
|
||||
if (!ret)
|
||||
|
||||
@@ -16,7 +16,6 @@ struct scpi_pm_domain {
|
||||
struct generic_pm_domain genpd;
|
||||
struct scpi_ops *ops;
|
||||
u32 domain;
|
||||
char name[30];
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -110,8 +109,13 @@ static int scpi_pm_domain_probe(struct platform_device *pdev)
|
||||
|
||||
scpi_pd->domain = i;
|
||||
scpi_pd->ops = scpi_ops;
|
||||
sprintf(scpi_pd->name, "%pOFn.%d", np, i);
|
||||
scpi_pd->genpd.name = scpi_pd->name;
|
||||
scpi_pd->genpd.name = devm_kasprintf(dev, GFP_KERNEL,
|
||||
"%pOFn.%d", np, i);
|
||||
if (!scpi_pd->genpd.name) {
|
||||
dev_err(dev, "Failed to allocate genpd name:%pOFn.%d\n",
|
||||
np, i);
|
||||
continue;
|
||||
}
|
||||
scpi_pd->genpd.power_off = scpi_pd_power_off;
|
||||
scpi_pd->genpd.power_on = scpi_pd_power_on;
|
||||
|
||||
|
||||
@@ -77,13 +77,14 @@ static const char *get_filename(struct tegra_bpmp *bpmp,
|
||||
const char *root_path, *filename = NULL;
|
||||
char *root_path_buf;
|
||||
size_t root_len;
|
||||
size_t root_path_buf_len = 512;
|
||||
|
||||
root_path_buf = kzalloc(512, GFP_KERNEL);
|
||||
root_path_buf = kzalloc(root_path_buf_len, GFP_KERNEL);
|
||||
if (!root_path_buf)
|
||||
goto out;
|
||||
|
||||
root_path = dentry_path(bpmp->debugfs_mirror, root_path_buf,
|
||||
sizeof(root_path_buf));
|
||||
root_path_buf_len);
|
||||
if (IS_ERR(root_path))
|
||||
goto out;
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ config HYPERV_TIMER
|
||||
config HYPERV_UTILS
|
||||
tristate "Microsoft Hyper-V Utilities driver"
|
||||
depends on HYPERV && CONNECTOR && NLS
|
||||
depends on PTP_1588_CLOCK_OPTIONAL
|
||||
help
|
||||
Select this option to enable the Hyper-V Utilities.
|
||||
|
||||
|
||||
@@ -1963,7 +1963,7 @@ static bool __journal_read_write(struct dm_integrity_io *dio, struct bio *bio,
|
||||
n_sectors -= bv.bv_len >> SECTOR_SHIFT;
|
||||
bio_advance_iter(bio, &bio->bi_iter, bv.bv_len);
|
||||
retry_kmap:
|
||||
mem = bvec_kmap_local(&bv);
|
||||
mem = kmap_local_page(bv.bv_page);
|
||||
if (likely(dio->op == REQ_OP_WRITE))
|
||||
flush_dcache_page(bv.bv_page);
|
||||
|
||||
|
||||
@@ -423,9 +423,9 @@ static int rebalance_children(struct shadow_spine *s,
|
||||
|
||||
memcpy(n, dm_block_data(child),
|
||||
dm_bm_block_size(dm_tm_get_bm(info->tm)));
|
||||
dm_tm_unlock(info->tm, child);
|
||||
|
||||
dm_tm_dec(info->tm, dm_block_location(child));
|
||||
dm_tm_unlock(info->tm, child);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -768,6 +768,10 @@ static void mv88e6xxx_mac_link_down(struct dsa_switch *ds, int port,
|
||||
if ((!mv88e6xxx_port_ppu_updates(chip, port) ||
|
||||
mode == MLO_AN_FIXED) && ops->port_sync_link)
|
||||
err = ops->port_sync_link(chip, port, mode, false);
|
||||
|
||||
if (!err && ops->port_set_speed_duplex)
|
||||
err = ops->port_set_speed_duplex(chip, port, SPEED_UNFORCED,
|
||||
DUPLEX_UNFORCED);
|
||||
mv88e6xxx_reg_unlock(chip);
|
||||
|
||||
if (err)
|
||||
|
||||
@@ -283,7 +283,7 @@ static int mv88e6xxx_port_set_speed_duplex(struct mv88e6xxx_chip *chip,
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
if (speed)
|
||||
if (speed != SPEED_UNFORCED)
|
||||
dev_dbg(chip->dev, "p%d: Speed set to %d Mbps\n", port, speed);
|
||||
else
|
||||
dev_dbg(chip->dev, "p%d: Speed unforced\n", port);
|
||||
@@ -516,7 +516,7 @@ int mv88e6393x_port_set_speed_duplex(struct mv88e6xxx_chip *chip, int port,
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
if (speed)
|
||||
if (speed != SPEED_UNFORCED)
|
||||
dev_dbg(chip->dev, "p%d: Speed set to %d Mbps\n", port, speed);
|
||||
else
|
||||
dev_dbg(chip->dev, "p%d: Speed unforced\n", port);
|
||||
|
||||
@@ -1309,11 +1309,11 @@ static netdev_tx_t bcm_sysport_xmit(struct sk_buff *skb,
|
||||
struct bcm_sysport_priv *priv = netdev_priv(dev);
|
||||
struct device *kdev = &priv->pdev->dev;
|
||||
struct bcm_sysport_tx_ring *ring;
|
||||
unsigned long flags, desc_flags;
|
||||
struct bcm_sysport_cb *cb;
|
||||
struct netdev_queue *txq;
|
||||
u32 len_status, addr_lo;
|
||||
unsigned int skb_len;
|
||||
unsigned long flags;
|
||||
dma_addr_t mapping;
|
||||
u16 queue;
|
||||
int ret;
|
||||
@@ -1373,8 +1373,10 @@ static netdev_tx_t bcm_sysport_xmit(struct sk_buff *skb,
|
||||
ring->desc_count--;
|
||||
|
||||
/* Ports are latched, so write upper address first */
|
||||
spin_lock_irqsave(&priv->desc_lock, desc_flags);
|
||||
tdma_writel(priv, len_status, TDMA_WRITE_PORT_HI(ring->index));
|
||||
tdma_writel(priv, addr_lo, TDMA_WRITE_PORT_LO(ring->index));
|
||||
spin_unlock_irqrestore(&priv->desc_lock, desc_flags);
|
||||
|
||||
/* Check ring space and update SW control flow */
|
||||
if (ring->desc_count == 0)
|
||||
@@ -2013,6 +2015,7 @@ static int bcm_sysport_open(struct net_device *dev)
|
||||
}
|
||||
|
||||
/* Initialize both hardware and software ring */
|
||||
spin_lock_init(&priv->desc_lock);
|
||||
for (i = 0; i < dev->num_tx_queues; i++) {
|
||||
ret = bcm_sysport_init_tx_ring(priv, i);
|
||||
if (ret) {
|
||||
|
||||
@@ -711,6 +711,7 @@ struct bcm_sysport_priv {
|
||||
int wol_irq;
|
||||
|
||||
/* Transmit rings */
|
||||
spinlock_t desc_lock;
|
||||
struct bcm_sysport_tx_ring *tx_rings;
|
||||
|
||||
/* Receive queue */
|
||||
|
||||
@@ -589,9 +589,9 @@ static int bcmgenet_mii_pd_init(struct bcmgenet_priv *priv)
|
||||
* Internal or external PHY with MDIO access
|
||||
*/
|
||||
phydev = phy_attach(priv->dev, phy_name, pd->phy_interface);
|
||||
if (!phydev) {
|
||||
if (IS_ERR(phydev)) {
|
||||
dev_err(kdev, "failed to register PHY device\n");
|
||||
return -ENODEV;
|
||||
return PTR_ERR(phydev);
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
|
||||
@@ -388,6 +388,8 @@ struct dpaa2_eth_ch_stats {
|
||||
__u64 bytes_per_cdan;
|
||||
};
|
||||
|
||||
#define DPAA2_ETH_CH_STATS 7
|
||||
|
||||
/* Maximum number of queues associated with a DPNI */
|
||||
#define DPAA2_ETH_MAX_TCS 8
|
||||
#define DPAA2_ETH_MAX_RX_QUEUES_PER_TC 16
|
||||
|
||||
@@ -278,7 +278,7 @@ static void dpaa2_eth_get_ethtool_stats(struct net_device *net_dev,
|
||||
/* Per-channel stats */
|
||||
for (k = 0; k < priv->num_channels; k++) {
|
||||
ch_stats = &priv->channel[k]->stats;
|
||||
for (j = 0; j < sizeof(*ch_stats) / sizeof(__u64) - 1; j++)
|
||||
for (j = 0; j < DPAA2_ETH_CH_STATS; j++)
|
||||
*((__u64 *)data + i + j) += *((__u64 *)ch_stats + j);
|
||||
}
|
||||
i += j;
|
||||
|
||||
@@ -839,6 +839,8 @@ struct hnae3_handle {
|
||||
|
||||
u8 netdev_flags;
|
||||
struct dentry *hnae3_dbgfs;
|
||||
/* protects concurrent contention between debugfs commands */
|
||||
struct mutex dbgfs_lock;
|
||||
|
||||
/* Network interface message level enabled bits */
|
||||
u32 msg_enable;
|
||||
|
||||
@@ -1226,6 +1226,7 @@ static ssize_t hns3_dbg_read(struct file *filp, char __user *buffer,
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
mutex_lock(&handle->dbgfs_lock);
|
||||
save_buf = &hns3_dbg_cmd[index].buf;
|
||||
|
||||
if (!test_bit(HNS3_NIC_STATE_INITED, &priv->state) ||
|
||||
@@ -1238,15 +1239,15 @@ static ssize_t hns3_dbg_read(struct file *filp, char __user *buffer,
|
||||
read_buf = *save_buf;
|
||||
} else {
|
||||
read_buf = kvzalloc(hns3_dbg_cmd[index].buf_len, GFP_KERNEL);
|
||||
if (!read_buf)
|
||||
return -ENOMEM;
|
||||
if (!read_buf) {
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* save the buffer addr until the last read operation */
|
||||
*save_buf = read_buf;
|
||||
}
|
||||
|
||||
/* get data ready for the first time to read */
|
||||
if (!*ppos) {
|
||||
/* get data ready for the first time to read */
|
||||
ret = hns3_dbg_read_cmd(dbg_data, hns3_dbg_cmd[index].cmd,
|
||||
read_buf, hns3_dbg_cmd[index].buf_len);
|
||||
if (ret)
|
||||
@@ -1255,8 +1256,10 @@ static ssize_t hns3_dbg_read(struct file *filp, char __user *buffer,
|
||||
|
||||
size = simple_read_from_buffer(buffer, count, ppos, read_buf,
|
||||
strlen(read_buf));
|
||||
if (size > 0)
|
||||
if (size > 0) {
|
||||
mutex_unlock(&handle->dbgfs_lock);
|
||||
return size;
|
||||
}
|
||||
|
||||
out:
|
||||
/* free the buffer for the last read operation */
|
||||
@@ -1265,6 +1268,7 @@ out:
|
||||
*save_buf = NULL;
|
||||
}
|
||||
|
||||
mutex_unlock(&handle->dbgfs_lock);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1337,6 +1341,8 @@ int hns3_dbg_init(struct hnae3_handle *handle)
|
||||
debugfs_create_dir(hns3_dbg_dentry[i].name,
|
||||
handle->hnae3_dbgfs);
|
||||
|
||||
mutex_init(&handle->dbgfs_lock);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(hns3_dbg_cmd); i++) {
|
||||
if ((hns3_dbg_cmd[i].cmd == HNAE3_DBG_CMD_TM_NODES &&
|
||||
ae_dev->dev_version <= HNAE3_DEVICE_VERSION_V2) ||
|
||||
@@ -1363,6 +1369,7 @@ int hns3_dbg_init(struct hnae3_handle *handle)
|
||||
return 0;
|
||||
|
||||
out:
|
||||
mutex_destroy(&handle->dbgfs_lock);
|
||||
debugfs_remove_recursive(handle->hnae3_dbgfs);
|
||||
handle->hnae3_dbgfs = NULL;
|
||||
return ret;
|
||||
@@ -1378,6 +1385,7 @@ void hns3_dbg_uninit(struct hnae3_handle *handle)
|
||||
hns3_dbg_cmd[i].buf = NULL;
|
||||
}
|
||||
|
||||
mutex_destroy(&handle->dbgfs_lock);
|
||||
debugfs_remove_recursive(handle->hnae3_dbgfs);
|
||||
handle->hnae3_dbgfs = NULL;
|
||||
}
|
||||
|
||||
@@ -114,7 +114,8 @@ int hclgevf_send_mbx_msg(struct hclgevf_dev *hdev,
|
||||
|
||||
memcpy(&req->msg, send_msg, sizeof(struct hclge_vf_to_pf_msg));
|
||||
|
||||
trace_hclge_vf_mbx_send(hdev, req);
|
||||
if (test_bit(HCLGEVF_STATE_NIC_REGISTERED, &hdev->state))
|
||||
trace_hclge_vf_mbx_send(hdev, req);
|
||||
|
||||
/* synchronous send */
|
||||
if (need_resp) {
|
||||
|
||||
@@ -2046,6 +2046,7 @@ static void iavf_watchdog_task(struct work_struct *work)
|
||||
}
|
||||
adapter->aq_required = 0;
|
||||
adapter->current_op = VIRTCHNL_OP_UNKNOWN;
|
||||
mutex_unlock(&adapter->crit_lock);
|
||||
queue_delayed_work(iavf_wq,
|
||||
&adapter->watchdog_task,
|
||||
msecs_to_jiffies(10));
|
||||
@@ -2076,16 +2077,14 @@ static void iavf_watchdog_task(struct work_struct *work)
|
||||
iavf_detect_recover_hung(&adapter->vsi);
|
||||
break;
|
||||
case __IAVF_REMOVE:
|
||||
mutex_unlock(&adapter->crit_lock);
|
||||
return;
|
||||
default:
|
||||
mutex_unlock(&adapter->crit_lock);
|
||||
return;
|
||||
}
|
||||
|
||||
/* check for hw reset */
|
||||
reg_val = rd32(hw, IAVF_VF_ARQLEN1) & IAVF_VF_ARQLEN1_ARQENABLE_MASK;
|
||||
if (!reg_val) {
|
||||
iavf_change_state(adapter, __IAVF_RESETTING);
|
||||
adapter->flags |= IAVF_FLAG_RESET_PENDING;
|
||||
adapter->aq_required = 0;
|
||||
adapter->current_op = VIRTCHNL_OP_UNKNOWN;
|
||||
|
||||
@@ -705,7 +705,7 @@ static int ice_ptp_adjfine(struct ptp_clock_info *info, long scaled_ppm)
|
||||
scaled_ppm = -scaled_ppm;
|
||||
}
|
||||
|
||||
while ((u64)scaled_ppm > div_u64(U64_MAX, incval)) {
|
||||
while ((u64)scaled_ppm > div64_u64(U64_MAX, incval)) {
|
||||
/* handle overflow by scaling down the scaled_ppm and
|
||||
* the divisor, losing some precision
|
||||
*/
|
||||
@@ -1540,19 +1540,16 @@ static void ice_ptp_tx_tstamp_work(struct kthread_work *work)
|
||||
if (err)
|
||||
continue;
|
||||
|
||||
/* Check if the timestamp is valid */
|
||||
if (!(raw_tstamp & ICE_PTP_TS_VALID))
|
||||
/* Check if the timestamp is invalid or stale */
|
||||
if (!(raw_tstamp & ICE_PTP_TS_VALID) ||
|
||||
raw_tstamp == tx->tstamps[idx].cached_tstamp)
|
||||
continue;
|
||||
|
||||
/* clear the timestamp register, so that it won't show valid
|
||||
* again when re-used.
|
||||
*/
|
||||
ice_clear_phy_tstamp(hw, tx->quad, phy_idx);
|
||||
|
||||
/* The timestamp is valid, so we'll go ahead and clear this
|
||||
* index and then send the timestamp up to the stack.
|
||||
*/
|
||||
spin_lock(&tx->lock);
|
||||
tx->tstamps[idx].cached_tstamp = raw_tstamp;
|
||||
clear_bit(idx, tx->in_use);
|
||||
skb = tx->tstamps[idx].skb;
|
||||
tx->tstamps[idx].skb = NULL;
|
||||
|
||||
@@ -55,15 +55,21 @@ struct ice_perout_channel {
|
||||
* struct ice_tx_tstamp - Tracking for a single Tx timestamp
|
||||
* @skb: pointer to the SKB for this timestamp request
|
||||
* @start: jiffies when the timestamp was first requested
|
||||
* @cached_tstamp: last read timestamp
|
||||
*
|
||||
* This structure tracks a single timestamp request. The SKB pointer is
|
||||
* provided when initiating a request. The start time is used to ensure that
|
||||
* we discard old requests that were not fulfilled within a 2 second time
|
||||
* window.
|
||||
* Timestamp values in the PHY are read only and do not get cleared except at
|
||||
* hardware reset or when a new timestamp value is captured. The cached_tstamp
|
||||
* field is used to detect the case where a new timestamp has not yet been
|
||||
* captured, ensuring that we avoid sending stale timestamp data to the stack.
|
||||
*/
|
||||
struct ice_tx_tstamp {
|
||||
struct sk_buff *skb;
|
||||
unsigned long start;
|
||||
u64 cached_tstamp;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -7648,6 +7648,20 @@ static int igb_set_vf_mac_filter(struct igb_adapter *adapter, const int vf,
|
||||
struct vf_mac_filter *entry = NULL;
|
||||
int ret = 0;
|
||||
|
||||
if ((vf_data->flags & IGB_VF_FLAG_PF_SET_MAC) &&
|
||||
!vf_data->trusted) {
|
||||
dev_warn(&pdev->dev,
|
||||
"VF %d requested MAC filter but is administratively denied\n",
|
||||
vf);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (!is_valid_ether_addr(addr)) {
|
||||
dev_warn(&pdev->dev,
|
||||
"VF %d attempted to set invalid MAC filter\n",
|
||||
vf);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
switch (info) {
|
||||
case E1000_VF_MAC_FILTER_CLR:
|
||||
/* remove all unicast MAC filters related to the current VF */
|
||||
@@ -7661,20 +7675,6 @@ static int igb_set_vf_mac_filter(struct igb_adapter *adapter, const int vf,
|
||||
}
|
||||
break;
|
||||
case E1000_VF_MAC_FILTER_ADD:
|
||||
if ((vf_data->flags & IGB_VF_FLAG_PF_SET_MAC) &&
|
||||
!vf_data->trusted) {
|
||||
dev_warn(&pdev->dev,
|
||||
"VF %d requested MAC filter but is administratively denied\n",
|
||||
vf);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (!is_valid_ether_addr(addr)) {
|
||||
dev_warn(&pdev->dev,
|
||||
"VF %d attempted to set invalid MAC filter\n",
|
||||
vf);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* try to find empty slot in the list */
|
||||
list_for_each(pos, &adapter->vf_macs.l) {
|
||||
entry = list_entry(pos, struct vf_mac_filter, l);
|
||||
|
||||
@@ -2859,6 +2859,7 @@ static int igbvf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
return 0;
|
||||
|
||||
err_hw_init:
|
||||
netif_napi_del(&adapter->rx_ring->napi);
|
||||
kfree(adapter->tx_ring);
|
||||
kfree(adapter->rx_ring);
|
||||
err_sw_init:
|
||||
|
||||
@@ -636,7 +636,7 @@ s32 igc_set_ltr_i225(struct igc_hw *hw, bool link)
|
||||
ltrv = rd32(IGC_LTRMAXV);
|
||||
if (ltr_max != (ltrv & IGC_LTRMAXV_LTRV_MASK)) {
|
||||
ltrv = IGC_LTRMAXV_LSNP_REQ | ltr_max |
|
||||
(scale_min << IGC_LTRMAXV_SCALE_SHIFT);
|
||||
(scale_max << IGC_LTRMAXV_SCALE_SHIFT);
|
||||
wr32(IGC_LTRMAXV, ltrv);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5531,6 +5531,10 @@ static int ixgbe_non_sfp_link_config(struct ixgbe_hw *hw)
|
||||
if (!speed && hw->mac.ops.get_link_capabilities) {
|
||||
ret = hw->mac.ops.get_link_capabilities(hw, &speed,
|
||||
&autoneg);
|
||||
/* remove NBASE-T speeds from default autonegotiation
|
||||
* to accommodate broken network switches in the field
|
||||
* which cannot cope with advertised NBASE-T speeds
|
||||
*/
|
||||
speed &= ~(IXGBE_LINK_SPEED_5GB_FULL |
|
||||
IXGBE_LINK_SPEED_2_5GB_FULL);
|
||||
}
|
||||
|
||||
@@ -3405,6 +3405,9 @@ static s32 ixgbe_reset_hw_X550em(struct ixgbe_hw *hw)
|
||||
/* flush pending Tx transactions */
|
||||
ixgbe_clear_tx_pending(hw);
|
||||
|
||||
/* set MDIO speed before talking to the PHY in case it's the 1st time */
|
||||
ixgbe_set_mdio_speed(hw);
|
||||
|
||||
/* PHY ops must be identified and initialized prior to reset */
|
||||
status = hw->phy.ops.init(hw);
|
||||
if (status == IXGBE_ERR_SFP_NOT_SUPPORTED ||
|
||||
|
||||
@@ -8494,7 +8494,8 @@ mlxsw_sp_rif_mac_profile_replace(struct mlxsw_sp *mlxsw_sp,
|
||||
u8 mac_profile;
|
||||
int err;
|
||||
|
||||
if (!mlxsw_sp_rif_mac_profile_is_shared(rif))
|
||||
if (!mlxsw_sp_rif_mac_profile_is_shared(rif) &&
|
||||
!mlxsw_sp_rif_mac_profile_find(mlxsw_sp, new_mac))
|
||||
return mlxsw_sp_rif_mac_profile_edit(rif, new_mac);
|
||||
|
||||
err = mlxsw_sp_rif_mac_profile_get(mlxsw_sp, new_mac,
|
||||
|
||||
@@ -609,6 +609,9 @@ static size_t ef100_update_stats(struct efx_nic *efx,
|
||||
ef100_common_stat_mask(mask);
|
||||
ef100_ethtool_stat_mask(mask);
|
||||
|
||||
if (!mc_stats)
|
||||
return 0;
|
||||
|
||||
efx_nic_copy_stats(efx, mc_stats);
|
||||
efx_nic_update_stats(ef100_stat_desc, EF100_STAT_COUNT, mask,
|
||||
stats, mc_stats, false);
|
||||
|
||||
@@ -33,6 +33,7 @@ struct rk_gmac_ops {
|
||||
void (*set_rgmii_speed)(struct rk_priv_data *bsp_priv, int speed);
|
||||
void (*set_rmii_speed)(struct rk_priv_data *bsp_priv, int speed);
|
||||
void (*integrated_phy_powerup)(struct rk_priv_data *bsp_priv);
|
||||
bool regs_valid;
|
||||
u32 regs[];
|
||||
};
|
||||
|
||||
@@ -1092,6 +1093,7 @@ static const struct rk_gmac_ops rk3568_ops = {
|
||||
.set_to_rmii = rk3568_set_to_rmii,
|
||||
.set_rgmii_speed = rk3568_set_gmac_speed,
|
||||
.set_rmii_speed = rk3568_set_gmac_speed,
|
||||
.regs_valid = true,
|
||||
.regs = {
|
||||
0xfe2a0000, /* gmac0 */
|
||||
0xfe010000, /* gmac1 */
|
||||
@@ -1383,7 +1385,7 @@ static struct rk_priv_data *rk_gmac_setup(struct platform_device *pdev,
|
||||
* to be distinguished.
|
||||
*/
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (res) {
|
||||
if (res && ops->regs_valid) {
|
||||
int i = 0;
|
||||
|
||||
while (ops->regs[i]) {
|
||||
|
||||
@@ -172,6 +172,19 @@ struct stmmac_flow_entry {
|
||||
int is_l4;
|
||||
};
|
||||
|
||||
/* Rx Frame Steering */
|
||||
enum stmmac_rfs_type {
|
||||
STMMAC_RFS_T_VLAN,
|
||||
STMMAC_RFS_T_MAX,
|
||||
};
|
||||
|
||||
struct stmmac_rfs_entry {
|
||||
unsigned long cookie;
|
||||
int in_use;
|
||||
int type;
|
||||
int tc;
|
||||
};
|
||||
|
||||
struct stmmac_priv {
|
||||
/* Frequently used values are kept adjacent for cache effect */
|
||||
u32 tx_coal_frames[MTL_MAX_TX_QUEUES];
|
||||
@@ -289,6 +302,10 @@ struct stmmac_priv {
|
||||
struct stmmac_tc_entry *tc_entries;
|
||||
unsigned int flow_entries_max;
|
||||
struct stmmac_flow_entry *flow_entries;
|
||||
unsigned int rfs_entries_max[STMMAC_RFS_T_MAX];
|
||||
unsigned int rfs_entries_cnt[STMMAC_RFS_T_MAX];
|
||||
unsigned int rfs_entries_total;
|
||||
struct stmmac_rfs_entry *rfs_entries;
|
||||
|
||||
/* Pulse Per Second output */
|
||||
struct stmmac_pps_cfg pps[STMMAC_PPS_MAX];
|
||||
|
||||
@@ -1461,16 +1461,20 @@ static int stmmac_init_rx_buffers(struct stmmac_priv *priv, struct dma_desc *p,
|
||||
{
|
||||
struct stmmac_rx_queue *rx_q = &priv->rx_queue[queue];
|
||||
struct stmmac_rx_buffer *buf = &rx_q->buf_pool[i];
|
||||
gfp_t gfp = (GFP_ATOMIC | __GFP_NOWARN);
|
||||
|
||||
if (priv->dma_cap.addr64 <= 32)
|
||||
gfp |= GFP_DMA32;
|
||||
|
||||
if (!buf->page) {
|
||||
buf->page = page_pool_dev_alloc_pages(rx_q->page_pool);
|
||||
buf->page = page_pool_alloc_pages(rx_q->page_pool, gfp);
|
||||
if (!buf->page)
|
||||
return -ENOMEM;
|
||||
buf->page_offset = stmmac_rx_offset(priv);
|
||||
}
|
||||
|
||||
if (priv->sph && !buf->sec_page) {
|
||||
buf->sec_page = page_pool_dev_alloc_pages(rx_q->page_pool);
|
||||
buf->sec_page = page_pool_alloc_pages(rx_q->page_pool, gfp);
|
||||
if (!buf->sec_page)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -4482,6 +4486,10 @@ static inline void stmmac_rx_refill(struct stmmac_priv *priv, u32 queue)
|
||||
struct stmmac_rx_queue *rx_q = &priv->rx_queue[queue];
|
||||
int dirty = stmmac_rx_dirty(priv, queue);
|
||||
unsigned int entry = rx_q->dirty_rx;
|
||||
gfp_t gfp = (GFP_ATOMIC | __GFP_NOWARN);
|
||||
|
||||
if (priv->dma_cap.addr64 <= 32)
|
||||
gfp |= GFP_DMA32;
|
||||
|
||||
while (dirty-- > 0) {
|
||||
struct stmmac_rx_buffer *buf = &rx_q->buf_pool[entry];
|
||||
@@ -4494,13 +4502,13 @@ static inline void stmmac_rx_refill(struct stmmac_priv *priv, u32 queue)
|
||||
p = rx_q->dma_rx + entry;
|
||||
|
||||
if (!buf->page) {
|
||||
buf->page = page_pool_dev_alloc_pages(rx_q->page_pool);
|
||||
buf->page = page_pool_alloc_pages(rx_q->page_pool, gfp);
|
||||
if (!buf->page)
|
||||
break;
|
||||
}
|
||||
|
||||
if (priv->sph && !buf->sec_page) {
|
||||
buf->sec_page = page_pool_dev_alloc_pages(rx_q->page_pool);
|
||||
buf->sec_page = page_pool_alloc_pages(rx_q->page_pool, gfp);
|
||||
if (!buf->sec_page)
|
||||
break;
|
||||
|
||||
|
||||
@@ -232,11 +232,33 @@ static int tc_setup_cls_u32(struct stmmac_priv *priv,
|
||||
}
|
||||
}
|
||||
|
||||
static int tc_rfs_init(struct stmmac_priv *priv)
|
||||
{
|
||||
int i;
|
||||
|
||||
priv->rfs_entries_max[STMMAC_RFS_T_VLAN] = 8;
|
||||
|
||||
for (i = 0; i < STMMAC_RFS_T_MAX; i++)
|
||||
priv->rfs_entries_total += priv->rfs_entries_max[i];
|
||||
|
||||
priv->rfs_entries = devm_kcalloc(priv->device,
|
||||
priv->rfs_entries_total,
|
||||
sizeof(*priv->rfs_entries),
|
||||
GFP_KERNEL);
|
||||
if (!priv->rfs_entries)
|
||||
return -ENOMEM;
|
||||
|
||||
dev_info(priv->device, "Enabled RFS Flow TC (entries=%d)\n",
|
||||
priv->rfs_entries_total);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tc_init(struct stmmac_priv *priv)
|
||||
{
|
||||
struct dma_features *dma_cap = &priv->dma_cap;
|
||||
unsigned int count;
|
||||
int i;
|
||||
int ret, i;
|
||||
|
||||
if (dma_cap->l3l4fnum) {
|
||||
priv->flow_entries_max = dma_cap->l3l4fnum;
|
||||
@@ -250,10 +272,14 @@ static int tc_init(struct stmmac_priv *priv)
|
||||
for (i = 0; i < priv->flow_entries_max; i++)
|
||||
priv->flow_entries[i].idx = i;
|
||||
|
||||
dev_info(priv->device, "Enabled Flow TC (entries=%d)\n",
|
||||
dev_info(priv->device, "Enabled L3L4 Flow TC (entries=%d)\n",
|
||||
priv->flow_entries_max);
|
||||
}
|
||||
|
||||
ret = tc_rfs_init(priv);
|
||||
if (ret)
|
||||
return -ENOMEM;
|
||||
|
||||
if (!priv->plat->fpe_cfg) {
|
||||
priv->plat->fpe_cfg = devm_kzalloc(priv->device,
|
||||
sizeof(*priv->plat->fpe_cfg),
|
||||
@@ -607,16 +633,45 @@ static int tc_del_flow(struct stmmac_priv *priv,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct stmmac_rfs_entry *tc_find_rfs(struct stmmac_priv *priv,
|
||||
struct flow_cls_offload *cls,
|
||||
bool get_free)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < priv->rfs_entries_total; i++) {
|
||||
struct stmmac_rfs_entry *entry = &priv->rfs_entries[i];
|
||||
|
||||
if (entry->cookie == cls->cookie)
|
||||
return entry;
|
||||
if (get_free && entry->in_use == false)
|
||||
return entry;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#define VLAN_PRIO_FULL_MASK (0x07)
|
||||
|
||||
static int tc_add_vlan_flow(struct stmmac_priv *priv,
|
||||
struct flow_cls_offload *cls)
|
||||
{
|
||||
struct stmmac_rfs_entry *entry = tc_find_rfs(priv, cls, false);
|
||||
struct flow_rule *rule = flow_cls_offload_flow_rule(cls);
|
||||
struct flow_dissector *dissector = rule->match.dissector;
|
||||
int tc = tc_classid_to_hwtc(priv->dev, cls->classid);
|
||||
struct flow_match_vlan match;
|
||||
|
||||
if (!entry) {
|
||||
entry = tc_find_rfs(priv, cls, true);
|
||||
if (!entry)
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
if (priv->rfs_entries_cnt[STMMAC_RFS_T_VLAN] >=
|
||||
priv->rfs_entries_max[STMMAC_RFS_T_VLAN])
|
||||
return -ENOENT;
|
||||
|
||||
/* Nothing to do here */
|
||||
if (!dissector_uses_key(dissector, FLOW_DISSECTOR_KEY_VLAN))
|
||||
return -EINVAL;
|
||||
@@ -638,6 +693,12 @@ static int tc_add_vlan_flow(struct stmmac_priv *priv,
|
||||
|
||||
prio = BIT(match.key->vlan_priority);
|
||||
stmmac_rx_queue_prio(priv, priv->hw, prio, tc);
|
||||
|
||||
entry->in_use = true;
|
||||
entry->cookie = cls->cookie;
|
||||
entry->tc = tc;
|
||||
entry->type = STMMAC_RFS_T_VLAN;
|
||||
priv->rfs_entries_cnt[STMMAC_RFS_T_VLAN]++;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -646,20 +707,19 @@ static int tc_add_vlan_flow(struct stmmac_priv *priv,
|
||||
static int tc_del_vlan_flow(struct stmmac_priv *priv,
|
||||
struct flow_cls_offload *cls)
|
||||
{
|
||||
struct flow_rule *rule = flow_cls_offload_flow_rule(cls);
|
||||
struct flow_dissector *dissector = rule->match.dissector;
|
||||
int tc = tc_classid_to_hwtc(priv->dev, cls->classid);
|
||||
struct stmmac_rfs_entry *entry = tc_find_rfs(priv, cls, false);
|
||||
|
||||
/* Nothing to do here */
|
||||
if (!dissector_uses_key(dissector, FLOW_DISSECTOR_KEY_VLAN))
|
||||
return -EINVAL;
|
||||
if (!entry || !entry->in_use || entry->type != STMMAC_RFS_T_VLAN)
|
||||
return -ENOENT;
|
||||
|
||||
if (tc < 0) {
|
||||
netdev_err(priv->dev, "Invalid traffic class\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
stmmac_rx_queue_prio(priv, priv->hw, 0, entry->tc);
|
||||
|
||||
stmmac_rx_queue_prio(priv, priv->hw, 0, tc);
|
||||
entry->in_use = false;
|
||||
entry->cookie = 0;
|
||||
entry->tc = 0;
|
||||
entry->type = 0;
|
||||
|
||||
priv->rfs_entries_cnt[STMMAC_RFS_T_VLAN]--;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1844,13 +1844,14 @@ static int am65_cpsw_nuss_init_slave_ports(struct am65_cpsw_common *common)
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "%pOF error reading port_id %d\n",
|
||||
port_np, ret);
|
||||
return ret;
|
||||
goto of_node_put;
|
||||
}
|
||||
|
||||
if (!port_id || port_id > common->port_num) {
|
||||
dev_err(dev, "%pOF has invalid port_id %u %s\n",
|
||||
port_np, port_id, port_np->name);
|
||||
return -EINVAL;
|
||||
ret = -EINVAL;
|
||||
goto of_node_put;
|
||||
}
|
||||
|
||||
port = am65_common_get_port(common, port_id);
|
||||
@@ -1866,8 +1867,10 @@ static int am65_cpsw_nuss_init_slave_ports(struct am65_cpsw_common *common)
|
||||
(AM65_CPSW_NU_FRAM_PORT_OFFSET * (port_id - 1));
|
||||
|
||||
port->slave.mac_sl = cpsw_sl_get("am65", dev, port->port_base);
|
||||
if (IS_ERR(port->slave.mac_sl))
|
||||
return PTR_ERR(port->slave.mac_sl);
|
||||
if (IS_ERR(port->slave.mac_sl)) {
|
||||
ret = PTR_ERR(port->slave.mac_sl);
|
||||
goto of_node_put;
|
||||
}
|
||||
|
||||
port->disabled = !of_device_is_available(port_np);
|
||||
if (port->disabled) {
|
||||
@@ -1880,7 +1883,7 @@ static int am65_cpsw_nuss_init_slave_ports(struct am65_cpsw_common *common)
|
||||
ret = PTR_ERR(port->slave.ifphy);
|
||||
dev_err(dev, "%pOF error retrieving port phy: %d\n",
|
||||
port_np, ret);
|
||||
return ret;
|
||||
goto of_node_put;
|
||||
}
|
||||
|
||||
port->slave.mac_only =
|
||||
@@ -1889,10 +1892,12 @@ static int am65_cpsw_nuss_init_slave_ports(struct am65_cpsw_common *common)
|
||||
/* get phy/link info */
|
||||
if (of_phy_is_fixed_link(port_np)) {
|
||||
ret = of_phy_register_fixed_link(port_np);
|
||||
if (ret)
|
||||
return dev_err_probe(dev, ret,
|
||||
if (ret) {
|
||||
ret = dev_err_probe(dev, ret,
|
||||
"failed to register fixed-link phy %pOF\n",
|
||||
port_np);
|
||||
goto of_node_put;
|
||||
}
|
||||
port->slave.phy_node = of_node_get(port_np);
|
||||
} else {
|
||||
port->slave.phy_node =
|
||||
@@ -1902,14 +1907,15 @@ static int am65_cpsw_nuss_init_slave_ports(struct am65_cpsw_common *common)
|
||||
if (!port->slave.phy_node) {
|
||||
dev_err(dev,
|
||||
"slave[%d] no phy found\n", port_id);
|
||||
return -ENODEV;
|
||||
ret = -ENODEV;
|
||||
goto of_node_put;
|
||||
}
|
||||
|
||||
ret = of_get_phy_mode(port_np, &port->slave.phy_if);
|
||||
if (ret) {
|
||||
dev_err(dev, "%pOF read phy-mode err %d\n",
|
||||
port_np, ret);
|
||||
return ret;
|
||||
goto of_node_put;
|
||||
}
|
||||
|
||||
ret = of_get_mac_address(port_np, port->slave.mac_addr);
|
||||
@@ -1932,6 +1938,11 @@ static int am65_cpsw_nuss_init_slave_ports(struct am65_cpsw_common *common)
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
of_node_put:
|
||||
of_node_put(port_np);
|
||||
of_node_put(node);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void am65_cpsw_pcpu_stats_free(void *data)
|
||||
|
||||
@@ -514,6 +514,7 @@ nsim_bpf_map_alloc(struct netdevsim *ns, struct bpf_offloaded_map *offmap)
|
||||
goto err_free;
|
||||
key = nmap->entry[i].key;
|
||||
*key = i;
|
||||
memset(nmap->entry[i].value, 0, offmap->map.value_size);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,10 @@ static int nsim_set_ringparam(struct net_device *dev,
|
||||
{
|
||||
struct netdevsim *ns = netdev_priv(dev);
|
||||
|
||||
memcpy(&ns->ethtool.ring, ring, sizeof(ns->ethtool.ring));
|
||||
ns->ethtool.ring.rx_pending = ring->rx_pending;
|
||||
ns->ethtool.ring.rx_jumbo_pending = ring->rx_jumbo_pending;
|
||||
ns->ethtool.ring.rx_mini_pending = ring->rx_mini_pending;
|
||||
ns->ethtool.ring.tx_pending = ring->tx_pending;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -460,6 +460,9 @@ static void of_mdiobus_link_mdiodev(struct mii_bus *bus,
|
||||
|
||||
if (addr == mdiodev->addr) {
|
||||
device_set_node(dev, of_fwnode_handle(child));
|
||||
/* The refcount on "child" is passed to the mdio
|
||||
* device. Do _not_ use of_node_put(child) here.
|
||||
*/
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,6 +76,8 @@
|
||||
#define LAN7801_USB_PRODUCT_ID (0x7801)
|
||||
#define LAN78XX_EEPROM_MAGIC (0x78A5)
|
||||
#define LAN78XX_OTP_MAGIC (0x78F3)
|
||||
#define AT29M2AF_USB_VENDOR_ID (0x07C9)
|
||||
#define AT29M2AF_USB_PRODUCT_ID (0x0012)
|
||||
|
||||
#define MII_READ 1
|
||||
#define MII_WRITE 0
|
||||
@@ -4734,6 +4736,10 @@ static const struct usb_device_id products[] = {
|
||||
/* LAN7801 USB Gigabit Ethernet Device */
|
||||
USB_DEVICE(LAN78XX_USB_VENDOR_ID, LAN7801_USB_PRODUCT_ID),
|
||||
},
|
||||
{
|
||||
/* ATM2-AF USB Gigabit Ethernet Device */
|
||||
USB_DEVICE(AT29M2AF_USB_VENDOR_ID, AT29M2AF_USB_PRODUCT_ID),
|
||||
},
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(usb, products);
|
||||
|
||||
@@ -1358,6 +1358,7 @@ static const struct usb_device_id products[] = {
|
||||
{QMI_QUIRK_SET_DTR(0x1bc7, 0x1040, 2)}, /* Telit LE922A */
|
||||
{QMI_QUIRK_SET_DTR(0x1bc7, 0x1050, 2)}, /* Telit FN980 */
|
||||
{QMI_QUIRK_SET_DTR(0x1bc7, 0x1060, 2)}, /* Telit LN920 */
|
||||
{QMI_QUIRK_SET_DTR(0x1bc7, 0x1070, 2)}, /* Telit FN990 */
|
||||
{QMI_FIXED_INTF(0x1bc7, 0x1100, 3)}, /* Telit ME910 */
|
||||
{QMI_FIXED_INTF(0x1bc7, 0x1101, 3)}, /* Telit ME910 dual modem */
|
||||
{QMI_FIXED_INTF(0x1bc7, 0x1200, 5)}, /* Telit LE920 */
|
||||
|
||||
@@ -733,7 +733,7 @@ static struct sk_buff *receive_small(struct net_device *dev,
|
||||
pr_debug("%s: rx error: len %u exceeds max size %d\n",
|
||||
dev->name, len, GOOD_PACKET_LEN);
|
||||
dev->stats.rx_length_errors++;
|
||||
goto err_len;
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (likely(!vi->xdp_enabled)) {
|
||||
@@ -825,10 +825,8 @@ static struct sk_buff *receive_small(struct net_device *dev,
|
||||
|
||||
skip_xdp:
|
||||
skb = build_skb(buf, buflen);
|
||||
if (!skb) {
|
||||
put_page(page);
|
||||
if (!skb)
|
||||
goto err;
|
||||
}
|
||||
skb_reserve(skb, headroom - delta);
|
||||
skb_put(skb, len);
|
||||
if (!xdp_prog) {
|
||||
@@ -839,13 +837,12 @@ skip_xdp:
|
||||
if (metasize)
|
||||
skb_metadata_set(skb, metasize);
|
||||
|
||||
err:
|
||||
return skb;
|
||||
|
||||
err_xdp:
|
||||
rcu_read_unlock();
|
||||
stats->xdp_drops++;
|
||||
err_len:
|
||||
err:
|
||||
stats->drops++;
|
||||
put_page(page);
|
||||
xdp_xmit:
|
||||
|
||||
@@ -7,16 +7,20 @@ config BRCMSMAC
|
||||
depends on MAC80211
|
||||
depends on BCMA_POSSIBLE
|
||||
select BCMA
|
||||
select NEW_LEDS if BCMA_DRIVER_GPIO
|
||||
select LEDS_CLASS if BCMA_DRIVER_GPIO
|
||||
select BRCMUTIL
|
||||
select FW_LOADER
|
||||
select CORDIC
|
||||
help
|
||||
This module adds support for PCIe wireless adapters based on Broadcom
|
||||
IEEE802.11n SoftMAC chipsets. It also has WLAN led support, which will
|
||||
be available if you select BCMA_DRIVER_GPIO. If you choose to build a
|
||||
module, the driver will be called brcmsmac.ko.
|
||||
IEEE802.11n SoftMAC chipsets. If you choose to build a module, the
|
||||
driver will be called brcmsmac.ko.
|
||||
|
||||
config BRCMSMAC_LEDS
|
||||
def_bool BRCMSMAC && BCMA_DRIVER_GPIO && MAC80211_LEDS
|
||||
help
|
||||
The brcmsmac LED support depends on the presence of the
|
||||
BCMA_DRIVER_GPIO driver, and it only works if LED support
|
||||
is enabled and reachable from the driver module.
|
||||
|
||||
source "drivers/net/wireless/broadcom/brcm80211/brcmfmac/Kconfig"
|
||||
|
||||
|
||||
@@ -42,6 +42,6 @@ brcmsmac-y := \
|
||||
brcms_trace_events.o \
|
||||
debug.o
|
||||
|
||||
brcmsmac-$(CONFIG_BCMA_DRIVER_GPIO) += led.o
|
||||
brcmsmac-$(CONFIG_BRCMSMAC_LEDS) += led.o
|
||||
|
||||
obj-$(CONFIG_BRCMSMAC) += brcmsmac.o
|
||||
|
||||
@@ -24,7 +24,7 @@ struct brcms_led {
|
||||
struct gpio_desc *gpiod;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_BCMA_DRIVER_GPIO
|
||||
#ifdef CONFIG_BRCMSMAC_LEDS
|
||||
void brcms_led_unregister(struct brcms_info *wl);
|
||||
int brcms_led_register(struct brcms_info *wl);
|
||||
#else
|
||||
|
||||
@@ -2,14 +2,13 @@
|
||||
config IWLEGACY
|
||||
tristate
|
||||
select FW_LOADER
|
||||
select NEW_LEDS
|
||||
select LEDS_CLASS
|
||||
select LEDS_TRIGGERS
|
||||
select MAC80211_LEDS
|
||||
|
||||
config IWL4965
|
||||
tristate "Intel Wireless WiFi 4965AGN (iwl4965)"
|
||||
depends on PCI && MAC80211
|
||||
depends on LEDS_CLASS=y || LEDS_CLASS=MAC80211
|
||||
select IWLEGACY
|
||||
help
|
||||
This option enables support for
|
||||
@@ -38,6 +37,7 @@ config IWL4965
|
||||
config IWL3945
|
||||
tristate "Intel PRO/Wireless 3945ABG/BG Network Connection (iwl3945)"
|
||||
depends on PCI && MAC80211
|
||||
depends on LEDS_CLASS=y || LEDS_CLASS=MAC80211
|
||||
select IWLEGACY
|
||||
help
|
||||
Select to build the driver supporting the:
|
||||
|
||||
@@ -47,7 +47,7 @@ if IWLWIFI
|
||||
|
||||
config IWLWIFI_LEDS
|
||||
bool
|
||||
depends on LEDS_CLASS=y || LEDS_CLASS=IWLWIFI
|
||||
depends on LEDS_CLASS=y || LEDS_CLASS=MAC80211
|
||||
depends on IWLMVM || IWLDVM
|
||||
select LEDS_TRIGGERS
|
||||
select MAC80211_LEDS
|
||||
|
||||
@@ -269,17 +269,18 @@ static u32 iwl_mvm_get_tx_rate(struct iwl_mvm *mvm,
|
||||
u8 rate_plcp;
|
||||
u32 rate_flags = 0;
|
||||
bool is_cck;
|
||||
struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta);
|
||||
|
||||
/* info->control is only relevant for non HW rate control */
|
||||
if (!ieee80211_hw_check(mvm->hw, HAS_RATE_CONTROL)) {
|
||||
struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta);
|
||||
|
||||
/* HT rate doesn't make sense for a non data frame */
|
||||
WARN_ONCE(info->control.rates[0].flags & IEEE80211_TX_RC_MCS &&
|
||||
!ieee80211_is_data(fc),
|
||||
"Got a HT rate (flags:0x%x/mcs:%d/fc:0x%x/state:%d) for a non data frame\n",
|
||||
info->control.rates[0].flags,
|
||||
info->control.rates[0].idx,
|
||||
le16_to_cpu(fc), mvmsta->sta_state);
|
||||
le16_to_cpu(fc), sta ? mvmsta->sta_state : -1);
|
||||
|
||||
rate_idx = info->control.rates[0].idx;
|
||||
}
|
||||
|
||||
@@ -34,4 +34,4 @@ obj-$(CONFIG_MT76x2_COMMON) += mt76x2/
|
||||
obj-$(CONFIG_MT7603E) += mt7603/
|
||||
obj-$(CONFIG_MT7615_COMMON) += mt7615/
|
||||
obj-$(CONFIG_MT7915E) += mt7915/
|
||||
obj-$(CONFIG_MT7921E) += mt7921/
|
||||
obj-$(CONFIG_MT7921_COMMON) += mt7921/
|
||||
|
||||
@@ -332,8 +332,8 @@ config PCIE_APPLE
|
||||
If unsure, say Y if you have an Apple Silicon system.
|
||||
|
||||
config PCIE_MT7621
|
||||
tristate "MediaTek MT7621 PCIe Controller"
|
||||
depends on (RALINK && SOC_MT7621) || (MIPS && COMPILE_TEST)
|
||||
bool "MediaTek MT7621 PCIe Controller"
|
||||
depends on SOC_MT7621 || (MIPS && COMPILE_TEST)
|
||||
select PHY_MT7621_PCI
|
||||
default SOC_MT7621
|
||||
help
|
||||
|
||||
@@ -20,7 +20,6 @@ static int tegra_bpmp_reset_common(struct reset_controller_dev *rstc,
|
||||
struct tegra_bpmp *bpmp = to_tegra_bpmp(rstc);
|
||||
struct mrq_reset_request request;
|
||||
struct tegra_bpmp_message msg;
|
||||
int err;
|
||||
|
||||
memset(&request, 0, sizeof(request));
|
||||
request.cmd = command;
|
||||
@@ -31,13 +30,7 @@ static int tegra_bpmp_reset_common(struct reset_controller_dev *rstc,
|
||||
msg.tx.data = &request;
|
||||
msg.tx.size = sizeof(request);
|
||||
|
||||
err = tegra_bpmp_transfer(bpmp, &msg);
|
||||
if (err)
|
||||
return err;
|
||||
if (msg.rx.ret)
|
||||
return -EINVAL;
|
||||
|
||||
return 0;
|
||||
return tegra_bpmp_transfer(bpmp, &msg);
|
||||
}
|
||||
|
||||
static int tegra_bpmp_reset_module(struct reset_controller_dev *rstc,
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
#define BLK_SFT_RSTN 0x0
|
||||
#define BLK_CLK_EN 0x4
|
||||
#define BLK_MIPI_RESET_DIV 0x8 /* Mini/Nano DISPLAY_BLK_CTRL only */
|
||||
|
||||
struct imx8m_blk_ctrl_domain;
|
||||
|
||||
@@ -36,6 +37,15 @@ struct imx8m_blk_ctrl_domain_data {
|
||||
const char *gpc_name;
|
||||
u32 rst_mask;
|
||||
u32 clk_mask;
|
||||
|
||||
/*
|
||||
* i.MX8M Mini and Nano have a third DISPLAY_BLK_CTRL register
|
||||
* which is used to control the reset for the MIPI Phy.
|
||||
* Since it's only present in certain circumstances,
|
||||
* an if-statement should be used before setting and clearing this
|
||||
* register.
|
||||
*/
|
||||
u32 mipi_phy_rst_mask;
|
||||
};
|
||||
|
||||
#define DOMAIN_MAX_CLKS 3
|
||||
@@ -78,6 +88,8 @@ static int imx8m_blk_ctrl_power_on(struct generic_pm_domain *genpd)
|
||||
|
||||
/* put devices into reset */
|
||||
regmap_clear_bits(bc->regmap, BLK_SFT_RSTN, data->rst_mask);
|
||||
if (data->mipi_phy_rst_mask)
|
||||
regmap_clear_bits(bc->regmap, BLK_MIPI_RESET_DIV, data->mipi_phy_rst_mask);
|
||||
|
||||
/* enable upstream and blk-ctrl clocks to allow reset to propagate */
|
||||
ret = clk_bulk_prepare_enable(data->num_clks, domain->clks);
|
||||
@@ -99,6 +111,8 @@ static int imx8m_blk_ctrl_power_on(struct generic_pm_domain *genpd)
|
||||
|
||||
/* release reset */
|
||||
regmap_set_bits(bc->regmap, BLK_SFT_RSTN, data->rst_mask);
|
||||
if (data->mipi_phy_rst_mask)
|
||||
regmap_set_bits(bc->regmap, BLK_MIPI_RESET_DIV, data->mipi_phy_rst_mask);
|
||||
|
||||
/* disable upstream clocks */
|
||||
clk_bulk_disable_unprepare(data->num_clks, domain->clks);
|
||||
@@ -120,6 +134,9 @@ static int imx8m_blk_ctrl_power_off(struct generic_pm_domain *genpd)
|
||||
struct imx8m_blk_ctrl *bc = domain->bc;
|
||||
|
||||
/* put devices into reset and disable clocks */
|
||||
if (data->mipi_phy_rst_mask)
|
||||
regmap_clear_bits(bc->regmap, BLK_MIPI_RESET_DIV, data->mipi_phy_rst_mask);
|
||||
|
||||
regmap_clear_bits(bc->regmap, BLK_SFT_RSTN, data->rst_mask);
|
||||
regmap_clear_bits(bc->regmap, BLK_CLK_EN, data->clk_mask);
|
||||
|
||||
@@ -480,6 +497,7 @@ static const struct imx8m_blk_ctrl_domain_data imx8mm_disp_blk_ctl_domain_data[]
|
||||
.gpc_name = "mipi-dsi",
|
||||
.rst_mask = BIT(5),
|
||||
.clk_mask = BIT(8) | BIT(9),
|
||||
.mipi_phy_rst_mask = BIT(17),
|
||||
},
|
||||
[IMX8MM_DISPBLK_PD_MIPI_CSI] = {
|
||||
.name = "dispblk-mipi-csi",
|
||||
@@ -488,6 +506,7 @@ static const struct imx8m_blk_ctrl_domain_data imx8mm_disp_blk_ctl_domain_data[]
|
||||
.gpc_name = "mipi-csi",
|
||||
.rst_mask = BIT(3) | BIT(4),
|
||||
.clk_mask = BIT(10) | BIT(11),
|
||||
.mipi_phy_rst_mask = BIT(16),
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -36,6 +36,10 @@ static int __init imx_soc_device_init(void)
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
/* Return early if this is running on devices with different SoCs */
|
||||
if (!__mxc_cpu_type)
|
||||
return 0;
|
||||
|
||||
if (of_machine_is_compatible("fsl,ls1021a"))
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -320,7 +320,7 @@ static struct platform_driver tegra_fuse_driver = {
|
||||
};
|
||||
builtin_platform_driver(tegra_fuse_driver);
|
||||
|
||||
bool __init tegra_fuse_read_spare(unsigned int spare)
|
||||
u32 __init tegra_fuse_read_spare(unsigned int spare)
|
||||
{
|
||||
unsigned int offset = fuse->soc->info->spare + spare * 4;
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ struct tegra_fuse {
|
||||
void tegra_init_revision(void);
|
||||
void tegra_init_apbmisc(void);
|
||||
|
||||
bool __init tegra_fuse_read_spare(unsigned int spare);
|
||||
u32 __init tegra_fuse_read_spare(unsigned int spare);
|
||||
u32 __init tegra_fuse_read_early(unsigned int offset);
|
||||
|
||||
u8 tegra_get_major_rev(void);
|
||||
|
||||
@@ -203,9 +203,8 @@ static int copy_ta_binary(struct tee_context *ctx, void *ptr, void **ta,
|
||||
|
||||
*ta_size = roundup(fw->size, PAGE_SIZE);
|
||||
*ta = (void *)__get_free_pages(GFP_KERNEL, get_order(*ta_size));
|
||||
if (IS_ERR(*ta)) {
|
||||
pr_err("%s: get_free_pages failed 0x%llx\n", __func__,
|
||||
(u64)*ta);
|
||||
if (!*ta) {
|
||||
pr_err("%s: get_free_pages failed\n", __func__);
|
||||
rc = -ENOMEM;
|
||||
goto rel_fw;
|
||||
}
|
||||
|
||||
@@ -404,7 +404,8 @@ static int vdpa_mgmtdev_fill(const struct vdpa_mgmt_dev *mdev, struct sk_buff *m
|
||||
goto msg_err;
|
||||
|
||||
while (mdev->id_table[i].device) {
|
||||
supported_classes |= BIT(mdev->id_table[i].device);
|
||||
if (mdev->id_table[i].device <= 63)
|
||||
supported_classes |= BIT_ULL(mdev->id_table[i].device);
|
||||
i++;
|
||||
}
|
||||
|
||||
|
||||
@@ -655,7 +655,8 @@ static void vduse_vdpa_get_config(struct vdpa_device *vdpa, unsigned int offset,
|
||||
{
|
||||
struct vduse_dev *dev = vdpa_to_vduse(vdpa);
|
||||
|
||||
if (len > dev->config_size - offset)
|
||||
if (offset > dev->config_size ||
|
||||
len > dev->config_size - offset)
|
||||
return;
|
||||
|
||||
memcpy(buf, dev->config + offset, len);
|
||||
@@ -975,7 +976,8 @@ static long vduse_dev_ioctl(struct file *file, unsigned int cmd,
|
||||
break;
|
||||
|
||||
ret = -EINVAL;
|
||||
if (config.length == 0 ||
|
||||
if (config.offset > dev->config_size ||
|
||||
config.length == 0 ||
|
||||
config.length > dev->config_size - config.offset)
|
||||
break;
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@ static int vhost_vdpa_config_validate(struct vhost_vdpa *v,
|
||||
struct vdpa_device *vdpa = v->vdpa;
|
||||
long size = vdpa->config->get_config_size(vdpa);
|
||||
|
||||
if (c->len == 0)
|
||||
if (c->len == 0 || c->off > size)
|
||||
return -EINVAL;
|
||||
|
||||
if (c->len > size - c->off)
|
||||
|
||||
@@ -268,7 +268,7 @@ size_t virtio_max_dma_size(struct virtio_device *vdev)
|
||||
size_t max_segment_size = SIZE_MAX;
|
||||
|
||||
if (vring_use_dma_api(vdev))
|
||||
max_segment_size = dma_max_mapping_size(&vdev->dev);
|
||||
max_segment_size = dma_max_mapping_size(vdev->dev.parent);
|
||||
|
||||
return max_segment_size;
|
||||
}
|
||||
|
||||
@@ -514,8 +514,9 @@ static void afs_add_open_mmap(struct afs_vnode *vnode)
|
||||
if (atomic_inc_return(&vnode->cb_nr_mmap) == 1) {
|
||||
down_write(&vnode->volume->cell->fs_open_mmaps_lock);
|
||||
|
||||
list_add_tail(&vnode->cb_mmap_link,
|
||||
&vnode->volume->cell->fs_open_mmaps);
|
||||
if (list_empty(&vnode->cb_mmap_link))
|
||||
list_add_tail(&vnode->cb_mmap_link,
|
||||
&vnode->volume->cell->fs_open_mmaps);
|
||||
|
||||
up_write(&vnode->volume->cell->fs_open_mmaps_lock);
|
||||
}
|
||||
|
||||
@@ -667,6 +667,7 @@ static void afs_i_init_once(void *_vnode)
|
||||
INIT_LIST_HEAD(&vnode->pending_locks);
|
||||
INIT_LIST_HEAD(&vnode->granted_locks);
|
||||
INIT_DELAYED_WORK(&vnode->lock_work, afs_lock_work);
|
||||
INIT_LIST_HEAD(&vnode->cb_mmap_link);
|
||||
seqlock_init(&vnode->cb_lock);
|
||||
}
|
||||
|
||||
|
||||
@@ -4350,7 +4350,7 @@ void ceph_get_fmode(struct ceph_inode_info *ci, int fmode, int count)
|
||||
{
|
||||
struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(ci->vfs_inode.i_sb);
|
||||
int bits = (fmode << 1) | 1;
|
||||
bool is_opened = false;
|
||||
bool already_opened = false;
|
||||
int i;
|
||||
|
||||
if (count == 1)
|
||||
@@ -4358,19 +4358,19 @@ void ceph_get_fmode(struct ceph_inode_info *ci, int fmode, int count)
|
||||
|
||||
spin_lock(&ci->i_ceph_lock);
|
||||
for (i = 0; i < CEPH_FILE_MODE_BITS; i++) {
|
||||
if (bits & (1 << i))
|
||||
ci->i_nr_by_mode[i] += count;
|
||||
|
||||
/*
|
||||
* If any of the mode ref is larger than 1,
|
||||
* If any of the mode ref is larger than 0,
|
||||
* that means it has been already opened by
|
||||
* others. Just skip checking the PIN ref.
|
||||
*/
|
||||
if (i && ci->i_nr_by_mode[i] > 1)
|
||||
is_opened = true;
|
||||
if (i && ci->i_nr_by_mode[i])
|
||||
already_opened = true;
|
||||
|
||||
if (bits & (1 << i))
|
||||
ci->i_nr_by_mode[i] += count;
|
||||
}
|
||||
|
||||
if (!is_opened)
|
||||
if (!already_opened)
|
||||
percpu_counter_inc(&mdsc->metric.opened_inodes);
|
||||
spin_unlock(&ci->i_ceph_lock);
|
||||
}
|
||||
|
||||
@@ -605,13 +605,25 @@ static int ceph_finish_async_create(struct inode *dir, struct dentry *dentry,
|
||||
in.cap.realm = cpu_to_le64(ci->i_snap_realm->ino);
|
||||
in.cap.flags = CEPH_CAP_FLAG_AUTH;
|
||||
in.ctime = in.mtime = in.atime = iinfo.btime;
|
||||
in.mode = cpu_to_le32((u32)mode);
|
||||
in.truncate_seq = cpu_to_le32(1);
|
||||
in.truncate_size = cpu_to_le64(-1ULL);
|
||||
in.xattr_version = cpu_to_le64(1);
|
||||
in.uid = cpu_to_le32(from_kuid(&init_user_ns, current_fsuid()));
|
||||
in.gid = cpu_to_le32(from_kgid(&init_user_ns, dir->i_mode & S_ISGID ?
|
||||
dir->i_gid : current_fsgid()));
|
||||
if (dir->i_mode & S_ISGID) {
|
||||
in.gid = cpu_to_le32(from_kgid(&init_user_ns, dir->i_gid));
|
||||
|
||||
/* Directories always inherit the setgid bit. */
|
||||
if (S_ISDIR(mode))
|
||||
mode |= S_ISGID;
|
||||
else if ((mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP) &&
|
||||
!in_group_p(dir->i_gid) &&
|
||||
!capable_wrt_inode_uidgid(&init_user_ns, dir, CAP_FSETID))
|
||||
mode &= ~S_ISGID;
|
||||
} else {
|
||||
in.gid = cpu_to_le32(from_kgid(&init_user_ns, current_fsgid()));
|
||||
}
|
||||
in.mode = cpu_to_le32((u32)mode);
|
||||
|
||||
in.nlink = cpu_to_le32(1);
|
||||
in.max_size = cpu_to_le64(lo->stripe_unit);
|
||||
|
||||
@@ -847,7 +859,7 @@ static ssize_t ceph_sync_read(struct kiocb *iocb, struct iov_iter *to,
|
||||
ssize_t ret;
|
||||
u64 off = iocb->ki_pos;
|
||||
u64 len = iov_iter_count(to);
|
||||
u64 i_size;
|
||||
u64 i_size = i_size_read(inode);
|
||||
|
||||
dout("sync_read on file %p %llu~%u %s\n", file, off, (unsigned)len,
|
||||
(file->f_flags & O_DIRECT) ? "O_DIRECT" : "");
|
||||
|
||||
@@ -3683,7 +3683,7 @@ static int reconnect_caps_cb(struct inode *inode, struct ceph_cap *cap,
|
||||
struct ceph_pagelist *pagelist = recon_state->pagelist;
|
||||
struct dentry *dentry;
|
||||
char *path;
|
||||
int pathlen, err;
|
||||
int pathlen = 0, err;
|
||||
u64 pathbase;
|
||||
u64 snap_follows;
|
||||
|
||||
@@ -3703,7 +3703,6 @@ static int reconnect_caps_cb(struct inode *inode, struct ceph_cap *cap,
|
||||
}
|
||||
} else {
|
||||
path = NULL;
|
||||
pathlen = 0;
|
||||
pathbase = 0;
|
||||
}
|
||||
|
||||
|
||||
72
fs/file.c
72
fs/file.c
@@ -841,28 +841,68 @@ void do_close_on_exec(struct files_struct *files)
|
||||
spin_unlock(&files->file_lock);
|
||||
}
|
||||
|
||||
static inline struct file *__fget_files_rcu(struct files_struct *files,
|
||||
unsigned int fd, fmode_t mask, unsigned int refs)
|
||||
{
|
||||
for (;;) {
|
||||
struct file *file;
|
||||
struct fdtable *fdt = rcu_dereference_raw(files->fdt);
|
||||
struct file __rcu **fdentry;
|
||||
|
||||
if (unlikely(fd >= fdt->max_fds))
|
||||
return NULL;
|
||||
|
||||
fdentry = fdt->fd + array_index_nospec(fd, fdt->max_fds);
|
||||
file = rcu_dereference_raw(*fdentry);
|
||||
if (unlikely(!file))
|
||||
return NULL;
|
||||
|
||||
if (unlikely(file->f_mode & mask))
|
||||
return NULL;
|
||||
|
||||
/*
|
||||
* Ok, we have a file pointer. However, because we do
|
||||
* this all locklessly under RCU, we may be racing with
|
||||
* that file being closed.
|
||||
*
|
||||
* Such a race can take two forms:
|
||||
*
|
||||
* (a) the file ref already went down to zero,
|
||||
* and get_file_rcu_many() fails. Just try
|
||||
* again:
|
||||
*/
|
||||
if (unlikely(!get_file_rcu_many(file, refs)))
|
||||
continue;
|
||||
|
||||
/*
|
||||
* (b) the file table entry has changed under us.
|
||||
* Note that we don't need to re-check the 'fdt->fd'
|
||||
* pointer having changed, because it always goes
|
||||
* hand-in-hand with 'fdt'.
|
||||
*
|
||||
* If so, we need to put our refs and try again.
|
||||
*/
|
||||
if (unlikely(rcu_dereference_raw(files->fdt) != fdt) ||
|
||||
unlikely(rcu_dereference_raw(*fdentry) != file)) {
|
||||
fput_many(file, refs);
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* Ok, we have a ref to the file, and checked that it
|
||||
* still exists.
|
||||
*/
|
||||
return file;
|
||||
}
|
||||
}
|
||||
|
||||
static struct file *__fget_files(struct files_struct *files, unsigned int fd,
|
||||
fmode_t mask, unsigned int refs)
|
||||
{
|
||||
struct file *file;
|
||||
|
||||
rcu_read_lock();
|
||||
loop:
|
||||
file = files_lookup_fd_rcu(files, fd);
|
||||
if (file) {
|
||||
/* File object ref couldn't be taken.
|
||||
* dup2() atomicity guarantee is the reason
|
||||
* we loop to catch the new file (or NULL pointer)
|
||||
*/
|
||||
if (file->f_mode & mask)
|
||||
file = NULL;
|
||||
else if (!get_file_rcu_many(file, refs))
|
||||
goto loop;
|
||||
else if (files_lookup_fd_raw(files, fd) != file) {
|
||||
fput_many(file, refs);
|
||||
goto loop;
|
||||
}
|
||||
}
|
||||
file = __fget_files_rcu(files, fd, mask, refs);
|
||||
rcu_read_unlock();
|
||||
|
||||
return file;
|
||||
|
||||
@@ -136,19 +136,21 @@ struct mptcp_info {
|
||||
* MPTCP_EVENT_REMOVED: token, rem_id
|
||||
* An address has been lost by the peer.
|
||||
*
|
||||
* MPTCP_EVENT_SUB_ESTABLISHED: token, family, saddr4 | saddr6,
|
||||
* daddr4 | daddr6, sport, dport, backup,
|
||||
* if_idx [, error]
|
||||
* MPTCP_EVENT_SUB_ESTABLISHED: token, family, loc_id, rem_id,
|
||||
* saddr4 | saddr6, daddr4 | daddr6, sport,
|
||||
* dport, backup, if_idx [, error]
|
||||
* A new subflow has been established. 'error' should not be set.
|
||||
*
|
||||
* MPTCP_EVENT_SUB_CLOSED: token, family, saddr4 | saddr6, daddr4 | daddr6,
|
||||
* sport, dport, backup, if_idx [, error]
|
||||
* MPTCP_EVENT_SUB_CLOSED: token, family, loc_id, rem_id, saddr4 | saddr6,
|
||||
* daddr4 | daddr6, sport, dport, backup, if_idx
|
||||
* [, error]
|
||||
* A subflow has been closed. An error (copy of sk_err) could be set if an
|
||||
* error has been detected for this subflow.
|
||||
*
|
||||
* MPTCP_EVENT_SUB_PRIORITY: token, family, saddr4 | saddr6, daddr4 | daddr6,
|
||||
* sport, dport, backup, if_idx [, error]
|
||||
* The priority of a subflow has changed. 'error' should not be set.
|
||||
* MPTCP_EVENT_SUB_PRIORITY: token, family, loc_id, rem_id, saddr4 | saddr6,
|
||||
* daddr4 | daddr6, sport, dport, backup, if_idx
|
||||
* [, error]
|
||||
* The priority of a subflow has changed. 'error' should not be set.
|
||||
*/
|
||||
enum mptcp_event_type {
|
||||
MPTCP_EVENT_UNSPEC = 0,
|
||||
|
||||
@@ -718,7 +718,7 @@ static int kauditd_send_queue(struct sock *sk, u32 portid,
|
||||
{
|
||||
int rc = 0;
|
||||
struct sk_buff *skb;
|
||||
static unsigned int failed = 0;
|
||||
unsigned int failed = 0;
|
||||
|
||||
/* NOTE: kauditd_thread takes care of all our locking, we just use
|
||||
* the netlink info passed to us (e.g. sk and portid) */
|
||||
@@ -735,32 +735,30 @@ static int kauditd_send_queue(struct sock *sk, u32 portid,
|
||||
continue;
|
||||
}
|
||||
|
||||
retry:
|
||||
/* grab an extra skb reference in case of error */
|
||||
skb_get(skb);
|
||||
rc = netlink_unicast(sk, skb, portid, 0);
|
||||
if (rc < 0) {
|
||||
/* fatal failure for our queue flush attempt? */
|
||||
/* send failed - try a few times unless fatal error */
|
||||
if (++failed >= retry_limit ||
|
||||
rc == -ECONNREFUSED || rc == -EPERM) {
|
||||
/* yes - error processing for the queue */
|
||||
sk = NULL;
|
||||
if (err_hook)
|
||||
(*err_hook)(skb);
|
||||
if (!skb_hook)
|
||||
goto out;
|
||||
/* keep processing with the skb_hook */
|
||||
if (rc == -EAGAIN)
|
||||
rc = 0;
|
||||
/* continue to drain the queue */
|
||||
continue;
|
||||
} else
|
||||
/* no - requeue to preserve ordering */
|
||||
skb_queue_head(queue, skb);
|
||||
goto retry;
|
||||
} else {
|
||||
/* it worked - drop the extra reference and continue */
|
||||
/* skb sent - drop the extra reference and continue */
|
||||
consume_skb(skb);
|
||||
failed = 0;
|
||||
}
|
||||
}
|
||||
|
||||
out:
|
||||
return (rc >= 0 ? 0 : rc);
|
||||
}
|
||||
|
||||
@@ -1609,7 +1607,8 @@ static int __net_init audit_net_init(struct net *net)
|
||||
audit_panic("cannot initialize netlink socket in namespace");
|
||||
return -ENOMEM;
|
||||
}
|
||||
aunet->sk->sk_sndtimeo = MAX_SCHEDULE_TIMEOUT;
|
||||
/* limit the timeout in case auditd is blocked/stopped */
|
||||
aunet->sk->sk_sndtimeo = HZ / 10;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1366,22 +1366,28 @@ static void __reg_bound_offset(struct bpf_reg_state *reg)
|
||||
reg->var_off = tnum_or(tnum_clear_subreg(var64_off), var32_off);
|
||||
}
|
||||
|
||||
static bool __reg32_bound_s64(s32 a)
|
||||
{
|
||||
return a >= 0 && a <= S32_MAX;
|
||||
}
|
||||
|
||||
static void __reg_assign_32_into_64(struct bpf_reg_state *reg)
|
||||
{
|
||||
reg->umin_value = reg->u32_min_value;
|
||||
reg->umax_value = reg->u32_max_value;
|
||||
/* Attempt to pull 32-bit signed bounds into 64-bit bounds
|
||||
* but must be positive otherwise set to worse case bounds
|
||||
* and refine later from tnum.
|
||||
|
||||
/* Attempt to pull 32-bit signed bounds into 64-bit bounds but must
|
||||
* be positive otherwise set to worse case bounds and refine later
|
||||
* from tnum.
|
||||
*/
|
||||
if (reg->s32_min_value >= 0 && reg->s32_max_value >= 0)
|
||||
reg->smax_value = reg->s32_max_value;
|
||||
else
|
||||
reg->smax_value = U32_MAX;
|
||||
if (reg->s32_min_value >= 0)
|
||||
if (__reg32_bound_s64(reg->s32_min_value) &&
|
||||
__reg32_bound_s64(reg->s32_max_value)) {
|
||||
reg->smin_value = reg->s32_min_value;
|
||||
else
|
||||
reg->smax_value = reg->s32_max_value;
|
||||
} else {
|
||||
reg->smin_value = 0;
|
||||
reg->smax_value = U32_MAX;
|
||||
}
|
||||
}
|
||||
|
||||
static void __reg_combine_32_into_64(struct bpf_reg_state *reg)
|
||||
@@ -2379,8 +2385,6 @@ static int backtrack_insn(struct bpf_verifier_env *env, int idx,
|
||||
*/
|
||||
if (insn->src_reg != BPF_REG_FP)
|
||||
return 0;
|
||||
if (BPF_SIZE(insn->code) != BPF_DW)
|
||||
return 0;
|
||||
|
||||
/* dreg = *(u64 *)[fp - off] was a fill from the stack.
|
||||
* that [fp - off] slot contains scalar that needs to be
|
||||
@@ -2403,8 +2407,6 @@ static int backtrack_insn(struct bpf_verifier_env *env, int idx,
|
||||
/* scalars can only be spilled into stack */
|
||||
if (insn->dst_reg != BPF_REG_FP)
|
||||
return 0;
|
||||
if (BPF_SIZE(insn->code) != BPF_DW)
|
||||
return 0;
|
||||
spi = (-insn->off - 1) / BPF_REG_SIZE;
|
||||
if (spi >= 64) {
|
||||
verbose(env, "BUG spi %d\n", spi);
|
||||
@@ -4551,9 +4553,16 @@ static int check_atomic(struct bpf_verifier_env *env, int insn_idx, struct bpf_i
|
||||
|
||||
if (insn->imm == BPF_CMPXCHG) {
|
||||
/* Check comparison of R0 with memory location */
|
||||
err = check_reg_arg(env, BPF_REG_0, SRC_OP);
|
||||
const u32 aux_reg = BPF_REG_0;
|
||||
|
||||
err = check_reg_arg(env, aux_reg, SRC_OP);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
if (is_pointer_value(env, aux_reg)) {
|
||||
verbose(env, "R%d leaks addr into mem\n", aux_reg);
|
||||
return -EACCES;
|
||||
}
|
||||
}
|
||||
|
||||
if (is_pointer_value(env, insn->src_reg)) {
|
||||
@@ -4588,13 +4597,19 @@ static int check_atomic(struct bpf_verifier_env *env, int insn_idx, struct bpf_i
|
||||
load_reg = -1;
|
||||
}
|
||||
|
||||
/* check whether we can read the memory */
|
||||
/* Check whether we can read the memory, with second call for fetch
|
||||
* case to simulate the register fill.
|
||||
*/
|
||||
err = check_mem_access(env, insn_idx, insn->dst_reg, insn->off,
|
||||
BPF_SIZE(insn->code), BPF_READ, load_reg, true);
|
||||
BPF_SIZE(insn->code), BPF_READ, -1, true);
|
||||
if (!err && load_reg >= 0)
|
||||
err = check_mem_access(env, insn_idx, insn->dst_reg, insn->off,
|
||||
BPF_SIZE(insn->code), BPF_READ, load_reg,
|
||||
true);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
/* check whether we can write into the same memory */
|
||||
/* Check whether we can write into the same memory. */
|
||||
err = check_mem_access(env, insn_idx, insn->dst_reg, insn->off,
|
||||
BPF_SIZE(insn->code), BPF_WRITE, -1, true);
|
||||
if (err)
|
||||
@@ -8308,6 +8323,10 @@ static int check_alu_op(struct bpf_verifier_env *env, struct bpf_insn *insn)
|
||||
insn->dst_reg);
|
||||
}
|
||||
zext_32_to_64(dst_reg);
|
||||
|
||||
__update_reg_bounds(dst_reg);
|
||||
__reg_deduce_bounds(dst_reg);
|
||||
__reg_bound_offset(dst_reg);
|
||||
}
|
||||
} else {
|
||||
/* case: R = imm
|
||||
|
||||
@@ -834,7 +834,7 @@ void skb_dump(const char *level, const struct sk_buff *skb, bool full_pkt)
|
||||
ntohs(skb->protocol), skb->pkt_type, skb->skb_iif);
|
||||
|
||||
if (dev)
|
||||
printk("%sdev name=%s feat=0x%pNF\n",
|
||||
printk("%sdev name=%s feat=%pNF\n",
|
||||
level, dev->name, &dev->features);
|
||||
if (sk)
|
||||
printk("%ssk family=%hu type=%u proto=%u\n",
|
||||
|
||||
@@ -261,6 +261,7 @@ int inet_sk_diag_fill(struct sock *sk, struct inet_connection_sock *icsk,
|
||||
r->idiag_state = sk->sk_state;
|
||||
r->idiag_timer = 0;
|
||||
r->idiag_retrans = 0;
|
||||
r->idiag_expires = 0;
|
||||
|
||||
if (inet_diag_msg_attrs_fill(sk, skb, r, ext,
|
||||
sk_user_ns(NETLINK_CB(cb->skb).sk),
|
||||
@@ -314,9 +315,6 @@ int inet_sk_diag_fill(struct sock *sk, struct inet_connection_sock *icsk,
|
||||
r->idiag_retrans = icsk->icsk_probes_out;
|
||||
r->idiag_expires =
|
||||
jiffies_delta_to_msecs(sk->sk_timer.expires - jiffies);
|
||||
} else {
|
||||
r->idiag_timer = 0;
|
||||
r->idiag_expires = 0;
|
||||
}
|
||||
|
||||
if ((ext & (1 << (INET_DIAG_INFO - 1))) && handler->idiag_info_size) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user