18 Aug, 2016

1 commit


09 Aug, 2016

2 commits

  • There are two generics functions phy_ethtool_{get|set}_link_ksettings,
    so we can use them instead of defining the same code in the driver.

    There was a check on CAP_NET_ADMIN in cvm_oct_set_settings, but this
    check is already done in dev_ethtool, so no need to repeat it before
    calling the generic function.

    Signed-off-by: Philippe Reynes
    Signed-off-by: David S. Miller

    Philippe Reynes
     
  • The private structure contain a pointer to phydev, but the structure
    net_device already contain such pointer. So we can remove the pointer
    phydev in the private structure, and update the driver to use the
    one contained in struct net_device.

    Signed-off-by: Philippe Reynes
    Signed-off-by: David S. Miller

    Philippe Reynes
     

07 Aug, 2016

1 commit

  • Pull more vfs updates from Al Viro:
    "Assorted cleanups and fixes.

    In the "trivial API change" department - ->d_compare() losing 'parent'
    argument"

    * 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    cachefiles: Fix race between inactivating and culling a cache object
    9p: use clone_fid()
    9p: fix braino introduced in "9p: new helper - v9fs_parent_fid()"
    vfs: make dentry_needs_remove_privs() internal
    vfs: remove file_needs_remove_privs()
    vfs: fix deadlock in file_remove_privs() on overlayfs
    get rid of 'parent' argument of ->d_compare()
    cifs, msdos, vfat, hfs+: don't bother with parent in ->d_compare()
    affs ->d_compare(): don't bother with ->d_inode
    fold _d_rehash() and __d_rehash() together
    fold dentry_rcuwalk_invalidate() into its only remaining caller

    Linus Torvalds
     

06 Aug, 2016

2 commits

  • Pull qstr constification updates from Al Viro:
    "Fairly self-contained bunch - surprising lot of places passes struct
    qstr * as an argument when const struct qstr * would suffice; it
    complicates analysis for no good reason.

    I'd prefer to feed that separately from the assorted fixes (those are
    in #for-linus and with somewhat trickier topology)"

    * 'work.const-qstr' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    qstr: constify instances in adfs
    qstr: constify instances in lustre
    qstr: constify instances in f2fs
    qstr: constify instances in ext2
    qstr: constify instances in vfat
    qstr: constify instances in procfs
    qstr: constify instances in fuse
    qstr constify instances in fs/dcache.c
    qstr: constify instances in nfs
    qstr: constify instances in ocfs2
    qstr: constify instances in autofs4
    qstr: constify instances in hfs
    qstr: constify instances in hfsplus
    qstr: constify instances in logfs
    qstr: constify dentry_init_security

    Linus Torvalds
     
  • Pull more USB updates from Greg KH:
    "Here are a few more straggler patches for USB for 4.8-rc1.

    Most of these are for the usb-serial driver tree. All of those have
    been in linux-next for a long time, but missed my previous pull
    request to you.

    The remaining change is to fix up a staging tree build error, due to
    some USB gadget driver changes that went in. I put it in this tree as
    it was for a USB driver and people are reporting the build error on
    your tree.

    All of these have been in linux-next for this week, and longer for the
    usb-serial changes"

    * tag 'usb-4.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
    staging: emxx_udc: allow modular build
    USB: serial: use variable for status
    USB: serial: option: add support for Telit LE910 PID 0x1206
    USB: serial: cp210x: use kmemdup
    USB: serial: ti_usb_3410_5052: use functions rather than macros
    USB: serial: ti_usb_3410_5052: remove ti_usb_3410_5052.h
    USB: serial: ti_usb_3410_5052: use __packed
    USB: serial: ti_usb_3410_5052: remove useless comments

    Linus Torvalds
     

04 Aug, 2016

1 commit

  • Pull media DocBook removal and some fixups from Mauro Carvalho Chehab:

    - removal of the media DocBook (since it's all in Sphinx now)

    - videobuf2: Fix an allocation regression

    - a few fixes related to the CEC drivers

    * tag 'media/v4.8-5' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
    [media] cec: fix off-by-one memset
    [media] staging: add MEDIA_SUPPORT dependency
    [media] vivid: don't handle CEC_MSG_SET_STREAM_PATH
    [media] media: adv7180: Fix broken interrupt register access
    [media] vb2: Fix allocation size of dma_parms
    [media] vim2m: copy the other colorspace-related fields as well
    [media] adv7511: fix VIC autodetect
    doc-rst: Remove the media docbook

    Linus Torvalds
     

02 Aug, 2016

1 commit

  • Merge drm updates from Dave Airlie:
    "This is the main drm pull request for 4.8.

    I'm down with a cold at the moment so hopefully this isn't in too bad
    a state, I finished pulling stuff last week mostly (nouveau fixes just
    went in today), so only this message should be influenced by illness.
    Apologies to anyone who's major feature I missed :-)

    Core:
    Lockless GEM BO freeing
    Non-blocking atomic work
    Documentation changes (rst/sphinx)
    Prep for new fencing changes
    Simple display helpers
    Master/auth changes
    Register/unregister rework
    Loads of trivial patches/fixes.

    New stuff:
    ARM Mali display driver (not the 3D chip)
    sii902x RGB->HDMI bridge

    Panel:
    Support for new panels
    Improved backlight support

    Bridge:
    Convert ADV7511 to bridge driver
    ADV7533 support
    TC358767 (DSI/DPI to eDP) encoder chip support

    i915:
    BXT support enabled by default
    GVT-g infrastructure
    GuC command submission and fixes
    BXT workarounds
    SKL/BKL workarounds
    Demidlayering device registration
    Thundering herd fixes
    Missing pci ids
    Atomic updates

    amdgpu/radeon:
    ATPX improvements for better dGPU power control on PX systems
    New power features for CZ/BR/ST
    Pipelined BO moves and evictions in TTM
    GPU scheduler improvements
    GPU reset improvements
    Overclocking on dGPUs with amdgpu
    Polaris powermanagement enabled

    nouveau:
    GK20A/GM20B volt and clock improvements.
    Initial support for GP100/GP104 GPUs, GP104 will not yet support
    acceleration due to NVIDIA having not released firmware for them as of yet.

    exynos:
    Exynos5433 SoC with IOMMU support.

    vc4:
    Shader validation for branching

    imx-drm:
    Atomic mode setting conversion
    Reworked DMFC FIFO allocation
    External bridge support

    analogix-dp:
    RK3399 eDP support
    Lots of fixes.

    rockchip:
    Lots of small fixes.

    msm:
    DT bindings cleanups
    Shrinker and madvise support
    ASoC HDMI codec support

    tegra:
    Host1x driver cleanups
    SOR reworking for DP support
    Runtime PM support

    omapdrm:
    PLL enhancements
    Header refactoring
    Gamma table support

    arcgpu:
    Simulator support

    virtio-gpu:
    Atomic modesetting fixes.

    rcar-du:
    Misc fixes.

    mediatek:
    MT8173 HDMI support

    sti:
    ASOC HDMI codec support
    Minor fixes

    fsl-dcu:
    Suspend/resume support
    Bridge support

    amdkfd:
    Minor fixes.

    etnaviv:
    Enable GPU clock gating

    hisilicon:
    Vblank and other fixes"

    * tag 'drm-for-v4.8' of git://people.freedesktop.org/~airlied/linux: (1575 commits)
    drm/nouveau/gr/nv3x: fix instobj write offsets in gr setup
    drm/nouveau/acpi: fix lockup with PCIe runtime PM
    drm/nouveau/acpi: check for function 0x1B before using it
    drm/nouveau/acpi: return supported DSM functions
    drm/nouveau/acpi: ensure matching ACPI handle and supported functions
    drm/nouveau/fbcon: fix font width not divisible by 8
    drm/amd/powerplay: remove enable_clock_power_gatings_tasks from initialize and resume events
    drm/amd/powerplay: move clockgating to after ungating power in pp for uvd/vce
    drm/amdgpu: add query device id and revision id into system info entry at CGS
    drm/amdgpu: add new definition in bif header
    drm/amd/powerplay: rename smum header guards
    drm/amdgpu: enable UVD context buffer for older HW
    drm/amdgpu: fix default UVD context size
    drm/amdgpu: fix incorrect type of info_id
    drm/amdgpu: make amdgpu_cgs_call_acpi_method as static
    drm/amdgpu: comment out unused defaults_staturn_pro static const structure to fix the build
    drm/amdgpu: enable UVD VM only on polaris
    drm/amdgpu: increase timeout of IB test
    drm/amdgpu: add destroy session when generate VCE destroy msg.
    drm/amd: fix deadlock of job_list_lock V2
    ...

    Linus Torvalds
     

01 Aug, 2016

1 commit


31 Jul, 2016

1 commit


30 Jul, 2016

1 commit

  • Pull userns vfs updates from Eric Biederman:
    "This tree contains some very long awaited work on generalizing the
    user namespace support for mounting filesystems to include filesystems
    with a backing store. The real world target is fuse but the goal is
    to update the vfs to allow any filesystem to be supported. This
    patchset is based on a lot of code review and testing to approach that
    goal.

    While looking at what is needed to support the fuse filesystem it
    became clear that there were things like xattrs for security modules
    that needed special treatment. That the resolution of those concerns
    would not be fuse specific. That sorting out these general issues
    made most sense at the generic level, where the right people could be
    drawn into the conversation, and the issues could be solved for
    everyone.

    At a high level what this patchset does a couple of simple things:

    - Add a user namespace owner (s_user_ns) to struct super_block.

    - Teach the vfs to handle filesystem uids and gids not mapping into
    to kuids and kgids and being reported as INVALID_UID and
    INVALID_GID in vfs data structures.

    By assigning a user namespace owner filesystems that are mounted with
    only user namespace privilege can be detected. This allows security
    modules and the like to know which mounts may not be trusted. This
    also allows the set of uids and gids that are communicated to the
    filesystem to be capped at the set of kuids and kgids that are in the
    owning user namespace of the filesystem.

    One of the crazier corner casees this handles is the case of inodes
    whose i_uid or i_gid are not mapped into the vfs. Most of the code
    simply doesn't care but it is easy to confuse the inode writeback path
    so no operation that could cause an inode write-back is permitted for
    such inodes (aka only reads are allowed).

    This set of changes starts out by cleaning up the code paths involved
    in user namespace permirted mounts. Then when things are clean enough
    adds code that cleanly sets s_user_ns. Then additional restrictions
    are added that are possible now that the filesystem superblock
    contains owner information.

    These changes should not affect anyone in practice, but there are some
    parts of these restrictions that are changes in behavior.

    - Andy's restriction on suid executables that does not honor the
    suid bit when the path is from another mount namespace (think
    /proc/[pid]/fd/) or when the filesystem was mounted by a less
    privileged user.

    - The replacement of the user namespace implicit setting of MNT_NODEV
    with implicitly setting SB_I_NODEV on the filesystem superblock
    instead.

    Using SB_I_NODEV is a stronger form that happens to make this state
    user invisible. The user visibility can be managed but it caused
    problems when it was introduced from applications reasonably
    expecting mount flags to be what they were set to.

    There is a little bit of work remaining before it is safe to support
    mounting filesystems with backing store in user namespaces, beyond
    what is in this set of changes.

    - Verifying the mounter has permission to read/write the block device
    during mount.

    - Teaching the integrity modules IMA and EVM to handle filesystems
    mounted with only user namespace root and to reduce trust in their
    security xattrs accordingly.

    - Capturing the mounters credentials and using that for permission
    checks in d_automount and the like. (Given that overlayfs already
    does this, and we need the work in d_automount it make sense to
    generalize this case).

    Furthermore there are a few changes that are on the wishlist:

    - Get all filesystems supporting posix acls using the generic posix
    acls so that posix_acl_fix_xattr_from_user and
    posix_acl_fix_xattr_to_user may be removed. [Maintainability]

    - Reducing the permission checks in places such as remount to allow
    the superblock owner to perform them.

    - Allowing the superblock owner to chown files with unmapped uids and
    gids to something that is mapped so the files may be treated
    normally.

    I am not considering even obvious relaxations of permission checks
    until it is clear there are no more corner cases that need to be
    locked down and handled generically.

    Many thanks to Seth Forshee who kept this code alive, and putting up
    with me rewriting substantial portions of what he did to handle more
    corner cases, and for his diligent testing and reviewing of my
    changes"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: (30 commits)
    fs: Call d_automount with the filesystems creds
    fs: Update i_[ug]id_(read|write) to translate relative to s_user_ns
    evm: Translate user/group ids relative to s_user_ns when computing HMAC
    dquot: For now explicitly don't support filesystems outside of init_user_ns
    quota: Handle quota data stored in s_user_ns in quota_setxquota
    quota: Ensure qids map to the filesystem
    vfs: Don't create inodes with a uid or gid unknown to the vfs
    vfs: Don't modify inodes with a uid or gid unknown to the vfs
    cred: Reject inodes with invalid ids in set_create_file_as()
    fs: Check for invalid i_uid in may_follow_link()
    vfs: Verify acls are valid within superblock's s_user_ns.
    userns: Handle -1 in k[ug]id_has_mapping when !CONFIG_USER_NS
    fs: Refuse uid/gid changes which don't map into s_user_ns
    selinux: Add support for unprivileged mounts from user namespaces
    Smack: Handle labels consistently in untrusted mounts
    Smack: Add support for unprivileged mounts from user namespaces
    fs: Treat foreign mounts as nosuid
    fs: Limit file caps to the user namespace of the super block
    userns: Remove the now unnecessary FS_USERNS_DEV_MOUNT flag
    userns: Remove implicit MNT_NODEV fragility.
    ...

    Linus Torvalds
     

29 Jul, 2016

6 commits

  • Merge more updates from Andrew Morton:
    "The rest of MM"

    * emailed patches from Andrew Morton : (101 commits)
    mm, compaction: simplify contended compaction handling
    mm, compaction: introduce direct compaction priority
    mm, thp: remove __GFP_NORETRY from khugepaged and madvised allocations
    mm, page_alloc: make THP-specific decisions more generic
    mm, page_alloc: restructure direct compaction handling in slowpath
    mm, page_alloc: don't retry initial attempt in slowpath
    mm, page_alloc: set alloc_flags only once in slowpath
    lib/stackdepot.c: use __GFP_NOWARN for stack allocations
    mm, kasan: switch SLUB to stackdepot, enable memory quarantine for SLUB
    mm, kasan: account for object redzone in SLUB's nearest_obj()
    mm: fix use-after-free if memory allocation failed in vma_adjust()
    zsmalloc: Delete an unnecessary check before the function call "iput"
    mm/memblock.c: fix index adjustment error in __next_mem_range_rev()
    mem-hotplug: alloc new page from a nearest neighbor node when mem-offline
    mm: optimize copy_page_to/from_iter_iovec
    mm: add cond_resched() to generic_swapfile_activate()
    Revert "mm, mempool: only set __GFP_NOMEMALLOC if there are free elements"
    mm, compaction: don't isolate PageWriteback pages in MIGRATE_SYNC_LIGHT mode
    mm: hwpoison: remove incorrect comments
    make __section_nr() more efficient
    ...

    Linus Torvalds
     
  • The unused bytes of the features array should be zeroed, but the start index was one
    byte too early. This caused the device features byte to be overwritten by 0.

    The compliance test for the CEC_S_LOG_ADDRS ioctl didn't catch this because it tested
    byte continuation with the second device features byte being 0 :-(

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • staging media drivers tend to have a build time dependency on the
    media support. In particular, the newly added pulse8 cec driver can
    only be a loadable module if MEDIA_SUPPORT=m, but its build dependency
    is on a 'bool' symbol (MEDIA_CEC), so a randconfig build can fail
    with pulse8_cec built-in:

    drivers/staging/built-in.o: In function `pulse8_disconnect':
    dgnc_utils.c:(.text+0x114): undefined reference to `cec_unregister_adapter'
    drivers/staging/built-in.o: In function `pulse8_irq_work_handler':
    dgnc_utils.c:(.text+0x1bc): undefined reference to `cec_transmit_done'
    dgnc_utils.c:(.text+0x1d8): undefined reference to `cec_received_msg'
    dgnc_utils.c:(.text+0x1f4): undefined reference to `cec_transmit_done'
    dgnc_utils.c:(.text+0x218): undefined reference to `cec_transmit_done'
    dgnc_utils.c:(.text+0x23c): undefined reference to `cec_transmit_done'
    drivers/staging/built-in.o: In function `pulse8_connect':
    dgnc_utils.c:(.text+0x844): undefined reference to `cec_allocate_adapter'
    dgnc_utils.c:(.text+0x8a4): undefined reference to `cec_delete_adapter'
    dgnc_utils.c:(.text+0xa10): undefined reference to `cec_register_adapter'

    Originally, MEDIA_CEC itself was a tristate symbol, which would have
    prevented this, but since 5bb2399a4fe4 ("[media] cec: fix Kconfig
    dependency problems"), it doesn't work like that any more.

    This encloses all of the staging media drivers in a CONFIG_MEDIA_SUPPORT
    dependency in Kconfig, which solves the problem by enforcing that none
    of the drivers can be built-in if the media core is a module.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Arnd Bergmann
     
  • There are now a number of accounting oddities such as mapped file pages
    being accounted for on the node while the total number of file pages are
    accounted on the zone. This can be coped with to some extent but it's
    confusing so this patch moves the relevant file-based accounted. Due to
    throttling logic in the page allocator for reliable OOM detection, it is
    still necessary to track dirty and writeback pages on a per-zone basis.

    [mgorman@techsingularity.net: fix NR_ZONE_WRITE_PENDING accounting]
    Link: http://lkml.kernel.org/r/1468404004-5085-5-git-send-email-mgorman@techsingularity.net
    Link: http://lkml.kernel.org/r/1467970510-21195-20-git-send-email-mgorman@techsingularity.net
    Signed-off-by: Mel Gorman
    Acked-by: Vlastimil Babka
    Acked-by: Michal Hocko
    Cc: Hillf Danton
    Acked-by: Johannes Weiner
    Cc: Joonsoo Kim
    Cc: Minchan Kim
    Cc: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mel Gorman
     
  • This moves the LRU lists from the zone to the node and related data such
    as counters, tracing, congestion tracking and writeback tracking.

    Unfortunately, due to reclaim and compaction retry logic, it is
    necessary to account for the number of LRU pages on both zone and node
    logic. Most reclaim logic is based on the node counters but the retry
    logic uses the zone counters which do not distinguish inactive and
    active sizes. It would be possible to leave the LRU counters on a
    per-zone basis but it's a heavier calculation across multiple cache
    lines that is much more frequent than the retry checks.

    Other than the LRU counters, this is mostly a mechanical patch but note
    that it introduces a number of anomalies. For example, the scans are
    per-zone but using per-node counters. We also mark a node as congested
    when a zone is congested. This causes weird problems that are fixed
    later but is easier to review.

    In the event that there is excessive overhead on 32-bit systems due to
    the nodes being on LRU then there are two potential solutions

    1. Long-term isolation of highmem pages when reclaim is lowmem

    When pages are skipped, they are immediately added back onto the LRU
    list. If lowmem reclaim persisted for long periods of time, the same
    highmem pages get continually scanned. The idea would be that lowmem
    keeps those pages on a separate list until a reclaim for highmem pages
    arrives that splices the highmem pages back onto the LRU. It potentially
    could be implemented similar to the UNEVICTABLE list.

    That would reduce the skip rate with the potential corner case is that
    highmem pages have to be scanned and reclaimed to free lowmem slab pages.

    2. Linear scan lowmem pages if the initial LRU shrink fails

    This will break LRU ordering but may be preferable and faster during
    memory pressure than skipping LRU pages.

    Link: http://lkml.kernel.org/r/1467970510-21195-4-git-send-email-mgorman@techsingularity.net
    Signed-off-by: Mel Gorman
    Acked-by: Johannes Weiner
    Acked-by: Vlastimil Babka
    Cc: Hillf Danton
    Cc: Joonsoo Kim
    Cc: Michal Hocko
    Cc: Minchan Kim
    Cc: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mel Gorman
     
  • This changes the vfs dentry hashing to mix in the parent pointer at the
    _beginning_ of the hash, rather than at the end.

    That actually improves both the hash and the code generation, because we
    can move more of the computation to the "static" part of the dcache
    setup, and do less at lookup runtime.

    It turns out that a lot of other hash users also really wanted to mix in
    a base pointer as a 'salt' for the hash, and so the slightly extended
    interface ends up working well for other cases too.

    Users that want a string hash that is purely about the string pass in a
    'salt' pointer of NULL.

    * merge branch 'salted-string-hash':
    fs/dcache.c: Save one 32-bit multiply in dcache lookup
    vfs: make the string hashes salt the hash

    Linus Torvalds
     

28 Jul, 2016

1 commit

  • Pull networking updates from David Miller:

    1) Unified UDP encapsulation offload methods for drivers, from
    Alexander Duyck.

    2) Make DSA binding more sane, from Andrew Lunn.

    3) Support QCA9888 chips in ath10k, from Anilkumar Kolli.

    4) Several workqueue usage cleanups, from Bhaktipriya Shridhar.

    5) Add XDP (eXpress Data Path), essentially running BPF programs on RX
    packets as soon as the device sees them, with the option to mirror
    the packet on TX via the same interface. From Brenden Blanco and
    others.

    6) Allow qdisc/class stats dumps to run lockless, from Eric Dumazet.

    7) Add VLAN support to b53 and bcm_sf2, from Florian Fainelli.

    8) Simplify netlink conntrack entry layout, from Florian Westphal.

    9) Add ipv4 forwarding support to mlxsw spectrum driver, from Ido
    Schimmel, Yotam Gigi, and Jiri Pirko.

    10) Add SKB array infrastructure and convert tun and macvtap over to it.
    From Michael S Tsirkin and Jason Wang.

    11) Support qdisc packet injection in pktgen, from John Fastabend.

    12) Add neighbour monitoring framework to TIPC, from Jon Paul Maloy.

    13) Add NV congestion control support to TCP, from Lawrence Brakmo.

    14) Add GSO support to SCTP, from Marcelo Ricardo Leitner.

    15) Allow GRO and RPS to function on macsec devices, from Paolo Abeni.

    16) Support MPLS over IPV4, from Simon Horman.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1622 commits)
    xgene: Fix build warning with ACPI disabled.
    be2net: perform temperature query in adapter regardless of its interface state
    l2tp: Correctly return -EBADF from pppol2tp_getname.
    net/mlx5_core/health: Remove deprecated create_singlethread_workqueue
    net: ipmr/ip6mr: update lastuse on entry change
    macsec: ensure rx_sa is set when validation is disabled
    tipc: dump monitor attributes
    tipc: add a function to get the bearer name
    tipc: get monitor threshold for the cluster
    tipc: make cluster size threshold for monitoring configurable
    tipc: introduce constants for tipc address validation
    net: neigh: disallow transition to NUD_STALE if lladdr is unchanged in neigh_update()
    MAINTAINERS: xgene: Add driver and documentation path
    Documentation: dtb: xgene: Add MDIO node
    dtb: xgene: Add MDIO node
    drivers: net: xgene: ethtool: Use phy_ethtool_gset and sset
    drivers: net: xgene: Use exported functions
    drivers: net: xgene: Enable MDIO driver
    drivers: net: xgene: Add backward compatibility
    drivers: net: phy: xgene: Add MDIO driver
    ...

    Linus Torvalds
     

27 Jul, 2016

1 commit

  • Pull media updates from Mauro Carvalho Chehab:

    - new framework support for HDMI CEC and remote control support

    - new encoding codec driver for Mediatek SoC

    - new frontend driver: helene tuner

    - added support for NetUp almost universal devices, with supports
    DVB-C/S/S2/T/T2 and ISDB-T

    - the mn88472 frontend driver got promoted from staging

    - a new driver for RCar video input

    - some soc_camera legacy drivers got removed: timb, omap1, mx2, mx3

    - lots of driver cleanups, improvements and fixups

    * tag 'media/v4.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (377 commits)
    [media] cec: always check all_device_types and features
    [media] cec: poll should check if there is room in the tx queue
    [media] vivid: support monitor all mode
    [media] cec: fix test for unconfigured adapter in main message loop
    [media] cec: limit the size of the transmit queue
    [media] cec: zero unused msg part after msg->len
    [media] cec: don't set fh to NULL in CEC_TRANSMIT
    [media] cec: clear all status fields before transmit and always fill in sequence
    [media] cec: CEC_RECEIVE overwrote the timeout field
    [media] cxd2841er: Reading SNR for DVB-C added
    [media] cxd2841er: Reading BER and UCB for DVB-C added
    [media] cxd2841er: fix switch-case for DVB-C
    [media] cxd2841er: fix signal strength scale for ISDB-T
    [media] cxd2841er: adjust the dB scale for DVB-C
    [media] cxd2841er: provide signal strength for DVB-C
    [media] cxd2841er: fix BER report via DVBv5 stats API
    [media] mb86a20s: apply mask to val after checking for read failure
    [media] airspy: fix error logic during device register
    [media] s5p-cec/TODO: add TODO item
    [media] cec/TODO: drop comment about sphinx documentation
    ...

    Linus Torvalds
     

26 Jul, 2016

2 commits

  • A change to the usb gadget core allowed certain API functions to be
    part of a loadable module, which breaks having emxx_udc built-in:

    drivers/staging/built-in.o: In function `nbu2ss_drv_probe':
    (.text+0x2428): undefined reference to `usb_ep_set_maxpacket_limit'

    The original patch already fixed tons of other cases that have the
    added dependency but apparently missed this one that now appears
    in an ARM allmodconfig build.

    This patch makes the symbol "tristate", which lets the Kconfig
    dependency tracking handle it correctly. To make the module
    actually usable, I also revert 0af61e66ee16 ("drivers/staging:
    make emxx_udc.c explicitly non-modular"), which Paul Gortmaker
    added after noticing that the Kconfig symbol was 'bool'.
    Compared to the original version however, I leave out the
    '__exit' annotation on the remove callback, as Paul pointed
    out that this was incorrect.

    Signed-off-by: Arnd Bergmann
    Fixes: 5a8d651a2bde ("usb: gadget: move gadget API functions to udc-core")
    Acked-by: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    Arnd Bergmann
     
  • Linux 4.7

    As requested by Daniel Vetter as the conflicts were getting messy.

    Dave Airlie
     

20 Jul, 2016

8 commits

  • Even when the adapter is configured for CEC 1.4, we still check and
    use the CEC 2.0 parts of struct cec_log_addrs. Although these aren't
    used in CEC messages, the information contained in them is still of
    use in the CEC framework itself, so keep this information.

    Also zero the unused trailing features[] data and unused logical address
    data so the contents isn't random data.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • For POLLOUT poll only checked if the adapter was configured, not
    if there was room in the transmit queue. Add that check.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • The main message loop checks if the physical address was valid, and if
    not it is assumed that the adapter had been unconfigured.

    However, this check is no longer correct, instead it should check
    that both adap->is_configured and adap->is_configuring are false.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • The size of the transmit queue was unlimited, which meant that
    in non-blocking mode you could flood the CEC adapter with messages
    to be transmitted.

    Limit this to 18 messages.

    Also print the number of pending transmits and the timeout value
    in the status debugfs file.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • Ensure that the unused part of the msg array is zeroed. This is
    required by CEC 2.0 when receiving shorter messages than expected.
    In that case the remaining bytes are assumed to be 0.

    There are no such CEC messages yet, but it is required to be future proof.

    And since we're doing it for received messages, do it for transmitted
    messages as well. It's unambiguous this way.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • The filehandle was set to NULL when in non-blocking mode or when
    no reply is needed.

    This is wrong: the filehandle is needed in non-blocking mode to ensure
    that the result of the transmit can be obtained through CEC_RECEIVE.

    And the 'reply' check was also incorrect since it should have checked the
    timeout field (the reply can be 0). In any case, when in blocking mode
    there is no need to set the fh to NULL either.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • Before transmitting a message clear all status fields and always fill
    in the sequence number. Make sure the sequence number is never 0.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • When CEC_RECEIVE returns a message the original timeout field
    was overwritten. Restore the timeout field.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     

16 Jul, 2016

4 commits


14 Jul, 2016

2 commits

  • …iio into staging-next

    Jonathan writes:

    Third set of IIO new device support, features and cleanups for the 4.8 cycle.

    New core features
    - Selection of the clock source for IIO timestamps. This is done per device
    as it makes little sense to have events in one timebase and data timestamped
    on another. Biggest reason for this is that we currently use a clock
    source which is non monotonic which can result in 'interesting' data sets.
    (Includes export for get_monotonic_corse64 which Thomas Gleixner didn't mind
    in an earlier version.)
    - MAINTAINERS add the git tree to the list for IIO.

    New device support + a kind of indirect staging graduation.
    * Broadcom iproc-static-adc
    - new driver
    * mcp4531
    - support for MCP454x, MCP456x, MCP464x and MCP466x potentiometers
    * mpu6050
    - support the IC20608 6 axis motion tracking device
    * st-sensors
    - support the lis3l02dq + drop the lis3l02dq driver from staging.
    The general purpose driver is missing event support, but good to get
    rid of this driver which was rather long in the tooth.

    New driver features
    * ak8975
    - Add vid regulator support and refactor handling in general.
    - Allow a delay after enabling regulators.
    - Runtime and system PM.
    * bmg160
    - filter frequency control support.
    * bmp280
    - SPI device support.
    - EOC interrupt support for the BMP085
    - power management support.
    - supply regulator support.
    - reset gpio support
    - dt bindings for reset gpio and regulators.
    - of table to support device tree registration
    * max1363
    - Device tree bindings.
    * mcp4531
    - Device tree bindings.
    * st-pressure
    - temperature channels as part of triggered buffer (previously not due
    probably to alignment issues - see below).
    - lps22hb open drain interrupt support.
    - lps22hb temperature channel support

    Cleanups and reworkings.
    * numerous ADC drivers
    - ensure the iio_dev->dev.of_node is set to the parent dev.of_node so
    as to allow client bindings to find the device.
    * ak8975
    - Fix incorrect handling of missing regulator
    - make sure power is down and remove.
    * bmp280
    - read the calibration data only once as it doesn't change.
    * isl29125
    - Use a few macros to make code a touch more readable.
    * mma8452
    - fix a memory leak on error.
    - drop an unecessary bit of return value handling.
    * potentiometer kconfig
    - typo fix.
    * st-pressure
    - drop some uninformative default assignments of elements of the channel
    array structure (aids readability).
    * st-sensors
    - Harden interrupt handling considerably. These are actually all using
    level interrupts, but at least two known boards have them wired to
    edge only interrupt chips. Hence a slightly interesting bit of handling
    is needed in which we first allow for the easy option (level triggered) and
    secondly check the status registers before reenabling edge interrupts and
    fall back to a tight loop in the thread until we successfully clear the
    interrupt. No harm is done if we never succeed in doing so. It's an odd
    patch that has been through a lot of revisions to reach a consensus on how
    to handle what is basically broken hardware (which the previous defaults
    allowed to kind of work).
    - Fix alignment to defined storagebytes boundaries.
    - Ensure alignment of power of 2 byte boundaries. This has always in theory
    been part of the ABI of IIO, but we missed a few that snuck in that need
    fixing. The effect was minor as they were only followed by timestamp
    channels which were correctly aligned,
    - Add some docs to explain the gain calculations.

    Greg Kroah-Hartman
     
  • Signed-off-by: Aayush Gupta
    Signed-off-by: Mauro Carvalho Chehab

    Aayush Gupta
     

13 Jul, 2016

5 commits

  • Fixes the following sparse warning:

    drivers/staging/media/pulse8-cec/pulse8-cec.c:427:27: warning:
    symbol 'pulse8_cec_adap_ops' was not declared. Should it be static?

    Signed-off-by: Wei Yongjun
    Signed-off-by: Mauro Carvalho Chehab

    Wei Yongjun
     
  • When transmitting a message and waiting for a reply it would be good
    to know the time between when the message was transmitted and when
    the reply arrived. With only one timestamp field it was set to when
    the reply arrived and the original transmit time was overwritten.

    Just taking the timestamp in userspace right before CEC_TRANSMIT is
    called is not reliable, since the actual transmit can be delayed if
    the CEC bus is busy. Only the driver can fill this in accurately.

    So split up the ts field into an rx_ts and a tx_ts. Also move the
    status fields to after the 'reply' field: they were placed in a
    strange position and make much more sense when grouped with the
    other status-related fields.

    This patch also makes sure that the timestamp is taken as soon as
    possible.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • Check (and warn) if the msg->len is too long or if it is 0.

    Should never happen, but just in case...

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • drivers/staging/media/cec/cec-adap.c: In function 'cec_queue_msg_fh':
    drivers/staging/media/cec/cec-adap.c:141: error: unknown field 'lost_msgs' specified in initializer

    Fixes: 9881fe0ca187c21 ("[media] cec: add HDMI CEC framework (adapter)")
    Cc: Hans Verkuil
    Cc: Kamil Debski
    Signed-off-by: Andrew Morton
    Signed-off-by: Mauro Carvalho Chehab

    Andrew Morton
     
  • drivers/staging/media/pulse8-cec/pulse8-cec.c:104:6: warning: no previous prototype for 'pulse8_irq_work_handler' [-Wmissing-prototypes]
    void pulse8_irq_work_handler(struct work_struct *work)
    ^~~~~~~~~~~~~~~~~~~~~~~

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab