1. 21 2月, 2018 1 次提交
    • N
      net: stmmac: add error handling in stmmac_mtl_setup() · 2ee2132f
      Niklas Cassel 提交于
      The device tree binding for stmmac says:
      
      - Multiple TX Queues parameters: below the list of all the parameters to
                                       configure the multiple TX queues:
              - snps,tx-queues-to-use: number of TX queues to be used in the driver
      	[...]
              - For each TX queue
      		[...]
      
      However, if one specifies snps,tx-queues-to-use = 2,
      but omits the queue subnodes, or defines just one queue subnode,
      since the driver appears to initialize queues with sane default
      values, we will get tx queue timeouts.
      
      This is because the initialization code only initializes
      as many queues as it finds subnodes. Potentially leaving
      some queues uninitialized.
      
      To avoid hard to debug issues, return an error if the number
      of subnodes differ from snps,tx-queues-to-use/snps,rx-queues-to-use.
      Signed-off-by: NNiklas Cassel <niklas.cassel@axis.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2ee2132f
  2. 03 11月, 2017 1 次提交
  3. 27 10月, 2017 2 次提交
  4. 22 9月, 2017 1 次提交
  5. 21 6月, 2017 1 次提交
  6. 02 6月, 2017 1 次提交
  7. 23 3月, 2017 1 次提交
  8. 22 3月, 2017 2 次提交
  9. 13 3月, 2017 4 次提交
  10. 10 3月, 2017 1 次提交
  11. 09 2月, 2017 2 次提交
  12. 03 2月, 2017 1 次提交
  13. 18 1月, 2017 1 次提交
    • J
      stmmac: add missing of_node_put · a249708b
      Julia Lawall 提交于
      The function stmmac_dt_phy provides several possibilities for initializing
      plat->mdio_node, all of which have the effect of increasing the reference
      count of the assigned value.  This field is not updated elsewhere, so the
      value is live until the end of the lifetime of plat (devm_allocated), just
      after the end of stmmac_remove_config_dt.  Thus, add an of_node_put on
      plat->mdio_node in stmmac_remove_config_dt.  It is possible that the field
      mdio_node is never initialized, but of_node_put is NULL-safe, so it is also
      safe to call of_node_put in that case.
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Acked-by: NAlexandre TORGUE <alexandre.torgue@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a249708b
  14. 16 1月, 2017 1 次提交
  15. 10 1月, 2017 3 次提交
  16. 03 1月, 2017 1 次提交
  17. 09 12月, 2016 4 次提交
    • N
      net: smmac: allow configuring lower pbl values · 4022d039
      Niklas Cassel 提交于
      The driver currently always sets the PBLx8/PBLx4 bit, which means that
      the pbl values configured via the pbl/txpbl/rxpbl DT properties are
      always multiplied by 8/4 in the hardware.
      
      In order to allow the DT to configure lower pbl values, while at the
      same time not changing behavior of any existing device trees using the
      pbl/txpbl/rxpbl settings, add a property to disable the multiplication
      of the pbl by 8/4 in the hardware.
      Suggested-by: NRabin Vincent <rabinv@axis.com>
      Signed-off-by: NNiklas Cassel <niklas.cassel@axis.com>
      Acked-by: NAlexandre Torgue <alexandre.torgue@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4022d039
    • N
      net: stmmac: add support for independent DMA pbl for tx/rx · 89caaa2d
      Niklas Cassel 提交于
      GMAC and newer supports independent programmable burst lengths for
      DMA tx/rx. Add new optional devicetree properties representing this.
      
      To be backwards compatible, snps,pbl will still be valid, but
      snps,txpbl/snps,rxpbl will override the value in snps,pbl if set.
      
      If the IP is synthesized to use the AXI interface, there is a register
      and a matching DT property inside the optional stmmac-axi-config DT node
      for controlling burst lengths, named snps,blen.
      However, using this register, it is not possible to control tx and rx
      independently. Also, this register is not available if the IP was
      synthesized with, e.g., the AHB interface.
      Signed-off-by: NNiklas Cassel <niklas.cassel@axis.com>
      Acked-by: NAlexandre Torgue <alexandre.torgue@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      89caaa2d
    • N
      net: stmmac: stmmac_platform: fix parsing of DT binding · a332e2fa
      Niklas Cassel 提交于
      commit 64c3b252 ("net: stmmac: fixed the pbl setting with DT")
      changed the parsing of the DT binding.
      
      Before 64c3b252, snps,fixed-burst and snps,mixed-burst were parsed
      regardless if the property snps,pbl existed or not.
      After the commit, fixed burst and mixed burst are only parsed if
      snps,pbl exists. Now when snps,aal has been added, it too is only
      parsed if snps,pbl exists.
      
      Since the DT binding does not specify that fixed burst, mixed burst
      or aal depend on snps,pbl being specified, undo changes introduced
      by 64c3b252.
      
      The issue commit 64c3b252 ("net: stmmac: fixed the pbl setting with
      DT") tries to address is solved in another way:
      The databook specifies that all values other than
      1, 2, 4, 8, 16, or 32 results in undefined behavior,
      so snps,pbl = <0> is invalid.
      
      If pbl is 0 after parsing, set pbl to DEFAULT_DMA_PBL.
      This handles the case where the property is omitted, and also handles
      the case where the property is specified without any data.
      Signed-off-by: NNiklas Cassel <niklas.cassel@axis.com>
      Acked-by: NAlexandre Torgue <alexandre.torgue@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a332e2fa
    • N
      net: stmmac: stmmac_platform: use correct setup function for gmac4 · 7cc99fd2
      Niklas Cassel 提交于
      devicetree binding for stmmac states:
      - compatible: Should be "snps,dwmac-<ip_version>", "snps,dwmac"
      	For backwards compatibility: "st,spear600-gmac" is also supported.
      
      Previously, when specifying "snps,dwmac-4.10a", "snps,dwmac" as your
      compatible string, plat_stmmacenet_data would have both has_gmac and
      has_gmac4 set.
      
      This would lead to stmmac_hw_init calling dwmac1000_setup rather than
      dwmac4_setup, resulting in a non-functional driver.
      This happened since the check for has_gmac is done before the check for
      has_gmac4. However, the order should not matter, so it does not make sense
      to have both set.
      
      If something is valid for both, you should do as the stmmac_interrupt does:
      if (priv->plat->has_gmac || priv->plat->has_gmac4) ...
      
      The places where it was obvious that the author actually meant
      if (has_gmac || has_gmac4) rather than if (has_gmac) has been updated.
      Signed-off-by: NNiklas Cassel <niklas.cassel@axis.com>
      Acked-by: NAlexandre TORGUE <alexandre.torgue@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7cc99fd2
  18. 06 12月, 2016 1 次提交
  19. 02 12月, 2016 2 次提交
  20. 10 11月, 2016 1 次提交
  21. 02 9月, 2016 1 次提交
  22. 02 8月, 2016 1 次提交
  23. 28 6月, 2016 1 次提交
  24. 17 6月, 2016 1 次提交
  25. 04 5月, 2016 1 次提交
  26. 03 4月, 2016 1 次提交
  27. 02 4月, 2016 2 次提交