1. 31 8月, 2016 7 次提交
    • J
      Kconfig: Allow k3dma driver to be selected for more then HISI3xx platforms · e39a2329
      John Stultz 提交于
      This allows the k3dma driver to be selected on HiKey via the ARCH_HISI
      dependency.
      
      Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
      Cc: Jingoo Han <jg1.han@samsung.com>
      Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      Cc: Vinod Koul <vinod.koul@intel.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Andy Green <andy@warmcat.com>
      Acked-by: NZhangfei Gao <zhangfei.gao@linaro.org>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      e39a2329
    • A
      k3dma: Add cyclic mode for audio · a7e08fa6
      Andy Green 提交于
      Currently the k3dma driver doesn't offer the cyclic mode
      necessary for handling audio.
      
      This patch adds it.
      
      Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
      Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      Cc: Vinod Koul <vinod.koul@intel.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Andy Green <andy@warmcat.com>
      Acked-by: NZhangfei Gao <zhangfei.gao@linaro.org>
      Signed-off-by: NAndy Green <andy.green@linaro.org>
      [jstultz: Forward ported to mainline, removed a few
       bits of logic that didn't seem to have much effect]
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      a7e08fa6
    • J
      k3dma: Fix memory handling in preparation for cyclic mode · 36387a2b
      John Stultz 提交于
      With cyclic mode, the shared virt-dma logic doesn't actually
      manage the descriptor state, nor the calling of the descriptor
      free callback. This results in leaking a desc structure every
      time we start an audio transfer.
      
      Thus we must manage it ourselves. The k3dma driver already keeps
      track of the active and finished descriptors via ds_run and ds_done
      pointers, so cleanup how we handle those two values, so when we
      tear down everything in terminate_all, call free_desc on the ds_run
      and ds_done pointers if they are not null.
      
      NOTE: HiKey doesn't use the non-cyclic dma modes, so I'm not been
      able to test those modes. But with this patch we no longer leak
      the desc structures.
      
      Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
      Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      Cc: Vinod Koul <vinod.koul@intel.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Andy Green <andy@warmcat.com>
      Acked-by: NZhangfei Gao <zhangfei.gao@linaro.org>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      36387a2b
    • J
      k3dma: Fix occasional DMA ERR issue by using proper dma api · b77f262a
      John Stultz 提交于
      After lots of debugging on an occasional DMA ERR issue, I realized
      that the desc structures which we point the dma hardware are being
      allocated out of regular memory. This means when we fill the desc
      structures, that data doesn't always get flushed out to memory by
      the time we start the dma transfer, resulting in the dma engine getting
      some null values, resulting in a DMA ERR on the first irq.
      
      Thus, this patch adopts mechanism similar to the zx296702_dma of
      allocating the desc structures from a dma pool, so the memory caching
      rules are properly set to avoid this issue.
      
      Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
      Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      Cc: Vinod Koul <vinod.koul@intel.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Andy Green <andy@warmcat.com>
      Acked-by: NZhangfei Gao <zhangfei.gao@linaro.org>
      Signed-off-by: NJohn Stutlz <john.stultz@linaro.org>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      b77f262a
    • A
      k3dma: Fix "nobody cared" message seen on any error · 0173c895
      Andy Green 提交于
      As it was before, as soon as the DMAC IP felt there was an error
      he would return IRQ_NONE since no actual transfer had completed.
      
      After spinning on that for 100K interrupts, Linux yanks the IRQ with
      a "nobody cared" error.
      
      This patch lets it handle the interrupt and keep the IRQ alive.
      
      Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
      Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      Cc: Vinod Koul <vinod.koul@intel.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Andy Green <andy@warmcat.com>
      Acked-by: NZhangfei Gao <zhangfei.gao@linaro.org>
      Signed-off-by: NAndy Green <andy.green@linaro.org>
      [jstultz: Forward ported to mainline]
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      0173c895
    • A
      k3dma: Fix dma err offsets · aceaaa17
      Andy Green 提交于
      The offsets for ERR1 and ERR2 are wrong actually.
      That's why you can never clear an error.
      
      Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
      Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      Cc: Vinod Koul <vinod.koul@intel.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Andy Green <andy@warmcat.com>
      Acked-by: NZhangfei Gao <zhangfei.gao@linaro.org>
      Signed-off-by: NAndy Green <andy.green@linaro.org>
      [jstultz: Forward ported to mainline]
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      aceaaa17
    • A
      k3dma: Fix hisi burst clipping · 6c28a90f
      Andy Green 提交于
      Max burst len is a 4-bit field, but at the moment it's clipped with
      a 5-bit constant... reduce it to that which can be expressed
      
      Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
      Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      Cc: Vinod Koul <vinod.koul@intel.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Andy Green <andy@warmcat.com>
      Acked-by: NZhangfei Gao <zhangfei.gao@linaro.org>
      Signed-off-by: NAndy Green <andy.green@linaro.org>
      [jstultz: Forward ported to mainline]
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      6c28a90f
  2. 08 8月, 2016 3 次提交
  3. 06 8月, 2016 1 次提交
  4. 05 8月, 2016 22 次提交
  5. 04 8月, 2016 7 次提交
    • D
      Input: silead - remove some dead code · 22fe874f
      Dan Carpenter 提交于
      buf[0] is an unsigned char.  touch_nr is an int.  The test for negative
      here doesn't make sense so I have removed it.
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      22fe874f
    • A
      Input: sis-i2c - select CONFIG_CRC_ITU_T · 1fcca89b
      Arnd Bergmann 提交于
      The newly added sis_i2c driver fails to link without the CRC_ITU_T
      driver enabled:
      
      drivers/input/touchscreen/sis_i2c.o: In function `sis_ts_irq_handler':
      sis_i2c.c:(.text+0xc0): undefined reference to `crc_itu_t'
      
      This adds a Kconfig select statement.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: a485cb03 ("Input: add driver for SiS 9200 family I2C touchscreen controllers")
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      1fcca89b
    • M
      Soft RoCE driver · 8700e3e7
      Moni Shoua 提交于
      Soft RoCE (RXE) - The software RoCE driver
      
      ib_rxe implements the RDMA transport and registers to the RDMA core
      device as a kernel verbs provider. It also implements the packet IO
      layer. On the other hand ib_rxe registers to the Linux netdev stack
      as a udp encapsulating protocol, in that case RDMA, for sending and
      receiving packets over any Ethernet device.  This yields a RDMA
      transport over the UDP/Ethernet network layer forming a RoCEv2
      compatible device.
      
      The configuration procedure of the Soft RoCE drivers requires
      binding to any existing Ethernet network device. This is done with
      /sys interface.
      
      A userspace Soft RoCE library (librxe) provides user applications
      the ability to run with Soft RoCE devices.  The use of rxe verbs ins
      user space requires the inclusion of librxe as a device specifics
      plug-in to libibverbs. librxe is packaged separately.
      
      Architecture:
      
           +-----------------------------------------------------------+
           |                          Application                      |
           +-----------------------------------------------------------+
                                  +-----------------------------------+
                                  |             libibverbs            |
      User                        +-----------------------------------+
                                  +----------------+ +----------------+
                                  | librxe         | | HW RoCE lib    |
                                  +----------------+ +----------------+
      +---------------------------------------------------------------+
           +--------------+                           +------------+
           | Sockets      |                           | RDMA ULP   |
           +--------------+                           +------------+
           +--------------+                  +---------------------+
           | TCP/IP       |                  | ib_core             |
           +--------------+                  +---------------------+
                                   +------------+ +----------------+
      Kernel                       | ib_rxe     | | HW RoCE driver |
                                   +------------+ +----------------+
           +------------------------------------+
           | NIC driver                         |
           +------------------------------------+
      
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           +-----------------------------------------------------------+
           |                          Application                      |
           +-----------------------------------------------------------+
                                  +-----------------------------------+
                                  |             libibverbs            |
      User                        +-----------------------------------+
                                  +----------------+ +----------------+
                                  | librxe         | | HW RoCE lib    |
                                  +----------------+ +----------------+
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           +--------------+                           +------------+
           | Sockets      |                           | RDMA ULP   |
           +--------------+                           +------------+
           +--------------+                  +---------------------+
           | TCP/IP       |                  | ib_core             |
           +--------------+                  +---------------------+
                                   +------------+ +----------------+
      Kernel                       | ib_rxe     | | HW RoCE driver |
                                   +------------+ +----------------+
           +------------------------------------+
           | NIC driver                         |
           +------------------------------------+
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      Soft RoCE resources:
      
      [1[ https://github.com/SoftRoCE/librxe-dev librxe - source code in
      Github
      [2] https://github.com/SoftRoCE/rxe-dev/wiki/rxe-dev:-Home - Soft RoCE
      Wiki page
      [3] https://github.com/SoftRoCE/librxe-dev - Soft RoCE userspace library
      Signed-off-by: NKamal Heib <kamalh@mellanox.com>
      Signed-off-by: NAmir Vadai <amirv@mellanox.com>
      Signed-off-by: NMoni Shoua <monis@mellanox.com>
      Reviewed-by: NHaggai Eran <haggaie@mellanox.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      8700e3e7
    • H
      dm raid: fix use of wrong status char during resynchronization · 2a034ec1
      Heinz Mauelshagen 提交于
      During a resynchronization, device status char 'a' is output on the raid
      status line for every device of a RAID set.  It changes from 'a' to 'A'
      (unless device failure) when the resynchronization completes.
      
      Interrupting and restarting a resynchronization, by reloading the DM
      table, erroneously lead to status char 'A'.
      
      Fix this by avoiding setting the MD_RECOVERY_REQUESTED flag in
      raid_preresume().
      Signed-off-by: NHeinz Mauelshagen <heinzm@redhat.com>
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      2a034ec1
    • A
      drivers/media/dvb-frontends/cxd2841er.c: avoid misleading gcc warning · bb9bd878
      Arnd Bergmann 提交于
      The addition of jump label support in dynamic_debug caused an unexpected
      warning in exactly one file in the kernel:
      
        drivers/media/dvb-frontends/cxd2841er.c: In function 'cxd2841er_tune_tc':
        include/linux/dynamic_debug.h:134:3: error: 'carrier_offset' may be used uninitialized in this function [-Werror=maybe-uninitialized]
           __dynamic_dev_dbg(&descriptor, dev, fmt, \
           ^~~~~~~~~~~~~~~~~
        drivers/media/dvb-frontends/cxd2841er.c:3177:11: note: 'carrier_offset' was declared here
          int ret, carrier_offset;
                   ^~~~~~~~~~~~~~
      
      The problem seems to be that the compiler gets confused by the extra
      conditionals in static_branch_unlikely, to the point where it can no
      longer keep track of which branches have already been taken, and it
      doesn't realize that this variable is now always initialized when it
      gets used.
      
      I have done lots of randconfig kernel builds and could not find any
      other file with this behavior, so I assume it's a rare enough glitch
      that we don't need to change the jump label support but instead just
      work around the warning in the driver.
      
      To achieve that, I'm moving the check for the return value into the
      switch() statement, which is an obvious transformation, but is enough to
      un-confuse the compiler here.  The resulting code is not as nice to
      read, but at least we retain the behavior of warning if it gets changed
      to actually access an uninitialized carrier offset value in the future.
      
      Link: http://lkml.kernel.org/r/20160713204342.1221511-1-arnd@arndb.deSigned-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NAbylay Ospan <aospan@netup.ru>
      Cc: Sergey Kozlov <serjk@netup.ru>
      Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
      Cc: Jason Baron <jbaron@akamai.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      bb9bd878
    • K
      dma-mapping: use unsigned long for dma_attrs · 00085f1e
      Krzysztof Kozlowski 提交于
      The dma-mapping core and the implementations do not change the DMA
      attributes passed by pointer.  Thus the pointer can point to const data.
      However the attributes do not have to be a bitfield.  Instead unsigned
      long will do fine:
      
      1. This is just simpler.  Both in terms of reading the code and setting
         attributes.  Instead of initializing local attributes on the stack
         and passing pointer to it to dma_set_attr(), just set the bits.
      
      2. It brings safeness and checking for const correctness because the
         attributes are passed by value.
      
      Semantic patches for this change (at least most of them):
      
          virtual patch
          virtual context
      
          @r@
          identifier f, attrs;
      
          @@
          f(...,
          - struct dma_attrs *attrs
          + unsigned long attrs
          , ...)
          {
          ...
          }
      
          @@
          identifier r.f;
          @@
          f(...,
          - NULL
          + 0
           )
      
      and
      
          // Options: --all-includes
          virtual patch
          virtual context
      
          @r@
          identifier f, attrs;
          type t;
      
          @@
          t f(..., struct dma_attrs *attrs);
      
          @@
          identifier r.f;
          @@
          f(...,
          - NULL
          + 0
           )
      
      Link: http://lkml.kernel.org/r/1468399300-5399-2-git-send-email-k.kozlowski@samsung.comSigned-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Acked-by: NVineet Gupta <vgupta@synopsys.com>
      Acked-by: NRobin Murphy <robin.murphy@arm.com>
      Acked-by: NHans-Christian Noren Egtvedt <egtvedt@samfundet.no>
      Acked-by: Mark Salter <msalter@redhat.com> [c6x]
      Acked-by: Jesper Nilsson <jesper.nilsson@axis.com> [cris]
      Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> [drm]
      Reviewed-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Acked-by: Joerg Roedel <jroedel@suse.de> [iommu]
      Acked-by: Fabien Dessenne <fabien.dessenne@st.com> [bdisp]
      Reviewed-by: Marek Szyprowski <m.szyprowski@samsung.com> [vb2-core]
      Acked-by: David Vrabel <david.vrabel@citrix.com> [xen]
      Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> [xen swiotlb]
      Acked-by: Joerg Roedel <jroedel@suse.de> [iommu]
      Acked-by: Richard Kuo <rkuo@codeaurora.org> [hexagon]
      Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> [m68k]
      Acked-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> [s390]
      Acked-by: NBjorn Andersson <bjorn.andersson@linaro.org>
      Acked-by: Hans-Christian Noren Egtvedt <egtvedt@samfundet.no> [avr32]
      Acked-by: Vineet Gupta <vgupta@synopsys.com> [arc]
      Acked-by: Robin Murphy <robin.murphy@arm.com> [arm64 and dma-iommu]
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      00085f1e
    • K