1. 19 8月, 2010 1 次提交
  2. 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
  3. 10 5月, 2010 1 次提交
  4. 04 4月, 2010 1 次提交
    • J
      net: convert multicast list to list_head · 22bedad3
      Jiri Pirko 提交于
      Converts the list and the core manipulating with it to be the same as uc_list.
      
      +uses two functions for adding/removing mc address (normal and "global"
       variant) instead of a function parameter.
      +removes dev_mcast.c completely.
      +exposes netdev_hw_addr_list_* macros along with __hw_addr_* functions for
       manipulation with lists on a sandbox (used in bonding and 80211 drivers)
      Signed-off-by: NJiri Pirko <jpirko@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      22bedad3
  5. 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
  6. 19 2月, 2010 1 次提交
  7. 13 2月, 2010 1 次提交
  8. 09 2月, 2010 1 次提交
  9. 08 1月, 2010 1 次提交
  10. 17 11月, 2009 1 次提交
  11. 05 11月, 2009 1 次提交
  12. 12 10月, 2009 1 次提交
  13. 04 9月, 2009 1 次提交
  14. 01 9月, 2009 1 次提交
  15. 07 4月, 2009 2 次提交
  16. 20 3月, 2009 1 次提交
  17. 04 3月, 2009 1 次提交
  18. 20 2月, 2009 1 次提交
  19. 07 2月, 2009 1 次提交
    • I
      sungem: Soft lockup in sungem on Netra AC200 when switching interface up · 71822faa
      Ilkka Virta 提交于
      From: Ilkka Virta <itvirta@iki.fi>
      
      In the lockup situation the driver seems to go off in an eternal storm
      of interrupts right after calling request_irq(). It doesn't actually
      do anything interesting in the interrupt handler. Since connecting the link
      afterwards works, something later in initialization must fix this.
      
      Looking at gem_do_start() and gem_open(), it seems that the only thing
      done while opening the device after the request_irq(), is a call to
      napi_enable().
      
      I don't know what the ordering requirements are for the
      initialization, but I boldly tried to move the napi_enable() call
      inside gem_do_start() before the link state is checked and interrupts
      subsequently enabled, and it seems to work for me. Doesn't even break
      anything too obvious...
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      71822faa
  20. 03 2月, 2009 1 次提交
  21. 22 1月, 2009 1 次提交
  22. 08 1月, 2009 1 次提交
  23. 23 12月, 2008 1 次提交
  24. 10 12月, 2008 1 次提交
    • H
      sungem: improve ethtool output with internal pcs and serdes · fbf0229e
      Hermann Lauer 提交于
      From: Hermann Lauer <Hermann.Lauer@iwr.uni-heidelberg.de>
      
      Attached is a patch which improves the output of ethtool (see below)
      to some sensefull values with a sungem fibre card which uses the
      sungem interal pcs connected to a serdes chip. The seriallink case in
      the driver is untouched.
      
      Most values are hardcoded, because gigabit fibre autoneg is anyways
      limited and the driver don't really support much at the moment with
      that hardware.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fbf0229e
  25. 09 12月, 2008 1 次提交
    • D
      sungem: Make PCS PHY support partially work again. · 8c83f80b
      David S. Miller 提交于
      As reported by Hermann Lauer, PCS PHY support in the sungem
      driver simply doesn't work.
      
      When the chip is reset due to open, or some other similar operation,
      the PCS is reset too but we don't program it back into a running
      state.  The result is no link when the device is brought up.
      
      This partially rectifies the situation for the moment, by kicking
      the PCS after a sungem chip reset so that it will renegotiate and
      be re-enabled again.
      
      The behavior is still a little bit dodgy as the added renegotiate
      make the link take some time after bringing the interface up,
      but this is a significant improvement in that things actually work
      now :-)
      
      Based almost entirely upon an initial patch by Hermann.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8c83f80b
  26. 26 11月, 2008 1 次提交
  27. 13 11月, 2008 1 次提交
    • W
      netdevice: safe convert to netdev_priv() #part-3 · 8f15ea42
      Wang Chen 提交于
      We have some reasons to kill netdev->priv:
      1. netdev->priv is equal to netdev_priv().
      2. netdev_priv() wraps the calculation of netdev->priv's offset, obviously
         netdev_priv() is more flexible than netdev->priv.
      But we cann't kill netdev->priv, because so many drivers reference to it
      directly.
      
      This patch is a safe convert for netdev->priv to netdev_priv(netdev).
      Since all of the netdev->priv is only for read.
      But it is too big to be sent in one mail.
      I split it to 4 parts and make every part smaller than 100,000 bytes,
      which is max size allowed by vger.
      Signed-off-by: NWang Chen <wangchen@cn.fujitsu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8f15ea42
  28. 04 11月, 2008 1 次提交
  29. 28 10月, 2008 1 次提交
  30. 23 3月, 2008 1 次提交
    • D
      [SUNGEM]: Fix NAPI assertion failure. · da990a24
      David S. Miller 提交于
      As reported by Johannes Berg:
      
      I started getting this warning with recent kernels:
      
      [  773.908927] ------------[ cut here ]------------
      [  773.908954] Badness at net/core/dev.c:2204
       ...
      
      If we loop more than once in gem_poll(), we'll
      use more than the real budget in our gem_rx()
      calls, thus eventually trigger the caller's
      assertions in net_rx_action().
      
      Subtract "work_done" from "budget" for the second
      arg to gem_rx() to fix the bug.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      da990a24
  31. 29 1月, 2008 2 次提交
  32. 29 11月, 2007 1 次提交
  33. 13 11月, 2007 1 次提交
  34. 11 10月, 2007 3 次提交
    • J
      [NET]: Introduce and use print_mac() and DECLARE_MAC_BUF() · 0795af57
      Joe Perches 提交于
      This is nicer than the MAC_FMT stuff.
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0795af57
    • R
      [NET]: Nuke SET_MODULE_OWNER macro. · 10d024c1
      Ralf Baechle 提交于
      It's been a useless no-op for long enough in 2.6 so I figured it's time to
      remove it.  The number of people that could object because they're
      maintaining unified 2.4 and 2.6 drivers is probably rather small.
      
      [ Handled drivers added by netdev tree and some missed IRDA cases... -DaveM ]
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      10d024c1
    • S
      [NET]: Make NAPI polling independent of struct net_device objects. · bea3348e
      Stephen Hemminger 提交于
      Several devices have multiple independant RX queues per net
      device, and some have a single interrupt doorbell for several
      queues.
      
      In either case, it's easier to support layouts like that if the
      structure representing the poll is independant from the net
      device itself.
      
      The signature of the ->poll() call back goes from:
      
      	int foo_poll(struct net_device *dev, int *budget)
      
      to
      
      	int foo_poll(struct napi_struct *napi, int budget)
      
      The caller is returned the number of RX packets processed (or
      the number of "NAPI credits" consumed if you want to get
      abstract).  The callee no longer messes around bumping
      dev->quota, *budget, etc. because that is all handled in the
      caller upon return.
      
      The napi_struct is to be embedded in the device driver private data
      structures.
      
      Furthermore, it is the driver's responsibility to disable all NAPI
      instances in it's ->stop() device close handler.  Since the
      napi_struct is privatized into the driver's private data structures,
      only the driver knows how to get at all of the napi_struct instances
      it may have per-device.
      
      With lots of help and suggestions from Rusty Russell, Roland Dreier,
      Michael Chan, Jeff Garzik, and Jamal Hadi Salim.
      
      Bug fixes from Thomas Graf, Roland Dreier, Peter Zijlstra,
      Joseph Fannin, Scott Wood, Hans J. Koch, and Michael Chan.
      
      [ Ported to current tree and all drivers converted.  Integrated
        Stephen's follow-on kerneldoc additions, and restored poll_list
        handling to the old style to fix mutual exclusion issues.  -DaveM ]
      Signed-off-by: NStephen Hemminger <shemminger@linux-foundation.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bea3348e
  35. 02 5月, 2007 1 次提交
  36. 26 4月, 2007 1 次提交