Skip to content

net: dsa: microchip: Modify KSZ9477 DSA driver in preparation to add other KSZ switch drivers

[email protected] netdev 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest6 patches 6 repliesIn review
  2. v310 of 11 patches 4 repliesSuperseded
  3. v28 patches 8 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v17 patches7 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6net: dsa: microchip: replace license with GPLdrivers/net/dsa/microchip/ksz_9477_reg.h drivers/net/dsa/microchip/ksz_common.c drivers/net/dsa/microchip/ksz_priv.h +1 more+10 -541 reply
2/6net: dsa: microchip: clean up codedrivers/net/dsa/microchip/ksz_common.c+4 -40 replies
3/6net: dsa: microchip: rename some functions with ksz9477 prefixdrivers/net/dsa/microchip/ksz_common.c+59 -570 replies
4/6net: dsa: microchip: rename ksz_spi.c to ksz9477_spi.cdrivers/net/dsa/microchip/Kconfig drivers/net/dsa/microchip/Makefile drivers/net/dsa/microchip/ksz9477_spi.c+8 -80 replies
5/6net: dsa: microchip: break KSZ9477 DSA driver into two filesdrivers/net/dsa/microchip/Kconfig drivers/net/dsa/microchip/Makefile drivers/net/dsa/microchip/ksz9477.c +5 more+1903 -12422 replies
6/6net: dsa: microchip: rename ksz_9477_reg.h to ksz9477_reg.hdrivers/net/dsa/microchip/ksz9477.c drivers/net/dsa/microchip/ksz9477_reg.h drivers/net/dsa/microchip/ksz_priv.h+2 -21 reply

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by.

PatchWoojung HuhAndrew LunnPavel MachekFlorian Fainelli
1/6R-b R-b A-b R-b
2/6R-b R-b R-b R-b
3/6R-b R-b R-b R-b
4/6R-b R-b R-b R-b
5/6R-b R-b R-b R-b
6/6R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v4 thread

Cover letter [PATCH v4 net-next 0/6] net: dsa: microchip: Modify KSZ9477 DSA driver in preparation to add other KSZ switch drivers

From: Tristram Ha <[email protected]>

This series of patches is to modify the original KSZ9477 DSA driver so that other KSZ switch drivers can be added and use the common code.

There are several steps to accomplish this achievement. First is to rename some function names with a prefix to indicate chip specific function. Second is to move common code into header that can be shared. Last is to modify tag_ksz.c so that it can handle many tail tag formats used by different KSZ switch drivers.

ksz_common.c will contain the common code used by all KSZ switch drivers. ksz9477.c will contain KSZ9477 code from the original ksz_common.c. ksz9477_spi.c is renamed from ksz_spi.c.
ksz9477_reg.h is renamed from ksz_9477_reg.h.
ksz_common.h is added to provide common code access to KSZ switch drivers.
ksz_spi.h is added to provide common SPI access functions to KSZ SPI drivers.

v4
- Patches were removed to concentrate on changing driver structure without adding new code.

v3
- The phy_device structure is used to hold port link information
- A structure is passed in ksz_xmit and ksz_rcv instead of function pointer
- Switch offload forwarding is supported

v2
- Initialize reg_mutex before use
- The alu_mutex is only used inside chip specific functions

v1
- Each patch in the set is self-contained
- Use ksz9477 prefix to indicate KSZ9477 specific code

Tristram Ha (6):
net: dsa: microchip: replace license with GPL
net: dsa: microchip: clean up code
net: dsa: microchip: rename some functions with ksz9477 prefix
net: dsa: microchip: rename ksz_spi.c to ksz9477_spi.c
net: dsa: microchip: break KSZ9477 DSA driver into two files
net: dsa: microchip: rename ksz_9477_reg.h to ksz9477_reg.h

 drivers/net/dsa/microchip/Kconfig                  |   16 +-
 drivers/net/dsa/microchip/Makefile                 |    5 +-
 drivers/net/dsa/microchip/ksz9477.c                | 1316 ++++++++++++++++++++
 .../microchip/{ksz_9477_reg.h => ksz9477_reg.h}    |   17 +-
 drivers/net/dsa/microchip/ksz9477_spi.c            |  177 +++
 drivers/net/dsa/microchip/ksz_common.c             | 1183 +++---------------
 drivers/net/dsa/microchip/ksz_common.h             |  214 ++++
 drivers/net/dsa/microchip/ksz_priv.h               |  245 ++--
 drivers/net/dsa/microchip/ksz_spi.c                |  217 ----
 drivers/net/dsa/microchip/ksz_spi.h                |   69 +
 10 files changed, 2039 insertions(+), 1420 deletions(-)
 create mode 100644 drivers/net/dsa/microchip/ksz9477.c
 rename drivers/net/dsa/microchip/{ksz_9477_reg.h => ksz9477_reg.h} (98%)
 create mode 100644 drivers/net/dsa/microchip/ksz9477_spi.c
 create mode 100644 drivers/net/dsa/microchip/ksz_common.h
 delete mode 100644 drivers/net/dsa/microchip/ksz_spi.c
 create mode 100644 drivers/net/dsa/microchip/ksz_spi.h
Signature · 1 line
1.9.1