1. 13 12月, 2014 5 次提交
  2. 12 12月, 2014 35 次提交
    • M
      net: phy: export fixed_phy_register() · 37e9a690
      Mark Salter 提交于
      When building the bcmgenet driver as module, I get:
      
      ERROR: "fixed_phy_register" [drivers/net/ethernet/broadcom/genet/genet.ko] undefined!
      
      commit b0ba512e225d72 ("net: bcmgenet: enable driver to work without device
      tree") which added a call to fixed_phy_register. But fixed_phy_register
      needs to be exported if used from a module.
      Signed-off-by: NMark Salter <msalter@redhat.com>
      Acked-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      37e9a690
    • A
      fib_trie: Fix trie balancing issue if new node pushes down existing node · e962f302
      Alexander Duyck 提交于
      This patch addresses an issue with the level compression of the fib_trie.
      Specifically in the case of adding a new leaf that triggers a new node to
      be added that takes the place of the old node.  The result is a trie where
      the 1 child tnode is on one side and one leaf is on the other which gives
      you a very deep trie.  Below is the script I used to generate a trie on
      dummy0 with a 10.X.X.X family of addresses.
      
        ip link add type dummy
        ipval=184549374
        bit=2
        for i in `seq 1 23`
        do
          ifconfig dummy0:$bit $ipval/8
          ipval=`expr $ipval - $bit`
          bit=`expr $bit \* 2`
        done
        cat /proc/net/fib_triestat
      
      Running the script before the patch:
      
      	Local:
      		Aver depth:     10.82
      		Max depth:      23
      		Leaves:         29
      		Prefixes:       30
      		Internal nodes: 27
      		  1: 26  2: 1
      		Pointers: 56
      	Null ptrs: 1
      	Total size: 5  kB
      
      After applying the patch and repeating:
      
      	Local:
      		Aver depth:     4.72
      		Max depth:      9
      		Leaves:         29
      		Prefixes:       30
      		Internal nodes: 12
      		  1: 3  2: 2  3: 7
      		Pointers: 70
      	Null ptrs: 30
      	Total size: 4  kB
      
      What this fix does is start the rebalance at the newly created tnode
      instead of at the parent tnode.  This way if there is a gap between the
      parent and the new node it doesn't prevent the new tnode from being
      coalesced with any pre-existing nodes that may have been pushed into one
      of the new nodes child branches.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e962f302
    • T
      vlan: Add ability to always enable TSO/UFO · 53f6b708
      Toshiaki Makita 提交于
      Since the real device can segment packets by software, a vlan device
      can set TSO/UFO even when the real device doesn't have those features.
      Unlike GSO, this allows packets to be segmented after Qdisc.
      Signed-off-by: NToshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      53f6b708
    • C
      r8169:update rtl8168g pcie ephy parameter · 5fbea337
      Chun-Hao Lin 提交于
      Add ephy parameter to rtl8168g.
      Also change the common function of rtl8168g from "rtl_hw_start_8168g_1" to
       "rtl_hw_start_8168g". And function "rtl_hw_start_8168g_1" is used for
      setting rtl8168g hardware parameters.
      
      Following is the explanation of what hardware parameter change for.
      rtl8168g may erroneous judge the PCIe signal quality and show the error bit
      on PCI configuration space when in PCIe low power mode.
      The following ephy parameters are for above issue.
      { 0x00, 0x0000,	0x0008 }
      { 0x0c, 0x37d0,	0x0820 }
      { 0x1e, 0x0000,	0x0001 }
      
      rtl8168g may return to PCIe L0 from PCIe L0s low power mode too slow.
      The following ephy parameter is for above issue.
      { 0x19, 0x8000,	0x0000 }
      Signed-off-by: NChunhao Lin <hau@realtek.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5fbea337
    • F
      net: dsa: bcm_sf2: force link for all fixed PHY devices · 7855f675
      Florian Fainelli 提交于
      For ports of the switch that we define as "fixed PHYs" such as MoCA, we
      would have our Port 7 special handling that would allow us to assert the
      link status indication.
      
      For other ports, such as e.g: RGMII_1 connected to a cable modem, we
      would rely on whatever the bootloader has left configured, which is a
      bad assumption to make, we really need to force the link status
      indication here.
      
      Fixes: 246d7f77 ("net: dsa: add Broadcom SF2 switch driver")
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7855f675
    • D
      Merge branch 'dma_mb' · 697766df
      David S. Miller 提交于
      Alexander Duyck says:
      
      ====================
      arch: Add lightweight memory barriers for coherent memory access
      
      These patches introduce two new primitives for synchronizing cache coherent
      memory writes and reads.  These two new primitives are:
      
      	dma_rmb()
      	dma_wmb()
      
      The first patch cleans up some unnecessary overhead related to the
      definition of read_barrier_depends, smp_read_barrier_depends, and comments
      related to the barrier.
      
      The second patch adds the primitives for the applicable architectures and
      asm-generic.
      
      The third patch adds the barriers to r8169 which turns out to be a good
      example of where the new barriers might be useful as they have full
      rmb()/wmb() barriers ordering accesses to the descriptors and the DescOwn
      bit.
      
      The fourth patch adds support for coherent_rmb() to the Intel fm10k, igb,
      and ixgbe drivers.  Testing with the ixgbe driver has shown a processing
      time reduction of at least 7ns per 64B frame on a Core i7-4930K.
      
      This patch series is essentially the v7 for:
      v4-7:	Add lightweight memory barriers for coherent memory access
      v3:	Add lightweight memory barriers fast_rmb() and fast_wmb()
      v2:	Introduce load_acquire() and store_release()
      v1:	Introduce read_acquire()
      
      The key changes in this patch series versus the earlier patches are:
      v7 resubmit:
      	- Added Acked-by: Ben Herrenschmidt from v5 to dma_rmb/wmb patch
      	- No code changes from previous set, still applies cleanly and builds.
      v7:
      	- Dropped test/debug patch that was accidentally slipped in
      v6:
      	- Replaced "memory based device I/O" with "consistent memory" in
      	  docs
      	- Added reference to DMA-API.txt to explain consistent memory
      v5:
      	- Renamed barriers dma_rmb and dma_wmb
      	- Undid smp_wmb changes in x86 and PowerPC
      	- Defined smp_rmb as __lwsync for SMP case on PowerPC
      v4:
      	- Renamed barriers coherent_rmb and coherent_wmb
      	- Added smp_lwsync for use in smp_load_acquire/smp_store_release
      v3:
      	- Moved away from acquire()/store() and instead focused on barriers
      	- Added cleanup of read_barrier_depends
      	- Added change in r8169 to fix cur_tx/DescOwn ordering
      	- Simplified changes to just replacing/moving barriers in r8169
      	- Added update to documentation with code example
      v2:
      	- Renamed read_acquire() to be consistent with smp_load_acquire()
      	- Changed barrier used to be consistent with smp_load_acquire()
      	- Updated PowerPC code to use __lwsync based on IBM article
      	- Added store_release() as this is a viable use case for drivers
      	- Added r8169 patch which is able to fully use primitives
      	- Added fm10k/igb/ixgbe patch which is able to test performance
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      697766df
    • A
      fm10k/igb/ixgbe: Use dma_rmb on Rx descriptor reads · 124b74c1
      Alexander Duyck 提交于
      This change makes it so that dma_rmb is used when reading the Rx
      descriptor.  The advantage of dma_rmb is that it allows for a much
      lower cost barrier on x86, powerpc, arm, and arm64 architectures than a
      traditional memory barrier when dealing with reads that only have to
      synchronize to coherent memory.
      
      In addition I have updated the code so that it just checks to see if any
      bits have been set instead of just the DD bit since the DD bit will always
      be set as a part of a descriptor write-back so we just need to check for a
      non-zero value being present at that memory location rather than just
      checking for any specific bit.  This allows the code itself to appear much
      cleaner and allows the compiler more room to optimize.
      
      Cc: Matthew Vick <matthew.vick@intel.com>
      Cc: Don Skidmore <donald.c.skidmore@intel.com>
      Acked-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      124b74c1
    • A
      r8169: Use dma_rmb() and dma_wmb() for DescOwn checks · a0750138
      Alexander Duyck 提交于
      The r8169 use a pair of wmb() calls when setting up the descriptor rings.
      The first is to synchronize the descriptor data with the descriptor status,
      and the second is to synchronize the descriptor status with the use of the
      MMIO doorbell to notify the device that descriptors are ready.  This can
      come at a heavy price on some systems, and is not really necessary on
      systems such as x86 as a simple barrier() would suffice to order store/store
      accesses.  As such we can replace the first memory barrier with
      dma_wmb() to reduce the cost for these accesses.
      
      In addition the r8169 uses a rmb() to prevent compiler optimization in the
      cleanup paths, however by moving the barrier down a few lines and replacing
      it with a dma_rmb() we should be able to use it to guarantee
      descriptor accesses do not occur until the device has updated the DescOwn
      bit from its end.
      
      One last change I made is to move the update of cur_tx in the xmit path to
      after the wmb.  This way we can guarantee the device and all CPUs should
      see the DescOwn update before they see the cur_tx value update.
      
      Cc: Realtek linux nic maintainers <nic_swsd@realtek.com>
      Cc: Francois Romieu <romieu@fr.zoreil.com>
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a0750138
    • A
      arch: Add lightweight memory barriers dma_rmb() and dma_wmb() · 1077fa36
      Alexander Duyck 提交于
      There are a number of situations where the mandatory barriers rmb() and
      wmb() are used to order memory/memory operations in the device drivers
      and those barriers are much heavier than they actually need to be.  For
      example in the case of PowerPC wmb() calls the heavy-weight sync
      instruction when for coherent memory operations all that is really needed
      is an lsync or eieio instruction.
      
      This commit adds a coherent only version of the mandatory memory barriers
      rmb() and wmb().  In most cases this should result in the barrier being the
      same as the SMP barriers for the SMP case, however in some cases we use a
      barrier that is somewhere in between rmb() and smp_rmb().  For example on
      ARM the rmb barriers break down as follows:
      
        Barrier   Call     Explanation
        --------- -------- ----------------------------------
        rmb()     dsb()    Data synchronization barrier - system
        dma_rmb() dmb(osh) data memory barrier - outer sharable
        smp_rmb() dmb(ish) data memory barrier - inner sharable
      
      These new barriers are not as safe as the standard rmb() and wmb().
      Specifically they do not guarantee ordering between coherent and incoherent
      memories.  The primary use case for these would be to enforce ordering of
      reads and writes when accessing coherent memory that is shared between the
      CPU and a device.
      
      It may also be noted that there is no dma_mb().  Most architectures don't
      provide a good mechanism for performing a coherent only full barrier without
      resorting to the same mechanism used in mb().  As such there isn't much to
      be gained in trying to define such a function.
      
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      Cc: Michael Ellerman <michael@ellerman.id.au>
      Cc: Michael Neuling <mikey@neuling.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: David Miller <davem@davemloft.net>
      Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1077fa36
    • A
      arch: Cleanup read_barrier_depends() and comments · 8a449718
      Alexander Duyck 提交于
      This patch is meant to cleanup the handling of read_barrier_depends and
      smp_read_barrier_depends.  In multiple spots in the kernel headers
      read_barrier_depends is defined as "do {} while (0)", however we then go
      into the SMP vs non-SMP sections and have the SMP version reference
      read_barrier_depends, and the non-SMP define it as yet another empty
      do/while.
      
      With this commit I went through and cleaned out the duplicate definitions
      and reduced the number of definitions down to 2 per header.  In addition I
      moved the 50 line comments for the macro from the x86 and mips headers that
      defined it as an empty do/while to those that were actually defining the
      macro, alpha and blackfin.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8a449718
    • D
      Merge branch 'dsa' · c11a9009
      David S. Miller 提交于
      Florian Fainelli says:
      
      ====================
      net: dsa: two small bug fixes
      
      Here are two small fixes for the DSA slave interface creation code:
      
      - first patch fixes a null pointer de-reference with an invalid PHY
        device pointer while calling phy_connect_direct()
      
      - second path propagates the dsa_slave_phy_setup() error code down to
        its caller: dsa_slave_create
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c11a9009
    • F
      net: dsa: propagate error code from dsa_slave_phy_setup · 9697f1cd
      Florian Fainelli 提交于
      In case we cannot attach to our slave netdevice PHY, error out and
      propagate that error up to the caller: dsa_slave_create().
      
      Fixes: 0d8bcdd3 ("net: dsa: allow for more complex PHY setups")
      Signed-off-by: NAndrey Volkov <andrey.volkov@nexvision.fr>
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9697f1cd
    • F
      net: dsa: handle non-existing PHYs on switch internal bus · 53013c77
      Florian Fainelli 提交于
      In case there is no PHY at the designated address on the internal
      switch, we would basically de-reference a null pointer here:
      
      dsa_slave_phy_setup(...)
      {
      	p->phy = ds->slave_mii_bus->phy_map[p->port];
      	phy_connect_direct(slave_dev, p->phy, dsa_slave_adjust_link,
      				      ^------
      
      This can be triggered when the platform configuration (platform_data or
      Device Tree) indicates there should be a PHY device at this address, but
      the HW is non-responsive, such that we cannot attach a PHY device at
      this specific location.
      
      Fix this by checking the return value prior to calling
      phy_connect_direct().
      
      CC: Andrew Lunn <andrew@lunn.ch>
      Fixes: b31f65fb ("net: dsa: slave: Fix autoneg for phys on switch MDIO bus")
      Reported-by: NBrian Norris <computersforpeace@gmail.com>
      Signed-off-by: NAndrey Volkov <andrey.volkov@nexvision.fr>
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      53013c77
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next · 70e71ca0
      Linus Torvalds 提交于
      Pull networking updates from David Miller:
      
       1) New offloading infrastructure and example 'rocker' driver for
          offloading of switching and routing to hardware.
      
          This work was done by a large group of dedicated individuals, not
          limited to: Scott Feldman, Jiri Pirko, Thomas Graf, John Fastabend,
          Jamal Hadi Salim, Andy Gospodarek, Florian Fainelli, Roopa Prabhu
      
       2) Start making the networking operate on IOV iterators instead of
          modifying iov objects in-situ during transfers.  Thanks to Al Viro
          and Herbert Xu.
      
       3) A set of new netlink interfaces for the TIPC stack, from Richard
          Alpe.
      
       4) Remove unnecessary looping during ipv6 routing lookups, from Martin
          KaFai Lau.
      
       5) Add PAUSE frame generation support to gianfar driver, from Matei
          Pavaluca.
      
       6) Allow for larger reordering levels in TCP, which are easily
          achievable in the real world right now, from Eric Dumazet.
      
       7) Add a variable of napi_schedule that doesn't need to disable cpu
          interrupts, from Eric Dumazet.
      
       8) Use a doubly linked list to optimize neigh_parms_release(), from
          Nicolas Dichtel.
      
       9) Various enhancements to the kernel BPF verifier, and allow eBPF
          programs to actually be attached to sockets.  From Alexei
          Starovoitov.
      
      10) Support TSO/LSO in sunvnet driver, from David L Stevens.
      
      11) Allow controlling ECN usage via routing metrics, from Florian
          Westphal.
      
      12) Remote checksum offload, from Tom Herbert.
      
      13) Add split-header receive, BQL, and xmit_more support to amd-xgbe
          driver, from Thomas Lendacky.
      
      14) Add MPLS support to openvswitch, from Simon Horman.
      
      15) Support wildcard tunnel endpoints in ipv6 tunnels, from Steffen
          Klassert.
      
      16) Do gro flushes on a per-device basis using a timer, from Eric
          Dumazet.  This tries to resolve the conflicting goals between the
          desired handling of bulk vs.  RPC-like traffic.
      
      17) Allow userspace to ask for the CPU upon what a packet was
          received/steered, via SO_INCOMING_CPU.  From Eric Dumazet.
      
      18) Limit GSO packets to half the current congestion window, from Eric
          Dumazet.
      
      19) Add a generic helper so that all drivers set their RSS keys in a
          consistent way, from Eric Dumazet.
      
      20) Add xmit_more support to enic driver, from Govindarajulu
          Varadarajan.
      
      21) Add VLAN packet scheduler action, from Jiri Pirko.
      
      22) Support configurable RSS hash functions via ethtool, from Eyal
          Perry.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1820 commits)
        Fix race condition between vxlan_sock_add and vxlan_sock_release
        net/macb: fix compilation warning for print_hex_dump() called with skb->mac_header
        net/mlx4: Add support for A0 steering
        net/mlx4: Refactor QUERY_PORT
        net/mlx4_core: Add explicit error message when rule doesn't meet configuration
        net/mlx4: Add A0 hybrid steering
        net/mlx4: Add mlx4_bitmap zone allocator
        net/mlx4: Add a check if there are too many reserved QPs
        net/mlx4: Change QP allocation scheme
        net/mlx4_core: Use tasklet for user-space CQ completion events
        net/mlx4_core: Mask out host side virtualization features for guests
        net/mlx4_en: Set csum level for encapsulated packets
        be2net: Export tunnel offloads only when a VxLAN tunnel is created
        gianfar: Fix dma check map error when DMA_API_DEBUG is enabled
        cxgb4/csiostor: Don't use MASTER_MUST for fw_hello call
        net: fec: only enable mdio interrupt before phy device link up
        net: fec: clear all interrupt events to support i.MX6SX
        net: fec: reset fep link status in suspend function
        net: sock: fix access via invalid file descriptor
        net: introduce helper macro for_each_cmsghdr
        ...
      70e71ca0
    • L
      Merge tag 'sound-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · bae41e45
      Linus Torvalds 提交于
      Pull sound updates from Takashi Iwai:
       "This became a fairly large pull request.  In addition to the usual
        driver updates / fixes, there have been a high amount of cleanups in
        ASoC area, as well as control API helpers and kernel documentations
        fixes touching through the whole tree.
      
        In the driver side, the biggest changes are the support for new Intel
        SoC found on new x86 machines, and the updates of FireWire dice and
        oxfw drivers.
      
        Some remarkable items are below:
      
        ALSA core:
         - PCM mmap code cleanup, removal of arch-dependent codes
         - PCM xrun injection support
         - PCM hwptr tracepoint support
         - Refactoring of snd_pcm_action(), simplification of PCM locking
         - Robustified sequecner auto-load functionality
         - New control API helpers and lots of cleanups along with them
         - Lots of kerneldoc fixes and cleanups
      
        USB-audio:
         - The mixer resume code was largely rewritten, and the devices with
           quirks are resumed properly.
         - New hardware support: Focusrite Scarlett, Digidesign Mbox1,
           Denon/Marantz DACs, Zoom R16/24
      
        FireWire:
         - DICE driver updates with better duplex and sync support, including
           MIDI support
         - New OXFW driver for Oxford Semiconductor FW970/971 chipset,
           including the previous LaCie Speakers device.  Fullduplex and MIDI
           support included as well as DICE driver.
      
        HD-audio:
         - Refactoring the driver-caps quirk handling in snd-hda-intel
         - More consistent control names representing the topology better
         - Fixups: HP mute LED with ALC268 codec, Ideapad S210 built-in mic
           fix, ASUS Z99He laptop EAPD
      
        ASoC:
         - Conversion of AC'97 drivers to use regmap, bringing us closer to
           the removal of the ASoC level I/O code
         - Clean up a lot of old drivers that were open coding things that
           have subsequently been implemented in the core
         - Some DAPM performance improvements
         - Removal of the now seldom used CODEC mutex
         - Lots of updates for the newer Intel SoC support, including support
           for the DSP and some Cherrytrail and Braswell machine drivers
         - Support for Samsung boards using rt5631 as the CODEC
         - Removal of the obsolete AFEB9260 machine driver
         - Driver support for the TI TS3A227E headset driver used in some
           Chrombeooks
      
        Others:
         - ASIHPI driver update and cleanups
         - Lots of dev_*() printk conversions
         - Lots of trivial cleanups for the codes spotted by Coccinelle"
      
      * tag 'sound-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (594 commits)
        ALSA: pcxhr: NULL dereference on probe failure
        ALSA: lola: NULL dereference on probe failure
        ALSA: hda - Add "eapd" model string for AD1986A codec
        ALSA: hda - Add EAPD fixup for ASUS Z99He laptop
        ALSA: oxfw: Add hwdep interface
        ALSA: oxfw: Add support for capture/playback MIDI messages
        ALSA: oxfw: add support for capturing PCM samples
        ALSA: oxfw: Add support AMDTP in-stream
        ALSA: oxfw: Add support for Behringer/Mackie devices
        ALSA: oxfw: Change the way to start stream
        ALSA: oxfw: Add proc interface for debugging purpose
        ALSA: oxfw: Change the way to make PCM rules/constraints
        ALSA: oxfw: Add support for AV/C stream format command to get/set supported stream formation
        ALSA: oxfw: Change the way to name card
        ALSA: dice: Add support for MIDI capture/playback
        ALSA: dice: Add support for capturing PCM samples
        ALSA: dice: Support for non SYT-Match sampling clock source mode
        ALSA: dice: Add support for duplex streams with synchronization
        ALSA: dice: Change the way to start stream
        ALSA: jack: Add dummy snd_jack_set_key() definition
        ...
      bae41e45
    • L
      Merge tag 'devicetree-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/glikely/linux · 7ef58b32
      Linus Torvalds 提交于
      Pull devicetree changes from Grant Likely:
       "Lots of activity in the devicetree code for v3.18.  Most of it is
        related to getting all of the overlay support code in place, but there
        are other important things in there.
      
        Highlights:
      
         - OF_RECONFIG notifiers for SPI, I2C and Platform devices.  Those
           subsystems can now respond to live changes to the device tree.
      
         - CONFIG_OF_OVERLAY method for applying live changes to the device
           tree
      
         - Removal of the of_allnodes list.  This used to be used to iterate
           over all the nodes in the device tree, but it is unnecessary
           because the same thing can be done by iterating over the list of
           child pointers.  Getting rid of of_allnodes saves some memory and
           avoids the possibility of of_allnodes being sorted differently from
           the child lists.
      
         - Support for retrieving original DTB blob via sysfs.  Needed by
           kexec.
      
         - More unittests
      
         - Documentation and minor bug fixes"
      
      * tag 'devicetree-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/glikely/linux: (42 commits)
        of: Delete unnecessary check before calling "of_node_put()"
        of: Drop ->next pointer from struct device_node
        spi: Check for spi_of_notifier when CONFIG_OF_DYNAMIC=y
        of: support passing console options with stdout-path
        of: add optional options parameter to of_find_node_by_path()
        of: Add bindings for chosen node, stdout-path
        of: Remove unneeded and incorrect MODULE_DEVICE_TABLE
        ARM: dt: fix up PL011 device tree bindings
        of: base, fix of_property_read_string_helper kernel-doc
        of: remove select of non-existant OF_DEVICE config symbol
        spi/of: Add OF notifier handler
        spi/of: Create new device registration method and accessors
        i2c/of: Add OF_RECONFIG notifier handler
        i2c/of: Factor out Devicetree registration code
        of/overlay: Add overlay unittests
        of/overlay: Introduce DT overlay support
        of/reconfig: Add OF_DYNAMIC notifier for platform_bus_type
        of/reconfig: Always use the same structure for notifiers
        of/reconfig: Add debug output for OF_RECONFIG notifiers
        of/reconfig: Add empty stubs for the of_reconfig methods
        ...
      7ef58b32
    • L
      Merge tag 'fbdev-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux · 413fd0e3
      Linus Torvalds 提交于
      Pull fbdev updates from Tomi Valkeinen:
       - support for mx6sl and mx6sx
       - OMAP HDMI audio rewrite to make it finally work
       - OMAP video PLL work to prepare for new DRA7xx SoCs
       - simplefb DT related improvements
      
      * tag 'fbdev-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (81 commits)
        video: uvesafb: Deletion of an unnecessary check before the function call "platform_device_put"
        video: fbdev-VIA: Deletion of an unnecessary check before the function call "framebuffer_release"
        video: fbdev-MMP: Deletion of an unnecessary check before the function call "mmp_unregister_path"
        video: mx3fb: Deletion of an unnecessary check before the function call "backlight_device_unregister"
        video: fbdev-OMAP2: Deletion of unnecessary checks before the function call "i2c_put_adapter"
        video: fbdev-SIS: Deletion of unnecessary checks before the function call "pci_dev_put"
        video: smscufx: Deletion of unnecessary checks before the function call "vfree"
        video: udlfb: Deletion of unnecessary checks before the function call "vfree"
        video: uvesafb: Deletion of an unnecessary check before the function call "uvesafb_free"
        video: fbdev-LCDC: Deletion of an unnecessary check before the function call "vfree"
        video: fbdev: arkfb: suppress build warning
        video: fbdev: s3fb: suppress build warning
        video: fbdev: vt8623fb: suppress build warning
        OMAPDSS: hdmi5: Fix bit field for IEC958_AES2_CON_SOURCE
        OMAPDSS: hdmi: Remove __exit qualifier from hdmi_uninit_output()
        OMAPDSS: hdmi5: Change hdmi_wp idlemode to to no_idle for audio playback
        OMAPDSS: Remove all references to obsolete HDMI audio callbacks
        ASoC: omap: Remove obsolete HDMI audio code and Kconfig options
        OMAPDSS: hdmi5: Register ASoC platform device for omap hdmi audio
        OMAPDSS: hdmi5: Remove callbacks for the old ASoC DAI driver
        ...
      413fd0e3
    • L
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · 6b9e2cea
      Linus Torvalds 提交于
      Pull virtio updates from Michael Tsirkin:
       "virtio: virtio 1.0 support, misc patches
      
        This adds a lot of infrastructure for virtio 1.0 support.  Notable
        missing pieces: virtio pci, virtio balloon (needs spec extension),
        vhost scsi.
      
        Plus, there are some minor fixes in a couple of places.
      
        Note: some net drivers are affected by these patches.  David said he's
        fine with merging these patches through my tree.
      
        Rusty's on vacation, he acked using my tree for these, too"
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (70 commits)
        virtio_ccw: finalize_features error handling
        virtio_ccw: future-proof finalize_features
        virtio_pci: rename virtio_pci -> virtio_pci_common
        virtio_pci: update file descriptions and copyright
        virtio_pci: split out legacy device support
        virtio_pci: setup config vector indirectly
        virtio_pci: setup vqs indirectly
        virtio_pci: delete vqs indirectly
        virtio_pci: use priv for vq notification
        virtio_pci: free up vq->priv
        virtio_pci: fix coding style for structs
        virtio_pci: add isr field
        virtio: drop legacy_only driver flag
        virtio_balloon: drop legacy_only driver flag
        virtio_ccw: rev 1 devices set VIRTIO_F_VERSION_1
        virtio: allow finalize_features to fail
        virtio_ccw: legacy: don't negotiate rev 1/features
        virtio: add API to detect legacy devices
        virtio_console: fix sparse warnings
        vhost: remove unnecessary forward declarations in vhost.h
        ...
      6b9e2cea
    • L
      Merge branch 'mailbox-devel' of git://git.linaro.org/landing-teams/working/fujitsu/integration · 14ba9a2e
      Linus Torvalds 提交于
      Pull mailbox framework updates from Jassi Brar.
      
      * 'mailbox-devel' of git://git.linaro.org/landing-teams/working/fujitsu/integration:
        Mailbox: Add support for Platform Communication Channel
        mailbox/omap: adapt to the new mailbox framework
        mailbox: add tx_prepare client callback
        mailbox: Don't unnecessarily re-arm the polling timer
      14ba9a2e
    • L
      Merge tag 'spi-v3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · b859e7d1
      Linus Torvalds 提交于
      Pull spi updates from Mark Brown:
       "Not a huge amount going on this release, mainly new drivers (there's a
        couple more waiting that didn't quite make the cut for this release
        too):
      
         - An interface for querying if the current transfer is the last in a
           message, allowing controllers that need special handling for the
           final transfer to use the core message parsing.
         - Support for Amlogic Meson SPIFC, Imagination Technologies SFPI,
           Intel Quark X1000 and Samsung Exynos 7 controllers"
      
      * tag 'spi-v3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (38 commits)
        spi/s3c64xx: Remove redundant runtime PM management
        spi: fsl-spi: remove unused variable assignment
        spi: spi-fsl-spi: Return an error code in fsl_spi_do_one_msg()
        spi: core: Do not mangle error code from kthread_run()
        spi: fsl-espi: add (un)prepare_transfer_hardware calls to save power if SPI is not in use
        spi: fsl-(e)spi: migrate to generic master queueing
        spi/txx9: Deletion of an unnecessary check before the function call "clk_disable"
        spi: cadence: Fix 3-to-8 mux mode
        spi: cadence: Init HW after reading devicetree attributes
        spi: meson: Select REGMAP_MMIO
        spi: s3c64xx: add support for exynos7 SPI controller
        spi: spi-pxa2xx: SPI support for Intel Quark X1000
        spi: meson: meson_spifc_setup_speed() can be static
        spi: spi-pxa2xx: Add helpers for regiseters' accessing
        spi: spi-mxs: Fix mapping from vmalloc-ed buffer to scatter list
        spi: atmel: introduce probe deferring
        spi: atmel: remove compat for non DT board when requesting dma chan
        spi: meson: Add support for Amlogic Meson SPIFC
        spi: meson: Add device tree bindings documentation for SPIFC
        spi: core: Add spi_transfer_is_last() helper
        ...
      b859e7d1
    • L
      Merge tag 'edac/v3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac · 709d9f09
      Linus Torvalds 提交于
      Pull edac updates from Mauro Carvalho Chehab:
       - Broadwell-DE support on sb-edac driver
       - Some fixes at sb-edac driver
      
      * tag 'edac/v3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac:
        sb_edac: Fix typo computing number of banks
        sb_edac: Add support for Broadwell-DE processor
        sb_edac: Fix discovery of top-of-low-memory for Haswell
        sb_edac: Fix erroneous bytes->gigabytes conversion
        sb_edac: Fix off-by-one error in number of channels
      709d9f09
    • M
      Fix race condition between vxlan_sock_add and vxlan_sock_release · 00c83b01
      Marcelo Leitner 提交于
      Currently, when trying to reuse a socket, vxlan_sock_add will grab
      vn->sock_lock, locate a reusable socket, inc refcount and release
      vn->sock_lock.
      
      But vxlan_sock_release() will first decrement refcount, and then grab
      that lock. refcnt operations are atomic but as currently we have
      deferred works which hold vs->refcnt each, this might happen, leading to
      a use after free (specially after vxlan_igmp_leave):
      
        CPU 1                            CPU 2
      
      deferred work                    vxlan_sock_add
        ...                              ...
                                         spin_lock(&vn->sock_lock)
                                         vs = vxlan_find_sock();
        vxlan_sock_release
          dec vs->refcnt, reaches 0
          spin_lock(&vn->sock_lock)
                                         vxlan_sock_hold(vs), refcnt=1
                                         spin_unlock(&vn->sock_lock)
          hlist_del_rcu(&vs->hlist);
          vxlan_notify_del_rx_port(vs)
          spin_unlock(&vn->sock_lock)
      
      So when we look for a reusable socket, we check if it wasn't freed
      already before reusing it.
      Signed-off-by: NMarcelo Ricardo Leitner <mleitner@redhat.com>
      Fixes: 7c47cedf ("vxlan: move IGMP join/leave to work queue")
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      00c83b01
    • C
    • L
      Merge tag 'media/v3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · 2183a588
      Linus Torvalds 提交于
      Pull media updates from Mauro Carvalho Chehab:
       - Two new dvb frontend drivers: mn88472 and mn88473
       - A new driver for some PCIe DVBSky cards
       - A new remote controller driver: meson-ir
       - One LIRC staging driver got rewritten and promoted to mainstream:
         igorplugusb
       - A new tuner driver (m88rs6000t)
       - The old omap2 media driver got removed from staging.  This driver
         uses an old DMA API and it is likely broken on recent kernels.
         Nobody cared enough to fix it
       - Media bus format moved to a separate header, as DRM will also use the
         definitions there
       - mem2mem_testdev were renamed to vim2m, in order to use the same
         naming convention taken by the other virtual test driver (vivid)
       - Added a new driver for coda SoC (coda-jpeg)
       - The cx88 driver got converted to use videobuf2 core
       - Make DMABUF export buffer to work with DMA Scatter/Gather and Vmalloc
         cores
       - Lots of other fixes, improvements and cleanups on the drivers.
      
      * tag 'media/v3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (384 commits)
        [media] mn88473: One function call less in mn88473_init() after error
        [media] mn88473: Remove uneeded check before release_firmware()
        [media] lirc_zilog: Deletion of unnecessary checks before vfree()
        [media] MAINTAINERS: Add myself as img-ir maintainer
        [media] img-ir: Don't set driver's module owner
        [media] img-ir: Depend on METAG or MIPS or COMPILE_TEST
        [media] img-ir/hw: Drop [un]register_decoder declarations
        [media] img-ir/hw: Fix potential deadlock stopping timer
        [media] img-ir/hw: Always read data to clear buffer
        [media] redrat3: ensure dma is setup properly
        [media] ddbridge: remove unneeded check before dvb_unregister_device()
        [media] si2157: One function call less in si2157_init() after error
        [media] tuners: remove uneeded checks before release_firmware()
        [media] arm: omap2: rx51-peripherals: fix build warning
        [media] stv090x: add an extra protetion against buffer overflow
        [media] stv090x: Remove an unreachable code
        [media] stv090x: Some whitespace cleanups
        [media] em28xx: checkpatch cleanup: whitespaces/new lines cleanups
        [media] si2168: add support for firmware files in new format
        [media] si2168: debug printout for firmware version
        ...
      2183a588
    • D
      Merge branch 'mlx4-next' · efef7939
      David S. Miller 提交于
      Or Gerlitz says:
      
      ====================
      mlx4 driver update
      
      This series from Matan, Jenny, Dotan and myself is mostly about adding
      support to a new performance optimized flow steering mode (patches 4-10).
      
      The 1st two patches are small fixes (one for VXLAN and one for SRIOV),
      and the third patch is a fix to avoid hard-lockup situation when many
      (hunderds) processes holding user-space QPs/CQs get events.
      
      Matan and Or.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      efef7939
    • M
      net/mlx4: Add support for A0 steering · 7d077cd3
      Matan Barak 提交于
      Add the required firmware commands for A0 steering and a way to enable
      that. The firmware support focuses on INIT_HCA, QUERY_HCA, QUERY_PORT,
      QUERY_DEV_CAP and QUERY_FUNC_CAP commands. Those commands are used
      to configure and query the device.
      
      The different A0 DMFS (steering) modes are:
      
      Static - optimized performance, but flow steering rules are
      limited. This mode should be choosed explicitly by the user
      in order to be used.
      
      Dynamic - this mode should be explicitly choosed by the user.
      In this mode, the FW works in optimized steering mode as long as
      it can and afterwards automatically drops to classic (full) DMFS.
      
      Disable - this mode should be explicitly choosed by the user.
      The user instructs the system not to use optimized steering, even if
      the FW supports Dynamic A0 DMFS (and thus will be able to use optimized
      steering in Default A0 DMFS mode).
      
      Default - this mode is implicitly choosed. In this mode, if the FW
      supports Dynamic A0 DMFS, it'll work in this mode. Otherwise, it'll
      work at Disable A0 DMFS mode.
      
      Under SRIOV configuration, when the A0 steering mode is enabled,
      older guest VF drivers who aren't using the RX QP allocation flag
      (MLX4_RESERVE_A0_QP) will get a QP from the general range and
      fail when attempting to register a steering rule. To avoid that,
      the PF context behaviour is changed once on A0 static mode, to
      require support for the allocation flag in VF drivers too.
      
      In order to enable A0 steering, we use log_num_mgm_entry_size param.
      If the value of the parameter is not positive, we treat the absolute
      value of log_num_mgm_entry_size as a bit field. Setting bit 2 of this
      bit field enables static A0 steering.
      Signed-off-by: NMatan Barak <matanb@mellanox.com>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7d077cd3
    • M
      net/mlx4: Refactor QUERY_PORT · 431df8c7
      Matan Barak 提交于
      Currently QUERY_PORT is done as a part of QUERY_DEV_CAP firmware command.
      
      Since we would like to use it without querying all device capabilities,
      extract this part to be a function of its own.
      Signed-off-by: NMatan Barak <matanb@mellanox.com>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      431df8c7
    • M
      net/mlx4_core: Add explicit error message when rule doesn't meet configuration · 579d059b
      Matan Barak 提交于
      When a given flow steering rule is invalid in respect to the current
      steering configuration, print the correct error message to the system log.
      Signed-off-by: NMatan Barak <matanb@mellanox.com>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      579d059b
    • M
      net/mlx4: Add A0 hybrid steering · d57febe1
      Matan Barak 提交于
      A0 hybrid steering is a form of high performance flow steering.
      By using this mode, mlx4 cards use a fast limited table based steering,
      in order to enable fast steering of unicast packets to a QP.
      
      In order to implement A0 hybrid steering we allocate resources
      from different zones:
      (1) General range
      (2) Special MAC-assigned QPs [RSS, Raw-Ethernet] each has its own region.
      
      When we create a rss QP or a raw ethernet (A0 steerable and BF ready) QP,
      we try hard to allocate the QP from range (2). Otherwise, we try hard not
      to allocate from this  range. However, when the system is pushed to its
      limits and one needs every resource, the allocator uses every region it can.
      
      Meaning, when we run out of raw-eth qps, the allocator allocates from the
      general range (and the special-A0 area is no longer active). If we run out
      of RSS qps, the mechanism tries to allocate from the raw-eth QP zone. If that
      is also exhausted, the allocator will allocate from the general range
      (and the A0 region is no longer active).
      
      Note that if a raw-eth qp is allocated from the general range, it attempts
      to allocate the range such that bits 6 and 7 (blueflame bits) in the
      QP number are not set.
      
      When the feature is used in SRIOV, the VF has to notify the PF what
      kind of QP attributes it needs. In order to do that, along with the
      "Eth QP blueflame" bit, we reserve a new "A0 steerable QP". According
      to the combination of these bits, the PF tries to allocate a suitable QP.
      
      In order to maintain backward compatibility (with older PFs), the PF
      notifies which QP attributes it supports via QUERY_FUNC_CAP command.
      Signed-off-by: NMatan Barak <matanb@mellanox.com>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d57febe1
    • M
      net/mlx4: Add mlx4_bitmap zone allocator · 7a89399f
      Matan Barak 提交于
      The zone allocator is a mechanism which manages a few mlx4_bitmaps.
      
      When allocating a resource, the user indicates the desired zone of
      which this resource will be allocated from. If possible, the resource
      will be allocated from this zone. Otherwise, the resource will be
      allocated from a less-than, equal-to, higher-than priority zone,
      according to the desired zone's properties with that respective
      allocation order.
      Signed-off-by: NMatan Barak <matanb@mellanox.com>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7a89399f
    • D
      net/mlx4: Add a check if there are too many reserved QPs · ab256e5a
      Dotan Barak 提交于
      The number of reserved QPs is affected both from the firmware and
      from the driver's requirements. This patch adds a check that
      validates that this number is indeed feasable.
      Signed-off-by: NDotan Barak <dotanb@dev.mellanox.co.il>
      Signed-off-by: NMatan Barak <matanb@mellanox.com>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ab256e5a
    • E
      net/mlx4: Change QP allocation scheme · ddae0349
      Eugenia Emantayev 提交于
      When using BF (Blue-Flame), the QPN overrides the VLAN, CV, and SV fields
      in the WQE. Thus, BF may only be used for QPNs with bits 6,7 unset.
      
      The current Ethernet driver code reserves a Tx QP range with 256b alignment.
      
      This is wrong because if there are more than 64 Tx QPs in use,
      QPNs >= base + 65 will have bits 6/7 set.
      
      This problem is not specific for the Ethernet driver, any entity that
      tries to reserve more than 64 BF-enabled QPs should fail. Also, using
      ranges is not necessary here and is wasteful.
      
      The new mechanism introduced here will support reservation for
      "Eth QPs eligible for BF" for all drivers: bare-metal, multi-PF, and VFs
      (when hypervisors support WC in VMs). The flow we use is:
      
      1. In mlx4_en, allocate Tx QPs one by one instead of a range allocation,
         and request "BF enabled QPs" if BF is supported for the function
      
      2. In the ALLOC_RES FW command, change param1 to:
      a. param1[23:0]  - number of QPs
      b. param1[31-24] - flags controlling QPs reservation
      
      Bit 31 refers to Eth blueflame supported QPs. Those QPs must have
      bits 6 and 7 unset in order to be used in Ethernet.
      
      Bits 24-30 of the flags are currently reserved.
      
      When a function tries to allocate a QP, it states the required attributes
      for this QP. Those attributes are considered "best-effort". If an attribute,
      such as Ethernet BF enabled QP, is a must-have attribute, the function has
      to check that attribute is supported before trying to do the allocation.
      
      In a lower layer of the code, mlx4_qp_reserve_range masks out the bits
      which are unsupported. If SRIOV is used, the PF validates those attributes
      and masks out unsupported attributes as well. In order to notify VFs which
      attributes are supported, the VF uses QUERY_FUNC_CAP command. This command's
      mailbox is filled by the PF, which notifies which QP allocation attributes
      it supports.
      Signed-off-by: NEugenia Emantayev <eugenia@mellanox.co.il>
      Signed-off-by: NMatan Barak <matanb@mellanox.com>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ddae0349
    • M
      net/mlx4_core: Use tasklet for user-space CQ completion events · 3dca0f42
      Matan Barak 提交于
      Previously, we've fired all our completion callbacks straight from our ISR.
      
      Some of those callbacks were lightweight (for example, mlx4_en's and
      IPoIB napi callbacks), but some of them did more work (for example,
      the user-space RDMA stack uverbs' completion handler). Besides that,
      doing more than the minimal work in ISR is generally considered wrong,
      it could even lead to a hard lockup of the system. Since when a lot
      of completion events are generated by the hardware, the loop over those
      events could be so long, that we'll get into a hard lockup by the system
      watchdog.
      
      In order to avoid that, add a new way of invoking completion events
      callbacks. In the interrupt itself, we add the CQs which receive completion
      event to a per-EQ list and schedule a tasklet. In the tasklet context
      we loop over all the CQs in the list and invoke the user callback.
      Signed-off-by: NMatan Barak <matanb@mellanox.com>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3dca0f42
    • O
      net/mlx4_core: Mask out host side virtualization features for guests · 383677da
      Or Gerlitz 提交于
      When VFs (guests in this context) issue the QUERY_DEV_CAP command, they
      need not be told that host side virtualization features such as VST, FSM
      (MAC anti-spoofing) and running > 80 VFs are supported by the device.
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      383677da
    • O
      net/mlx4_en: Set csum level for encapsulated packets · c58942f2
      Or Gerlitz 提交于
      This was dropped by mistake for the napi_gro_frags flow, fix that.
      
      Fixes: dd65beac ('net/mlx4_en: Extend usage of napi_gro_frags')
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c58942f2