1. 31 7月, 2019 1 次提交
    • J
      net: stmmac: Sync RX Buffer upon allocation · 3caa61c2
      Jose Abreu 提交于
      With recent changes that introduced support for Page Pool in stmmac, Jon
      reported that NFS boot was no longer working on an ARM64 based platform
      that had the IP behind an IOMMU.
      
      As Page Pool API does not guarantee DMA syncing because of the use of
      DMA_ATTR_SKIP_CPU_SYNC flag, we have to explicit sync the whole buffer upon
      re-allocation because we are always re-using same pages.
      
      In fact, ARM64 code invalidates the DMA area upon two situations [1]:
      	- sync_single_for_cpu(): Invalidates if direction != DMA_TO_DEVICE
      	- sync_single_for_device(): Invalidates if direction == DMA_FROM_DEVICE
      
      So, as we must invalidate both the current RX buffer and the newly allocated
      buffer we propose this fix.
      
      [1] arch/arm64/mm/cache.S
      Reported-by: NJon Hunter <jonathanh@nvidia.com>
      Tested-by: NJon Hunter <jonathanh@nvidia.com>
      Fixes: 2af6106a ("net: stmmac: Introducing support for Page Pool")
      Signed-off-by: NJose Abreu <joabreu@synopsys.com>
      Tested-by: NEzequiel Garcia <ezequiel@collabora.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3caa61c2
  2. 30 7月, 2019 1 次提交
  3. 23 7月, 2019 3 次提交
  4. 12 7月, 2019 1 次提交
  5. 10 7月, 2019 7 次提交
  6. 09 7月, 2019 2 次提交
  7. 05 7月, 2019 1 次提交
  8. 03 7月, 2019 2 次提交
    • M
      net: stmmac: make "snps,reset-delays-us" optional again · cc5e92c2
      Martin Blumenstingl 提交于
      Commit 760f1dc2 ("net: stmmac: add sanity check to
      device_property_read_u32_array call") introduced error checking of the
      device_property_read_u32_array() call in stmmac_mdio_reset().
      This results in the following error when the "snps,reset-delays-us"
      property is not defined in devicetree:
        invalid property snps,reset-delays-us
      
      This sanity check made sense until commit 84ce4d0f ("net: stmmac:
      initialize the reset delay array") ensured that there are fallback
      values for the reset delay if the "snps,reset-delays-us" property is
      absent. That was at the cost of making that property mandatory though.
      
      Drop the sanity check for device_property_read_u32_array() and thus make
      the "snps,reset-delays-us" property optional again (avoiding the error
      message while loading the stmmac driver with a .dtb where the property
      is absent).
      
      Fixes: 760f1dc2 ("net: stmmac: add sanity check to device_property_read_u32_array call")
      Signed-off-by: NMartin Blumenstingl <martin.blumenstingl@googlemail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cc5e92c2
    • J
      net: stmmac: Re-word Kconfig entry · b432bdb6
      Jose Abreu 提交于
      We support many speeds and it doesn't make much sense to list them all
      in the Kconfig. Let's just call it Multi-Gigabit.
      Suggested-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NJose Abreu <joabreu@synopsys.com>
      Cc: Joao Pinto <jpinto@synopsys.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      Cc: Alexandre Torgue <alexandre.torgue@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b432bdb6
  9. 29 6月, 2019 11 次提交
  10. 27 6月, 2019 2 次提交
  11. 25 6月, 2019 2 次提交
  12. 23 6月, 2019 2 次提交
  13. 20 6月, 2019 1 次提交
    • M
      net: stmmac: initialize the reset delay array · 84ce4d0f
      Martin Blumenstingl 提交于
      Commit ce4ab73a ("net: stmmac: drop the reset delays from struct
      stmmac_mdio_bus_data") moved the reset delay array from struct
      stmmac_mdio_bus_data to a stack variable.
      The values from the array inside struct stmmac_mdio_bus_data were
      previously initialized to 0 because the struct was allocated using
      devm_kzalloc(). The array on the stack has to be initialized
      explicitly, else we might be reading garbage values.
      
      Initialize all reset delays to 0 to ensure that the values are 0 if the
      "snps,reset-delays-us" property is not defined.
      This fixes booting at least two boards (MIPS pistachio marduk and ARM
      sun8i H2+ Orange Pi Zero). These are hanging during boot when
      initializing the stmmac Ethernet controller (as found by Kernel CI).
      Both have in common that they don't define the "snps,reset-delays-us"
      property.
      
      Fixes: ce4ab73a ("net: stmmac: drop the reset delays from struct stmmac_mdio_bus_data")
      Signed-off-by: NMartin Blumenstingl <martin.blumenstingl@googlemail.com>
      Reported-by: N"kernelci.org bot" <bot@kernelci.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      84ce4d0f
  14. 19 6月, 2019 2 次提交
  15. 18 6月, 2019 1 次提交
    • A
      net: stmmac: fix unused-variable warning · c63d1e5c
      Arnd Bergmann 提交于
      When building without CONFIG_OF, we get a harmless build warning:
      
      drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: In function 'stmmac_phy_setup':
      drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:973:22: error: unused variable 'node' [-Werror=unused-variable]
        struct device_node *node = priv->plat->phy_node;
      
      Reword it so we always use the local variable, by making it the
      fwnode pointer instead of the device_node.
      
      Fixes: 74371272 ("net: stmmac: Convert to phylink and remove phylib logic")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c63d1e5c
  16. 17 6月, 2019 1 次提交