1. 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
  2. 25 5月, 2014 1 次提交
  3. 14 5月, 2014 1 次提交
  4. 27 3月, 2013 5 次提交
  5. 07 1月, 2013 1 次提交
  6. 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
  7. 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
  8. 04 4月, 2012 1 次提交
  9. 16 2月, 2012 1 次提交
  10. 06 1月, 2012 1 次提交
  11. 17 11月, 2011 2 次提交
  12. 28 10月, 2011 1 次提交
    • G
      stmmac: update normal descriptor structure (v2) · 3c20f72f
      Giuseppe CAVALLARO 提交于
      This patch updates the normal descriptor structure
      to work fine on new GMAC Synopsys chips.
      
      Normal descriptors were designed on the old MAC10/100
      databook 1.91 where some bits were reserved: for example
      the tx checksum insertion and rx checksum offload.
      
      The patch maintains the back-compatibility with old
      MAC devices (tested on STx7109 MAC10/100) and adds new
      fields that actually new GMAC devices can use.
      
      For example, STx7109 (MAC10/100) will pass from the platform
        tx_coe = 0, enh_desc = 0, has_gmac = 0.
      A platform like Loongson1B (GMAC) will pass:
        tx_coe = 1, enh_desc = 0, has_gmac = 1.
      
      Thanks to Kelvin, he enhanced the normal descriptors for
      GMAC (on MIPS Loongson1B platform).
      Signed-off-by: NKelvin Cheung <keguang.zhang@gmail.com>
      Signed-off-by: NGiuseppe Cavallaro <peppe.cavallaro@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3c20f72f
  13. 20 10月, 2011 1 次提交
  14. 16 9月, 2011 2 次提交
  15. 12 8月, 2011 1 次提交
  16. 22 6月, 2011 1 次提交
    • A
      net: remove mm.h inclusion from netdevice.h · b7f080cf
      Alexey Dobriyan 提交于
      Remove linux/mm.h inclusion from netdevice.h -- it's unused (I've checked manually).
      
      To prevent mm.h inclusion via other channels also extract "enum dma_data_direction"
      definition into separate header. This tiny piece is what gluing netdevice.h with mm.h
      via "netdevice.h => dmaengine.h => dma-mapping.h => scatterlist.h => mm.h".
      Removal of mm.h from scatterlist.h was tried and was found not feasible
      on most archs, so the link was cutoff earlier.
      
      Hope people are OK with tiny include file.
      
      Note, that mm_types.h is still dragged in, but it is a separate story.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b7f080cf
  17. 07 6月, 2011 1 次提交
  18. 14 5月, 2011 2 次提交
  19. 30 4月, 2011 1 次提交
    • D
      ethtool: Call ethtool's get/set_settings callbacks with cleaned data · 8ae6daca
      David Decotigny 提交于
      This makes sure that when a driver calls the ethtool's
      get/set_settings() callback of another driver, the data passed to it
      is clean. This guarantees that speed_hi will be zeroed correctly if
      the called callback doesn't explicitely set it: we are sure we don't
      get a corrupted speed from the underlying driver. We also take care of
      setting the cmd field appropriately (ETHTOOL_GSET/SSET).
      
      This applies to dev_ethtool_get_settings(), which now makes sure it
      sets up that ethtool command parameter correctly before passing it to
      drivers. This also means that whoever calls dev_ethtool_get_settings()
      does not have to clean the ethtool command parameter. This function
      also becomes an exported symbol instead of an inline.
      
      All drivers visible to make allyesconfig under x86_64 have been
      updated.
      Signed-off-by: NDavid Decotigny <decot@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8ae6daca
  20. 14 4月, 2011 1 次提交
  21. 11 4月, 2011 1 次提交
  22. 07 12月, 2010 1 次提交
  23. 25 11月, 2010 1 次提交
  24. 18 10月, 2010 1 次提交
  25. 17 10月, 2010 1 次提交
  26. 25 9月, 2010 1 次提交
  27. 18 9月, 2010 1 次提交
    • G
      stmmac: consolidate and tidy-up the COE support · ebbb293f
      Giuseppe CAVALLARO 提交于
      The first version of the driver had hard-coded the logic
      for handling the checksum offloading.
      This was designed according to the chips included in
      the STM platforms where:
      o MAC10/100 supports no COE at all.
      o GMAC fully supports RX/TX COE.
      
      This is not good for other chip configurations where,
      for example, the mac10/100 supports the tx csum in HW
      or when the GMAC has no IPC.
      
      Thanks to Johannes Stezenbach; he provided me a first
      draft of this patch that only reviewed the IPC for the
      GMAC devices.
      
      This patch also helps on SPEAr platforms where the
      MAC10/100 can perform the TX csum in HW.
      Thanks to Deepak SIKRI for his support on this.
      
      In the end, GMAC devices for STM platforms have
      a bugged Jumbo frame support that needs to have
      the Tx COE disabled for oversized frames (due to
      limited buffer sizes). This information is also
      passed through the driver's platform structure.
      Signed-off-by: NGiuseppe Cavallaro <peppe.cavallaro@st.com>
      Signed-off-by: NJohannes Stezenbach <js@sig21.net>
      Signed-off-by: NDeepak SIKRI <deepak.sikri@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ebbb293f
  28. 26 8月, 2010 1 次提交
  29. 14 5月, 2010 1 次提交
    • J
      drivers/net: Remove unnecessary returns from void function()s · a4b77097
      Joe Perches 提交于
      This patch removes from drivers/net/ all the unnecessary
      return; statements that precede the last closing brace of
      void functions.
      
      It does not remove the returns that are immediately
      preceded by a label as gcc doesn't like that.
      
      It also does not remove null void functions with return.
      
      Done via:
      $ grep -rP --include=*.[ch] -l "return;\n}" net/ | \
        xargs perl -i -e 'local $/ ; while (<>) { s/\n[ \t\n]+return;\n}/\n}/g; print; }'
      
      with some cleanups by hand.
      
      Compile tested x86 allmodconfig only.
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a4b77097
  30. 05 2月, 2010 1 次提交
  31. 08 1月, 2010 1 次提交