1. 19 2月, 2014 1 次提交
    • C
      gianfar: Add missing graceful reset steps and fixes · c10650b6
      Claudiu Manoil 提交于
      gfar_halt() and gfar_start() are responsible for stopping
      and starting the DMA and the Rx/Tx hw rings. They implement
      the support for the "graceful Rx/Tx stop/start" hw procedure,
      and also disable/enable eTSEC's hw interrupts in the process.
      
      The GRS/GTS procedure requires however to have the RQUEUE/TQUEUE
      registers cleared first and to wait for a period of time for the
      current frame to pass through the interface (around ~10ms for a
      jumbo frame). Only then may the GTS and GRS bits from DMACTRL be
      set to shut down the DMA, and finally the Tx_EN and Rx_EN bits in
      MACCFG1 may be cleared to disable the Tx/Rx blocks.
      
      The same register programming order applies to start the Rx/Tx:
      enabling the RQUEUE/TQUEUE *before* clearing the GRS/GTS bits.
      
      This is a HW recommendation in order to avoid a possible
      controller "lock up" during graceful reset.
      
      Cleanup the gfar_halt()/start() prototypes, to take priv instead
      of ndev as their purpose is to operate on HW. Enabling the
      RQUEUE/TQUEUE in the hw_init() is not needed anymore since
      that's the job of gfar_start().
      Signed-off-by: NClaudiu Manoil <claudiu.manoil@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c10650b6
  2. 17 1月, 2014 1 次提交
  3. 16 1月, 2014 1 次提交
    • C
      gianfar: Fix portabilty issues for ethtool and ptp · 42851e88
      Claudiu Manoil 提交于
      Fixes unhandled register write in gianfar_ethtool.c.
      Fixes following endianess related functional issues,
      reported by sparse as well, i.e.:
      
      gianfar_ethtool.c:1058:33: warning:
          incorrect type in argument 1 (different base types)
          expected unsigned int [unsigned] [usertype] value
          got restricted __be32 [usertype] ip4src
      
      gianfar_ethtool.c:1164:33: warning:
          restricted __be16 degrades to integer
      
      gianfar_ethtool.c:1669:32: warning:
          invalid assignment: ^=
          left side has type restricted __be16
          right side has type int
      
      Solves all the sparse warnings for mixig normal pointers
      with __iomem pointers for gianfar_ptp.c, i.e.:
      gianfar_ptp.c:163:32: warning:
          incorrect type in argument 1 (different address spaces)
          expected unsigned int [noderef] <asn:2>*addr
          got unsigned int *<noident>
      Signed-off-by: NClaudiu Manoil <claudiu.manoil@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      42851e88
  4. 14 8月, 2013 1 次提交
    • C
      gianfar: Add flow control support · 23402bdd
      Claudiu Manoil 提交于
      eTSEC has Rx and Tx flow control capabilities that may be enabled
      through MACCFG1[Rx_Flow, Tx_Flow] bits.  These bits must not be set
      however when eTSEC is operated in Half-Duplex mode.  Unfortunately,
      the driver currently sets these bits unconditionally.
      This patch adds the proper handling of the PAUSE frame capability
      register bits by implementing the ethtool -A interface.  When pause
      autoneg is enabled, the controller uses the phy's capability to
      negotiate PAUSE frame settings with the link partner and reconfigures
      its Rx_Flow and Tx_Flow settings to match the capabilities of the
      link partner.  If pause autoneg is off, the PAUSE frame generation
      may be forced manually (ethtool -A).  Flow control is disabled by
      default now.
      This implementation is inspired by the tg3 driver.
      Signed-off-by: NLutz Jaenicke <ljaenicke@innominate.com>
      Signed-off-by: NClaudiu Manoil <claudiu.manoil@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      23402bdd
  5. 20 4月, 2013 1 次提交
  6. 15 4月, 2013 1 次提交
  7. 22 3月, 2013 1 次提交
  8. 21 3月, 2013 1 次提交
  9. 13 2月, 2013 2 次提交
    • P
      gianfar: convert u64 status counters to atomic64_t · 212079df
      Paul Gortmaker 提交于
      While looking at some asm dump for an unrelated change, Eric
      noticed in the following stats count increment code:
      
          50b8:       81 3c 01 f8     lwz     r9,504(r28)
          50bc:       81 5c 01 fc     lwz     r10,508(r28)
          50c0:       31 4a 00 01     addic   r10,r10,1
          50c4:       7d 29 01 94     addze   r9,r9
          50c8:       91 3c 01 f8     stw     r9,504(r28)
          50cc:       91 5c 01 fc     stw     r10,508(r28)
      
      that a 64 bit counter was used on ppc-32 without sync
      and hence the "ethtool -S" output was racy.
      
      Here we convert all the values to use atomic64_t so that
      the output will always be consistent.
      Reported-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      212079df
    • P
      gianfar: remove largely unused gfar_stats struct · 68719786
      Paul Gortmaker 提交于
      The gfar_stats struct is only used in copying out data
      via ethtool.  It is declared as the extra stats, followed
      by the rmon stats.  However, the rmon stats are never
      actually ever used in the driver; instead the rmon data
      is a u32 register read that is cast directly into the
      ethtool buf.
      
      It seems the only reason rmon is in the struct at all is
      to give the offset(s) at which it should be exported into
      the ethtool buffer.  But note gfar_stats doesn't contain
      a gfar_extra_stats as a substruct -- instead it contains
      a u64 array of equal element count.  This implicitly means
      we have two independent declarations of what gfar_extra_stats
      really is.  Rather than have this duality, we already have
      defines which give us the offset directly, and hence do not
      need the struct at all.
      
      Further, since we know the extra_stats is unconditionally
      always present, we can write it out to the ethtool buf
      1st, and then optionally write out the rmon data.  There
      is no need for two independent loops, both of which are
      simply copying out the extra_stats to buf offset zero.
      
      This also helps pave the way towards allowing the extra
      stats fields to be converted to atomic64_t values, without
      having their types directly influencing the ethtool stats
      export code (gfar_fill_stats) that expects to deal with u64.
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      68719786
  10. 05 2月, 2013 1 次提交
  11. 07 1月, 2013 1 次提交
  12. 22 9月, 2012 1 次提交
  13. 06 6月, 2012 1 次提交
  14. 06 4月, 2012 1 次提交
  15. 04 4月, 2012 1 次提交
  16. 16 3月, 2012 1 次提交
  17. 31 1月, 2012 1 次提交
  18. 05 1月, 2012 1 次提交
  19. 22 11月, 2011 1 次提交
  20. 17 11月, 2011 1 次提交
  21. 17 9月, 2011 2 次提交
  22. 12 8月, 2011 1 次提交
    • J
      freescale: Move the Freescale drivers · ec21e2ec
      Jeff Kirsher 提交于
      Move the Freescale drivers into drivers/net/ethernet/freescale/ and
      make the necessary Kconfig and Makefile changes.
      
      CC: Sandeep Gopalpet <sandeep.kumar@freescale.com>
      CC: Andy Fleming <afleming@freescale.com>
      CC: Shlomi Gridish <gridish@freescale.com>
      CC: Li Yang <leoli@freescale.com>
      CC: Pantelis Antoniou <pantelis.antoniou@gmail.com>
      CC: Vitaly Bordug <vbordug@ru.mvista.com>
      CC: Dan Malek <dmalek@jlc.net>
      CC: Sylvain Munaut <tnt@246tNt.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      ec21e2ec
  23. 22 7月, 2011 1 次提交
  24. 07 7月, 2011 1 次提交
  25. 21 6月, 2011 1 次提交
    • S
      gianfar v5: implement nfc · 4aa3a715
      Sebastian Poehn 提交于
      This patch adds all missing functionalities for nfc except GRXFH. There is so much code because hardware has not a TCAM.
      Further hardware rule space is very limited. So I had to extensively use
      optimization features. Both reasons lead to the necessity to hold all
      online flows in a linked-list.
      
      Change-log:
      # Some suggestions by Joe Perches applied (thanks!)
      # Shorted some logs
      # Use memcmp() for comparing
      Signed-off-by: NSebastian Poehn <sebastian.poehn@belden.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4aa3a715
  26. 17 6月, 2011 1 次提交
  27. 09 6月, 2011 1 次提交
  28. 16 4月, 2011 1 次提交
  29. 12 4月, 2011 1 次提交
  30. 13 11月, 2010 1 次提交
  31. 18 10月, 2010 1 次提交
  32. 27 9月, 2010 1 次提交
  33. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  34. 03 11月, 2009 5 次提交