Skip to content

RFC net: dsa: microchip: refactor the ksz switch init function

Arun Ramadoss lkml netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest9 patches 16 repliesIn review
  2. v1 RFC9 patches 0 repliesSuperseded

Changes in v2 from the cover letter

- Fixed the compilation issue

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9net: dsa: microchip: ksz8795: update the port_cnt value in ksz_chip_datadrivers/net/dsa/microchip/ksz8795.c+3 -22 replies
2/9net: dsa: microchip: move ksz_chip_data to ksz_commondrivers/net/dsa/microchip/ksz8795.c drivers/net/dsa/microchip/ksz9477.c drivers/net/dsa/microchip/ksz_common.c +1 more+243 -2062 replies
3/9net: dsa: microchip: perform the compatibility check for dev probeddrivers/net/dsa/microchip/ksz8795_spi.c drivers/net/dsa/microchip/ksz9477_i2c.c drivers/net/dsa/microchip/ksz9477_spi.c +2 more+103 -202 replies
4/9net: dsa: microchip: move port memory allocation to ksz_commondrivers/net/dsa/microchip/ksz8795.c drivers/net/dsa/microchip/ksz9477.c drivers/net/dsa/microchip/ksz_common.c+9 -161 reply
5/9net: dsa: microchip: move struct mib_names to ksz_chip_datadrivers/net/dsa/microchip/ksz8795.c drivers/net/dsa/microchip/ksz9477.c drivers/net/dsa/microchip/ksz_common.c +1 more+159 -1811 reply
6/9net: dsa: microchip: move get_strings to ksz_commondrivers/net/dsa/microchip/ksz8795.c drivers/net/dsa/microchip/ksz9477.c drivers/net/dsa/microchip/ksz_common.c +1 more+20 -292 replies
7/9net: dsa: move mib->cnt_ptr reset code to ksz_common.cdrivers/net/dsa/microchip/ksz8795.c drivers/net/dsa/microchip/ksz9477.c drivers/net/dsa/microchip/ksz_common.c+7 -62 replies
8/9net: dsa: microchip: add the phylink get_capsdrivers/net/dsa/microchip/ksz8795.c drivers/net/dsa/microchip/ksz9477.c drivers/net/dsa/microchip/ksz_common.c +1 more+117 -92 replies
9/9net: dsa: microchip: remove unused members in ksz_devicedrivers/net/dsa/microchip/ksz8795.c drivers/net/dsa/microchip/ksz_common.h+1 -62 replies

Reviews trailers per patch

6 of 9 patches have a Reviewed-by or Acked-by.

PatchVladimir OlteanFlorian Fainelli
1/9R-b R-b
2/9R-b R-b
3/9
4/9
5/9
6/9R-b R-b
7/9R-b R-b
8/9R-b R-b
9/9R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [RFC Patch net-next v2 0/9] net: dsa: microchip: refactor the ksz switch init function

During the ksz_switch_register function, it calls the individual switches init functions (ksz8795.c and ksz9477.c). Both these functions have few things in common like, copying the chip specific data to struct ksz_dev, allocating ksz_port memory and mib_names memory & cnt. And to add the new LAN937x series switch, these allocations has to be replicated.
Based on the review feedback of LAN937x part support patch, refactored the switch init function to move allocations to switch register.

Changes in RFC v2
- Fixed the compilation issue

Arun Ramadoss (8):
net: dsa: microchip: ksz8795: update the port_cnt value in
ksz_chip_data
net: dsa: microchip: move ksz_chip_data to ksz_common
net: dsa: microchip: perform the compatibility check for dev probed
net: dsa: microchip: move port memory allocation to ksz_common
net: dsa: microchip: move struct mib_names to ksz_chip_data
net: dsa: microchip: move get_strings to ksz_common
net: dsa: microchip: add the phylink get_caps
net: dsa: microchip: remove unused members in ksz_device

Prasanna Vengateshan (1):
net: dsa: move mib->cnt_ptr reset code to ksz_common.c

 drivers/net/dsa/microchip/ksz8795.c     | 252 +-----------
 drivers/net/dsa/microchip/ksz8795_spi.c |  37 +-
 drivers/net/dsa/microchip/ksz9477.c     | 200 ++--------
 drivers/net/dsa/microchip/ksz9477_i2c.c |  30 +-
 drivers/net/dsa/microchip/ksz9477_spi.c |  30 +-
 drivers/net/dsa/microchip/ksz_common.c  | 485 +++++++++++++++++++++++-
 drivers/net/dsa/microchip/ksz_common.h  |  63 ++-
 7 files changed, 642 insertions(+), 455 deletions(-)
Signature · 1 line
2.33.0