> -----Original Message----- > From: Russell King - ARM Linux admin <linux@xxxxxxxxxxxxxxx> > Sent: Thursday, December 19, 2019 9:03 PM > To: Madalin Bucur <madalin.bucur@xxxxxxx> > Cc: davem@xxxxxxxxxxxxx; netdev@xxxxxxxxxxxxxxx; andrew@xxxxxxx; > f.fainelli@xxxxxxxxx; hkallweit1@xxxxxxxxx; shawnguo@xxxxxxxxxx; > devicetree@xxxxxxxxxxxxxxx > Subject: Re: [PATCH 1/6] net: phy: add interface modes for XFI, SFI > > On Thu, Dec 19, 2019 at 06:32:51PM +0000, Madalin Bucur wrote: > > > -----Original Message----- > > > From: Russell King - ARM Linux admin <linux@xxxxxxxxxxxxxxx> > > > Sent: Thursday, December 19, 2019 7:29 PM > > > To: Madalin Bucur <madalin.bucur@xxxxxxx> > > > Cc: davem@xxxxxxxxxxxxx; netdev@xxxxxxxxxxxxxxx; andrew@xxxxxxx; > > > f.fainelli@xxxxxxxxx; hkallweit1@xxxxxxxxx; shawnguo@xxxxxxxxxx; > > > devicetree@xxxxxxxxxxxxxxx > > > Subject: Re: [PATCH 1/6] net: phy: add interface modes for XFI, SFI > > > > > > On Thu, Dec 19, 2019 at 05:21:16PM +0200, Madalin Bucur wrote: > > > > From: Madalin Bucur <madalin.bucur@xxxxxxx> > > > > > > > > Add explicit entries for XFI, SFI to make sure the device > > > > tree entries for phy-connection-type "xfi" or "sfi" are > > > > properly parsed and differentiated against the existing > > > > backplane 10GBASE-KR mode. > > > > > > 10GBASE-KR is actually used for XFI and SFI (due to a slight mistake > on > > > my part, it should've been just 10GBASE-R). > > > > > > Please explain exactly what the difference is between XFI, SFI and > > > 10GBASE-R. I have not been able to find definitive definitions for > > > XFI and SFI anywhere, and they appear to be precisely identical to > > > 10GBASE-R. It seems that it's just a terminology thing, with > > > different groups wanting to "own" what is essentially exactly the > > > same interface type. > > > > Hi Russell, > > > > 10GBase-R could be used as a common nominator but just as well 10G and > > remove the rest while we're at it. There are/may be differences in > > features, differences in the way the HW is configured (the most > > important aspect) and one should be able to determine what interface > > type is in use to properly configure the HW. SFI does not have the CDR > > function in the PMD, relying on the PMA signal conditioning vs the XFI > > that requires this in the PMD. We kept the xgmii compatible for so long > > without much issues until someone started cleaning up the PHY supported > > modes. Since we're doing that, let's be rigorous. The 10GBase-KR is > > important too, we have some backplane code in preparation and having it > > there could pave the way for a simpler integration. > > The problem we currently have is: > > $ grep '10gbase-kr' arch/*/boot/dts -r > > virtually none of those are actually backplane. For the mcbin matches, > these are either to a 88x3310 PHY for the doubleshot, which dynamically > operates between XFI, 5GBASE-R, 2500BASE-X, or SGMII according to the > datasheet. Yes, I've seen it's used already in several places: $ grep PHY_INTERFACE_MODE_10GKR drivers/net -nr drivers/net/phy/marvell10g.c:219: if (iface != PHY_INTERFACE_MODE_10GKR) { drivers/net/phy/marvell10g.c:307: phydev->interface != PHY_INTERFACE_MODE_10GKR) drivers/net/phy/marvell10g.c:389: phydev->interface == PHY_INTERFACE_MODE_10GKR) && phydev->link) { drivers/net/phy/marvell10g.c:398: phydev->interface = PHY_INTERFACE_MODE_10GKR; drivers/net/phy/phylink.c:296: case PHY_INTERFACE_MODE_10GKR: drivers/net/phy/aquantia_main.c:361: phydev->interface = PHY_INTERFACE_MODE_10GKR; drivers/net/phy/aquantia_main.c:499: phydev->interface != PHY_INTERFACE_MODE_10GKR) drivers/net/phy/sfp-bus.c:340: return PHY_INTERFACE_MODE_10GKR; drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c:1117: return interface == PHY_INTERFACE_MODE_10GKR || drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c:1203: case PHY_INTERFACE_MODE_10GKR: drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c:1652: case PHY_INTERFACE_MODE_10GKR: drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c:4761: case PHY_INTERFACE_MODE_10GKR: drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c:4783: case PHY_INTERFACE_MODE_10GKR: We should fix this, if it's incorrect. > If we add something else, then the problem becomes what to do about > that lot - one of the problems is, it seems we're going to be breaking > DT compatibility by redefining 10gbase-kr to be correct. We need the committer/maintainer to update that to a correct value. > It's interesting to hear what the difference is between XFI and SFI, > but it's weird that PHYs such as 88x3310 have no configuration of their > fiber interface to enable or disable the CDR, yet it supports fiber > interfaces, and explicitly shows applications involving "XFI/SFI". > There's no mention of the CDR in the datasheet either. I understand SFI came later, with the advantage of cheaper and less power consuming SFP+ modules.