linux-stable/drivers/phy
Vladimir Oltean 139ad11431 phy: lynx-28g: serialize concurrent phy_set_mode_ext() calls to shared registers
The protocol converter configuration registers PCC8, PCCC, PCCD
(implemented by the driver), as well as others, control protocol
converters from multiple lanes (each represented as a different
struct phy). So, if there are simultaneous calls to phy_set_mode_ext()
to lanes sharing the same PCC register (either for the "old" or for the
"new" protocol), corruption of the values programmed to hardware is
possible, because lynx_28g_rmw() has no locking.

Add a spinlock in the struct lynx_28g_priv shared by all lanes, and take
the global spinlock from the phy_ops :: set_mode() implementation. There
are no other callers which modify PCC registers.

Fixes: 8f73b37cf3 ("phy: add support for the Layerscape SerDes 28G")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-10-06 10:59:52 +01:00
..
allwinner phy: Explicitly include correct DT includes 2023-07-17 11:52:56 +05:30
amlogic phy: amlogic: meson-g12a-usb2: fix Wvoid-pointer-to-enum-cast warning 2023-08-22 19:28:10 +05:30
broadcom phy: broadcom: sr-usb: fix Wvoid-pointer-to-enum-cast warning 2023-08-11 09:25:14 +01:00
cadence phy: Explicitly include correct DT includes 2023-07-17 11:52:56 +05:30
freescale phy: lynx-28g: serialize concurrent phy_set_mode_ext() calls to shared registers 2023-10-06 10:59:52 +01:00
hisilicon phy-for-6.6 2023-09-03 10:38:02 -07:00
ingenic phy: Explicitly include correct DT includes 2023-07-17 11:52:56 +05:30
intel phy-for-6.4 2023-05-03 11:17:34 -07:00
lantiq phy: Explicitly include correct DT includes 2023-07-17 11:52:56 +05:30
marvell phy: marvell pxa-usb: fix Wvoid-pointer-to-enum-cast warning 2023-08-11 09:25:15 +01:00
mediatek phy-for-6.6 2023-09-03 10:38:02 -07:00
microchip phy: sparx5-serdes: add skip_cmu_cfg check when configuring lanes 2023-05-08 17:13:01 +05:30
motorola phy: motorola: phy-mapphone-mdm6600: Convert to platform remove callback returning void 2023-03-20 18:14:56 +05:30
mscc phy: phy-ocelot-serdes: add ability to be used in a non-syscon configuration 2023-03-20 09:08:48 +00:00
qualcomm phy-for-6.6 2023-09-03 10:38:02 -07:00
ralink phy: Explicitly include correct DT includes 2023-07-17 11:52:56 +05:30
realtek phy: realtek: usb: add the error handler for nvmem_cell_read 2023-08-04 14:47:18 +02:00
renesas phy: Explicitly include correct DT includes 2023-07-17 11:52:56 +05:30
rockchip phy: rockchip: inno-dsidphy: Add rv1126 support 2023-08-22 19:28:11 +05:30
samsung phy: exynos5-usbdrd: Add Exynos850 support 2023-08-22 19:41:15 +05:30
socionext phy: Explicitly include correct DT includes 2023-07-17 11:52:56 +05:30
st phy: Explicitly include correct DT includes 2023-07-17 11:52:56 +05:30
starfive phy: starfive: StarFive PHYs should depend on ARCH_STARFIVE 2023-07-26 19:09:08 +05:30
sunplus phy: Explicitly include correct DT includes 2023-07-17 11:52:56 +05:30
tegra phy: Remove duplicated include in xusb.c 2023-07-24 16:24:19 +05:30
ti phy: Explicitly include correct DT includes 2023-07-17 11:52:56 +05:30
xilinx phy: zynqmp: Allow variation in refclk rate 2023-07-12 22:27:44 +05:30
Kconfig phy-for-6.6 2023-09-03 10:38:02 -07:00
Makefile phy-for-6.6 2023-09-03 10:38:02 -07:00
phy-can-transceiver.c phy: Explicitly include correct DT includes 2023-07-17 11:52:56 +05:30
phy-core-mipi-dphy.c phy: dphy: add support to calculate the timing based on hs_clk_rate 2022-10-27 14:38:04 +03:00
phy-core.c phy: core: add debugfs files 2023-05-19 23:23:52 +05:30
phy-lgm-usb.c phy: phy-lgm-usb: Convert to platform remove callback returning void 2023-03-20 18:14:56 +05:30
phy-lpc18xx-usb-otg.c
phy-pistachio-usb.c
phy-xgene.c phy: Explicitly include correct DT includes 2023-07-17 11:52:56 +05:30