summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* implement slot capabilities (SSPL)clearfogRussell King8 days1-0/+23
|
* mvebu/clearfog pcie updatesRussell King8 days5-33/+179
| | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: dts: armada388-clearfog: use 1000BaseX mode for 88e6176 switchRussell King8 days1-8/+2
| | | | | | | Use 1000BaseX mode for the 88e6176 switch, which allows mvneta to negotiate correctly without needing to be forced. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* ARM: dts: armada388-clearfog: document MPP usageRussell King8 days2-0/+101
| | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: dts: armada388-clearfog: emmc on clearfog baseRussell King8 days2-0/+63
| | | | Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
*---. Merge branches 'dsa-mv88e6xxx', 'mvebu-cpuidle', 'mvebu-pci' and 'phy' into ↵Russell King8 days50-869/+2486
|\ \ \ | | | | | | | | | | | | clearfog
| | | * net: phylink: add pcs operations [*experimental*]phyRussell King8 days2-22/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a separate set of PCS operations, which MAC drivers can use to couple phylink with their associated MAC PCS layer. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * net: phylink: rename 'ops' to 'mac_ops'Russell King8 days1-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename the bland 'ops' member of struct phylink to be a more descriptive 'mac_ops' - this is necessary as we're about to introduce another set of operations. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * doc: sfp-phylink: correct code indentationRussell King8 days1-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using vim to edit the phylink documentation reveals some mistakes due to the "invisible" pythonesque white space indentation that can't be seen with other editors. Fix it. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * arm64: dts: configure Macchiatobin 10G PHY LED modesRussell King8 days1-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Configure the Macchiatobin 10G PHY LED modes to correct their polarity. We keep the existing LED behaviours, but switch their polarity to reflect how they are connected. Tweak the LED modes as well to be: left: off = no link solid green = RJ45 link up (not SFP+ cage) flash green = traffic right: off = no link solid green = 10G solid yellow = 1G flash green = 100M flash yellow = 10M Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * net: phy: marvell10g: add support for configuring LEDsRussell King8 days1-3/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for configuring the LEDs. Macchiatobin has an oddity in that the left LED goes out when the cable is connected, and flashes when there's link activity. This is because the reset default for the LED outputs assume that the LED is connected to supply, not to ground. Add support for configuring the LED modes and polarities. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * dt-bindings: net: add dt bindings for marvell10g driverRussell King8 days1-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a DT bindings document for the Marvell 10G driver, which will augment the generic ethernet PHY binding by having LED mode configuration. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * net: mii: add linkmode_adv_to_mii_adv_x()Russell King8 days1-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a helper to convert a linkmode advertisement to a clause 37 advertisement value for 1000base-x and 2500base-x. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * net: mii: convert mii_lpa_to_ethtool_lpa_x() to linkmode variantRussell King8 days1-18/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a LPA to linkmode decoder for 1000BASE-X protocols; this decoder only provides the modify semantics similar to other such decoders. This replaces the unused mii_lpa_to_ethtool_lpa_x() helper. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * net: sfp: display SFP module information *not for mainline*Russell King8 days4-11/+349
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Display SFP module information verbosely, splitting the generic parts into a separate file. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| | | * net: sfp: add sfp+ compatible *not for mainline*Russell King8 days1-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a compatible for SFP+ cages. SFP+ cages are backwards compatible, but the ethernet device behind them may not support the slower speeds of SFP modules. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * net: sfp: add debugfs supportRussell King8 days1-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add debugfs support to SFP so that the internal state of the SFP state machines and hardware signal state can be viewed from userspace, rather than having to compile a debug kernel to view state state transitions in the kernel log. The 'state' output looks like: Module state: empty Module probe attempts: 0 0 Device state: up Main state: down Fault recovery remaining retries: 5 PHY probe remaining retries: 12 moddef0: 0 rx_los: 1 tx_fault: 1 tx_disable: 1 Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * net: sfp: add support for cooled SFP+ transceiversRussell King8 days1-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Cooled SFP+ transceivers need a longer initialisation (startup) time. Select the initialisation time depending on the cooled option bit. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * net: phy: make phy_error() report which PHY has failedRussell King8 days1-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | phy_error() is called from phy_interrupt() or phy_state_machine(), and uses WARN_ON() to print a backtrace. The backtrace is not useful when reporting a PHY error. However, a system may contain multiple ethernet PHYs, and phy_error() gives no clue which one caused the problem. Replace WARN_ON() with a call to phydev_err() so that we can see which PHY had an error, and also inform the user that we are halting the PHY. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * net: phy: marvell10g: allow PHY to probe without firmwareRussell King8 days1-5/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow the PHY to probe when there is no firmware, but do not allow the link to come up by forcing the PHY state to PHY_HALTED in a similar way to phy_error(). Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * net: phy: provide phy driver start/stop hooksRussell King8 days2-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide phy driver start/stop hooks so that the PHY driver knows when the network driver is starting or stopping. This will be used for the Marvell 10G driver so that we can sanely refuse to start if the PHYs firmware is not present, and also so that we can sanely support SFPs behind the PHY. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * net: mvpp2: use resolved link config in mac_link_up()Russell King8 days1-36/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert the Marvell mvpp2 ethernet driver to use the finalised link parameters in mac_link_up() rather than the parameters in mac_config(). Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * net: mvneta: use resolved link config in mac_link_up()Russell King8 days1-17/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert the Marvell mvneta ethernet driver to use the finalised link parameters in mac_link_up() rather than the parameters in mac_config(). Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * net: macb: use resolved link config in mac_link_up()Russell King8 days2-20/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert the macb ethernet driver to use the finalised link parameters in mac_link_up() rather than the parameters in mac_config(). Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * net: dpaa2-mac: use resolved link config in mac_link_up()Russell King8 days2-22/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert the DPAA2 ethernet driver to use the finalised link parameters in mac_link_up() rather than the parameters in mac_config(), which are more suited to the needs of the DPAA2 MC firmware than those available via mac_config(). Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * net: axienet: use resolved link config in mac_link_up()Russell King8 days1-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert the Xilinx AXI ethernet driver to use the finalised link parameters in mac_link_up() rather than the parameters in mac_config(). Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * net: mv88e6xxx: use resolved link config in mac_link_up()Russell King8 days1-16/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the resolved link configuration to set the MAC configuration when mac_link_up() for non-internal-PHY ports. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * net: dsa: propagate resolved link config via mac_link_up()Russell King8 days9-9/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Propagate the resolved link configuration down via DSA's phylink_mac_link_up() operation to allow split PCS/MAC to work. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * net: phylink: propagate resolved link config via mac_link_up()Russell King8 days12-44/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Propagate the resolved link parameters via the mac_link_up() call for MACs that do not automatically track their PCS state. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * net: phy: marvell*: add support for hw resolved pause modesRussell King8 days2-2/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Support reporting the hardware resolved pause enablement states via phylib, overriding our software implementation. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * net: phy: add resolved pause supportRussell King8 days2-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow phylib drivers to pass the hardware-resolved pause state to MAC drivers, rather than using the software-based pause resolution code. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * net: phy: marvell: don't interpret PHY status unless resolvedRussell King8 days1-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't attempt to interpret the PHY specific status register unless the PHY is indicating that the resolution is valid. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * net: phy: marvell10g: read copper results from CSSR1Russell King8 days1-52/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Read the copper autonegotiation results from the copper specific status register, rather than decoding the advertisements. Reading what the link is actually doing will allow us to support downshift modes. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * net: phy: allow bcm84881 to be a moduleRussell King8 days1-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that the phylib module loading issue has been resolved, we can allow this PHY driver to be built as a module. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * net: phylink: clarify flow control settings in documentationRussell King9 days1-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Clarify the expected flow control settings operation in the phylink documentation for each negotiation mode. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * net: phylink: improve initial mac configurationRussell King9 days1-2/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve the initial MAC configuration so we get a configuration which more represents the final operating mode, in particular with respect to the flow control settings. We do this by: 1) more fully initialising our phy state, so we can use this as the initial state for PHY based connections. 2) reading the fixed link state. 3) ensuring that in-band mode has sane pause settings for SGMII vs 802.3z negotiation modes. In all three cases, we ensure that state->link is false, just in case any MAC drivers have other ideas by mis-using this member, and we also take account of manual pause mode configuration at this point. This avoids MLO_PAUSE_AN being seen in mac_config() when operating in PHY, fixed mode or inband SGMII mode, thereby giving cleaner semantics to the pause flags. As a result of this, the pause flags now indicate in a mode-independent way what is required from a mac_config() implementation. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * net: phylink: allow ethtool -A to change flow control advertisementRussell King9 days1-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When ethtool -A is used to change the pause modes, the pause advertisement is not being changed, but the documentation in uapi/linux/ethtool.h says we should be. Add that capability to phylink. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * net: phylink: resolve fixed link flow controlRussell King9 days2-44/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolve the fixed link flow control using the recently introduced linkmode_resolve_pause() helper, which we use in phylink_get_fixed_state() only when operating in full duplex mode. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * net: phylink: use phylib resolved flow control modesRussell King9 days1-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the new phy_get_pause() helper to get the resolved pause modes for a PHY rather than resolving the pause modes ourselves. We temporarily retain our pause mode resolution for causes where there is no PHY attached, e.g. for fixed-link modes. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * net: phylink: ensure manual flow control is selected appropriatelyRussell King9 days1-17/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split the application of manually controlled flow control modes from phylink_resolve_flow(), so that we can use alternative providers of flow control resolution. We also want to clear the MLO_PAUSE_AN flag when autoneg is disabled, since flow control can't be negotiated in this circumstance. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * net: phylink: remove pause mode ethtool setting for fixed linksRussell King9 days1-12/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the ability for ethtool -A to change the pause settings for fixed links; if this is really required, we can reinstate it later. Andrew Lunn agrees: "So I think it is safe to not implement ethtool -A, at least until somebody has a real use case for it." Lets avoid making things too complex for use cases that aren't being used. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * net: add linkmode helper for setting flow control advertisementRussell King9 days3-16/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a linkmode helper to set the flow control advertisement in an ethtool linkmode mask according to the tx/rx capabilities. This implementation is moved from phylib, and documented with an analysis of its shortcomings. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * net: add helpers to resolve negotiated flow controlRussell King9 days5-1/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a couple of helpers to resolve negotiated flow control. Two helpers are provided: - linkmode_resolve_pause() which takes the link partner and local advertisements, and decodes whether we should enable TX or RX pause at the MAC. This is useful outside of phylib, e.g. in phylink. - phy_get_pause(), which returns the TX/RX enablement status for the current negotiation results of the PHY. This allows us to centralise the flow control resolution, rather than spreading it around. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * net: linkmode: make linkmode_test_bit() take const pointerRussell King9 days1-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | linkmode_test_bit() does not modify the address; test_bit() is also declared const volatile for the same reason. There's no need for linkmode_test_bit() to be any different, and allows implementation of helpers that take a const linkmode pointer. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
| | | * net: phylink: allow in-band AN for USXGMIIAlex Marginean2020-01-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | USXGMII supports passing link information in-band between PHY and MAC PCS, add it to the list of protocols that support in-band AN mode. Being a MAC-PHY protocol that can auto-negotiate link speeds up to 10 Gbps, we populate the initial supported mask with the entire spectrum of link modes up to 10G that PHYLINK supports, and we let the driver reduce that mask in its .phylink_validate method. Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| | | * net: phylink: Allow 2.5BASE-T, 5GBASE-T and 10GBASE-T for the 10G link modesVladimir Oltean2020-01-291-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some reason, PHYLINK does not put the copper modes for 802.3bz (NBASE-T) and 802.3an-2006 (10GBASE-T) in the PHY's supported mask, when the PHY-MAC connection is a 10G-capable one (10GBase-KR, 10GBase-R, USXGMII). One possible way through which the cable side can work at the lower speed is by having the PHY emit PAUSE frames towards the MAC. So fix that omission. Also include the 2500Base-X fiber mode in this list while we're at it. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| | | * net: phy: Added IRQ print to phylink_bringup_phy()Florian Fainelli2020-01-293-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The information about the PHY attached to the PHYLINK instance is useful but is missing the IRQ prints that phy_attached_info() adds. phy_attached_info() is a bit long and it would not be possible to use phylink_info() anyway. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| | | * net: phylink: add support for polling MAC PCSVladimir Oltean2020-01-293-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some MAC PCS blocks are unable to provide interrupts when their status changes. As we already have support in phylink for polling status, use this to provide a hook for MACs to enable polling mode. The patch idea was picked up from Russell King's suggestion on the macb phylink patch thread here [0] but the implementation was changed. Instead of introducing a new phylink_start_poll() function, which would make the implementation cumbersome for common PHYLINK implementations for multiple types of devices, like DSA, just add a boolean property to the phylink_config structure, which is just as backwards-compatible. https://lkml.org/lkml/2019/12/16/603 Suggested-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| | | * net: phylink: make QSGMII a valid PHY mode for in-band ANVladimir Oltean2020-01-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QSGMII is a SerDes protocol clocked at 5 Gbaud (4 times higher than SGMII which is clocked at 1.25 Gbaud), with the same 8b/10b encoding and some extra symbols for synchronization. Logically it offers 4 SGMII interfaces multiplexed onto the same physical lanes. Each MAC PCS has its own in-band AN process with the system side of the QSGMII PHY, which is identical to the regular SGMII AN process. So allow QSGMII as a valid in-band AN mode, since it is no different from software perspective from regular SGMII. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| | | * net: switch to using PHY_INTERFACE_MODE_10GBASER rather than 10GKRRussell King2020-01-277-25/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch network drivers, phy drivers, and SFP/phylink over to use the more correct 10GBASE-R, rather than 10GBASE-KR. 10GBASE-KR is backplane ethernet, which is 10GBASE-R with autonegotiation on top, which our current usage on the affected platforms does not have. The only remaining user of PHY_INTERFACE_MODE_10GKR is the Aquantia PHY, which has a separate mode for 10GBASE-KR. For Marvell mvpp2, we detect 10GBASE-KR, and rewrite it to 10GBASE-R for compatibility with existing DT - this is the only network driver at present that makes use of PHY_INTERFACE_MODE_10GKR. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>