[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e2647e49-d980-ac58-95fa-d1e5208e3689@gmail.com>
Date: Tue, 20 Nov 2018 20:15:06 -0800
From: Florian Fainelli <f.fainelli@...il.com>
To: Tristram.Ha@...rochip.com, "David S. Miller" <davem@...emloft.net>
Cc: Andrew Lunn <andrew@...n.ch>, Pavel Machek <pavel@....cz>,
UNGLinuxDriver@...rochip.com, netdev@...r.kernel.org
Subject: Re: [PATCH v4 net-next 0/6] net: dsa: microchip: Modify KSZ9477 DSA
driver in preparation to add other KSZ switch drivers
On 11/20/2018 3:55 PM, Tristram.Ha@...rochip.com wrote:
> From: Tristram Ha <Tristram.Ha@...rochip.com>
>
> 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.
Thanks a lot for getting this series out, hopefully there is no blocker
getting it merged now and you can follow-up with additional features.
>
> 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
>
--
Florian
Powered by blists - more mailing lists