[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#723177: linux-image-3.10-3-kirkwood: please build with CONFIG_MARVELL_PHY=m



On Sun, 2013-11-17 at 10:12 +0100, Michael Stapelberg wrote:
> Hi Lennert,
> 
> Lennert Buytenhek <buytenh@wantstofly.org> writes:
> > The problem here was that the Marvell PHY driver at some point supported
> > one or two specific Marvell ethernet PHY models, and people then started
> > blindly adding new PHY IDs to it without checking whether the already
> > supported PHYs and the PHYs for which support was being added had common
> > register layouts (and they didn't).
> >
> > The result is that on some of the very common Marvell PHYs that this
> > driver claims to support, the driver does sequences of register writes
> > that have entirely different effects than the intended ones, causing
> > various unintended side effects, including complete link failure, and
> > e.g. on the quad ethernet PHY on some of the mv78xx0 development
> > boards, having the Marvell PHY driver enabled causes link to flap on
> > the other three ports if you plug/unplug one of the ports because the
> > driver thinks it's a good idea to hard reset the whole chip under
> > these circumstances...
> >
> > What needs to be done is that someone with access to the relevant
> > Marvell datasheets fix the driver to behave according to which chip
> > it's being used on.  It's quite a bit of work to sort out this mess,
> > easily several tens of hours -- I started looking into it when I was
> > still at Marvell, but didn't get it done before leaving.
> Thanks for clarifying. This sounds like it would not be a wise choice to
> enable this option again :-(.

I'm in two minds about this.

The issues have been described in general terms but we don't have any
specifics for the platforms supported by Debian. Are any of those known
specifically to be broken?

Realistically I expect the only way this is going to get fixed in
practice is if we enable this option and deal with any resulting bug
reports either by fixing/disabling that phy driver or by forwarding
upstream.

A bunch of the phy ids seem to be duplicated in several phy drivers.
Looking at MARVELL_PHY_ID_* I find:
        $ git grep -iE 0x01410\(c60\|c90\|cc0\|e10\|cb0\|cd0\|e50\|e30\|e90\|e40\|dd0\)
        drivers/net/ethernet/dnet.c:    err = phy_register_fixup_for_uid(0x01410cc0, 0xfffffff0,
        drivers/net/ethernet/ibm/emac/phy.c:    .phy_id         = 0x01410CC0,
        drivers/net/ethernet/ibm/emac/phy.c:    .phy_id         = 0x01410C90,
        drivers/net/ethernet/intel/e1000/e1000_hw.h:#define M88E1111_I_PHY_ID  0x01410CC0
        drivers/net/ethernet/intel/e1000/e1000_hw.h:#define M88E1118_E_PHY_ID  0x01410E40
        drivers/net/ethernet/intel/e1000e/defines.h:#define M88E1111_I_PHY_ID    0x01410CC0
        drivers/net/ethernet/intel/e1000e/defines.h:#define BME1000_E_PHY_ID     0x01410CB0
        drivers/net/ethernet/intel/igb/e1000_defines.h:#define M88E1111_I_PHY_ID    0x01410CC0
        drivers/net/ethernet/intel/igb/e1000_defines.h:#define M88E1112_E_PHY_ID    0x01410C90
        drivers/net/ethernet/intel/ixgbe/ixgbe_type.h:#define IXGBE_M88E1145_E_PHY_ID  0x01410CD0
        drivers/net/sungem_phy.c:       .phy_id         = 0x01410c60,
        drivers/net/sungem_phy.c:       .phy_id         = 0x01410cc0,
        include/linux/marvell_phy.h:#define MARVELL_PHY_ID_88E1101              0x01410c60
        include/linux/marvell_phy.h:#define MARVELL_PHY_ID_88E1112              0x01410c90
        include/linux/marvell_phy.h:#define MARVELL_PHY_ID_88E1111              0x01410cc0
        include/linux/marvell_phy.h:#define MARVELL_PHY_ID_88E1118              0x01410e10
        include/linux/marvell_phy.h:#define MARVELL_PHY_ID_88E1121R             0x01410cb0
        include/linux/marvell_phy.h:#define MARVELL_PHY_ID_88E1145              0x01410cd0
        include/linux/marvell_phy.h:#define MARVELL_PHY_ID_88E1149R             0x01410e50
        include/linux/marvell_phy.h:#define MARVELL_PHY_ID_88E1240              0x01410e30
        include/linux/marvell_phy.h:#define MARVELL_PHY_ID_88E1318S             0x01410e90
        include/linux/marvell_phy.h:#define MARVELL_PHY_ID_88E1116R             0x01410e40
        include/linux/marvell_phy.h:#define MARVELL_PHY_ID_88E1510              0x01410dd0

Should we be disabling some seleciton of these, or do PHYID's not mean
what I think?

Ian


Reply to: