OSDN Git Service

Merge branch 'dsa-microchip-Modify-KSZ9477-DSA-driver-in-preparation-to-add-other...
authorDavid S. Miller <davem@davemloft.net>
Wed, 21 Nov 2018 04:57:12 +0000 (20:57 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 21 Nov 2018 04:57:12 +0000 (20:57 -0800)
commit51428fd66139ce5ddb2bfbd3c509c7db6e7e73e0
treeb42ee01a361ed540f752e4bbb155cd1279e1c978
parentb1a200484143a727ce293e0f200a543cc7584152
parent84bd1908192ffa5231ca6709c8cd87efaf57226c
Merge branch 'dsa-microchip-Modify-KSZ9477-DSA-driver-in-preparation-to-add-other-KSZ-switch-drivers'

Tristram Ha says:

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

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
====================

Signed-off-by: David S. Miller <davem@davemloft.net>