1. 30 Dec, 2011 5 commits
    • HeungJun Kim's avatar
      [media] m5mols: Extend the busy wait helper · 575d6252
      HeungJun Kim authored
      Make m5mols_busy_wait function jiffies based rather than relying
      on some fixed number of I2C read iterations while busy waiting
      for the device to execute a request. With fixed number of iterations
      we may be getting different wait times, depending on the I2C speed.
      
      In some conditions we have to wait even if the I2C communications
      fails, in those cases M5MOLS_I2C_RDY_WAIT_MASK should be passed
      as the mask argument to m5mols_busy_wait().
      Signed-off-by: default avatarHeungJun Kim <riverful.kim@samsung.com>
      Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
      Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      575d6252
    • Sylwester Nawrocki's avatar
      [media] m5mols: Simplify the I2C registers definition · 69eb1803
      Sylwester Nawrocki authored
      The redundant definitions of the m5mols I2C register addresses within
      the pages (categories) are removed. In place of symbolic definitions
      plain numbers are used which simplifies the code and eases identifying
      the registers in the documentation.
      
      Also make the m5mols_busy() function accept I2C_REG() value as a register
      address, like all other functions, rather than using the category and
      command values.
      Acked-by: default avatarHeungJun Kim <riverful.kim@samsung.com>
      Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
      Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      69eb1803
    • Sylwester Nawrocki's avatar
      [media] s5p-fimc: Add support for alpha component configuration · dafb9c70
      Sylwester Nawrocki authored
      On Exynos SoCs the FIMC IP allows to configure globally the alpha
      component of all pixels for V4L2_PIX_FMT_RGB32, V4L2_PIX_FMT_RGB555
      and V4L2_PIX_FMT_RGB444 image formats. This patch adds a v4l2 control
      in order to let the applications control the alpha component value.
      
      The alpha value range depends on the pixel format, for RGB32 it's
      0..255 (8-bits), for RGB555 - 0..1 (1-bit) and for RGB444 - 0..15
      (4-bits). The v4l2 control range is always 0..255 and the alpha
      component data width is determined by currently set format on the
      V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE buffer queue. The applications
      need to match the alpha channel value range and the pixel format
      since the driver will clamp the alpha component. Depending on
      fourcc the valid alpha bits are:
      
       - V4L2_PIX_FMT_RGB555  [0]
       - V4L2_PIX_FMT_RGB444  [3:0]
       - V4L2_PIX_FMT_RGB32   [7:0]
      
      When switching to a pixel format with smaller alpha component width
      the currently set alpha value will be clamped to maximum value valid
      for current format. When switching to a format with wider alpha the
      alpha value remains unchanged.
      
      The variant description data structure is extended with a new entry
      so an additional control is created only where really supported by
      the hardware.
      
      V4L2_PIX_FMT_RGB555 and V4L2_PIX_FMT_RGB444 formats are only valid
      for V4L2_BUF_TYPE_VIDEO_CAPTURE buffer queue.
      Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
      Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      dafb9c70
    • Sylwester Nawrocki's avatar
      [media] v4l: Add new alpha component control · cc1d3272
      Sylwester Nawrocki authored
      The V4L2_CID_ALPHA_COMPONENT control is intended for the video capture
      or memory-to-memory devices that are capable of setting up the per-pixel
      alpha component to some arbitrary value. It allows to set the alpha
      component for all pixels to an arbitrary value.
      Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
      Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
      Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      cc1d3272
    • Mauro Carvalho Chehab's avatar
      Merge tag 'v3.2-rc7' into staging/for_v3.3 · b4d48c94
      Mauro Carvalho Chehab authored
      Linux 3.2-rc7
      
      * tag 'v3.2-rc7': (1304 commits)
        Linux 3.2-rc7
        netfilter: xt_connbytes: handle negation correctly
        Btrfs: call d_instantiate after all ops are setup
        Btrfs: fix worker lock misuse in find_worker
        net: relax rcvbuf limits
        rps: fix insufficient bounds checking in store_rps_dev_flow_table_cnt()
        net: introduce DST_NOPEER dst flag
        mqprio: Avoid panic if no options are provided
        bridge: provide a mtu() method for fake_dst_ops
        md/bitmap: It is OK to clear bits during recovery.
        md: don't give up looking for spares on first failure-to-add
        md/raid5: ensure correct assessment of drives during degraded reshape.
        md/linear: fix hot-add of devices to linear arrays.
        sparc64: Fix MSIQ HV call ordering in pci_sun4v_msiq_build_irq().
        pata_of_platform: Add missing CONFIG_OF_IRQ dependency.
        ipv4: using prefetch requires including prefetch.h
        VFS: Fix race between CPU hotplug and lglocks
        vfs: __read_cache_page should use gfp argument rather than GFP_KERNEL
        USB: Fix usb/isp1760 build on sparc
        net: Add a flow_cache_flush_deferred function
        ...
      
      Conflicts:
      	drivers/media/common/tuners/tda18218.c
      	drivers/media/video/omap3isp/ispccdc.c
      	drivers/staging/media/as102/as102_drv.h
      b4d48c94
  2. 24 Dec, 2011 3 commits
  3. 23 Dec, 2011 14 commits
  4. 22 Dec, 2011 15 commits
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://neil.brown.name/md · ad1fca20
      Linus Torvalds authored
      * 'for-linus' of git://neil.brown.name/md:
        md/bitmap: It is OK to clear bits during recovery.
        md: don't give up looking for spares on first failure-to-add
        md/raid5: ensure correct assessment of drives during degraded reshape.
        md/linear: fix hot-add of devices to linear arrays.
      ad1fca20
    • NeilBrown's avatar
      md/bitmap: It is OK to clear bits during recovery. · 961902c0
      NeilBrown authored
      commit d0a4bb49 introduced a
      regression which is annoying but fairly harmless.
      
      When writing to an array that is undergoing recovery (a spare
      in being integrated into the array), writing to the array will
      set bits in the bitmap, but they will not be cleared when the
      write completes.
      
      For bits covering areas that have not been recovered yet this is not a
      problem as the recovery will clear the bits.  However bits set in
      already-recovered region will stay set and never be cleared.
      This doesn't risk data integrity.  The only negatives are:
       - next time there is a crash, more resyncing than necessary will
         be done.
       - the bitmap doesn't look clean, which is confusing.
      
      While an array is recovering we don't want to update the
      'events_cleared' setting in the bitmap but we do still want to clear
      bits that have very recently been set - providing they were written to
      the recovering device.
      
      So split those two needs - which previously both depended on 'success'
      and always clear the bit of the write went to all devices.
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      961902c0
    • NeilBrown's avatar
      md: don't give up looking for spares on first failure-to-add · 60fc1370
      NeilBrown authored
      Before performing a recovery we try to remove any spares that
      might not be working, then add any that might have become relevant.
      
      Currently we abort on the first spare that cannot be added.
      This is a false optimisation.
      It is conceivable that - depending on rules in the personality - a
      subsequent spare might be accepted.
      Also the loop does other things like count the available spares and
      reset the 'recovery_offset' value.
      
      If we abort early these might not happen properly.
      
      So remove the early abort.
      
      In particular if you have an array what is undergoing recovery and
      which has extra spares, then the recovery may not restart after as
      reboot as the could of 'spares' might end up as zero.
      Reported-by: default avatarAnssi Hannula <anssi.hannula@iki.fi>
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      60fc1370
    • NeilBrown's avatar
      md/raid5: ensure correct assessment of drives during degraded reshape. · 30d7a483
      NeilBrown authored
      While reshaping a degraded array (as when reshaping a RAID0 by first
      converting it to a degraded RAID4) we currently get confused about
      which devices are in_sync.  In most cases we get it right, but in the
      region that is being reshaped we need to treat non-failed devices as
      in-sync when we have the data but haven't actually written it out yet.
      Reported-by: default avatarAdam Kwolek <adam.kwolek@intel.com>
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      30d7a483
    • NeilBrown's avatar
      md/linear: fix hot-add of devices to linear arrays. · 09cd9270
      NeilBrown authored
      commit d70ed2e4
      broke hot-add to a linear array.
      After that commit, metadata if not written to devices until they
      have been fully integrated into the array as determined by
      saved_raid_disk.  That patch arranged to clear that field after
      a recovery completed.
      
      However for linear arrays, there is no recovery - the integration is
      instantaneous.  So we need to explicitly clear the saved_raid_disk
      field.
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      09cd9270
    • David S. Miller's avatar
      sparc64: Fix MSIQ HV call ordering in pci_sun4v_msiq_build_irq(). · 7cc85833
      David S. Miller authored
      This silently was working for many years and stopped working on
      Niagara-T3 machines.
      
      We need to set the MSIQ to VALID before we can set it's state to IDLE.
      
      On Niagara-T3, setting the state to IDLE first was causing HV_EINVAL
      errors.  The hypervisor documentation says, rather ambiguously, that
      the MSIQ must be "initialized" before one can set the state.
      
      I previously understood this to mean merely that a successful setconf()
      operation has been performed on the MSIQ, which we have done at this
      point.  But it seems to also mean that it has been set VALID too.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7cc85833
    • Linus Torvalds's avatar
      Merge branch 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · b3b1b70e
      Linus Torvalds authored
      * 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        USB: Fix usb/isp1760 build on sparc
        usb: gadget: epautoconf: do not change number of streams
        usb: dwc3: core: fix cached revision on our structure
        usb: musb: fix reset issue with full speed device
      b3b1b70e
    • Linus Torvalds's avatar
      Merge branch 'upstream-linus' of git://github.com/jgarzik/libata-dev · abe8809c
      Linus Torvalds authored
      * 'upstream-linus' of git://github.com/jgarzik/libata-dev:
        pata_of_platform: Add missing CONFIG_OF_IRQ dependency.
      abe8809c
    • David Miller's avatar
    • Stephen Rothwell's avatar
    • Srivatsa S. Bhat's avatar
      VFS: Fix race between CPU hotplug and lglocks · e30e2fdf
      Srivatsa S. Bhat authored
      Currently, the *_global_[un]lock_online() routines are not at all synchronized
      with CPU hotplug. Soft-lockups detected as a consequence of this race was
      reported earlier at https://lkml.org/lkml/2011/8/24/185. (Thanks to Cong Meng
      for finding out that the root-cause of this issue is the race condition
      between br_write_[un]lock() and CPU hotplug, which results in the lock states
      getting messed up).
      
      Fixing this race by just adding {get,put}_online_cpus() at appropriate places
      in *_global_[un]lock_online() is not a good option, because, then suddenly
      br_write_[un]lock() would become blocking, whereas they have been kept as
      non-blocking all this time, and we would want to keep them that way.
      
      So, overall, we want to ensure 3 things:
      1. br_write_lock() and br_write_unlock() must remain as non-blocking.
      2. The corresponding lock and unlock of the per-cpu spinlocks must not happen
         for different sets of CPUs.
      3. Either prevent any new CPU online operation in between this lock-unlock, or
         ensure that the newly onlined CPU does not proceed with its corresponding
         per-cpu spinlock unlocked.
      
      To achieve all this:
      (a) We introduce a new spinlock that is taken by the *_global_lock_online()
          routine and released by the *_global_unlock_online() routine.
      (b) We register a callback for CPU hotplug notifications, and this callback
          takes the same spinlock as above.
      (c) We maintain a bitmap which is close to the cpu_online_mask, and once it is
          initialized in the lock_init() code, all future updates to it are done in
          the callback, under the above spinlock.
      (d) The above bitmap is used (instead of cpu_online_mask) while locking and
          unlocking the per-cpu locks.
      
      The callback takes the spinlock upon the CPU_UP_PREPARE event. So, if the
      br_write_lock-unlock sequence is in progress, the callback keeps spinning,
      thus preventing the CPU online operation till the lock-unlock sequence is
      complete. This takes care of requirement (3).
      
      The bitmap that we maintain remains unmodified throughout the lock-unlock
      sequence, since all updates to it are managed by the callback, which takes
      the same spinlock as the one taken by the lock code and released only by the
      unlock routine. Combining this with (d) above, satisfies requirement (2).
      
      Overall, since we use a spinlock (mentioned in (a)) to prevent CPU hotplug
      operations from racing with br_write_lock-unlock, requirement (1) is also
      taken care of.
      
      By the way, it is to be noted that a CPU offline operation can actually run
      in parallel with our lock-unlock sequence, because our callback doesn't react
      to notifications earlier than CPU_DEAD (in order to maintain our bitmap
      properly). And this means, since we use our own bitmap (which is stale, on
      purpose) during the lock-unlock sequence, we could end up unlocking the
      per-cpu lock of an offline CPU (because we had locked it earlier, when the
      CPU was online), in order to satisfy requirement (2). But this is harmless,
      though it looks a bit awkward.
      Debugged-by: default avatarCong Meng <mc@linux.vnet.ibm.com>
      Signed-off-by: default avatarSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Cc: stable@vger.kernel.org
      e30e2fdf
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · ecefc36b
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
        net: Add a flow_cache_flush_deferred function
        ipv4: reintroduce route cache garbage collector
        net: have ipconfig not wait if no dev is available
        sctp: Do not account for sizeof(struct sk_buff) in estimated rwnd
        asix: new device id
        davinci-cpdma: fix locking issue in cpdma_chan_stop
        sctp: fix incorrect overflow check on autoclose
        r8169: fix Config2 MSIEnable bit setting.
        llc: llc_cmsg_rcv was getting called after sk_eat_skb.
        net: bpf_jit: fix an off-one bug in x86_64 cond jump target
        iwlwifi: update SCD BC table for all SCD queues
        Revert "Bluetooth: Revert: Fix L2CAP connection establishment"
        Bluetooth: Clear RFCOMM session timer when disconnecting last channel
        Bluetooth: Prevent uninitialized data access in L2CAP configuration
        iwlwifi: allow to switch to HT40 if not associated
        iwlwifi: tx_sync only on PAN context
        mwifiex: avoid double list_del in command cancel path
        ath9k: fix max phy rate at rate control init
        nfc: signedness bug in __nci_request()
        iwlwifi: do not set the sequence control bit is not needed
      ecefc36b
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · d5ed5e48
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: atmel/ac97c: using software reset instead hardware reset if not available
      d5ed5e48
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6 · 0703c680
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
        mfd: Include linux/io.h to jz4740-adc
        mfd: Use request_threaded_irq for twl4030-irq instead of irq_set_chained_handler
        mfd: Base interrupt for twl4030-irq must be one-shot
        mfd: Handle tps65910 clear-mask correctly
        mfd: add #ifdef CONFIG_DEBUG_FS guard for ab8500_debug_resources
        mfd: Fix twl-core oops while calling twl_i2c_* for unbound driver
        mfd: include linux/module.h for ab5500-debugfs
        mfd: Update wm8994 active device checks for WM1811
        mfd: Set tps6586x bits if new value is different from the old one
        mfd: Set da903x bits if new value is different from the old one
        mfd: Set adp5520 bits if new value is different from the old one
        mfd: Add missed free_irq in da903x_remove
      0703c680
    • Dave Kleikamp's avatar
      vfs: __read_cache_page should use gfp argument rather than GFP_KERNEL · e6f67b8c
      Dave Kleikamp authored
      lockdep reports a deadlock in jfs because a special inode's rw semaphore
      is taken recursively.  The mapping's gfp mask is GFP_NOFS, but is not
      used when __read_cache_page() calls add_to_page_cache_lru().
      Signed-off-by: default avatarDave Kleikamp <dave.kleikamp@oracle.com>
      Acked-by: default avatarHugh Dickins <hughd@google.com>
      Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Cc: stable@kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e6f67b8c
  5. 21 Dec, 2011 3 commits