Skip to content

Commit 5784646

Browse files
committed
spi: sun6i: fix RX data corruption in DMA mode
Merge series from Tobias Schramm <[email protected]>: This set of patches fixes two bugs in the sun6i SPI driver that result in corruption of received data in DMA RX mode. The first bug seems to be related to an incompatibility of the SPI RX FIFO with wider than single byte read accesses during SPI transfers. I'm not sure if this bug affects all types of SPI controllers found in Allwinner SoCs supported by this driver. However reducing the access width should always be safe. I've tested this change on a V3s SoC. Further testing to narrow down the set of affected SoCs in the future would be welcome. The second bug is a race between SPI RX DMA and FIFO drain logic for interrupt-based SPI operation. This bug affects all SPI controllers supported by this driver. Once again this change has been tested on the Allwinner V3s SoC.
2 parents 60ea3db + 1f11f42 commit 5784646

File tree

448 files changed

+3717
-1956
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

448 files changed

+3717
-1956
lines changed

.mailmap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,8 @@ Shuah Khan <[email protected]> <[email protected]>
538538
539539
540540
541+
542+
541543
Simon Kelley <[email protected]>
542544
Sricharan Ramabadhran <[email protected]> <[email protected]>
543545

Documentation/ABI/testing/sysfs-class-led-trigger-netdev

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Description:
1313
Specifies the duration of the LED blink in milliseconds.
1414
Defaults to 50 ms.
1515

16-
With hw_control ON, the interval value MUST be set to the
16+
When offloaded is true, the interval value MUST be set to the
1717
default value and cannot be changed.
1818
Trying to set any value in this specific mode will return
1919
an EINVAL error.
@@ -44,8 +44,8 @@ Description:
4444
If set to 1, the LED will blink for the milliseconds specified
4545
in interval to signal transmission.
4646

47-
With hw_control ON, the blink interval is controlled by hardware
48-
and won't reflect the value set in interval.
47+
When offloaded is true, the blink interval is controlled by
48+
hardware and won't reflect the value set in interval.
4949

5050
What: /sys/class/leds/<led>/rx
5151
Date: Dec 2017
@@ -59,21 +59,21 @@ Description:
5959
If set to 1, the LED will blink for the milliseconds specified
6060
in interval to signal reception.
6161

62-
With hw_control ON, the blink interval is controlled by hardware
63-
and won't reflect the value set in interval.
62+
When offloaded is true, the blink interval is controlled by
63+
hardware and won't reflect the value set in interval.
6464

65-
What: /sys/class/leds/<led>/hw_control
65+
What: /sys/class/leds/<led>/offloaded
6666
Date: Jun 2023
6767
KernelVersion: 6.5
6868
6969
Description:
70-
Communicate whether the LED trigger modes are driven by hardware
71-
or software fallback is used.
70+
Communicate whether the LED trigger modes are offloaded to
71+
hardware or whether software fallback is used.
7272

7373
If 0, the LED is using software fallback to blink.
7474

75-
If 1, the LED is using hardware control to blink and signal the
76-
requested modes.
75+
If 1, the LED blinking in requested mode is offloaded to
76+
hardware.
7777

7878
What: /sys/class/leds/<led>/link_10
7979
Date: Jun 2023

Documentation/admin-guide/hw-vuln/srso.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ sequence.
141141
To ensure the safety of this mitigation, the kernel must ensure that the
142142
safe return sequence is itself free from attacker interference. In Zen3
143143
and Zen4, this is accomplished by creating a BTB alias between the
144-
untraining function srso_untrain_ret_alias() and the safe return
145-
function srso_safe_ret_alias() which results in evicting a potentially
144+
untraining function srso_alias_untrain_ret() and the safe return
145+
function srso_alias_safe_ret() which results in evicting a potentially
146146
poisoned BTB entry and using that safe one for all function returns.
147147

148148
In older Zen1 and Zen2, this is accomplished using a reinterpretation

Documentation/devicetree/bindings/pinctrl/qcom,sa8775p-tlmm.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ $defs:
8787
emac0_mdc, emac0_mdio, emac0_ptp_aux, emac0_ptp_pps, emac1_mcg0,
8888
emac1_mcg1, emac1_mcg2, emac1_mcg3, emac1_mdc, emac1_mdio,
8989
emac1_ptp_aux, emac1_ptp_pps, gcc_gp1, gcc_gp2, gcc_gp3,
90-
gcc_gp4, gcc_gp5, hs0_mi2s, hs1_mi2s, hs2_mi2s, ibi_i3c,
90+
gcc_gp4, gcc_gp5, gpio, hs0_mi2s, hs1_mi2s, hs2_mi2s, ibi_i3c,
9191
jitter_bist, mdp0_vsync0, mdp0_vsync1, mdp0_vsync2, mdp0_vsync3,
9292
mdp0_vsync4, mdp0_vsync5, mdp0_vsync6, mdp0_vsync7, mdp0_vsync8,
9393
mdp1_vsync0, mdp1_vsync1, mdp1_vsync2, mdp1_vsync3, mdp1_vsync4,

Documentation/i2c/writing-clients.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ driver model device node, and its I2C address.
4646
},
4747

4848
.id_table = foo_idtable,
49-
.probe_new = foo_probe,
49+
.probe = foo_probe,
5050
.remove = foo_remove,
5151
/* if device autodetection is needed: */
5252
.class = I2C_CLASS_SOMETHING,

Documentation/networking/nf_conntrack-sysctl.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,10 @@ nf_conntrack_sctp_timeout_established - INTEGER (seconds)
178178
Default is set to (hb_interval * path_max_retrans + rto_max)
179179

180180
nf_conntrack_sctp_timeout_shutdown_sent - INTEGER (seconds)
181-
default 0.3
181+
default 3
182182

183183
nf_conntrack_sctp_timeout_shutdown_recd - INTEGER (seconds)
184-
default 0.3
184+
default 3
185185

186186
nf_conntrack_sctp_timeout_shutdown_ack_sent - INTEGER (seconds)
187187
default 3

MAINTAINERS

Lines changed: 56 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8816,6 +8816,7 @@ R: Michael Walle <[email protected]>
88168816
S: Maintained
88178817
F: drivers/gpio/gpio-regmap.c
88188818
F: include/linux/gpio/regmap.h
8819+
K: (devm_)?gpio_regmap_(un)?register
88198820

88208821
GPIO SUBSYSTEM
88218822
M: Linus Walleij <[email protected]>
@@ -14816,6 +14817,16 @@ F: net/netfilter/xt_CONNSECMARK.c
1481614817
F: net/netfilter/xt_SECMARK.c
1481714818
F: net/netlabel/
1481814819

14820+
NETWORKING [MACSEC]
14821+
M: Sabrina Dubroca <[email protected]>
14822+
14823+
S: Maintained
14824+
F: drivers/net/macsec.c
14825+
F: include/net/macsec.h
14826+
F: include/uapi/linux/if_macsec.h
14827+
K: macsec
14828+
K: \bmdo_
14829+
1481914830
NETWORKING [MPTCP]
1482014831
M: Matthieu Baerts <[email protected]>
1482114832
M: Mat Martineau <[email protected]>
@@ -19237,13 +19248,6 @@ F: Documentation/devicetree/bindings/serial/serial.yaml
1923719248
F: drivers/tty/serdev/
1923819249
F: include/linux/serdev.h
1923919250

19240-
SERIAL DRIVERS
19241-
M: Greg Kroah-Hartman <[email protected]>
19242-
19243-
S: Maintained
19244-
F: Documentation/devicetree/bindings/serial/
19245-
F: drivers/tty/serial/
19246-
1924719251
SERIAL IR RECEIVER
1924819252
M: Sean Young <[email protected]>
1924919253
@@ -21072,6 +21076,39 @@ S: Maintained
2107221076
F: Documentation/devicetree/bindings/sound/davinci-mcasp-audio.yaml
2107321077
F: sound/soc/ti/
2107421078

21079+
TEXAS INSTRUMENTS AUDIO (ASoC/HDA) DRIVERS
21080+
M: Shenghao Ding <[email protected]>
21081+
M: Kevin Lu <[email protected]>
21082+
M: Baojun Xu <[email protected]>
21083+
L: [email protected] (moderated for non-subscribers)
21084+
S: Maintained
21085+
F: Documentation/devicetree/bindings/sound/tas2552.txt
21086+
F: Documentation/devicetree/bindings/sound/tas2562.yaml
21087+
F: Documentation/devicetree/bindings/sound/tas2770.yaml
21088+
F: Documentation/devicetree/bindings/sound/tas27xx.yaml
21089+
F: Documentation/devicetree/bindings/sound/ti,pcm1681.txt
21090+
F: Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml
21091+
F: Documentation/devicetree/bindings/sound/ti,tlv320*.yaml
21092+
F: Documentation/devicetree/bindings/sound/tlv320adcx140.yaml
21093+
F: Documentation/devicetree/bindings/sound/tlv320aic31xx.txt
21094+
F: Documentation/devicetree/bindings/sound/tpa6130a2.txt
21095+
F: include/sound/tas2*.h
21096+
F: include/sound/tlv320*.h
21097+
F: include/sound/tpa6130a2-plat.h
21098+
F: sound/pci/hda/tas2781_hda_i2c.c
21099+
F: sound/soc/codecs/pcm1681.c
21100+
F: sound/soc/codecs/pcm1789*.*
21101+
F: sound/soc/codecs/pcm179x*.*
21102+
F: sound/soc/codecs/pcm186x*.*
21103+
F: sound/soc/codecs/pcm3008.*
21104+
F: sound/soc/codecs/pcm3060*.*
21105+
F: sound/soc/codecs/pcm3168a*.*
21106+
F: sound/soc/codecs/pcm5102a.c
21107+
F: sound/soc/codecs/pcm512x*.*
21108+
F: sound/soc/codecs/tas2*.*
21109+
F: sound/soc/codecs/tlv320*.*
21110+
F: sound/soc/codecs/tpa6130a2.*
21111+
2107521112
TEXAS INSTRUMENTS DMA DRIVERS
2107621113
M: Peter Ujfalusi <[email protected]>
2107721114
@@ -21648,20 +21685,16 @@ W: https://github.com/srcres258/linux-doc
2164821685
T: git git://github.com/srcres258/linux-doc.git doc-zh-tw
2164921686
F: Documentation/translations/zh_TW/
2165021687

21651-
TTY LAYER
21688+
TTY LAYER AND SERIAL DRIVERS
2165221689
M: Greg Kroah-Hartman <[email protected]>
2165321690
M: Jiri Slaby <[email protected]>
2165421691
2165521692
2165621693
S: Supported
2165721694
T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
21695+
F: Documentation/devicetree/bindings/serial/
2165821696
F: Documentation/driver-api/serial/
2165921697
F: drivers/tty/
21660-
F: drivers/tty/serial/serial_base.h
21661-
F: drivers/tty/serial/serial_base_bus.c
21662-
F: drivers/tty/serial/serial_core.c
21663-
F: drivers/tty/serial/serial_ctrl.c
21664-
F: drivers/tty/serial/serial_port.c
2166521698
F: include/linux/selection.h
2166621699
F: include/linux/serial.h
2166721700
F: include/linux/serial_core.h
@@ -22488,7 +22521,6 @@ L: [email protected]
2248822521
S: Maintained
2248922522
F: drivers/block/virtio_blk.c
2249022523
F: drivers/scsi/virtio_scsi.c
22491-
F: drivers/vhost/scsi.c
2249222524
F: include/uapi/linux/virtio_blk.h
2249322525
F: include/uapi/linux/virtio_scsi.h
2249422526

@@ -22587,6 +22619,16 @@ F: include/linux/vhost_iotlb.h
2258722619
F: include/uapi/linux/vhost.h
2258822620
F: kernel/vhost_task.c
2258922621

22622+
VIRTIO HOST (VHOST-SCSI)
22623+
M: "Michael S. Tsirkin" <[email protected]>
22624+
M: Jason Wang <[email protected]>
22625+
M: Mike Christie <[email protected]>
22626+
R: Paolo Bonzini <[email protected]>
22627+
R: Stefan Hajnoczi <[email protected]>
22628+
22629+
S: Maintained
22630+
F: drivers/vhost/scsi.c
22631+
2259022632
VIRTIO I2C DRIVER
2259122633
M: Conghui Chen <[email protected]>
2259222634
M: Viresh Kumar <[email protected]>

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
VERSION = 6
33
PATCHLEVEL = 5
44
SUBLEVEL = 0
5-
EXTRAVERSION = -rc6
5+
EXTRAVERSION =
66
NAME = Hurr durr I'ma ninja sloth
77

88
# *DOCUMENTATION*

arch/arm/boot/dts/arm/integratorap.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158
valid-mask = <0x003fffff>;
159159
};
160160

161-
pci: pciv3@62000000 {
161+
pci: pci@62000000 {
162162
compatible = "arm,integrator-ap-pci", "v3,v360epc-pci";
163163
device_type = "pci";
164164
#interrupt-cells = <1>;

arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-mira.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@
182182
pinctrl-0 = <&pinctrl_rtc_int>;
183183
reg = <0x68>;
184184
interrupt-parent = <&gpio7>;
185-
interrupts = <8 IRQ_TYPE_LEVEL_HIGH>;
185+
interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
186186
status = "disabled";
187187
};
188188
};

arch/arm/boot/dts/nxp/imx/imx6sx.dtsi

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,6 @@
863863
reg = <0>;
864864

865865
ldb_from_lcdif1: endpoint {
866-
remote-endpoint = <&lcdif1_to_ldb>;
867866
};
868867
};
869868

@@ -1010,6 +1009,8 @@
10101009
<&clks IMX6SX_CLK_USDHC1>;
10111010
clock-names = "ipg", "ahb", "per";
10121011
bus-width = <4>;
1012+
fsl,tuning-start-tap = <20>;
1013+
fsl,tuning-step= <2>;
10131014
status = "disabled";
10141015
};
10151016

@@ -1022,6 +1023,8 @@
10221023
<&clks IMX6SX_CLK_USDHC2>;
10231024
clock-names = "ipg", "ahb", "per";
10241025
bus-width = <4>;
1026+
fsl,tuning-start-tap = <20>;
1027+
fsl,tuning-step= <2>;
10251028
status = "disabled";
10261029
};
10271030

@@ -1034,6 +1037,8 @@
10341037
<&clks IMX6SX_CLK_USDHC3>;
10351038
clock-names = "ipg", "ahb", "per";
10361039
bus-width = <4>;
1040+
fsl,tuning-start-tap = <20>;
1041+
fsl,tuning-step= <2>;
10371042
status = "disabled";
10381043
};
10391044

@@ -1309,11 +1314,8 @@
13091314
power-domains = <&pd_disp>;
13101315
status = "disabled";
13111316

1312-
ports {
1313-
port {
1314-
lcdif1_to_ldb: endpoint {
1315-
remote-endpoint = <&ldb_from_lcdif1>;
1316-
};
1317+
port {
1318+
lcdif1_to_ldb: endpoint {
13171319
};
13181320
};
13191321
};

arch/arm/boot/dts/nxp/imx/imx7s.dtsi

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1184,6 +1184,8 @@
11841184
<&clks IMX7D_USDHC1_ROOT_CLK>;
11851185
clock-names = "ipg", "ahb", "per";
11861186
bus-width = <4>;
1187+
fsl,tuning-step = <2>;
1188+
fsl,tuning-start-tap = <20>;
11871189
status = "disabled";
11881190
};
11891191

@@ -1196,6 +1198,8 @@
11961198
<&clks IMX7D_USDHC2_ROOT_CLK>;
11971199
clock-names = "ipg", "ahb", "per";
11981200
bus-width = <4>;
1201+
fsl,tuning-step = <2>;
1202+
fsl,tuning-start-tap = <20>;
11991203
status = "disabled";
12001204
};
12011205

@@ -1208,6 +1212,8 @@
12081212
<&clks IMX7D_USDHC3_ROOT_CLK>;
12091213
clock-names = "ipg", "ahb", "per";
12101214
bus-width = <4>;
1215+
fsl,tuning-step = <2>;
1216+
fsl,tuning-start-tap = <20>;
12111217
status = "disabled";
12121218
};
12131219

arch/arm/boot/dts/ti/omap/am335x-bone-common.dtsi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@
145145
/* MDIO */
146146
AM33XX_PADCONF(AM335X_PIN_MDIO, PIN_INPUT_PULLUP | SLEWCTRL_FAST, MUX_MODE0)
147147
AM33XX_PADCONF(AM335X_PIN_MDC, PIN_OUTPUT_PULLUP, MUX_MODE0)
148+
/* Added to support GPIO controlled PHY reset */
149+
AM33XX_PADCONF(AM335X_PIN_UART0_CTSN, PIN_OUTPUT_PULLUP, MUX_MODE7)
148150
>;
149151
};
150152

@@ -153,6 +155,8 @@
153155
/* MDIO reset value */
154156
AM33XX_PADCONF(AM335X_PIN_MDIO, PIN_INPUT_PULLDOWN, MUX_MODE7)
155157
AM33XX_PADCONF(AM335X_PIN_MDC, PIN_INPUT_PULLDOWN, MUX_MODE7)
158+
/* Added to support GPIO controlled PHY reset */
159+
AM33XX_PADCONF(AM335X_PIN_UART0_CTSN, PIN_INPUT_PULLDOWN, MUX_MODE7)
156160
>;
157161
};
158162

@@ -215,6 +219,7 @@
215219
baseboard_eeprom: baseboard_eeprom@50 {
216220
compatible = "atmel,24c256";
217221
reg = <0x50>;
222+
vcc-supply = <&ldo4_reg>;
218223

219224
#address-cells = <1>;
220225
#size-cells = <1>;
@@ -377,6 +382,10 @@
377382

378383
ethphy0: ethernet-phy@0 {
379384
reg = <0>;
385+
/* Support GPIO reset on revision C3 boards */
386+
reset-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
387+
reset-assert-us = <300>;
388+
reset-deassert-us = <6500>;
380389
};
381390
};
382391

arch/arm/mach-zynq/pm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
*/
99

1010
#include <linux/io.h>
11+
#include <linux/of.h>
1112
#include <linux/of_address.h>
12-
#include <linux/of_device.h>
1313
#include "common.h"
1414

1515
/* register offsets */

arch/arm64/boot/dts/freescale/imx8mm.dtsi

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,10 +1221,9 @@
12211221
compatible = "fsl,imx8mm-mipi-csi2";
12221222
reg = <0x32e30000 0x1000>;
12231223
interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
1224-
assigned-clocks = <&clk IMX8MM_CLK_CSI1_CORE>,
1225-
<&clk IMX8MM_CLK_CSI1_PHY_REF>;
1226-
assigned-clock-parents = <&clk IMX8MM_SYS_PLL2_1000M>,
1227-
<&clk IMX8MM_SYS_PLL2_1000M>;
1224+
assigned-clocks = <&clk IMX8MM_CLK_CSI1_CORE>;
1225+
assigned-clock-parents = <&clk IMX8MM_SYS_PLL2_1000M>;
1226+
12281227
clock-frequency = <333000000>;
12291228
clocks = <&clk IMX8MM_CLK_DISP_APB_ROOT>,
12301229
<&clk IMX8MM_CLK_CSI1_ROOT>,

0 commit comments

Comments
 (0)