1. 14 May, 2006 5 commits
    • David Woodhouse's avatar
      [JFFS2] Reduce excessive node count for syslog files. · cf5eba53
      David Woodhouse authored
      We currently get fairly poor behaviour with files which get many short
      writes, such as system logs. This is because we end up with many tiny
      data nodes, and the rbtree gets massive. None of these nodes are
      actually obsolete, so they are counted as 'clean' space. Eraseblocks can
      be entirely full of these nodes (which are REF_NORMAL instead of
      REF_PRISTINE), and still they count entirely towards 'used_size' and the
      eraseblocks can sit on the clean_list for a long time without being
      picked for GC.
      
      One way to alleviate this in the long term is to account REF_NORMAL
      space separately from REF_PRISTINE space, rather than counting them both
      towards used_size. Then these eraseblocks can be picked for GC and the
      offending nodes will be garbage collected.
      
      The short-term fix, though -- which probably makes sense even if we do
      eventually implement the above -- is to merge these nodes as they're
      written. When we write the last byte in a page, write the _whole_ page.
      This obsoletes the earlier nodes in the page _immediately_ and we don't
      even need to wait for the garbage collection to do it.
      
      Original implementation from Ferenc Havasi <havasi@inf.u-szeged.hu>
      Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
      cf5eba53
    • David Woodhouse's avatar
    • David Woodhouse's avatar
      [MTD] Deal correctly with NOR chips which are smaller than the map window · 0f5ae3d2
      David Woodhouse authored
      We used to calculate the number of chips to be zero, allocate an array
      of that size, then nasty things would happen when we attempt to access
      the first object in that zero-sized array.
      
      Now, if the number of _full_ chips that would fit into the map is zero,
      we allocate an array of one anyway, and then artificially reduce the
      total size of the resulting MTD device to fit in the map.
      Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
      0f5ae3d2
    • Jesper Juhl's avatar
      mtd: fix memory leak in block2mtd_setup() · a6550e57
      Jesper Juhl authored
      There's a mem leak in drivers/mtd/devices/block2mtd.c::block2mtd_setup()
      
      We can leak 'name' allocated with kmalloc in 'parse_name' if leave via
      the 'parse_err' macro since it contains a return but doesn't do any
      freeing.
      
      Spotted by coverity checker as bug 615.
      Signed-off-by: default avatarJesper Juhl <jesper.juhl@gmail.com>
      Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
      a6550e57
    • David Woodhouse's avatar
      [MTD] Fix module refcounting in NAND board drivers. · 552d9205
      David Woodhouse authored
      The _board_ driver needs to be mtd->owner, and it in turn pins the
      nand.ko module. Fix them all to actually do that, and fix nand.ko not to
      overwrite it -- and also to check that the caller sets it, if the caller
      is a module.
      Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
      552d9205
  2. 13 May, 2006 5 commits
  3. 12 May, 2006 13 commits
  4. 11 May, 2006 1 commit
  5. 10 May, 2006 1 commit
  6. 08 May, 2006 5 commits
  7. 07 May, 2006 1 commit
    • Lennert Buytenhek's avatar
      [MTD] Convert physmap to platform driver · 73566edf
      Lennert Buytenhek authored
      After dwmw2 let me know it ought to be done, I rewrote the physmap map
      driver to be a platform driver.  I know zilch about the driver model,
      so I probably botched it in some way, but I've done some tests on an
      ixp23xx board which uses physmap, and it all seems to work.
      
      In order to not break existing physmap users, I've added some compat
      code that will instantiate a platform device iff CONFIG_MTD_PHYSMAP_LEN
      is defined and != 0.  Also, I've changed the default value for
      CONFIG_MTD_PHYSMAP_LEN to zero, so that people who inadvertently
      compile in physmap (or new, platform-style, users of physmap) don't get
      burned.
      
      This works pretty well -- the new physmap driver is a drop-in replacement
      for the old one, and works on said ixp23xx board without any code changes
      needed.  (This should hold as long as users don't touch 'physmap_map'
      directly.)
      
      Once all physmap users have been converted to instantiate their own
      platform devices, the compat code can go.  (Or we decide that we can
      change all the in-tree users at the same time, and never merge the
      compat code.)
      Signed-off-by: default avatarLennert Buytenhek <buytenh@wantstofly.org>
      Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
      73566edf
  8. 05 May, 2006 1 commit
  9. 03 May, 2006 3 commits
  10. 02 May, 2006 5 commits
    • Ayaz Abdulla's avatar
      forcedeth: fix multi irq issues · ebf34c9b
      Ayaz Abdulla authored
      This patch fixes the issues with multiple irqs.
      
      I am resending based on feedback. I decoupled the dma mask for
      consistent memory and fixed leak with multiple irq in error path.
      
      Thanks to Manfred for catching the spin lock problem.
      Signed-Off-By: default avatarAyaz Abdulla <aabdulla@nvidia.com>
      ebf34c9b
    • Craig Brind's avatar
      [PATCH] via-rhine: zero pad short packets on Rhine I ethernet cards · 3e0d167a
      Craig Brind authored
      Fixes Rhine I cards disclosing fragments of previously transmitted frames
      in new transmissions.
      
      Before transmission, any socket buffer (skb) shorter than the ethernet
      minimum length of 60 bytes was zero-padded.  On Rhine I cards the data can
      later be copied into an aligned transmission buffer without copying this
      padding.  This resulted in the transmission of the frame with the extra
      bytes beyond the provided content leaking the previous contents of this
      buffer on to the network.
      
      Now zero-padding is repeated in the local aligned buffer if one is used.
      
      Following a suggestion from the via-rhine maintainer, no attempt is made
      here to avoid the duplicated effort of padding the skb if it is known that
      an aligned buffer will definitely be used.  This is to make the change
      "obviously correct" and allow it to be applied to a stable kernel if
      necessary.  There is no change to the flow of control and the changes are
      only to the Rhine I code path.
      
      The patch has run on an in-service Rhine-I host without incident.  Frames
      shorter than 60 bytes are now correctly zero-padded when captured on a
      separate host.  I see no unusual stats reported by ifconfig, and no unusual
      log messages.
      Signed-off-by: default avatarCraig Brind <craigbrind@gmail.com>
      Signed-off-by: default avatarRoger Luethi <rl@hellgate.ch>
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      3e0d167a
    • Olaf Hering's avatar
      [PATCH] mv643xx_eth: provide sysfs class device symlink · b0b8dab2
      Olaf Hering authored
      On Sat, Mar 11, Olaf Hering wrote:
      > Why is the /sys/class/net/eth0/device symlink not created for the
      > mv643xx_eth driver? Does this work for other platform device drivers?
      > Seems to work for the ps2 keyboard at least.
      
      The SET_NETDEV_DEV has to be done before a call to register_netdev.  With
      the new patch below, the device symlink for the platform device was
      created.  Unfortunately, after the 4 ls commands, the network connection
      died.  No idea if the box crashed or if something else broke, lost remote
      access.
      
      Provide sysfs 'device' in /class/net/ethN Also, set module owner field,
      like pcnet32 driver does.
      Signed-off-by: default avatarOlaf Hering <olh@suse.de>
      Acked-by: default avatarDale Farnsworth <dale@farnsworth.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      b0b8dab2
    • Jens Axboe's avatar
      [PATCH] vmsplice: restrict stealing a little more · 330ab716
      Jens Axboe authored
      Apply the same rules as the anon pipe pages, only allow stealing
      if no one else is using the page.
      Signed-off-by: default avatarJens Axboe <axboe@suse.de>
      330ab716
    • Jens Axboe's avatar
      [PATCH] splice: fix page LRU accounting · a893b99b
      Jens Axboe authored
      Currently we rely on the PIPE_BUF_FLAG_LRU flag being set correctly
      to know whether we need to fiddle with page LRU state after stealing it,
      however for some origins we just don't know if the page is on the LRU
      list or not.
      
      So remove PIPE_BUF_FLAG_LRU and do this check/add manually in pipe_to_file()
      instead.
      Signed-off-by: default avatarJens Axboe <axboe@suse.de>
      a893b99b