1. 03 Jul, 2015 2 commits
  2. 17 Jun, 2015 9 commits
  3. 16 Jun, 2015 2 commits
    • Cyrille Pitchen's avatar
      spi: atmel: add support to FIFOs · 11f2764f
      Cyrille Pitchen authored
      The latest SPI controllers embedded inside sama5d2x SoCs come with FIFOs.
      When FIFOs are enabled, they can either work in SINGLE data mode or
      MULTIPLE data mode. The selected mode depends on the configuration of the
      SPI controller (see below).
      
      In SINGLE data mode (or legacy mode), for a single I/O access, only one
      data can be read from the Receive Data Register (RDR) or written into the
      Transmit Data Register (TDR). On the other hand, in MULTIPLE data mode, up
      to 4 data can be read from the RDR or up 2 data can be written into the
      TDR in a single 32bit I/O access. So programmers should take good care of
      the width of the I/O access to read/write the right number of data. The
      exact number of read/written data depends on both the I/O access width and
      the data width (from 8 up to 16 bits).
      
      To enable the FIFO feature a "atmel,fifo-size" property must be set to
      provide the maximum number of data (not bytes) the RX and TX FIFOs can
      store. Hence a 32 data FIFO can always store up to 32 data unrelated with
      the actual data width.
      
      When FIFOs are enabled, the RX one is forced to operate in SINGLE data
      mode because this driver configures the spi controller as a master. In
      master mode only, the Received Data Register has an additionnal Peripheral
      Chip Select field, which prevents us from reading more than a single data
      at each register access.
      
      Besides, the TX FIFO operates in MULTIPLE data mode. However, even when a
      8bit data size is used, only two data by access could be written into the
      Transmit Data Register. Indeed the first data has to be written into the
      lowest 16 bits whereas the second data has to be written into the highest
      16 bits of the TDR. When DMA transfers are used to send data, we don't
      rework the transmit buffer to cope with this hardware limitation: the
      additional copies required to prepare a new input buffer suited to both
      the DMA controller and the spi controller would waste all the benefit of
      the DMA transfer. Instead, the DMA controller is configured to write only
      one data at time into the TDR.
      
      In pio mode, two data are written in the TDR in a single access.
      Signed-off-by: default avatarCyrille Pitchen <cyrille.pitchen@atmel.com>
      Acked-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      11f2764f
    • Cyrille Pitchen's avatar
      spi: atmel: update DT bindings documentation · 2c01a3d6
      Cyrille Pitchen authored
      - add new property "atmel,fifo-size"
      - change "cs-gpios" to optional for SPI controller version >= 2.
      
      Please be aware that the VERSION register can not be used to guess the
      size of FIFOs. Indeed, for a given hardware version, the SPI controller
      can be integrated on Atmel SoCs with different FIFO sizes. Also the
      "atmel,fifo-size" property is optional as older SPI controllers don't
      embed FIFO at all.
      
      Besides, the FIFO size can not be read or guessed from other registers:
      When designing the FIFO feature, no dedicated registers were added to
      store this size. Unused spaces in the I/O register range are limited and
      better reserved for future usages. Instead, the FIFO size of each
      peripheral is documented in the programmer datasheet.
      
      Finally, on a given SoC, there can be several instances of the SPI
      controller with different FIFO sizes. This explain why we'd rather use a
      dedicated DT property than use the "compatible" property.
      
      For instance, sama5d2x SoCs come with some SPI controllers, the ones
      inside Flexcoms, integrating 32 data FIFOs whereas other SPI controllers
      use 16 data FIFOs. All these SPI controllers share the same IP version.
      Signed-off-by: default avatarCyrille Pitchen <cyrille.pitchen@atmel.com>
      Acked-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      2c01a3d6
  4. 15 Jun, 2015 9 commits
  5. 14 Jun, 2015 1 commit
    • Linus Torvalds's avatar
      Merge tag 'sound-4.1-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 2fbbada1
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Most of commits are regression fixes for HD-audio: a few corner case
        fixes for regmap transition, and i915 binding issues.
      
        In addition, a quirk for another USB-audio device supporting DSD"
      
      * tag 'sound-4.1-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda - Abort the probe without i915 binding for HSW/BDW
        ALSA: hda - Re-add the lost fake mute support
        ALSA: hda - Continue probing even if i915 binding fails
        ALSA: hda - Don't actually write registers for caps overwrites
        ALSA: hda - fix number of devices query on hotplug
        ALSA: usb-audio: add native DSD support for JLsounds I2SoverUSB
      2fbbada1
  6. 13 Jun, 2015 3 commits
    • Jaedon Shin's avatar
      MPI: MIPS: Fix compilation error with GCC 5.1 · 36f58113
      Jaedon Shin authored
      This patch fixes mips compilation error:
      
      lib/mpi/generic_mpih-mul1.c: In function 'mpihelp_mul_1':
      lib/mpi/longlong.h:651:2: error: impossible constraint in 'asm'
      Signed-off-by: default avatarJaedon Shin <jaedon.shin@gmail.com>
      Cc: Linux-MIPS <linux-mips@linux-mips.org>
      Patchwork: https://patchwork.linux-mips.org/patch/10546/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      36f58113
    • Rabin Vincent's avatar
      IRQCHIP: mips-gic: Don't nest calls to do_IRQ() · 1b3ed367
      Rabin Vincent authored
      The GIC chained handlers use do_IRQ() to call the subhandlers.  This
      means that irq_enter() calls get nested, which leads to preempt count
      looking like we're in nested interrupts, which in turn leads to all
      system time being accounted as IRQ time in account_system_time().
      
      Fix it by using generic_handle_irq().  Since these same functions are
      used in some systems (if cpu_has_veic) from a low-level vectored
      interrupt handler which does not go throught do_IRQ(), we need to do it
      conditionally.
      Signed-off-by: default avatarRabin Vincent <rabin.vincent@axis.com>
      Reviewed-by: default avatarAndrew Bresticker <abrestic@chromium.org>
      Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: linux-mips@linux-mips.org
      Cc: tglx@linutronix.de
      Cc: jason@lakedaemon.net
      Patchwork: https://patchwork.linux-mips.org/patch/10545/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      1b3ed367
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · c8d17b45
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Fix uninitialized struct station_info in cfg80211_wireless_stats(),
          from Johannes Berg.
      
       2) Revert commit attempt to fix ipv6 protocol resubmission, it adds
          regressions.
      
       3) Endless loops can be created in bridge port lists, fix from Nikolay
          Aleksandrov.
      
       4) Don't WARN_ON() if sk->sk_forward_alloc is non-zero in
          sk_clear_memalloc, it is a legal situation during swap deactivation.
          Fix from Mel Gorman.
      
       5) Fix order of disabling interrupts and unlocking NAPI in enic driver
          to avoid a race.  From Govindarajulu Varadarajan.
      
       6) High and low register writes are swapped when programming the start
          of periodic output in igb driver.  From Richard Cochran.
      
       7) Fix device rename handling in mpls stack, from Robert Shearman.
      
       8) Do not trigger compaction synchronously when optimistically trying
          to allocate an order 3 page in alloc_skb_with_frags() and
          skb_page_frag_refill().  From Shaohua Li.
      
       9) Authentication with COOKIE_ECHO is not handled properly in SCTP, fix
          from Marcelo Ricardo Leitner.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
        Doc: networking: Fix URL for wiki.wireshark.org in udplite.txt
        sctp: allow authenticating DATA chunks that are bundled with COOKIE_ECHO
        net: don't wait for order-3 page allocation
        mpls: handle device renames for per-device sysctls
        net: igb: fix the start time for periodic output signals
        enic: fix memory leak in rq_clean
        enic: check return value for stat dump
        enic: unlock napi busy poll before unmasking intr
        net, swap: Remove a warning and clarify why sk_mem_reclaim is required when deactivating swap
        bridge: fix multicast router rlist endless loop
        tipc: disconnect socket directly after probe failure
        Revert "ipv6: Fix protocol resubmission"
        cfg80211: wext: clear sinfo struct before calling driver
      c8d17b45
  7. 12 Jun, 2015 14 commits
    • Masanari Iida's avatar
      Doc: networking: Fix URL for wiki.wireshark.org in udplite.txt · b07d4961
      Masanari Iida authored
      This patch fix URL (http to https) for wiki.wireshark.org.
      Signed-off-by: default avatarMasanari Iida <standby24x7@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b07d4961
    • Marcelo Ricardo Leitner's avatar
      sctp: allow authenticating DATA chunks that are bundled with COOKIE_ECHO · ae36806a
      Marcelo Ricardo Leitner authored
      Currently, we can ask to authenticate DATA chunks and we can send DATA
      chunks on the same packet as COOKIE_ECHO, but if you try to combine
      both, the DATA chunk will be sent unauthenticated and peer won't accept
      it, leading to a communication failure.
      
      This happens because even though the data was queued after it was
      requested to authenticate DATA chunks, it was also queued before we
      could know that remote peer can handle authenticating, so
      sctp_auth_send_cid() returns false.
      
      The fix is whenever we set up an active key, re-check send queue for
      chunks that now should be authenticated. As a result, such packet will
      now contain COOKIE_ECHO + AUTH + DATA chunks, in that order.
      Reported-by: default avatarLiu Wei <weliu@redhat.com>
      Signed-off-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Acked-by: default avatarVlad Yasevich <vyasevich@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ae36806a
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.dk/linux-block · b85dfd30
      Linus Torvalds authored
      Pull block layer fixes from Jens Axboe:
       "Remember about a week ago when I sent the last pull request for 4.1?
        Well, I lied.  Now, I don't want to shift the blame, but Dan, Ming,
        and Richard made a liar out of me.
      
        Here are three small patches that should go into 4.1.  More
        specifically, this pull request contains:
      
         - A Kconfig dependency for the pmem block driver, so it can't be
           selected if HAS_IOMEM isn't availble.  From Richard Weinberger.
      
         - A fix for genhd, making the ext_devt_lock softirq safe.  This makes
           lockdep happier, since we also end up grabbing this lock on release
           off the softirq path.  From Dan Williams.
      
         - A blk-mq software queue release fix from Ming Lei.
      
        Last two are headed to stable, first fixes an issue introduced in this
        cycle"
      
      * 'for-linus' of git://git.kernel.dk/linux-block:
        block: pmem: Add dependency on HAS_IOMEM
        block: fix ext_dev_lock lockdep report
        blk-mq: free hctx->ctxs in queue's release handler
      b85dfd30
    • Linus Torvalds's avatar
      Merge tag 'md/4.1-rc7-fixes' of git://neil.brown.name/md · 7b565d9d
      Linus Torvalds authored
      Pull three more md fixes from Neil Brown:
       "Hasn't been a good cycle for md has it :-(
      
        The main issue fixed here is a rare race which can result in two
        reshape threads running at once, which doesn't end well.
      
        Also a minor issue with a write to a sysfs file returning the wrong
        value.  Backports to 4.0-stable are indicated"
      
      * tag 'md/4.1-rc7-fixes' of git://neil.brown.name/md:
        md: make sure MD_RECOVERY_DONE is clear before starting recovery/resync
        md: Close race when setting 'action' to 'idle'.
        md: don't return 0 from array_state_store
      7b565d9d
    • Linus Torvalds's avatar
      Merge git://git.infradead.org/intel-iommu · c39f3bc6
      Linus Torvalds authored
      Pull VT-d hardware workarounds from David Woodhouse:
       "This contains a workaround for hardware issues which I *thought* were
        never going to be seen on production hardware.  I'm glad I checked
        that before the 4.1 release...
      
        Firstly, PASID support is so broken on existing chips that we're just
        going to declare the old capability bit 28 as 'reserved' and change
        the VT-d spec to move PASID support to another bit.  So any existing
        hardware doesn't support SVM; it only sets that (now) meaningless bit
        28.
      
        That patch *wasn't* imperative for 4.1 because we don't have PASID
        support yet.  But *even* the extended context tables are broken — if
        you just enable the wider tables and use none of the new bits in them,
        which is precisely what 4.1 does, you find that translations don't
        work.  It's this problem which I thought was caught in time to be
        fixed before production, but wasn't.
      
        To avoid triggering this issue, we now *only* enable the extended
        context tables on hardware which also advertises "we have PASID
        support and we actually tested it this time" with the new PASID
        feature bit.
      
        In addition, I've added an 'intel_iommu=ecs_off' command line
        parameter to allow us to disable it manually if we need to"
      
      * git://git.infradead.org/intel-iommu:
        iommu/vt-d: Only enable extended context tables if PASID is supported
        iommu/vt-d: Change PASID support to bit 40 of Extended Capability Register
      c39f3bc6
    • Ranjit Waghmode's avatar
      spi: Add support for Zynq Ultrascale+ MPSoC GQSPI controller · dfe11a11
      Ranjit Waghmode authored
      This patch adds support for GQSPI controller driver used by
      Zynq Ultrascale+ MPSoC
      Signed-off-by: default avatarRanjit Waghmode <ranjit.waghmode@xilinx.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      dfe11a11
    • Ranjit Waghmode's avatar
      spi: zynq: Add DT bindings documentation for Zynq Ultrascale+ MPSoC GQSPI controller · fe8e48ad
      Ranjit Waghmode authored
      Add bindings documentation for GQSPI controller driver used by
      Zynq Ultrascale+ MPSoC
      Signed-off-by: default avatarRanjit Waghmode <ranjit.waghmode@xilinx.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      fe8e48ad
    • Mirza Krak's avatar
      spi: fsl-dspi: Use pinctrl PM helpers · 432a17d7
      Mirza Krak authored
      Add support for "sleep" state of pinctrl.
      Signed-off-by: default avatarMirza Krak <mirza.krak@hostmobility.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      432a17d7
    • David Woodhouse's avatar
      iommu/vt-d: Only enable extended context tables if PASID is supported · c83b2f20
      David Woodhouse authored
      Although the extended tables are theoretically a completely orthogonal
      feature to PASID and anything else that *uses* the newly-available bits,
      some of the early hardware has problems even when all we do is enable
      them and use only the same bits that were in the old context tables.
      
      For now, there's no motivation to support extended tables unless we're
      going to use PASID support to do SVM. So just don't use them unless
      PASID support is advertised too. Also add a command-line bailout just in
      case later chips also have issues.
      
      The equivalent problem for PASID support has already been fixed with the
      upcoming VT-d spec update and commit bd00c606 ("iommu/vt-d: Change
      PASID support to bit 40 of Extended Capability Register"), because the
      problematic platforms use the old definition of the PASID-capable bit,
      which is now marked as reserved and meaningless.
      
      So with this change, we'll magically start using ECS again only when we
      see the new hardware advertising "hey, we have PASID support and we
      actually tested it this time" on bit 40.
      
      The VT-d hardware architect has promised that we are not going to have
      any reason to support ECS *without* PASID any time soon, and he'll make
      sure he checks with us before changing that.
      
      In the future, if hypothetical new features also use new bits in the
      context tables and can be seen on implementations *without* PASID support,
      we might need to add their feature bits to the ecs_enabled() macro.
      Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
      c83b2f20
    • NeilBrown's avatar
      md: make sure MD_RECOVERY_DONE is clear before starting recovery/resync · ea358cd0
      NeilBrown authored
      MD_RECOVERY_DONE is normally cleared by md_check_recovery after a
      resync etc finished.  However it is possible for raid5_start_reshape
      to race and start a reshape before MD_RECOVERY_DONE is cleared.  This
      can lean to multiple reshapes running at the same time, which isn't
      good.
      
      To make sure it is cleared before starting a reshape, and also clear
      it when reaping a thread, just to be safe.
      Signed-off-by: default avatarNeilBrown  <neilb@suse.de>
      ea358cd0
    • NeilBrown's avatar
      md: Close race when setting 'action' to 'idle'. · 8e8e2518
      NeilBrown authored
      Checking ->sync_thread without holding the mddev_lock()
      isn't really safe, even after flushing the workqueue which
      ensures md_start_sync() has been run.
      
      While this code is waiting for the lock, md_check_recovery could reap
      the thread itself, and then start another thread (e.g. recovery might
      finish, then reshape starts).  When this thread gets the lock
      md_start_sync() hasn't run so it doesn't get reaped, but
      MD_RECOVERY_RUNNING gets cleared.  This allows two threads to start
      which leads to confusion.
      
      So don't both if MD_RECOVERY_RUNNING isn't set, but if it is do
      the flush and the test and the reap all under the mddev_lock to
      avoid any race with md_check_recovery.
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      Fixes: 6791875e ("md: make reconfig_mutex optional for writes to md sysfs files.")
      Cc: stable@vger.kernel.org (v4.0+)
      8e8e2518
    • NeilBrown's avatar
      md: don't return 0 from array_state_store · c008f1d3
      NeilBrown authored
      Returning zero from a 'store' function is bad.
      The return value should be either len length of the string
      or an error.
      
      So use 'len' if 'err' is zero.
      
      Fixes: 6791875e ("md: make reconfig_mutex optional for writes to md sysfs files.")
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      Cc: stable@vger.kernel (v4.0+)
      c008f1d3
    • Krzysztof Kozlowski's avatar
      dmaengine: Fix choppy sound because of unimplemented resume · 88d04643
      Krzysztof Kozlowski authored
      Some drivers implement only pause operation (no resuming). Example is
      pl330 where pause is needed for getting residuum. pl330 does not support
      resume operation, transfer must be stopped after pause.
      
      However for slaves this is exposed always as "pause and resume" which
      introduces subtle errors on Odroid U3 board (Exynos4412 with pl330).
      After adding pause function to pl330 driver the audio playback
      (utilizing DMA) gets choppy after some time (approximately 24 hours).
      
      Fix this by exposing "cmd_pause" if and only if pause and resume are
      implemented.
      Signed-off-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Reported-by: gabriel@unseen.is
      Reported-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Cc: <stable@vger.kernel.org>
      Fixes: 88987d2c ("dmaengine: pl330: add DMA_PAUSE feature")
      Acked-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
      Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
      88d04643
    • Takashi Iwai's avatar
      ALSA: hda - Abort the probe without i915 binding for HSW/BDW · 535115b5
      Takashi Iwai authored
      The previous patch tried to continue the probe if i915 binding fails.
      For for simplicity reason, we haven't implemented abort even for
      controller chips that are dedicated for HDMI/DP on HSW and BDW.
      However, Mengdong suggested that this can be dangerous; BIOS may
      disable gfx power well although the PCI entry for HD-audio is left,
      and this may result in the unexpected behavior, kernel errors, etc.
      
      For avoiding this situation, abort the probe at i915 binding failure
      only for HSW/BDW chips selectively.  For other chips, it still
      continues.
      
      Fixes: bf06848b ('ALSA: hda - Continue probing even if i915 binding fails')
      Reported-by: default avatarMengdong Lin <mengdong.lin@intel.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      535115b5