On Mon, Dec 31, 2018 at 12:24:18PM +0100, Klaus Kudielka wrote: > On 30.12.18 10:51, Andrew Lunn wrote: > > >Some of the Marvell Ethernet switches have a similar setup. Some ports > >have both an internal PHY and a SERDES port which can be connected to an > >SFP cage. Whichever gets link first is connected to the MAC. > > This decision is taken by hardware? I am just wondering how the outcome > would be detected unambiguously by software. (Any documentation?)
The Marvell documentation is not public. I would have to check, but i think there is a bit which tells you. But as Florian pointed out, this can be indirectly controlled from software, in that a PHY which is configured down will never get link, in the same way an SFP with its receiver disabled will never get link. So software to enable one or the other would work. > Such a "generic" solution would be restricted (per MAC) to a maximum of one > SFP (fiber or copper), and one separate PHY, right? The main difference > between boards would be the switching logic. Yes, that seems a sensible restriction. Andrew