Skip to content
Snippets Groups Projects
  1. Jul 03, 2011
  2. Jun 06, 2011
  3. Dec 12, 2010
    • Tejun Heo's avatar
      drivers/net: don't use flush_scheduled_work() · 23f333a2
      Tejun Heo authored
      
      flush_scheduled_work() is on its way out.  This patch contains simple
      conversions to replace flush_scheduled_work() usage with direct
      cancels and flushes.
      
      Directly cancel the used works on driver detach and flush them in
      other cases.
      
      The conversions are mostly straight forward and the only dangers are,
      
      * Forgetting to cancel/flush one or more used works.
      
      * Cancelling when a work should be flushed (ie. the work must be
        executed once scheduled whether the driver is detaching or not).
      
      I've gone over the changes multiple times but it would be much
      appreciated if you can review with the above points in mind.
      
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jay Cliburn <jcliburn@gmail.com>
      Cc: Michael Chan <mchan@broadcom.com>
      Cc: Divy Le Ray <divy@chelsio.com>
      Cc: e1000-devel@lists.sourceforge.net
      Cc: Vasanthy Kolluri <vkolluri@cisco.com>
      Cc: Samuel Ortiz <samuel@sortiz.org>
      Cc: Lennert Buytenhek <buytenh@wantstofly.org>
      Cc: Andrew Gallatin <gallatin@myri.com>
      Cc: Francois Romieu <romieu@fr.zoreil.com>
      Cc: Ramkrishna Vepa <ramkrishna.vepa@exar.com>
      Cc: Matt Carlson <mcarlson@broadcom.com>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      Cc: Shreyas Bhatewara <sbhatewara@vmware.com>
      Cc: netdev@vger.kernel.org
      23f333a2
  4. Jun 11, 2010
  5. Jun 07, 2010
  6. May 31, 2010
  7. May 10, 2010
  8. Apr 19, 2010
  9. Apr 03, 2010
    • Jiri Pirko's avatar
      net: convert multicast list to list_head · 22bedad3
      Jiri Pirko authored
      
      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: default avatarJiri Pirko <jpirko@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      22bedad3
  10. Mar 30, 2010
    • Tejun Heo's avatar
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo authored
      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: default avatarTejun Heo <tj@kernel.org>
      Guess-its-ok-by: default avatarChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  11. Feb 17, 2010
  12. Feb 05, 2010
  13. Jan 08, 2010
  14. Jan 07, 2010
    • Márton Németh's avatar
      8139too: make PCI device ids constant · d160439e
      Márton Németh authored
      The id_table field of the struct pci_driver is constant in <linux/pci.h>
      so it is worth to make pci_device_id also constant.
      
      The semantic match that finds this kind of pattern is as follows:
      (http://coccinelle.lip6.fr/
      
      )
      
      // <smpl>
      @r@
      identifier I1, I2, x;
      @@
      	struct I1 {
      	  ...
      	  const struct I2 *x;
      	  ...
      	};
      @s@
      identifier r.I1, y;
      identifier r.x, E;
      @@
      	struct I1 y = {
      	  .x = E,
      	};
      @c@
      identifier r.I2;
      identifier s.E;
      @@
      	const struct I2 E[] = ... ;
      @depends on !c@
      identifier r.I2;
      identifier s.E;
      @@
      +	const
      	struct I2 E[] = ...;
      // </smpl>
      
      Signed-off-by: default avatarMárton Németh <nm127@freemail.hu>
      Cc: Julia Lawall <julia@diku.dk>
      Cc: cocci@diku.dk
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d160439e
  15. Dec 03, 2009
  16. Oct 13, 2009
  17. Sep 01, 2009
  18. Jul 12, 2009
  19. Jul 05, 2009
  20. May 26, 2009
  21. Apr 22, 2009
    • Jianjun kong's avatar
      8139too: fix HW initial flow · 3f9738f7
      Jianjun kong authored
      
      While ifconfig eth0 up kernel calls open() of 8139 driver(8139too.c).
      In rtl8139_hw_start() of rtl8139_open(), 8139 driver enable RX before
      setting up the DMA buffer address. In this interval where RX was
      enabled and DMA buffer address is not yet set up, any incoming
      broadcast packet would be send to a strange physical address:
      0x003e8800 which is the default value of DMA buffer address.
      Unfortunately, this address is used by Linux kernel. So kernel panics.
      This patch fix it by setting up DMA buffer address before RX enabled
      and everything is fine even under broadcast packets attack.
      
      Signed-off-by: default avatarJonathan Lin <jon.lin@vatics.com>
      Signed-off-by: default avatarAmos Kong <jianjun@zeuux.org>
      Signed-off-by: default avatarEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3f9738f7
  22. Apr 21, 2009
  23. Mar 13, 2009
  24. Jan 21, 2009
  25. Jan 11, 2009
  26. Dec 22, 2008
  27. Nov 24, 2008
  28. Nov 20, 2008
  29. Nov 19, 2008
  30. Nov 03, 2008
  31. Oct 27, 2008
  32. Oct 22, 2008
    • Stephen Hemminger's avatar
      8139x: reduce message severity on driver overlap · de4549ca
      Stephen Hemminger authored
      
      The 8139 drivers are a source of error messages that confuse users.
      
      Since this device can not be disambiguated by normal PCI device
      id's two drivers match the same info. But the module utilities
      seem to correctly handle this overlap, they try one driver, then
      if that doesn't load try the other. Therefore there is no need for
      a message to be logged with error level severity, just using info
      level instead. Can't be completely silent because user might have
      configure one driver and forgot the other one.
      
      Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      de4549ca
  33. Oct 08, 2008
  34. Sep 24, 2008
    • Mats Erik Andersson's avatar
      8139too: [cosmetic] fix incorrect register for flash-rom · da8de392
      Mats Erik Andersson authored
      
      I would like to submit a correction to the driver
      
           drivers/net/8139too.c,
      
      which in no way changes the compiled driver, but does change
      the value of a previously incorrect value for the configuration
      register address of Flash PROM on the network processor rtl8139C.
      This corrected value is in accordance with the datasheet
      for rtl8139C, and in addition this new value is indeed used
      in other functional drivers that use this adapter for
      programming a Flash memory chip in situ. But as said,
      the two new constants are never referenced in the driver
      maintained by you: they are only informational and correct!
      
      Mats Erik Andersson, meand@users.sourceforge.net
      
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      da8de392
  35. Sep 03, 2008
  36. Jul 22, 2008
  37. Jun 28, 2008
    • Jeff Garzik's avatar
      [netdrvr] kill sync_irq-before-freq_irq pattern · be0976be
      Jeff Garzik authored
      
      synchronize_irq() is superfluous when free_irq() call immediately follows it,
      because free_irq() also does a synchronize_irq() call of its own.
      
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      be0976be
    • Márton Németh's avatar
      8139too: some style cleanups · a9879c4f
      Márton Németh authored
      
      Clean up the following errors and warnings reported by checkpatch.pl:
       + ERROR: Macros with complex values should be enclosed in parenthesis
       + WARNING: __func__ should be used instead of gcc specific __FUNCTION__
       + WARNING: plain inline is preferred over __inline__
       + WARNING: Use #include <linux/io.h> instead of <asm/io.h>
       + WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
      
      The changes were verified with by comparing the "objdump -d 8139too.ko"
      output which is exactly the same for the old and new version in case of
      config CONFIG_8139TOO=m, CONFIG_8139TOO_PIO=n, CONFIG_8139TOO_TUNE_TWISTER=n,
      CONFIG_8139TOO_8129=n, CONFIG_8139_OLD_RX_RESET=n.
      Software versions used: gcc 4.2.3, objdump 2.18.0.20080103, on elf32-i386.
      
      Signed-off-by: default avatarMárton Németh <nm127@freemail.hu>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      a9879c4f
Loading