OpenCloudOS-Kernel/drivers/net/ethernet/micrel
Lukas Wunner aae079aa76 net: ks8851: Deduplicate register macros
The ks8851 chip is sold either with an SPI interface (KSZ8851SNL) or
with a so-called non-PCI interface (KSZ8851-16MLL).  When the driver
for the latter was introduced with commit a55c0a0ed4 ("drivers/net:
ks8851_mll ethernet network driver"), it duplicated the register macros
introduced by the driver for the former with commit 3ba81f3ece ("net:
Micrel KS8851 SPI network driver").

The chips are almost identical, so the duplication seems unwarranted.
There are a handful of bits which are in use on the KSZ8851-16MLL but
reserved on the KSZ8851SNL, and vice-versa, but there are no actual
collisions.

Thus, remove the duplicate definitions from the KSZ8851-16MLL driver.
Mark all bits which differ between the two chips.  Move the SPI frame
opcodes, which are specific to KSZ8851SNL, to its driver.

The KSZ8851-16MLL driver added a RXFCTR_THRESHOLD_MASK macro which is a
duplication of the RXFCTR_RXFCT_MASK macro, rename it where it's used.
Same for P1MBCR_FORCE_FDX, which duplicates the BMCR_FULLDPLX macro and
OBCR_ODS_16MA, which duplicates OBCR_ODS_16mA.

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Cc: Frank Pavlic <f.pavlic@kunbus.de>
Cc: Ben Dooks <ben.dooks@codethink.co.uk>
Cc: Tristram Ha <Tristram.Ha@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-03-20 12:43:52 -07:00
..
Kconfig drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ks8695net.c net: micrel: ks8695net: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-14 11:56:36 -05:00
ks8695net.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ks8842.c networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
ks8851.c net: ks8851: Deduplicate register macros 2019-03-20 12:43:52 -07:00
ks8851.h net: ks8851: Deduplicate register macros 2019-03-20 12:43:52 -07:00
ks8851_mll.c net: ks8851: Deduplicate register macros 2019-03-20 12:43:52 -07:00
ksz884x.c ethernet: micrel: remove redundant pointer 'info' 2018-07-04 22:39:11 +09:00