1. 28 2月, 2020 2 次提交
  2. 21 2月, 2020 1 次提交
    • A
      net: macb: Properly handle phylink on at91rm9200 · ac2fcfa9
      Alexandre Belloni 提交于
      at91ether_init was handling the phy mode and speed but since the switch to
      phylink, the NCFGR register got overwritten by macb_mac_config(). The issue
      is that the RM9200_RMII bit and the MACB_CLK_DIV32 field are cleared
      but never restored as they conflict with the PAE, GBE and PCSSEL bits.
      
      Add new capability to differentiate between EMAC and the other versions of
      the IP and use it to set and avoid clearing the relevant bits.
      
      Also, this fixes a NULL pointer dereference in macb_mac_link_up as the EMAC
      doesn't use any rings/bufffers/queues.
      
      Fixes: 7897b071 ("net: macb: convert to phylink")
      Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ac2fcfa9
  3. 17 2月, 2020 1 次提交
  4. 05 2月, 2020 2 次提交
    • H
      net: macb: Limit maximum GEM TX length in TSO · f822e9c4
      Harini Katakam 提交于
      GEM_MAX_TX_LEN currently resolves to 0x3FF8 for any IP version supporting
      TSO with full 14bits of length field in payload descriptor. But an IP
      errata causes false amba_error (bit 6 of ISR) when length in payload
      descriptors is specified above 16387. The error occurs because the DMA
      falsely concludes that there is not enough space in SRAM for incoming
      payload. These errors were observed continuously under stress of large
      packets using iperf on a version where SRAM was 16K for each queue. This
      errata will be documented shortly and affects all versions since TSO
      functionality was added. Hence limit the max length to 0x3FC0 (rounded).
      Signed-off-by: NHarini Katakam <harini.katakam@xilinx.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f822e9c4
    • H
      net: macb: Remove unnecessary alignment check for TSO · 41c1ef97
      Harini Katakam 提交于
      The IP TSO implementation does NOT require the length to be a
      multiple of 8. That is only a requirement for UFO as per IP
      documentation. Hence, exit macb_features_check function in the
      beginning if the protocol is not UDP. Only when it is UDP,
      proceed further to the alignment checks. Update comments to
      reflect the same. Also remove dead code checking for protocol
      TCP when calculating header length.
      
      Fixes: 1629dd4f ("cadence: Add LSO support.")
      Signed-off-by: NHarini Katakam <harini.katakam@xilinx.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      41c1ef97
  5. 14 1月, 2020 1 次提交
  6. 10 1月, 2020 1 次提交
  7. 06 1月, 2020 1 次提交
    • S
      macb: Don't unregister clks unconditionally · d89091a4
      Stephen Boyd 提交于
      The only clk init function in this driver that register a clk is
      fu540_c000_clk_init(), and thus we need to unregister the clk when this
      driver is removed on that platform. Other init functions, for example
      macb_clk_init(), don't register clks and therefore we shouldn't
      unregister the clks when this driver is removed. Convert this
      registration path to devm so it gets auto-unregistered when this driver
      is removed and drop the clk_unregister() calls in driver remove (and
      error paths) so that we don't erroneously remove a clk from the system
      that isn't registered by this driver.
      
      Otherwise we get strange crashes with a use-after-free when the
      devm_clk_get() call in macb_clk_init() calls clk_put() on a clk pointer
      that has become invalid because it is freed in clk_unregister().
      
      Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
      Cc: Yash Shah <yash.shah@sifive.com>
      Reported-by: NGuenter Roeck <linux@roeck-us.net>
      Fixes: c218ad55 ("macb: Add support for SiFive FU540-C000")
      Signed-off-by: NStephen Boyd <sboyd@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d89091a4
  8. 20 12月, 2019 1 次提交
    • A
      net: macb: fix probing of PHY not described in the dt · ef8a2e27
      Antoine Tenart 提交于
      This patch fixes the case where the PHY isn't described in the device
      tree. This is due to the way the MDIO bus is registered in the driver:
      whether the PHY is described in the device tree or not, the bus is
      registered through of_mdiobus_register. The function masks all the PHYs
      and only allow probing the ones described in the device tree. Prior to
      the Phylink conversion this was also done but later on in the driver
      the MDIO bus was manually scanned to circumvent the fact that the PHY
      wasn't described.
      
      This patch fixes it in a proper way, by registering the MDIO bus based
      on if the PHY attached to a given interface is described in the device
      tree or not.
      
      Fixes: 7897b071 ("net: macb: convert to phylink")
      Signed-off-by: NAntoine Tenart <antoine.tenart@bootlin.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ef8a2e27
  9. 29 11月, 2019 1 次提交
  10. 24 11月, 2019 1 次提交
  11. 14 11月, 2019 2 次提交
  12. 05 11月, 2019 1 次提交
    • A
      net: of_get_phy_mode: Change API to solve int/unit warnings · 0c65b2b9
      Andrew Lunn 提交于
      Before this change of_get_phy_mode() returned an enum,
      phy_interface_t. On error, -ENODEV etc, is returned. If the result of
      the function is stored in a variable of type phy_interface_t, and the
      compiler has decided to represent this as an unsigned int, comparision
      with -ENODEV etc, is a signed vs unsigned comparision.
      
      Fix this problem by changing the API. Make the function return an
      error, or 0 on success, and pass a pointer, of type phy_interface_t,
      where the phy mode should be stored.
      
      v2:
      Return with *interface set to PHY_INTERFACE_MODE_NA on error.
      Add error checks to all users of of_get_phy_mode()
      Fixup a few reverse christmas tree errors
      Fixup a few slightly malformed reverse christmas trees
      
      v3:
      Fix 0-day reported errors.
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0c65b2b9
  13. 20 10月, 2019 1 次提交
  14. 25 9月, 2019 1 次提交
  15. 29 8月, 2019 1 次提交
  16. 09 7月, 2019 1 次提交
  17. 25 6月, 2019 2 次提交
  18. 24 6月, 2019 1 次提交
  19. 19 6月, 2019 2 次提交
  20. 23 5月, 2019 1 次提交
  21. 15 5月, 2019 1 次提交
  22. 08 5月, 2019 1 次提交
  23. 06 5月, 2019 1 次提交
  24. 03 5月, 2019 2 次提交
  25. 09 4月, 2019 1 次提交
  26. 22 3月, 2019 1 次提交
  27. 20 3月, 2019 1 次提交
  28. 04 3月, 2019 4 次提交
  29. 15 2月, 2019 1 次提交
  30. 14 2月, 2019 1 次提交
  31. 13 2月, 2019 1 次提交