1. 13 Jun, 2019 1 commit
  2. 24 May, 2019 2 commits
    • Jose Abreu's avatar
      net: stmmac: Introduce selftests support · 091810db
      Jose Abreu authored
      
      
      We add support for selftests on stmmac driver with 9 basic sanity checks
      for now:
      	- MAC Loopback
      	- PHY Loopback
      	- MMC Counters
      	- EEE
      	- Hash Filter Multicast
      	- Perfect Filter Unicast
      	- Multicast Filter All
      	- Unicast Filter All
      	- Flow Control
      
      This allows for fast tracking of regressions in the driver and helps in
      spotting mis-configuration of HW.
      
      Changes from v1:
      	- Fix build error as module (David)
      	- Check for link status before running tests
      Changes from RFC v2:
      	- Return proper error code in stmmac_test_mmc (Corentin)
      	- Use only 1 MMC counter in stmmac_test_mmc (Alexandre)
      Changes from RFC v1:
      	- Change test_loopback to test_mac_loopback (Andrew)
      	- Change timeout to retries (Andrew)
      	- Add MC/UC filter tests (Andrew)
      	- Only test in offline mode (Andrew)
      	- Do not call phy_loopback twice (Alexandre)
      Signed-off-by: default avatarJose 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>
      Cc: Corentin Labbe <clabbe.montjoie@gmail.com>
      Cc: Andrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      091810db
    • Jose Abreu's avatar
      net: stmmac: Switch MMC functions to HWIF callbacks · 3b1dd2c5
      Jose Abreu authored
      
      
      XGMAC has a different MMC module. Lets use HWIF callbacks for MMC module
      so that correct callbacks are automatically selected.
      Signed-off-by: default avatarJose 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: default avatarDavid S. Miller <davem@davemloft.net>
      3b1dd2c5
  3. 21 May, 2019 1 commit
  4. 19 Feb, 2019 1 commit
    • Jose Abreu's avatar
      net: stmmac: Fix a race in EEE enable callback · 8a7493e5
      Jose Abreu authored
      
      
      We are saving the status of EEE even before we try to enable it. This
      leads to a race with XMIT function that tries to arm EEE timer before we
      set it up.
      
      Fix this by only saving the EEE parameters after all operations are
      performed with success.
      Signed-off-by: default avatarJose Abreu <joabreu@synopsys.com>
      Fixes: d765955d
      
       ("stmmac: add the Energy Efficient Ethernet support")
      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: default avatarDavid S. Miller <davem@davemloft.net>
      8a7493e5
  5. 31 Jan, 2019 1 commit
  6. 11 Nov, 2018 1 commit
  7. 29 May, 2018 1 commit
  8. 16 Apr, 2018 2 commits
  9. 30 Mar, 2018 1 commit
    • Jose Abreu's avatar
      net: stmmac: Add support for DWMAC5 and implement Safety Features · 8bf993a5
      Jose Abreu authored
      
      
      This adds initial suport for DWMAC5 and implements the Automotive Safety
      Package which is available from core version 5.10.
      
      The Automotive Safety Pacakge (also called Safety Features) offers us
      with error protection in the core by implementing ECC Protection in
      memories, on-chip data path parity protection, FSM parity and timeout
      protection and Application/CSR interface timeout protection.
      
      In case of an uncorrectable error we call stmmac_global_err() and
      reconfigure the whole core.
      Signed-off-by: default avatarJose Abreu <joabreu@synopsys.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Joao Pinto <jpinto@synopsys.com>
      Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      Cc: Alexandre Torgue <alexandre.torgue@st.com>
      Cc: Andrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8bf993a5
  10. 24 Jul, 2017 1 commit
  11. 29 Jun, 2017 1 commit
  12. 13 Jun, 2017 1 commit
  13. 15 Mar, 2017 1 commit
  14. 13 Mar, 2017 2 commits
  15. 24 Feb, 2017 1 commit
  16. 15 Feb, 2017 1 commit
  17. 08 Feb, 2017 2 commits
  18. 09 Jan, 2017 1 commit
  19. 08 Dec, 2016 1 commit
    • Niklas Cassel's avatar
      net: stmmac: stmmac_platform: use correct setup function for gmac4 · 7cc99fd2
      Niklas Cassel authored
      
      
      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: default avatarNiklas Cassel <niklas.cassel@axis.com>
      Acked-by: default avatarAlexandre TORGUE <alexandre.torgue@st.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7cc99fd2
  20. 07 Dec, 2016 1 commit
    • Niklas Cassel's avatar
      net: stmmac: do not call phy_ethtool_ksettings_set from atomic context · 90364fea
      Niklas Cassel authored
      
      
      >From what I can tell, spin_lock(&priv->lock) is not needed, since the
      phy_ethtool_ksettings_set call is not given the priv struct.
      
      phy_start_aneg takes the phydev->lock. Calls to phy_adjust_link
      from phy_state_machine also takes the phydev->lock.
      
      [   13.718319] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:97
      [   13.726717] in_atomic(): 1, irqs_disabled(): 0, pid: 1307, name: ethtool
      [   13.742115] Hardware name: Axis ARTPEC-6 Platform
      [   13.746829] [<80110568>] (unwind_backtrace) from [<8010c2bc>] (show_stack+0x18/0x1c)
      [   13.754575] [<8010c2bc>] (show_stack) from [<80433484>] (dump_stack+0x80/0xa0)
      [   13.761801] [<80433484>] (dump_stack) from [<80145428>] (___might_sleep+0x108/0x170)
      [   13.769554] [<80145428>] (___might_sleep) from [<806c9b50>] (mutex_lock+0x24/0x44)
      [   13.777128] [<806c9b50>] (mutex_lock) from [<8050cbc0>] (phy_start_aneg+0x1c/0x13c)
      [   13.784783] [<8050cbc0>] (phy_start_aneg) from [<8050d338>] (phy_ethtool_ksettings_set+0x98/0xd0)
      [   13.793656] [<8050d338>] (phy_ethtool_ksettings_set) from [<80517adc>] (stmmac_ethtool_set_link_ksettings+0xa0/0xb4)
      [   13.804184] [<80517adc>] (stmmac_ethtool_set_link_ksettings) from [<805c5138>] (ethtool_set_settings+0xd4/0x13c)
      [   13.814358] [<805c5138>] (ethtool_set_settings) from [<805c9718>] (dev_ethtool+0x13c4/0x211c)
      [   13.822882] [<805c9718>] (dev_ethtool) from [<805dc7c0>] (dev_ioctl+0x480/0x8e0)
      [   13.830291] [<805dc7c0>] (dev_ioctl) from [<80260e34>] (do_vfs_ioctl+0x94/0xa00)
      [   13.837699] [<80260e34>] (do_vfs_ioctl) from [<802617dc>] (SyS_ioctl+0x3c/0x60)
      [   13.845011] [<802617dc>] (SyS_ioctl) from [<801088bc>] (__sys_trace_return+0x0/0x10)
      Signed-off-by: default avatarNiklas Cassel <niklas.cassel@axis.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      90364fea
  21. 16 Nov, 2016 2 commits
  22. 12 Oct, 2016 2 commits
  23. 28 Jun, 2016 3 commits
  24. 03 Apr, 2016 2 commits
  25. 02 Mar, 2016 2 commits
  26. 01 Dec, 2015 1 commit
  27. 01 Nov, 2015 1 commit
  28. 09 Dec, 2014 1 commit
  29. 30 Aug, 2014 1 commit
  30. 25 Aug, 2014 1 commit