• Greg Ungerer's avatar
    net: allow FEC driver to use fixed PHY support · 6fcc040f
    Greg Ungerer authored
    At least one board using the FEC driver does not have a conventional
    PHY attached to it, it is directly connected to a somewhat simple
    ethernet switch (the board is the SnapGear/LITE, and the attached
    4-port ethernet switch is a RealTek RTL8305). This switch does not
    present the usual register interface of a PHY, it presents nothing.
    So a PHY scan will find nothing - it finds ID's of 0 for each PHY
    on the attached MII bus.
    
    After the FEC driver was changed to use phylib for supporting PHYs
    it no longer works on this particular board/switch setup.
    
    Add code support to use a fixed phy if no PHY is found on the MII bus.
    This is based on the way the cpmac.c driver solved this same problem.
    Signed-off-by: default avatarGreg Ungerer <gerg@uclinux.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    6fcc040f
fec.c 36.1 KB