net: dsa: motorcomm: Add LED support
Subsystems (5)
David Yang
maintainerv10 cover net: dsa: motorcomm: Add LED support
LEDs can be described in the device tree using the standard LED node notation. Currently, only parallel mode and strict 1:1 mapping (i.e. the HW default) are supported.
v9: https://lore.kernel.org/r/[email protected]
- LED initialization sequence adjusted
- add DT description
v8: https://lore.kernel.org/r/[email protected]
- limit the led port number
v7: https://lore.kernel.org/r/[email protected]
- rebase
v6: https://lore.kernel.org/r/[email protected]
- per-port initialization support
v5: https://lore.kernel.org/r/[email protected]
- improve trigger selection
v4: https://lore.kernel.org/r/[email protected]
- fix some reg op typos
v3: https://lore.kernel.org/r/[email protected]
- fix null pointer dereference
- support polarity auto-configuration
v2: https://lore.kernel.org/r/[email protected]
- allocate LED structures only
- eliminate double locking
v1: https://lore.kernel.org/r/[email protected]
- set up polarity correctly
- do not set up .brightness_get() to prevent dead lo
David Yang (4):
net: dsa: motorcomm: Move to subdirectory
net: dsa: motorcomm: Split SMI module
net: dsa: motorcomm: Add LED support
dt-bindings: net: dsa: yt921x: Add LEDs definition example
.../bindings/net/dsa/motorcomm,yt921x.yaml | 23 +
MAINTAINERS | 2 +-
drivers/net/dsa/Kconfig | 10 +-
drivers/net/dsa/Makefile | 2 +-
drivers/net/dsa/motorcomm/Kconfig | 17 +
drivers/net/dsa/motorcomm/Makefile | 5 +
.../net/dsa/{yt921x.c => motorcomm/chip.c} | 222 +-----
.../net/dsa/{yt921x.h => motorcomm/chip.h} | 12 +
drivers/net/dsa/motorcomm/leds.c | 654 ++++++++++++++++++
drivers/net/dsa/motorcomm/leds.h | 121 ++++
drivers/net/dsa/motorcomm/smi.c | 157 +++++
drivers/net/dsa/motorcomm/smi.h | 92 +++
12 files changed, 1098 insertions(+), 219 deletions(-)
create mode 100644 drivers/net/dsa/motorcomm/Kconfig
create mode 100644 drivers/net/dsa/motorcomm/Makefile
rename drivers/net/dsa/{yt921x.c => motorcomm/chip.c} (96%)
rename drivers/net/dsa/{yt921x.h => motorcomm/chip.h} (99%)
create mode 100644 drivers/net/dsa/motorcomm/leds.c
create mode 100644 drivers/net/dsa/motorcomm/leds.h
create mode 100644 drivers/net/dsa/motorcomm/smi.c
create mode 100644 drivers/net/dsa/motorcomm/smi.hSignature · 1 line
2.53.0
David Yang
maintainerPATCH v10 1/4 net: dsa: motorcomm: Move to subdirectory
yt921x is already the longest single-file DSA driver, so it's time to split it into parts.
---
MAINTAINERS | 2 +-
drivers/net/dsa/Kconfig | 10 ++--------
drivers/net/dsa/Makefile | 2 +-
drivers/net/dsa/motorcomm/Kconfig | 8 ++++++++
drivers/net/dsa/motorcomm/Makefile | 3 +++
drivers/net/dsa/{yt921x.c => motorcomm/chip.c} | 2 +-
drivers/net/dsa/{yt921x.h => motorcomm/chip.h} | 0
7 files changed, 16 insertions(+), 11 deletions(-)
create mode 100644 drivers/net/dsa/motorcomm/Kconfig
create mode 100644 drivers/net/dsa/motorcomm/Makefile
rename drivers/net/dsa/{yt921x.c => motorcomm/chip.c} (99%)
rename drivers/net/dsa/{yt921x.h => motorcomm/chip.h} (100%)MAINTAINERS +1 -1
@@ -18256,7 +18256,7 @@ M: David Yang <[email protected]> L: [email protected] S: Maintained F: Documentation/devicetree/bindings/net/dsa/motorcomm,yt921x.yaml -F: drivers/net/dsa/yt921x.* +F: drivers/net/dsa/motorcomm/ F: net/dsa/tag_yt921x.c MOXA SMARTIO/INDUSTIO/INTELLIO SERIAL CARD
drivers/net/dsa/Kconfig +2 -8
@@ -72,6 +72,8 @@ config NET_DSA_MV88E6060 source "drivers/net/dsa/microchip/Kconfig" +source "drivers/net/dsa/motorcomm/Kconfig" + source "drivers/net/dsa/mv88e6xxx/Kconfig" source "drivers/net/dsa/mxl862xx/Kconfig"
@@ -158,12 +160,4 @@ config NET_DSA_VITESSE_VSC73XX_PLATFORM This enables support for the Vitesse VSC7385, VSC7388, VSC7395 and VSC7398 SparX integrated ethernet switches, connected over a CPU-attached address bus and work in memory-mapped I/O mode. - -config NET_DSA_YT921X - tristate "Motorcomm YT9215 ethernet switch chip support" - select NET_DSA_TAG_YT921X - select NET_IEEE8021Q_HELPERS if DCB - help - This enables support for the Motorcomm YT9215 ethernet switch - chip. endmenu
drivers/net/dsa/Makefile +1 -1
@@ -14,11 +14,11 @@ obj-$(CONFIG_NET_DSA_SMSC_LAN9303_MDIO) += lan9303_mdio.o obj-$(CONFIG_NET_DSA_VITESSE_VSC73XX) += vitesse-vsc73xx-core.o obj-$(CONFIG_NET_DSA_VITESSE_VSC73XX_PLATFORM) += vitesse-vsc73xx-platform.o obj-$(CONFIG_NET_DSA_VITESSE_VSC73XX_SPI) += vitesse-vsc73xx-spi.o -obj-$(CONFIG_NET_DSA_YT921X) += yt921x.o obj-y += b53/ obj-y += hirschmann/ obj-y += lantiq/ obj-y += microchip/ +obj-y += motorcomm/ obj-y += mv88e6xxx/ obj-y += mxl862xx/ obj-y += netc/
drivers/net/dsa/motorcomm/Kconfig new file +8 -0
@@ -0,0 +1,8 @@ +# SPDX-License-Identifier: ISC +config NET_DSA_YT921X + tristate "Motorcomm YT9215 ethernet switch chip support" + select NET_DSA_TAG_YT921X + select NET_IEEE8021Q_HELPERS if DCB + help + This enables support for the Motorcomm YT9215 ethernet switch + chip.
drivers/net/dsa/motorcomm/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +# SPDX-License-Identifier: ISC +obj-$(CONFIG_NET_DSA_YT921X) += yt921x.o +yt921x-objs := chip.o
drivers/net/dsa/motorcomm/chip.c renamed from drivers/net/dsa/yt921x.c +1 -1
@@ -26,7 +26,7 @@#include <net/ieee8021q.h> #include <net/pkt_cls.h> -#include "yt921x.h" +#include "chip.h" struct yt921x_mib_desc {unsigned int size;
drivers/net/dsa/motorcomm/chip.h renamed from drivers/net/dsa/yt921x.h +0 -0
Signature · 1 line
2.53.0
Jakub Kicinski
maintainerRe: [PATCH net-next v10 1/4] net: dsa: motorcomm: Move to subdirectory
This is an AI-generated review of your patch. The human sending this email has considered the AI review valid, or at least plausible.
---
net: dsa: motorcomm: Move to subdirectory
The yt921x DSA driver is moved from drivers/net/dsa/yt921x.[ch] into a new drivers/net/dsa/motorcomm/ subdirectory as chip.[ch], with the Kconfig symbol and the build rule moved into new per-directory Kconfig and Makefile files. MAINTAINERS is updated to match the new path.
Quoted 20 lines
drivers/net/dsa/motorcomm/Kconfig new file +8
-0@@ -0,0 +1,8 @@ +# SPDX-License-Identifier: ISC +config NET_DSA_YT921X + tristate "Motorcomm YT9215 ethernet switch chip support" + select NET_DSA_TAG_YT921X + select NET_IEEE8021Q_HELPERS if DCB + help + This enables support for the Motorcomm YT9215 ethernet switch + chip.drivers/net/dsa/motorcomm/Makefile new file +0
-0
drivers/net/dsa/motorcomm/Makefile line 1
Quoted 1 line
drivers/net/dsa/motorcomm/Makefile new file +1
-0@@ -0,0 +1,3 @@ +# SPDX-License-Identifier: ISC
^^^
[Severity: Low]
Is the ISC tag on the two new files intentional? Both drivers/net/dsa/motorcomm/Kconfig and drivers/net/dsa/motorcomm/Makefile start with:
# SPDX-License-Identifier: ISC
but the text in them was moved verbatim out of files carrying a different tag:
drivers/net/dsa/Kconfig: # SPDX-License-Identifier: GPL-2.0-only drivers/net/dsa/Makefile: # SPDX-License-Identifier: GPL-2.0
so the same config block and the same obj-$(CONFIG_NET_DSA_YT921X) line now appear under two different licenses.
The sources these files build are also tagged differently:
drivers/net/dsa/motorcomm/chip.c: // SPDX-License-Identifier: GPL-2.0-or-later drivers/net/dsa/motorcomm/chip.h: /* SPDX-License-Identifier: GPL-2.0-or-later */
ISC only exists in the tree as LICENSES/deprecated/ISC, and Documentation/process/license-rules.rst says about that set:
2. Deprecated licenses:
These licenses should only be used for existing code or for importing code from a different project.
These two files are newly created and not imported from another project. Every other DSA subdirectory (b53, hirschmann, microchip, mv88e6xxx, mxl862xx, netc, ocelot, qca, realtek, sja1105, xrs700x) uses a GPL-2.0 variant for its Kconfig and Makefile, and these are the only ISC-tagged files under drivers/net/dsa/.
Would GPL-2.0-only (matching the files the text came from) or GPL-2.0-or-later (matching chip.c and chip.h) be the right tag here? The commit message describes the change as a mechanical relocation and does not mention a licensing change.
Quoted 2 lines
drivers/net/dsa/motorcomm/Makefile new file +2
-0+obj-$(CONFIG_NET_DSA_YT921X) += yt921x.o +yt921x-objs := chip.o
[ ... ]
Signature · 1 line
pw-bot: cr
David Yang
maintainerPATCH v10 2/4 net: dsa: motorcomm: Split SMI module
In reply to David YangSMI operations are going to be used across different modules. Minor changes are applied to fix build errors.
--- drivers/net/dsa/motorcomm/Makefile | 1 + drivers/net/dsa/motorcomm/chip.c | 207 +---------------------------- drivers/net/dsa/motorcomm/smi.c | 157 ++++++++++++++++++++++ drivers/net/dsa/motorcomm/smi.h | 92 +++++++++++++ 4 files changed, 251 insertions(+), 206 deletions(-) create mode 100644 drivers/net/dsa/motorcomm/smi.c create mode 100644 drivers/net/dsa/motorcomm/smi.h
drivers/net/dsa/motorcomm/Makefile +1 -0
@@ -1,3 +1,4 @@ # SPDX-License-Identifier: ISC obj-$(CONFIG_NET_DSA_YT921X) += yt921x.o yt921x-objs := chip.o +yt921x-objs += smi.o
drivers/net/dsa/motorcomm/chip.c +1 -206
231 lines not on this page · raw message
drivers/net/dsa/motorcomm/smi.c new file +157 -0
157 lines not on this page · raw message
drivers/net/dsa/motorcomm/smi.h new file +92 -0
92 lines not on this page · raw message
Signature · 1 line
2.53.0
Jakub Kicinski
maintainerRe: [PATCH net-next v10 2/4] net: dsa: motorcomm: Split SMI module
This is an AI-generated review of your patch. The human sending this email has considered the AI review valid, or at least plausible.
---
net: dsa: motorcomm: Split SMI module
This moves the yt921x SMI register accessors out of chip.c into a new smi.c/smi.h pair and adds smi.o to the module objects. The helpers gain external linkage, and the thin wrappers around them become static inline in the new header.
A few comments and questions below. The chip.c and Makefile hunks are snipped since the comments all land on the new files.
Quoted 22 lines
drivers/net/dsa/motorcomm/smi.c new file +16
-0@@ -0,0 +1,157 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* +* Copyright (c) 2026 David Yang +*/ + +#include <linux/iopoll.h> + +#include "chip.h" +#include "smi.h" + +#define YT921X_POLL_SLEEP_US 10000 +#define YT921X_POLL_TIMEOUT_US 100000 + +int yt921x_reg_read (struct yt921x_priv *priv,u32 reg,u32 *valp) +{ +WARN_ON (!mutex_is_locked (&priv->reg_lock));
drivers/net/dsa/motorcomm/smi.c line 26
Quoted 10 lines
drivers/net/dsa/motorcomm/smi.c new file +10
-0+ +return priv->reg_ops->read (priv->reg_ctx, reg, valp); +} + +int yt921x_reg_write (struct yt921x_priv *priv,u32 reg,u32 val) +{ +WARN_ON (!mutex_is_locked (&priv->reg_lock)); + +return priv->reg_ops->write (priv->reg_ctx, reg, val); +}
[Severity: Low]
This is a pre-existing issue and not introduced by this patch, since these two lines are moved verbatim out of chip.c.
Now that yt921x_reg_read() and yt921x_reg_write() are a cross-file (and per the commit message cross-module) API, would lockdep_assert_held() be the better assertion here?
mutex_is_locked(&priv->reg_lock) only reports that some task owns the mutex, not that the current one does, so a new caller that forgets to take priv->reg_lock passes the check whenever another thread happens to hold it.
Would WARN_ON_ONCE() also be preferable to WARN_ON() on a path that runs for every single register access?
[ ... ]
drivers/net/dsa/motorcomm/smi.c line 105
Quoted 10 lines
drivers/net/dsa/motorcomm/smi.c new file +10
-0+int +yt921x_regs_update_bits (struct yt921x_priv *priv,u32 reg,const u32 *masks, +const u32 *vals,unsigned int num_regs) +{ +bool changed = false; +u32 vs[4 ]; +int res; + +if (WARN_ON_ONCE (num_regs >ARRAY_SIZE (vs))) +return -EINVAL ;
[Severity: Low]
The chip.c versions guarded the vs[4] stack buffer at compile time:
BUILD_BUG_ON(num_regs > ARRAY_SIZE(vs));
and that becomes a runtime warning here and in yt921x_regs_clear_bits(). Is the reason that num_regs is no longer a constant expression inside the callee once the function has external linkage?
No overflow looks reachable today: the only callers go through the yt921x_reg64_*()/yt921x_reg96_*() wrappers in smi.h with a literal 2 or 3.
Would it be worth naming this conversion in the commit message instead of just "Minor changes are applied to fix build errors"? The lengths of the caller supplied masks[] and vals[] arrays also remain unchecked, which is worth a word since the helpers are now callable from other files.
[ ... ]
drivers/net/dsa/motorcomm/smi.h line 7
Quoted 13 lines
drivers/net/dsa/motorcomm/smi.h new file +7
-0@@ -0,0 +1,92 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* +* Copyright (c) 2026 David Yang +*/ + +#ifndef _YT_SMI_H +#define _YT_SMI_H
[Severity: Low]
This isn't a bug, but the guard name here is _YT_SMI_H while the sibling private header in the same directory uses __YT921X_H. Was the difference intended?
[ ... ]
drivers/net/dsa/motorcomm/smi.h line 52
Quoted 7 lines
drivers/net/dsa/motorcomm/smi.h new file +7
-0+static inline void update_ctrls_unaligned (u32 *lo,u32 *hi,u64 mask,u64 val) +{ + *lo &= ~lower_32_bits (mask); + *hi &= ~upper_32_bits (mask); + *lo |=lower_32_bits (val); + *hi |=upper_32_bits (val); +}
[Severity: Low]
Related to the above, and also not a bug: this helper is the only symbol in the header without the yt921x_ prefix that everything else uses, and it is now visible to every file that includes smi.h.
Its only users are the two METER control word calls in chip.c:
update_ctrls_unaligned(&ctrls[0], &ctrls[1], YT921X_METER_CTRLab_EBS_M, ...);
so could it stay a file local static in chip.c, or get a yt921x_ prefix if it really needs to move?
drivers/net/dsa/motorcomm/smi.h line 59
Quoted 7 lines
drivers/net/dsa/motorcomm/smi.h new file +7
-0+ +/* yt921x_regs_*() are exported for linkage only. Do not use them directly. Use +* yt921x_reg64_*() or yt921x_reg96_*() instead. +*/ + +int yt921x_regs_read (struct yt921x_priv *priv,u32 reg,u32 *vals, +unsigned int num_regs);
[Severity: Low]
Two things about this contract.
The comment above says "Here we require full read and write operations over these registers", and this one says to use yt921x_reg64_*() or yt921x_reg96_*() instead of the raw helpers. But the wrapper set is write side only: yt921x_reg64_write(), yt921x_reg64_update_bits(), yt921x_reg64_clear_bits() and yt921x_reg96_write(). There is no yt921x_reg64_read() or yt921x_reg96_read(), so a module that wants the required full read of something like VLANn_CTRL has no permitted call. Should a read wrapper be added along with the split?
Second, yt921x_regs_read() is declared here "for linkage only", but its only callers are yt921x_regs_update_bits() and yt921x_regs_clear_bits() in smi.c itself, both at the time of this commit and at the end of the series. Can it stay static in smi.c rather than becoming a global symbol?
[ ... ]
David Yang
maintainerRe: [PATCH net-next v10 2/4] net: dsa: motorcomm: Split SMI module
Quoted 41 lines · Jakub Kicinski
Quoted 22 lines
drivers/net/dsa/motorcomm/smi.c new file +16
-0@@ -0,0 +1,157 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* +* Copyright (c) 2026 David Yang +*/ + +#include <linux/iopoll.h> + +#include "chip.h" +#include "smi.h" + +#define YT921X_POLL_SLEEP_US 10000 +#define YT921X_POLL_TIMEOUT_US 100000 + +int yt921x_reg_read (struct yt921x_priv *priv,u32 reg,u32 *valp) +{ +WARN_ON (!mutex_is_locked (&priv->reg_lock));drivers/net/dsa/motorcomm/smi.c line 26
Quoted 10 lines
drivers/net/dsa/motorcomm/smi.c new file +10
-0+ +return priv->reg_ops->read (priv->reg_ctx, reg, valp); +} + +int yt921x_reg_write (struct yt921x_priv *priv,u32 reg,u32 val) +{ +WARN_ON (!mutex_is_locked (&priv->reg_lock)); + +return priv->reg_ops->write (priv->reg_ctx, reg, val); +}[Severity: Low]
This is a pre-existing issue and not introduced by this patch, since these two lines are moved verbatim out ofchip.c.Now that
yt921x_reg_read()andyt921x_reg_write()are a cross-file (and per the commit message cross-module) API, wouldlockdep_assert_held()be the better assertion here?
Quoted 6 lines
mutex_is_locked(&priv->reg_lock)only reports that some task owns the mutex, not that the current one does, so a new caller that forgets to takepriv->reg_lockpasses the check whenever another thread happens to hold it.Would
WARN_ON_ONCE()also be preferable toWARN_ON()on a path that runs for every single register access?
It would be better to address it in another commit. Also it's the AI who suggests not to include such changes.
Quoted 21 lines
drivers/net/dsa/motorcomm/smi.c line 105
Quoted 11 lines
drivers/net/dsa/motorcomm/smi.c new file +10
-0+int +yt921x_regs_update_bits (struct yt921x_priv *priv,u32 reg,const u32 *masks, +const u32 *vals,unsigned int num_regs) +{ +bool changed = false; +u32 vs[4 ]; +int res; + +if (WARN_ON_ONCE (num_regs >ARRAY_SIZE (vs))) +return -EINVAL ;[Severity: Low]
Thechip.cversions guarded the vs[4] stack buffer at compile time:BUILD_BUG_ON(num_regs > ARRAY_SIZE(vs));and that becomes a runtime warning here and in
yt921x_regs_clear_bits(). Is the reason thatnum_regsis no longer a constant expression inside the callee once the function has external linkage?
Quoted 7 lines
No overflow looks reachable today: the only callers go through the yt921x_reg64_*()/yt921x_reg96_*() wrappers in
smi.hwith a literal 2 or 3.Would it be worth naming this conversion in the commit message instead of just "Minor changes are applied to fix build errors"? The lengths of the caller supplied masks[] and vals[] arrays also remain unchecked, which is worth a word since the helpers are now callable from other files.
It just isn't worth it to do fancy checks to these simple helpers with tons of macro hacks.
Quoted 12 lines
[ ... ]
Quoted 10 lines
drivers/net/dsa/motorcomm/smi.h new file +4
-0@@ -0,0 +1,92 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* +* Copyright (c) 2026 David Yang +*/
Quoted 8 lines
drivers/net/dsa/motorcomm/smi.h line 7
Quoted 3 lines
drivers/net/dsa/motorcomm/smi.h new file +3
-0+ +#ifndef _YT_SMI_H +#define _YT_SMI_H[Severity: Low]
This isn't a bug, but the guard name here is_YT_SMI_Hwhile the sibling private header in the same directory uses__YT921X_H. Was the difference intended?
We are going to use the _YT prefix for guard macros instead.
Quoted 14 lines
drivers/net/dsa/motorcomm/smi.h line 52
Quoted 8 lines
drivers/net/dsa/motorcomm/smi.h new file +7
-0+static inline void update_ctrls_unaligned (u32 *lo,u32 *hi,u64 mask,u64 val) +{ + *lo &= ~lower_32_bits (mask); + *hi &= ~upper_32_bits (mask); + *lo |=lower_32_bits (val); + *hi |=upper_32_bits (val); +}[Severity: Low]
Related to the above, and also not a bug: this helper is the only symbol in the header without theyt921x_prefix that everything else uses, and it is now visible to every file that includessmi.h.
Quoted 7 lines
Its only users are the two METER control word calls in
chip.c:update_ctrls_unaligned(&ctrls[0], &ctrls[1], YT921X_METER_CTRLab_EBS_M, ...);so could it stay a file local static in
chip.c, or get ayt921x_prefix if it really needs to move?
Irrelevant to this commit.
Andrew Lunn
maintainerRe: [PATCH net-next v10 2/4] net: dsa: motorcomm: Split SMI module
Quoted 18 lines
Quoted 9 lines
Quoted 9 lines
drivers/net/dsa/motorcomm/smi.c new file +9
-0+int yt921x_reg_read (struct yt921x_priv *priv,u32 reg,u32 *valp) +{ +WARN_ON (!mutex_is_locked (&priv->reg_lock)); + +return priv->reg_ops->read (priv->reg_ctx, reg, valp); +} + +int yt921x_reg_write (struct yt921x_priv *priv,u32 reg,u32 val) +{Quoted 8 lines
drivers/net/dsa/motorcomm/smi.c line 26
Quoted 4 lines
drivers/net/dsa/motorcomm/smi.c new file +4
-0+WARN_ON (!mutex_is_locked (&priv->reg_lock)); + +return priv->reg_ops->write (priv->reg_ctx, reg, val); +}[Severity: Low]
This is a pre-existing issue and not introduced by this patch, since these two lines are moved verbatim out ofchip.c.
Quoted 2 lines
It would be better to address it in another commit. Also it's the AI who suggests not to include such changes.
Since it is pre-existing, a new patch would be good.
Andrew
David Yang
maintainerPATCH v10 3/4 net: dsa: motorcomm: Add LED support
In reply to David YangEach port has at most 3 LEDs connected and can be declared using the standard LEDs structure.
Currently, only parallel mode and strict 1:1 mapping (i.e. the HW default) are supported.
--- drivers/net/dsa/motorcomm/Kconfig | 9 + drivers/net/dsa/motorcomm/Makefile | 1 + drivers/net/dsa/motorcomm/chip.c | 13 +- drivers/net/dsa/motorcomm/chip.h | 12 + drivers/net/dsa/motorcomm/leds.c | 654 +++++++++++++++++++++++++++++ drivers/net/dsa/motorcomm/leds.h | 121 ++++++ 6 files changed, 808 insertions(+), 2 deletions(-) create mode 100644 drivers/net/dsa/motorcomm/leds.c create mode 100644 drivers/net/dsa/motorcomm/leds.h
drivers/net/dsa/motorcomm/Kconfig +9 -0
@@ -6,3 +6,12 @@ config NET_DSA_YT921X help This enables support for the Motorcomm YT9215 ethernet switch chip. + +config NET_DSA_YT921X_LEDS + bool "LED support for Motorcomm YT9215" + default y + depends on NET_DSA_YT921X + depends on LEDS_CLASS=y || LEDS_CLASS=NET_DSA_YT921X + help + This enables support for controlling the LEDs attached to the + Motorcomm YT9215 switch chips.
drivers/net/dsa/motorcomm/Makefile +1 -0
@@ -1,4 +1,5 @@ # SPDX-License-Identifier: ISC obj-$(CONFIG_NET_DSA_YT921X) += yt921x.o yt921x-objs := chip.o +yt921x-$(CONFIG_NET_DSA_YT921X_LEDS) += leds.o yt921x-objs += smi.o
drivers/net/dsa/motorcomm/chip.c +11 -2
@@ -26,6 +26,7 @@#include <net/pkt_cls.h> #include "chip.h" +#include "leds.h" #include "smi.h" struct yt921x_mib_desc {
@@ -151,8 +152,6 @@ static const struct yt921x_info yt921x_infos[] = { {} }; -#define YT921X_NAME "yt921x" -#define YT921X_VID_UNWARE 4095/* The interval should be small enough to avoid overflow of 32bit MIBs.
@@ -4581,6 +4580,12 @@ static int yt921x_dsa_setup(struct dsa_switch *ds)if (res)return res; +#if IS_ENABLED (CONFIG_NET_DSA_YT921X_LEDS ) + res =yt921x_leds_setup (priv); +if (res) +dev_warn (dev,"Failed to setup LEDs: %d\n" , res); +#endif +return 0 ; }
@@ -4681,6 +4686,10 @@ static void yt921x_mdio_remove(struct mdio_device *mdiodev)if (!priv)return ; +#if IS_ENABLED (CONFIG_NET_DSA_YT921X_LEDS ) +yt921x_leds_remove (priv); +#endif +for (size_t i =ARRAY_SIZE (priv->ports); i-- >0 ; ) {struct yt921x_port *pp = &priv->ports[i];
drivers/net/dsa/motorcomm/chip.h +12 -0
@@ -850,9 +850,14 @@ enum yt921x_fdb_entry_status {#define YT921X_ACL_NUM (YT921X_ACL_BLK_NUM * YT921X_ACL_ENT_PER_BLK)#define YT921X_UDF_NUM 8 +#define YT921X_LED_GROUP_NUM 3 +#define YT921X_LED_PORT_NUM 10 +/* 8 internal + 2 external + 1 mcu */ #define YT921X_PORT_NUM 11 +#define YT921X_NAME "yt921x" +#define yt921x_port_is_internal (port) ((port) < 8)#define yt921x_port_is_external (port) ((port) == 8 || (port) == 9)
@@ -938,6 +943,13 @@ struct yt921x_port {struct yt921x_mib mib;u64 rx_frames;u64 tx_frames; + +#if IS_ENABLED (CONFIG_NET_DSA_YT921X_LEDS ) +unsigned char led_duty; +unsigned short led_cycle; + +struct yt921x_led *leds[YT921X_LED_GROUP_NUM ]; +#endif };struct yt921x_reg_ops {
drivers/net/dsa/motorcomm/leds.c new file +654 -0
654 lines not on this page · raw message
drivers/net/dsa/motorcomm/leds.h new file +121 -0
121 lines not on this page · raw message
Signature · 1 line
2.53.0
[email protected]
AI reviewThank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Critical] Unconditional kernel panic during probe due to pointer arithmetic on NULL net_device pointers…
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Critical] Unconditional kernel panic during probe due to pointer arithmetic on NULL net_device pointers in yt921x_cled_hw_control_get_device(). --
--- Patch [3]: [PATCH net-next v10 3/4] net: dsa: motorcomm: Add LED support --- commit 25a5fb03fc03b52bd3ea80525b1fd57bd6de812d
Author: David Yang <[email protected]>
net: dsa: motorcomm: Add LED support
This commit adds support for controlling the LEDs attached to the Motorcomm YT9215 switch chips via the standard LEDs subsystem. It currently supports parallel mode and strict 1:1 mapping.
Quoted 5 lines
drivers/net/dsa/motorcomm/leds.c new file +0
-0
[ ... ]
Quoted 6 lines
drivers/net/dsa/motorcomm/leds.c new file +6
-0+static struct device *__maybe_unused +yt921x_cled_hw_control_get_device (struct led_classdev *led_cdev) +{ +struct yt921x_led *led =to_yt921x_led (led_cdev); +struct yt921x_port *pp =to_yt921x_port (led); +struct yt921x_priv *priv =to_yt921x_priv (pp);
drivers/net/dsa/motorcomm/leds.c line 390
Quoted 10 lines
drivers/net/dsa/motorcomm/leds.c new file +10
-0+struct dsa_port *dp; + + dp =dsa_to_port (&priv->ds, pp->index); +if (!dp) +return NULL ; + +if (dsa_port_is_user (dp)) +return &dp->user->dev; +if (dsa_port_is_cpu (dp)) +return &dp->conduit->dev;
[Severity: Critical]
Could this cause a kernel panic during probe if dp->user or dp->conduit is NULL?
When the hw_control_trigger is set to netdev during driver setup, the LED core immediately activates the netdev trigger, which in turn calls yt921x_cled_hw_control_get_device().
At this point during probe, the user ports are not fully instantiated yet, meaning dp->user is NULL. Unconditionally returning &dp->user->dev performs pointer arithmetic on the NULL pointer, yielding a non-zero invalid pointer because dev is located at an offset within struct net_device.
The netdev trigger core evaluates this pointer as true and calls to_net_dev() on it, which subtracts the offset and yields exactly NULL. It then attempts to dereference the network device name, crashing the kernel.
Does this need an explicit check to verify dp->user and dp->conduit are valid pointers before accessing their dev members?
Quoted 3 lines
drivers/net/dsa/motorcomm/leds.c new file +3
-0+ +return NULL ; +}
[ ... ]
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3
Jakub Kicinski
maintainerThis is an AI-generated review of your patch. The human sending this email has considered the AI review valid, or at least plausible.
---
net: dsa: motorcomm: Add LED support
This adds a new leds.c to the motorcomm DSA driver which registers up to three LED class devices per port from the standard DT "leds" child node, supporting brightness, hardware blink and the netdev hardware-offload trigger. Registration happens from the DSA .setup callback and cleanup from the mdio .remove callback.
A few questions below.
Quoted 4 lines
drivers/net/dsa/motorcomm/chip.c +0
-0
[ ... ]
drivers/net/dsa/motorcomm/chip.c static int yt921x_dsa_setup(struct dsa_switch *ds) · line 4590
Quoted 12 lines
drivers/net/dsa/motorcomm/chip.c +6
-0@@ -4581,6 +4580,12 @@ static int yt921x_dsa_setup(struct dsa_switch *ds)if (res)return res; +#if IS_ENABLED (CONFIG_NET_DSA_YT921X_LEDS ) + res =yt921x_leds_setup (priv); +if (res) +dev_warn (dev,"Failed to setup LEDs: %d\n" , res); +#endif +return 0 ; }
[Severity: Low]
Can this dev_warn() ever be reached? yt921x_leds_setup() discards the result of every yt921x_leds_setup_port() call and has a single
return 0;
as its only exit, so res is always zero here.
Similarly, yt921x_leds_setup_port() returns -EINVAL for
port >= YT921X_LED_PORT_NUM, but that value is dropped by yt921x_leds_setup(). And inside the for_each_child_of_node_scoped() loop the return value of yt921x_led_setup() is not stored at all, so a duplicated group (-EEXIST), a devm_kzalloc() failure (-ENOMEM) or a devm_led_classdev_register_ext() failure leaves the LED silently absent with no message in the log. Was some diagnostic intended for at least the -EEXIST and -ENOMEM cases?
drivers/net/dsa/motorcomm/chip.c static void yt921x_mdio_remove(struct mdio_device *mdiodev) · line 4695
Quoted 11 lines
drivers/net/dsa/motorcomm/chip.c +4
-0@@ -4681,6 +4686,10 @@ static void yt921x_mdio_remove(struct mdio_device *mdiodev)if (!priv)return ; +#if IS_ENABLED (CONFIG_NET_DSA_YT921X_LEDS ) +yt921x_leds_remove (priv); +#endif +for (size_t i =ARRAY_SIZE (priv->ports); i-- >0 ; ) {struct yt921x_port *pp = &priv->ports[i];
[Severity: Medium]
The LEDs are created from ds->ops->setup() (yt921x_dsa_setup) but the only ordered bulk release lives here in the mdio .remove callback, and yt921x_dsa_switch_ops has no .teardown. Are the two other exit paths covered?
If dsa_register_switch() fails after ds->ops->setup() already succeeded, yt921x_mdio_probe() returns an error and .remove is never called, so cleanup falls back to plain devres unwinding. Each LED has two devres entries, in the order devm_kzalloc(led) then devm_led_classdev_register_ext(), so reverse release frees LED N's control block while LED N-1 is still registered in sysfs and pp->leds[N] still points at the freed block. A concurrent write to LED N-1's delay_on then enters yt921x_led_blink_set(), which reads the siblings:
if ((change_cycle && pp->leds[i]->use_cycle) || (change_duty && pp->leds[i]->use_duty))
Is that a read of freed memory? yt921x_leds_remove_port() deliberately unregisters everything first, then clears pp->leds[] before devm_kfree(), which suggests that ordering is required and devres unwinding does not provide it.
Also, on a DSA tree teardown that leaves the driver bound, dsa_switch_teardown() has no driver hook here, so the LED class devices stay registered and user-space-callable while dsa_port_teardown() sets dp->user = NULL and the chip is reset. A subsequent tree re-setup re-initialises nothing, because yt921x_led_setup() bails out early:
if (pp->leds[group]) return -EEXIST;
leaving led_cdev->brightness, pp->led_duty/led_cycle and led->use_cycle/use_duty describing a hardware state that no longer exists. Would a .teardown that calls yt921x_leds_remove() address both cases?
Quoted 6 lines
drivers/net/dsa/motorcomm/leds.c new file +0
-0@@ -0,0 +1,654 @@
[ ... ]
Quoted 7 lines
drivers/net/dsa/motorcomm/leds.c new file +7
-0+static int +yt921x_led_force_set (struct yt921x_priv *priv,int port,int group,bool on) +{ +struct yt921x_port *pp = &priv->ports[port]; +struct yt921x_led *led = pp->leds[group]; +u32 ctrl; +u32 mask;
drivers/net/dsa/motorcomm/leds.c line 63
Quoted 10 lines
drivers/net/dsa/motorcomm/leds.c new file +10
-0+ + led->use_cycle = false; + led->use_duty = false; + + mask =YT921X_LED2_PORT_FORCEn_M (group); + ctrl = on ?YT921X_LED2_PORT_FORCEn_ON (group) : +YT921X_LED2_PORT_FORCEn_OFF (group); +return yt921x_reg_update_bits (priv,YT921X_LED2_PORTn (port), mask, + ctrl); +}
[Severity: Low]
Should use_cycle/use_duty only be cleared once the register update has succeeded? If the SMI/MDIO transfer in yt921x_reg_update_bits() fails, the LED keeps hardware-blinking while the driver records that this group no longer uses the shared per-port duty and cycle fields.
The same pattern appears in yt921x_led_trigger_set(), which clears both flags before two fallible yt921x_reg_update_bits() calls and never restores them on failure.
[ ... ]
Quoted 12 lines
drivers/net/dsa/motorcomm/leds.c new file +12
-0+/* The chip seems to jam a while if changing duty directly */ + res =yt921x_reg_read (priv,YT921X_LED2_PORTn (port), &val); +if (res) +return res; + + ctrl = val & ~YT921X_LED2_PORT_FORCEn_M (group); + ctrl |=YT921X_LED2_PORT_FORCEn_DONTCARE (group); +if (val != ctrl) { + res =yt921x_reg_write (priv,YT921X_LED2_PORTn (port), ctrl); +if (res) +return res; + }
[ ... ]
drivers/net/dsa/motorcomm/leds.c line 193
Quoted 3 lines
drivers/net/dsa/motorcomm/leds.c new file +3
-0+ res =yt921x_reg_update_bits (priv,YT921X_LED1_PORTn (port), mask, ctrl); +if (res) +return res;
[Severity: Low]
This is a multi-register sequence: FORCE is first switched to DONTCARE, so the LED immediately follows whatever activity bits happen to be programmed, then the shared YT921X_LED1_PORTn duty and OTHER_BLINK fields are updated, then forced blinking is selected. Both intermediate error returns leave the earlier writes in place with no unwind.
Since the conflict check earlier in this function trusts use_cycle and use_duty to decide whether another group owns the shared timing fields, can a later request silently retime a sibling LED that is still blinking, or leave an LED driven by stale activity bits?
[ ... ]
Quoted 9 lines
drivers/net/dsa/motorcomm/leds.c new file +9
-0+static struct device *__maybe_unused +yt921x_cled_hw_control_get_device (struct led_classdev *led_cdev) +{ +struct yt921x_led *led =to_yt921x_led (led_cdev); +struct yt921x_port *pp =to_yt921x_port (led); +struct yt921x_priv *priv =to_yt921x_priv (pp); +struct dsa_port *dp; + + dp =dsa_to_port (&priv->ds, pp->index);
drivers/net/dsa/motorcomm/leds.c line 393
Quoted 10 lines
drivers/net/dsa/motorcomm/leds.c new file +10
-0+if (!dp) +return NULL ; + +if (dsa_port_is_user (dp)) +return &dp->user->dev; +if (dsa_port_is_cpu (dp)) +return &dp->conduit->dev; + +return NULL ; +}
[Severity: High]
Should dp->user and dp->conduit be checked for NULL here rather than only the port type?
dp->type is set at DT parse time, but dp->user is populated later by dsa_user_create() from dsa_port_setup(), which runs in dsa_tree_setup_ports() after dsa_tree_setup_switches() has already invoked ds->ops->setup():
dsa_tree_setup()
dsa_tree_setup_switches() -> dsa_switch_setup() -> ds->ops->setup()
yt921x_dsa_setup() -> yt921x_leds_setup()
dsa_tree_setup_ports() -> dsa_port_setup() -> dsa_user_create()So at LED registration time dp->user is still NULL for user ports and this returns (char *)NULL + offsetof(struct net_device, dev), which is not NULL. led_classdev_register_ext() honours linux,default-trigger, so a node with
linux,default-trigger = "netdev";
runs netdev_trig_activate() synchronously, and there the only guard is a NULL test:
drivers/leds/trigger/ledtrig-netdev.c:netdev_trig_activate() {
...
dev = led_cdev->hw_control_get_device(led_cdev);
if (dev) {
const char *name = dev_name(dev);
...
}Does dev_name() then dereference that bogus pointer during probe?
The window reopens later as well: dsa_port_teardown() does
case DSA_PORT_TYPE_USER:
if (dp->user) {
dsa_user_destroy(dp->user);
dp->user = NULL;
}while dp->type stays DSA_PORT_TYPE_USER and, with no .teardown in this driver, the LED class devices remain registered. A later
echo netdev > /sys/class/leds/.../trigger
reaches validate_net_dev(), which also only checks if (!dev).
Both peer DSA LED drivers guard the pointer itself, for example mv88e6xxx_led_hw_control_get_device():
if (dp->user) return &dp->user->dev; return NULL;
and qca8k_cled_hw_control_get_device() does the same.
[ ... ]
Quoted 13 lines
drivers/net/dsa/motorcomm/leds.c new file +13
-0+ pp->leds[group] = led; + +switch (state) { +case LEDS_DEFSTATE_OFF : +case LEDS_DEFSTATE_ON : +default : + on = state ==LEDS_DEFSTATE_ON ; + res =yt921x_led_force_set (priv, port, group, on); +break ; +case LEDS_DEFSTATE_KEEP : + res =yt921x_led_force_get (priv, port, group, &on); +break ; + }
[ ... ]
Quoted 16 lines
drivers/net/dsa/motorcomm/leds.c new file +16
-0+ res =devm_led_classdev_register_ext (dev, led_cdev, &init_data); +if (res) + goto err; + +return 0 ; + +err: + ret = res; + +mutex_lock (&priv->reg_lock); +if (pp->leds[group]) { +if (force_high || force_low) { + res =yt921x_reg_write (priv,YT921X_LED_PAR_INV , val); +if (res) + dev_warn(dev, + "Failed to revoke initialization for LED %02d:%02u\n",
drivers/net/dsa/motorcomm/leds.c line 568
Quoted 10 lines
drivers/net/dsa/motorcomm/leds.c new file +10
-0+ port, group); + } + + pp->leds[group] =NULL ; + } +mutex_unlock (&priv->reg_lock); + +devm_kfree (dev, led); +return ret; +}
[Severity: Low]
The FORCE field is programmed for the default on/off state before devm_led_classdev_register_ext() is called, but the err: path restores only YT921X_LED_PAR_INV, and only when an explicit active-high/active-low was given. Should the previous FORCE field be restored too?
If registration fails (the devres_alloc() -ENOMEM, an -EINVAL from led_compose_name(), or a device_create_with_groups() failure), the LED is left forced on or off with no class device through which it can be changed, and yt921x_leds_setup_port() discards the error so nothing higher up reports or retries.
Quoted 2 lines
drivers/net/dsa/motorcomm/leds.c new file +2
-0+static int yt921x_leds_setup_port (struct yt921x_priv *priv,int port) +{
[ ... ]
Quoted 8 lines
drivers/net/dsa/motorcomm/leds.c new file +8
-0+for_each_child_of_node_scoped (leds_np, led_np) { +yt921x_led_setup (priv, port,of_fwnode_handle (led_np)); +/* Allow partial configuration: LEDs are optional */ + } + +of_node_put (leds_np); +return 0 ; +}
[ ... ]
Quoted 2 lines
drivers/net/dsa/motorcomm/leds.c new file +2
-0+int yt921x_leds_setup (struct yt921x_priv *priv) +{
[ ... ]
drivers/net/dsa/motorcomm/leds.c line 654
Quoted 6 lines
drivers/net/dsa/motorcomm/leds.c new file +6
-0+yt921x_leds_setup_port (priv, port); +/* Allow partial configuration: LEDs are optional */ + } + +return 0 ; +}
[Severity: Low]
These two functions are the ones that make the dev_warn() in yt921x_dsa_setup() unreachable, as noted above. Is the "LEDs are optional" policy meant to coexist with that warning, or should one of them go?
David Yang
maintainerQuoted 17 lines · Jakub Kicinski
drivers/net/dsa/motorcomm/chip.c static int yt921x_dsa_setup(struct dsa_switch *ds) · line 4590
Quoted 12 lines
drivers/net/dsa/motorcomm/chip.c +6
-0@@ -4581,6 +4580,12 @@ static int yt921x_dsa_setup(struct dsa_switch *ds)if (res)return res; +#if IS_ENABLED (CONFIG_NET_DSA_YT921X_LEDS ) + res =yt921x_leds_setup (priv); +if (res) +dev_warn (dev,"Failed to setup LEDs: %d\n" , res); +#endif +return 0 ; }[Severity: Low]
Can thisdev_warn()ever be reached?yt921x_leds_setup()discards the result of everyyt921x_leds_setup_port()call and has a single
Quoted 3 lines
return 0;as its only exit, so res is always zero here.
yt921x_leds_setup() is allowed to fail (not now, but in the future), like all other init callbacks.
Quoted 24 lines
Quoted 7 lines
drivers/net/dsa/motorcomm/leds.c new file +7
-0+static int +yt921x_led_force_set (struct yt921x_priv *priv,int port,int group,bool on) +{ +struct yt921x_port *pp = &priv->ports[port]; +struct yt921x_led *led = pp->leds[group]; +u32 ctrl; +u32 mask;drivers/net/dsa/motorcomm/leds.c line 63
Quoted 10 lines
drivers/net/dsa/motorcomm/leds.c new file +10
-0+ + led->use_cycle = false; + led->use_duty = false; + + mask =YT921X_LED2_PORT_FORCEn_M (group); + ctrl = on ?YT921X_LED2_PORT_FORCEn_ON (group) : +YT921X_LED2_PORT_FORCEn_OFF (group); +return yt921x_reg_update_bits (priv,YT921X_LED2_PORTn (port), mask, + ctrl); +}[Severity: Low]
Should use_cycle/use_duty only be cleared once the register update has succeeded? If the SMI/MDIO transfer inyt921x_reg_update_bits()fails, the LED keeps hardware-blinking while the driver records that this group no longer uses the shared per-port duty and cycle fields.
Quoted 3 lines
The same pattern appears in
yt921x_led_trigger_set(), which clears both flags before two fallibleyt921x_reg_update_bits()calls and never restores them on failure.
IO transfers are not expected to fail. If that does happen, we won't have much control over HW consistency, nor can safely revert the register changes. In that case, sacrificing an LED seems a better solution.
Quoted 27 lines
Quoted 13 lines
drivers/net/dsa/motorcomm/leds.c new file +12
-0+/* The chip seems to jam a while if changing duty directly */ + res =yt921x_reg_read (priv,YT921X_LED2_PORTn (port), &val); +if (res) +return res; + + ctrl = val & ~YT921X_LED2_PORT_FORCEn_M (group); + ctrl |=YT921X_LED2_PORT_FORCEn_DONTCARE (group); +if (val != ctrl) { + res =yt921x_reg_write (priv,YT921X_LED2_PORTn (port), ctrl); +if (res) +return res; + }[ ... ]
drivers/net/dsa/motorcomm/leds.c line 193
Quoted 3 lines
drivers/net/dsa/motorcomm/leds.c new file +3
-0+ res =yt921x_reg_update_bits (priv,YT921X_LED1_PORTn (port), mask, ctrl); +if (res) +return res;[Severity: Low]
This is a multi-register sequence: FORCE is first switched to DONTCARE, so the LED immediately follows whatever activity bits happen to be programmed, then the sharedYT921X_LED1_PORTnduty andOTHER_BLINKfields are updated, then forced blinking is selected. Both intermediate error returns leave the earlier writes in place with no unwind.
Quoted 4 lines
Since the conflict check earlier in this function trusts
use_cycleanduse_dutyto decide whether another group owns the shared timing fields, can a later request silently retime a sibling LED that is still blinking, or leave an LED driven by stale activity bits?
Again register reversion dilemma.
Quoted 11 lines
drivers/net/dsa/motorcomm/leds.c line 654
Quoted 6 lines
drivers/net/dsa/motorcomm/leds.c new file +6
-0+yt921x_leds_setup_port (priv, port); +/* Allow partial configuration: LEDs are optional */ + } + +return 0 ; +}[Severity: Low]
These two functions are the ones that make thedev_warn()inyt921x_dsa_setup()unreachable, as noted above. Is the "LEDs are optional" policy meant to coexist with that warning, or should one of them go?
dev_warn() in yt921x_dsa_setup() is for interface consistency.
David Yang
maintainerPATCH v10 4/4 dt-bindings: net: dsa: yt921x: Add LEDs definition example
In reply to David YangAdd LEDs definition example for yt921x to describe how they should be defined for a correct usage.
--- .../bindings/net/dsa/motorcomm,yt921x.yaml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+)
Documentation/devicetree/bindings/net/dsa/motorcomm,yt921x.yaml +23 -0
@@ -21,6 +21,9 @@ description: | Any port can be used as the CPU port. + Each port has at most 3 LEDs connected and can be declared using the standard + LEDs structure. + properties: compatible: const: motorcomm,yt9215
@@ -59,6 +62,7 @@ unevaluatedProperties: false examples: - | #include <dt-bindings/gpio/gpio.h> + #include <dt-bindings/leds/common.h> mdio { #address-cells = <1>;
@@ -113,6 +117,25 @@ examples: label = "lan1"; phy-mode = "internal"; phy-handle = <&sw_phy0>; + + leds { + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + color = <LED_COLOR_ID_WHITE>; + function = LED_FUNCTION_LAN; + default-state = "keep"; + }; + + led@1 { + reg = <1>; + color = <LED_COLOR_ID_AMBER>; + function = LED_FUNCTION_LAN; + default-state = "keep"; + }; + }; }; ethernet-port@1 {
Signature · 1 line
2.53.0
Re: [PATCH net-next v10 4/4] dt-bindings: net: dsa: yt921x: Add LEDs definition example
Quoted 7 lines · David Yang
Add LEDs definition example for yt921x to describe how they should be defined for a correct usage.
Signed-off-by David Yang <[email protected]>--- .../bindings/net/dsa/motorcomm,yt921x.yaml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+)
Best regards,
Krzysztof