Skip to content
Snippets Groups Projects
  1. Jun 20, 2011
  2. Jun 17, 2011
  3. Jun 10, 2011
  4. May 18, 2011
    • Grant Likely's avatar
      drivercore: revert addition of of_match to struct device · b1608d69
      Grant Likely authored
      
      Commit b826291c, "drivercore/dt: add a match table pointer to struct
      device" added an of_match pointer to struct device to cache the
      of_match_table entry discovered at driver match time.  This was unsafe
      because matching is not an atomic operation with probing a driver.  If
      two or more drivers are attempted to be matched to a driver at the
      same time, then the cached matching entry pointer could get
      overwritten.
      
      This patch reverts the of_match cache pointer and reworks all users to
      call of_match_device() directly instead.
      
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      b1608d69
  5. Apr 21, 2011
    • Andrea Galbusera's avatar
      powerpc: Fix multicast problem in fs_enet driver · e2a85aec
      Andrea Galbusera authored
      
      mac-fec.c was setting individual UDP address registers instead of multicast
      group address registers when joining a multicast group.
      This prevented from correctly receiving UDP multicast packets.
      According to datasheet, replaced hash_table_high and hash_table_low
      with grp_hash_table_high and grp_hash_table_low respectively.
      Also renamed hash_table_* with grp_hash_table_* in struct fec declaration
      for 8xx: these registers are used only for multicast there.
      
      Tested on a MPC5121 based board.
      Build tested also against mpc866_ads_defconfig.
      
      Signed-off-by: default avatarAndrea Galbusera <gizero@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e2a85aec
  6. Apr 10, 2011
  7. Feb 28, 2011
  8. Oct 31, 2010
  9. Sep 06, 2010
    • Julia Lawall's avatar
      drivers/net/fs_enet/fs_enet-main.c: Add of_node_put to avoid memory leak · e8f7f43a
      Julia Lawall authored
      In this case, a device_node structure is stored in another structure that
      is then freed without first decrementing the reference count of the
      device_node structure.
      
      The semantic match that finds this problem is as follows:
      (http://coccinelle.lip6.fr/
      
      )
      
      // <smpl>
      @r exists@
      expression x;
      identifier f;
      position p1,p2;
      @@
      
      x@p1->f = \(of_find_node_by_path\|of_find_node_by_name\|of_find_node_by_phandle\|of_get_parent\|of_get_next_parent\|of_get_next_child\|of_find_compatible_node\|of_match_node\|of_find_node_by_type\|of_find_node_with_property\|of_find_matching_node\|of_parse_phandle\|of_node_get\)(...);
      ... when != of_node_put(x)
      kfree@p2(x)
      
      @script:python@
      p1 << r.p1;
      p2 << r.p2;
      @@
      cocci.print_main("call",p1)
      cocci.print_secs("free",p2)
      // </smpl>
      
      Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
      Acked-by: default avatarWolfram Sang <w.sang@pengutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e8f7f43a
  10. Aug 06, 2010
  11. Jul 18, 2010
  12. Jun 02, 2010
  13. May 29, 2010
    • Mark Ware's avatar
      fs_enet: Adjust BDs after tx error · 32f6249b
      Mark Ware authored
      
      This patch fixes an occasional transmit lockup in the mac-fcc which
      occurs after a tx error.  The test scenario had the local port set
      to autoneg and the other end fixed at 100FD, resulting in a large
      number of late collisions.
      
      According to the MPC8280RM 30.10.1.3 (also 8272RM 29.10.1.3), after
      a tx error occurs, TBPTR may sometimes point beyond BDs still marked
      as ready.  This patch walks back through the BDs and points TBPTR to
      the earliest one marked as ready.
      
      Tested on a custom board with a MPC8280.
      
      Signed-off-by: default avatarMark Ware <mware@elphinstone.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      32f6249b
  14. May 22, 2010
    • Grant Likely's avatar
      of: Remove duplicate fields from of_platform_driver · 4018294b
      Grant Likely authored
      
      .name, .match_table and .owner are duplicated in both of_platform_driver
      and device_driver.  This patch is a removes the extra copies from struct
      of_platform_driver and converts all users to the device_driver members.
      
      This patch is a pretty mechanical change.  The usage model doesn't change
      and if any drivers have been missed, or if anything has been fixed up
      incorrectly, then it will fail with a compile time error, and the fixup
      will be trivial.  This patch looks big and scary because it touches so
      many files, but it should be pretty safe.
      
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      Acked-by: default avatarSean MacLennan <smaclennan@pikatech.com>
      4018294b
  15. May 18, 2010
  16. May 10, 2010
  17. 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
  18. 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
  19. Feb 27, 2010
  20. Feb 22, 2010
  21. Feb 12, 2010
  22. Oct 14, 2009
  23. Jul 22, 2009
  24. Jul 17, 2009
  25. Apr 28, 2009
  26. Apr 27, 2009
  27. Apr 13, 2009
  28. Apr 11, 2009
  29. Jan 21, 2009
  30. Jan 14, 2009
  31. Dec 22, 2008
  32. Nov 03, 2008
  33. Oct 27, 2008
  34. Oct 08, 2008
  35. Sep 24, 2008
  36. Aug 27, 2008
  37. Aug 07, 2008
Loading