1. 16 3月, 2017 1 次提交
  2. 13 3月, 2017 2 次提交
  3. 25 2月, 2017 1 次提交
  4. 16 2月, 2017 1 次提交
  5. 09 2月, 2017 2 次提交
  6. 10 1月, 2017 1 次提交
  7. 09 12月, 2016 1 次提交
    • 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
  8. 08 12月, 2016 1 次提交
    • N
      net: stmmac: do not call phy_ethtool_ksettings_set from atomic context · 90364fea
      Niklas Cassel 提交于
      >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: NNiklas Cassel <niklas.cassel@axis.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      90364fea
  9. 17 11月, 2016 1 次提交
  10. 16 11月, 2016 1 次提交
  11. 12 10月, 2016 2 次提交
  12. 28 6月, 2016 3 次提交
  13. 03 4月, 2016 2 次提交
  14. 03 3月, 2016 2 次提交
  15. 02 12月, 2015 1 次提交
  16. 02 11月, 2015 1 次提交
  17. 10 12月, 2014 1 次提交
  18. 30 8月, 2014 1 次提交
  19. 26 8月, 2014 1 次提交
  20. 01 8月, 2014 1 次提交
  21. 03 6月, 2014 1 次提交
    • E
      stmmac: Remove spin_lock call in stmmac_get_pauseparam() · 86c92ee3
      Emil Goode 提交于
      The following patch removed unnecessary spin_lock/unlock calls
      in ethtool_ops callback functions. In the second and final version
      of the patch one spin_lock call was left behind.
      
      commit cab6715c
      Author: Yang Wei <Wei.Yang@windriver.com>
      Date:   Sun May 25 09:53:44 2014 +0800
      
          net: driver: stmicro: Remove some useless the lock protection
      
      This introduced the following sparse warning:
      
      drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c:424:1: warning:
      	context imbalance in 'stmmac_get_pauseparam' -
      	different lock contexts for basic block
      Signed-off-by: NEmil Goode <emilgoode@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      86c92ee3
  22. 25 5月, 2014 1 次提交
  23. 14 5月, 2014 1 次提交
  24. 27 3月, 2013 5 次提交
  25. 07 1月, 2013 1 次提交
  26. 27 11月, 2012 3 次提交
    • G
      stmmac: get/set coalesce parameters via ethtool · 48f44da4
      Giuseppe CAVALLARO 提交于
      This patch is to get/set the tx/rx coalesce parameters
      via ethtool interface.
      
      Tests have been done on several platform with different GMAC chips w/o and w/
      RX watchdog feature.
      
      V2: reject coalesce settings that are not supported.
      Signed-off-by: NGiuseppe Cavallaro <peppe.cavallaro@st.com>
      Reviewed-by: NBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      48f44da4
    • G
      stmmac: add Rx watchdog support to mitigate the DMA irqs · 62a2ab93
      Giuseppe CAVALLARO 提交于
      GMAC devices newer than databook 3.40 has an embedded timer
      that can be used for mitigating the number of interrupts.
      So this patch adds this optimizations.
      
      At any rate, the Rx watchdog can be disable (on bugged HW) by
      passing from the platform the riwt_off field.
      
      In this implementation the rx timer stored in the Reg9 is fixed
      to the max value. This will be tuned by using ethtool.
      
      V2: added a platform parameter to force to disable the rx-watchdog
      for example on new core where it is bugged.
      
      V3: do not disable NAPI when Rx watchdog is used.
      
      V4: a new extra statistic field has been added to show the early
      receive status in the interrupt handler.
      This patch also adds an extra check to avoid to call
      napi_schedule when the DMA_INTR_ENA_RIE bit is disabled in the
      Interrupt Mask register.
      Signed-off-by: NGiuseppe Cavallaro <peppe.cavallaro@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      62a2ab93
    • G
      stmmac: add the initial tx coalesce schema · 9125cdd1
      Giuseppe CAVALLARO 提交于
      This patch adds a new schema used for mitigating the
      number of transmit interrupts.
      It is based on a SW timer and a threshold value.
      The timer is used to periodically call the stmmac_tx_clean
      function; the threshold is used for setting the IC (Interrupt
      on Completion bit). The ISR will then invoke the poll method.
      Also the patch improves some ethtool stat fields.
      
      V2: review the logic to manage the IC bit in the TDESC
      that was bugged because it didn't take care about the
      fragments. Also fix the tx_count_frames that has not to be
      limited to TX DMA ring. Thanks to Ben Hutchings.
      
      V3: removed the spin_lock irqsave/restore as D. Miller suggested.
      Signed-off-by: NGiuseppe Cavallaro <peppe.cavallaro@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9125cdd1
  27. 01 7月, 2012 1 次提交
    • G
      stmmac: add the Energy Efficient Ethernet support · d765955d
      Giuseppe CAVALLARO 提交于
      This patch adds the Energy Efficient Ethernet support to the stmmac.
      
      Please see the driver's documentation for further details about this support
      in the driver.
      
      Thanks also goes to Rayagond Kokatanur for his first implementation.
      
      Note:
       to clearly manage and expose the lpi interrupt status and eee ethtool
       stats I've had to do some modifications to the driver's design and I
       found really useful to move other parts of the code (e.g. mmc irq stat)
       in the main directly. So this means that some core has been reworked
       to introduce the EEE.
      
      v1: initial patch
      v2: fixed some sparse issues (typos)
      v3: erroneously sent the v2 renamed as v3
      v4:
      	o Fixed the return value of the stmmac_eee_init as suggested by D.Miller
      	o Totally reviewed the ethtool support for EEE
      	o Added a new internal parameter to tune the SW timer for TX LPI.
      v5: do not change any eee setting in case of the stmmac_ethtool_op_set_eee fails
          (it has to return -EOPNOTSUPP in that case).
      Signed-off-by: NGiuseppe Cavallaro <peppe.cavallaro@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d765955d