mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-23 12:14:10 +08:00
This is the 6.6.61 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmc16uIACgkQONu9yGCS aT7dixAArSTzIvvOrgQQFMdHgZ+gHBey7hVU9cm4rp8OMwf0yCA6SpGcSVtbDoCG oThQw58+D8AEYJy7dGqYGPgjvIGbHFDO9Hg1FB+NtM7DNxib5z22QB2LKd8jsCgY LpQ78DVo+XCytnCaeYve+D79ziTXzHTcjGZIH3jMC1UBBlzXezBR6TXokqUc9TsC FiBfCw418pdPwwtLAQN0qmRs/pq8nrs+e89Kb6i0RlHehHm8QI9ff8Gff18mIQRM y1solMb0ff9J5/xJqX1sddJnc9sNcOz4L09OhvrGCT6kMNFjacdGh8+AUhdYF7CY DkRXAhRNLLmSEcEYNjpN1t5bgCvSiCMw14wNHGKw1tS4NIycGwaFooVK/rkcFfA1 90dt7YzJ+rNLn7TvBK+/ht5ODN34ZF7x+CqFUx0xoDPJOCRaXn9nvy8pyZZFCv1z wxTnnKbVAV90pYUbyJCZNoOB3VY32w8EXH5YgBfybaVsvLFQaTtrjiCtZvx2eIm+ LG9tsP2+Gq8a+kAyS57aDvbUMBtqPAGEMxiW72aagNuoHUul0xiqXNFAwb93ovgO Opao9aU/4ugmeCswYA/zzhcQrLKUxPDD5YR8g8bEv5iHn8gLg/B+JT2NyX2xhxoj LzyoRh8MWsuA6AkUNG8xyfSp0xa9Kescw+46i976abm7tlvj6dc= =mD3s -----END PGP SIGNATURE----- Merge v6.6.61 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
commit
0e651c03ea
@ -61,7 +61,7 @@ properties:
|
||||
- gmii
|
||||
- rgmii
|
||||
- sgmii
|
||||
- 1000BaseX
|
||||
- 1000base-x
|
||||
|
||||
xlnx,phy-type:
|
||||
description:
|
||||
|
2
Makefile
2
Makefile
@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 6
|
||||
PATCHLEVEL = 6
|
||||
SUBLEVEL = 60
|
||||
SUBLEVEL = 61
|
||||
EXTRAVERSION =
|
||||
NAME = Pinguïn Aangedreven
|
||||
|
||||
|
@ -304,8 +304,8 @@
|
||||
&i2c2 {
|
||||
status = "okay";
|
||||
|
||||
rt5616: rt5616@1b {
|
||||
compatible = "rt5616";
|
||||
rt5616: audio-codec@1b {
|
||||
compatible = "realtek,rt5616";
|
||||
reg = <0x1b>;
|
||||
clocks = <&cru SCLK_I2S_OUT>;
|
||||
clock-names = "mclk";
|
||||
|
@ -382,12 +382,13 @@
|
||||
};
|
||||
};
|
||||
|
||||
acodec: acodec-ana@20030000 {
|
||||
compatible = "rk3036-codec";
|
||||
acodec: audio-codec@20030000 {
|
||||
compatible = "rockchip,rk3036-codec";
|
||||
reg = <0x20030000 0x4000>;
|
||||
rockchip,grf = <&grf>;
|
||||
clock-names = "acodec_pclk";
|
||||
clocks = <&cru PCLK_ACODEC>;
|
||||
rockchip,grf = <&grf>;
|
||||
#sound-dai-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@ -397,7 +398,6 @@
|
||||
interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cru PCLK_HDMI>;
|
||||
clock-names = "pclk";
|
||||
rockchip,grf = <&grf>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&hdmi_ctl>;
|
||||
status = "disabled";
|
||||
@ -550,11 +550,11 @@
|
||||
};
|
||||
|
||||
spi: spi@20074000 {
|
||||
compatible = "rockchip,rockchip-spi";
|
||||
compatible = "rockchip,rk3036-spi";
|
||||
reg = <0x20074000 0x1000>;
|
||||
interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cru PCLK_SPI>, <&cru SCLK_SPI>;
|
||||
clock-names = "apb-pclk","spi_pclk";
|
||||
clocks = <&cru SCLK_SPI>, <&cru PCLK_SPI>;
|
||||
clock-names = "spiclk", "apb_pclk";
|
||||
dmas = <&pdma 8>, <&pdma 9>;
|
||||
dma-names = "tx", "rx";
|
||||
pinctrl-names = "default";
|
||||
|
@ -2167,6 +2167,7 @@ config ARM64_SME
|
||||
bool "ARM Scalable Matrix Extension support"
|
||||
default y
|
||||
depends on ARM64_SVE
|
||||
depends on BROKEN
|
||||
help
|
||||
The Scalable Matrix Extension (SME) is an extension to the AArch64
|
||||
execution state which utilises a substantial subset of the SVE
|
||||
|
@ -15,7 +15,7 @@ vpu: vpu@2c000000 {
|
||||
mu_m0: mailbox@2d000000 {
|
||||
compatible = "fsl,imx6sx-mu";
|
||||
reg = <0x2d000000 0x20000>;
|
||||
interrupts = <GIC_SPI 469 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupts = <GIC_SPI 472 IRQ_TYPE_LEVEL_HIGH>;
|
||||
#mbox-cells = <2>;
|
||||
power-domains = <&pd IMX_SC_R_VPU_MU_0>;
|
||||
status = "disabled";
|
||||
@ -24,7 +24,7 @@ vpu: vpu@2c000000 {
|
||||
mu1_m0: mailbox@2d020000 {
|
||||
compatible = "fsl,imx6sx-mu";
|
||||
reg = <0x2d020000 0x20000>;
|
||||
interrupts = <GIC_SPI 470 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupts = <GIC_SPI 473 IRQ_TYPE_LEVEL_HIGH>;
|
||||
#mbox-cells = <2>;
|
||||
power-domains = <&pd IMX_SC_R_VPU_MU_1>;
|
||||
status = "disabled";
|
||||
|
@ -1257,7 +1257,7 @@
|
||||
compatible = "fsl,imx8mp-usdhc", "fsl,imx8mm-usdhc", "fsl,imx7d-usdhc";
|
||||
reg = <0x30b40000 0x10000>;
|
||||
interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk IMX8MP_CLK_DUMMY>,
|
||||
clocks = <&clk IMX8MP_CLK_IPG_ROOT>,
|
||||
<&clk IMX8MP_CLK_NAND_USDHC_BUS>,
|
||||
<&clk IMX8MP_CLK_USDHC1_ROOT>;
|
||||
clock-names = "ipg", "ahb", "per";
|
||||
@ -1271,7 +1271,7 @@
|
||||
compatible = "fsl,imx8mp-usdhc", "fsl,imx8mm-usdhc", "fsl,imx7d-usdhc";
|
||||
reg = <0x30b50000 0x10000>;
|
||||
interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk IMX8MP_CLK_DUMMY>,
|
||||
clocks = <&clk IMX8MP_CLK_IPG_ROOT>,
|
||||
<&clk IMX8MP_CLK_NAND_USDHC_BUS>,
|
||||
<&clk IMX8MP_CLK_USDHC2_ROOT>;
|
||||
clock-names = "ipg", "ahb", "per";
|
||||
@ -1285,7 +1285,7 @@
|
||||
compatible = "fsl,imx8mp-usdhc", "fsl,imx8mm-usdhc", "fsl,imx7d-usdhc";
|
||||
reg = <0x30b60000 0x10000>;
|
||||
interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk IMX8MP_CLK_DUMMY>,
|
||||
clocks = <&clk IMX8MP_CLK_IPG_ROOT>,
|
||||
<&clk IMX8MP_CLK_NAND_USDHC_BUS>,
|
||||
<&clk IMX8MP_CLK_USDHC3_ROOT>;
|
||||
clock-names = "ipg", "ahb", "per";
|
||||
|
25
arch/arm64/boot/dts/freescale/imx8qxp-ss-vpu.dtsi
Normal file
25
arch/arm64/boot/dts/freescale/imx8qxp-ss-vpu.dtsi
Normal file
@ -0,0 +1,25 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0-or-later OR X11)
|
||||
/*
|
||||
* Copyright 2023 TQ-Systems GmbH <linux@ew.tq-group.com>,
|
||||
* D-82229 Seefeld, Germany.
|
||||
* Author: Alexander Stein
|
||||
*/
|
||||
|
||||
&mu_m0 {
|
||||
interrupts = <GIC_SPI 469 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
&mu1_m0 {
|
||||
interrupts = <GIC_SPI 470 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
&vpu_core0 {
|
||||
reg = <0x2d040000 0x10000>;
|
||||
};
|
||||
|
||||
&vpu_core1 {
|
||||
reg = <0x2d050000 0x10000>;
|
||||
};
|
||||
|
||||
/delete-node/ &mu2_m0;
|
||||
/delete-node/ &vpu_core2;
|
@ -48,7 +48,6 @@
|
||||
serial3 = &lpuart3;
|
||||
vpu-core0 = &vpu_core0;
|
||||
vpu-core1 = &vpu_core1;
|
||||
vpu-core2 = &vpu_core2;
|
||||
};
|
||||
|
||||
cpus {
|
||||
@ -317,6 +316,7 @@
|
||||
};
|
||||
|
||||
#include "imx8qxp-ss-img.dtsi"
|
||||
#include "imx8qxp-ss-vpu.dtsi"
|
||||
#include "imx8qxp-ss-adma.dtsi"
|
||||
#include "imx8qxp-ss-conn.dtsi"
|
||||
#include "imx8qxp-ss-lsio.dtsi"
|
||||
|
@ -17,6 +17,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2c.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2c-plus.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s-plus.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus-lts.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock64.dtb
|
||||
|
@ -66,7 +66,6 @@
|
||||
bus-width = <8>;
|
||||
cap-mmc-highspeed;
|
||||
mmc-hs200-1_8v;
|
||||
supports-emmc;
|
||||
mmc-pwrseq = <&emmc_pwrseq>;
|
||||
non-removable;
|
||||
vmmc-supply = <&vcc_3v3>;
|
||||
|
@ -36,14 +36,14 @@
|
||||
|
||||
power_led: led-0 {
|
||||
label = "firefly:red:power";
|
||||
linux,default-trigger = "ir-power-click";
|
||||
linux,default-trigger = "default-on";
|
||||
default-state = "on";
|
||||
gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
user_led: led-1 {
|
||||
label = "firefly:blue:user";
|
||||
linux,default-trigger = "ir-user-click";
|
||||
linux,default-trigger = "rc-feedback";
|
||||
default-state = "off";
|
||||
gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
30
arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s-plus.dts
Normal file
30
arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s-plus.dts
Normal file
@ -0,0 +1,30 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
/*
|
||||
* (C) Copyright 2018 FriendlyElec Computer Tech. Co., Ltd.
|
||||
* (http://www.friendlyarm.com)
|
||||
*
|
||||
* (C) Copyright 2016 Rockchip Electronics Co., Ltd
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include "rk3328-nanopi-r2s.dts"
|
||||
|
||||
/ {
|
||||
compatible = "friendlyarm,nanopi-r2s-plus", "rockchip,rk3328";
|
||||
model = "FriendlyElec NanoPi R2S Plus";
|
||||
|
||||
aliases {
|
||||
mmc1 = &emmc;
|
||||
};
|
||||
};
|
||||
|
||||
&emmc {
|
||||
bus-width = <8>;
|
||||
cap-mmc-highspeed;
|
||||
disable-wp;
|
||||
mmc-hs200-1_8v;
|
||||
non-removable;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
|
||||
status = "okay";
|
||||
};
|
@ -726,8 +726,7 @@
|
||||
compatible = "rockchip,rk3328-dw-hdmi";
|
||||
reg = <0x0 0xff3c0000 0x0 0x20000>;
|
||||
reg-io-width = <4>;
|
||||
interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cru PCLK_HDMI>,
|
||||
<&cru SCLK_HDMI_SFC>,
|
||||
<&cru SCLK_RTC32K>;
|
||||
|
@ -60,7 +60,6 @@
|
||||
fan: fan@18 {
|
||||
compatible = "ti,amc6821";
|
||||
reg = <0x18>;
|
||||
#cooling-cells = <2>;
|
||||
};
|
||||
|
||||
rtc_twi: rtc@6f {
|
||||
|
@ -541,7 +541,7 @@
|
||||
status = "okay";
|
||||
|
||||
rt5651: audio-codec@1a {
|
||||
compatible = "rockchip,rt5651";
|
||||
compatible = "realtek,rt5651";
|
||||
reg = <0x1a>;
|
||||
clocks = <&cru SCLK_I2S_8CH_OUT>;
|
||||
clock-names = "mclk";
|
||||
|
@ -138,7 +138,6 @@
|
||||
regulator-max-microvolt = <1800000>;
|
||||
vin-supply = <&vcc3v3_sys>;
|
||||
gpio = <&gpio3 RK_PA5 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
/* MIPI DSI panel 2.8v supply */
|
||||
@ -150,7 +149,6 @@
|
||||
regulator-max-microvolt = <2800000>;
|
||||
vin-supply = <&vcc3v3_sys>;
|
||||
gpio = <&gpio3 RK_PA1 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -577,7 +577,7 @@
|
||||
bluetooth {
|
||||
compatible = "brcm,bcm43438-bt";
|
||||
clocks = <&rk808 1>;
|
||||
clock-names = "ext_clock";
|
||||
clock-names = "txco";
|
||||
device-wakeup-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
|
||||
host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
|
||||
shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
|
||||
|
@ -163,7 +163,7 @@
|
||||
status = "okay";
|
||||
|
||||
rt5651: rt5651@1a {
|
||||
compatible = "rockchip,rt5651";
|
||||
compatible = "realtek,rt5651";
|
||||
reg = <0x1a>;
|
||||
clocks = <&cru SCLK_I2S_8CH_OUT>;
|
||||
clock-names = "mclk";
|
||||
|
@ -92,7 +92,7 @@
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
pintctrl-names = "default";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c2m1_xfer>;
|
||||
status = "okay";
|
||||
|
||||
|
@ -79,7 +79,7 @@
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
pintctrl-names = "default";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c2m1_xfer>;
|
||||
status = "okay";
|
||||
|
||||
|
@ -449,9 +449,9 @@
|
||||
bluetooth {
|
||||
compatible = "brcm,bcm43438-bt";
|
||||
clocks = <&pmucru CLK_RTC_32K>;
|
||||
clock-names = "ext_clock";
|
||||
device-wake-gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
|
||||
host-wake-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
|
||||
clock-names = "txco";
|
||||
device-wakeup-gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
|
||||
host-wakeup-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
|
||||
shutdown-gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>;
|
||||
|
@ -508,7 +508,6 @@
|
||||
non-removable;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd>;
|
||||
supports-emmc;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
@ -683,11 +683,11 @@
|
||||
compatible = "brcm,bcm43438-bt";
|
||||
clocks = <&rk817 1>;
|
||||
clock-names = "lpo";
|
||||
device-wake-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
|
||||
host-wake-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;
|
||||
reset-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_LOW>;
|
||||
device-wakeup-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
|
||||
host-wakeup-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-0 = <&bt_enable_h>, <&bt_host_wake_l>, <&bt_wake_h>;
|
||||
pinctrl-names = "default";
|
||||
shutdown-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
|
||||
vbat-supply = <&vcc_wl>;
|
||||
vddio-supply = <&vcca_1v8_pmu>;
|
||||
};
|
||||
|
@ -402,9 +402,9 @@
|
||||
clock-names = "lpo";
|
||||
device-wakeup-gpios = <&gpio2 RK_PB2 GPIO_ACTIVE_HIGH>;
|
||||
host-wakeup-gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_HIGH>;
|
||||
reset-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_LOW>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&bt_host_wake_h &bt_reg_on_h &bt_wake_host_h>;
|
||||
shutdown-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
|
||||
vbat-supply = <&vcc_3v3>;
|
||||
vddio-supply = <&vcc_1v8>;
|
||||
};
|
||||
|
@ -590,7 +590,6 @@
|
||||
non-removable;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd>;
|
||||
supports-emmc;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
@ -1445,6 +1445,7 @@ static void sve_init_regs(void)
|
||||
} else {
|
||||
fpsimd_to_sve(current);
|
||||
current->thread.fp_type = FP_STATE_SVE;
|
||||
fpsimd_flush_task_state(current);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,48 +7,19 @@
|
||||
|
||||
#include <asm/asm-offsets.h>
|
||||
#include <asm/assembler.h>
|
||||
#include <asm/thread_info.h>
|
||||
|
||||
/*
|
||||
* If we have SMCCC v1.3 and (as is likely) no SVE state in
|
||||
* the registers then set the SMCCC hint bit to say there's no
|
||||
* need to preserve it. Do this by directly adjusting the SMCCC
|
||||
* function value which is already stored in x0 ready to be called.
|
||||
*/
|
||||
SYM_FUNC_START(__arm_smccc_sve_check)
|
||||
|
||||
ldr_l x16, smccc_has_sve_hint
|
||||
cbz x16, 2f
|
||||
|
||||
get_current_task x16
|
||||
ldr x16, [x16, #TSK_TI_FLAGS]
|
||||
tbnz x16, #TIF_FOREIGN_FPSTATE, 1f // Any live FP state?
|
||||
tbnz x16, #TIF_SVE, 2f // Does that state include SVE?
|
||||
|
||||
1: orr x0, x0, ARM_SMCCC_1_3_SVE_HINT
|
||||
|
||||
2: ret
|
||||
SYM_FUNC_END(__arm_smccc_sve_check)
|
||||
EXPORT_SYMBOL(__arm_smccc_sve_check)
|
||||
|
||||
.macro SMCCC instr
|
||||
stp x29, x30, [sp, #-16]!
|
||||
mov x29, sp
|
||||
alternative_if ARM64_SVE
|
||||
bl __arm_smccc_sve_check
|
||||
alternative_else_nop_endif
|
||||
\instr #0
|
||||
ldr x4, [sp, #16]
|
||||
ldr x4, [sp]
|
||||
stp x0, x1, [x4, #ARM_SMCCC_RES_X0_OFFS]
|
||||
stp x2, x3, [x4, #ARM_SMCCC_RES_X2_OFFS]
|
||||
ldr x4, [sp, #24]
|
||||
ldr x4, [sp, #8]
|
||||
cbz x4, 1f /* no quirk structure */
|
||||
ldr x9, [x4, #ARM_SMCCC_QUIRK_ID_OFFS]
|
||||
cmp x9, #ARM_SMCCC_QUIRK_QCOM_A6
|
||||
b.ne 1f
|
||||
str x6, [x4, ARM_SMCCC_QUIRK_STATE_OFFS]
|
||||
1: ldp x29, x30, [sp], #16
|
||||
ret
|
||||
1: ret
|
||||
.endm
|
||||
|
||||
/*
|
||||
|
@ -11,6 +11,8 @@
|
||||
.macro size, sym:req
|
||||
.size \sym, . - \sym
|
||||
.endm
|
||||
#include <asm/asm.h>
|
||||
#include <linux/linkage.h>
|
||||
|
||||
.text
|
||||
|
||||
@ -39,6 +41,7 @@ size purgatory_start
|
||||
|
||||
.data
|
||||
|
||||
.align LGREG
|
||||
.globl riscv_kernel_entry
|
||||
riscv_kernel_entry:
|
||||
.quad 0
|
||||
|
@ -305,7 +305,10 @@ EXPORT_SYMBOL_GPL(scmi_driver_unregister);
|
||||
|
||||
static void scmi_device_release(struct device *dev)
|
||||
{
|
||||
kfree(to_scmi_dev(dev));
|
||||
struct scmi_device *scmi_dev = to_scmi_dev(dev);
|
||||
|
||||
kfree_const(scmi_dev->name);
|
||||
kfree(scmi_dev);
|
||||
}
|
||||
|
||||
static void __scmi_device_destroy(struct scmi_device *scmi_dev)
|
||||
@ -318,7 +321,6 @@ static void __scmi_device_destroy(struct scmi_device *scmi_dev)
|
||||
if (scmi_dev->protocol_id == SCMI_PROTOCOL_SYSTEM)
|
||||
atomic_set(&scmi_syspower_registered, 0);
|
||||
|
||||
kfree_const(scmi_dev->name);
|
||||
ida_free(&scmi_bus_id, scmi_dev->id);
|
||||
device_unregister(&scmi_dev->dev);
|
||||
}
|
||||
@ -390,7 +392,6 @@ __scmi_device_create(struct device_node *np, struct device *parent,
|
||||
|
||||
return scmi_dev;
|
||||
put_dev:
|
||||
kfree_const(scmi_dev->name);
|
||||
put_device(&scmi_dev->dev);
|
||||
ida_free(&scmi_bus_id, id);
|
||||
return NULL;
|
||||
|
@ -16,7 +16,6 @@ static u32 smccc_version = ARM_SMCCC_VERSION_1_0;
|
||||
static enum arm_smccc_conduit smccc_conduit = SMCCC_CONDUIT_NONE;
|
||||
|
||||
bool __ro_after_init smccc_trng_available = false;
|
||||
u64 __ro_after_init smccc_has_sve_hint = false;
|
||||
s32 __ro_after_init smccc_soc_id_version = SMCCC_RET_NOT_SUPPORTED;
|
||||
s32 __ro_after_init smccc_soc_id_revision = SMCCC_RET_NOT_SUPPORTED;
|
||||
|
||||
@ -28,9 +27,6 @@ void __init arm_smccc_version_init(u32 version, enum arm_smccc_conduit conduit)
|
||||
smccc_conduit = conduit;
|
||||
|
||||
smccc_trng_available = smccc_probe_trng();
|
||||
if (IS_ENABLED(CONFIG_ARM64_SVE) &&
|
||||
smccc_version >= ARM_SMCCC_VERSION_1_3)
|
||||
smccc_has_sve_hint = true;
|
||||
|
||||
if ((smccc_version >= ARM_SMCCC_VERSION_1_2) &&
|
||||
(smccc_conduit != SMCCC_CONDUIT_NONE)) {
|
||||
|
@ -172,8 +172,8 @@ static union acpi_object *amdgpu_atif_call(struct amdgpu_atif *atif,
|
||||
&buffer);
|
||||
obj = (union acpi_object *)buffer.pointer;
|
||||
|
||||
/* Fail if calling the method fails and ATIF is supported */
|
||||
if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
|
||||
/* Fail if calling the method fails */
|
||||
if (ACPI_FAILURE(status)) {
|
||||
DRM_DEBUG_DRIVER("failed to evaluate ATIF got %s\n",
|
||||
acpi_format_exception(status));
|
||||
kfree(obj);
|
||||
|
@ -402,7 +402,7 @@ static ssize_t amdgpu_debugfs_gprwave_read(struct file *f, char __user *buf, siz
|
||||
int r;
|
||||
uint32_t *data, x;
|
||||
|
||||
if (size & 0x3 || *pos & 0x3)
|
||||
if (size > 4096 || size & 0x3 || *pos & 0x3)
|
||||
return -EINVAL;
|
||||
|
||||
r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
|
||||
@ -1641,7 +1641,7 @@ int amdgpu_debugfs_regs_init(struct amdgpu_device *adev)
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(debugfs_regs); i++) {
|
||||
ent = debugfs_create_file(debugfs_regs_names[i],
|
||||
S_IFREG | 0444, root,
|
||||
S_IFREG | 0400, root,
|
||||
adev, debugfs_regs[i]);
|
||||
if (!i && !IS_ERR_OR_NULL(ent))
|
||||
i_size_write(ent->d_inode, adev->rmmio_size);
|
||||
@ -2176,11 +2176,11 @@ int amdgpu_debugfs_init(struct amdgpu_device *adev)
|
||||
amdgpu_securedisplay_debugfs_init(adev);
|
||||
amdgpu_fw_attestation_debugfs_init(adev);
|
||||
|
||||
debugfs_create_file("amdgpu_evict_vram", 0444, root, adev,
|
||||
debugfs_create_file("amdgpu_evict_vram", 0400, root, adev,
|
||||
&amdgpu_evict_vram_fops);
|
||||
debugfs_create_file("amdgpu_evict_gtt", 0444, root, adev,
|
||||
debugfs_create_file("amdgpu_evict_gtt", 0400, root, adev,
|
||||
&amdgpu_evict_gtt_fops);
|
||||
debugfs_create_file("amdgpu_test_ib", 0444, root, adev,
|
||||
debugfs_create_file("amdgpu_test_ib", 0400, root, adev,
|
||||
&amdgpu_debugfs_test_ib_fops);
|
||||
debugfs_create_file("amdgpu_vm_info", 0444, root, adev,
|
||||
&amdgpu_debugfs_vm_info_fops);
|
||||
|
@ -440,7 +440,7 @@ static bool __aqua_vanjaram_is_valid_mode(struct amdgpu_xcp_mgr *xcp_mgr,
|
||||
case AMDGPU_SPX_PARTITION_MODE:
|
||||
return adev->gmc.num_mem_partitions == 1 && num_xcc > 0;
|
||||
case AMDGPU_DPX_PARTITION_MODE:
|
||||
return adev->gmc.num_mem_partitions != 8 && (num_xcc % 4) == 0;
|
||||
return adev->gmc.num_mem_partitions <= 2 && (num_xcc % 4) == 0;
|
||||
case AMDGPU_TPX_PARTITION_MODE:
|
||||
return (adev->gmc.num_mem_partitions == 1 ||
|
||||
adev->gmc.num_mem_partitions == 3) &&
|
||||
|
@ -1875,7 +1875,7 @@ u8 *hid_alloc_report_buf(struct hid_report *report, gfp_t flags)
|
||||
|
||||
u32 len = hid_report_len(report) + 7;
|
||||
|
||||
return kmalloc(len, flags);
|
||||
return kzalloc(len, flags);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(hid_alloc_report_buf);
|
||||
|
||||
|
@ -442,7 +442,7 @@ err_release_lock:
|
||||
void __i2c_dw_disable(struct dw_i2c_dev *dev)
|
||||
{
|
||||
struct i2c_timings *t = &dev->timings;
|
||||
unsigned int raw_intr_stats;
|
||||
unsigned int raw_intr_stats, ic_stats;
|
||||
unsigned int enable;
|
||||
int timeout = 100;
|
||||
bool abort_needed;
|
||||
@ -450,9 +450,11 @@ void __i2c_dw_disable(struct dw_i2c_dev *dev)
|
||||
int ret;
|
||||
|
||||
regmap_read(dev->map, DW_IC_RAW_INTR_STAT, &raw_intr_stats);
|
||||
regmap_read(dev->map, DW_IC_STATUS, &ic_stats);
|
||||
regmap_read(dev->map, DW_IC_ENABLE, &enable);
|
||||
|
||||
abort_needed = raw_intr_stats & DW_IC_INTR_MST_ON_HOLD;
|
||||
abort_needed = (raw_intr_stats & DW_IC_INTR_MST_ON_HOLD) ||
|
||||
(ic_stats & DW_IC_STATUS_MASTER_HOLD_TX_FIFO_EMPTY);
|
||||
if (abort_needed) {
|
||||
if (!(enable & DW_IC_ENABLE_ENABLE)) {
|
||||
regmap_write(dev->map, DW_IC_ENABLE, DW_IC_ENABLE_ENABLE);
|
||||
|
@ -117,6 +117,7 @@
|
||||
#define DW_IC_STATUS_RFNE BIT(3)
|
||||
#define DW_IC_STATUS_MASTER_ACTIVITY BIT(5)
|
||||
#define DW_IC_STATUS_SLAVE_ACTIVITY BIT(6)
|
||||
#define DW_IC_STATUS_MASTER_HOLD_TX_FIFO_EMPTY BIT(7)
|
||||
|
||||
#define DW_IC_SDA_HOLD_RX_SHIFT 16
|
||||
#define DW_IC_SDA_HOLD_RX_MASK GENMASK(23, 16)
|
||||
|
@ -468,6 +468,13 @@ static int gic_irq_set_irqchip_state(struct irq_data *d,
|
||||
}
|
||||
|
||||
gic_poke_irq(d, reg);
|
||||
|
||||
/*
|
||||
* Force read-back to guarantee that the active state has taken
|
||||
* effect, and won't race with a guest-driven deactivation.
|
||||
*/
|
||||
if (reg == GICD_ISACTIVER)
|
||||
gic_peek_irq(d, reg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1909,16 +1909,13 @@ static void check_migrations(struct work_struct *ws)
|
||||
* This function gets called on the error paths of the constructor, so we
|
||||
* have to cope with a partially initialised struct.
|
||||
*/
|
||||
static void destroy(struct cache *cache)
|
||||
static void __destroy(struct cache *cache)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
mempool_exit(&cache->migration_pool);
|
||||
|
||||
if (cache->prison)
|
||||
dm_bio_prison_destroy_v2(cache->prison);
|
||||
|
||||
cancel_delayed_work_sync(&cache->waker);
|
||||
if (cache->wq)
|
||||
destroy_workqueue(cache->wq);
|
||||
|
||||
@ -1946,13 +1943,22 @@ static void destroy(struct cache *cache)
|
||||
if (cache->policy)
|
||||
dm_cache_policy_destroy(cache->policy);
|
||||
|
||||
bioset_exit(&cache->bs);
|
||||
|
||||
kfree(cache);
|
||||
}
|
||||
|
||||
static void destroy(struct cache *cache)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
cancel_delayed_work_sync(&cache->waker);
|
||||
|
||||
for (i = 0; i < cache->nr_ctr_args ; i++)
|
||||
kfree(cache->ctr_args[i]);
|
||||
kfree(cache->ctr_args);
|
||||
|
||||
bioset_exit(&cache->bs);
|
||||
|
||||
kfree(cache);
|
||||
__destroy(cache);
|
||||
}
|
||||
|
||||
static void cache_dtr(struct dm_target *ti)
|
||||
@ -2007,7 +2013,6 @@ struct cache_args {
|
||||
sector_t cache_sectors;
|
||||
|
||||
struct dm_dev *origin_dev;
|
||||
sector_t origin_sectors;
|
||||
|
||||
uint32_t block_size;
|
||||
|
||||
@ -2088,6 +2093,7 @@ static int parse_cache_dev(struct cache_args *ca, struct dm_arg_set *as,
|
||||
static int parse_origin_dev(struct cache_args *ca, struct dm_arg_set *as,
|
||||
char **error)
|
||||
{
|
||||
sector_t origin_sectors;
|
||||
int r;
|
||||
|
||||
if (!at_least_one_arg(as, error))
|
||||
@ -2100,8 +2106,8 @@ static int parse_origin_dev(struct cache_args *ca, struct dm_arg_set *as,
|
||||
return r;
|
||||
}
|
||||
|
||||
ca->origin_sectors = get_dev_size(ca->origin_dev);
|
||||
if (ca->ti->len > ca->origin_sectors) {
|
||||
origin_sectors = get_dev_size(ca->origin_dev);
|
||||
if (ca->ti->len > origin_sectors) {
|
||||
*error = "Device size larger than cached device";
|
||||
return -EINVAL;
|
||||
}
|
||||
@ -2411,7 +2417,7 @@ static int cache_create(struct cache_args *ca, struct cache **result)
|
||||
|
||||
ca->metadata_dev = ca->origin_dev = ca->cache_dev = NULL;
|
||||
|
||||
origin_blocks = cache->origin_sectors = ca->origin_sectors;
|
||||
origin_blocks = cache->origin_sectors = ti->len;
|
||||
origin_blocks = block_div(origin_blocks, ca->block_size);
|
||||
cache->origin_blocks = to_oblock(origin_blocks);
|
||||
|
||||
@ -2565,7 +2571,7 @@ static int cache_create(struct cache_args *ca, struct cache **result)
|
||||
*result = cache;
|
||||
return 0;
|
||||
bad:
|
||||
destroy(cache);
|
||||
__destroy(cache);
|
||||
return r;
|
||||
}
|
||||
|
||||
@ -2616,7 +2622,7 @@ static int cache_ctr(struct dm_target *ti, unsigned int argc, char **argv)
|
||||
|
||||
r = copy_ctr_args(cache, argc - 3, (const char **)argv + 3);
|
||||
if (r) {
|
||||
destroy(cache);
|
||||
__destroy(cache);
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -2899,19 +2905,19 @@ static dm_cblock_t get_cache_dev_size(struct cache *cache)
|
||||
static bool can_resize(struct cache *cache, dm_cblock_t new_size)
|
||||
{
|
||||
if (from_cblock(new_size) > from_cblock(cache->cache_size)) {
|
||||
if (cache->sized) {
|
||||
DMERR("%s: unable to extend cache due to missing cache table reload",
|
||||
cache_device_name(cache));
|
||||
return false;
|
||||
}
|
||||
DMERR("%s: unable to extend cache due to missing cache table reload",
|
||||
cache_device_name(cache));
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* We can't drop a dirty block when shrinking the cache.
|
||||
*/
|
||||
while (from_cblock(new_size) < from_cblock(cache->cache_size)) {
|
||||
new_size = to_cblock(from_cblock(new_size) + 1);
|
||||
if (is_dirty(cache, new_size)) {
|
||||
if (cache->loaded_mappings) {
|
||||
new_size = to_cblock(find_next_bit(cache->dirty_bitset,
|
||||
from_cblock(cache->cache_size),
|
||||
from_cblock(new_size)));
|
||||
if (new_size != cache->cache_size) {
|
||||
DMERR("%s: unable to shrink cache; cache block %llu is dirty",
|
||||
cache_device_name(cache),
|
||||
(unsigned long long) from_cblock(new_size));
|
||||
@ -2947,20 +2953,15 @@ static int cache_preresume(struct dm_target *ti)
|
||||
/*
|
||||
* Check to see if the cache has resized.
|
||||
*/
|
||||
if (!cache->sized) {
|
||||
r = resize_cache_dev(cache, csize);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
cache->sized = true;
|
||||
|
||||
} else if (csize != cache->cache_size) {
|
||||
if (!cache->sized || csize != cache->cache_size) {
|
||||
if (!can_resize(cache, csize))
|
||||
return -EINVAL;
|
||||
|
||||
r = resize_cache_dev(cache, csize);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
cache->sized = true;
|
||||
}
|
||||
|
||||
if (!cache->loaded_mappings) {
|
||||
|
@ -85,8 +85,8 @@ static int unstripe_ctr(struct dm_target *ti, unsigned int argc, char **argv)
|
||||
}
|
||||
uc->physical_start = start;
|
||||
|
||||
uc->unstripe_offset = uc->unstripe * uc->chunk_size;
|
||||
uc->unstripe_width = (uc->stripes - 1) * uc->chunk_size;
|
||||
uc->unstripe_offset = (sector_t)uc->unstripe * uc->chunk_size;
|
||||
uc->unstripe_width = (sector_t)(uc->stripes - 1) * uc->chunk_size;
|
||||
uc->chunk_shift = is_power_of_2(uc->chunk_size) ? fls(uc->chunk_size) - 1 : 0;
|
||||
|
||||
tmp_len = ti->len;
|
||||
|
@ -685,7 +685,7 @@ static int pulse8_setup(struct pulse8 *pulse8, struct serio *serio,
|
||||
err = pulse8_send_and_wait(pulse8, cmd, 1, cmd[0], 4);
|
||||
if (err)
|
||||
return err;
|
||||
date = (data[0] << 24) | (data[1] << 16) | (data[2] << 8) | data[3];
|
||||
date = ((unsigned)data[0] << 24) | (data[1] << 16) | (data[2] << 8) | data[3];
|
||||
dev_info(pulse8->dev, "Firmware build date %ptT\n", &date);
|
||||
|
||||
dev_dbg(pulse8->dev, "Persistent config:\n");
|
||||
|
@ -1795,6 +1795,9 @@ static void tpg_precalculate_line(struct tpg_data *tpg)
|
||||
unsigned p;
|
||||
unsigned x;
|
||||
|
||||
if (WARN_ON_ONCE(!tpg->src_width || !tpg->scaled_width))
|
||||
return;
|
||||
|
||||
switch (tpg->pattern) {
|
||||
case TPG_PAT_GREEN:
|
||||
contrast = TPG_COLOR_100_RED;
|
||||
|
@ -443,8 +443,8 @@ static int dvb_frontend_swzigzag_autotune(struct dvb_frontend *fe, int check_wra
|
||||
|
||||
default:
|
||||
fepriv->auto_step++;
|
||||
fepriv->auto_sub_step = -1; /* it'll be incremented to 0 in a moment */
|
||||
break;
|
||||
fepriv->auto_sub_step = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!ready) fepriv->auto_sub_step++;
|
||||
|
@ -86,10 +86,15 @@ static DECLARE_RWSEM(minor_rwsem);
|
||||
static int dvb_device_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
struct dvb_device *dvbdev;
|
||||
unsigned int minor = iminor(inode);
|
||||
|
||||
if (minor >= MAX_DVB_MINORS)
|
||||
return -ENODEV;
|
||||
|
||||
mutex_lock(&dvbdev_mutex);
|
||||
down_read(&minor_rwsem);
|
||||
dvbdev = dvb_minors[iminor(inode)];
|
||||
|
||||
dvbdev = dvb_minors[minor];
|
||||
|
||||
if (dvbdev && dvbdev->fops) {
|
||||
int err = 0;
|
||||
@ -525,7 +530,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
|
||||
for (minor = 0; minor < MAX_DVB_MINORS; minor++)
|
||||
if (!dvb_minors[minor])
|
||||
break;
|
||||
if (minor == MAX_DVB_MINORS) {
|
||||
if (minor >= MAX_DVB_MINORS) {
|
||||
if (new_node) {
|
||||
list_del(&new_node->list_head);
|
||||
kfree(dvbdevfops);
|
||||
@ -540,6 +545,14 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
|
||||
}
|
||||
#else
|
||||
minor = nums2minor(adap->num, type, id);
|
||||
if (minor >= MAX_DVB_MINORS) {
|
||||
dvb_media_device_free(dvbdev);
|
||||
list_del(&dvbdev->list_head);
|
||||
kfree(dvbdev);
|
||||
*pdvbdev = NULL;
|
||||
mutex_unlock(&dvbdev_register_lock);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
dvbdev->minor = minor;
|
||||
dvb_minors[minor] = dvb_device_get(dvbdev);
|
||||
|
@ -741,6 +741,7 @@ static int cx24116_read_snr_pct(struct dvb_frontend *fe, u16 *snr)
|
||||
{
|
||||
struct cx24116_state *state = fe->demodulator_priv;
|
||||
u8 snr_reading;
|
||||
int ret;
|
||||
static const u32 snr_tab[] = { /* 10 x Table (rounded up) */
|
||||
0x00000, 0x0199A, 0x03333, 0x04ccD, 0x06667,
|
||||
0x08000, 0x0999A, 0x0b333, 0x0cccD, 0x0e667,
|
||||
@ -749,7 +750,11 @@ static int cx24116_read_snr_pct(struct dvb_frontend *fe, u16 *snr)
|
||||
|
||||
dprintk("%s()\n", __func__);
|
||||
|
||||
snr_reading = cx24116_readreg(state, CX24116_REG_QUALITY0);
|
||||
ret = cx24116_readreg(state, CX24116_REG_QUALITY0);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
snr_reading = ret;
|
||||
|
||||
if (snr_reading >= 0xa0 /* 100% */)
|
||||
*snr = 0xffff;
|
||||
|
@ -269,7 +269,7 @@ static enum stb0899_status stb0899_search_carrier(struct stb0899_state *state)
|
||||
|
||||
short int derot_freq = 0, last_derot_freq = 0, derot_limit, next_loop = 3;
|
||||
int index = 0;
|
||||
u8 cfr[2];
|
||||
u8 cfr[2] = {0};
|
||||
u8 reg;
|
||||
|
||||
internal->status = NOCARRIER;
|
||||
|
@ -2519,10 +2519,10 @@ static int adv76xx_log_status(struct v4l2_subdev *sd)
|
||||
const struct adv76xx_chip_info *info = state->info;
|
||||
struct v4l2_dv_timings timings;
|
||||
struct stdi_readback stdi;
|
||||
u8 reg_io_0x02 = io_read(sd, 0x02);
|
||||
int ret;
|
||||
u8 reg_io_0x02;
|
||||
u8 edid_enabled;
|
||||
u8 cable_det;
|
||||
|
||||
static const char * const csc_coeff_sel_rb[16] = {
|
||||
"bypassed", "YPbPr601 -> RGB", "reserved", "YPbPr709 -> RGB",
|
||||
"reserved", "RGB -> YPbPr601", "reserved", "RGB -> YPbPr709",
|
||||
@ -2621,13 +2621,21 @@ static int adv76xx_log_status(struct v4l2_subdev *sd)
|
||||
v4l2_info(sd, "-----Color space-----\n");
|
||||
v4l2_info(sd, "RGB quantization range ctrl: %s\n",
|
||||
rgb_quantization_range_txt[state->rgb_quantization_range]);
|
||||
v4l2_info(sd, "Input color space: %s\n",
|
||||
input_color_space_txt[reg_io_0x02 >> 4]);
|
||||
v4l2_info(sd, "Output color space: %s %s, alt-gamma %s\n",
|
||||
(reg_io_0x02 & 0x02) ? "RGB" : "YCbCr",
|
||||
(((reg_io_0x02 >> 2) & 0x01) ^ (reg_io_0x02 & 0x01)) ?
|
||||
"(16-235)" : "(0-255)",
|
||||
(reg_io_0x02 & 0x08) ? "enabled" : "disabled");
|
||||
|
||||
ret = io_read(sd, 0x02);
|
||||
if (ret < 0) {
|
||||
v4l2_info(sd, "Can't read Input/Output color space\n");
|
||||
} else {
|
||||
reg_io_0x02 = ret;
|
||||
|
||||
v4l2_info(sd, "Input color space: %s\n",
|
||||
input_color_space_txt[reg_io_0x02 >> 4]);
|
||||
v4l2_info(sd, "Output color space: %s %s, alt-gamma %s\n",
|
||||
(reg_io_0x02 & 0x02) ? "RGB" : "YCbCr",
|
||||
(((reg_io_0x02 >> 2) & 0x01) ^ (reg_io_0x02 & 0x01)) ?
|
||||
"(16-235)" : "(0-255)",
|
||||
(reg_io_0x02 & 0x08) ? "enabled" : "disabled");
|
||||
}
|
||||
v4l2_info(sd, "Color space conversion: %s\n",
|
||||
csc_coeff_sel_rb[cp_read(sd, info->cp_csc) >> 4]);
|
||||
|
||||
|
@ -257,10 +257,10 @@ static u32 calc_pll(struct ar0521_dev *sensor, u32 freq, u16 *pre_ptr, u16 *mult
|
||||
continue; /* Minimum value */
|
||||
if (new_mult > 254)
|
||||
break; /* Maximum, larger pre won't work either */
|
||||
if (sensor->extclk_freq * (u64)new_mult < AR0521_PLL_MIN *
|
||||
if (sensor->extclk_freq * (u64)new_mult < (u64)AR0521_PLL_MIN *
|
||||
new_pre)
|
||||
continue;
|
||||
if (sensor->extclk_freq * (u64)new_mult > AR0521_PLL_MAX *
|
||||
if (sensor->extclk_freq * (u64)new_mult > (u64)AR0521_PLL_MAX *
|
||||
new_pre)
|
||||
break; /* Larger pre won't work either */
|
||||
new_pll = div64_round_up(sensor->extclk_freq * (u64)new_mult,
|
||||
|
@ -775,11 +775,14 @@ static void exynos4_jpeg_parse_decode_h_tbl(struct s5p_jpeg_ctx *ctx)
|
||||
(unsigned long)vb2_plane_vaddr(&vb->vb2_buf, 0) + ctx->out_q.sos + 2;
|
||||
jpeg_buffer.curr = 0;
|
||||
|
||||
word = 0;
|
||||
|
||||
if (get_word_be(&jpeg_buffer, &word))
|
||||
return;
|
||||
jpeg_buffer.size = (long)word - 2;
|
||||
|
||||
if (word < 2)
|
||||
jpeg_buffer.size = 0;
|
||||
else
|
||||
jpeg_buffer.size = (long)word - 2;
|
||||
|
||||
jpeg_buffer.data += 2;
|
||||
jpeg_buffer.curr = 0;
|
||||
|
||||
@ -1058,6 +1061,7 @@ static int get_word_be(struct s5p_jpeg_buffer *buf, unsigned int *word)
|
||||
if (byte == -1)
|
||||
return -1;
|
||||
*word = (unsigned int)byte | temp;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1145,7 +1149,7 @@ static bool s5p_jpeg_parse_hdr(struct s5p_jpeg_q_data *result,
|
||||
if (get_word_be(&jpeg_buffer, &word))
|
||||
break;
|
||||
length = (long)word - 2;
|
||||
if (!length)
|
||||
if (length <= 0)
|
||||
return false;
|
||||
sof = jpeg_buffer.curr; /* after 0xffc0 */
|
||||
sof_len = length;
|
||||
@ -1176,7 +1180,7 @@ static bool s5p_jpeg_parse_hdr(struct s5p_jpeg_q_data *result,
|
||||
if (get_word_be(&jpeg_buffer, &word))
|
||||
break;
|
||||
length = (long)word - 2;
|
||||
if (!length)
|
||||
if (length <= 0)
|
||||
return false;
|
||||
if (n_dqt >= S5P_JPEG_MAX_MARKER)
|
||||
return false;
|
||||
@ -1189,7 +1193,7 @@ static bool s5p_jpeg_parse_hdr(struct s5p_jpeg_q_data *result,
|
||||
if (get_word_be(&jpeg_buffer, &word))
|
||||
break;
|
||||
length = (long)word - 2;
|
||||
if (!length)
|
||||
if (length <= 0)
|
||||
return false;
|
||||
if (n_dht >= S5P_JPEG_MAX_MARKER)
|
||||
return false;
|
||||
@ -1214,6 +1218,7 @@ static bool s5p_jpeg_parse_hdr(struct s5p_jpeg_q_data *result,
|
||||
if (get_word_be(&jpeg_buffer, &word))
|
||||
break;
|
||||
length = (long)word - 2;
|
||||
/* No need to check underflows as skip() does it */
|
||||
skip(&jpeg_buffer, length);
|
||||
break;
|
||||
}
|
||||
|
@ -371,7 +371,7 @@ static int uvc_parse_format(struct uvc_device *dev,
|
||||
* Parse the frame descriptors. Only uncompressed, MJPEG and frame
|
||||
* based formats have frame descriptors.
|
||||
*/
|
||||
while (buflen > 2 && buffer[1] == USB_DT_CS_INTERFACE &&
|
||||
while (ftype && buflen > 2 && buffer[1] == USB_DT_CS_INTERFACE &&
|
||||
buffer[2] == ftype) {
|
||||
unsigned int maxIntervalIndex;
|
||||
|
||||
|
@ -753,9 +753,10 @@ static int get_ctrl(struct v4l2_ctrl *ctrl, struct v4l2_ext_control *c)
|
||||
for (i = 0; i < master->ncontrols; i++)
|
||||
cur_to_new(master->cluster[i]);
|
||||
ret = call_op(master, g_volatile_ctrl);
|
||||
new_to_user(c, ctrl);
|
||||
if (!ret)
|
||||
ret = new_to_user(c, ctrl);
|
||||
} else {
|
||||
cur_to_user(c, ctrl);
|
||||
ret = cur_to_user(c, ctrl);
|
||||
}
|
||||
v4l2_ctrl_unlock(master);
|
||||
return ret;
|
||||
@ -770,7 +771,10 @@ int v4l2_g_ctrl(struct v4l2_ctrl_handler *hdl, struct v4l2_control *control)
|
||||
if (!ctrl || !ctrl->is_int)
|
||||
return -EINVAL;
|
||||
ret = get_ctrl(ctrl, &c);
|
||||
control->value = c.value;
|
||||
|
||||
if (!ret)
|
||||
control->value = c.value;
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(v4l2_g_ctrl);
|
||||
@ -811,10 +815,11 @@ static int set_ctrl_lock(struct v4l2_fh *fh, struct v4l2_ctrl *ctrl,
|
||||
int ret;
|
||||
|
||||
v4l2_ctrl_lock(ctrl);
|
||||
user_to_new(c, ctrl);
|
||||
ret = set_ctrl(fh, ctrl, 0);
|
||||
ret = user_to_new(c, ctrl);
|
||||
if (!ret)
|
||||
cur_to_user(c, ctrl);
|
||||
ret = set_ctrl(fh, ctrl, 0);
|
||||
if (!ret)
|
||||
ret = cur_to_user(c, ctrl);
|
||||
v4l2_ctrl_unlock(ctrl);
|
||||
return ret;
|
||||
}
|
||||
|
@ -1011,7 +1011,6 @@ static int c_can_handle_bus_err(struct net_device *dev,
|
||||
|
||||
/* common for all type of bus errors */
|
||||
priv->can.can_stats.bus_error++;
|
||||
stats->rx_errors++;
|
||||
|
||||
/* propagate the error condition to the CAN stack */
|
||||
skb = alloc_can_err_skb(dev, &cf);
|
||||
@ -1027,26 +1026,32 @@ static int c_can_handle_bus_err(struct net_device *dev,
|
||||
case LEC_STUFF_ERROR:
|
||||
netdev_dbg(dev, "stuff error\n");
|
||||
cf->data[2] |= CAN_ERR_PROT_STUFF;
|
||||
stats->rx_errors++;
|
||||
break;
|
||||
case LEC_FORM_ERROR:
|
||||
netdev_dbg(dev, "form error\n");
|
||||
cf->data[2] |= CAN_ERR_PROT_FORM;
|
||||
stats->rx_errors++;
|
||||
break;
|
||||
case LEC_ACK_ERROR:
|
||||
netdev_dbg(dev, "ack error\n");
|
||||
cf->data[3] = CAN_ERR_PROT_LOC_ACK;
|
||||
stats->tx_errors++;
|
||||
break;
|
||||
case LEC_BIT1_ERROR:
|
||||
netdev_dbg(dev, "bit1 error\n");
|
||||
cf->data[2] |= CAN_ERR_PROT_BIT1;
|
||||
stats->tx_errors++;
|
||||
break;
|
||||
case LEC_BIT0_ERROR:
|
||||
netdev_dbg(dev, "bit0 error\n");
|
||||
cf->data[2] |= CAN_ERR_PROT_BIT0;
|
||||
stats->tx_errors++;
|
||||
break;
|
||||
case LEC_CRC_ERROR:
|
||||
netdev_dbg(dev, "CRC error\n");
|
||||
cf->data[3] = CAN_ERR_PROT_LOC_CRC_SEQ;
|
||||
stats->rx_errors++;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -1600,7 +1600,8 @@ static int m_can_close(struct net_device *dev)
|
||||
netif_stop_queue(dev);
|
||||
|
||||
m_can_stop(dev);
|
||||
free_irq(dev->irq, dev);
|
||||
if (dev->irq)
|
||||
free_irq(dev->irq, dev);
|
||||
|
||||
if (cdev->is_peripheral) {
|
||||
cdev->tx_skb = NULL;
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// mcp251xfd - Microchip MCP251xFD Family CAN controller driver
|
||||
//
|
||||
// Copyright (c) 2019, 2020, 2021 Pengutronix,
|
||||
// Copyright (c) 2019, 2020, 2021, 2024 Pengutronix,
|
||||
// Marc Kleine-Budde <kernel@pengutronix.de>
|
||||
//
|
||||
// Based on:
|
||||
@ -483,9 +483,11 @@ int mcp251xfd_ring_alloc(struct mcp251xfd_priv *priv)
|
||||
};
|
||||
const struct ethtool_coalesce ec = {
|
||||
.rx_coalesce_usecs_irq = priv->rx_coalesce_usecs_irq,
|
||||
.rx_max_coalesced_frames_irq = priv->rx_obj_num_coalesce_irq,
|
||||
.rx_max_coalesced_frames_irq = priv->rx_obj_num_coalesce_irq == 0 ?
|
||||
1 : priv->rx_obj_num_coalesce_irq,
|
||||
.tx_coalesce_usecs_irq = priv->tx_coalesce_usecs_irq,
|
||||
.tx_max_coalesced_frames_irq = priv->tx_obj_num_coalesce_irq,
|
||||
.tx_max_coalesced_frames_irq = priv->tx_obj_num_coalesce_irq == 0 ?
|
||||
1 : priv->tx_obj_num_coalesce_irq,
|
||||
};
|
||||
struct can_ram_layout layout;
|
||||
|
||||
|
@ -16,9 +16,9 @@
|
||||
|
||||
#include "mcp251xfd.h"
|
||||
|
||||
static inline bool mcp251xfd_tx_fifo_sta_full(u32 fifo_sta)
|
||||
static inline bool mcp251xfd_tx_fifo_sta_empty(u32 fifo_sta)
|
||||
{
|
||||
return !(fifo_sta & MCP251XFD_REG_FIFOSTA_TFNRFNIF);
|
||||
return fifo_sta & MCP251XFD_REG_FIFOSTA_TFERFFIF;
|
||||
}
|
||||
|
||||
static inline int
|
||||
@ -122,7 +122,11 @@ mcp251xfd_get_tef_len(struct mcp251xfd_priv *priv, u8 *len_p)
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
if (mcp251xfd_tx_fifo_sta_full(fifo_sta)) {
|
||||
/* If the chip says the TX-FIFO is empty, but there are no TX
|
||||
* buffers free in the ring, we assume all have been sent.
|
||||
*/
|
||||
if (mcp251xfd_tx_fifo_sta_empty(fifo_sta) &&
|
||||
mcp251xfd_get_tx_free(tx_ring) == 0) {
|
||||
*len_p = tx_ring->obj_num;
|
||||
return 0;
|
||||
}
|
||||
|
@ -111,6 +111,7 @@ static void arc_emac_tx_clean(struct net_device *ndev)
|
||||
{
|
||||
struct arc_emac_priv *priv = netdev_priv(ndev);
|
||||
struct net_device_stats *stats = &ndev->stats;
|
||||
struct device *dev = ndev->dev.parent;
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < TX_BD_NUM; i++) {
|
||||
@ -140,7 +141,7 @@ static void arc_emac_tx_clean(struct net_device *ndev)
|
||||
stats->tx_bytes += skb->len;
|
||||
}
|
||||
|
||||
dma_unmap_single(&ndev->dev, dma_unmap_addr(tx_buff, addr),
|
||||
dma_unmap_single(dev, dma_unmap_addr(tx_buff, addr),
|
||||
dma_unmap_len(tx_buff, len), DMA_TO_DEVICE);
|
||||
|
||||
/* return the sk_buff to system */
|
||||
@ -174,6 +175,7 @@ static void arc_emac_tx_clean(struct net_device *ndev)
|
||||
static int arc_emac_rx(struct net_device *ndev, int budget)
|
||||
{
|
||||
struct arc_emac_priv *priv = netdev_priv(ndev);
|
||||
struct device *dev = ndev->dev.parent;
|
||||
unsigned int work_done;
|
||||
|
||||
for (work_done = 0; work_done < budget; work_done++) {
|
||||
@ -223,9 +225,9 @@ static int arc_emac_rx(struct net_device *ndev, int budget)
|
||||
continue;
|
||||
}
|
||||
|
||||
addr = dma_map_single(&ndev->dev, (void *)skb->data,
|
||||
addr = dma_map_single(dev, (void *)skb->data,
|
||||
EMAC_BUFFER_SIZE, DMA_FROM_DEVICE);
|
||||
if (dma_mapping_error(&ndev->dev, addr)) {
|
||||
if (dma_mapping_error(dev, addr)) {
|
||||
if (net_ratelimit())
|
||||
netdev_err(ndev, "cannot map dma buffer\n");
|
||||
dev_kfree_skb(skb);
|
||||
@ -237,7 +239,7 @@ static int arc_emac_rx(struct net_device *ndev, int budget)
|
||||
}
|
||||
|
||||
/* unmap previosly mapped skb */
|
||||
dma_unmap_single(&ndev->dev, dma_unmap_addr(rx_buff, addr),
|
||||
dma_unmap_single(dev, dma_unmap_addr(rx_buff, addr),
|
||||
dma_unmap_len(rx_buff, len), DMA_FROM_DEVICE);
|
||||
|
||||
pktlen = info & LEN_MASK;
|
||||
@ -423,6 +425,7 @@ static int arc_emac_open(struct net_device *ndev)
|
||||
{
|
||||
struct arc_emac_priv *priv = netdev_priv(ndev);
|
||||
struct phy_device *phy_dev = ndev->phydev;
|
||||
struct device *dev = ndev->dev.parent;
|
||||
int i;
|
||||
|
||||
phy_dev->autoneg = AUTONEG_ENABLE;
|
||||
@ -445,9 +448,9 @@ static int arc_emac_open(struct net_device *ndev)
|
||||
if (unlikely(!rx_buff->skb))
|
||||
return -ENOMEM;
|
||||
|
||||
addr = dma_map_single(&ndev->dev, (void *)rx_buff->skb->data,
|
||||
addr = dma_map_single(dev, (void *)rx_buff->skb->data,
|
||||
EMAC_BUFFER_SIZE, DMA_FROM_DEVICE);
|
||||
if (dma_mapping_error(&ndev->dev, addr)) {
|
||||
if (dma_mapping_error(dev, addr)) {
|
||||
netdev_err(ndev, "cannot dma map\n");
|
||||
dev_kfree_skb(rx_buff->skb);
|
||||
return -ENOMEM;
|
||||
@ -548,6 +551,7 @@ static void arc_emac_set_rx_mode(struct net_device *ndev)
|
||||
static void arc_free_tx_queue(struct net_device *ndev)
|
||||
{
|
||||
struct arc_emac_priv *priv = netdev_priv(ndev);
|
||||
struct device *dev = ndev->dev.parent;
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < TX_BD_NUM; i++) {
|
||||
@ -555,7 +559,7 @@ static void arc_free_tx_queue(struct net_device *ndev)
|
||||
struct buffer_state *tx_buff = &priv->tx_buff[i];
|
||||
|
||||
if (tx_buff->skb) {
|
||||
dma_unmap_single(&ndev->dev,
|
||||
dma_unmap_single(dev,
|
||||
dma_unmap_addr(tx_buff, addr),
|
||||
dma_unmap_len(tx_buff, len),
|
||||
DMA_TO_DEVICE);
|
||||
@ -579,6 +583,7 @@ static void arc_free_tx_queue(struct net_device *ndev)
|
||||
static void arc_free_rx_queue(struct net_device *ndev)
|
||||
{
|
||||
struct arc_emac_priv *priv = netdev_priv(ndev);
|
||||
struct device *dev = ndev->dev.parent;
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < RX_BD_NUM; i++) {
|
||||
@ -586,7 +591,7 @@ static void arc_free_rx_queue(struct net_device *ndev)
|
||||
struct buffer_state *rx_buff = &priv->rx_buff[i];
|
||||
|
||||
if (rx_buff->skb) {
|
||||
dma_unmap_single(&ndev->dev,
|
||||
dma_unmap_single(dev,
|
||||
dma_unmap_addr(rx_buff, addr),
|
||||
dma_unmap_len(rx_buff, len),
|
||||
DMA_FROM_DEVICE);
|
||||
@ -679,6 +684,7 @@ static netdev_tx_t arc_emac_tx(struct sk_buff *skb, struct net_device *ndev)
|
||||
unsigned int len, *txbd_curr = &priv->txbd_curr;
|
||||
struct net_device_stats *stats = &ndev->stats;
|
||||
__le32 *info = &priv->txbd[*txbd_curr].info;
|
||||
struct device *dev = ndev->dev.parent;
|
||||
dma_addr_t addr;
|
||||
|
||||
if (skb_padto(skb, ETH_ZLEN))
|
||||
@ -692,10 +698,9 @@ static netdev_tx_t arc_emac_tx(struct sk_buff *skb, struct net_device *ndev)
|
||||
return NETDEV_TX_BUSY;
|
||||
}
|
||||
|
||||
addr = dma_map_single(&ndev->dev, (void *)skb->data, len,
|
||||
DMA_TO_DEVICE);
|
||||
addr = dma_map_single(dev, (void *)skb->data, len, DMA_TO_DEVICE);
|
||||
|
||||
if (unlikely(dma_mapping_error(&ndev->dev, addr))) {
|
||||
if (unlikely(dma_mapping_error(dev, addr))) {
|
||||
stats->tx_dropped++;
|
||||
stats->tx_errors++;
|
||||
dev_kfree_skb_any(skb);
|
||||
|
@ -133,6 +133,7 @@ int arc_mdio_probe(struct arc_emac_priv *priv)
|
||||
struct arc_emac_mdio_bus_data *data = &priv->bus_data;
|
||||
struct device_node *np = priv->dev->of_node;
|
||||
const char *name = "Synopsys MII Bus";
|
||||
struct device_node *mdio_node;
|
||||
struct mii_bus *bus;
|
||||
int error;
|
||||
|
||||
@ -164,7 +165,13 @@ int arc_mdio_probe(struct arc_emac_priv *priv)
|
||||
|
||||
snprintf(bus->id, MII_BUS_ID_SIZE, "%s", bus->name);
|
||||
|
||||
error = of_mdiobus_register(bus, priv->dev->of_node);
|
||||
/* Backwards compatibility for EMAC nodes without MDIO subnode. */
|
||||
mdio_node = of_get_child_by_name(np, "mdio");
|
||||
if (!mdio_node)
|
||||
mdio_node = of_node_get(np);
|
||||
|
||||
error = of_mdiobus_register(bus, mdio_node);
|
||||
of_node_put(mdio_node);
|
||||
if (error) {
|
||||
mdiobus_free(bus);
|
||||
return dev_err_probe(priv->dev, error,
|
||||
|
@ -665,19 +665,11 @@ static int enetc_sriov_configure(struct pci_dev *pdev, int num_vfs)
|
||||
|
||||
if (!num_vfs) {
|
||||
enetc_msg_psi_free(pf);
|
||||
kfree(pf->vf_state);
|
||||
pf->num_vfs = 0;
|
||||
pci_disable_sriov(pdev);
|
||||
} else {
|
||||
pf->num_vfs = num_vfs;
|
||||
|
||||
pf->vf_state = kcalloc(num_vfs, sizeof(struct enetc_vf_state),
|
||||
GFP_KERNEL);
|
||||
if (!pf->vf_state) {
|
||||
pf->num_vfs = 0;
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
err = enetc_msg_psi_init(pf);
|
||||
if (err) {
|
||||
dev_err(&pdev->dev, "enetc_msg_psi_init (%d)\n", err);
|
||||
@ -696,7 +688,6 @@ static int enetc_sriov_configure(struct pci_dev *pdev, int num_vfs)
|
||||
err_en_sriov:
|
||||
enetc_msg_psi_free(pf);
|
||||
err_msg_psi:
|
||||
kfree(pf->vf_state);
|
||||
pf->num_vfs = 0;
|
||||
|
||||
return err;
|
||||
@ -1283,6 +1274,12 @@ static int enetc_pf_probe(struct pci_dev *pdev,
|
||||
pf = enetc_si_priv(si);
|
||||
pf->si = si;
|
||||
pf->total_vfs = pci_sriov_get_totalvfs(pdev);
|
||||
if (pf->total_vfs) {
|
||||
pf->vf_state = kcalloc(pf->total_vfs, sizeof(struct enetc_vf_state),
|
||||
GFP_KERNEL);
|
||||
if (!pf->vf_state)
|
||||
goto err_alloc_vf_state;
|
||||
}
|
||||
|
||||
err = enetc_setup_mac_addresses(node, pf);
|
||||
if (err)
|
||||
@ -1360,6 +1357,8 @@ err_alloc_si_res:
|
||||
free_netdev(ndev);
|
||||
err_alloc_netdev:
|
||||
err_setup_mac_addresses:
|
||||
kfree(pf->vf_state);
|
||||
err_alloc_vf_state:
|
||||
enetc_psi_destroy(pdev);
|
||||
err_psi_create:
|
||||
return err;
|
||||
@ -1386,6 +1385,7 @@ static void enetc_pf_remove(struct pci_dev *pdev)
|
||||
enetc_free_si_resources(priv);
|
||||
|
||||
free_netdev(si->ndev);
|
||||
kfree(pf->vf_state);
|
||||
|
||||
enetc_psi_destroy(pdev);
|
||||
}
|
||||
|
@ -78,11 +78,18 @@ static int enetc_vf_set_mac_addr(struct net_device *ndev, void *addr)
|
||||
{
|
||||
struct enetc_ndev_priv *priv = netdev_priv(ndev);
|
||||
struct sockaddr *saddr = addr;
|
||||
int err;
|
||||
|
||||
if (!is_valid_ether_addr(saddr->sa_data))
|
||||
return -EADDRNOTAVAIL;
|
||||
|
||||
return enetc_msg_vsi_set_primary_mac_addr(priv, saddr);
|
||||
err = enetc_msg_vsi_set_primary_mac_addr(priv, saddr);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
eth_hw_addr_set(ndev, saddr->sa_data);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int enetc_vf_set_features(struct net_device *ndev,
|
||||
|
@ -25,8 +25,11 @@ void hnae3_unregister_ae_algo_prepare(struct hnae3_ae_algo *ae_algo)
|
||||
pci_id = pci_match_id(ae_algo->pdev_id_table, ae_dev->pdev);
|
||||
if (!pci_id)
|
||||
continue;
|
||||
if (IS_ENABLED(CONFIG_PCI_IOV))
|
||||
if (IS_ENABLED(CONFIG_PCI_IOV)) {
|
||||
device_lock(&ae_dev->pdev->dev);
|
||||
pci_disable_sriov(ae_dev->pdev);
|
||||
device_unlock(&ae_dev->pdev->dev);
|
||||
}
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(hnae3_unregister_ae_algo_prepare);
|
||||
|
@ -1205,12 +1205,10 @@ s32 e1000_enable_ulp_lpt_lp(struct e1000_hw *hw, bool to_sx)
|
||||
if (ret_val)
|
||||
goto out;
|
||||
|
||||
if (hw->mac.type != e1000_pch_mtp) {
|
||||
ret_val = e1000e_force_smbus(hw);
|
||||
if (ret_val) {
|
||||
e_dbg("Failed to force SMBUS: %d\n", ret_val);
|
||||
goto release;
|
||||
}
|
||||
ret_val = e1000e_force_smbus(hw);
|
||||
if (ret_val) {
|
||||
e_dbg("Failed to force SMBUS: %d\n", ret_val);
|
||||
goto release;
|
||||
}
|
||||
|
||||
/* Si workaround for ULP entry flow on i127/rev6 h/w. Enable
|
||||
@ -1273,13 +1271,6 @@ s32 e1000_enable_ulp_lpt_lp(struct e1000_hw *hw, bool to_sx)
|
||||
}
|
||||
|
||||
release:
|
||||
if (hw->mac.type == e1000_pch_mtp) {
|
||||
ret_val = e1000e_force_smbus(hw);
|
||||
if (ret_val)
|
||||
e_dbg("Failed to force SMBUS over MTL system: %d\n",
|
||||
ret_val);
|
||||
}
|
||||
|
||||
hw->phy.ops.release(hw);
|
||||
out:
|
||||
if (ret_val)
|
||||
|
@ -763,6 +763,7 @@ enum i40e_filter_state {
|
||||
I40E_FILTER_ACTIVE, /* Added to switch by FW */
|
||||
I40E_FILTER_FAILED, /* Rejected by FW */
|
||||
I40E_FILTER_REMOVE, /* To be removed */
|
||||
I40E_FILTER_NEW_SYNC, /* New, not sent yet, is in i40e_sync_vsi_filters() */
|
||||
/* There is no 'removed' state; the filter struct is freed */
|
||||
};
|
||||
struct i40e_mac_filter {
|
||||
|
@ -106,6 +106,7 @@ static char *i40e_filter_state_string[] = {
|
||||
"ACTIVE",
|
||||
"FAILED",
|
||||
"REMOVE",
|
||||
"NEW_SYNC",
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -1265,6 +1265,7 @@ int i40e_count_filters(struct i40e_vsi *vsi)
|
||||
|
||||
hash_for_each_safe(vsi->mac_filter_hash, bkt, h, f, hlist) {
|
||||
if (f->state == I40E_FILTER_NEW ||
|
||||
f->state == I40E_FILTER_NEW_SYNC ||
|
||||
f->state == I40E_FILTER_ACTIVE)
|
||||
++cnt;
|
||||
}
|
||||
@ -1451,6 +1452,8 @@ static int i40e_correct_mac_vlan_filters(struct i40e_vsi *vsi,
|
||||
|
||||
new->f = add_head;
|
||||
new->state = add_head->state;
|
||||
if (add_head->state == I40E_FILTER_NEW)
|
||||
add_head->state = I40E_FILTER_NEW_SYNC;
|
||||
|
||||
/* Add the new filter to the tmp list */
|
||||
hlist_add_head(&new->hlist, tmp_add_list);
|
||||
@ -1560,6 +1563,8 @@ static int i40e_correct_vf_mac_vlan_filters(struct i40e_vsi *vsi,
|
||||
return -ENOMEM;
|
||||
new_mac->f = add_head;
|
||||
new_mac->state = add_head->state;
|
||||
if (add_head->state == I40E_FILTER_NEW)
|
||||
add_head->state = I40E_FILTER_NEW_SYNC;
|
||||
|
||||
/* Add the new filter to the tmp list */
|
||||
hlist_add_head(&new_mac->hlist, tmp_add_list);
|
||||
@ -2445,7 +2450,8 @@ static int
|
||||
i40e_aqc_broadcast_filter(struct i40e_vsi *vsi, const char *vsi_name,
|
||||
struct i40e_mac_filter *f)
|
||||
{
|
||||
bool enable = f->state == I40E_FILTER_NEW;
|
||||
bool enable = f->state == I40E_FILTER_NEW ||
|
||||
f->state == I40E_FILTER_NEW_SYNC;
|
||||
struct i40e_hw *hw = &vsi->back->hw;
|
||||
int aq_ret;
|
||||
|
||||
@ -2619,6 +2625,7 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi)
|
||||
|
||||
/* Add it to the hash list */
|
||||
hlist_add_head(&new->hlist, &tmp_add_list);
|
||||
f->state = I40E_FILTER_NEW_SYNC;
|
||||
}
|
||||
|
||||
/* Count the number of active (current and new) VLAN
|
||||
@ -2770,7 +2777,8 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi)
|
||||
spin_lock_bh(&vsi->mac_filter_hash_lock);
|
||||
hlist_for_each_entry_safe(new, h, &tmp_add_list, hlist) {
|
||||
/* Only update the state if we're still NEW */
|
||||
if (new->f->state == I40E_FILTER_NEW)
|
||||
if (new->f->state == I40E_FILTER_NEW ||
|
||||
new->f->state == I40E_FILTER_NEW_SYNC)
|
||||
new->f->state = new->state;
|
||||
hlist_del(&new->hlist);
|
||||
netdev_hw_addr_refcnt(new->f, vsi->netdev, -1);
|
||||
|
@ -1694,11 +1694,12 @@ static int
|
||||
ice_set_fdir_input_set(struct ice_vsi *vsi, struct ethtool_rx_flow_spec *fsp,
|
||||
struct ice_fdir_fltr *input)
|
||||
{
|
||||
u16 dest_vsi, q_index = 0;
|
||||
s16 q_index = ICE_FDIR_NO_QUEUE_IDX;
|
||||
u16 orig_q_index = 0;
|
||||
struct ice_pf *pf;
|
||||
struct ice_hw *hw;
|
||||
int flow_type;
|
||||
u16 dest_vsi;
|
||||
u8 dest_ctl;
|
||||
|
||||
if (!vsi || !fsp || !input)
|
||||
|
@ -50,6 +50,8 @@
|
||||
*/
|
||||
#define ICE_FDIR_IPV4_PKT_FLAG_MF 0x20
|
||||
|
||||
#define ICE_FDIR_NO_QUEUE_IDX -1
|
||||
|
||||
enum ice_fltr_prgm_desc_dest {
|
||||
ICE_FLTR_PRGM_DESC_DEST_DROP_PKT,
|
||||
ICE_FLTR_PRGM_DESC_DEST_DIRECT_PKT_QINDEX,
|
||||
@ -181,7 +183,7 @@ struct ice_fdir_fltr {
|
||||
u16 flex_fltr;
|
||||
|
||||
/* filter control */
|
||||
u16 q_index;
|
||||
s16 q_index;
|
||||
u16 orig_q_index;
|
||||
u16 dest_vsi;
|
||||
u8 dest_ctl;
|
||||
|
@ -385,6 +385,7 @@ err_out_free_irqs:
|
||||
err_out_pci:
|
||||
ionic_dev_teardown(ionic);
|
||||
ionic_clear_pci(ionic);
|
||||
ionic_debugfs_del_dev(ionic);
|
||||
err_out:
|
||||
mutex_destroy(&ionic->dev_cmd_lock);
|
||||
ionic_devlink_free(ionic);
|
||||
|
@ -3678,6 +3678,7 @@ static int stmmac_request_irq_single(struct net_device *dev)
|
||||
/* Request the Wake IRQ in case of another line
|
||||
* is used for WoL
|
||||
*/
|
||||
priv->wol_irq_disabled = true;
|
||||
if (priv->wol_irq > 0 && priv->wol_irq != dev->irq) {
|
||||
ret = request_irq(priv->wol_irq, stmmac_interrupt,
|
||||
IRQF_SHARED, dev->name, dev);
|
||||
|
@ -222,7 +222,7 @@ static int mse102x_tx_frame_spi(struct mse102x_net *mse, struct sk_buff *txp,
|
||||
struct mse102x_net_spi *mses = to_mse102x_spi(mse);
|
||||
struct spi_transfer *xfer = &mses->spi_xfer;
|
||||
struct spi_message *msg = &mses->spi_msg;
|
||||
struct sk_buff *tskb;
|
||||
struct sk_buff *tskb = NULL;
|
||||
int ret;
|
||||
|
||||
netif_dbg(mse, tx_queued, mse->ndev, "%s: skb %p, %d@%p\n",
|
||||
@ -235,7 +235,6 @@ static int mse102x_tx_frame_spi(struct mse102x_net *mse, struct sk_buff *txp,
|
||||
if (!tskb)
|
||||
return -ENOMEM;
|
||||
|
||||
dev_kfree_skb(txp);
|
||||
txp = tskb;
|
||||
}
|
||||
|
||||
@ -257,6 +256,8 @@ static int mse102x_tx_frame_spi(struct mse102x_net *mse, struct sk_buff *txp,
|
||||
mse->stats.xfer_err++;
|
||||
}
|
||||
|
||||
dev_kfree_skb(tskb);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -147,6 +147,8 @@ MODULE_DEVICE_TABLE(mdio, dp83848_tbl);
|
||||
/* IRQ related */ \
|
||||
.config_intr = dp83848_config_intr, \
|
||||
.handle_interrupt = dp83848_handle_interrupt, \
|
||||
\
|
||||
.flags = PHY_RST_AFTER_CLK_EN, \
|
||||
}
|
||||
|
||||
static struct phy_driver dp83848_driver[] = {
|
||||
|
@ -4549,6 +4549,12 @@ static int virtnet_probe(struct virtio_device *vdev)
|
||||
if (vi->has_rss || vi->has_rss_hash_report) {
|
||||
vi->rss_key_size =
|
||||
virtio_cread8(vdev, offsetof(struct virtio_net_config, rss_max_key_size));
|
||||
if (vi->rss_key_size > VIRTIO_NET_RSS_MAX_KEY_SIZE) {
|
||||
dev_err(&vdev->dev, "rss_max_key_size=%u exceeds the limit %u.\n",
|
||||
vi->rss_key_size, VIRTIO_NET_RSS_MAX_KEY_SIZE);
|
||||
err = -EINVAL;
|
||||
goto free;
|
||||
}
|
||||
|
||||
vi->rss_hash_types_supported =
|
||||
virtio_cread32(vdev, offsetof(struct virtio_net_config, supported_hash_types));
|
||||
|
@ -226,7 +226,7 @@ int t7xx_dpmaif_rx_buf_alloc(struct dpmaif_ctrl *dpmaif_ctrl,
|
||||
return 0;
|
||||
|
||||
err_unmap_skbs:
|
||||
while (--i > 0)
|
||||
while (i--)
|
||||
t7xx_unmap_bat_skb(dpmaif_ctrl->dev, bat_req->bat_skb, i);
|
||||
|
||||
return ret;
|
||||
|
@ -931,6 +931,11 @@ static int amd_pmc_s2d_init(struct amd_pmc_dev *dev)
|
||||
amd_pmc_send_cmd(dev, S2D_PHYS_ADDR_LOW, &phys_addr_low, dev->s2d_msg_id, true);
|
||||
amd_pmc_send_cmd(dev, S2D_PHYS_ADDR_HIGH, &phys_addr_hi, dev->s2d_msg_id, true);
|
||||
|
||||
if (!phys_addr_hi && !phys_addr_low) {
|
||||
dev_err(dev->dev, "STB is not enabled on the system; disable enable_stb or contact system vendor\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
stb_phys_addr = ((u64)phys_addr_hi << 32 | phys_addr_low);
|
||||
|
||||
/* Clear msg_port for other SMU operation */
|
||||
|
@ -106,7 +106,9 @@ static int pwm_imx_tpm_round_state(struct pwm_chip *chip,
|
||||
p->prescale = prescale;
|
||||
|
||||
period_count = (clock_unit + ((1 << prescale) >> 1)) >> prescale;
|
||||
p->mod = period_count;
|
||||
if (period_count == 0)
|
||||
return -EINVAL;
|
||||
p->mod = period_count - 1;
|
||||
|
||||
/* calculate real period HW can support */
|
||||
tmp = (u64)period_count << prescale;
|
||||
|
@ -513,7 +513,7 @@ static int rtq2208_probe(struct i2c_client *i2c)
|
||||
struct regmap *regmap;
|
||||
struct rtq2208_regulator_desc *rdesc[RTQ2208_LDO_MAX];
|
||||
struct regulator_dev *rdev;
|
||||
struct regulator_config cfg;
|
||||
struct regulator_config cfg = {};
|
||||
struct rtq2208_rdev_map *rdev_map;
|
||||
int i, ret = 0, idx, n_regulator = 0;
|
||||
unsigned int regulator_idx_table[RTQ2208_LDO_MAX],
|
||||
|
@ -1354,14 +1354,18 @@ static int qcom_glink_request_intent(struct qcom_glink *glink,
|
||||
goto unlock;
|
||||
|
||||
ret = wait_event_timeout(channel->intent_req_wq,
|
||||
READ_ONCE(channel->intent_req_result) >= 0 &&
|
||||
READ_ONCE(channel->intent_received),
|
||||
READ_ONCE(channel->intent_req_result) == 0 ||
|
||||
(READ_ONCE(channel->intent_req_result) > 0 &&
|
||||
READ_ONCE(channel->intent_received)) ||
|
||||
glink->abort_tx,
|
||||
10 * HZ);
|
||||
if (!ret) {
|
||||
dev_err(glink->dev, "intent request timed out\n");
|
||||
ret = -ETIMEDOUT;
|
||||
} else if (glink->abort_tx) {
|
||||
ret = -ECANCELED;
|
||||
} else {
|
||||
ret = READ_ONCE(channel->intent_req_result) ? 0 : -ECANCELED;
|
||||
ret = READ_ONCE(channel->intent_req_result) ? 0 : -EAGAIN;
|
||||
}
|
||||
|
||||
unlock:
|
||||
|
@ -221,8 +221,7 @@ static void *sd_zbc_alloc_report_buffer(struct scsi_disk *sdkp,
|
||||
bufsize = min_t(size_t, bufsize, queue_max_segments(q) << PAGE_SHIFT);
|
||||
|
||||
while (bufsize >= SECTOR_SIZE) {
|
||||
buf = __vmalloc(bufsize,
|
||||
GFP_KERNEL | __GFP_ZERO | __GFP_NORETRY);
|
||||
buf = kvzalloc(bufsize, GFP_KERNEL | __GFP_NORETRY);
|
||||
if (buf) {
|
||||
*buflen = bufsize;
|
||||
return buf;
|
||||
|
@ -73,7 +73,14 @@ static struct irq_chip lmh_irq_chip = {
|
||||
static int lmh_irq_map(struct irq_domain *d, unsigned int irq, irq_hw_number_t hw)
|
||||
{
|
||||
struct lmh_hw_data *lmh_data = d->host_data;
|
||||
static struct lock_class_key lmh_lock_key;
|
||||
static struct lock_class_key lmh_request_key;
|
||||
|
||||
/*
|
||||
* This lock class tells lockdep that GPIO irqs are in a different
|
||||
* category than their parents, so it won't report false recursion.
|
||||
*/
|
||||
irq_set_lockdep_class(irq, &lmh_lock_key, &lmh_request_key);
|
||||
irq_set_chip_and_handler(irq, &lmh_irq_chip, handle_simple_irq);
|
||||
irq_set_chip_data(irq, lmh_data);
|
||||
|
||||
|
@ -126,18 +126,15 @@ static struct thermal_trip *thermal_of_trips_init(struct device_node *np, int *n
|
||||
struct device_node *trips;
|
||||
int ret, count;
|
||||
|
||||
*ntrips = 0;
|
||||
|
||||
trips = of_get_child_by_name(np, "trips");
|
||||
if (!trips) {
|
||||
pr_err("Failed to find 'trips' node\n");
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
if (!trips)
|
||||
return NULL;
|
||||
|
||||
count = of_get_child_count(trips);
|
||||
if (!count) {
|
||||
pr_err("No trip point defined\n");
|
||||
ret = -EINVAL;
|
||||
goto out_of_node_put;
|
||||
}
|
||||
if (!count)
|
||||
return NULL;
|
||||
|
||||
tt = kzalloc(sizeof(*tt) * count, GFP_KERNEL);
|
||||
if (!tt) {
|
||||
@ -160,7 +157,6 @@ static struct thermal_trip *thermal_of_trips_init(struct device_node *np, int *n
|
||||
|
||||
out_kfree:
|
||||
kfree(tt);
|
||||
*ntrips = 0;
|
||||
out_of_node_put:
|
||||
of_node_put(trips);
|
||||
|
||||
@ -498,11 +494,14 @@ static struct thermal_zone_device *thermal_of_zone_register(struct device_node *
|
||||
|
||||
trips = thermal_of_trips_init(np, &ntrips);
|
||||
if (IS_ERR(trips)) {
|
||||
pr_err("Failed to find trip points for %pOFn id=%d\n", sensor, id);
|
||||
pr_err("Failed to parse trip points for %pOFn id=%d\n", sensor, id);
|
||||
ret = PTR_ERR(trips);
|
||||
goto out_kfree_of_ops;
|
||||
}
|
||||
|
||||
if (!trips)
|
||||
pr_info("No trip points found for %pOFn id=%d\n", sensor, id);
|
||||
|
||||
ret = thermal_of_monitor_init(np, &delay, &pdelay);
|
||||
if (ret) {
|
||||
pr_err("Failed to initialize monitoring delays from %pOFn\n", np);
|
||||
|
@ -2106,10 +2106,18 @@ static int dwc3_suspend_common(struct dwc3 *dwc, pm_message_t msg)
|
||||
{
|
||||
u32 reg;
|
||||
|
||||
dwc->susphy_state = (dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0)) &
|
||||
DWC3_GUSB2PHYCFG_SUSPHY) ||
|
||||
(dwc3_readl(dwc->regs, DWC3_GUSB3PIPECTL(0)) &
|
||||
DWC3_GUSB3PIPECTL_SUSPHY);
|
||||
if (!pm_runtime_suspended(dwc->dev) && !PMSG_IS_AUTO(msg)) {
|
||||
dwc->susphy_state = (dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0)) &
|
||||
DWC3_GUSB2PHYCFG_SUSPHY) ||
|
||||
(dwc3_readl(dwc->regs, DWC3_GUSB3PIPECTL(0)) &
|
||||
DWC3_GUSB3PIPECTL_SUSPHY);
|
||||
/*
|
||||
* TI AM62 platform requires SUSPHY to be
|
||||
* enabled for system suspend to work.
|
||||
*/
|
||||
if (!dwc->susphy_state)
|
||||
dwc3_enable_susphy(dwc, true);
|
||||
}
|
||||
|
||||
switch (dwc->current_dr_role) {
|
||||
case DWC3_GCTL_PRTCAP_DEVICE:
|
||||
@ -2158,15 +2166,6 @@ static int dwc3_suspend_common(struct dwc3 *dwc, pm_message_t msg)
|
||||
break;
|
||||
}
|
||||
|
||||
if (!PMSG_IS_AUTO(msg)) {
|
||||
/*
|
||||
* TI AM62 platform requires SUSPHY to be
|
||||
* enabled for system suspend to work.
|
||||
*/
|
||||
if (!dwc->susphy_state)
|
||||
dwc3_enable_susphy(dwc, true);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -293,8 +293,6 @@ static int sunxi_musb_exit(struct musb *musb)
|
||||
if (test_bit(SUNXI_MUSB_FL_HAS_SRAM, &glue->flags))
|
||||
sunxi_sram_release(musb->controller->parent);
|
||||
|
||||
devm_usb_put_phy(glue->dev, glue->xceiv);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -770,11 +770,12 @@ static void edge_bulk_out_data_callback(struct urb *urb)
|
||||
static void edge_bulk_out_cmd_callback(struct urb *urb)
|
||||
{
|
||||
struct edgeport_port *edge_port = urb->context;
|
||||
struct device *dev = &urb->dev->dev;
|
||||
int status = urb->status;
|
||||
|
||||
atomic_dec(&CmdUrbs);
|
||||
dev_dbg(&urb->dev->dev, "%s - FREE URB %p (outstanding %d)\n",
|
||||
__func__, urb, atomic_read(&CmdUrbs));
|
||||
dev_dbg(dev, "%s - FREE URB %p (outstanding %d)\n", __func__, urb,
|
||||
atomic_read(&CmdUrbs));
|
||||
|
||||
|
||||
/* clean up the transfer buffer */
|
||||
@ -784,8 +785,7 @@ static void edge_bulk_out_cmd_callback(struct urb *urb)
|
||||
usb_free_urb(urb);
|
||||
|
||||
if (status) {
|
||||
dev_dbg(&urb->dev->dev,
|
||||
"%s - nonzero write bulk status received: %d\n",
|
||||
dev_dbg(dev, "%s - nonzero write bulk status received: %d\n",
|
||||
__func__, status);
|
||||
return;
|
||||
}
|
||||
|
@ -251,6 +251,7 @@ static void option_instat_callback(struct urb *urb);
|
||||
#define QUECTEL_VENDOR_ID 0x2c7c
|
||||
/* These Quectel products use Quectel's vendor ID */
|
||||
#define QUECTEL_PRODUCT_EC21 0x0121
|
||||
#define QUECTEL_PRODUCT_RG650V 0x0122
|
||||
#define QUECTEL_PRODUCT_EM061K_LTA 0x0123
|
||||
#define QUECTEL_PRODUCT_EM061K_LMS 0x0124
|
||||
#define QUECTEL_PRODUCT_EC25 0x0125
|
||||
@ -1273,6 +1274,8 @@ static const struct usb_device_id option_ids[] = {
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EG912Y, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EG916Q, 0xff, 0x00, 0x00) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500K, 0xff, 0x00, 0x00) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RG650V, 0xff, 0xff, 0x30) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RG650V, 0xff, 0, 0) },
|
||||
|
||||
{ USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) },
|
||||
{ USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CMU_300) },
|
||||
@ -2320,6 +2323,9 @@ static const struct usb_device_id option_ids[] = {
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x2cb7, 0x010b, 0xff, 0xff, 0x30) }, /* Fibocom FG150 Diag */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x2cb7, 0x010b, 0xff, 0, 0) }, /* Fibocom FG150 AT */
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0111, 0xff) }, /* Fibocom FM160 (MBIM mode) */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x2cb7, 0x0112, 0xff, 0xff, 0x30) }, /* Fibocom FG132 Diag */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x2cb7, 0x0112, 0xff, 0xff, 0x40) }, /* Fibocom FG132 AT */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x2cb7, 0x0112, 0xff, 0, 0) }, /* Fibocom FG132 NMEA */
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0115, 0xff), /* Fibocom FM135 (laptop MBIM) */
|
||||
.driver_info = RSVD(5) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x01a0, 0xff) }, /* Fibocom NL668-AM/NL652-EU (laptop MBIM) */
|
||||
|
@ -166,6 +166,8 @@ static const struct usb_device_id id_table[] = {
|
||||
{DEVICE_SWI(0x1199, 0x9090)}, /* Sierra Wireless EM7565 QDL */
|
||||
{DEVICE_SWI(0x1199, 0x9091)}, /* Sierra Wireless EM7565 */
|
||||
{DEVICE_SWI(0x1199, 0x90d2)}, /* Sierra Wireless EM9191 QDL */
|
||||
{DEVICE_SWI(0x1199, 0x90e4)}, /* Sierra Wireless EM86xx QDL*/
|
||||
{DEVICE_SWI(0x1199, 0x90e5)}, /* Sierra Wireless EM86xx */
|
||||
{DEVICE_SWI(0x1199, 0xc080)}, /* Sierra Wireless EM7590 QDL */
|
||||
{DEVICE_SWI(0x1199, 0xc081)}, /* Sierra Wireless EM7590 */
|
||||
{DEVICE_SWI(0x413c, 0x81a2)}, /* Dell Wireless 5806 Gobi(TM) 4G LTE Mobile Broadband Card */
|
||||
|
@ -161,6 +161,10 @@ qcom_pmic_typec_pdphy_pd_transmit_payload(struct pmic_typec_pdphy *pmic_typec_pd
|
||||
|
||||
spin_lock_irqsave(&pmic_typec_pdphy->lock, flags);
|
||||
|
||||
hdr_len = sizeof(msg->header);
|
||||
txbuf_len = pd_header_cnt_le(msg->header) * 4;
|
||||
txsize_len = hdr_len + txbuf_len - 1;
|
||||
|
||||
ret = regmap_read(pmic_typec_pdphy->regmap,
|
||||
pmic_typec_pdphy->base + USB_PDPHY_RX_ACKNOWLEDGE_REG,
|
||||
&val);
|
||||
@ -178,10 +182,6 @@ qcom_pmic_typec_pdphy_pd_transmit_payload(struct pmic_typec_pdphy *pmic_typec_pd
|
||||
if (ret)
|
||||
goto done;
|
||||
|
||||
hdr_len = sizeof(msg->header);
|
||||
txbuf_len = pd_header_cnt_le(msg->header) * 4;
|
||||
txsize_len = hdr_len + txbuf_len - 1;
|
||||
|
||||
/* Write message header sizeof(u16) to USB_PDPHY_TX_BUFFER_HDR_REG */
|
||||
ret = regmap_bulk_write(pmic_typec_pdphy->regmap,
|
||||
pmic_typec_pdphy->base + USB_PDPHY_TX_BUFFER_HDR_REG,
|
||||
|
@ -441,6 +441,8 @@ static void ucsi_ccg_update_set_new_cam_cmd(struct ucsi_ccg *uc,
|
||||
|
||||
port = uc->orig;
|
||||
new_cam = UCSI_SET_NEW_CAM_GET_AM(*cmd);
|
||||
if (new_cam >= ARRAY_SIZE(uc->updated))
|
||||
return;
|
||||
new_port = &uc->updated[new_cam];
|
||||
cam = new_port->linked_idx;
|
||||
enter_new_mode = UCSI_SET_NEW_CAM_ENTER(*cmd);
|
||||
|
@ -615,7 +615,7 @@ static bool insert_delayed_ref(struct btrfs_delayed_ref_root *root,
|
||||
&href->ref_add_list);
|
||||
else if (ref->action == BTRFS_DROP_DELAYED_REF) {
|
||||
ASSERT(!list_empty(&exist->add_list));
|
||||
list_del(&exist->add_list);
|
||||
list_del_init(&exist->add_list);
|
||||
} else {
|
||||
ASSERT(0);
|
||||
}
|
||||
|
@ -206,12 +206,15 @@ void nfs_set_cache_invalid(struct inode *inode, unsigned long flags)
|
||||
nfs_fscache_invalidate(inode, 0);
|
||||
flags &= ~NFS_INO_REVAL_FORCED;
|
||||
|
||||
nfsi->cache_validity |= flags;
|
||||
flags |= nfsi->cache_validity;
|
||||
if (inode->i_mapping->nrpages == 0)
|
||||
flags &= ~NFS_INO_INVALID_DATA;
|
||||
|
||||
if (inode->i_mapping->nrpages == 0) {
|
||||
nfsi->cache_validity &= ~NFS_INO_INVALID_DATA;
|
||||
nfs_ooo_clear(nfsi);
|
||||
} else if (nfsi->cache_validity & NFS_INO_INVALID_DATA) {
|
||||
/* pairs with nfs_clear_invalid_mapping()'s smp_load_acquire() */
|
||||
smp_store_release(&nfsi->cache_validity, flags);
|
||||
|
||||
if (inode->i_mapping->nrpages == 0 ||
|
||||
nfsi->cache_validity & NFS_INO_INVALID_DATA) {
|
||||
nfs_ooo_clear(nfsi);
|
||||
}
|
||||
trace_nfs_set_cache_invalid(inode, 0);
|
||||
@ -1340,6 +1343,13 @@ int nfs_clear_invalid_mapping(struct address_space *mapping)
|
||||
TASK_KILLABLE|TASK_FREEZABLE_UNSAFE);
|
||||
if (ret)
|
||||
goto out;
|
||||
smp_rmb(); /* pairs with smp_wmb() below */
|
||||
if (test_bit(NFS_INO_INVALIDATING, bitlock))
|
||||
continue;
|
||||
/* pairs with nfs_set_cache_invalid()'s smp_store_release() */
|
||||
if (!(smp_load_acquire(&nfsi->cache_validity) & NFS_INO_INVALID_DATA))
|
||||
goto out;
|
||||
/* Slow-path that double-checks with spinlock held */
|
||||
spin_lock(&inode->i_lock);
|
||||
if (test_bit(NFS_INO_INVALIDATING, bitlock)) {
|
||||
spin_unlock(&inode->i_lock);
|
||||
@ -1565,6 +1575,7 @@ void nfs_fattr_init(struct nfs_fattr *fattr)
|
||||
fattr->gencount = nfs_inc_attr_generation_counter();
|
||||
fattr->owner_name = NULL;
|
||||
fattr->group_name = NULL;
|
||||
fattr->mdsthreshold = NULL;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(nfs_fattr_init);
|
||||
|
||||
|
@ -869,7 +869,15 @@ static int nfs_request_mount(struct fs_context *fc,
|
||||
* Now ask the mount server to map our export path
|
||||
* to a file handle.
|
||||
*/
|
||||
status = nfs_mount(&request, ctx->timeo, ctx->retrans);
|
||||
if ((request.protocol == XPRT_TRANSPORT_UDP) ==
|
||||
!(ctx->flags & NFS_MOUNT_TCP))
|
||||
/*
|
||||
* NFS protocol and mount protocol are both UDP or neither UDP
|
||||
* so timeouts are compatible. Use NFS timeouts for MOUNT
|
||||
*/
|
||||
status = nfs_mount(&request, ctx->timeo, ctx->retrans);
|
||||
else
|
||||
status = nfs_mount(&request, NFS_UNSPEC_TIMEO, NFS_UNSPEC_RETRANS);
|
||||
if (status != 0) {
|
||||
dfprintk(MOUNT, "NFS: unable to mount server %s, error %d\n",
|
||||
request.hostname, status);
|
||||
|
@ -2036,8 +2036,7 @@ static int ocfs2_xa_remove(struct ocfs2_xa_loc *loc,
|
||||
rc = 0;
|
||||
ocfs2_xa_cleanup_value_truncate(loc, "removing",
|
||||
orig_clusters);
|
||||
if (rc)
|
||||
goto out;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -457,10 +457,6 @@ static vm_fault_t mmap_vmcore_fault(struct vm_fault *vmf)
|
||||
#endif
|
||||
}
|
||||
|
||||
static const struct vm_operations_struct vmcore_mmap_ops = {
|
||||
.fault = mmap_vmcore_fault,
|
||||
};
|
||||
|
||||
/**
|
||||
* vmcore_alloc_buf - allocate buffer in vmalloc memory
|
||||
* @size: size of buffer
|
||||
@ -488,6 +484,11 @@ static inline char *vmcore_alloc_buf(size_t size)
|
||||
* virtually contiguous user-space in ELF layout.
|
||||
*/
|
||||
#ifdef CONFIG_MMU
|
||||
|
||||
static const struct vm_operations_struct vmcore_mmap_ops = {
|
||||
.fault = mmap_vmcore_fault,
|
||||
};
|
||||
|
||||
/*
|
||||
* remap_oldmem_pfn_checked - do remap_oldmem_pfn_range replacing all pages
|
||||
* reported as not being ram with the zero page.
|
||||
|
@ -70,6 +70,7 @@ struct ksmbd_conn *ksmbd_conn_alloc(void)
|
||||
atomic_set(&conn->req_running, 0);
|
||||
atomic_set(&conn->r_count, 0);
|
||||
atomic_set(&conn->refcnt, 1);
|
||||
atomic_set(&conn->mux_smb_requests, 0);
|
||||
conn->total_credits = 1;
|
||||
conn->outstanding_credits = 0;
|
||||
|
||||
|
@ -107,6 +107,7 @@ struct ksmbd_conn {
|
||||
__le16 signing_algorithm;
|
||||
bool binding;
|
||||
atomic_t refcnt;
|
||||
atomic_t mux_smb_requests;
|
||||
};
|
||||
|
||||
struct ksmbd_conn_ops {
|
||||
|
@ -90,7 +90,7 @@ static int __rpc_method(char *rpc_name)
|
||||
|
||||
int ksmbd_session_rpc_open(struct ksmbd_session *sess, char *rpc_name)
|
||||
{
|
||||
struct ksmbd_session_rpc *entry;
|
||||
struct ksmbd_session_rpc *entry, *old;
|
||||
struct ksmbd_rpc_command *resp;
|
||||
int method;
|
||||
|
||||
@ -106,16 +106,19 @@ int ksmbd_session_rpc_open(struct ksmbd_session *sess, char *rpc_name)
|
||||
entry->id = ksmbd_ipc_id_alloc();
|
||||
if (entry->id < 0)
|
||||
goto free_entry;
|
||||
xa_store(&sess->rpc_handle_list, entry->id, entry, GFP_KERNEL);
|
||||
old = xa_store(&sess->rpc_handle_list, entry->id, entry, GFP_KERNEL);
|
||||
if (xa_is_err(old))
|
||||
goto free_id;
|
||||
|
||||
resp = ksmbd_rpc_open(sess, entry->id);
|
||||
if (!resp)
|
||||
goto free_id;
|
||||
goto erase_xa;
|
||||
|
||||
kvfree(resp);
|
||||
return entry->id;
|
||||
free_id:
|
||||
erase_xa:
|
||||
xa_erase(&sess->rpc_handle_list, entry->id);
|
||||
free_id:
|
||||
ksmbd_rpc_id_free(entry->id);
|
||||
free_entry:
|
||||
kfree(entry);
|
||||
@ -174,6 +177,7 @@ static void ksmbd_expire_session(struct ksmbd_conn *conn)
|
||||
unsigned long id;
|
||||
struct ksmbd_session *sess;
|
||||
|
||||
down_write(&sessions_table_lock);
|
||||
down_write(&conn->session_lock);
|
||||
xa_for_each(&conn->sessions, id, sess) {
|
||||
if (atomic_read(&sess->refcnt) == 0 &&
|
||||
@ -187,6 +191,7 @@ static void ksmbd_expire_session(struct ksmbd_conn *conn)
|
||||
}
|
||||
}
|
||||
up_write(&conn->session_lock);
|
||||
up_write(&sessions_table_lock);
|
||||
}
|
||||
|
||||
int ksmbd_session_register(struct ksmbd_conn *conn,
|
||||
@ -228,7 +233,6 @@ void ksmbd_sessions_deregister(struct ksmbd_conn *conn)
|
||||
}
|
||||
}
|
||||
}
|
||||
up_write(&sessions_table_lock);
|
||||
|
||||
down_write(&conn->session_lock);
|
||||
xa_for_each(&conn->sessions, id, sess) {
|
||||
@ -248,6 +252,7 @@ void ksmbd_sessions_deregister(struct ksmbd_conn *conn)
|
||||
}
|
||||
}
|
||||
up_write(&conn->session_lock);
|
||||
up_write(&sessions_table_lock);
|
||||
}
|
||||
|
||||
struct ksmbd_session *ksmbd_session_lookup(struct ksmbd_conn *conn,
|
||||
|
@ -238,11 +238,11 @@ static void __handle_ksmbd_work(struct ksmbd_work *work,
|
||||
} while (is_chained == true);
|
||||
|
||||
send:
|
||||
if (work->sess)
|
||||
ksmbd_user_session_put(work->sess);
|
||||
if (work->tcon)
|
||||
ksmbd_tree_connect_put(work->tcon);
|
||||
smb3_preauth_hash_rsp(work);
|
||||
if (work->sess)
|
||||
ksmbd_user_session_put(work->sess);
|
||||
if (work->sess && work->sess->enc && work->encrypted &&
|
||||
conn->ops->encrypt_resp) {
|
||||
rc = conn->ops->encrypt_resp(work);
|
||||
@ -270,6 +270,7 @@ static void handle_ksmbd_work(struct work_struct *wk)
|
||||
|
||||
ksmbd_conn_try_dequeue_request(work);
|
||||
ksmbd_free_work_struct(work);
|
||||
atomic_dec(&conn->mux_smb_requests);
|
||||
/*
|
||||
* Checking waitqueue to dropping pending requests on
|
||||
* disconnection. waitqueue_active is safe because it
|
||||
@ -291,6 +292,15 @@ static int queue_ksmbd_work(struct ksmbd_conn *conn)
|
||||
struct ksmbd_work *work;
|
||||
int err;
|
||||
|
||||
err = ksmbd_init_smb_server(conn);
|
||||
if (err)
|
||||
return 0;
|
||||
|
||||
if (atomic_inc_return(&conn->mux_smb_requests) >= conn->vals->max_credits) {
|
||||
atomic_dec_return(&conn->mux_smb_requests);
|
||||
return -ENOSPC;
|
||||
}
|
||||
|
||||
work = ksmbd_alloc_work_struct();
|
||||
if (!work) {
|
||||
pr_err("allocation for work failed\n");
|
||||
@ -301,12 +311,6 @@ static int queue_ksmbd_work(struct ksmbd_conn *conn)
|
||||
work->request_buf = conn->request_buf;
|
||||
conn->request_buf = NULL;
|
||||
|
||||
err = ksmbd_init_smb_server(work);
|
||||
if (err) {
|
||||
ksmbd_free_work_struct(work);
|
||||
return 0;
|
||||
}
|
||||
|
||||
ksmbd_conn_enqueue_request(work);
|
||||
atomic_inc(&conn->r_count);
|
||||
/* update activity on connection */
|
||||
|
@ -388,6 +388,10 @@ static struct smb_version_ops smb1_server_ops = {
|
||||
.set_rsp_status = set_smb1_rsp_status,
|
||||
};
|
||||
|
||||
static struct smb_version_values smb1_server_values = {
|
||||
.max_credits = SMB2_MAX_CREDITS,
|
||||
};
|
||||
|
||||
static int smb1_negotiate(struct ksmbd_work *work)
|
||||
{
|
||||
return ksmbd_smb_negotiate_common(work, SMB_COM_NEGOTIATE);
|
||||
@ -399,18 +403,18 @@ static struct smb_version_cmds smb1_server_cmds[1] = {
|
||||
|
||||
static int init_smb1_server(struct ksmbd_conn *conn)
|
||||
{
|
||||
conn->vals = &smb1_server_values;
|
||||
conn->ops = &smb1_server_ops;
|
||||
conn->cmds = smb1_server_cmds;
|
||||
conn->max_cmds = ARRAY_SIZE(smb1_server_cmds);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ksmbd_init_smb_server(struct ksmbd_work *work)
|
||||
int ksmbd_init_smb_server(struct ksmbd_conn *conn)
|
||||
{
|
||||
struct ksmbd_conn *conn = work->conn;
|
||||
__le32 proto;
|
||||
|
||||
proto = *(__le32 *)((struct smb_hdr *)work->request_buf)->Protocol;
|
||||
proto = *(__le32 *)((struct smb_hdr *)conn->request_buf)->Protocol;
|
||||
if (conn->need_neg == false) {
|
||||
if (proto == SMB1_PROTO_NUMBER)
|
||||
return -EINVAL;
|
||||
|
@ -427,7 +427,7 @@ bool ksmbd_smb_request(struct ksmbd_conn *conn);
|
||||
|
||||
int ksmbd_lookup_dialect_by_id(__le16 *cli_dialects, __le16 dialects_count);
|
||||
|
||||
int ksmbd_init_smb_server(struct ksmbd_work *work);
|
||||
int ksmbd_init_smb_server(struct ksmbd_conn *conn);
|
||||
|
||||
struct ksmbd_kstat;
|
||||
int ksmbd_populate_dot_dotdot_entries(struct ksmbd_work *work,
|
||||
|
@ -227,8 +227,6 @@ u32 arm_smccc_get_version(void);
|
||||
|
||||
void __init arm_smccc_version_init(u32 version, enum arm_smccc_conduit conduit);
|
||||
|
||||
extern u64 smccc_has_sve_hint;
|
||||
|
||||
/**
|
||||
* arm_smccc_get_soc_id_version()
|
||||
*
|
||||
@ -326,15 +324,6 @@ struct arm_smccc_quirk {
|
||||
} state;
|
||||
};
|
||||
|
||||
/**
|
||||
* __arm_smccc_sve_check() - Set the SVE hint bit when doing SMC calls
|
||||
*
|
||||
* Sets the SMCCC hint bit to indicate if there is live state in the SVE
|
||||
* registers, this modifies x0 in place and should never be called from C
|
||||
* code.
|
||||
*/
|
||||
asmlinkage unsigned long __arm_smccc_sve_check(unsigned long x0);
|
||||
|
||||
/**
|
||||
* __arm_smccc_smc() - make SMC calls
|
||||
* @a0-a7: arguments passed in registers 0 to 7
|
||||
@ -402,20 +391,6 @@ asmlinkage void __arm_smccc_hvc(unsigned long a0, unsigned long a1,
|
||||
|
||||
#endif
|
||||
|
||||
/* nVHE hypervisor doesn't have a current thread so needs separate checks */
|
||||
#if defined(CONFIG_ARM64_SVE) && !defined(__KVM_NVHE_HYPERVISOR__)
|
||||
|
||||
#define SMCCC_SVE_CHECK ALTERNATIVE("nop \n", "bl __arm_smccc_sve_check \n", \
|
||||
ARM64_SVE)
|
||||
#define smccc_sve_clobbers "x16", "x30", "cc",
|
||||
|
||||
#else
|
||||
|
||||
#define SMCCC_SVE_CHECK
|
||||
#define smccc_sve_clobbers
|
||||
|
||||
#endif
|
||||
|
||||
#define __constraint_read_2 "r" (arg0)
|
||||
#define __constraint_read_3 __constraint_read_2, "r" (arg1)
|
||||
#define __constraint_read_4 __constraint_read_3, "r" (arg2)
|
||||
@ -486,12 +461,11 @@ asmlinkage void __arm_smccc_hvc(unsigned long a0, unsigned long a1,
|
||||
register unsigned long r3 asm("r3"); \
|
||||
CONCATENATE(__declare_arg_, \
|
||||
COUNT_ARGS(__VA_ARGS__))(__VA_ARGS__); \
|
||||
asm volatile(SMCCC_SVE_CHECK \
|
||||
inst "\n" : \
|
||||
asm volatile(inst "\n" : \
|
||||
"=r" (r0), "=r" (r1), "=r" (r2), "=r" (r3) \
|
||||
: CONCATENATE(__constraint_read_, \
|
||||
COUNT_ARGS(__VA_ARGS__)) \
|
||||
: smccc_sve_clobbers "memory"); \
|
||||
: "memory"); \
|
||||
if (___res) \
|
||||
*___res = (typeof(*___res)){r0, r1, r2, r3}; \
|
||||
} while (0)
|
||||
@ -540,7 +514,7 @@ asmlinkage void __arm_smccc_hvc(unsigned long a0, unsigned long a1,
|
||||
asm ("" : \
|
||||
: CONCATENATE(__constraint_read_, \
|
||||
COUNT_ARGS(__VA_ARGS__)) \
|
||||
: smccc_sve_clobbers "memory"); \
|
||||
: "memory"); \
|
||||
if (___res) \
|
||||
___res->a0 = SMCCC_RET_NOT_SUPPORTED; \
|
||||
} while (0)
|
||||
|
@ -252,12 +252,19 @@ static inline void tick_dep_set_task(struct task_struct *tsk,
|
||||
if (tick_nohz_full_enabled())
|
||||
tick_nohz_dep_set_task(tsk, bit);
|
||||
}
|
||||
|
||||
static inline void tick_dep_clear_task(struct task_struct *tsk,
|
||||
enum tick_dep_bits bit)
|
||||
{
|
||||
if (tick_nohz_full_enabled())
|
||||
tick_nohz_dep_clear_task(tsk, bit);
|
||||
}
|
||||
|
||||
static inline void tick_dep_init_task(struct task_struct *tsk)
|
||||
{
|
||||
atomic_set(&tsk->tick_dep_mask, 0);
|
||||
}
|
||||
|
||||
static inline void tick_dep_set_signal(struct task_struct *tsk,
|
||||
enum tick_dep_bits bit)
|
||||
{
|
||||
@ -291,6 +298,7 @@ static inline void tick_dep_set_task(struct task_struct *tsk,
|
||||
enum tick_dep_bits bit) { }
|
||||
static inline void tick_dep_clear_task(struct task_struct *tsk,
|
||||
enum tick_dep_bits bit) { }
|
||||
static inline void tick_dep_init_task(struct task_struct *tsk) { }
|
||||
static inline void tick_dep_set_signal(struct task_struct *tsk,
|
||||
enum tick_dep_bits bit) { }
|
||||
static inline void tick_dep_clear_signal(struct signal_struct *signal,
|
||||
|
@ -131,7 +131,8 @@ static inline long get_rlimit_value(struct ucounts *ucounts, enum rlimit_type ty
|
||||
|
||||
long inc_rlimit_ucounts(struct ucounts *ucounts, enum rlimit_type type, long v);
|
||||
bool dec_rlimit_ucounts(struct ucounts *ucounts, enum rlimit_type type, long v);
|
||||
long inc_rlimit_get_ucounts(struct ucounts *ucounts, enum rlimit_type type);
|
||||
long inc_rlimit_get_ucounts(struct ucounts *ucounts, enum rlimit_type type,
|
||||
bool override_rlimit);
|
||||
void dec_rlimit_put_ucounts(struct ucounts *ucounts, enum rlimit_type type);
|
||||
bool is_rlimit_overlimit(struct ucounts *ucounts, enum rlimit_type type, unsigned long max);
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user