mirror of
https://github.com/brain-hackers/linux-brain.git
synced 2024-06-09 07:16:21 +09:00
This is the 5.4.14 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl4pSdUACgkQONu9yGCS aT7wnRAAqw7JuC+cQMI29GiTfX/+V6BHFUGp0b7EoFWg1VVqiFqEHOf4QETS2Qy1 3ZAMIBCICMgJD03WUK95tju4byNhpAVc5HDy3ir4E0ZGE6VprgbkzmVWsJhdVd0E y0whXgRj2mM0eXwCLcLz2qcruE/AxmL84rlnwZ5BwgxbOPq/xRzQQV8R3XUu2bos 1felFUzOLhfJKtZ5ig9ToJGCorc7jOU+cXrvUSvntOFGFqsEdmIfcQMoqE2cXExC WQIk/JDNGnyHlX7I55P0/OBuSv4SV5JzGZjGkkS/Orqg5/KtaOMh0dAcvp25L3jY b2bNDDnKvDEd2eb3GQNb4X7pqy8SFD5WLQH2otJjpZl6nHqOG2xCZCnrVtvf7toC kJ0ocNIeGU6OsFzAwXATh3hk6ZFlJYkQarHjvgpETkx+WBcw9yw7DFW9Pa9khkMV OWKqfGrqVyV1bTXTfZPHOHm+eBVmqTLPeoK4XeholrnBrPa50pBjexv+uN+UsQnT QQxTkDpdfFv4KIkH/qgwDh/gIJ/xtjsI9JTK+70aFbSq1HrXNeoZTYof8iLOggY8 wh/aWQGf0PVC3ffgqxd7TF6CxiVn4vaP3/FfcBQVMuTnYK03BScdAEOqBCRLvLK6 509VzsCc1N7qa3vwRTTWxr0u1aCDDgDx5iqmTXW46sYxzjfwnY4= =qNcT -----END PGP SIGNATURE----- Merge tag 'v5.4.14' into 5.4-1.0.0-imx This is the 5.4.14 stable release
This commit is contained in:
commit
961d9e6ea3
|
@ -347,6 +347,7 @@ allOf:
|
|||
- st,spear600-gmac
|
||||
|
||||
then:
|
||||
properties:
|
||||
snps,tso:
|
||||
$ref: /schemas/types.yaml#definitions/flag
|
||||
description:
|
||||
|
|
2
Makefile
2
Makefile
|
@ -1,7 +1,7 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 4
|
||||
SUBLEVEL = 13
|
||||
SUBLEVEL = 14
|
||||
EXTRAVERSION =
|
||||
NAME = Kleptomaniac Octopus
|
||||
|
||||
|
|
|
@ -167,7 +167,7 @@
|
|||
|
||||
&pcie1_rc {
|
||||
status = "okay";
|
||||
gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>;
|
||||
gpios = <&gpio5 18 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
&pcie1_ep {
|
||||
|
|
|
@ -3059,7 +3059,7 @@
|
|||
|
||||
davinci_mdio: mdio@1000 {
|
||||
compatible = "ti,cpsw-mdio","ti,davinci_mdio";
|
||||
clocks = <&gmac_clkctrl DRA7_GMAC_GMAC_CLKCTRL 0>;
|
||||
clocks = <&gmac_main_clk>;
|
||||
clock-names = "fck";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
/dts-v1/;
|
||||
|
||||
#include "imx6dl.dtsi"
|
||||
#include "imx6qdl-icore.dtsi"
|
||||
#include "imx6qdl-icore-1.5.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Engicam i.CoreM6 DualLite/Solo MIPI Starter Kit";
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
#sound-dai-cells = <0>;
|
||||
clocks = <&clk_ext_audio_codec>;
|
||||
VDDA-supply = <®_3p3v>;
|
||||
VDDIO-supply = <®_3p3v>;
|
||||
VDDIO-supply = <&sw2_reg>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -206,7 +206,7 @@
|
|||
};
|
||||
|
||||
rtc@56 {
|
||||
compatible = "rv3029c2";
|
||||
compatible = "microcrystal,rv3029";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_rtc_hw300>;
|
||||
reg = <0x56>;
|
||||
|
|
|
@ -157,10 +157,6 @@
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&snvs_poweroff {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_uart1>;
|
||||
|
|
|
@ -49,3 +49,7 @@
|
|||
reg = <0x80000000 0x10000000>;
|
||||
};
|
||||
};
|
||||
|
||||
&gpmi {
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
@ -37,10 +37,10 @@
|
|||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
cpu0: cpu@0 {
|
||||
cpu0: cpu@f00 {
|
||||
compatible = "arm,cortex-a7";
|
||||
device_type = "cpu";
|
||||
reg = <0>;
|
||||
reg = <0xf00>;
|
||||
operating-points = <
|
||||
/* KHz uV */
|
||||
720000 1125000
|
||||
|
|
|
@ -253,7 +253,7 @@
|
|||
&aobus {
|
||||
pmu: pmu@e0 {
|
||||
compatible = "amlogic,meson8-pmu", "syscon";
|
||||
reg = <0xe0 0x8>;
|
||||
reg = <0xe0 0x18>;
|
||||
};
|
||||
|
||||
pinctrl_aobus: pinctrl@84 {
|
||||
|
|
|
@ -330,8 +330,8 @@
|
|||
|
||||
target-module@56000000 {
|
||||
compatible = "ti,sysc-omap4", "ti,sysc";
|
||||
reg = <0x5601fc00 0x4>,
|
||||
<0x5601fc10 0x4>;
|
||||
reg = <0x5600fe00 0x4>,
|
||||
<0x5600fe10 0x4>;
|
||||
reg-names = "rev", "sysc";
|
||||
ti,sysc-midle = <SYSC_IDLE_FORCE>,
|
||||
<SYSC_IDLE_NO>,
|
||||
|
|
|
@ -9,6 +9,7 @@ menuconfig ARCH_DAVINCI
|
|||
select PM_GENERIC_DOMAINS if PM
|
||||
select PM_GENERIC_DOMAINS_OF if PM && OF
|
||||
select REGMAP_MMIO
|
||||
select RESET_CONTROLLER
|
||||
select HAVE_IDE
|
||||
select PINCTRL_SINGLE
|
||||
|
||||
|
|
|
@ -368,10 +368,14 @@ static void __init dra7x_evm_mmc_quirk(void)
|
|||
|
||||
static struct clockdomain *ti_sysc_find_one_clockdomain(struct clk *clk)
|
||||
{
|
||||
struct clk_hw *hw = __clk_get_hw(clk);
|
||||
struct clockdomain *clkdm = NULL;
|
||||
struct clk_hw_omap *hwclk;
|
||||
|
||||
hwclk = to_clk_hw_omap(__clk_get_hw(clk));
|
||||
hwclk = to_clk_hw_omap(hw);
|
||||
if (!omap2_clk_is_hw_omap(hw))
|
||||
return NULL;
|
||||
|
||||
if (hwclk && hwclk->clkdm_name)
|
||||
clkdm = clkdm_lookup(hwclk->clkdm_name);
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc2_pins>;
|
||||
vmmc-supply = <®_dcdc1>;
|
||||
vqmmc-supply = <®_dcdc1>;
|
||||
vqmmc-supply = <®_eldo1>;
|
||||
bus-width = <8>;
|
||||
non-removable;
|
||||
cap-mmc-hw-reset;
|
||||
|
|
|
@ -140,7 +140,7 @@
|
|||
&mmc1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc1_pins>;
|
||||
vmmc-supply = <®_aldo2>;
|
||||
vmmc-supply = <®_dcdc1>;
|
||||
vqmmc-supply = <®_dldo4>;
|
||||
mmc-pwrseq = <&wifi_pwrseq>;
|
||||
bus-width = <4>;
|
||||
|
|
|
@ -142,6 +142,15 @@
|
|||
clock-output-names = "ext-osc32k";
|
||||
};
|
||||
|
||||
pmu {
|
||||
compatible = "arm,cortex-a53-pmu";
|
||||
interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
|
||||
};
|
||||
|
||||
psci {
|
||||
compatible = "arm,psci-0.2";
|
||||
method = "smc";
|
||||
|
|
|
@ -61,10 +61,10 @@
|
|||
|
||||
pmu {
|
||||
compatible = "arm,armv8-pmuv3";
|
||||
interrupts = <0 120 8>,
|
||||
<0 121 8>,
|
||||
<0 122 8>,
|
||||
<0 123 8>;
|
||||
interrupts = <0 170 4>,
|
||||
<0 171 4>,
|
||||
<0 172 4>,
|
||||
<0 173 4>;
|
||||
interrupt-affinity = <&cpu0>,
|
||||
<&cpu1>,
|
||||
<&cpu2>,
|
||||
|
|
|
@ -1162,7 +1162,7 @@
|
|||
|
||||
toddr_a: audio-controller@100 {
|
||||
compatible = "amlogic,axg-toddr";
|
||||
reg = <0x0 0x100 0x0 0x1c>;
|
||||
reg = <0x0 0x100 0x0 0x2c>;
|
||||
#sound-dai-cells = <0>;
|
||||
sound-name-prefix = "TODDR_A";
|
||||
interrupts = <GIC_SPI 84 IRQ_TYPE_EDGE_RISING>;
|
||||
|
@ -1173,7 +1173,7 @@
|
|||
|
||||
toddr_b: audio-controller@140 {
|
||||
compatible = "amlogic,axg-toddr";
|
||||
reg = <0x0 0x140 0x0 0x1c>;
|
||||
reg = <0x0 0x140 0x0 0x2c>;
|
||||
#sound-dai-cells = <0>;
|
||||
sound-name-prefix = "TODDR_B";
|
||||
interrupts = <GIC_SPI 85 IRQ_TYPE_EDGE_RISING>;
|
||||
|
@ -1184,7 +1184,7 @@
|
|||
|
||||
toddr_c: audio-controller@180 {
|
||||
compatible = "amlogic,axg-toddr";
|
||||
reg = <0x0 0x180 0x0 0x1c>;
|
||||
reg = <0x0 0x180 0x0 0x2c>;
|
||||
#sound-dai-cells = <0>;
|
||||
sound-name-prefix = "TODDR_C";
|
||||
interrupts = <GIC_SPI 86 IRQ_TYPE_EDGE_RISING>;
|
||||
|
@ -1195,7 +1195,7 @@
|
|||
|
||||
frddr_a: audio-controller@1c0 {
|
||||
compatible = "amlogic,axg-frddr";
|
||||
reg = <0x0 0x1c0 0x0 0x1c>;
|
||||
reg = <0x0 0x1c0 0x0 0x2c>;
|
||||
#sound-dai-cells = <0>;
|
||||
sound-name-prefix = "FRDDR_A";
|
||||
interrupts = <GIC_SPI 88 IRQ_TYPE_EDGE_RISING>;
|
||||
|
@ -1206,7 +1206,7 @@
|
|||
|
||||
frddr_b: audio-controller@200 {
|
||||
compatible = "amlogic,axg-frddr";
|
||||
reg = <0x0 0x200 0x0 0x1c>;
|
||||
reg = <0x0 0x200 0x0 0x2c>;
|
||||
#sound-dai-cells = <0>;
|
||||
sound-name-prefix = "FRDDR_B";
|
||||
interrupts = <GIC_SPI 89 IRQ_TYPE_EDGE_RISING>;
|
||||
|
@ -1217,7 +1217,7 @@
|
|||
|
||||
frddr_c: audio-controller@240 {
|
||||
compatible = "amlogic,axg-frddr";
|
||||
reg = <0x0 0x240 0x0 0x1c>;
|
||||
reg = <0x0 0x240 0x0 0x2c>;
|
||||
#sound-dai-cells = <0>;
|
||||
sound-name-prefix = "FRDDR_C";
|
||||
interrupts = <GIC_SPI 90 IRQ_TYPE_EDGE_RISING>;
|
||||
|
|
|
@ -1509,7 +1509,7 @@
|
|||
toddr_a: audio-controller@100 {
|
||||
compatible = "amlogic,g12a-toddr",
|
||||
"amlogic,axg-toddr";
|
||||
reg = <0x0 0x100 0x0 0x1c>;
|
||||
reg = <0x0 0x100 0x0 0x2c>;
|
||||
#sound-dai-cells = <0>;
|
||||
sound-name-prefix = "TODDR_A";
|
||||
interrupts = <GIC_SPI 148 IRQ_TYPE_EDGE_RISING>;
|
||||
|
@ -1521,7 +1521,7 @@
|
|||
toddr_b: audio-controller@140 {
|
||||
compatible = "amlogic,g12a-toddr",
|
||||
"amlogic,axg-toddr";
|
||||
reg = <0x0 0x140 0x0 0x1c>;
|
||||
reg = <0x0 0x140 0x0 0x2c>;
|
||||
#sound-dai-cells = <0>;
|
||||
sound-name-prefix = "TODDR_B";
|
||||
interrupts = <GIC_SPI 149 IRQ_TYPE_EDGE_RISING>;
|
||||
|
@ -1533,7 +1533,7 @@
|
|||
toddr_c: audio-controller@180 {
|
||||
compatible = "amlogic,g12a-toddr",
|
||||
"amlogic,axg-toddr";
|
||||
reg = <0x0 0x180 0x0 0x1c>;
|
||||
reg = <0x0 0x180 0x0 0x2c>;
|
||||
#sound-dai-cells = <0>;
|
||||
sound-name-prefix = "TODDR_C";
|
||||
interrupts = <GIC_SPI 150 IRQ_TYPE_EDGE_RISING>;
|
||||
|
@ -1545,7 +1545,7 @@
|
|||
frddr_a: audio-controller@1c0 {
|
||||
compatible = "amlogic,g12a-frddr",
|
||||
"amlogic,axg-frddr";
|
||||
reg = <0x0 0x1c0 0x0 0x1c>;
|
||||
reg = <0x0 0x1c0 0x0 0x2c>;
|
||||
#sound-dai-cells = <0>;
|
||||
sound-name-prefix = "FRDDR_A";
|
||||
interrupts = <GIC_SPI 152 IRQ_TYPE_EDGE_RISING>;
|
||||
|
@ -1557,7 +1557,7 @@
|
|||
frddr_b: audio-controller@200 {
|
||||
compatible = "amlogic,g12a-frddr",
|
||||
"amlogic,axg-frddr";
|
||||
reg = <0x0 0x200 0x0 0x1c>;
|
||||
reg = <0x0 0x200 0x0 0x2c>;
|
||||
#sound-dai-cells = <0>;
|
||||
sound-name-prefix = "FRDDR_B";
|
||||
interrupts = <GIC_SPI 153 IRQ_TYPE_EDGE_RISING>;
|
||||
|
@ -1569,7 +1569,7 @@
|
|||
frddr_c: audio-controller@240 {
|
||||
compatible = "amlogic,g12a-frddr",
|
||||
"amlogic,axg-frddr";
|
||||
reg = <0x0 0x240 0x0 0x1c>;
|
||||
reg = <0x0 0x240 0x0 0x2c>;
|
||||
#sound-dai-cells = <0>;
|
||||
sound-name-prefix = "FRDDR_C";
|
||||
interrupts = <GIC_SPI 154 IRQ_TYPE_EDGE_RISING>;
|
||||
|
|
|
@ -33,11 +33,9 @@
|
|||
|
||||
gpio-keys-polled {
|
||||
compatible = "gpio-keys-polled";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
poll-interval = <100>;
|
||||
|
||||
button@0 {
|
||||
power-button {
|
||||
label = "power";
|
||||
linux,code = <KEY_POWER>;
|
||||
gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
/*
|
||||
* Devices shared by all Juno boards
|
||||
*/
|
||||
dma-ranges = <0 0 0 0 0x100 0>;
|
||||
|
||||
memtimer: timer@2a810000 {
|
||||
compatible = "arm,armv7-timer-mem";
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
*/
|
||||
/ {
|
||||
/* SoC fixed clocks */
|
||||
soc_uartclk: refclk7273800hz {
|
||||
soc_uartclk: refclk7372800hz {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <7273800>;
|
||||
clock-frequency = <7372800>;
|
||||
clock-output-names = "juno:uartclk";
|
||||
};
|
||||
|
||||
|
|
|
@ -421,7 +421,7 @@
|
|||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_imu>;
|
||||
interrupt-parent = <&gpio3>;
|
||||
interrupts = <19 IRQ_TYPE_LEVEL_LOW>;
|
||||
interrupts = <19 IRQ_TYPE_LEVEL_HIGH>;
|
||||
vdd-supply = <®_3v3_p>;
|
||||
vddio-supply = <®_3v3_p>;
|
||||
};
|
||||
|
|
|
@ -47,10 +47,10 @@
|
|||
|
||||
pmu {
|
||||
compatible = "arm,armv8-pmuv3";
|
||||
interrupts = <0 120 8>,
|
||||
<0 121 8>,
|
||||
<0 122 8>,
|
||||
<0 123 8>;
|
||||
interrupts = <0 170 4>,
|
||||
<0 171 4>,
|
||||
<0 172 4>,
|
||||
<0 173 4>;
|
||||
interrupt-affinity = <&cpu0>,
|
||||
<&cpu1>,
|
||||
<&cpu2>,
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
reg = <0x000>;
|
||||
enable-method = "psci";
|
||||
#cooling-cells = <2>;
|
||||
clocks = <&cpu_clk 0>;
|
||||
};
|
||||
cpu1: cpu@1 {
|
||||
device_type = "cpu";
|
||||
|
@ -28,6 +29,7 @@
|
|||
reg = <0x001>;
|
||||
enable-method = "psci";
|
||||
#cooling-cells = <2>;
|
||||
clocks = <&cpu_clk 0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -438,10 +438,10 @@
|
|||
|
||||
CP110_LABEL(nand_controller): nand@720000 {
|
||||
/*
|
||||
* Due to the limitation of the pins available
|
||||
* this controller is only usable on the CPM
|
||||
* for A7K and on the CPS for A8K.
|
||||
*/
|
||||
* Due to the limitation of the pins available
|
||||
* this controller is only usable on the CPM
|
||||
* for A7K and on the CPS for A8K.
|
||||
*/
|
||||
compatible = "marvell,armada-8k-nand-controller",
|
||||
"marvell,armada370-nand-controller";
|
||||
reg = <0x720000 0x54>;
|
||||
|
|
|
@ -27,6 +27,66 @@
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&etf {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&etm1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&etm2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&etm3 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&etm4 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&etm5 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&etm6 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&etm7 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&etm8 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&etr {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&funnel1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&funnel2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&funnel3 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&funnel4 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&funnel5 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pm8005_lsid1 {
|
||||
pm8005-regulators {
|
||||
compatible = "qcom,pm8005-regulators";
|
||||
|
@ -51,6 +111,10 @@
|
|||
vdda-phy-dpdm-supply = <&vreg_l24a_3p075>;
|
||||
};
|
||||
|
||||
&replicator1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&rpm_requests {
|
||||
pm8998-regulators {
|
||||
compatible = "qcom,rpm-pm8998-regulators";
|
||||
|
@ -249,6 +313,10 @@
|
|||
pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;
|
||||
};
|
||||
|
||||
&stm {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ufshc {
|
||||
vcc-supply = <&vreg_l20a_2p95>;
|
||||
vccq-supply = <&vreg_l26a_1p2>;
|
||||
|
|
|
@ -998,11 +998,12 @@
|
|||
#interrupt-cells = <0x2>;
|
||||
};
|
||||
|
||||
stm@6002000 {
|
||||
stm: stm@6002000 {
|
||||
compatible = "arm,coresight-stm", "arm,primecell";
|
||||
reg = <0x06002000 0x1000>,
|
||||
<0x16280000 0x180000>;
|
||||
reg-names = "stm-base", "stm-data-base";
|
||||
status = "disabled";
|
||||
|
||||
clocks = <&rpmcc RPM_SMD_QDSS_CLK>, <&rpmcc RPM_SMD_QDSS_A_CLK>;
|
||||
clock-names = "apb_pclk", "atclk";
|
||||
|
@ -1016,9 +1017,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
funnel@6041000 {
|
||||
funnel1: funnel@6041000 {
|
||||
compatible = "arm,coresight-dynamic-funnel", "arm,primecell";
|
||||
reg = <0x06041000 0x1000>;
|
||||
status = "disabled";
|
||||
|
||||
clocks = <&rpmcc RPM_SMD_QDSS_CLK>, <&rpmcc RPM_SMD_QDSS_A_CLK>;
|
||||
clock-names = "apb_pclk", "atclk";
|
||||
|
@ -1045,9 +1047,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
funnel@6042000 {
|
||||
funnel2: funnel@6042000 {
|
||||
compatible = "arm,coresight-dynamic-funnel", "arm,primecell";
|
||||
reg = <0x06042000 0x1000>;
|
||||
status = "disabled";
|
||||
|
||||
clocks = <&rpmcc RPM_SMD_QDSS_CLK>, <&rpmcc RPM_SMD_QDSS_A_CLK>;
|
||||
clock-names = "apb_pclk", "atclk";
|
||||
|
@ -1075,9 +1078,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
funnel@6045000 {
|
||||
funnel3: funnel@6045000 {
|
||||
compatible = "arm,coresight-dynamic-funnel", "arm,primecell";
|
||||
reg = <0x06045000 0x1000>;
|
||||
status = "disabled";
|
||||
|
||||
clocks = <&rpmcc RPM_SMD_QDSS_CLK>, <&rpmcc RPM_SMD_QDSS_A_CLK>;
|
||||
clock-names = "apb_pclk", "atclk";
|
||||
|
@ -1113,9 +1117,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
replicator@6046000 {
|
||||
replicator1: replicator@6046000 {
|
||||
compatible = "arm,coresight-dynamic-replicator", "arm,primecell";
|
||||
reg = <0x06046000 0x1000>;
|
||||
status = "disabled";
|
||||
|
||||
clocks = <&rpmcc RPM_SMD_QDSS_CLK>, <&rpmcc RPM_SMD_QDSS_A_CLK>;
|
||||
clock-names = "apb_pclk", "atclk";
|
||||
|
@ -1137,9 +1142,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
etf@6047000 {
|
||||
etf: etf@6047000 {
|
||||
compatible = "arm,coresight-tmc", "arm,primecell";
|
||||
reg = <0x06047000 0x1000>;
|
||||
status = "disabled";
|
||||
|
||||
clocks = <&rpmcc RPM_SMD_QDSS_CLK>, <&rpmcc RPM_SMD_QDSS_A_CLK>;
|
||||
clock-names = "apb_pclk", "atclk";
|
||||
|
@ -1163,9 +1169,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
etr@6048000 {
|
||||
etr: etr@6048000 {
|
||||
compatible = "arm,coresight-tmc", "arm,primecell";
|
||||
reg = <0x06048000 0x1000>;
|
||||
status = "disabled";
|
||||
|
||||
clocks = <&rpmcc RPM_SMD_QDSS_CLK>, <&rpmcc RPM_SMD_QDSS_A_CLK>;
|
||||
clock-names = "apb_pclk", "atclk";
|
||||
|
@ -1181,9 +1188,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
etm@7840000 {
|
||||
etm1: etm@7840000 {
|
||||
compatible = "arm,coresight-etm4x", "arm,primecell";
|
||||
reg = <0x07840000 0x1000>;
|
||||
status = "disabled";
|
||||
|
||||
clocks = <&rpmcc RPM_SMD_QDSS_CLK>, <&rpmcc RPM_SMD_QDSS_A_CLK>;
|
||||
clock-names = "apb_pclk", "atclk";
|
||||
|
@ -1200,9 +1208,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
etm@7940000 {
|
||||
etm2: etm@7940000 {
|
||||
compatible = "arm,coresight-etm4x", "arm,primecell";
|
||||
reg = <0x07940000 0x1000>;
|
||||
status = "disabled";
|
||||
|
||||
clocks = <&rpmcc RPM_SMD_QDSS_CLK>, <&rpmcc RPM_SMD_QDSS_A_CLK>;
|
||||
clock-names = "apb_pclk", "atclk";
|
||||
|
@ -1219,9 +1228,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
etm@7a40000 {
|
||||
etm3: etm@7a40000 {
|
||||
compatible = "arm,coresight-etm4x", "arm,primecell";
|
||||
reg = <0x07a40000 0x1000>;
|
||||
status = "disabled";
|
||||
|
||||
clocks = <&rpmcc RPM_SMD_QDSS_CLK>, <&rpmcc RPM_SMD_QDSS_A_CLK>;
|
||||
clock-names = "apb_pclk", "atclk";
|
||||
|
@ -1238,9 +1248,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
etm@7b40000 {
|
||||
etm4: etm@7b40000 {
|
||||
compatible = "arm,coresight-etm4x", "arm,primecell";
|
||||
reg = <0x07b40000 0x1000>;
|
||||
status = "disabled";
|
||||
|
||||
clocks = <&rpmcc RPM_SMD_QDSS_CLK>, <&rpmcc RPM_SMD_QDSS_A_CLK>;
|
||||
clock-names = "apb_pclk", "atclk";
|
||||
|
@ -1257,9 +1268,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
funnel@7b60000 { /* APSS Funnel */
|
||||
funnel4: funnel@7b60000 { /* APSS Funnel */
|
||||
compatible = "arm,coresight-etm4x", "arm,primecell";
|
||||
reg = <0x07b60000 0x1000>;
|
||||
status = "disabled";
|
||||
|
||||
clocks = <&rpmcc RPM_SMD_QDSS_CLK>, <&rpmcc RPM_SMD_QDSS_A_CLK>;
|
||||
clock-names = "apb_pclk", "atclk";
|
||||
|
@ -1343,9 +1355,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
funnel@7b70000 {
|
||||
funnel5: funnel@7b70000 {
|
||||
compatible = "arm,coresight-dynamic-funnel", "arm,primecell";
|
||||
reg = <0x07b70000 0x1000>;
|
||||
status = "disabled";
|
||||
|
||||
clocks = <&rpmcc RPM_SMD_QDSS_CLK>, <&rpmcc RPM_SMD_QDSS_A_CLK>;
|
||||
clock-names = "apb_pclk", "atclk";
|
||||
|
@ -1369,9 +1382,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
etm@7c40000 {
|
||||
etm5: etm@7c40000 {
|
||||
compatible = "arm,coresight-etm4x", "arm,primecell";
|
||||
reg = <0x07c40000 0x1000>;
|
||||
status = "disabled";
|
||||
|
||||
clocks = <&rpmcc RPM_SMD_QDSS_CLK>, <&rpmcc RPM_SMD_QDSS_A_CLK>;
|
||||
clock-names = "apb_pclk", "atclk";
|
||||
|
@ -1385,9 +1399,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
etm@7d40000 {
|
||||
etm6: etm@7d40000 {
|
||||
compatible = "arm,coresight-etm4x", "arm,primecell";
|
||||
reg = <0x07d40000 0x1000>;
|
||||
status = "disabled";
|
||||
|
||||
clocks = <&rpmcc RPM_SMD_QDSS_CLK>, <&rpmcc RPM_SMD_QDSS_A_CLK>;
|
||||
clock-names = "apb_pclk", "atclk";
|
||||
|
@ -1401,9 +1416,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
etm@7e40000 {
|
||||
etm7: etm@7e40000 {
|
||||
compatible = "arm,coresight-etm4x", "arm,primecell";
|
||||
reg = <0x07e40000 0x1000>;
|
||||
status = "disabled";
|
||||
|
||||
clocks = <&rpmcc RPM_SMD_QDSS_CLK>, <&rpmcc RPM_SMD_QDSS_A_CLK>;
|
||||
clock-names = "apb_pclk", "atclk";
|
||||
|
@ -1417,9 +1433,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
etm@7f40000 {
|
||||
etm8: etm@7f40000 {
|
||||
compatible = "arm,coresight-etm4x", "arm,primecell";
|
||||
reg = <0x07f40000 0x1000>;
|
||||
status = "disabled";
|
||||
|
||||
clocks = <&rpmcc RPM_SMD_QDSS_CLK>, <&rpmcc RPM_SMD_QDSS_A_CLK>;
|
||||
clock-names = "apb_pclk", "atclk";
|
||||
|
|
|
@ -165,6 +165,8 @@
|
|||
/delete-node/ &venus_mem;
|
||||
/delete-node/ &cdsp_mem;
|
||||
/delete-node/ &cdsp_pas;
|
||||
/delete-node/ &zap_shader;
|
||||
/delete-node/ &gpu_mem;
|
||||
|
||||
/* Increase the size from 120 MB to 128 MB */
|
||||
&mpss_region {
|
||||
|
|
|
@ -2824,7 +2824,7 @@
|
|||
|
||||
qcom,gmu = <&gmu>;
|
||||
|
||||
zap-shader {
|
||||
zap_shader: zap-shader {
|
||||
memory-region = <&gpu_mem>;
|
||||
};
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
|
||||
label = "rcar-sound";
|
||||
|
||||
dais = <&rsnd_port0>;
|
||||
dais = <&rsnd_port>;
|
||||
};
|
||||
|
||||
vbus0_usb2: regulator-vbus0-usb2 {
|
||||
|
@ -191,7 +191,7 @@
|
|||
port@2 {
|
||||
reg = <2>;
|
||||
dw_hdmi0_snd_in: endpoint {
|
||||
remote-endpoint = <&rsnd_endpoint0>;
|
||||
remote-endpoint = <&rsnd_endpoint>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -327,17 +327,15 @@
|
|||
/* Single DAI */
|
||||
#sound-dai-cells = <0>;
|
||||
|
||||
ports {
|
||||
rsnd_port0: port@0 {
|
||||
rsnd_endpoint0: endpoint {
|
||||
remote-endpoint = <&dw_hdmi0_snd_in>;
|
||||
rsnd_port: port {
|
||||
rsnd_endpoint: endpoint {
|
||||
remote-endpoint = <&dw_hdmi0_snd_in>;
|
||||
|
||||
dai-format = "i2s";
|
||||
bitclock-master = <&rsnd_endpoint0>;
|
||||
frame-master = <&rsnd_endpoint0>;
|
||||
dai-format = "i2s";
|
||||
bitclock-master = <&rsnd_endpoint>;
|
||||
frame-master = <&rsnd_endpoint>;
|
||||
|
||||
playback = <&ssi2>;
|
||||
};
|
||||
playback = <&ssi2>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1726,17 +1726,6 @@
|
|||
"ssi.1", "ssi.0";
|
||||
status = "disabled";
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
};
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
rcar_sound,ctu {
|
||||
ctu00: ctu-0 { };
|
||||
ctu01: ctu-1 { };
|
||||
|
|
|
@ -652,7 +652,7 @@
|
|||
};
|
||||
|
||||
pwm3: pwm@e6e33000 {
|
||||
compatible = "renesas,pwm-r8a7790", "renesas,pwm-rcar";
|
||||
compatible = "renesas,pwm-r8a77970", "renesas,pwm-rcar";
|
||||
reg = <0 0xe6e33000 0 8>;
|
||||
#pwm-cells = <2>;
|
||||
clocks = <&cpg CPG_MOD 523>;
|
||||
|
|
|
@ -1059,7 +1059,7 @@ static void __init log_component_list(void)
|
|||
|
||||
if (!early_ipl_comp_list_addr)
|
||||
return;
|
||||
if (ipl_block.hdr.flags & IPL_PL_FLAG_IPLSR)
|
||||
if (ipl_block.hdr.flags & IPL_PL_FLAG_SIPL)
|
||||
pr_info("Linux is running with Secure-IPL enabled\n");
|
||||
else
|
||||
pr_info("Linux is running with Secure-IPL disabled\n");
|
||||
|
|
|
@ -337,7 +337,7 @@ config UML_NET_SLIRP
|
|||
endmenu
|
||||
|
||||
config VIRTIO_UML
|
||||
tristate "UML driver for virtio devices"
|
||||
bool "UML driver for virtio devices"
|
||||
select VIRTIO
|
||||
help
|
||||
This driver provides support for virtio based paravirtual device
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
*
|
||||
* Copyright(c) 2019 Intel Corporation
|
||||
*
|
||||
* This module allows virtio devices to be used over a vhost-user socket.
|
||||
* This driver allows virtio devices to be used over a vhost-user socket.
|
||||
*
|
||||
* Guest devices can be instantiated by kernel module or command line
|
||||
* parameters. One device will be created for each parameter. Syntax:
|
||||
*
|
||||
* [virtio_uml.]device=<socket>:<virtio_id>[:<platform_id>]
|
||||
* virtio_uml.device=<socket>:<virtio_id>[:<platform_id>]
|
||||
* where:
|
||||
* <socket> := vhost-user socket path to connect
|
||||
* <virtio_id> := virtio device id (as in virtio_ids.h)
|
||||
|
|
|
@ -170,7 +170,7 @@ int __init main(int argc, char **argv, char **envp)
|
|||
* that they won't be delivered after the exec, when
|
||||
* they are definitely not expected.
|
||||
*/
|
||||
unblock_signals_trace();
|
||||
unblock_signals();
|
||||
|
||||
os_info("\n");
|
||||
/* Reboot */
|
||||
|
|
|
@ -244,6 +244,11 @@ ENTRY(efi32_stub_entry)
|
|||
leal efi32_config(%ebp), %eax
|
||||
movl %eax, efi_config(%ebp)
|
||||
|
||||
/* Disable paging */
|
||||
movl %cr0, %eax
|
||||
btrl $X86_CR0_PG_BIT, %eax
|
||||
movl %eax, %cr0
|
||||
|
||||
jmp startup_32
|
||||
ENDPROC(efi32_stub_entry)
|
||||
#endif
|
||||
|
|
|
@ -4536,6 +4536,7 @@ static struct uncore_event_desc snr_uncore_imc_freerunning_events[] = {
|
|||
INTEL_UNCORE_EVENT_DESC(write, "event=0xff,umask=0x21"),
|
||||
INTEL_UNCORE_EVENT_DESC(write.scale, "3.814697266e-6"),
|
||||
INTEL_UNCORE_EVENT_DESC(write.unit, "MiB"),
|
||||
{ /* end: all zeroes */ },
|
||||
};
|
||||
|
||||
static struct intel_uncore_ops snr_uncore_imc_freerunning_ops = {
|
||||
|
|
|
@ -615,9 +615,9 @@ static void early_detect_mem_encrypt(struct cpuinfo_x86 *c)
|
|||
return;
|
||||
|
||||
clear_all:
|
||||
clear_cpu_cap(c, X86_FEATURE_SME);
|
||||
setup_clear_cpu_cap(X86_FEATURE_SME);
|
||||
clear_sev:
|
||||
clear_cpu_cap(c, X86_FEATURE_SEV);
|
||||
setup_clear_cpu_cap(X86_FEATURE_SEV);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -618,7 +618,7 @@ static void domain_remove_cpu(int cpu, struct rdt_resource *r)
|
|||
if (static_branch_unlikely(&rdt_mon_enable_key))
|
||||
rmdir_mondata_subdir_allrdtgrp(r, d->id);
|
||||
list_del(&d->list);
|
||||
if (is_mbm_enabled())
|
||||
if (r->mon_capable && is_mbm_enabled())
|
||||
cancel_delayed_work(&d->mbm_over);
|
||||
if (is_llc_occupancy_enabled() && has_busy_rmid(r, d)) {
|
||||
/*
|
||||
|
|
|
@ -1741,9 +1741,6 @@ static int set_cache_qos_cfg(int level, bool enable)
|
|||
struct rdt_domain *d;
|
||||
int cpu;
|
||||
|
||||
if (!zalloc_cpumask_var(&cpu_mask, GFP_KERNEL))
|
||||
return -ENOMEM;
|
||||
|
||||
if (level == RDT_RESOURCE_L3)
|
||||
update = l3_qos_cfg_update;
|
||||
else if (level == RDT_RESOURCE_L2)
|
||||
|
@ -1751,6 +1748,9 @@ static int set_cache_qos_cfg(int level, bool enable)
|
|||
else
|
||||
return -EINVAL;
|
||||
|
||||
if (!zalloc_cpumask_var(&cpu_mask, GFP_KERNEL))
|
||||
return -ENOMEM;
|
||||
|
||||
r_l = &rdt_resources_all[level];
|
||||
list_for_each_entry(d, &r_l->domains, list) {
|
||||
/* Pick one CPU from each domain instance to update MSR */
|
||||
|
|
|
@ -328,7 +328,7 @@ EXPORT_SYMBOL(blk_queue_max_segment_size);
|
|||
* storage device can address. The default of 512 covers most
|
||||
* hardware.
|
||||
**/
|
||||
void blk_queue_logical_block_size(struct request_queue *q, unsigned short size)
|
||||
void blk_queue_logical_block_size(struct request_queue *q, unsigned int size)
|
||||
{
|
||||
q->limits.logical_block_size = size;
|
||||
|
||||
|
|
|
@ -266,7 +266,7 @@ static blk_status_t bsg_queue_rq(struct blk_mq_hw_ctx *hctx,
|
|||
struct request *req = bd->rq;
|
||||
struct bsg_set *bset =
|
||||
container_of(q->tag_set, struct bsg_set, tag_set);
|
||||
int sts = BLK_STS_IOERR;
|
||||
blk_status_t sts = BLK_STS_IOERR;
|
||||
int ret;
|
||||
|
||||
blk_mq_start_request(req);
|
||||
|
|
|
@ -17,7 +17,7 @@ PROGBITS = $(if $(CONFIG_ARM),%,@)progbits
|
|||
filechk_fwbin = \
|
||||
echo "/* Generated by $(src)/Makefile */" ;\
|
||||
echo " .section .rodata" ;\
|
||||
echo " .p2align $(ASM_ALIGN)" ;\
|
||||
echo " .p2align 4" ;\
|
||||
echo "_fw_$(FWSTR)_bin:" ;\
|
||||
echo " .incbin \"$(fwdir)/$(FWNAME)\"" ;\
|
||||
echo "_fw_end:" ;\
|
||||
|
|
|
@ -1113,8 +1113,8 @@ static int xlvbd_alloc_gendisk(blkif_sector_t capacity,
|
|||
if (!VDEV_IS_EXTENDED(info->vdevice)) {
|
||||
err = xen_translate_vdev(info->vdevice, &minor, &offset);
|
||||
if (err)
|
||||
return err;
|
||||
nr_parts = PARTS_PER_DISK;
|
||||
return err;
|
||||
nr_parts = PARTS_PER_DISK;
|
||||
} else {
|
||||
minor = BLKIF_MINOR_EXT(info->vdevice);
|
||||
nr_parts = PARTS_PER_EXT_DISK;
|
||||
|
|
|
@ -343,6 +343,12 @@ static int sysc_get_clocks(struct sysc *ddata)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Always add a slot for main clocks fck and ick even if unused */
|
||||
if (!nr_fck)
|
||||
ddata->nr_clocks++;
|
||||
if (!nr_ick)
|
||||
ddata->nr_clocks++;
|
||||
|
||||
ddata->clocks = devm_kcalloc(ddata->dev,
|
||||
ddata->nr_clocks, sizeof(*ddata->clocks),
|
||||
GFP_KERNEL);
|
||||
|
@ -421,7 +427,7 @@ static int sysc_enable_opt_clocks(struct sysc *ddata)
|
|||
struct clk *clock;
|
||||
int i, error;
|
||||
|
||||
if (!ddata->clocks)
|
||||
if (!ddata->clocks || ddata->nr_clocks < SYSC_OPTFCK0 + 1)
|
||||
return 0;
|
||||
|
||||
for (i = SYSC_OPTFCK0; i < SYSC_MAX_CLOCKS; i++) {
|
||||
|
@ -455,7 +461,7 @@ static void sysc_disable_opt_clocks(struct sysc *ddata)
|
|||
struct clk *clock;
|
||||
int i;
|
||||
|
||||
if (!ddata->clocks)
|
||||
if (!ddata->clocks || ddata->nr_clocks < SYSC_OPTFCK0 + 1)
|
||||
return;
|
||||
|
||||
for (i = SYSC_OPTFCK0; i < SYSC_MAX_CLOCKS; i++) {
|
||||
|
|
|
@ -3409,11 +3409,17 @@ static int __clk_core_init(struct clk_core *core)
|
|||
if (core->flags & CLK_IS_CRITICAL) {
|
||||
unsigned long flags;
|
||||
|
||||
clk_core_prepare(core);
|
||||
ret = clk_core_prepare(core);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
flags = clk_enable_lock();
|
||||
clk_core_enable(core);
|
||||
ret = clk_core_enable(core);
|
||||
clk_enable_unlock(flags);
|
||||
if (ret) {
|
||||
clk_core_unprepare(core);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
clk_core_reparent_orphans_nolock();
|
||||
|
|
|
@ -24,8 +24,8 @@ static const char * const spll_pfd_sels[] = { "spll_pfd0", "spll_pfd1", "spll_pf
|
|||
static const char * const spll_sels[] = { "spll", "spll_pfd_sel", };
|
||||
static const char * const apll_pfd_sels[] = { "apll_pfd0", "apll_pfd1", "apll_pfd2", "apll_pfd3", };
|
||||
static const char * const apll_sels[] = { "apll", "apll_pfd_sel", };
|
||||
static const char * const scs_sels[] = { "dummy", "sosc", "sirc", "firc", "dummy", "apll_sel", "spll_sel", "upll", };
|
||||
static const char * const ddr_sels[] = { "apll_pfd_sel", "upll", };
|
||||
static const char * const scs_sels[] = { "dummy", "sosc", "sirc", "firc", "dummy", "apll_sel", "spll_sel", "dummy", };
|
||||
static const char * const ddr_sels[] = { "apll_pfd_sel", "dummy", "dummy", "dummy", };
|
||||
static const char * const nic_sels[] = { "firc", "ddr_clk", };
|
||||
static const char * const periph_plat_sels[] = { "dummy", "nic1_bus_clk", "nic1_clk", "ddr_clk", "apll_pfd2", "apll_pfd1", "apll_pfd0", "upll", };
|
||||
static const char * const periph_bus_sels[] = { "dummy", "sosc_bus_clk", "dummy", "firc_bus_clk", "rosc", "nic1_bus_clk", "nic1_clk", "spll_bus_clk", };
|
||||
|
@ -110,7 +110,7 @@ static void __init imx7ulp_clk_scg1_init(struct device_node *np)
|
|||
clks[IMX7ULP_CLK_SYS_SEL] = imx_clk_hw_mux2("scs_sel", base + 0x14, 24, 4, scs_sels, ARRAY_SIZE(scs_sels));
|
||||
clks[IMX7ULP_CLK_HSRUN_SYS_SEL] = imx_clk_hw_mux2("hsrun_scs_sel", base + 0x1c, 24, 4, scs_sels, ARRAY_SIZE(scs_sels));
|
||||
clks[IMX7ULP_CLK_NIC_SEL] = imx_clk_hw_mux2("nic_sel", base + 0x40, 28, 1, nic_sels, ARRAY_SIZE(nic_sels));
|
||||
clks[IMX7ULP_CLK_DDR_SEL] = imx_clk_hw_mux_flags("ddr_sel", base + 0x30, 24, 1, ddr_sels, ARRAY_SIZE(ddr_sels), CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ENABLE);
|
||||
clks[IMX7ULP_CLK_DDR_SEL] = imx_clk_hw_mux_flags("ddr_sel", base + 0x30, 24, 2, ddr_sels, ARRAY_SIZE(ddr_sels), CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ENABLE);
|
||||
|
||||
clks[IMX7ULP_CLK_CORE_DIV] = imx_clk_hw_divider_flags("divcore", "scs_sel", base + 0x14, 16, 4, CLK_SET_RATE_PARENT);
|
||||
clks[IMX7ULP_CLK_HSRUN_CORE_DIV] = imx_clk_hw_divider_flags("hsrun_divcore", "hsrun_scs_sel", base + 0x1c, 16, 4, CLK_SET_RATE_PARENT);
|
||||
|
|
|
@ -3255,6 +3255,7 @@ static struct gdsc hlos1_vote_aggre_noc_mmu_audio_tbu_gdsc = {
|
|||
.name = "hlos1_vote_aggre_noc_mmu_audio_tbu_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = VOTABLE,
|
||||
};
|
||||
|
||||
static struct gdsc hlos1_vote_aggre_noc_mmu_pcie_tbu_gdsc = {
|
||||
|
@ -3263,6 +3264,7 @@ static struct gdsc hlos1_vote_aggre_noc_mmu_pcie_tbu_gdsc = {
|
|||
.name = "hlos1_vote_aggre_noc_mmu_pcie_tbu_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = VOTABLE,
|
||||
};
|
||||
|
||||
static struct gdsc hlos1_vote_aggre_noc_mmu_tbu1_gdsc = {
|
||||
|
@ -3271,6 +3273,7 @@ static struct gdsc hlos1_vote_aggre_noc_mmu_tbu1_gdsc = {
|
|||
.name = "hlos1_vote_aggre_noc_mmu_tbu1_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = VOTABLE,
|
||||
};
|
||||
|
||||
static struct gdsc hlos1_vote_aggre_noc_mmu_tbu2_gdsc = {
|
||||
|
@ -3279,6 +3282,7 @@ static struct gdsc hlos1_vote_aggre_noc_mmu_tbu2_gdsc = {
|
|||
.name = "hlos1_vote_aggre_noc_mmu_tbu2_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = VOTABLE,
|
||||
};
|
||||
|
||||
static struct gdsc hlos1_vote_mmnoc_mmu_tbu_hf0_gdsc = {
|
||||
|
@ -3287,6 +3291,7 @@ static struct gdsc hlos1_vote_mmnoc_mmu_tbu_hf0_gdsc = {
|
|||
.name = "hlos1_vote_mmnoc_mmu_tbu_hf0_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = VOTABLE,
|
||||
};
|
||||
|
||||
static struct gdsc hlos1_vote_mmnoc_mmu_tbu_hf1_gdsc = {
|
||||
|
@ -3295,6 +3300,7 @@ static struct gdsc hlos1_vote_mmnoc_mmu_tbu_hf1_gdsc = {
|
|||
.name = "hlos1_vote_mmnoc_mmu_tbu_hf1_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = VOTABLE,
|
||||
};
|
||||
|
||||
static struct gdsc hlos1_vote_mmnoc_mmu_tbu_sf_gdsc = {
|
||||
|
@ -3303,6 +3309,7 @@ static struct gdsc hlos1_vote_mmnoc_mmu_tbu_sf_gdsc = {
|
|||
.name = "hlos1_vote_mmnoc_mmu_tbu_sf_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = VOTABLE,
|
||||
};
|
||||
|
||||
static struct clk_regmap *gcc_sdm845_clocks[] = {
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include <linux/clk-provider.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/clk.h>
|
||||
|
||||
#include "clk.h"
|
||||
#include "clk-cpu.h"
|
||||
|
@ -1630,6 +1631,13 @@ static void __init exynos5x_clk_init(struct device_node *np,
|
|||
exynos5x_subcmus);
|
||||
}
|
||||
|
||||
/*
|
||||
* Keep top part of G3D clock path enabled permanently to ensure
|
||||
* that the internal busses get their clock regardless of the
|
||||
* main G3D clock enablement status.
|
||||
*/
|
||||
clk_prepare_enable(__clk_lookup("mout_sw_aclk_g3d"));
|
||||
|
||||
samsung_clk_of_add_provider(np, ctx);
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ int sprd_clk_regmap_init(struct platform_device *pdev,
|
|||
|
||||
if (of_find_property(node, "sprd,syscon", NULL)) {
|
||||
regmap = syscon_regmap_lookup_by_phandle(node, "sprd,syscon");
|
||||
if (IS_ERR_OR_NULL(regmap)) {
|
||||
if (IS_ERR(regmap)) {
|
||||
pr_err("%s: failed to get syscon regmap\n", __func__);
|
||||
return PTR_ERR(regmap);
|
||||
}
|
||||
|
|
|
@ -761,7 +761,8 @@ static struct ccu_mp outa_clk = {
|
|||
.reg = 0x1f0,
|
||||
.features = CCU_FEATURE_FIXED_PREDIV,
|
||||
.hw.init = CLK_HW_INIT_PARENTS("outa", out_parents,
|
||||
&ccu_mp_ops, 0),
|
||||
&ccu_mp_ops,
|
||||
CLK_SET_RATE_PARENT),
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -779,7 +780,8 @@ static struct ccu_mp outb_clk = {
|
|||
.reg = 0x1f4,
|
||||
.features = CCU_FEATURE_FIXED_PREDIV,
|
||||
.hw.init = CLK_HW_INIT_PARENTS("outb", out_parents,
|
||||
&ccu_mp_ops, 0),
|
||||
&ccu_mp_ops,
|
||||
CLK_SET_RATE_PARENT),
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -194,7 +194,7 @@ static void teo_update(struct cpuidle_driver *drv, struct cpuidle_device *dev)
|
|||
* pattern detection.
|
||||
*/
|
||||
cpu_data->intervals[cpu_data->interval_idx++] = measured_us;
|
||||
if (cpu_data->interval_idx > INTERVALS)
|
||||
if (cpu_data->interval_idx >= INTERVALS)
|
||||
cpu_data->interval_idx = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ static const struct console *earlycon_console __initdata;
|
|||
static const struct font_desc *font;
|
||||
static u32 efi_x, efi_y;
|
||||
static u64 fb_base;
|
||||
static pgprot_t fb_prot;
|
||||
static bool fb_wb;
|
||||
static void *efi_fb;
|
||||
|
||||
/*
|
||||
|
@ -33,10 +33,8 @@ static int __init efi_earlycon_remap_fb(void)
|
|||
if (!earlycon_console || !(earlycon_console->flags & CON_ENABLED))
|
||||
return 0;
|
||||
|
||||
if (pgprot_val(fb_prot) == pgprot_val(PAGE_KERNEL))
|
||||
efi_fb = memremap(fb_base, screen_info.lfb_size, MEMREMAP_WB);
|
||||
else
|
||||
efi_fb = memremap(fb_base, screen_info.lfb_size, MEMREMAP_WC);
|
||||
efi_fb = memremap(fb_base, screen_info.lfb_size,
|
||||
fb_wb ? MEMREMAP_WB : MEMREMAP_WC);
|
||||
|
||||
return efi_fb ? 0 : -ENOMEM;
|
||||
}
|
||||
|
@ -53,9 +51,12 @@ late_initcall(efi_earlycon_unmap_fb);
|
|||
|
||||
static __ref void *efi_earlycon_map(unsigned long start, unsigned long len)
|
||||
{
|
||||
pgprot_t fb_prot;
|
||||
|
||||
if (efi_fb)
|
||||
return efi_fb + start;
|
||||
|
||||
fb_prot = fb_wb ? PAGE_KERNEL : pgprot_writecombine(PAGE_KERNEL);
|
||||
return early_memremap_prot(fb_base + start, len, pgprot_val(fb_prot));
|
||||
}
|
||||
|
||||
|
@ -215,10 +216,7 @@ static int __init efi_earlycon_setup(struct earlycon_device *device,
|
|||
if (screen_info.capabilities & VIDEO_CAPABILITY_64BIT_BASE)
|
||||
fb_base |= (u64)screen_info.ext_lfb_base << 32;
|
||||
|
||||
if (opt && !strcmp(opt, "ram"))
|
||||
fb_prot = PAGE_KERNEL;
|
||||
else
|
||||
fb_prot = pgprot_writecombine(PAGE_KERNEL);
|
||||
fb_wb = opt && !strcmp(opt, "ram");
|
||||
|
||||
si = &screen_info;
|
||||
xres = si->lfb_width;
|
||||
|
|
|
@ -553,7 +553,6 @@ config GPIO_THUNDERX
|
|||
tristate "Cavium ThunderX/OCTEON-TX GPIO"
|
||||
depends on ARCH_THUNDER || (64BIT && COMPILE_TEST)
|
||||
depends on PCI_MSI
|
||||
select GPIOLIB_IRQCHIP
|
||||
select IRQ_DOMAIN_HIERARCHY
|
||||
select IRQ_FASTEOI_HIERARCHY_HANDLERS
|
||||
help
|
||||
|
|
|
@ -53,6 +53,7 @@ struct thunderx_line {
|
|||
struct thunderx_gpio {
|
||||
struct gpio_chip chip;
|
||||
u8 __iomem *register_base;
|
||||
struct irq_domain *irqd;
|
||||
struct msix_entry *msix_entries; /* per line MSI-X */
|
||||
struct thunderx_line *line_entries; /* per line irq info */
|
||||
raw_spinlock_t lock;
|
||||
|
@ -282,60 +283,54 @@ static void thunderx_gpio_set_multiple(struct gpio_chip *chip,
|
|||
}
|
||||
}
|
||||
|
||||
static void thunderx_gpio_irq_ack(struct irq_data *d)
|
||||
static void thunderx_gpio_irq_ack(struct irq_data *data)
|
||||
{
|
||||
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
|
||||
struct thunderx_gpio *txgpio = gpiochip_get_data(gc);
|
||||
struct thunderx_line *txline = irq_data_get_irq_chip_data(data);
|
||||
|
||||
writeq(GPIO_INTR_INTR,
|
||||
txgpio->register_base + intr_reg(irqd_to_hwirq(d)));
|
||||
txline->txgpio->register_base + intr_reg(txline->line));
|
||||
}
|
||||
|
||||
static void thunderx_gpio_irq_mask(struct irq_data *d)
|
||||
static void thunderx_gpio_irq_mask(struct irq_data *data)
|
||||
{
|
||||
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
|
||||
struct thunderx_gpio *txgpio = gpiochip_get_data(gc);
|
||||
struct thunderx_line *txline = irq_data_get_irq_chip_data(data);
|
||||
|
||||
writeq(GPIO_INTR_ENA_W1C,
|
||||
txgpio->register_base + intr_reg(irqd_to_hwirq(d)));
|
||||
txline->txgpio->register_base + intr_reg(txline->line));
|
||||
}
|
||||
|
||||
static void thunderx_gpio_irq_mask_ack(struct irq_data *d)
|
||||
static void thunderx_gpio_irq_mask_ack(struct irq_data *data)
|
||||
{
|
||||
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
|
||||
struct thunderx_gpio *txgpio = gpiochip_get_data(gc);
|
||||
struct thunderx_line *txline = irq_data_get_irq_chip_data(data);
|
||||
|
||||
writeq(GPIO_INTR_ENA_W1C | GPIO_INTR_INTR,
|
||||
txgpio->register_base + intr_reg(irqd_to_hwirq(d)));
|
||||
txline->txgpio->register_base + intr_reg(txline->line));
|
||||
}
|
||||
|
||||
static void thunderx_gpio_irq_unmask(struct irq_data *d)
|
||||
static void thunderx_gpio_irq_unmask(struct irq_data *data)
|
||||
{
|
||||
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
|
||||
struct thunderx_gpio *txgpio = gpiochip_get_data(gc);
|
||||
struct thunderx_line *txline = irq_data_get_irq_chip_data(data);
|
||||
|
||||
writeq(GPIO_INTR_ENA_W1S,
|
||||
txgpio->register_base + intr_reg(irqd_to_hwirq(d)));
|
||||
txline->txgpio->register_base + intr_reg(txline->line));
|
||||
}
|
||||
|
||||
static int thunderx_gpio_irq_set_type(struct irq_data *d,
|
||||
static int thunderx_gpio_irq_set_type(struct irq_data *data,
|
||||
unsigned int flow_type)
|
||||
{
|
||||
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
|
||||
struct thunderx_gpio *txgpio = gpiochip_get_data(gc);
|
||||
struct thunderx_line *txline =
|
||||
&txgpio->line_entries[irqd_to_hwirq(d)];
|
||||
struct thunderx_line *txline = irq_data_get_irq_chip_data(data);
|
||||
struct thunderx_gpio *txgpio = txline->txgpio;
|
||||
u64 bit_cfg;
|
||||
|
||||
irqd_set_trigger_type(d, flow_type);
|
||||
irqd_set_trigger_type(data, flow_type);
|
||||
|
||||
bit_cfg = txline->fil_bits | GPIO_BIT_CFG_INT_EN;
|
||||
|
||||
if (flow_type & IRQ_TYPE_EDGE_BOTH) {
|
||||
irq_set_handler_locked(d, handle_fasteoi_ack_irq);
|
||||
irq_set_handler_locked(data, handle_fasteoi_ack_irq);
|
||||
bit_cfg |= GPIO_BIT_CFG_INT_TYPE;
|
||||
} else {
|
||||
irq_set_handler_locked(d, handle_fasteoi_mask_irq);
|
||||
irq_set_handler_locked(data, handle_fasteoi_mask_irq);
|
||||
}
|
||||
|
||||
raw_spin_lock(&txgpio->lock);
|
||||
|
@ -364,6 +359,33 @@ static void thunderx_gpio_irq_disable(struct irq_data *data)
|
|||
irq_chip_disable_parent(data);
|
||||
}
|
||||
|
||||
static int thunderx_gpio_irq_request_resources(struct irq_data *data)
|
||||
{
|
||||
struct thunderx_line *txline = irq_data_get_irq_chip_data(data);
|
||||
struct thunderx_gpio *txgpio = txline->txgpio;
|
||||
int r;
|
||||
|
||||
r = gpiochip_lock_as_irq(&txgpio->chip, txline->line);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
r = irq_chip_request_resources_parent(data);
|
||||
if (r)
|
||||
gpiochip_unlock_as_irq(&txgpio->chip, txline->line);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
static void thunderx_gpio_irq_release_resources(struct irq_data *data)
|
||||
{
|
||||
struct thunderx_line *txline = irq_data_get_irq_chip_data(data);
|
||||
struct thunderx_gpio *txgpio = txline->txgpio;
|
||||
|
||||
irq_chip_release_resources_parent(data);
|
||||
|
||||
gpiochip_unlock_as_irq(&txgpio->chip, txline->line);
|
||||
}
|
||||
|
||||
/*
|
||||
* Interrupts are chained from underlying MSI-X vectors. We have
|
||||
* these irq_chip functions to be able to handle level triggering
|
||||
|
@ -380,24 +402,50 @@ static struct irq_chip thunderx_gpio_irq_chip = {
|
|||
.irq_unmask = thunderx_gpio_irq_unmask,
|
||||
.irq_eoi = irq_chip_eoi_parent,
|
||||
.irq_set_affinity = irq_chip_set_affinity_parent,
|
||||
.irq_request_resources = thunderx_gpio_irq_request_resources,
|
||||
.irq_release_resources = thunderx_gpio_irq_release_resources,
|
||||
.irq_set_type = thunderx_gpio_irq_set_type,
|
||||
|
||||
.flags = IRQCHIP_SET_TYPE_MASKED
|
||||
};
|
||||
|
||||
static int thunderx_gpio_child_to_parent_hwirq(struct gpio_chip *gc,
|
||||
unsigned int child,
|
||||
unsigned int child_type,
|
||||
unsigned int *parent,
|
||||
unsigned int *parent_type)
|
||||
static int thunderx_gpio_irq_translate(struct irq_domain *d,
|
||||
struct irq_fwspec *fwspec,
|
||||
irq_hw_number_t *hwirq,
|
||||
unsigned int *type)
|
||||
{
|
||||
struct thunderx_gpio *txgpio = gpiochip_get_data(gc);
|
||||
struct thunderx_gpio *txgpio = d->host_data;
|
||||
|
||||
*parent = txgpio->base_msi + (2 * child);
|
||||
*parent_type = IRQ_TYPE_LEVEL_HIGH;
|
||||
if (WARN_ON(fwspec->param_count < 2))
|
||||
return -EINVAL;
|
||||
if (fwspec->param[0] >= txgpio->chip.ngpio)
|
||||
return -EINVAL;
|
||||
*hwirq = fwspec->param[0];
|
||||
*type = fwspec->param[1] & IRQ_TYPE_SENSE_MASK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int thunderx_gpio_irq_alloc(struct irq_domain *d, unsigned int virq,
|
||||
unsigned int nr_irqs, void *arg)
|
||||
{
|
||||
struct thunderx_line *txline = arg;
|
||||
|
||||
return irq_domain_set_hwirq_and_chip(d, virq, txline->line,
|
||||
&thunderx_gpio_irq_chip, txline);
|
||||
}
|
||||
|
||||
static const struct irq_domain_ops thunderx_gpio_irqd_ops = {
|
||||
.alloc = thunderx_gpio_irq_alloc,
|
||||
.translate = thunderx_gpio_irq_translate
|
||||
};
|
||||
|
||||
static int thunderx_gpio_to_irq(struct gpio_chip *chip, unsigned int offset)
|
||||
{
|
||||
struct thunderx_gpio *txgpio = gpiochip_get_data(chip);
|
||||
|
||||
return irq_find_mapping(txgpio->irqd, offset);
|
||||
}
|
||||
|
||||
static int thunderx_gpio_probe(struct pci_dev *pdev,
|
||||
const struct pci_device_id *id)
|
||||
{
|
||||
|
@ -405,7 +453,6 @@ static int thunderx_gpio_probe(struct pci_dev *pdev,
|
|||
struct device *dev = &pdev->dev;
|
||||
struct thunderx_gpio *txgpio;
|
||||
struct gpio_chip *chip;
|
||||
struct gpio_irq_chip *girq;
|
||||
int ngpio, i;
|
||||
int err = 0;
|
||||
|
||||
|
@ -450,8 +497,8 @@ static int thunderx_gpio_probe(struct pci_dev *pdev,
|
|||
}
|
||||
|
||||
txgpio->msix_entries = devm_kcalloc(dev,
|
||||
ngpio, sizeof(struct msix_entry),
|
||||
GFP_KERNEL);
|
||||
ngpio, sizeof(struct msix_entry),
|
||||
GFP_KERNEL);
|
||||
if (!txgpio->msix_entries) {
|
||||
err = -ENOMEM;
|
||||
goto out;
|
||||
|
@ -492,6 +539,27 @@ static int thunderx_gpio_probe(struct pci_dev *pdev,
|
|||
if (err < 0)
|
||||
goto out;
|
||||
|
||||
/*
|
||||
* Push GPIO specific irqdomain on hierarchy created as a side
|
||||
* effect of the pci_enable_msix()
|
||||
*/
|
||||
txgpio->irqd = irq_domain_create_hierarchy(irq_get_irq_data(txgpio->msix_entries[0].vector)->domain,
|
||||
0, 0, of_node_to_fwnode(dev->of_node),
|
||||
&thunderx_gpio_irqd_ops, txgpio);
|
||||
if (!txgpio->irqd) {
|
||||
err = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Push on irq_data and the domain for each line. */
|
||||
for (i = 0; i < ngpio; i++) {
|
||||
err = irq_domain_push_irq(txgpio->irqd,
|
||||
txgpio->msix_entries[i].vector,
|
||||
&txgpio->line_entries[i]);
|
||||
if (err < 0)
|
||||
dev_err(dev, "irq_domain_push_irq: %d\n", err);
|
||||
}
|
||||
|
||||
chip->label = KBUILD_MODNAME;
|
||||
chip->parent = dev;
|
||||
chip->owner = THIS_MODULE;
|
||||
|
@ -506,28 +574,11 @@ static int thunderx_gpio_probe(struct pci_dev *pdev,
|
|||
chip->set = thunderx_gpio_set;
|
||||
chip->set_multiple = thunderx_gpio_set_multiple;
|
||||
chip->set_config = thunderx_gpio_set_config;
|
||||
girq = &chip->irq;
|
||||
girq->chip = &thunderx_gpio_irq_chip;
|
||||
girq->fwnode = of_node_to_fwnode(dev->of_node);
|
||||
girq->parent_domain =
|
||||
irq_get_irq_data(txgpio->msix_entries[0].vector)->domain;
|
||||
girq->child_to_parent_hwirq = thunderx_gpio_child_to_parent_hwirq;
|
||||
girq->handler = handle_bad_irq;
|
||||
girq->default_type = IRQ_TYPE_NONE;
|
||||
|
||||
chip->to_irq = thunderx_gpio_to_irq;
|
||||
err = devm_gpiochip_add_data(dev, chip, txgpio);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
/* Push on irq_data and the domain for each line. */
|
||||
for (i = 0; i < ngpio; i++) {
|
||||
err = irq_domain_push_irq(chip->irq.domain,
|
||||
txgpio->msix_entries[i].vector,
|
||||
chip);
|
||||
if (err < 0)
|
||||
dev_err(dev, "irq_domain_push_irq: %d\n", err);
|
||||
}
|
||||
|
||||
dev_info(dev, "ThunderX GPIO: %d lines with base %d.\n",
|
||||
ngpio, chip->base);
|
||||
return 0;
|
||||
|
@ -542,10 +593,10 @@ static void thunderx_gpio_remove(struct pci_dev *pdev)
|
|||
struct thunderx_gpio *txgpio = pci_get_drvdata(pdev);
|
||||
|
||||
for (i = 0; i < txgpio->chip.ngpio; i++)
|
||||
irq_domain_pop_irq(txgpio->chip.irq.domain,
|
||||
irq_domain_pop_irq(txgpio->irqd,
|
||||
txgpio->msix_entries[i].vector);
|
||||
|
||||
irq_domain_remove(txgpio->chip.irq.domain);
|
||||
irq_domain_remove(txgpio->irqd);
|
||||
|
||||
pci_set_drvdata(pdev, NULL);
|
||||
}
|
||||
|
|
|
@ -2923,7 +2923,9 @@ static void gfx_v9_0_init_pg(struct amdgpu_device *adev)
|
|||
* And it's needed by gfxoff feature.
|
||||
*/
|
||||
if (adev->gfx.rlc.is_rlc_v2_1) {
|
||||
if (adev->asic_type == CHIP_VEGA12)
|
||||
if (adev->asic_type == CHIP_VEGA12 ||
|
||||
(adev->asic_type == CHIP_RAVEN &&
|
||||
adev->rev_id >= 8))
|
||||
gfx_v9_1_init_rlc_save_restore_list(adev);
|
||||
gfx_v9_0_enable_save_restore_machine(adev);
|
||||
}
|
||||
|
|
|
@ -809,8 +809,8 @@ bool dc_link_detect(struct dc_link *link, enum dc_detect_reason reason)
|
|||
}
|
||||
|
||||
case SIGNAL_TYPE_EDP: {
|
||||
read_edp_current_link_settings_on_detect(link);
|
||||
detect_edp_sink_caps(link);
|
||||
read_edp_current_link_settings_on_detect(link);
|
||||
sink_caps.transaction_type =
|
||||
DDC_TRANSACTION_TYPE_I2C_OVER_AUX;
|
||||
sink_caps.signal = SIGNAL_TYPE_EDP;
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#ifndef __I915_SELFTESTS_RANDOM_H__
|
||||
#define __I915_SELFTESTS_RANDOM_H__
|
||||
|
||||
#include <linux/math64.h>
|
||||
#include <linux/random.h>
|
||||
|
||||
#include "../i915_selftest.h"
|
||||
|
|
|
@ -39,9 +39,13 @@
|
|||
#define CFFPS_MFR_VAUX_FAULT BIT(6)
|
||||
#define CFFPS_MFR_CURRENT_SHARE_WARNING BIT(7)
|
||||
|
||||
/*
|
||||
* LED off state actually relinquishes LED control to PSU firmware, so it can
|
||||
* turn on the LED for faults.
|
||||
*/
|
||||
#define CFFPS_LED_OFF 0
|
||||
#define CFFPS_LED_BLINK BIT(0)
|
||||
#define CFFPS_LED_ON BIT(1)
|
||||
#define CFFPS_LED_OFF BIT(2)
|
||||
#define CFFPS_BLINK_RATE_MS 250
|
||||
|
||||
enum {
|
||||
|
@ -292,28 +296,38 @@ static int ibm_cffps_read_word_data(struct i2c_client *client, int page,
|
|||
return rc;
|
||||
}
|
||||
|
||||
static void ibm_cffps_led_brightness_set(struct led_classdev *led_cdev,
|
||||
enum led_brightness brightness)
|
||||
static int ibm_cffps_led_brightness_set(struct led_classdev *led_cdev,
|
||||
enum led_brightness brightness)
|
||||
{
|
||||
int rc;
|
||||
u8 next_led_state;
|
||||
struct ibm_cffps *psu = container_of(led_cdev, struct ibm_cffps, led);
|
||||
|
||||
if (brightness == LED_OFF) {
|
||||
psu->led_state = CFFPS_LED_OFF;
|
||||
next_led_state = CFFPS_LED_OFF;
|
||||
} else {
|
||||
brightness = LED_FULL;
|
||||
|
||||
if (psu->led_state != CFFPS_LED_BLINK)
|
||||
psu->led_state = CFFPS_LED_ON;
|
||||
next_led_state = CFFPS_LED_ON;
|
||||
else
|
||||
next_led_state = CFFPS_LED_BLINK;
|
||||
}
|
||||
|
||||
dev_dbg(&psu->client->dev, "LED brightness set: %d. Command: %d.\n",
|
||||
brightness, next_led_state);
|
||||
|
||||
pmbus_set_page(psu->client, 0);
|
||||
|
||||
rc = i2c_smbus_write_byte_data(psu->client, CFFPS_SYS_CONFIG_CMD,
|
||||
psu->led_state);
|
||||
next_led_state);
|
||||
if (rc < 0)
|
||||
return;
|
||||
return rc;
|
||||
|
||||
psu->led_state = next_led_state;
|
||||
led_cdev->brightness = brightness;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ibm_cffps_led_blink_set(struct led_classdev *led_cdev,
|
||||
|
@ -323,10 +337,7 @@ static int ibm_cffps_led_blink_set(struct led_classdev *led_cdev,
|
|||
int rc;
|
||||
struct ibm_cffps *psu = container_of(led_cdev, struct ibm_cffps, led);
|
||||
|
||||
psu->led_state = CFFPS_LED_BLINK;
|
||||
|
||||
if (led_cdev->brightness == LED_OFF)
|
||||
return 0;
|
||||
dev_dbg(&psu->client->dev, "LED blink set.\n");
|
||||
|
||||
pmbus_set_page(psu->client, 0);
|
||||
|
||||
|
@ -335,6 +346,8 @@ static int ibm_cffps_led_blink_set(struct led_classdev *led_cdev,
|
|||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
psu->led_state = CFFPS_LED_BLINK;
|
||||
led_cdev->brightness = LED_FULL;
|
||||
*delay_on = CFFPS_BLINK_RATE_MS;
|
||||
*delay_off = CFFPS_BLINK_RATE_MS;
|
||||
|
||||
|
@ -351,7 +364,7 @@ static void ibm_cffps_create_led_class(struct ibm_cffps *psu)
|
|||
client->addr);
|
||||
psu->led.name = psu->led_name;
|
||||
psu->led.max_brightness = LED_FULL;
|
||||
psu->led.brightness_set = ibm_cffps_led_brightness_set;
|
||||
psu->led.brightness_set_blocking = ibm_cffps_led_brightness_set;
|
||||
psu->led.blink_set = ibm_cffps_led_blink_set;
|
||||
|
||||
rc = devm_led_classdev_register(dev, &psu->led);
|
||||
|
|
|
@ -433,13 +433,17 @@ iop3xx_i2c_probe(struct platform_device *pdev)
|
|||
adapter_data->gpio_scl = devm_gpiod_get_optional(&pdev->dev,
|
||||
"scl",
|
||||
GPIOD_ASIS);
|
||||
if (IS_ERR(adapter_data->gpio_scl))
|
||||
return PTR_ERR(adapter_data->gpio_scl);
|
||||
if (IS_ERR(adapter_data->gpio_scl)) {
|
||||
ret = PTR_ERR(adapter_data->gpio_scl);
|
||||
goto free_both;
|
||||
}
|
||||
adapter_data->gpio_sda = devm_gpiod_get_optional(&pdev->dev,
|
||||
"sda",
|
||||
GPIOD_ASIS);
|
||||
if (IS_ERR(adapter_data->gpio_sda))
|
||||
return PTR_ERR(adapter_data->gpio_sda);
|
||||
if (IS_ERR(adapter_data->gpio_sda)) {
|
||||
ret = PTR_ERR(adapter_data->gpio_sda);
|
||||
goto free_both;
|
||||
}
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (!res) {
|
||||
|
|
|
@ -1608,14 +1608,18 @@ static int tegra_i2c_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
if (!pm_runtime_enabled(&pdev->dev))
|
||||
if (!pm_runtime_enabled(&pdev->dev)) {
|
||||
ret = tegra_i2c_runtime_resume(&pdev->dev);
|
||||
else
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "runtime resume failed\n");
|
||||
goto unprepare_div_clk;
|
||||
}
|
||||
} else {
|
||||
ret = pm_runtime_get_sync(i2c_dev->dev);
|
||||
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "runtime resume failed\n");
|
||||
goto unprepare_div_clk;
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "runtime resume failed\n");
|
||||
goto disable_rpm;
|
||||
}
|
||||
}
|
||||
|
||||
if (i2c_dev->is_multimaster_mode) {
|
||||
|
@ -1623,7 +1627,7 @@ static int tegra_i2c_probe(struct platform_device *pdev)
|
|||
if (ret < 0) {
|
||||
dev_err(i2c_dev->dev, "div_clk enable failed %d\n",
|
||||
ret);
|
||||
goto disable_rpm;
|
||||
goto put_rpm;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1671,11 +1675,16 @@ static int tegra_i2c_probe(struct platform_device *pdev)
|
|||
if (i2c_dev->is_multimaster_mode)
|
||||
clk_disable(i2c_dev->div_clk);
|
||||
|
||||
disable_rpm:
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
if (!pm_runtime_status_suspended(&pdev->dev))
|
||||
put_rpm:
|
||||
if (pm_runtime_enabled(&pdev->dev))
|
||||
pm_runtime_put_sync(&pdev->dev);
|
||||
else
|
||||
tegra_i2c_runtime_suspend(&pdev->dev);
|
||||
|
||||
disable_rpm:
|
||||
if (pm_runtime_enabled(&pdev->dev))
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
|
||||
unprepare_div_clk:
|
||||
clk_unprepare(i2c_dev->div_clk);
|
||||
|
||||
|
@ -1710,9 +1719,14 @@ static int tegra_i2c_remove(struct platform_device *pdev)
|
|||
static int __maybe_unused tegra_i2c_suspend(struct device *dev)
|
||||
{
|
||||
struct tegra_i2c_dev *i2c_dev = dev_get_drvdata(dev);
|
||||
int err;
|
||||
|
||||
i2c_mark_adapter_suspended(&i2c_dev->adapter);
|
||||
|
||||
err = pm_runtime_force_suspend(dev);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1733,6 +1747,10 @@ static int __maybe_unused tegra_i2c_resume(struct device *dev)
|
|||
if (err)
|
||||
return err;
|
||||
|
||||
err = pm_runtime_force_resume(dev);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
i2c_mark_adapter_resumed(&i2c_dev->adapter);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -494,13 +494,11 @@ static int ad7124_of_parse_channel_config(struct iio_dev *indio_dev,
|
|||
st->channel_config[channel].buf_negative =
|
||||
of_property_read_bool(child, "adi,buffered-negative");
|
||||
|
||||
*chan = ad7124_channel_template;
|
||||
chan->address = channel;
|
||||
chan->scan_index = channel;
|
||||
chan->channel = ain[0];
|
||||
chan->channel2 = ain[1];
|
||||
|
||||
chan++;
|
||||
chan[channel] = ad7124_channel_template;
|
||||
chan[channel].address = channel;
|
||||
chan[channel].scan_index = channel;
|
||||
chan[channel].channel = ain[0];
|
||||
chan[channel].channel2 = ain[1];
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -65,6 +65,7 @@ config IAQCORE
|
|||
config PMS7003
|
||||
tristate "Plantower PMS7003 particulate matter sensor"
|
||||
depends on SERIAL_DEV_BUS
|
||||
select IIO_BUFFER
|
||||
select IIO_TRIGGERED_BUFFER
|
||||
help
|
||||
Say Y here to build support for the Plantower PMS7003 particulate
|
||||
|
|
|
@ -911,7 +911,8 @@ static int st_lsm6dsx_check_whoami(struct st_lsm6dsx_hw *hw, int id,
|
|||
|
||||
for (i = 0; i < ARRAY_SIZE(st_lsm6dsx_sensor_settings); i++) {
|
||||
for (j = 0; j < ST_LSM6DSX_MAX_ID; j++) {
|
||||
if (id == st_lsm6dsx_sensor_settings[i].id[j].hw_id)
|
||||
if (st_lsm6dsx_sensor_settings[i].id[j].name &&
|
||||
id == st_lsm6dsx_sensor_settings[i].id[j].hw_id)
|
||||
break;
|
||||
}
|
||||
if (j < ST_LSM6DSX_MAX_ID)
|
||||
|
|
|
@ -566,7 +566,7 @@ static int iio_compute_scan_bytes(struct iio_dev *indio_dev,
|
|||
const unsigned long *mask, bool timestamp)
|
||||
{
|
||||
unsigned bytes = 0;
|
||||
int length, i;
|
||||
int length, i, largest = 0;
|
||||
|
||||
/* How much space will the demuxed element take? */
|
||||
for_each_set_bit(i, mask,
|
||||
|
@ -574,13 +574,17 @@ static int iio_compute_scan_bytes(struct iio_dev *indio_dev,
|
|||
length = iio_storage_bytes_for_si(indio_dev, i);
|
||||
bytes = ALIGN(bytes, length);
|
||||
bytes += length;
|
||||
largest = max(largest, length);
|
||||
}
|
||||
|
||||
if (timestamp) {
|
||||
length = iio_storage_bytes_for_timestamp(indio_dev);
|
||||
bytes = ALIGN(bytes, length);
|
||||
bytes += length;
|
||||
largest = max(largest, length);
|
||||
}
|
||||
|
||||
bytes = ALIGN(bytes, largest);
|
||||
return bytes;
|
||||
}
|
||||
|
||||
|
|
|
@ -163,7 +163,6 @@ static int vcnl4200_init(struct vcnl4000_data *data)
|
|||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
data->al_scale = 24000;
|
||||
data->vcnl4200_al.reg = VCNL4200_AL_DATA;
|
||||
data->vcnl4200_ps.reg = VCNL4200_PS_DATA;
|
||||
switch (id) {
|
||||
|
@ -172,11 +171,13 @@ static int vcnl4200_init(struct vcnl4000_data *data)
|
|||
/* show 54ms in total. */
|
||||
data->vcnl4200_al.sampling_rate = ktime_set(0, 54000 * 1000);
|
||||
data->vcnl4200_ps.sampling_rate = ktime_set(0, 4200 * 1000);
|
||||
data->al_scale = 24000;
|
||||
break;
|
||||
case VCNL4040_PROD_ID:
|
||||
/* Integration time is 80ms, add 10ms. */
|
||||
data->vcnl4200_al.sampling_rate = ktime_set(0, 100000 * 1000);
|
||||
data->vcnl4200_ps.sampling_rate = ktime_set(0, 100000 * 1000);
|
||||
data->al_scale = 120000;
|
||||
break;
|
||||
}
|
||||
data->vcnl4200_al.last_measurement = ktime_set(0, 0);
|
||||
|
|
|
@ -483,8 +483,6 @@ config TI_SCI_INTA_IRQCHIP
|
|||
If you wish to use interrupt aggregator irq resources managed by the
|
||||
TI System Controller, say Y here. Otherwise, say N.
|
||||
|
||||
endmenu
|
||||
|
||||
config SIFIVE_PLIC
|
||||
bool "SiFive Platform-Level Interrupt Controller"
|
||||
depends on RISCV
|
||||
|
@ -502,3 +500,5 @@ config IMX_INTMUX
|
|||
select IRQ_DOMAIN
|
||||
help
|
||||
Enables the IRQ MUX for NXP IMX platforms
|
||||
|
||||
endmenu
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include <linux/dm-bufio.h>
|
||||
|
||||
#define DM_MSG_PREFIX "persistent snapshot"
|
||||
#define DM_CHUNK_SIZE_DEFAULT_SECTORS 32 /* 16KB */
|
||||
#define DM_CHUNK_SIZE_DEFAULT_SECTORS 32U /* 16KB */
|
||||
|
||||
#define DM_PREFETCH_CHUNKS 12
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ static int create_strip_zones(struct mddev *mddev, struct r0conf **private_conf)
|
|||
char b[BDEVNAME_SIZE];
|
||||
char b2[BDEVNAME_SIZE];
|
||||
struct r0conf *conf = kzalloc(sizeof(*conf), GFP_KERNEL);
|
||||
unsigned short blksize = 512;
|
||||
unsigned blksize = 512;
|
||||
|
||||
*private_conf = ERR_PTR(-ENOMEM);
|
||||
if (!conf)
|
||||
|
|
|
@ -100,19 +100,19 @@ struct buflist {
|
|||
* Function prototypes. Called from OS entry point mptctl_ioctl.
|
||||
* arg contents specific to function.
|
||||
*/
|
||||
static int mptctl_fw_download(unsigned long arg);
|
||||
static int mptctl_getiocinfo(unsigned long arg, unsigned int cmd);
|
||||
static int mptctl_gettargetinfo(unsigned long arg);
|
||||
static int mptctl_readtest(unsigned long arg);
|
||||
static int mptctl_mpt_command(unsigned long arg);
|
||||
static int mptctl_eventquery(unsigned long arg);
|
||||
static int mptctl_eventenable(unsigned long arg);
|
||||
static int mptctl_eventreport(unsigned long arg);
|
||||
static int mptctl_replace_fw(unsigned long arg);
|
||||
static int mptctl_fw_download(MPT_ADAPTER *iocp, unsigned long arg);
|
||||
static int mptctl_getiocinfo(MPT_ADAPTER *iocp, unsigned long arg, unsigned int cmd);
|
||||
static int mptctl_gettargetinfo(MPT_ADAPTER *iocp, unsigned long arg);
|
||||
static int mptctl_readtest(MPT_ADAPTER *iocp, unsigned long arg);
|
||||
static int mptctl_mpt_command(MPT_ADAPTER *iocp, unsigned long arg);
|
||||
static int mptctl_eventquery(MPT_ADAPTER *iocp, unsigned long arg);
|
||||
static int mptctl_eventenable(MPT_ADAPTER *iocp, unsigned long arg);
|
||||
static int mptctl_eventreport(MPT_ADAPTER *iocp, unsigned long arg);
|
||||
static int mptctl_replace_fw(MPT_ADAPTER *iocp, unsigned long arg);
|
||||
|
||||
static int mptctl_do_reset(unsigned long arg);
|
||||
static int mptctl_hp_hostinfo(unsigned long arg, unsigned int cmd);
|
||||
static int mptctl_hp_targetinfo(unsigned long arg);
|
||||
static int mptctl_do_reset(MPT_ADAPTER *iocp, unsigned long arg);
|
||||
static int mptctl_hp_hostinfo(MPT_ADAPTER *iocp, unsigned long arg, unsigned int cmd);
|
||||
static int mptctl_hp_targetinfo(MPT_ADAPTER *iocp, unsigned long arg);
|
||||
|
||||
static int mptctl_probe(struct pci_dev *, const struct pci_device_id *);
|
||||
static void mptctl_remove(struct pci_dev *);
|
||||
|
@ -123,8 +123,8 @@ static long compat_mpctl_ioctl(struct file *f, unsigned cmd, unsigned long arg);
|
|||
/*
|
||||
* Private function calls.
|
||||
*/
|
||||
static int mptctl_do_mpt_command(struct mpt_ioctl_command karg, void __user *mfPtr);
|
||||
static int mptctl_do_fw_download(int ioc, char __user *ufwbuf, size_t fwlen);
|
||||
static int mptctl_do_mpt_command(MPT_ADAPTER *iocp, struct mpt_ioctl_command karg, void __user *mfPtr);
|
||||
static int mptctl_do_fw_download(MPT_ADAPTER *iocp, char __user *ufwbuf, size_t fwlen);
|
||||
static MptSge_t *kbuf_alloc_2_sgl(int bytes, u32 dir, int sge_offset, int *frags,
|
||||
struct buflist **blp, dma_addr_t *sglbuf_dma, MPT_ADAPTER *ioc);
|
||||
static void kfree_sgl(MptSge_t *sgl, dma_addr_t sgl_dma,
|
||||
|
@ -656,19 +656,19 @@ __mptctl_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
|||
* by TM and FW reloads.
|
||||
*/
|
||||
if ((cmd & ~IOCSIZE_MASK) == (MPTIOCINFO & ~IOCSIZE_MASK)) {
|
||||
return mptctl_getiocinfo(arg, _IOC_SIZE(cmd));
|
||||
return mptctl_getiocinfo(iocp, arg, _IOC_SIZE(cmd));
|
||||
} else if (cmd == MPTTARGETINFO) {
|
||||
return mptctl_gettargetinfo(arg);
|
||||
return mptctl_gettargetinfo(iocp, arg);
|
||||
} else if (cmd == MPTTEST) {
|
||||
return mptctl_readtest(arg);
|
||||
return mptctl_readtest(iocp, arg);
|
||||
} else if (cmd == MPTEVENTQUERY) {
|
||||
return mptctl_eventquery(arg);
|
||||
return mptctl_eventquery(iocp, arg);
|
||||
} else if (cmd == MPTEVENTENABLE) {
|
||||
return mptctl_eventenable(arg);
|
||||
return mptctl_eventenable(iocp, arg);
|
||||
} else if (cmd == MPTEVENTREPORT) {
|
||||
return mptctl_eventreport(arg);
|
||||
return mptctl_eventreport(iocp, arg);
|
||||
} else if (cmd == MPTFWREPLACE) {
|
||||
return mptctl_replace_fw(arg);
|
||||
return mptctl_replace_fw(iocp, arg);
|
||||
}
|
||||
|
||||
/* All of these commands require an interrupt or
|
||||
|
@ -678,15 +678,15 @@ __mptctl_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
|||
return ret;
|
||||
|
||||
if (cmd == MPTFWDOWNLOAD)
|
||||
ret = mptctl_fw_download(arg);
|
||||
ret = mptctl_fw_download(iocp, arg);
|
||||
else if (cmd == MPTCOMMAND)
|
||||
ret = mptctl_mpt_command(arg);
|
||||
ret = mptctl_mpt_command(iocp, arg);
|
||||
else if (cmd == MPTHARDRESET)
|
||||
ret = mptctl_do_reset(arg);
|
||||
ret = mptctl_do_reset(iocp, arg);
|
||||
else if ((cmd & ~IOCSIZE_MASK) == (HP_GETHOSTINFO & ~IOCSIZE_MASK))
|
||||
ret = mptctl_hp_hostinfo(arg, _IOC_SIZE(cmd));
|
||||
ret = mptctl_hp_hostinfo(iocp, arg, _IOC_SIZE(cmd));
|
||||
else if (cmd == HP_GETTARGETINFO)
|
||||
ret = mptctl_hp_targetinfo(arg);
|
||||
ret = mptctl_hp_targetinfo(iocp, arg);
|
||||
else
|
||||
ret = -EINVAL;
|
||||
|
||||
|
@ -705,11 +705,10 @@ mptctl_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int mptctl_do_reset(unsigned long arg)
|
||||
static int mptctl_do_reset(MPT_ADAPTER *iocp, unsigned long arg)
|
||||
{
|
||||
struct mpt_ioctl_diag_reset __user *urinfo = (void __user *) arg;
|
||||
struct mpt_ioctl_diag_reset krinfo;
|
||||
MPT_ADAPTER *iocp;
|
||||
|
||||
if (copy_from_user(&krinfo, urinfo, sizeof(struct mpt_ioctl_diag_reset))) {
|
||||
printk(KERN_ERR MYNAM "%s@%d::mptctl_do_reset - "
|
||||
|
@ -718,12 +717,6 @@ static int mptctl_do_reset(unsigned long arg)
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (mpt_verify_adapter(krinfo.hdr.iocnum, &iocp) < 0) {
|
||||
printk(KERN_DEBUG MYNAM "%s@%d::mptctl_do_reset - ioc%d not found!\n",
|
||||
__FILE__, __LINE__, krinfo.hdr.iocnum);
|
||||
return -ENODEV; /* (-6) No such device or address */
|
||||
}
|
||||
|
||||
dctlprintk(iocp, printk(MYIOC_s_DEBUG_FMT "mptctl_do_reset called.\n",
|
||||
iocp->name));
|
||||
|
||||
|
@ -754,7 +747,7 @@ static int mptctl_do_reset(unsigned long arg)
|
|||
* -ENOMSG if FW upload returned bad status
|
||||
*/
|
||||
static int
|
||||
mptctl_fw_download(unsigned long arg)
|
||||
mptctl_fw_download(MPT_ADAPTER *iocp, unsigned long arg)
|
||||
{
|
||||
struct mpt_fw_xfer __user *ufwdl = (void __user *) arg;
|
||||
struct mpt_fw_xfer kfwdl;
|
||||
|
@ -766,7 +759,7 @@ mptctl_fw_download(unsigned long arg)
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
return mptctl_do_fw_download(kfwdl.iocnum, kfwdl.bufp, kfwdl.fwlen);
|
||||
return mptctl_do_fw_download(iocp, kfwdl.bufp, kfwdl.fwlen);
|
||||
}
|
||||
|
||||
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
|
||||
|
@ -784,11 +777,10 @@ mptctl_fw_download(unsigned long arg)
|
|||
* -ENOMSG if FW upload returned bad status
|
||||
*/
|
||||
static int
|
||||
mptctl_do_fw_download(int ioc, char __user *ufwbuf, size_t fwlen)
|
||||
mptctl_do_fw_download(MPT_ADAPTER *iocp, char __user *ufwbuf, size_t fwlen)
|
||||
{
|
||||
FWDownload_t *dlmsg;
|
||||
MPT_FRAME_HDR *mf;
|
||||
MPT_ADAPTER *iocp;
|
||||
FWDownloadTCSGE_t *ptsge;
|
||||
MptSge_t *sgl, *sgIn;
|
||||
char *sgOut;
|
||||
|
@ -808,17 +800,10 @@ mptctl_do_fw_download(int ioc, char __user *ufwbuf, size_t fwlen)
|
|||
pFWDownloadReply_t ReplyMsg = NULL;
|
||||
unsigned long timeleft;
|
||||
|
||||
if (mpt_verify_adapter(ioc, &iocp) < 0) {
|
||||
printk(KERN_DEBUG MYNAM "ioctl_fwdl - ioc%d not found!\n",
|
||||
ioc);
|
||||
return -ENODEV; /* (-6) No such device or address */
|
||||
} else {
|
||||
|
||||
/* Valid device. Get a message frame and construct the FW download message.
|
||||
*/
|
||||
if ((mf = mpt_get_msg_frame(mptctl_id, iocp)) == NULL)
|
||||
return -EAGAIN;
|
||||
}
|
||||
/* Valid device. Get a message frame and construct the FW download message.
|
||||
*/
|
||||
if ((mf = mpt_get_msg_frame(mptctl_id, iocp)) == NULL)
|
||||
return -EAGAIN;
|
||||
|
||||
dctlprintk(iocp, printk(MYIOC_s_DEBUG_FMT
|
||||
"mptctl_do_fwdl called. mptctl_id = %xh.\n", iocp->name, mptctl_id));
|
||||
|
@ -826,8 +811,6 @@ mptctl_do_fw_download(int ioc, char __user *ufwbuf, size_t fwlen)
|
|||
iocp->name, ufwbuf));
|
||||
dctlprintk(iocp, printk(MYIOC_s_DEBUG_FMT "DbG: kfwdl.fwlen = %d\n",
|
||||
iocp->name, (int)fwlen));
|
||||
dctlprintk(iocp, printk(MYIOC_s_DEBUG_FMT "DbG: kfwdl.ioc = %04xh\n",
|
||||
iocp->name, ioc));
|
||||
|
||||
dlmsg = (FWDownload_t*) mf;
|
||||
ptsge = (FWDownloadTCSGE_t *) &dlmsg->SGL;
|
||||
|
@ -1238,13 +1221,11 @@ kfree_sgl(MptSge_t *sgl, dma_addr_t sgl_dma, struct buflist *buflist, MPT_ADAPTE
|
|||
* -ENODEV if no such device/adapter
|
||||
*/
|
||||
static int
|
||||
mptctl_getiocinfo (unsigned long arg, unsigned int data_size)
|
||||
mptctl_getiocinfo (MPT_ADAPTER *ioc, unsigned long arg, unsigned int data_size)
|
||||
{
|
||||
struct mpt_ioctl_iocinfo __user *uarg = (void __user *) arg;
|
||||
struct mpt_ioctl_iocinfo *karg;
|
||||
MPT_ADAPTER *ioc;
|
||||
struct pci_dev *pdev;
|
||||
int iocnum;
|
||||
unsigned int port;
|
||||
int cim_rev;
|
||||
struct scsi_device *sdev;
|
||||
|
@ -1272,14 +1253,6 @@ mptctl_getiocinfo (unsigned long arg, unsigned int data_size)
|
|||
return PTR_ERR(karg);
|
||||
}
|
||||
|
||||
if (((iocnum = mpt_verify_adapter(karg->hdr.iocnum, &ioc)) < 0) ||
|
||||
(ioc == NULL)) {
|
||||
printk(KERN_DEBUG MYNAM "%s::mptctl_getiocinfo() @%d - ioc%d not found!\n",
|
||||
__FILE__, __LINE__, iocnum);
|
||||
kfree(karg);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
/* Verify the data transfer size is correct. */
|
||||
if (karg->hdr.maxDataSize != data_size) {
|
||||
printk(MYIOC_s_ERR_FMT "%s@%d::mptctl_getiocinfo - "
|
||||
|
@ -1385,15 +1358,13 @@ mptctl_getiocinfo (unsigned long arg, unsigned int data_size)
|
|||
* -ENODEV if no such device/adapter
|
||||
*/
|
||||
static int
|
||||
mptctl_gettargetinfo (unsigned long arg)
|
||||
mptctl_gettargetinfo (MPT_ADAPTER *ioc, unsigned long arg)
|
||||
{
|
||||
struct mpt_ioctl_targetinfo __user *uarg = (void __user *) arg;
|
||||
struct mpt_ioctl_targetinfo karg;
|
||||
MPT_ADAPTER *ioc;
|
||||
VirtDevice *vdevice;
|
||||
char *pmem;
|
||||
int *pdata;
|
||||
int iocnum;
|
||||
int numDevices = 0;
|
||||
int lun;
|
||||
int maxWordsLeft;
|
||||
|
@ -1408,13 +1379,6 @@ mptctl_gettargetinfo (unsigned long arg)
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) ||
|
||||
(ioc == NULL)) {
|
||||
printk(KERN_DEBUG MYNAM "%s::mptctl_gettargetinfo() @%d - ioc%d not found!\n",
|
||||
__FILE__, __LINE__, iocnum);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mptctl_gettargetinfo called.\n",
|
||||
ioc->name));
|
||||
/* Get the port number and set the maximum number of bytes
|
||||
|
@ -1510,12 +1474,10 @@ mptctl_gettargetinfo (unsigned long arg)
|
|||
* -ENODEV if no such device/adapter
|
||||
*/
|
||||
static int
|
||||
mptctl_readtest (unsigned long arg)
|
||||
mptctl_readtest (MPT_ADAPTER *ioc, unsigned long arg)
|
||||
{
|
||||
struct mpt_ioctl_test __user *uarg = (void __user *) arg;
|
||||
struct mpt_ioctl_test karg;
|
||||
MPT_ADAPTER *ioc;
|
||||
int iocnum;
|
||||
|
||||
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_test))) {
|
||||
printk(KERN_ERR MYNAM "%s@%d::mptctl_readtest - "
|
||||
|
@ -1524,13 +1486,6 @@ mptctl_readtest (unsigned long arg)
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) ||
|
||||
(ioc == NULL)) {
|
||||
printk(KERN_DEBUG MYNAM "%s::mptctl_readtest() @%d - ioc%d not found!\n",
|
||||
__FILE__, __LINE__, iocnum);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mptctl_readtest called.\n",
|
||||
ioc->name));
|
||||
/* Fill in the data and return the structure to the calling
|
||||
|
@ -1571,12 +1526,10 @@ mptctl_readtest (unsigned long arg)
|
|||
* -ENODEV if no such device/adapter
|
||||
*/
|
||||
static int
|
||||
mptctl_eventquery (unsigned long arg)
|
||||
mptctl_eventquery (MPT_ADAPTER *ioc, unsigned long arg)
|
||||
{
|
||||
struct mpt_ioctl_eventquery __user *uarg = (void __user *) arg;
|
||||
struct mpt_ioctl_eventquery karg;
|
||||
MPT_ADAPTER *ioc;
|
||||
int iocnum;
|
||||
|
||||
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventquery))) {
|
||||
printk(KERN_ERR MYNAM "%s@%d::mptctl_eventquery - "
|
||||
|
@ -1585,13 +1538,6 @@ mptctl_eventquery (unsigned long arg)
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) ||
|
||||
(ioc == NULL)) {
|
||||
printk(KERN_DEBUG MYNAM "%s::mptctl_eventquery() @%d - ioc%d not found!\n",
|
||||
__FILE__, __LINE__, iocnum);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mptctl_eventquery called.\n",
|
||||
ioc->name));
|
||||
karg.eventEntries = MPTCTL_EVENT_LOG_SIZE;
|
||||
|
@ -1610,12 +1556,10 @@ mptctl_eventquery (unsigned long arg)
|
|||
|
||||
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
|
||||
static int
|
||||
mptctl_eventenable (unsigned long arg)
|
||||
mptctl_eventenable (MPT_ADAPTER *ioc, unsigned long arg)
|
||||
{
|
||||
struct mpt_ioctl_eventenable __user *uarg = (void __user *) arg;
|
||||
struct mpt_ioctl_eventenable karg;
|
||||
MPT_ADAPTER *ioc;
|
||||
int iocnum;
|
||||
|
||||
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventenable))) {
|
||||
printk(KERN_ERR MYNAM "%s@%d::mptctl_eventenable - "
|
||||
|
@ -1624,13 +1568,6 @@ mptctl_eventenable (unsigned long arg)
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) ||
|
||||
(ioc == NULL)) {
|
||||
printk(KERN_DEBUG MYNAM "%s::mptctl_eventenable() @%d - ioc%d not found!\n",
|
||||
__FILE__, __LINE__, iocnum);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mptctl_eventenable called.\n",
|
||||
ioc->name));
|
||||
if (ioc->events == NULL) {
|
||||
|
@ -1658,12 +1595,10 @@ mptctl_eventenable (unsigned long arg)
|
|||
|
||||
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
|
||||
static int
|
||||
mptctl_eventreport (unsigned long arg)
|
||||
mptctl_eventreport (MPT_ADAPTER *ioc, unsigned long arg)
|
||||
{
|
||||
struct mpt_ioctl_eventreport __user *uarg = (void __user *) arg;
|
||||
struct mpt_ioctl_eventreport karg;
|
||||
MPT_ADAPTER *ioc;
|
||||
int iocnum;
|
||||
int numBytes, maxEvents, max;
|
||||
|
||||
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventreport))) {
|
||||
|
@ -1673,12 +1608,6 @@ mptctl_eventreport (unsigned long arg)
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) ||
|
||||
(ioc == NULL)) {
|
||||
printk(KERN_DEBUG MYNAM "%s::mptctl_eventreport() @%d - ioc%d not found!\n",
|
||||
__FILE__, __LINE__, iocnum);
|
||||
return -ENODEV;
|
||||
}
|
||||
dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mptctl_eventreport called.\n",
|
||||
ioc->name));
|
||||
|
||||
|
@ -1712,12 +1641,10 @@ mptctl_eventreport (unsigned long arg)
|
|||
|
||||
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
|
||||
static int
|
||||
mptctl_replace_fw (unsigned long arg)
|
||||
mptctl_replace_fw (MPT_ADAPTER *ioc, unsigned long arg)
|
||||
{
|
||||
struct mpt_ioctl_replace_fw __user *uarg = (void __user *) arg;
|
||||
struct mpt_ioctl_replace_fw karg;
|
||||
MPT_ADAPTER *ioc;
|
||||
int iocnum;
|
||||
int newFwSize;
|
||||
|
||||
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_replace_fw))) {
|
||||
|
@ -1727,13 +1654,6 @@ mptctl_replace_fw (unsigned long arg)
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) ||
|
||||
(ioc == NULL)) {
|
||||
printk(KERN_DEBUG MYNAM "%s::mptctl_replace_fw() @%d - ioc%d not found!\n",
|
||||
__FILE__, __LINE__, iocnum);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mptctl_replace_fw called.\n",
|
||||
ioc->name));
|
||||
/* If caching FW, Free the old FW image
|
||||
|
@ -1780,12 +1700,10 @@ mptctl_replace_fw (unsigned long arg)
|
|||
* -ENOMEM if memory allocation error
|
||||
*/
|
||||
static int
|
||||
mptctl_mpt_command (unsigned long arg)
|
||||
mptctl_mpt_command (MPT_ADAPTER *ioc, unsigned long arg)
|
||||
{
|
||||
struct mpt_ioctl_command __user *uarg = (void __user *) arg;
|
||||
struct mpt_ioctl_command karg;
|
||||
MPT_ADAPTER *ioc;
|
||||
int iocnum;
|
||||
int rc;
|
||||
|
||||
|
||||
|
@ -1796,14 +1714,7 @@ mptctl_mpt_command (unsigned long arg)
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) ||
|
||||
(ioc == NULL)) {
|
||||
printk(KERN_DEBUG MYNAM "%s::mptctl_mpt_command() @%d - ioc%d not found!\n",
|
||||
__FILE__, __LINE__, iocnum);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
rc = mptctl_do_mpt_command (karg, &uarg->MF);
|
||||
rc = mptctl_do_mpt_command (ioc, karg, &uarg->MF);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
@ -1821,9 +1732,8 @@ mptctl_mpt_command (unsigned long arg)
|
|||
* -EPERM if SCSI I/O and target is untagged
|
||||
*/
|
||||
static int
|
||||
mptctl_do_mpt_command (struct mpt_ioctl_command karg, void __user *mfPtr)
|
||||
mptctl_do_mpt_command (MPT_ADAPTER *ioc, struct mpt_ioctl_command karg, void __user *mfPtr)
|
||||
{
|
||||
MPT_ADAPTER *ioc;
|
||||
MPT_FRAME_HDR *mf = NULL;
|
||||
MPIHeader_t *hdr;
|
||||
char *psge;
|
||||
|
@ -1832,7 +1742,7 @@ mptctl_do_mpt_command (struct mpt_ioctl_command karg, void __user *mfPtr)
|
|||
dma_addr_t dma_addr_in;
|
||||
dma_addr_t dma_addr_out;
|
||||
int sgSize = 0; /* Num SG elements */
|
||||
int iocnum, flagsLength;
|
||||
int flagsLength;
|
||||
int sz, rc = 0;
|
||||
int msgContext;
|
||||
u16 req_idx;
|
||||
|
@ -1847,13 +1757,6 @@ mptctl_do_mpt_command (struct mpt_ioctl_command karg, void __user *mfPtr)
|
|||
bufIn.kptr = bufOut.kptr = NULL;
|
||||
bufIn.len = bufOut.len = 0;
|
||||
|
||||
if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) ||
|
||||
(ioc == NULL)) {
|
||||
printk(KERN_DEBUG MYNAM "%s::mptctl_do_mpt_command() @%d - ioc%d not found!\n",
|
||||
__FILE__, __LINE__, iocnum);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
spin_lock_irqsave(&ioc->taskmgmt_lock, flags);
|
||||
if (ioc->ioc_reset_in_progress) {
|
||||
spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags);
|
||||
|
@ -2418,17 +2321,15 @@ mptctl_do_mpt_command (struct mpt_ioctl_command karg, void __user *mfPtr)
|
|||
* -ENOMEM if memory allocation error
|
||||
*/
|
||||
static int
|
||||
mptctl_hp_hostinfo(unsigned long arg, unsigned int data_size)
|
||||
mptctl_hp_hostinfo(MPT_ADAPTER *ioc, unsigned long arg, unsigned int data_size)
|
||||
{
|
||||
hp_host_info_t __user *uarg = (void __user *) arg;
|
||||
MPT_ADAPTER *ioc;
|
||||
struct pci_dev *pdev;
|
||||
char *pbuf=NULL;
|
||||
dma_addr_t buf_dma;
|
||||
hp_host_info_t karg;
|
||||
CONFIGPARMS cfg;
|
||||
ConfigPageHeader_t hdr;
|
||||
int iocnum;
|
||||
int rc, cim_rev;
|
||||
ToolboxIstwiReadWriteRequest_t *IstwiRWRequest;
|
||||
MPT_FRAME_HDR *mf = NULL;
|
||||
|
@ -2452,12 +2353,6 @@ mptctl_hp_hostinfo(unsigned long arg, unsigned int data_size)
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) ||
|
||||
(ioc == NULL)) {
|
||||
printk(KERN_DEBUG MYNAM "%s::mptctl_hp_hostinfo() @%d - ioc%d not found!\n",
|
||||
__FILE__, __LINE__, iocnum);
|
||||
return -ENODEV;
|
||||
}
|
||||
dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT ": mptctl_hp_hostinfo called.\n",
|
||||
ioc->name));
|
||||
|
||||
|
@ -2659,15 +2554,13 @@ mptctl_hp_hostinfo(unsigned long arg, unsigned int data_size)
|
|||
* -ENOMEM if memory allocation error
|
||||
*/
|
||||
static int
|
||||
mptctl_hp_targetinfo(unsigned long arg)
|
||||
mptctl_hp_targetinfo(MPT_ADAPTER *ioc, unsigned long arg)
|
||||
{
|
||||
hp_target_info_t __user *uarg = (void __user *) arg;
|
||||
SCSIDevicePage0_t *pg0_alloc;
|
||||
SCSIDevicePage3_t *pg3_alloc;
|
||||
MPT_ADAPTER *ioc;
|
||||
MPT_SCSI_HOST *hd = NULL;
|
||||
hp_target_info_t karg;
|
||||
int iocnum;
|
||||
int data_sz;
|
||||
dma_addr_t page_dma;
|
||||
CONFIGPARMS cfg;
|
||||
|
@ -2681,12 +2574,6 @@ mptctl_hp_targetinfo(unsigned long arg)
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) ||
|
||||
(ioc == NULL)) {
|
||||
printk(KERN_DEBUG MYNAM "%s::mptctl_hp_targetinfo() @%d - ioc%d not found!\n",
|
||||
__FILE__, __LINE__, iocnum);
|
||||
return -ENODEV;
|
||||
}
|
||||
if (karg.hdr.id >= MPT_MAX_FC_DEVICES)
|
||||
return -EINVAL;
|
||||
dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mptctl_hp_targetinfo called.\n",
|
||||
|
@ -2854,7 +2741,7 @@ compat_mptfwxfer_ioctl(struct file *filp, unsigned int cmd,
|
|||
kfw.fwlen = kfw32.fwlen;
|
||||
kfw.bufp = compat_ptr(kfw32.bufp);
|
||||
|
||||
ret = mptctl_do_fw_download(kfw.iocnum, kfw.bufp, kfw.fwlen);
|
||||
ret = mptctl_do_fw_download(iocp, kfw.bufp, kfw.fwlen);
|
||||
|
||||
mutex_unlock(&iocp->ioctl_cmds.mutex);
|
||||
|
||||
|
@ -2908,7 +2795,7 @@ compat_mpt_command(struct file *filp, unsigned int cmd,
|
|||
|
||||
/* Pass new structure to do_mpt_command
|
||||
*/
|
||||
ret = mptctl_do_mpt_command (karg, &uarg->MF);
|
||||
ret = mptctl_do_mpt_command (iocp, karg, &uarg->MF);
|
||||
|
||||
mutex_unlock(&iocp->ioctl_cmds.mutex);
|
||||
|
||||
|
|
|
@ -123,19 +123,23 @@ static int cfi_use_status_reg(struct cfi_private *cfi)
|
|||
(extp->SoftwareFeatures & poll_mask) == CFI_POLL_STATUS_REG;
|
||||
}
|
||||
|
||||
static void cfi_check_err_status(struct map_info *map, struct flchip *chip,
|
||||
unsigned long adr)
|
||||
static int cfi_check_err_status(struct map_info *map, struct flchip *chip,
|
||||
unsigned long adr)
|
||||
{
|
||||
struct cfi_private *cfi = map->fldrv_priv;
|
||||
map_word status;
|
||||
|
||||
if (!cfi_use_status_reg(cfi))
|
||||
return;
|
||||
return 0;
|
||||
|
||||
cfi_send_gen_cmd(0x70, cfi->addr_unlock1, chip->start, map, cfi,
|
||||
cfi->device_type, NULL);
|
||||
status = map_read(map, adr);
|
||||
|
||||
/* The error bits are invalid while the chip's busy */
|
||||
if (!map_word_bitsset(map, status, CMD(CFI_SR_DRB)))
|
||||
return 0;
|
||||
|
||||
if (map_word_bitsset(map, status, CMD(0x3a))) {
|
||||
unsigned long chipstatus = MERGESTATUS(status);
|
||||
|
||||
|
@ -151,7 +155,12 @@ static void cfi_check_err_status(struct map_info *map, struct flchip *chip,
|
|||
if (chipstatus & CFI_SR_SLSB)
|
||||
pr_err("%s sector write protected, status %lx\n",
|
||||
map->name, chipstatus);
|
||||
|
||||
/* Erase/Program status bits are set on the operation failure */
|
||||
if (chipstatus & (CFI_SR_ESB | CFI_SR_PSB))
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* #define DEBUG_CFI_FEATURES */
|
||||
|
@ -848,20 +857,16 @@ static int __xipram chip_good(struct map_info *map, struct flchip *chip,
|
|||
|
||||
if (cfi_use_status_reg(cfi)) {
|
||||
map_word ready = CMD(CFI_SR_DRB);
|
||||
map_word err = CMD(CFI_SR_PSB | CFI_SR_ESB);
|
||||
|
||||
/*
|
||||
* For chips that support status register, check device
|
||||
* ready bit and Erase/Program status bit to know if
|
||||
* operation succeeded.
|
||||
* ready bit
|
||||
*/
|
||||
cfi_send_gen_cmd(0x70, cfi->addr_unlock1, chip->start, map, cfi,
|
||||
cfi->device_type, NULL);
|
||||
curd = map_read(map, addr);
|
||||
|
||||
if (map_word_andequal(map, curd, ready, ready))
|
||||
return !map_word_bitsset(map, curd, err);
|
||||
|
||||
return 0;
|
||||
return map_word_andequal(map, curd, ready, ready);
|
||||
}
|
||||
|
||||
oldd = map_read(map, addr);
|
||||
|
@ -1699,8 +1704,11 @@ static int __xipram do_write_oneword_once(struct map_info *map,
|
|||
break;
|
||||
}
|
||||
|
||||
if (chip_good(map, chip, adr, datum))
|
||||
if (chip_good(map, chip, adr, datum)) {
|
||||
if (cfi_check_err_status(map, chip, adr))
|
||||
ret = -EIO;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Latency issues. Drop the lock, wait a while and retry */
|
||||
UDELAY(map, chip, adr, 1);
|
||||
|
@ -1773,7 +1781,6 @@ static int __xipram do_write_oneword_retry(struct map_info *map,
|
|||
ret = do_write_oneword_once(map, chip, adr, datum, mode, cfi);
|
||||
if (ret) {
|
||||
/* reset on all failures. */
|
||||
cfi_check_err_status(map, chip, adr);
|
||||
map_write(map, CMD(0xF0), chip->start);
|
||||
/* FIXME - should have reset delay before continuing */
|
||||
|
||||
|
@ -1970,12 +1977,17 @@ static int __xipram do_write_buffer_wait(struct map_info *map,
|
|||
*/
|
||||
if (time_after(jiffies, timeo) &&
|
||||
!chip_good(map, chip, adr, datum)) {
|
||||
pr_err("MTD %s(): software timeout, address:0x%.8lx.\n",
|
||||
__func__, adr);
|
||||
ret = -EIO;
|
||||
break;
|
||||
}
|
||||
|
||||
if (chip_good(map, chip, adr, datum))
|
||||
if (chip_good(map, chip, adr, datum)) {
|
||||
if (cfi_check_err_status(map, chip, adr))
|
||||
ret = -EIO;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Latency issues. Drop the lock, wait a while and retry */
|
||||
UDELAY(map, chip, adr, 1);
|
||||
|
@ -2071,12 +2083,8 @@ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip,
|
|||
chip->word_write_time);
|
||||
|
||||
ret = do_write_buffer_wait(map, chip, adr, datum);
|
||||
if (ret) {
|
||||
cfi_check_err_status(map, chip, adr);
|
||||
if (ret)
|
||||
do_write_buffer_reset(map, chip, cfi);
|
||||
pr_err("MTD %s(): software timeout, address:0x%.8lx.\n",
|
||||
__func__, adr);
|
||||
}
|
||||
|
||||
xip_enable(map, chip, adr);
|
||||
|
||||
|
@ -2271,9 +2279,9 @@ static int do_panic_write_oneword(struct map_info *map, struct flchip *chip,
|
|||
udelay(1);
|
||||
}
|
||||
|
||||
if (!chip_good(map, chip, adr, datum)) {
|
||||
if (!chip_good(map, chip, adr, datum) ||
|
||||
cfi_check_err_status(map, chip, adr)) {
|
||||
/* reset on all failures. */
|
||||
cfi_check_err_status(map, chip, adr);
|
||||
map_write(map, CMD(0xF0), chip->start);
|
||||
/* FIXME - should have reset delay before continuing */
|
||||
|
||||
|
@ -2467,8 +2475,11 @@ static int __xipram do_erase_chip(struct map_info *map, struct flchip *chip)
|
|||
chip->erase_suspended = 0;
|
||||
}
|
||||
|
||||
if (chip_good(map, chip, adr, map_word_ff(map)))
|
||||
if (chip_good(map, chip, adr, map_word_ff(map))) {
|
||||
if (cfi_check_err_status(map, chip, adr))
|
||||
ret = -EIO;
|
||||
break;
|
||||
}
|
||||
|
||||
if (time_after(jiffies, timeo)) {
|
||||
printk(KERN_WARNING "MTD %s(): software timeout\n",
|
||||
|
@ -2483,7 +2494,6 @@ static int __xipram do_erase_chip(struct map_info *map, struct flchip *chip)
|
|||
/* Did we succeed? */
|
||||
if (ret) {
|
||||
/* reset on all failures. */
|
||||
cfi_check_err_status(map, chip, adr);
|
||||
map_write(map, CMD(0xF0), chip->start);
|
||||
/* FIXME - should have reset delay before continuing */
|
||||
|
||||
|
@ -2564,8 +2574,11 @@ static int __xipram do_erase_oneblock(struct map_info *map, struct flchip *chip,
|
|||
chip->erase_suspended = 0;
|
||||
}
|
||||
|
||||
if (chip_good(map, chip, adr, map_word_ff(map)))
|
||||
if (chip_good(map, chip, adr, map_word_ff(map))) {
|
||||
if (cfi_check_err_status(map, chip, adr))
|
||||
ret = -EIO;
|
||||
break;
|
||||
}
|
||||
|
||||
if (time_after(jiffies, timeo)) {
|
||||
printk(KERN_WARNING "MTD %s(): software timeout\n",
|
||||
|
@ -2580,7 +2593,6 @@ static int __xipram do_erase_oneblock(struct map_info *map, struct flchip *chip,
|
|||
/* Did we succeed? */
|
||||
if (ret) {
|
||||
/* reset on all failures. */
|
||||
cfi_check_err_status(map, chip, adr);
|
||||
map_write(map, CMD(0xF0), chip->start);
|
||||
/* FIXME - should have reset delay before continuing */
|
||||
|
||||
|
|
|
@ -64,15 +64,17 @@ static int mchp23k256_write(struct mtd_info *mtd, loff_t to, size_t len,
|
|||
struct spi_transfer transfer[2] = {};
|
||||
struct spi_message message;
|
||||
unsigned char command[MAX_CMD_SIZE];
|
||||
int ret;
|
||||
int ret, cmd_len;
|
||||
|
||||
spi_message_init(&message);
|
||||
|
||||
cmd_len = mchp23k256_cmdsz(flash);
|
||||
|
||||
command[0] = MCHP23K256_CMD_WRITE;
|
||||
mchp23k256_addr2cmd(flash, to, command);
|
||||
|
||||
transfer[0].tx_buf = command;
|
||||
transfer[0].len = mchp23k256_cmdsz(flash);
|
||||
transfer[0].len = cmd_len;
|
||||
spi_message_add_tail(&transfer[0], &message);
|
||||
|
||||
transfer[1].tx_buf = buf;
|
||||
|
@ -88,8 +90,8 @@ static int mchp23k256_write(struct mtd_info *mtd, loff_t to, size_t len,
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (retlen && message.actual_length > sizeof(command))
|
||||
*retlen += message.actual_length - sizeof(command);
|
||||
if (retlen && message.actual_length > cmd_len)
|
||||
*retlen += message.actual_length - cmd_len;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -101,16 +103,18 @@ static int mchp23k256_read(struct mtd_info *mtd, loff_t from, size_t len,
|
|||
struct spi_transfer transfer[2] = {};
|
||||
struct spi_message message;
|
||||
unsigned char command[MAX_CMD_SIZE];
|
||||
int ret;
|
||||
int ret, cmd_len;
|
||||
|
||||
spi_message_init(&message);
|
||||
|
||||
cmd_len = mchp23k256_cmdsz(flash);
|
||||
|
||||
memset(&transfer, 0, sizeof(transfer));
|
||||
command[0] = MCHP23K256_CMD_READ;
|
||||
mchp23k256_addr2cmd(flash, from, command);
|
||||
|
||||
transfer[0].tx_buf = command;
|
||||
transfer[0].len = mchp23k256_cmdsz(flash);
|
||||
transfer[0].len = cmd_len;
|
||||
spi_message_add_tail(&transfer[0], &message);
|
||||
|
||||
transfer[1].rx_buf = buf;
|
||||
|
@ -126,8 +130,8 @@ static int mchp23k256_read(struct mtd_info *mtd, loff_t from, size_t len,
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (retlen && message.actual_length > sizeof(command))
|
||||
*retlen += message.actual_length - sizeof(command);
|
||||
if (retlen && message.actual_length > cmd_len)
|
||||
*retlen += message.actual_length - cmd_len;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -3001,6 +3001,10 @@ static int gpmi_pm_resume(struct device *dev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/* Set flag to get timing setup restored for next exec_op */
|
||||
if (this->hw.clk_rate)
|
||||
this->hw.must_apply_timings = true;
|
||||
|
||||
/* re-init the BCH registers */
|
||||
ret = bch_set_geometry(this);
|
||||
if (ret) {
|
||||
|
@ -3008,9 +3012,6 @@ static int gpmi_pm_resume(struct device *dev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/* re-apply the timing setting */
|
||||
this->hw.must_apply_timings = true;
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_PM_SLEEP */
|
||||
|
|
|
@ -4544,9 +4544,7 @@ static void spi_nor_info_init_params(struct spi_nor *nor)
|
|||
|
||||
static void spansion_post_sfdp_fixups(struct spi_nor *nor)
|
||||
{
|
||||
struct mtd_info *mtd = &nor->mtd;
|
||||
|
||||
if (mtd->size <= SZ_16M)
|
||||
if (nor->params.size <= SZ_16M)
|
||||
return;
|
||||
|
||||
nor->flags |= SNOR_F_4B_OPCODES;
|
||||
|
|
|
@ -68,7 +68,7 @@ static void bcm_sf2_imp_setup(struct dsa_switch *ds, int port)
|
|||
|
||||
/* Force link status for IMP port */
|
||||
reg = core_readl(priv, offset);
|
||||
reg |= (MII_SW_OR | LINK_STS);
|
||||
reg |= (MII_SW_OR | LINK_STS | GMII_SPEED_UP_2G);
|
||||
core_writel(priv, reg, offset);
|
||||
|
||||
/* Enable Broadcast, Multicast, Unicast forwarding to IMP port */
|
||||
|
|
|
@ -619,7 +619,7 @@ static int sja1105_parse_ports_node(struct sja1105_private *priv,
|
|||
struct device *dev = &priv->spidev->dev;
|
||||
struct device_node *child;
|
||||
|
||||
for_each_child_of_node(ports_node, child) {
|
||||
for_each_available_child_of_node(ports_node, child) {
|
||||
struct device_node *phy_node;
|
||||
int phy_mode;
|
||||
u32 index;
|
||||
|
|
|
@ -2323,7 +2323,7 @@ static int bcm_sysport_map_queues(struct notifier_block *nb,
|
|||
ring->switch_queue = qp;
|
||||
ring->switch_port = port;
|
||||
ring->inspect = true;
|
||||
priv->ring_map[q + port * num_tx_queues] = ring;
|
||||
priv->ring_map[qp + port * num_tx_queues] = ring;
|
||||
qp++;
|
||||
}
|
||||
|
||||
|
@ -2338,7 +2338,7 @@ static int bcm_sysport_unmap_queues(struct notifier_block *nb,
|
|||
struct net_device *slave_dev;
|
||||
unsigned int num_tx_queues;
|
||||
struct net_device *dev;
|
||||
unsigned int q, port;
|
||||
unsigned int q, qp, port;
|
||||
|
||||
priv = container_of(nb, struct bcm_sysport_priv, dsa_notifier);
|
||||
if (priv->netdev != info->master)
|
||||
|
@ -2364,7 +2364,8 @@ static int bcm_sysport_unmap_queues(struct notifier_block *nb,
|
|||
continue;
|
||||
|
||||
ring->inspect = false;
|
||||
priv->ring_map[q + port * num_tx_queues] = NULL;
|
||||
qp = ring->switch_queue;
|
||||
priv->ring_map[qp + port * num_tx_queues] = NULL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -10991,11 +10991,23 @@ static bool bnxt_fltr_match(struct bnxt_ntuple_filter *f1,
|
|||
struct flow_keys *keys1 = &f1->fkeys;
|
||||
struct flow_keys *keys2 = &f2->fkeys;
|
||||
|
||||
if (keys1->addrs.v4addrs.src == keys2->addrs.v4addrs.src &&
|
||||
keys1->addrs.v4addrs.dst == keys2->addrs.v4addrs.dst &&
|
||||
keys1->ports.ports == keys2->ports.ports &&
|
||||
keys1->basic.ip_proto == keys2->basic.ip_proto &&
|
||||
keys1->basic.n_proto == keys2->basic.n_proto &&
|
||||
if (keys1->basic.n_proto != keys2->basic.n_proto ||
|
||||
keys1->basic.ip_proto != keys2->basic.ip_proto)
|
||||
return false;
|
||||
|
||||
if (keys1->basic.n_proto == htons(ETH_P_IP)) {
|
||||
if (keys1->addrs.v4addrs.src != keys2->addrs.v4addrs.src ||
|
||||
keys1->addrs.v4addrs.dst != keys2->addrs.v4addrs.dst)
|
||||
return false;
|
||||
} else {
|
||||
if (memcmp(&keys1->addrs.v6addrs.src, &keys2->addrs.v6addrs.src,
|
||||
sizeof(keys1->addrs.v6addrs.src)) ||
|
||||
memcmp(&keys1->addrs.v6addrs.dst, &keys2->addrs.v6addrs.dst,
|
||||
sizeof(keys1->addrs.v6addrs.dst)))
|
||||
return false;
|
||||
}
|
||||
|
||||
if (keys1->ports.ports == keys2->ports.ports &&
|
||||
keys1->control.flags == keys2->control.flags &&
|
||||
ether_addr_equal(f1->src_mac_addr, f2->src_mac_addr) &&
|
||||
ether_addr_equal(f1->dst_mac_addr, f2->dst_mac_addr))
|
||||
|
@ -11287,7 +11299,7 @@ int bnxt_get_port_parent_id(struct net_device *dev,
|
|||
return -EOPNOTSUPP;
|
||||
|
||||
/* The PF and it's VF-reps only support the switchdev framework */
|
||||
if (!BNXT_PF(bp))
|
||||
if (!BNXT_PF(bp) || !(bp->flags & BNXT_FLAG_DSN_VALID))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
ppid->id_len = sizeof(bp->switch_id);
|
||||
|
@ -11679,6 +11691,7 @@ static int bnxt_pcie_dsn_get(struct bnxt *bp, u8 dsn[])
|
|||
put_unaligned_le32(dw, &dsn[0]);
|
||||
pci_read_config_dword(pdev, pos + 4, &dw);
|
||||
put_unaligned_le32(dw, &dsn[4]);
|
||||
bp->flags |= BNXT_FLAG_DSN_VALID;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -11790,9 +11803,7 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
|
||||
if (BNXT_PF(bp)) {
|
||||
/* Read the adapter's DSN to use as the eswitch switch_id */
|
||||
rc = bnxt_pcie_dsn_get(bp, bp->switch_id);
|
||||
if (rc)
|
||||
goto init_err_pci_clean;
|
||||
bnxt_pcie_dsn_get(bp, bp->switch_id);
|
||||
}
|
||||
|
||||
/* MTU range: 60 - FW defined max */
|
||||
|
|
|
@ -1510,6 +1510,7 @@ struct bnxt {
|
|||
#define BNXT_FLAG_NO_AGG_RINGS 0x20000
|
||||
#define BNXT_FLAG_RX_PAGE_MODE 0x40000
|
||||
#define BNXT_FLAG_MULTI_HOST 0x100000
|
||||
#define BNXT_FLAG_DSN_VALID 0x200000
|
||||
#define BNXT_FLAG_DOUBLE_DB 0x400000
|
||||
#define BNXT_FLAG_CHIP_NITRO_A0 0x1000000
|
||||
#define BNXT_FLAG_DIM 0x2000000
|
||||
|
@ -1904,9 +1905,6 @@ static inline bool bnxt_cfa_hwrm_message(u16 req_type)
|
|||
case HWRM_CFA_ENCAP_RECORD_FREE:
|
||||
case HWRM_CFA_DECAP_FILTER_ALLOC:
|
||||
case HWRM_CFA_DECAP_FILTER_FREE:
|
||||
case HWRM_CFA_NTUPLE_FILTER_ALLOC:
|
||||
case HWRM_CFA_NTUPLE_FILTER_FREE:
|
||||
case HWRM_CFA_NTUPLE_FILTER_CFG:
|
||||
case HWRM_CFA_EM_FLOW_ALLOC:
|
||||
case HWRM_CFA_EM_FLOW_FREE:
|
||||
case HWRM_CFA_EM_FLOW_CFG:
|
||||
|
|
|
@ -398,6 +398,9 @@ static int bnxt_vf_reps_create(struct bnxt *bp)
|
|||
struct net_device *dev;
|
||||
int rc, i;
|
||||
|
||||
if (!(bp->flags & BNXT_FLAG_DSN_VALID))
|
||||
return -ENODEV;
|
||||
|
||||
bp->vf_reps = kcalloc(num_vfs, sizeof(vf_rep), GFP_KERNEL);
|
||||
if (!bp->vf_reps)
|
||||
return -ENOMEM;
|
||||
|
|
|
@ -565,7 +565,6 @@ static int hns_nic_poll_rx_skb(struct hns_nic_ring_data *ring_data,
|
|||
skb = *out_skb = napi_alloc_skb(&ring_data->napi,
|
||||
HNS_RX_HEAD_SIZE);
|
||||
if (unlikely(!skb)) {
|
||||
netdev_err(ndev, "alloc rx skb fail\n");
|
||||
ring->stats.sw_err_cnt++;
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
@ -1056,7 +1055,6 @@ static int hns_nic_common_poll(struct napi_struct *napi, int budget)
|
|||
container_of(napi, struct hns_nic_ring_data, napi);
|
||||
struct hnae_ring *ring = ring_data->ring;
|
||||
|
||||
try_again:
|
||||
clean_complete += ring_data->poll_one(
|
||||
ring_data, budget - clean_complete,
|
||||
ring_data->ex_process);
|
||||
|
@ -1066,7 +1064,7 @@ static int hns_nic_common_poll(struct napi_struct *napi, int budget)
|
|||
napi_complete(napi);
|
||||
ring->q->handle->dev->ops->toggle_ring_irq(ring, 0);
|
||||
} else {
|
||||
goto try_again;
|
||||
return budget;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -54,6 +54,8 @@ MODULE_PARM_DESC(debug, " Network interface message level setting");
|
|||
#define HNS3_INNER_VLAN_TAG 1
|
||||
#define HNS3_OUTER_VLAN_TAG 2
|
||||
|
||||
#define HNS3_MIN_TX_LEN 33U
|
||||
|
||||
/* hns3_pci_tbl - PCI Device ID Table
|
||||
*
|
||||
* Last entry must be all 0s
|
||||
|
@ -1329,6 +1331,10 @@ netdev_tx_t hns3_nic_net_xmit(struct sk_buff *skb, struct net_device *netdev)
|
|||
int ret;
|
||||
int i;
|
||||
|
||||
/* Hardware can only handle short frames above 32 bytes */
|
||||
if (skb_put_padto(skb, HNS3_MIN_TX_LEN))
|
||||
return NETDEV_TX_OK;
|
||||
|
||||
/* Prefetch the data used later */
|
||||
prefetch(skb->data);
|
||||
|
||||
|
|
|
@ -7168,6 +7168,7 @@ static int i40e_setup_macvlans(struct i40e_vsi *vsi, u16 macvlan_cnt, u16 qcnt,
|
|||
ch->num_queue_pairs = qcnt;
|
||||
if (!i40e_setup_channel(pf, vsi, ch)) {
|
||||
ret = -EINVAL;
|
||||
kfree(ch);
|
||||
goto err_free;
|
||||
}
|
||||
ch->parent_vsi = vsi;
|
||||
|
|
|
@ -812,23 +812,17 @@ static netdev_tx_t mlxsw_sp_port_xmit(struct sk_buff *skb,
|
|||
u64 len;
|
||||
int err;
|
||||
|
||||
if (skb_cow_head(skb, MLXSW_TXHDR_LEN)) {
|
||||
this_cpu_inc(mlxsw_sp_port->pcpu_stats->tx_dropped);
|
||||
dev_kfree_skb_any(skb);
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
||||
memset(skb->cb, 0, sizeof(struct mlxsw_skb_cb));
|
||||
|
||||
if (mlxsw_core_skb_transmit_busy(mlxsw_sp->core, &tx_info))
|
||||
return NETDEV_TX_BUSY;
|
||||
|
||||
if (unlikely(skb_headroom(skb) < MLXSW_TXHDR_LEN)) {
|
||||
struct sk_buff *skb_orig = skb;
|
||||
|
||||
skb = skb_realloc_headroom(skb, MLXSW_TXHDR_LEN);
|
||||
if (!skb) {
|
||||
this_cpu_inc(mlxsw_sp_port->pcpu_stats->tx_dropped);
|
||||
dev_kfree_skb_any(skb_orig);
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
dev_consume_skb_any(skb_orig);
|
||||
}
|
||||
|
||||
if (eth_skb_pad(skb)) {
|
||||
this_cpu_inc(mlxsw_sp_port->pcpu_stats->tx_dropped);
|
||||
return NETDEV_TX_OK;
|
||||
|
@ -1167,6 +1161,9 @@ static void update_stats_cache(struct work_struct *work)
|
|||
periodic_hw_stats.update_dw.work);
|
||||
|
||||
if (!netif_carrier_ok(mlxsw_sp_port->dev))
|
||||
/* Note: mlxsw_sp_port_down_wipe_counters() clears the cache as
|
||||
* necessary when port goes down.
|
||||
*/
|
||||
goto out;
|
||||
|
||||
mlxsw_sp_port_get_hw_stats(mlxsw_sp_port->dev,
|
||||
|
@ -4176,6 +4173,15 @@ static int mlxsw_sp_port_unsplit(struct mlxsw_core *mlxsw_core, u8 local_port,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
mlxsw_sp_port_down_wipe_counters(struct mlxsw_sp_port *mlxsw_sp_port)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < TC_MAX_QUEUE; i++)
|
||||
mlxsw_sp_port->periodic_hw_stats.xstats.backlog[i] = 0;
|
||||
}
|
||||
|
||||
static void mlxsw_sp_pude_event_func(const struct mlxsw_reg_info *reg,
|
||||
char *pude_pl, void *priv)
|
||||
{
|
||||
|
@ -4197,6 +4203,7 @@ static void mlxsw_sp_pude_event_func(const struct mlxsw_reg_info *reg,
|
|||
} else {
|
||||
netdev_info(mlxsw_sp_port->dev, "link down\n");
|
||||
netif_carrier_off(mlxsw_sp_port->dev);
|
||||
mlxsw_sp_port_down_wipe_counters(mlxsw_sp_port);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -195,6 +195,20 @@ mlxsw_sp_qdisc_get_xstats(struct mlxsw_sp_port *mlxsw_sp_port,
|
|||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
static u64
|
||||
mlxsw_sp_xstats_backlog(struct mlxsw_sp_port_xstats *xstats, int tclass_num)
|
||||
{
|
||||
return xstats->backlog[tclass_num] +
|
||||
xstats->backlog[tclass_num + 8];
|
||||
}
|
||||
|
||||
static u64
|
||||
mlxsw_sp_xstats_tail_drop(struct mlxsw_sp_port_xstats *xstats, int tclass_num)
|
||||
{
|
||||
return xstats->tail_drop[tclass_num] +
|
||||
xstats->tail_drop[tclass_num + 8];
|
||||
}
|
||||
|
||||
static void
|
||||
mlxsw_sp_qdisc_bstats_per_priority_get(struct mlxsw_sp_port_xstats *xstats,
|
||||
u8 prio_bitmap, u64 *tx_packets,
|
||||
|
@ -269,7 +283,7 @@ mlxsw_sp_setup_tc_qdisc_red_clean_stats(struct mlxsw_sp_port *mlxsw_sp_port,
|
|||
&stats_base->tx_bytes);
|
||||
red_base->prob_mark = xstats->ecn;
|
||||
red_base->prob_drop = xstats->wred_drop[tclass_num];
|
||||
red_base->pdrop = xstats->tail_drop[tclass_num];
|
||||
red_base->pdrop = mlxsw_sp_xstats_tail_drop(xstats, tclass_num);
|
||||
|
||||
stats_base->overlimits = red_base->prob_drop + red_base->prob_mark;
|
||||
stats_base->drops = red_base->prob_drop + red_base->pdrop;
|
||||
|
@ -369,7 +383,8 @@ mlxsw_sp_qdisc_get_red_xstats(struct mlxsw_sp_port *mlxsw_sp_port,
|
|||
|
||||
early_drops = xstats->wred_drop[tclass_num] - xstats_base->prob_drop;
|
||||
marks = xstats->ecn - xstats_base->prob_mark;
|
||||
pdrops = xstats->tail_drop[tclass_num] - xstats_base->pdrop;
|
||||
pdrops = mlxsw_sp_xstats_tail_drop(xstats, tclass_num) -
|
||||
xstats_base->pdrop;
|
||||
|
||||
res->pdrop += pdrops;
|
||||
res->prob_drop += early_drops;
|
||||
|
@ -402,9 +417,10 @@ mlxsw_sp_qdisc_get_red_stats(struct mlxsw_sp_port *mlxsw_sp_port,
|
|||
|
||||
overlimits = xstats->wred_drop[tclass_num] + xstats->ecn -
|
||||
stats_base->overlimits;
|
||||
drops = xstats->wred_drop[tclass_num] + xstats->tail_drop[tclass_num] -
|
||||
drops = xstats->wred_drop[tclass_num] +
|
||||
mlxsw_sp_xstats_tail_drop(xstats, tclass_num) -
|
||||
stats_base->drops;
|
||||
backlog = xstats->backlog[tclass_num];
|
||||
backlog = mlxsw_sp_xstats_backlog(xstats, tclass_num);
|
||||
|
||||
_bstats_update(stats_ptr->bstats, tx_bytes, tx_packets);
|
||||
stats_ptr->qstats->overlimits += overlimits;
|
||||
|
@ -575,9 +591,9 @@ mlxsw_sp_qdisc_get_prio_stats(struct mlxsw_sp_port *mlxsw_sp_port,
|
|||
tx_packets = stats->tx_packets - stats_base->tx_packets;
|
||||
|
||||
for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
|
||||
drops += xstats->tail_drop[i];
|
||||
drops += mlxsw_sp_xstats_tail_drop(xstats, i);
|
||||
drops += xstats->wred_drop[i];
|
||||
backlog += xstats->backlog[i];
|
||||
backlog += mlxsw_sp_xstats_backlog(xstats, i);
|
||||
}
|
||||
drops = drops - stats_base->drops;
|
||||
|
||||
|
@ -613,7 +629,7 @@ mlxsw_sp_setup_tc_qdisc_prio_clean_stats(struct mlxsw_sp_port *mlxsw_sp_port,
|
|||
|
||||
stats_base->drops = 0;
|
||||
for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
|
||||
stats_base->drops += xstats->tail_drop[i];
|
||||
stats_base->drops += mlxsw_sp_xstats_tail_drop(xstats, i);
|
||||
stats_base->drops += xstats->wred_drop[i];
|
||||
}
|
||||
|
||||
|
|
|
@ -2204,24 +2204,28 @@ static size_t __sh_eth_get_regs(struct net_device *ndev, u32 *buf)
|
|||
if (cd->tsu) {
|
||||
add_tsu_reg(ARSTR);
|
||||
add_tsu_reg(TSU_CTRST);
|
||||
add_tsu_reg(TSU_FWEN0);
|
||||
add_tsu_reg(TSU_FWEN1);
|
||||
add_tsu_reg(TSU_FCM);
|
||||
add_tsu_reg(TSU_BSYSL0);
|
||||
add_tsu_reg(TSU_BSYSL1);
|
||||
add_tsu_reg(TSU_PRISL0);
|
||||
add_tsu_reg(TSU_PRISL1);
|
||||
add_tsu_reg(TSU_FWSL0);
|
||||
add_tsu_reg(TSU_FWSL1);
|
||||
if (cd->dual_port) {
|
||||
add_tsu_reg(TSU_FWEN0);
|
||||
add_tsu_reg(TSU_FWEN1);
|
||||
add_tsu_reg(TSU_FCM);
|
||||
add_tsu_reg(TSU_BSYSL0);
|
||||
add_tsu_reg(TSU_BSYSL1);
|
||||
add_tsu_reg(TSU_PRISL0);
|
||||
add_tsu_reg(TSU_PRISL1);
|
||||
add_tsu_reg(TSU_FWSL0);
|
||||
add_tsu_reg(TSU_FWSL1);
|
||||
}
|
||||
add_tsu_reg(TSU_FWSLC);
|
||||
add_tsu_reg(TSU_QTAGM0);
|
||||
add_tsu_reg(TSU_QTAGM1);
|
||||
add_tsu_reg(TSU_FWSR);
|
||||
add_tsu_reg(TSU_FWINMK);
|
||||
add_tsu_reg(TSU_ADQT0);
|
||||
add_tsu_reg(TSU_ADQT1);
|
||||
add_tsu_reg(TSU_VTAG0);
|
||||
add_tsu_reg(TSU_VTAG1);
|
||||
if (cd->dual_port) {
|
||||
add_tsu_reg(TSU_QTAGM0);
|
||||
add_tsu_reg(TSU_QTAGM1);
|
||||
add_tsu_reg(TSU_FWSR);
|
||||
add_tsu_reg(TSU_FWINMK);
|
||||
add_tsu_reg(TSU_ADQT0);
|
||||
add_tsu_reg(TSU_ADQT1);
|
||||
add_tsu_reg(TSU_VTAG0);
|
||||
add_tsu_reg(TSU_VTAG1);
|
||||
}
|
||||
add_tsu_reg(TSU_ADSBSY);
|
||||
add_tsu_reg(TSU_TEN);
|
||||
add_tsu_reg(TSU_POST1);
|
||||
|
|
|
@ -424,16 +424,22 @@ static void ave_ethtool_get_wol(struct net_device *ndev,
|
|||
phy_ethtool_get_wol(ndev->phydev, wol);
|
||||
}
|
||||
|
||||
static int __ave_ethtool_set_wol(struct net_device *ndev,
|
||||
struct ethtool_wolinfo *wol)
|
||||
{
|
||||
if (!ndev->phydev ||
|
||||
(wol->wolopts & (WAKE_ARP | WAKE_MAGICSECURE)))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
return phy_ethtool_set_wol(ndev->phydev, wol);
|
||||
}
|
||||
|
||||
static int ave_ethtool_set_wol(struct net_device *ndev,
|
||||
struct ethtool_wolinfo *wol)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (!ndev->phydev ||
|
||||
(wol->wolopts & (WAKE_ARP | WAKE_MAGICSECURE)))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
ret = phy_ethtool_set_wol(ndev->phydev, wol);
|
||||
ret = __ave_ethtool_set_wol(ndev, wol);
|
||||
if (!ret)
|
||||
device_set_wakeup_enable(&ndev->dev, !!wol->wolopts);
|
||||
|
||||
|
@ -1216,7 +1222,7 @@ static int ave_init(struct net_device *ndev)
|
|||
|
||||
/* set wol initial state disabled */
|
||||
wol.wolopts = 0;
|
||||
ave_ethtool_set_wol(ndev, &wol);
|
||||
__ave_ethtool_set_wol(ndev, &wol);
|
||||
|
||||
if (!phy_interface_is_rgmii(phydev))
|
||||
phy_set_max_speed(phydev, SPEED_100);
|
||||
|
@ -1768,7 +1774,7 @@ static int ave_resume(struct device *dev)
|
|||
|
||||
ave_ethtool_get_wol(ndev, &wol);
|
||||
wol.wolopts = priv->wolopts;
|
||||
ave_ethtool_set_wol(ndev, &wol);
|
||||
__ave_ethtool_set_wol(ndev, &wol);
|
||||
|
||||
if (ndev->phydev) {
|
||||
ret = phy_resume(ndev->phydev);
|
||||
|
|
|
@ -364,9 +364,8 @@ struct dma_features {
|
|||
unsigned int arpoffsel;
|
||||
};
|
||||
|
||||
/* GMAC TX FIFO is 8K, Rx FIFO is 16K */
|
||||
#define BUF_SIZE_16KiB 16384
|
||||
/* RX Buffer size must be < 8191 and multiple of 4/8/16 bytes */
|
||||
/* RX Buffer size must be multiple of 4/8/16 bytes */
|
||||
#define BUF_SIZE_16KiB 16368
|
||||
#define BUF_SIZE_8KiB 8188
|
||||
#define BUF_SIZE_4KiB 4096
|
||||
#define BUF_SIZE_2KiB 2048
|
||||
|
|
|
@ -1108,7 +1108,9 @@ static int stmmac_set_bfsize(int mtu, int bufsize)
|
|||
{
|
||||
int ret = bufsize;
|
||||
|
||||
if (mtu >= BUF_SIZE_4KiB)
|
||||
if (mtu >= BUF_SIZE_8KiB)
|
||||
ret = BUF_SIZE_16KiB;
|
||||
else if (mtu >= BUF_SIZE_4KiB)
|
||||
ret = BUF_SIZE_8KiB;
|
||||
else if (mtu >= BUF_SIZE_2KiB)
|
||||
ret = BUF_SIZE_4KiB;
|
||||
|
|
|
@ -80,7 +80,7 @@ static struct sk_buff *stmmac_test_get_udp_skb(struct stmmac_priv *priv,
|
|||
if (attr->max_size && (attr->max_size > size))
|
||||
size = attr->max_size;
|
||||
|
||||
skb = netdev_alloc_skb_ip_align(priv->dev, size);
|
||||
skb = netdev_alloc_skb(priv->dev, size);
|
||||
if (!skb)
|
||||
return NULL;
|
||||
|
||||
|
@ -244,6 +244,8 @@ static int stmmac_test_loopback_validate(struct sk_buff *skb,
|
|||
struct net_device *orig_ndev)
|
||||
{
|
||||
struct stmmac_test_priv *tpriv = pt->af_packet_priv;
|
||||
unsigned char *src = tpriv->packet->src;
|
||||
unsigned char *dst = tpriv->packet->dst;
|
||||
struct stmmachdr *shdr;
|
||||
struct ethhdr *ehdr;
|
||||
struct udphdr *uhdr;
|
||||
|
@ -260,15 +262,15 @@ static int stmmac_test_loopback_validate(struct sk_buff *skb,
|
|||
goto out;
|
||||
|
||||
ehdr = (struct ethhdr *)skb_mac_header(skb);
|
||||
if (tpriv->packet->dst) {
|
||||
if (!ether_addr_equal(ehdr->h_dest, tpriv->packet->dst))
|
||||
if (dst) {
|
||||
if (!ether_addr_equal_unaligned(ehdr->h_dest, dst))
|
||||
goto out;
|
||||
}
|
||||
if (tpriv->packet->sarc) {
|
||||
if (!ether_addr_equal(ehdr->h_source, ehdr->h_dest))
|
||||
if (!ether_addr_equal_unaligned(ehdr->h_source, ehdr->h_dest))
|
||||
goto out;
|
||||
} else if (tpriv->packet->src) {
|
||||
if (!ether_addr_equal(ehdr->h_source, tpriv->packet->src))
|
||||
} else if (src) {
|
||||
if (!ether_addr_equal_unaligned(ehdr->h_source, src))
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
@ -714,7 +716,7 @@ static int stmmac_test_flowctrl_validate(struct sk_buff *skb,
|
|||
struct ethhdr *ehdr;
|
||||
|
||||
ehdr = (struct ethhdr *)skb_mac_header(skb);
|
||||
if (!ether_addr_equal(ehdr->h_source, orig_ndev->dev_addr))
|
||||
if (!ether_addr_equal_unaligned(ehdr->h_source, orig_ndev->dev_addr))
|
||||
goto out;
|
||||
if (ehdr->h_proto != htons(ETH_P_PAUSE))
|
||||
goto out;
|
||||
|
@ -851,12 +853,16 @@ static int stmmac_test_vlan_validate(struct sk_buff *skb,
|
|||
if (tpriv->vlan_id) {
|
||||
if (skb->vlan_proto != htons(proto))
|
||||
goto out;
|
||||
if (skb->vlan_tci != tpriv->vlan_id)
|
||||
if (skb->vlan_tci != tpriv->vlan_id) {
|
||||
/* Means filter did not work. */
|
||||
tpriv->ok = false;
|
||||
complete(&tpriv->comp);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
ehdr = (struct ethhdr *)skb_mac_header(skb);
|
||||
if (!ether_addr_equal(ehdr->h_dest, tpriv->packet->dst))
|
||||
if (!ether_addr_equal_unaligned(ehdr->h_dest, tpriv->packet->dst))
|
||||
goto out;
|
||||
|
||||
ihdr = ip_hdr(skb);
|
||||
|
@ -1291,16 +1297,19 @@ static int __stmmac_test_l3filt(struct stmmac_priv *priv, u32 dst, u32 src,
|
|||
struct stmmac_packet_attrs attr = { };
|
||||
struct flow_dissector *dissector;
|
||||
struct flow_cls_offload *cls;
|
||||
int ret, old_enable = 0;
|
||||
struct flow_rule *rule;
|
||||
int ret;
|
||||
|
||||
if (!tc_can_offload(priv->dev))
|
||||
return -EOPNOTSUPP;
|
||||
if (!priv->dma_cap.l3l4fnum)
|
||||
return -EOPNOTSUPP;
|
||||
if (priv->rss.enable)
|
||||
if (priv->rss.enable) {
|
||||
old_enable = priv->rss.enable;
|
||||
priv->rss.enable = false;
|
||||
stmmac_rss_configure(priv, priv->hw, NULL,
|
||||
priv->plat->rx_queues_to_use);
|
||||
}
|
||||
|
||||
dissector = kzalloc(sizeof(*dissector), GFP_KERNEL);
|
||||
if (!dissector) {
|
||||
|
@ -1367,7 +1376,8 @@ static int __stmmac_test_l3filt(struct stmmac_priv *priv, u32 dst, u32 src,
|
|||
cleanup_dissector:
|
||||
kfree(dissector);
|
||||
cleanup_rss:
|
||||
if (priv->rss.enable) {
|
||||
if (old_enable) {
|
||||
priv->rss.enable = old_enable;
|
||||
stmmac_rss_configure(priv, priv->hw, &priv->rss,
|
||||
priv->plat->rx_queues_to_use);
|
||||
}
|
||||
|
@ -1412,16 +1422,19 @@ static int __stmmac_test_l4filt(struct stmmac_priv *priv, u32 dst, u32 src,
|
|||
struct stmmac_packet_attrs attr = { };
|
||||
struct flow_dissector *dissector;
|
||||
struct flow_cls_offload *cls;
|
||||
int ret, old_enable = 0;
|
||||
struct flow_rule *rule;
|
||||
int ret;
|
||||
|
||||
if (!tc_can_offload(priv->dev))
|
||||
return -EOPNOTSUPP;
|
||||
if (!priv->dma_cap.l3l4fnum)
|
||||
return -EOPNOTSUPP;
|
||||
if (priv->rss.enable)
|
||||
if (priv->rss.enable) {
|
||||
old_enable = priv->rss.enable;
|
||||
priv->rss.enable = false;
|
||||
stmmac_rss_configure(priv, priv->hw, NULL,
|
||||
priv->plat->rx_queues_to_use);
|
||||
}
|
||||
|
||||
dissector = kzalloc(sizeof(*dissector), GFP_KERNEL);
|
||||
if (!dissector) {
|
||||
|
@ -1493,7 +1506,8 @@ static int __stmmac_test_l4filt(struct stmmac_priv *priv, u32 dst, u32 src,
|
|||
cleanup_dissector:
|
||||
kfree(dissector);
|
||||
cleanup_rss:
|
||||
if (priv->rss.enable) {
|
||||
if (old_enable) {
|
||||
priv->rss.enable = old_enable;
|
||||
stmmac_rss_configure(priv, priv->hw, &priv->rss,
|
||||
priv->plat->rx_queues_to_use);
|
||||
}
|
||||
|
@ -1546,7 +1560,7 @@ static int stmmac_test_arp_validate(struct sk_buff *skb,
|
|||
struct arphdr *ahdr;
|
||||
|
||||
ehdr = (struct ethhdr *)skb_mac_header(skb);
|
||||
if (!ether_addr_equal(ehdr->h_dest, tpriv->packet->src))
|
||||
if (!ether_addr_equal_unaligned(ehdr->h_dest, tpriv->packet->src))
|
||||
goto out;
|
||||
|
||||
ahdr = arp_hdr(skb);
|
||||
|
|
|
@ -579,6 +579,10 @@ static int tc_setup_cls(struct stmmac_priv *priv,
|
|||
{
|
||||
int ret = 0;
|
||||
|
||||
/* When RSS is enabled, the filtering will be bypassed */
|
||||
if (priv->rss.enable)
|
||||
return -EBUSY;
|
||||
|
||||
switch (cls->command) {
|
||||
case FLOW_CLS_REPLACE:
|
||||
ret = tc_add_flow(priv, cls);
|
||||
|
|
|
@ -1436,8 +1436,6 @@ void rndis_filter_device_remove(struct hv_device *dev,
|
|||
/* Halt and release the rndis device */
|
||||
rndis_filter_halt_device(net_dev, rndis_dev);
|
||||
|
||||
net_dev->extension = NULL;
|
||||
|
||||
netvsc_device_remove(dev);
|
||||
}
|
||||
|
||||
|
|
|
@ -259,7 +259,7 @@ static void macvlan_broadcast(struct sk_buff *skb,
|
|||
struct net_device *src,
|
||||
enum macvlan_mode mode)
|
||||
{
|
||||
const struct ethhdr *eth = skb_eth_hdr(skb);
|
||||
const struct ethhdr *eth = eth_hdr(skb);
|
||||
const struct macvlan_dev *vlan;
|
||||
struct sk_buff *nskb;
|
||||
unsigned int i;
|
||||
|
@ -513,10 +513,11 @@ static int macvlan_queue_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
const struct macvlan_dev *dest;
|
||||
|
||||
if (vlan->mode == MACVLAN_MODE_BRIDGE) {
|
||||
const struct ethhdr *eth = (void *)skb->data;
|
||||
const struct ethhdr *eth = skb_eth_hdr(skb);
|
||||
|
||||
/* send to other bridge ports directly */
|
||||
if (is_multicast_ether_addr(eth->h_dest)) {
|
||||
skb_reset_mac_header(skb);
|
||||
macvlan_broadcast(skb, port, dev, MACVLAN_MODE_BRIDGE);
|
||||
goto xmit_world;
|
||||
}
|
||||
|
|
|
@ -80,6 +80,7 @@
|
|||
#define DP83867_PHYCR_FIFO_DEPTH_MAX 0x03
|
||||
#define DP83867_PHYCR_FIFO_DEPTH_MASK GENMASK(15, 14)
|
||||
#define DP83867_PHYCR_RESERVED_MASK BIT(11)
|
||||
#define DP83867_PHYCR_FORCE_LINK_GOOD BIT(10)
|
||||
|
||||
/* RGMIIDCTL bits */
|
||||
#define DP83867_RGMII_TX_CLK_DELAY_MAX 0xf
|
||||
|
@ -454,7 +455,12 @@ static int dp83867_phy_reset(struct phy_device *phydev)
|
|||
|
||||
usleep_range(10, 20);
|
||||
|
||||
return 0;
|
||||
/* After reset FORCE_LINK_GOOD bit is set. Although the
|
||||
* default value should be unset. Disable FORCE_LINK_GOOD
|
||||
* for the phy to work properly.
|
||||
*/
|
||||
return phy_modify(phydev, MII_DP83867_PHYCTRL,
|
||||
DP83867_PHYCR_FORCE_LINK_GOOD, 0);
|
||||
}
|
||||
|
||||
static struct phy_driver dp83867_driver[] = {
|
||||
|
|
|
@ -3750,6 +3750,7 @@ static int lan78xx_probe(struct usb_interface *intf,
|
|||
|
||||
/* MTU range: 68 - 9000 */
|
||||
netdev->max_mtu = MAX_SINGLE_PACKET_SIZE;
|
||||
netif_set_gso_max_size(netdev, MAX_SINGLE_PACKET_SIZE - MAX_HEADER);
|
||||
|
||||
dev->ep_blkin = (intf->cur_altsetting)->endpoint + 0;
|
||||
dev->ep_blkout = (intf->cur_altsetting)->endpoint + 1;
|
||||
|
|
|
@ -5587,6 +5587,9 @@ static int rtl8152_probe(struct usb_interface *intf,
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
if (intf->cur_altsetting->desc.bNumEndpoints < 3)
|
||||
return -ENODEV;
|
||||
|
||||
usb_reset_device(udev);
|
||||
netdev = alloc_etherdev(sizeof(struct r8152));
|
||||
if (!netdev) {
|
||||
|
|
|
@ -73,7 +73,7 @@ static struct ucc_tdm_info utdm_primary_info = {
|
|||
},
|
||||
};
|
||||
|
||||
static struct ucc_tdm_info utdm_info[MAX_HDLC_NUM];
|
||||
static struct ucc_tdm_info utdm_info[UCC_MAX_NUM];
|
||||
|
||||
static int uhdlc_init(struct ucc_hdlc_private *priv)
|
||||
{
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user