|
|
linux-ksz8895
|
|
|
|
|
|
Microchip (formerly Micrel) KSZ8895 Linux device driver
|
|
|
|
|
|
|
|
|
Originally created to expand the single Ethernet port capabilities of a custom
|
|
|
OEM Ethernet router/gateway style device. The device required multiple LAN
|
|
|
ports and a separate WAN port which is typical of these types of devices. With
|
|
|
the KSZ8895, this can be achieved in two different ways:
|
|
|
|
|
|
- Using two MACs – one connected to the 5-port switch for the LAN and the
|
|
|
other connected to a 5th on-chip PHY for the WAN – the first 4 PHYs being
|
|
|
attached to the switch
|
|
|
- Using a single MAC and configuring VLANs on both the switch and Linux
|
|
|
network interface to isolate LAN and WAN traffic. The VLAN tags can also
|
|
|
be removed on the egress of the 4 switch ports with attached PHYs.
|
|
|
|
|
|
Once upon a time, Micrel provided a driver for similar devices which they
|
|
|
claimed worked with earlier kernel builds. However, it seemed to be poorly
|
|
|
designed, was not configurable without driver modification, and did not
|
|
|
function reliably.
|
|
|
|
|
|
With this driver, the switch and 5th on-chip PHY act as fake PHYs on a fake
|
|
|
MIIM (MDIO) bus. This allows the switch to easily integrate with a MAC as if
|
|
|
it were a PHY while the driver controls the actual MIIM bus in the non-standard
|
|
|
SMI mode to monitor and control the switch and PHYs. The SMI simply spreads
|
|
|
the switch register addresses across the register addresses of multiple PHY
|
|
|
addresses on the MIIM bus.
|
|
|
|
|
|
The driver should drop into the version 4.9 stable kernel without modification
|
|
|
as this is what it was most recently tested against. However, it was
|
|
|
originally developed for 3.8; so it should also work reliably for everything
|
|
|
between if you give some of the API calls (which changed) a little massaging.
|