1. 24 Jan, 2015 2 commits
    • Linus Torvalds's avatar
      Merge tag 'media/v3.19-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · af469b37
      Linus Torvalds authored
      Pull media fixes from Mauro Carvalho Chehab:
        - fix some race conditions caused by a regression on videobuf2
        - fix a interrupt release bug on cx23885
        - fix support for Mygica T230 and HVR4400
        - fix compilation breakage when USB is not selected on tlg2300
        - fix capabilities report on ompa3isp, soc-camera, rcar_vin and
          pvrusb2
      
      * tag 'media/v3.19-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
        [media] omap3isp: Correctly set QUERYCAP capabilities
        [media] cx23885: fix free interrupt bug
        [media] pvrusb2: fix missing device_caps in querycap
        [media] vb2: fix vb2_thread_stop race conditions
        [media] rcar_vin: Update device_caps and capabilities in querycap
        [media] soc-camera: fix device capabilities in multiple camera host drivers
        [media] Fix Mygica T230 support
        [media] cx23885: Split Hauppauge WinTV Starburst from HVR4400 card entry
        [media] tlg2300: Fix media dependencies
      af469b37
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · c4e00f1d
      Linus Torvalds authored
      Pull btrfs fixes from Chris Mason:
       "We have a few fixes in my for-linus branch.
      
        Qu Wenruo's batch fix a regression between some our merge window pull
        and the inode_cache feature.  The rest are smaller bugs"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
        btrfs: Don't call btrfs_start_transaction() on frozen fs to avoid deadlock.
        btrfs: Fix the bug that fs_info->pending_changes is never cleared.
        btrfs: fix state->private cast on 32 bit machines
        Btrfs: fix race deleting block group from space_info->ro_bgs list
        Btrfs: fix incorrect freeing in scrub_stripe
        btrfs: sync ioctl, handle errors after transaction start
      c4e00f1d
  2. 23 Jan, 2015 12 commits
  3. 22 Jan, 2015 8 commits
  4. 21 Jan, 2015 16 commits
    • Sakari Ailus's avatar
      [media] omap3isp: Correctly set QUERYCAP capabilities · 2c0108e1
      Sakari Ailus authored
      device_caps in struct v4l2_capability were inadequately set in
      VIDIOC_QUERYCAP. Fix this. Without this a WARN_ON in the v4l2 core
      is triggered. This WARN_ON was added for kernel 3.19 exactly to
      detect these situations.
      Signed-off-by: default avatarSakari Ailus <sakari.ailus@iki.fi>
      Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
      2c0108e1
    • Hans Verkuil's avatar
      [media] cx23885: fix free interrupt bug · 8d4d9329
      Hans Verkuil authored
      First free the interrupt, then disable the PCI device. The other way
      around will lead to this warning:
      
      Jan 19 11:42:02 telek kernel: [ 1440.161234] WARNING: CPU: 0 PID: 2191 at kernel/irq/manage.c:1311 __free_irq+0x97/0x1f0()
      Jan 19 11:42:02 telek kernel: [ 1440.161236] Trying to free already-free IRQ 0
      Jan 19 11:42:02 telek kernel: [ 1440.161237] Modules linked in: tda8290 tda10048 cx25840 cx23885(-) altera_ci tda18271 altera_stapl videobuf2_dvb tveeprom cx2341x videobuf2_dma_sg dvb_core rc_core videobuf2_memops videobuf2_core v4l2_common videodev media nouveau x86_pkg_temp_thermal cfbfillrect cfbimgblt cfbcopyarea ttm drm_kms_helper processor button isci
      Jan 19 11:42:02 telek kernel: [ 1440.161266] CPU: 0 PID: 2191 Comm: rmmod Tainted: G        W      3.19.0-rc1-telek #345
      Jan 19 11:42:02 telek kernel: [ 1440.161268] Hardware name: ASUSTeK COMPUTER INC. Z9PE-D8 WS/Z9PE-D8 WS, BIOS 5404 02/10/2014
      Jan 19 11:42:02 telek kernel: [ 1440.161270]  ffffffff81bf1fce ffff8808958b7cc8 ffffffff8194a97f 0000000000000000
      Jan 19 11:42:02 telek kernel: [ 1440.161274]  ffff8808958b7d18 ffff8808958b7d08 ffffffff810c56b0 0000000000000286
      Jan 19 11:42:02 telek kernel: [ 1440.161279]  0000000000000000 0000000000000000 ffff88089f808890 ffff88089f808800
      Jan 19 11:42:02 telek kernel: [ 1440.161284] Call Trace:
      Jan 19 11:42:02 telek kernel: [ 1440.161290]  [<ffffffff8194a97f>] dump_stack+0x4f/0x7b
      Jan 19 11:42:02 telek kernel: [ 1440.161295]  [<ffffffff810c56b0>] warn_slowpath_common+0x80/0xc0
      Jan 19 11:42:02 telek kernel: [ 1440.161299]  [<ffffffff810c5731>] warn_slowpath_fmt+0x41/0x50
      Jan 19 11:42:02 telek kernel: [ 1440.161303]  [<ffffffff81955d36>] ? _raw_spin_lock_irqsave+0x56/0x70
      Jan 19 11:42:02 telek kernel: [ 1440.161307]  [<ffffffff81114849>] ? __free_irq+0x49/0x1f0
      Jan 19 11:42:02 telek kernel: [ 1440.161311]  [<ffffffff81114897>] __free_irq+0x97/0x1f0
      Jan 19 11:42:02 telek kernel: [ 1440.161316]  [<ffffffff81114a88>] free_irq+0x48/0xd0
      Jan 19 11:42:02 telek kernel: [ 1440.161323]  [<ffffffffa00e6deb>] cx23885_finidev+0x4b/0x90 [cx23885]
      Jan 19 11:42:02 telek kernel: [ 1440.161329]  [<ffffffff814529fa>] pci_device_remove+0x3a/0xc0
      Jan 19 11:42:02 telek kernel: [ 1440.161334]  [<ffffffff8153b4ea>] __device_release_driver+0x7a/0xf0
      Jan 19 11:42:02 telek kernel: [ 1440.161338]  [<ffffffff8153bc98>] driver_detach+0xc8/0xd0
      Jan 19 11:42:02 telek kernel: [ 1440.161341]  [<ffffffff8153b1de>] bus_remove_driver+0x4e/0xb0
      Jan 19 11:42:02 telek kernel: [ 1440.161345]  [<ffffffff8153c2eb>] driver_unregister+0x2b/0x60
      Jan 19 11:42:02 telek kernel: [ 1440.161349]  [<ffffffff814525c5>] pci_unregister_driver+0x25/0x70
      Jan 19 11:42:02 telek kernel: [ 1440.161355]  [<ffffffffa00f6ddc>] cx23885_fini+0x10/0x12 [cx23885]
      Jan 19 11:42:02 telek kernel: [ 1440.161360]  [<ffffffff81139a98>] SyS_delete_module+0x1a8/0x1f0
      Jan 19 11:42:02 telek kernel: [ 1440.161364]  [<ffffffff819561a9>] system_call_fastpath+0x12/0x17
      Jan 19 11:42:02 telek kernel: [ 1440.161367] ---[ end trace a9c07cb5f3357020 ]---
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
      8d4d9329
    • Hans Verkuil's avatar
      [media] pvrusb2: fix missing device_caps in querycap · 42639f6d
      Hans Verkuil authored
      The VIDIOC_QUERYCAP function should set device_caps, but this was missing.
      In addition, it set the version field as well, but that should be done by
      the core, not by the driver.
      
      If a driver doesn't set device_caps the v4l2 core will issue a WARN_ON, so
      it's important that this is set correctly.
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
      42639f6d
    • Hans Verkuil's avatar
      [media] vb2: fix vb2_thread_stop race conditions · 6cf11ee6
      Hans Verkuil authored
      The locking scheme inside the vb2 thread is unsafe when stopping the
      thread. In particular kthread_stop was called *after* internal data
      structures were cleaned up instead of doing that before. In addition,
      internal vb2 functions were called after threadio->stop was set to
      true and vb2_internal_streamoff was called. This is also not allowed.
      
      All this led to a variety of race conditions and kernel warnings and/or
      oopses.
      
      Fixed by moving the kthread_stop call up before the cleanup takes
      place, and by checking threadio->stop before calling internal vb2
      queuing operations.
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Cc: <stable@vger.kernel.org>      # for v3.16 and up
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
      6cf11ee6
    • Nobuhiro Iwamatsu's avatar
      [media] rcar_vin: Update device_caps and capabilities in querycap · 42d74e4f
      Nobuhiro Iwamatsu authored
      The V4L2 API requires both .capabilities and .device_caps fields of
      struct v4l2_capability to be set. Otherwise the compliance checker
      complains and since commit "v4l2-ioctl: WARN_ON if querycap didn't fill
      device_caps" a compile-time warning is issued. Fix this non-compliance
      in the rcar_vin driver.
      Signed-off-by: default avatarNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
      Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
      42d74e4f
    • Guennadi Liakhovetski's avatar
      [media] soc-camera: fix device capabilities in multiple camera host drivers · 7d96c3e4
      Guennadi Liakhovetski authored
      The V4L2 API requires both .capabilities and .device_caps fields of
      struct v4l2_capability to be set. Otherwise the compliance checker
      complains and since commit "v4l2-ioctl: WARN_ON if querycap didn't fill
      device_caps" a compile-time warning is issued. Fix this non-compliance
      in several soc-camera camera host drivers.
      Reported-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
      Tested-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
      7d96c3e4
    • Jonathan McDowell's avatar
      [media] Fix Mygica T230 support · d0bb12c9
      Jonathan McDowell authored
      Commit 2adb177e removed 2 devices
      from the cxusb device table but failed to fix up the T230 properties
      that follow, meaning that this device no longer gets detected properly.
      Adjust the cxusb_table index appropriate so detection works.
      Signed-off-by: default avatarJonathan McDowell <noodles@earth.li>
      Reviewed-by: default avatarOlli Salonen <olli.salonen@iki.fi>
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
      d0bb12c9
    • Matthias Schwarzott's avatar
      [media] cx23885: Split Hauppauge WinTV Starburst from HVR4400 card entry · 721f3223
      Matthias Schwarzott authored
      Unconditionally attaching Si2161/Si2165 demod driver
      breaks Hauppauge WinTV Starburst.
      So create own card entry for this.
      
      Add card name comments to the subsystem ids.
      
      This fixes a regression introduced in 3.17 by
      36efec48 ([media] cx23885: Add si2165 support for HVR-5500)
      Signed-off-by: default avatarMatthias Schwarzott <zzam@gentoo.org>
      Tested-by: default avatarAntti Palosaari <crope@iki.fi>
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      CC: stable@vger.kernel.org # for 3.17 and upper
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
      721f3223
    • Mauro Carvalho Chehab's avatar
      [media] tlg2300: Fix media dependencies · 3cb99af5
      Mauro Carvalho Chehab authored
      X-Patchwork-Delegate: m.chehab@samsung.com
      Changeset ea2e813e moved the driver to staging, but it forgot to
      preserve the existing dependency.
      
      Fixes: ea2e813e ("[media] tlg2300: move to staging in preparation for removal")
      Reported-by: default avatarJim Davis <jim.epost@gmail.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
      Acked-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
      3cb99af5
    • Linus Torvalds's avatar
      Merge tag 'trace-sh-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · b942c653
      Linus Torvalds authored
      Pull superh tracing fix from Steven Rostedt:
       "It's been reported that function tracing does not work on the sh
        architecture because gcc 4.8 for superH does not support -m32, and the
        recordmcount.pl script adds "-m32" when re-compiling the object files
        with the mcount locations.
      
        I was not able to reproduce this problem, as it seems that -m32 works
        fine for my cross compiler gcc 4.6.3, but I have to assume that -m32
        was deprecated somewhere between 4.6 and 4.8.  As it still seems to
        compile fine without -m32, I have no reason not to add this patch, as
        having -m32 seems to cause trouble for others"
      
      * tag 'trace-sh-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        scripts/recordmcount.pl: There is no -m32 gcc option on Super-H anymore
      b942c653
    • Masahiro Yamada's avatar
      ARM: 8292/1: mm: fix size rounding-down of arm_add_memory() function · 909ba297
      Masahiro Yamada authored
      The current rounding of "size" is wrong:
      
       - If "start" is sufficiently near the next page boundary, "size"
         is decremented by more than enough and the last page is lost.
      
       - If "size" is sufficiently small, it is wrapped around and gets
         a bogus value.
      Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
      Acked-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      909ba297
    • Linus Torvalds's avatar
      Merge tag 'sound-3.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 5eb11d6b
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "This batch contains two fixes for FireWire lib module and a quirk for
        yet another Logitech WebCam.  The former is the fixes for MIDI
        handling I forgot to pick up during the merge window.  All the fixed
        code is pretty local and shouldn't give any regressions"
      
      * tag 'sound-3.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: usb-audio: Add mic volume fix quirk for Logitech Webcam C210
        ALSA: firewire-lib: limit the MIDI data rate
        ALSA: firewire-lib: remove rx_blocks_for_midi quirk
      5eb11d6b
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · 479459a8
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Just back from LCA + some days off, had some fixes from the past 2 weeks,
      
        Some amdkfd code removal for a feature that wasn't ready, otherwise
        just one fix for core helper sleeping, exynos, i915, and radeon fixes.
      
        I thought I had some sti fixes but they were already in, and it
        confused me for a few mins this morning"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm: fb helper should avoid sleeping in panic context
        drm/exynos: fix warning of vblank reference count
        drm/exynos: remove unnecessary runtime pm operations
        drm/exynos: fix reset codes for memory mapped hdmi phy
        drm/radeon: use rv515_ring_start on r5xx
        drm/radeon: add si dpm quirk list
        drm/radeon: don't print error on -ERESTARTSYS
        drm/i915: Fix mutex->owner inspection race under DEBUG_MUTEXES
        drm/i915: Ban Haswell from using RCS flips
        drm/i915: vlv: sanitize RPS interrupt mask during GPU idling
        drm/i915: fix HW lockup due to missing RPS IRQ workaround on GEN6
        drm/i915: gen9: fix RPS interrupt routing to CPU vs. GT
        drm/exynos: remove the redundant machine checking code
        drm/radeon: add a dpm quirk list
        drm/amdkfd: Fix sparse warning (different address space)
        drm/radeon: fix VM flush on CIK (v3)
        drm/radeon: fix VM flush on SI (v3)
        drm/radeon: fix VM flush on cayman/aruba (v3)
        drm/amdkfd: Drop interrupt SW ring buffer
      479459a8
    • Linus Torvalds's avatar
      Merge tag 'mfd-fixes-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd · 7c4bb81c
      Linus Torvalds authored
      Pull MFD fixes from Lee Jones:
       - Avoid platform ID collision in da9052
       - Skip caching volatile registers in tps65218
       - Use correct address base in tps65218
       - Repair deadlock on suspend in rtsx_usb
      
      * tag 'mfd-fixes-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd:
        mfd: rtsx_usb: Fix runtime PM deadlock
        mfd: tps65218: Make INT1 our status_base register
        mfd: tps65218: Make INT[12] and STATUS registers volatile
        mfd: da9052-core: Fix platform-device id collision
      7c4bb81c
    • Qu Wenruo's avatar
      btrfs: Don't call btrfs_start_transaction() on frozen fs to avoid deadlock. · a53f4f8e
      Qu Wenruo authored
      Commit 6b5fe46d (btrfs: do commit in sync_fs if there are pending
      changes) will call btrfs_start_transaction() in sync_fs(), to handle
      some operations needed to be done in next transaction.
      
      However this can cause deadlock if the filesystem is frozen, with the
      following sys_r+w output:
      [  143.255932] Call Trace:
      [  143.255936]  [<ffffffff816c0e09>] schedule+0x29/0x70
      [  143.255939]  [<ffffffff811cb7f3>] __sb_start_write+0xb3/0x100
      [  143.255971]  [<ffffffffa040ec06>] start_transaction+0x2e6/0x5a0
      [btrfs]
      [  143.255992]  [<ffffffffa040f1eb>] btrfs_start_transaction+0x1b/0x20
      [btrfs]
      [  143.256003]  [<ffffffffa03dc0ba>] btrfs_sync_fs+0xca/0xd0 [btrfs]
      [  143.256007]  [<ffffffff811f7be0>] sync_fs_one_sb+0x20/0x30
      [  143.256011]  [<ffffffff811cbd01>] iterate_supers+0xe1/0xf0
      [  143.256014]  [<ffffffff811f7d75>] sys_sync+0x55/0x90
      [  143.256017]  [<ffffffff816c49d2>] system_call_fastpath+0x12/0x17
      [  143.256111] Call Trace:
      [  143.256114]  [<ffffffff816c0e09>] schedule+0x29/0x70
      [  143.256119]  [<ffffffff816c3405>] rwsem_down_write_failed+0x1c5/0x2d0
      [  143.256123]  [<ffffffff8133f013>] call_rwsem_down_write_failed+0x13/0x20
      [  143.256131]  [<ffffffff811caae8>] thaw_super+0x28/0xc0
      [  143.256135]  [<ffffffff811db3e5>] do_vfs_ioctl+0x3f5/0x540
      [  143.256187]  [<ffffffff811db5c1>] SyS_ioctl+0x91/0xb0
      [  143.256213]  [<ffffffff816c49d2>] system_call_fastpath+0x12/0x17
      
      The reason is like the following:
      (Holding s_umount)
      VFS sync_fs staff:
      |- btrfs_sync_fs()
         |- btrfs_start_transaction()
            |- sb_start_intwrite()
            (Waiting thaw_fs to unfreeze)
      					VFS thaw_fs staff:
      					thaw_fs()
      					(Waiting sync_fs to release
      					 s_umount)
      
      So deadlock happens.
      This can be easily triggered by fstest/generic/068 with inode_cache
      mount option.
      
      The fix is to check if the fs is frozen, if the fs is frozen, just
      return and waiting for the next transaction.
      
      Cc: David Sterba <dsterba@suse.cz>
      Reported-by: default avatarGui Hecheng <guihc.fnst@cn.fujitsu.com>
      Signed-off-by: default avatarQu Wenruo <quwenruo@cn.fujitsu.com>
      [enhanced comment, changed to SB_FREEZE_WRITE]
      Signed-off-by: default avatarDavid Sterba <dsterba@suse.cz>
      Signed-off-by: default avatarChris Mason <clm@fb.com>
      a53f4f8e
    • Qu Wenruo's avatar
      btrfs: Fix the bug that fs_info->pending_changes is never cleared. · 6c9fe14f
      Qu Wenruo authored
      Fs_info->pending_changes is never cleared since the original code uses
      cmpxchg(&fs_info->pending_changes, 0, 0), which will only clear it if
      pending_changes is already 0.
      
      This will cause a lot of problem when mount it with inode_cache mount
      option.
      If the btrfs is mounted as inode_cache, pending_changes will always be
      1, even when the fs is frozen.
      Signed-off-by: default avatarQu Wenruo <quwenruo@cn.fujitsu.com>
      Reviewed-by: default avatarDavid Sterba <dsterba@suse.cz>
      Signed-off-by: default avatarDavid Sterba <dsterba@suse.cz>
      Signed-off-by: default avatarChris Mason <clm@fb.com>
      6c9fe14f
  5. 20 Jan, 2015 2 commits