summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
10 daysRevert "iommu: silence iommu group prints"cex7Russell King
This reverts commit 842002f3ef06e6ca88d90968733878660994b5b8.
10 daysiommu: silence iommu group printsRussell King
On the LX2160A, there are lots (about 160) of IOMMU messages produced during boot; this is excessive. Reduce the severity of these messages to debug level. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
10 daysarm64: dts: lx2160a-clearfog-cx: add QSFP support [*experimental*]Russell King
Add QSFP cage network interfaces. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
10 daysnet: add qsfp support [*experimental*]Russell King
Add experimental QSFP+ support for the SolidRun Clearfog-CX platform. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
10 daysnet: sfp: clean up sfp-bus buildingRussell King
Use a Kconfig symbol to control the build of sfp-bus.c Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
10 daysahci: qoriq: workaround for errata A-379364 on lx2160aPeng Ma
There is a erratum on lx2160a which is: "SATA link is going down sometime during sata initialization" The workaround for it is to reset the lane. This patch implements this workaround. This erratum only exists on lx2160 Rev1, will be addressed on Rev2 and later. Signed-off-by: Peng Ma <peng.ma@nxp.com> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
10 daysbus: fsl-mc: fix dprc object reading raceRussell King
When modifying the objects attached to a DPRC, we may end up reading the list of objects from the firmware while another thread is changing changing the list. Since we read the objects via: - Read the number of DPRC objects - Iterate over this number of objects retrieving their details and objects can be added in the middle of the list, this causes the last few objects to unexpectedly disappear. The side effect of this is if network interfaces are added after boot, they come and go. This can result in already configured interfaces unexpectedly disappearing. This has been easy to provoke with the restool interface added, and a script which adds network interfaces one after each other; the kernel rescanning runs asynchronously to restool. NXP's approach to fixing this was to introduce a sysfs "attribute" in their vendor tree, /sys/bus/fsl-mc/rescan, which userspace poked at to request the kernel to rescan the DPRC object tree each time the "restool" command completed (whether or not the tool changed anything.) This has the effect of making the kernel's rescan synchronous with a scripted restool, but still fails if we have multiple restools running concurrently. This patch takes a different approach: - Read the number of DPRC objects - Iterate over this number of objects retrieving their details - Re-read the number of DPRC objects - If the number of DPRC objects has changed while reading, repeat. This solves the issue where network interfaces unexpectedly disappear while adding others via ls-addni, because they've fallen off the end of the object list. This does *not* solve the issue that if an object is deleted while another is added while we are reading the objects - that requires firmware modification, or a more elaborate solution on the Linux side (e.g., CRCing the object details and reading all objects at least twice to check the CRC is stable.) However, without firmware modification, this is probably the best way to ensure that we read all the objects. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
10 daysbus: fsl-mc: add IOMMU mappings for MC firmware and DCFGRussell King (Oracle)
The MC firmware (which runs the networking subsystem) is loaded into RAM by U-Boot, and this region is omitted from the memory passed to the kernel via DT. Prior to booting the kernel, the MC processing is halted to allow IOMMU setup. When booting the kernel with IOMMU support enabled and without using both bypass and passthrough mode, the MC firmware crashes as soon as it is released, as the MC is unable to access the RAM that has been assigned to it for both the firmware image and other purposes, and also the DCFG to retrieve the SoC version. In order to avoid this, we need to setup identity mappings in the MC domain. For the MC RAM region, we read the firmware base address registers which tell us where the firmware is located. According to the MC design document, the firmware is loaded within the upper 512M of the MC RAM region, aligned to 512M, and the RAM region is also aligned to 512M. The lower 8 bits of the firmware base address low register tells us how large the RAM region is. Use this to calculate its size and location in order to create an indentity mapping. We also search DT for the DCFG node to retrieve its address, and create a read-only identity mapping to allow the MC firmware to read the SoC version. If we are unable to find the DCFG node, we use a default address for this. [XXX This needs to be improved XXX] This allows "arm-smmu.disable_bypass=1" to be dropped from the kernel command line for LX2160A platforms. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
10 daysarm64: dts: lx2160a: add iommus property for mc nodeLaurentiu Tudor
Enable SMMU management for the MC firmware by adding the required iommus property in the device tree node. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
10 daysMerge branches 'net-queue' and 'pci-mobiveil' into cex7Russell King (Oracle)
10 daysnet: mvpp2: add support for querying PCS inband propertiesnet-queueRussell King (Oracle)
Report the PCS inband properties to phylink for Marvell PP2 interfaces. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
10 daysnet: mvneta: add support for querying PCS inband propertiesRussell King (Oracle)
Report the PCS inband properties to phylink for Marvell NETA interfaces. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
10 daysnet: txgbe: use phylink_pcs_change() to report PCS link change eventsRussell King (Oracle)
Use phylink_pcs_change() when reporting changes in PCS link state to phylink. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
10 daysnet: prestera: use phylink_pcs_change() to report PCS link change eventsRussell King (Oracle)
Use phylink_pcs_change() when reporting changes in PCS link state to phylink. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
10 daysnet: mvneta: use phylink_pcs_change() to report PCS link change eventsRussell King (Oracle)
Use phylink_pcs_change() when reporting changes in PCS link state to phylink. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
10 daysnet: mvpp2: use phylink_pcs_change() to report PCS link change eventsRussell King (Oracle)
Use phylink_pcs_change() when reporting changes in PCS link state to phylink. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
10 daysnet: phylink: switch to use phy_query_inband() for copper SFP modulesRussell King (Oracle)
Use phy_query_inband() with the initial mode when configuring copper SFP modules to determine whether we should use inband or PHY mode. This allows us to remove the BCM84881 specific detection from phylink, and instead rely on the PHY driver giving us this detail. We can use a simple check here - if the PHY reports that the inband information is valid, but sets no other bits, then inband is definitely not supported. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
10 daysnet: phylink: move phylink_phy_no_inband()Russell King (Oracle)
Since the BCM84881 driver always provides phy->supported_interfaces, and the driver is required for this PHY, move phylink_phy_no_inband() to the case where this is non-empty. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
10 daysnet: phylink: move the sfp autoneg mode into struct phylinkRussell King (Oracle)
Move the SFP autoneg mode into struct phylink rather than passing it into phylink_sfp_config(). This is generally MLO_AN_INBAND except when we have a copper SFP with a Broadcom 84881 PHY. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
10 daysnet: dsa: mv88e6xxx: add 6352 family EEE supportRussell King (Oracle)
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
10 daysnet: phy: generate PHY mdio modaliasRussell King (Oracle)
The modalias string provided in the uevent sysfs file does not conform to the format used in PHY driver modules. One of the reasons is that udev loading of PHY driver modules has not been an expected use case. This patch changes the MODALIAS entry for only PHY devices from: MODALIAS=of:Nethernet-phyT(null) to: MODALIAS=mdio:00000000001000100001010100010011 Other MDIO devices (such as DSA) remain as before. However, having udev automatically load the module has the advantage of making use of existing functionality to have the module loaded before the device is bound to the driver, thus taking advantage of multithreaded boot systems, potentially decreasing the boot time. However, this patch will not solve any issues with the driver module not being loaded prior to the network device needing to use the PHY. This is something that is completely out of control of any patch to change the uevent mechanism. Reported-by: Yinbo Zhu <zhuyinbo@loongson.cn> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
10 daysnet: all drivers updateRussell King (Oracle)
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
10 daysnet: phylink: pass mode into pcs_validate()Russell King (Oracle)
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
10 daysnet: phylink: pass mode into phylink_validate()Russell King (Oracle)
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
10 daysnet: use phylink_mode_*() helpersRussell King (Oracle)
Use the phylink_mode_*() helpers in all drivers so we can change the definition of the "mode" argument. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
10 daysnet: phylink: add helpers for decoding modeRussell King (Oracle)
Add helpers to decode the mode argument passed to the various MAC and PCS functions. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
10 daysnet: phylink: use phy interface mode bitmapsRussell King
Use the phy interface mode bitmaps for SFP modules and PHYs to select the operating interface for SFPs and PHYs with SFPs. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
10 daysnet: phy: add supported_interfaces to Aquantia AQR113CRussell King (Oracle)
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
10 daysnet: phy: add supported_interfaces to marvell10g PHYsRussell King
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
10 daysnet: phy: add supported_interfaces to marvell PHYsRussell King
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
10 daysnet: phy: add supported_interfaces to bcm84881Russell King
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
10 daysnet: phy: add supported_interfaces to phylibRussell King
Add a supported_interfaces member to phylib so we know which interfaces a PHY supports. Currently, set any unconverted driver to indicate all interfaces are supported. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
10 daysnet: sfp: display SFP module information [*not for mainline*]Russell King
Display SFP module information verbosely, splitting the generic parts into a separate file. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
10 daysnet: sfp: add sfp+ compatible [*not for mainline*]Russell King
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>
10 daysnet: sfp: add support for cooled SFP+ transceiversRussell King
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>
10 daysnet: phy: make phy_error() report which PHY has failedRussell King
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>
10 daysnet: phy: marvell10g: allow PHY to probe without firmwareRussell King
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>
10 daysnet: phy: provide phy driver start/stop hooksRussell King
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>
10 daysnet: phy: marvell*: add support for hw resolved pause modesRussell King
Support reporting the hardware resolved pause enablement states via phylib, overriding our software implementation. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
10 daysnet: phy: add resolved pause support [*not for mainline*]Russell King
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>
10 daysnet: phylink: handle MDIO_USXGMII_LINK when decoding USXGMIIRussell King (Oracle)
If MDIO_USXGMII_LINK is not set, it means that the PHYs media side link is down. Indicate back to phylink that the link as a whole is down. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
10 daysarm64: dts: configure Macchiatobin 10G PHY LED modesRussell King
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>
10 daysnet: phy: marvell10g: add support for configuring LEDsRussell King
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>
10 daysdt-bindings: net: add dt bindings for marvell10g driverRussell King
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>
10 daysnet: phy: marvell: provide phy_query_inband() implementationRussell King (Oracle)
Provide an implementation for phy_query_inband() for Marvell PHYs used on SFP modules. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
10 daysnet: phy: bcm84881: provide phy_query_inband() implementationRussell King (Oracle)
BCM84881 has no support for inband signalling, so this is a trivial implementation that returns no support for inband. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
10 daysnet: phylink: add pcs_query_inband()Russell King (Oracle)
Add a pcs_query_inband() interface which reflects phy_query_inband() for PHYs. This can be used to determine for the specified interface mode whether in-band signalling is supported by the PCS, and whether the PCS requires in-band signalling. This is used to determine whether we should use inband autonegotiation in inband mode, which may be required or may be unsupported in various interface modes. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
10 daysnet: phy: add phy_query_inband()Russell King (Oracle)
Add a method to query the PHY's in-band capabilities for a PHY interface mode. This can be used to determine for the specified interface mode whether in-band signalling is supported, and whether the PHY requires in-band signalling. When not implemented, or the PHY driver doesn't report any modes for the interface, LINK_INBAND_VALID will not be set. When set, the remainder of the flags can be interpreted. LINK_INBAND_POSSIBLE means that the device can be configured to use or not use in-band signalling. Later patches may add support to configure this at the PHY. LINK_INBAND_REQUIRED means that the device uses in-band signalling which can not be disabled. When only LINK_INBAND_VALID has been set, this means that the device does not support any in-band signalling, and can't be configured to do so. "Bypass" mode (where the device may be configured for in-band, but may still bring the link up if there is no in-band received from the link partner) is not considered in this patch. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
10 daysnet: phylink allow EEE management for SFPs without PHYsRussell King (Oracle)
Allow EEE management for SFPs without accessible PHYs. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
10 daysnet: dsa: mt7530: convert to phylink managed EEERussell King (Oracle)
Fixme: doesn't bit 25 and 26 also need to be set in the PMCR for PMCR_FORCE_EEE100 and PMCR_FORCE_EEE1G to take effect? Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>