1. 31 Aug, 2018 7 commits
  2. 30 Aug, 2018 14 commits
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-core' · a0b9c4de
      Rafael J. Wysocki authored
      Merge a generic clock management fix for 4.19-rc2.
      
      * pm-core:
        PM / clk: signedness bug in of_pm_clk_add_clks()
      a0b9c4de
    • Wolfram Sang's avatar
      i2c: sh_mobile: fix leak when using DMA bounce buffer · cebc07d8
      Wolfram Sang authored
      We only freed the bounce buffer after successful DMA, missing the cases
      where DMA setup may have gone wrong. Use a better location which always
      gets called after each message and use 'stop_after_dma' as a flag for a
      successful transfer.
      Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
      Reviewed-by: default avatarNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      cebc07d8
    • Wolfram Sang's avatar
      i2c: sh_mobile: define start_ch() void as it only returns 0 anyhow · 531db501
      Wolfram Sang authored
      After various refactoring over the years, start_ch() doesn't return
      errno anymore, so make the function return void. This saves the error
      handling when calling it which in turn eases cleanup of resources of a
      future patch.
      Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
      Reviewed-by: default avatarNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      531db501
    • Wolfram Sang's avatar
      i2c: refactor function to release a DMA safe buffer · 82fe39a6
      Wolfram Sang authored
      a) rename to 'put' instead of 'release' to match 'get' when obtaining
         the buffer
      b) change the argument order to have the buffer as first argument
      c) add a new argument telling the function if the message was
         transferred. This allows the function to be used also in cases
         where setting up DMA failed, so the buffer needs to be freed without
         syncing to the message buffer.
      
      Also convert the only user.
      Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
      Reviewed-by: default avatarNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      82fe39a6
    • Jan Kundrát's avatar
      i2c: algos: bit: make the error messages grepable · 1204d12a
      Jan Kundrát authored
      Yep, I went looking for one of these, and I wasn't able to find it
      easily.  That's worse than a line which is 82-chars long, IMHO.
      Signed-off-by: default avatarJan Kundrát <jan.kundrat@cesnet.cz>
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      1204d12a
    • Hans de Goede's avatar
      i2c: designware: Re-init controllers with pm_disabled set on resume · 9d9a152e
      Hans de Goede authored
      On Bay Trail and Cherry Trail devices we set the pm_disabled flag for I2C
      busses which the OS shares with the PUNIT as these need special handling.
      Until now we called dev_pm_syscore_device(dev, true) for I2C controllers
      with this flag set to keep these I2C controllers always on.
      
      After commit 12864ff8 ("ACPI / LPSS: Avoid PM quirks on suspend and
      resume from hibernation"), this no longer works. This commit modifies
      lpss_iosf_exit_d3_state() to only run if lpss_iosf_enter_d3_state() has ran
      before it, so that it does not run on a resume from hibernate (or from S3).
      
      On these systems the conditions for lpss_iosf_enter_d3_state() to run
      never become true, so lpss_iosf_exit_d3_state() never gets called and
      the 2 LPSS DMA controllers never get forced into D0 mode, instead they
      are left in their default automatic power-on when needed mode.
      
      The not forcing of D0 mode for the DMA controllers enables these systems
      to properly enter S0ix modes, which is a good thing.
      
      But after entering S0ix modes the I2C controller connected to the PMIC
      no longer works, leading to e.g. broken battery monitoring.
      
      The _PS3 method for this I2C controller looks like this:
      
                  Method (_PS3, 0, NotSerialized)  // _PS3: Power State 3
                  {
                      If ((((PMID == 0x04) || (PMID == 0x05)) || (PMID == 0x06)))
                      {
                          Return (Zero)
                      }
      
                      PSAT |= 0x03
                      Local0 = PSAT /* \_SB_.I2C5.PSAT */
                  }
      
      Where PMID = 0x05, so we enter the Return (Zero) path on these systems.
      
      So even if we were to not call dev_pm_syscore_device(dev, true) the
      I2C controller will be left in D0 rather then be switched to D3.
      
      Yet on other Bay and Cherry Trail devices S0ix is not entered unless *all*
      I2C controllers are in D3 mode. This combined with the I2C controller no
      longer working now that we reach S0ix states on these systems leads to me
      believing that the PUNIT itself puts the I2C controller in D3 when all
      other conditions for entering S0ix states are true.
      
      Since now the I2C controller is put in D3 over a suspend/resume we must
      re-initialize it afterwards and that does indeed fix it no longer working.
      
      This commit implements this fix by:
      
      1) Making the suspend_late callback a no-op if pm_disabled is set and
      making the resume_early callback skip the clock re-enable (since it now was
      not disabled) while still doing the necessary I2C controller re-init.
      
      2) Removing the dev_pm_syscore_device(dev, true) call, so that the suspend
      and resume callbacks are actually called. Normally this would cause the
      ACPI pm code to call _PS3 putting the I2C controller in D3, wreaking havoc
      since it is shared with the PUNIT, but in this special case the _PS3 method
      is a no-op so we can safely allow a "fake" suspend / resume.
      
      Fixes: 12864ff8 ("ACPI / LPSS: Avoid PM quirks on suspend and resume ...")
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=200861
      Cc: 4.15+ <stable@vger.kernel.org> # 4.15+
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Acked-by: default avatarJarkko Nikula <jarkko.nikula@linux.intel.com>
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      9d9a152e
    • Mika Westerberg's avatar
      i2c: i801: Allow ACPI AML access I/O ports not reserved for SMBus · 7fd6d98b
      Mika Westerberg authored
      Commit 7ae81952cda ("i2c: i801: Allow ACPI SystemIO OpRegion to conflict
      with PCI BAR") made it possible for AML code to access SMBus I/O ports
      by installing custom SystemIO OpRegion handler and blocking i80i driver
      access upon first AML read/write to this OpRegion.
      
      However, while ThinkPad T560 does have SystemIO OpRegion declared under
      the SMBus device, it does not access any of the SMBus registers:
      
          Device (SMBU)
          {
              ...
      
              OperationRegion (SMBP, PCI_Config, 0x50, 0x04)
              Field (SMBP, DWordAcc, NoLock, Preserve)
              {
                  ,   5,
                  TCOB,   11,
                  Offset (0x04)
              }
      
              Name (TCBV, 0x00)
              Method (TCBS, 0, NotSerialized)
              {
                  If ((TCBV == 0x00))
                  {
                  TCBV = (\_SB.PCI0.SMBU.TCOB << 0x05)
                  }
      
                  Return (TCBV) /* \_SB_.PCI0.SMBU.TCBV */
              }
      
              OperationRegion (TCBA, SystemIO, TCBS (), 0x10)
              Field (TCBA, ByteAcc, NoLock, Preserve)
              {
                  Offset (0x04),
                  ,   9,
                  CPSC,   1
              }
          }
      
      Problem with the current approach is that it blocks all I/O port access
      and because this system has touchpad connected to the SMBus controller
      after first AML access (happens during suspend/resume cycle) the
      touchpad fails to work anymore.
      
      Fix this so that we allow ACPI AML I/O port access if it does not touch
      the region reserved for the SMBus.
      
      Fixes: 7ae81952cda ("i2c: i801: Allow ACPI SystemIO OpRegion to conflict with PCI BAR")
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=200737Reported-by: default avatarYussuf Khalil <dev@pp3345.net>
      Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Reviewed-by: default avatarJean Delvare <jdelvare@suse.de>
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      7fd6d98b
    • Linus Torvalds's avatar
      Merge tag 'for-linus-20180830' of git://git.kernel.dk/linux-block · fb646385
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "Small collection of fixes that should go into this series. This pull
        contains:
      
         - NVMe pull request with three small fixes (via Christoph)
      
         - Kill useless NULL check before kmem_cache_destroy (Chengguang Xu)
      
         - Xen block driver pull request with persistent grant flushing fixes
           (Juergen Gross)
      
         - Final wbt fixes, wrapping up the changes for this series. These
           have been heavily tested (me)
      
         - cdrom info leak fix (Scott Bauer)
      
         - ATA dma quirk for SQ201 (Linus Walleij)
      
         - Straight forward bsg refcount_t conversion (John Pittman)"
      
      * tag 'for-linus-20180830' of git://git.kernel.dk/linux-block:
        cdrom: Fix info leak/OOB read in cdrom_ioctl_drive_status
        nvmet: free workqueue object if module init fails
        nvme-fcloop: Fix dropped LS's to removed target port
        nvme-pci: add a memory barrier to nvme_dbbuf_update_and_check_event
        block: bsg: move atomic_t ref_count variable to refcount API
        block: remove unnecessary condition check
        ata: ftide010: Add a quirk for SQ201
        blk-wbt: remove dead code
        blk-wbt: improve waking of tasks
        blk-wbt: abstract out end IO completion handler
        xen/blkback: remove unused pers_gnts_lock from struct xen_blkif_ring
        xen/blkback: move persistent grants flags to bool
        xen/blkfront: reorder tests in xlblk_init()
        xen/blkfront: cleanup stale persistent grants
        xen/blkback: don't keep persistent grants too long
      fb646385
    • Linus Torvalds's avatar
      Merge tag 'mtd/for-4.19-rc2' of git://git.infradead.org/linux-mtd · 9f8f16c8
      Linus Torvalds authored
      Pull mtd fixes from Boris Brezillon:
       "Raw NAND fixes:
      
         - denali: Fix a regression caused by the nand_scan() rework
      
         - docg4: Fix a build error when gcc decides to not iniline some
           functions (can be reproduced with gcc 4.1.2):
      
      * tag 'mtd/for-4.19-rc2' of git://git.infradead.org/linux-mtd:
        mtd: rawnand: denali: do not pass zero maxchips to nand_scan()
        mtd: rawnand: docg4: Remove wrong __init annotations
      9f8f16c8
    • Linus Torvalds's avatar
      Merge tag 'mmc-v4.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · 48f8e8e9
      Linus Torvalds authored
      Pull MMC fixes from Ulf Hansson:
       "MMC core:
         - Fix unsupported parallel dispatch of requests
      
        MMC host:
         - atmel-mci/android-goldfish: Fixup logic of sg_copy_{from,to}_buffer
         - renesas_sdhi_internal_dmac: Prevent IRQ-storm due of DMAC IRQs
         - renesas_sdhi_internal_dmac: Fixup bad register offset"
      
      * tag 'mmc-v4.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        mmc: renesas_sdhi_internal_dmac: mask DMAC interrupts
        mmc: renesas_sdhi_internal_dmac: fix #define RST_RESERVED_BITS
        mmc: block: Fix unsupported parallel dispatch of requests
        mmc: android-goldfish: fix bad logic of sg_copy_{from,to}_buffer conversion
        mmc: atmel-mci: fix bad logic of sg_copy_{from,to}_buffer conversion
      48f8e8e9
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-4.19-rc2' of... · 58c3f14f
      Linus Torvalds authored
      Merge tag 'riscv-for-linus-4.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux
      
      Pull RISC-V fixes from Palmer Dabbelt:
       "RISC-V Fixes and Cleanups for 4.19-rc2
      
        This contains a handful of patches that filtered their way in during
        the merge window but just didn't make the deadline. It includes:
      
         - Additional documentation in the riscv,cpu-intc device tree binding
           that resulted from some feedback I missed in the original patch
           set.
      
         - A build fix that provides the definition of tlb_flush() before
           including tlb.h, which fixes a RISC-V build regression introduced
           during this merge window.
      
         - A cosmetic cleanup to sys_riscv_flush_icache()"
      
      * tag 'riscv-for-linus-4.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux:
        RISC-V: Use a less ugly workaround for unused variable warnings
        riscv: tlb: Provide definition of tlb_flush() before including tlb.h
        dt-bindings: riscv,cpu-intc: Cleanups from a missed review
      58c3f14f
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2018-08-29' of... · 49a51c4b
      Dave Airlie authored
      Merge tag 'drm-intel-fixes-2018-08-29' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
      
      - fix for GLK and CNL watermark workaround
      - fix for display affecting NUCs with LSPCON
      - freeing an allocated write_buf on hdcp
      - audio hook when display is disabled
      - vma stop holding ppgtt reference
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180829234512.GA32468@intel.com
      49a51c4b
    • Dave Airlie's avatar
      Merge branch 'drm-fixes-4.19' of git://people.freedesktop.org/~agd5f/linux into drm-fixes · 185c3cfa
      Dave Airlie authored
      Fixes for 4.19:
      - SR-IOV fixes
      - Kasan and page fault fix on device removal
      - S3 stability fix for CZ/ST
      - VCE regression fixes for CIK parts
      - Avoid holding the mn_lock when allocating memory
      - DC memory leak fix
      - BO eviction fix
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Alex Deucher <alexdeucher@gmail.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180829202555.2653-1-alexander.deucher@amd.com
      185c3cfa
    • Dave Airlie's avatar
      Merge branch 'mediatek-drm-fixes-4.19' of... · 852fde0a
      Dave Airlie authored
      Merge branch 'mediatek-drm-fixes-4.19' of https://github.com/ckhu-mediatek/linux.git-tags into drm-fixes
      
      "Here are some fixes for mediatek drm driver."
      
      Mostly fixes around the RDMA and Overlay
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: CK Hu <ck.hu@mediatek.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/1535346194.27648.5.camel@mtksdaap41
      852fde0a
  3. 29 Aug, 2018 10 commits
  4. 28 Aug, 2018 9 commits