1. 08 Nov, 2020 7 commits
    • Linus Torvalds's avatar
      Merge branch 'hch' (patches from Christoph) · 6b2c4d52
      Linus Torvalds authored
      Merge procfs splice read fixes from Christoph Hellwig:
       "Greg reported a problem due to the fact that Android tests use procfs
        files to test splice, which stopped working with the changes for
        set_fs() removal.
      
        This series adds read_iter support for seq_file, and uses those for
        various proc files using seq_file to restore splice read support"
      
      [ Side note: Christoph initially had a scripted "move everything over"
        patch, which looks fine, but I personally would prefer us to actively
        discourage splice() on random files.  So this does just the minimal
        basic core set of proc file op conversions.
      
        For completeness, and in case people care, that script was
      
           sed -i -e 's/\.proc_read\(\s*=\s*\)seq_read/\.proc_read_iter\1seq_read_iter/g'
      
        but I'll wait and see if somebody has a strong argument for using
        splice on random small /proc files before I'd run it on the whole
        kernel.   - Linus ]
      
      * emailed patches from Christoph Hellwig <hch@lst.de>:
        proc "seq files": switch to ->read_iter
        proc "single files": switch to ->read_iter
        proc/stat: switch to ->read_iter
        proc/cpuinfo: switch to ->read_iter
        proc: wire up generic_file_splice_read for iter ops
        seq_file: add seq_read_iter
      6b2c4d52
    • Linus Torvalds's avatar
      Merge tag 'x86-urgent-2020-11-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 40be821d
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
       "A set of x86 fixes:
      
         - Use SYM_FUNC_START_WEAK in the mem* ASM functions instead of a
           combination of .weak and SYM_FUNC_START_LOCAL which makes LLVMs
           integrated assembler upset
      
         - Correct the mitigation selection logic which prevented the related
           prctl to work correctly
      
         - Make the UV5 hubless system work correctly by fixing up the
           malformed table entries and adding the missing ones"
      
      * tag 'x86-urgent-2020-11-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/platform/uv: Recognize UV5 hubless system identifier
        x86/platform/uv: Remove spaces from OEM IDs
        x86/platform/uv: Fix missing OEM_TABLE_ID
        x86/speculation: Allow IBPB to be conditionally enabled on CPUs with always-on STIBP
        x86/lib: Change .weak to SYM_FUNC_START_WEAK for arch/x86/lib/mem*_64.S
      40be821d
    • Linus Torvalds's avatar
      Merge tag 'perf-urgent-2020-11-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 100e3891
      Linus Torvalds authored
      Pull perf fix from Thomas Gleixner:
       "A single fix for the perf core plugging a memory leak in the address
        filter parser"
      
      * tag 'perf-urgent-2020-11-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/core: Fix a memory leak in perf_event_parse_addr_filter()
      100e3891
    • Linus Torvalds's avatar
      Merge tag 'locking-urgent-2020-11-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · aaaaa7ec
      Linus Torvalds authored
      Pull futex fix from Thomas Gleixner:
       "A single fix for the futex code where an intermediate state in the
        underlying RT mutex was not handled correctly and triggering a BUG()
        instead of treating it as another variant of retry condition"
      
      * tag 'locking-urgent-2020-11-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        futex: Handle transient "ownerless" rtmutex state correctly
      aaaaa7ec
    • Linus Torvalds's avatar
      Merge tag 'irq-urgent-2020-11-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 15a98444
      Linus Torvalds authored
      Pull irq fixes from Thomas Gleixner:
       "A set of fixes for interrupt chip drivers:
      
         - Fix the fallout of the IPI as interrupt conversion in Kconfig and
           the BCM2836 interrupt chip driver
      
         - Fixes for interrupt affinity setting and the handling of
           hierarchical irq domains in the SiFive PLIC driver
      
         - Make the unmapped event handling in the TI SCI driver work
           correctly
      
         - A few minor fixes and cleanups in various chip drivers and Kconfig"
      
      * tag 'irq-urgent-2020-11-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        dt-bindings: irqchip: ti, sci-inta: Fix diagram indentation for unmapped events
        irqchip/ti-sci-inta: Add support for unmapped event handling
        dt-bindings: irqchip: ti, sci-inta: Update for unmapped event handling
        irqchip/renesas-intc-irqpin: Merge irlm_bit and needs_irlm
        irqchip/sifive-plic: Fix chip_data access within a hierarchy
        irqchip/sifive-plic: Fix broken irq_set_affinity() callback
        irqchip/stm32-exti: Add all LP timer exti direct events support
        irqchip/bcm2836: Fix missing __init annotation
        irqchip/mips: Drop selection of IRQ_DOMAIN_HIERARCHY
        irqchip/mst: Make mst_intc_of_init static
        irqchip/mst: MST_IRQ should depend on ARCH_MEDIATEK or ARCH_MSTARV7
        genirq: Let GENERIC_IRQ_IPI select IRQ_DOMAIN_HIERARCHY
      15a98444
    • Linus Torvalds's avatar
      Merge tag 'core-urgent-2020-11-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 6a8d0d28
      Linus Torvalds authored
      Pull entry code fix from Thomas Gleixner:
       "A single fix for the generic entry code to correct the wrong
        assumption that the lockdep interrupt state needs not to be
        established before calling the RCU check"
      
      * tag 'core-urgent-2020-11-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        entry: Fix the incorrect ordering of lockdep and RCU check
      6a8d0d28
    • Linus Torvalds's avatar
      Merge tag 'powerpc-5.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · e942d752
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
      
       - fix miscompilation with GCC 4.9 by using asm_goto_volatile for put_user()
      
       - fix for an RCU splat at boot caused by a recent lockdep change
      
       - fix for a possible deadlock in our EEH debugfs code
      
       - several fixes for handling of _PAGE_ACCESSED on 32-bit platforms
      
       - build fix when CONFIG_NUMA=n
      
      Thanks to Andreas Schwab, Christophe Leroy, Oliver O'Halloran, Qian Cai,
      and Scott Cheloha.
      
      * tag 'powerpc-5.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/numa: Fix build when CONFIG_NUMA=n
        powerpc/8xx: Manage _PAGE_ACCESSED through APG bits in L1 entry
        powerpc/8xx: Always fault when _PAGE_ACCESSED is not set
        powerpc/40x: Always fault when _PAGE_ACCESSED is not set
        powerpc/603: Always fault when _PAGE_ACCESSED is not set
        powerpc: Use asm_goto_volatile for put_user()
        powerpc/smp: Call rcu_cpu_starting() earlier
        powerpc/eeh_cache: Fix a possible debugfs deadlock
      e942d752
  2. 07 Nov, 2020 9 commits
    • Linus Torvalds's avatar
      Merge tag 'block-5.10-2020-11-07' of git://git.kernel.dk/linux-block · 4429f14a
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
      
       - NVMe pull request from Christoph:
          - revert a nvme_queue size optimization (Keith Bush)
          - fabrics timeout races fixes (Chao Leng and Sagi Grimberg)"
      
       - null_blk zone locking fix (Damien)
      
      * tag 'block-5.10-2020-11-07' of git://git.kernel.dk/linux-block:
        null_blk: Fix scheduling in atomic with zoned mode
        nvme-tcp: avoid repeated request completion
        nvme-rdma: avoid repeated request completion
        nvme-tcp: avoid race between time out and tear down
        nvme-rdma: avoid race between time out and tear down
        nvme: introduce nvme_sync_io_queues
        Revert "nvme-pci: remove last_sq_tail"
      4429f14a
    • Linus Torvalds's avatar
      Merge tag 'io_uring-5.10-2020-11-07' of git://git.kernel.dk/linux-block · e9c02d68
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "A set of fixes for io_uring:
      
         - SQPOLL cancelation fixes
      
         - Two fixes for the io_identity COW
      
         - Cancelation overflow fix (Pavel)
      
         - Drain request cancelation fix (Pavel)
      
         - Link timeout race fix (Pavel)"
      
      * tag 'io_uring-5.10-2020-11-07' of git://git.kernel.dk/linux-block:
        io_uring: fix link lookup racing with link timeout
        io_uring: use correct pointer for io_uring_show_cred()
        io_uring: don't forget to task-cancel drained reqs
        io_uring: fix overflowed cancel w/ linked ->files
        io_uring: drop req/tctx io_identity separately
        io_uring: ensure consistent view of original task ->mm from SQPOLL
        io_uring: properly handle SQPOLL request cancelations
        io-wq: cancel request if it's asking for files and we don't have them
      e9c02d68
    • Mike Galbraith's avatar
      futex: Handle transient "ownerless" rtmutex state correctly · 9f5d1c33
      Mike Galbraith authored
      Gratian managed to trigger the BUG_ON(!newowner) in fixup_pi_state_owner().
      This is one possible chain of events leading to this:
      
      Task Prio       Operation
      T1   120	lock(F)
      T2   120	lock(F)   -> blocks (top waiter)
      T3   50 (RT)	lock(F)   -> boosts T1 and blocks (new top waiter)
      XX   		timeout/  -> wakes T2
      		signal
      T1   50		unlock(F) -> wakes T3 (rtmutex->owner == NULL, waiter bit is set)
      T2   120	cleanup   -> try_to_take_mutex() fails because T3 is the top waiter
           			     and the lower priority T2 cannot steal the lock.
           			  -> fixup_pi_state_owner() sees newowner == NULL -> BUG_ON()
      
      The comment states that this is invalid and rt_mutex_real_owner() must
      return a non NULL owner when the trylock failed, but in case of a queued
      and woken up waiter rt_mutex_real_owner() == NULL is a valid transient
      state. The higher priority waiter has simply not yet managed to take over
      the rtmutex.
      
      The BUG_ON() is therefore wrong and this is just another retry condition in
      fixup_pi_state_owner().
      
      Drop the locks, so that T3 can make progress, and then try the fixup again.
      
      Gratian provided a great analysis, traces and a reproducer. The analysis is
      to the point, but it confused the hell out of that tglx dude who had to
      page in all the futex horrors again. Condensed version is above.
      
      [ tglx: Wrote comment and changelog ]
      
      Fixes: c1e2f0ea ("futex: Avoid violating the 10th rule of futex")
      Reported-by: default avatarGratian Crisan <gratian.crisan@ni.com>
      Signed-off-by: default avatarMike Galbraith <efault@gmx.de>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: stable@vger.kernel.org
      Link: https://lore.kernel.org/r/87a6w6x7bb.fsf@ni.com
      Link: https://lore.kernel.org/r/87sg9pkvf7.fsf@nanos.tec.linutronix.de
      9f5d1c33
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · af6e7de0
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "Driver bugfixes for I2C.
      
        Most of them are for the new mlxbf driver which got more exposure
        after rc1. The sh_mobile patch should already have reached you during
        the merge window, but I accidently dropped it. However, since it fixes
        a problem with rebooting, it is still fine for rc3"
      
      * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: designware: slave should do WRITE_REQUESTED before WRITE_RECEIVED
        i2c: designware: call i2c_dw_read_clear_intrbits_slave() once
        i2c: mlxbf: I2C_MLXBF should depend on MELLANOX_PLATFORM
        i2c: mlxbf: Update author and maintainer email info
        i2c: mlxbf: Update reference clock frequency
        i2c: mlxbf: Remove unecessary wrapper functions
        i2c: mlxbf: Fix resrticted cast warning of sparse
        i2c: mlxbf: Add CONFIG_ACPI to guard ACPI function call
        i2c: sh_mobile: implement atomic transfers
        i2c: mediatek: move dma reset before i2c reset
      af6e7de0
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 4b1d362d
      Linus Torvalds authored
      Pull RISC-V fixes from Palmer Dabbelt:
      
       - SPDX comment style fix
      
       - ignore memory that is unusable
      
       - avoid setting a kernel text offset for the !MMU kernels, where
         skipping the first page of memory is both unnecessary and costly
      
       - avoid passing the flag bits in satp to pfn_to_virt()
      
       - fix __put_kernel_nofault, where we had the arguments to
         __put_user_nocheck reversed
      
       - workaround for a bug in the FU540 to avoid triggering PMP issues
         during early boot
      
       - change to how we pull symbols out of the vDSO. The old mechanism was
         removed from binutils-2.35 (and has been backported to Debian's 2.34)
      
      * tag 'riscv-for-linus-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        RISC-V: Fix the VDSO symbol generaton for binutils-2.35+
        RISC-V: Use non-PGD mappings for early DTB access
        riscv: uaccess: fix __put_kernel_nofault()
        riscv: fix pfn_to_virt err in do_page_fault().
        riscv: Set text_offset correctly for M-Mode
        RISC-V: Remove any memblock representing unusable memory area
        risc-v: kernel: ftrace: Fixes improper SPDX comment style
      4b1d362d
    • kiyin(尹亮)'s avatar
      perf/core: Fix a memory leak in perf_event_parse_addr_filter() · 7bdb157c
      kiyin(尹亮) authored
      As shown through runtime testing, the "filename" allocation is not
      always freed in perf_event_parse_addr_filter().
      
      There are three possible ways that this could happen:
      
       - It could be allocated twice on subsequent iterations through the loop,
       - or leaked on the success path,
       - or on the failure path.
      
      Clean up the code flow to make it obvious that 'filename' is always
      freed in the reallocation path and in the two return paths as well.
      
      We rely on the fact that kfree(NULL) is NOP and filename is initialized
      with NULL.
      
      This fixes the leak. No other side effects expected.
      
      [ Dan Carpenter: cleaned up the code flow & added a changelog. ]
      [ Ingo Molnar: updated the changelog some more. ]
      
      Fixes: 375637bc ("perf/core: Introduce address range filtering")
      Signed-off-by: default avatar"kiyin(尹亮)" <kiyin@tencent.com>
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Cc: "Srivatsa S. Bhat" <srivatsa@csail.mit.edu>
      Cc: Anthony Liguori <aliguori@amazon.com>
      --
       kernel/events/core.c | 12 +++++-------
       1 file changed, 5 insertions(+), 7 deletions(-)
      7bdb157c
    • Mike Travis's avatar
      x86/platform/uv: Recognize UV5 hubless system identifier · 801284f9
      Mike Travis authored
      Testing shows a problem in that UV5 hubless systems were not being
      recognized.  Add them to the list of OEM IDs checked.
      
      Fixes: 6c779442 ("Add UV5 direct references")
      Signed-off-by: default avatarMike Travis <mike.travis@hpe.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Link: https://lore.kernel.org/r/20201105222741.157029-4-mike.travis@hpe.com
      
      801284f9
    • Mike Travis's avatar
      x86/platform/uv: Remove spaces from OEM IDs · 1aee505e
      Mike Travis authored
      Testing shows that trailing spaces caused problems with the OEM_ID and
      the OEM_TABLE_ID.  One being that the OEM_ID would not string compare
      correctly.  Another the OEM_ID and OEM_TABLE_ID would be concatenated
      in the printout.  Remove any trailing spaces.
      
      Fixes: 1e61f5a9 ("Add and decode Arch Type in UVsystab")
      Signed-off-by: default avatarMike Travis <mike.travis@hpe.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Link: https://lore.kernel.org/r/20201105222741.157029-3-mike.travis@hpe.com
      
      1aee505e
    • Mike Travis's avatar
      x86/platform/uv: Fix missing OEM_TABLE_ID · 1aec69ae
      Mike Travis authored
      Testing shows a problem in that the OEM_TABLE_ID was missing for
      hubless systems.  This is used to determine the APIC type (legacy or
      extended).  Add the OEM_TABLE_ID to the early hubless processing.
      
      Fixes: 1e61f5a9 ("Add and decode Arch Type in UVsystab")
      Signed-off-by: default avatarMike Travis <mike.travis@hpe.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Link: https://lore.kernel.org/r/20201105222741.157029-2-mike.travis@hpe.com
      1aec69ae
  3. 06 Nov, 2020 24 commits
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-5.10-rc3' of git://github.com/ceph/ceph-client · 659caaf6
      Linus Torvalds authored
      Pull ceph fix from Ilya Dryomov:
       "A fix for a potential stall on umount caused by the MDS dropping our
        REQUEST_CLOSE message. The code that handled this case was
        inadvertently disabled in 5.9, this patch removes it entirely and
        fixes the problem in a way that is consistent with ceph-fuse"
      
      * tag 'ceph-for-5.10-rc3' of git://github.com/ceph/ceph-client:
        ceph: check session state after bumping session->s_seq
      659caaf6
    • Linus Torvalds's avatar
      Merge tag 'linux-kselftest-fixes-5.10-rc3' of... · 03f0f5ad
      Linus Torvalds authored
      Merge tag 'linux-kselftest-fixes-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull Kselftest fixes from Shuah Khan:
       "Fixes to the ftrace test and several fixes from Tommi Rantala for
        various other tests"
      
      * tag 'linux-kselftest-fixes-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        selftests: binderfs: use SKIP instead of XFAIL
        selftests: clone3: use SKIP instead of XFAIL
        selftests: core: use SKIP instead of XFAIL in close_range_test.c
        selftests: proc: fix warning: _GNU_SOURCE redefined
        selftests: pidfd: drop needless linux/kcmp.h inclusion in pidfd_setns_test.c
        selftests: pidfd: add CONFIG_CHECKPOINT_RESTORE=y to config
        selftests: pidfd: skip test on kcmp() ENOSYS
        selftests: pidfd: use ksft_test_result_skip() when skipping test
        selftests/harness: prettify SKIP message whitespace again
        selftests: pidfd: fix compilation errors due to wait.h
        selftests: filter kselftest headers from command in lib.mk
        selftests/ftrace: check for do_sys_openat2 in user-memory test
        selftests/ftrace: Use $FUNCTION_FORK to reference kernel fork function
      03f0f5ad
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · d4fc9683
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Three driver fixes. Two (alua and hpsa) are in hard to trigger
        attach/detach situations but the mp3sas one involves a polled to
        interrupt switch over that could trigger in any high IOPS situation"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: mpt3sas: Fix timeouts observed while reenabling IRQ
        scsi: scsi_dh_alua: Avoid crash during alua_bus_detach()
        scsi: hpsa: Fix memory leak in hpsa_init_one()
      d4fc9683
    • Linus Torvalds's avatar
      Merge branch 'mtd/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux · bf3e7628
      Linus Torvalds authored
      Pull mtd fixes from Miquel Raynal.
      
      * 'mtd/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux:
        mtd: rawnand: stm32_fmc2: fix broken ECC
        mtd: spi-nor: Fix address width on flash chips > 16MB
        mtd: spi-nor: Don't copy self-pointing struct around
        mtd: rawnand: ifc: Move the ECC engine initialization to the right place
        mtd: rawnand: mxc: Move the ECC engine initialization to the right place
      bf3e7628
    • Linus Torvalds's avatar
      Merge tag 'spi-fix-v5.10-rc2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · 44d80621
      Linus Torvalds authored
      Pull spi fix from Mark Brown:
       "This is an additional fix on top of 5e31ba0c ('spi: bcm2835: fix
        gpio cs level inversion') - when sending my prior pull request I had
        misremembred the status of that patch, apologies for the noise here"
      
      * tag 'spi-fix-v5.10-rc2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
        spi: bcm2835: remove use of uninitialized gpio flags variable
      44d80621
    • Linus Torvalds's avatar
      Merge tag 'sound-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · bb72bbe8
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Quite a bunch of small fixes that have been gathered since the last
        pull, including changes like below:
      
         - HD-audio runtime PM fixes and refactoring
      
         - HD-audio and USB-audio quirks
      
         - SOF warning fix
      
         - Various ASoC device-specific fixes for Intel, Qualcomm, etc"
      
      * tag 'sound-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (26 commits)
        ALSA: usb-audio: Add implicit feedback quirk for Qu-16
        ASoC: mchp-spdiftx: Do not set Validity bit(s)
        ALSA: usb-audio: Add implicit feedback quirk for MODX
        ALSA: usb-audio: add usb vendor id as DSD-capable for Khadas devices
        ALSA: hda/realtek - Enable headphone for ASUS TM420
        ALSA: hda: prevent undefined shift in snd_hdac_ext_bus_get_link()
        ASoC: qcom: lpass-cpu: Fix clock disable failure
        ASoC: qcom: lpass-sc7180: Fix MI2S bitwidth field bit positions
        ASoC: codecs: wcd9335: Set digital gain range correctly
        ASoC: codecs: wcd934x: Set digital gain range correctly
        ALSA: hda: Reinstate runtime_allow() for all hda controllers
        ALSA: hda: Separate runtime and system suspend
        ALSA: hda: Refactor codec PM to use direct-complete optimization
        ALSA: hda/realtek - Fixed HP headset Mic can't be detected
        ALSA: usb-audio: Add implicit feedback quirk for Zoom UAC-2
        ALSA: make snd_kcontrol_new name a normal string
        ALSA: fix kernel-doc markups
        ASoC: SOF: loader: handle all SOF_IPC_EXT types
        ASoC: cs42l51: manage mclk shutdown delay
        ASoC: qcom: sdm845: set driver name correctly
        ...
      bb72bbe8
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2020-11-06-1' of git://anongit.freedesktop.org/drm/drm · fc7b66ef
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "It's Friday here so that means another installment of drm fixes to
        distract you from the counting process.
      
        Changes all over the place, the amdgpu changes contain support for a
        new GPU that is close to current one already in the tree (Green
        Sardine) so it shouldn't have much side effects.
      
        Otherwise imx has a few cleanup patches and fixes, amdgpu and i915
        have around the usual smattering of fixes, fonts got constified, and
        vc4/panfrost has some minor fixes. All in all a fairly regular rc3.
      
        We have an outstanding nouveau regression, but the author is looking
        into the fix, so should be here next week.
      
        I now return you to counting.
      
        fonts:
         - constify font structures.
      
        MAINTAINERS:
         - Fix path for amdgpu power management
      
        amdgpu:
         - Add support for more navi1x SKUs
         - Fix for suspend on CI dGPUs
         - VCN DPG fix for Picasso
         - Sienna Cichlid fixes
         - Polaris DPM fix
         - Add support for Green Sardine
      
        amdkfd:
         - Fix an allocation failure check
      
        i915:
         - Fix set domain's cache coherency
         - Fixes around breadcrumbs
         - Fix encoder lookup during PSR atomic
         - Hold onto an explicit ref to i915_vma_work.pinned
         - gvt: HWSP reset handling fix
         - gvt: flush workaround
         - gvt: vGPU context pin/unpin
         - gvt: mmio cmd access fix for bxt/apl
      
        imx:
         - drop unused functions and callbacks
         - reuse imx_drm_encoder_parse_of
         - spinlock rework
         - memory leak fix
         - minor cleanups
      
        vc4:
         - resource cleanup fix
      
        panfrost:
         - madvise/shrinker fix"
      
      * tag 'drm-fixes-2020-11-06-1' of git://anongit.freedesktop.org/drm/drm: (55 commits)
        drm/amdgpu/display: remove DRM_AMD_DC_GREEN_SARDINE
        drm/amd/display: Add green_sardine support to DM
        drm/amd/display: Add green_sardine support to DC
        drm/amdgpu: enable vcn support for green_sardine (v2)
        drm/amdgpu: enable green_sardine_asd.bin loading (v2)
        drm/amdgpu/sdma: add sdma engine support for green_sardine (v2)
        drm/amdgpu: add gfx support for green_sardine (v2)
        drm/amdgpu: add soc15 common ip block support for green_sardine (v3)
        drm/amdgpu: add green_sardine support for gpu_info and ip block setting (v2)
        drm/amdgpu: add Green_Sardine APU flag
        drm/amdgpu: resolved ASD loading issue on sienna
        amdkfd: Check kvmalloc return before memcpy
        drm/amdgpu: update golden setting for sienna_cichlid
        amd/amdgpu: Disable VCN DPG mode for Picasso
        drm/amdgpu/swsmu: remove duplicate call to smu_set_default_dpm_table
        drm/i915: Hold onto an explicit ref to i915_vma_work.pinned
        drm/i915/gt: Flush xcs before tgl breadcrumbs
        drm/i915/gt: Expose more parameters for emitting writes into the ring
        drm/i915: Fix encoder lookup during PSR atomic check
        drm/i915/gt: Use the local HWSP offset during submission
        ...
      fc7b66ef
    • Linus Torvalds's avatar
      Merge tag 'tpmdd-next-v5.10-rc4' of... · 28ced768
      Linus Torvalds authored
      Merge tag 'tpmdd-next-v5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd
      
      Pull tpm fixes from Jarkko Sakkinen:
       "Two critical tpm driver bug fixes"
      
      * tag 'tpmdd-next-v5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd:
        tpm: efi: Don't create binary_bios_measurements file for an empty log
        tpm_tis: Disable interrupts on ThinkPad T490s
      28ced768
    • Linus Torvalds's avatar
      Merge tag 'iommu-fixes-v5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 02a2aa35
      Linus Torvalds authored
      Pull iommu fixes from Joerg Roedel:
      
       - Fix a NULL-ptr dereference in the Intel VT-d driver
      
       - Two fixes for Intel SVM support
      
       - Increase IRQ remapping table size in the AMD IOMMU driver. The old
         number of 128 turned out to be too low for some recent devices.
      
       - Fix a mask check in generic IOMMU code
      
      * tag 'iommu-fixes-v5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        iommu: Fix a check in iommu_check_bind_data()
        iommu/vt-d: Fix a bug for PDP check in prq_event_thread
        iommu/vt-d: Fix sid not set issue in intel_svm_bind_gpasid()
        iommu/vt-d: Fix kernel NULL pointer dereference in find_domain()
        iommu/amd: Increase interrupt remapping table limit to 512 entries
      02a2aa35
    • Linus Torvalds's avatar
      Merge tag 'vfio-v5.10-rc3' of git://github.com/awilliam/linux-vfio · 1669ecf9
      Linus Torvalds authored
      Pull VFIO fixes from Alex Williamson:
      
       - Remove code by using existing helper (Zenghui Yu)
      
       - fsl-mc copy-user return and underflow fixes (Dan Carpenter)
      
       - fsl-mc static function declaration (Diana Craciun)
      
       - Fix ioeventfd sleeping under spinlock (Alex Williamson)
      
       - Fix pm reference count leak in vfio-platform (Zhang Qilong)
      
       - Allow opening IGD device w/o OpRegion support (Fred Gao)
      
      * tag 'vfio-v5.10-rc3' of git://github.com/awilliam/linux-vfio:
        vfio/pci: Bypass IGD init in case of -ENODEV
        vfio: platform: fix reference leak in vfio_platform_open
        vfio/pci: Implement ioeventfd thread handler for contended memory lock
        vfio/fsl-mc: Make vfio_fsl_mc_irqs_allocate static
        vfio/fsl-mc: prevent underflow in vfio_fsl_mc_mmap()
        vfio/fsl-mc: return -EFAULT if copy_to_user() fails
        vfio/type1: Use the new helper to find vfio_group
      1669ecf9
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 30f3f68e
      Linus Torvalds authored
      Pull arm64 fixes from Will Deacon:
       "Here's the weekly batch of fixes for arm64. Not an awful lot here, but
        there are still a few unresolved issues relating to CPU hotplug, RCU
        and IRQ tracing that I hope to queue fixes for next week.
      
        Summary:
      
         - Fix early use of kprobes
      
         - Fix kernel placement in kexec_file_load()
      
         - Bump maximum number of NUMA nodes"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: kexec_file: try more regions if loading segments fails
        arm64: kprobes: Use BRK instead of single-step when executing instructions out-of-line
        arm64: NUMA: Kconfig: Increase NODES_SHIFT to 4
      30f3f68e
    • Linus Torvalds's avatar
      Merge tag 'arc-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc · 4257087e
      Linus Torvalds authored
      Pull ARC fixes from Vineet Gupta:
      
       - Unbork HSDKv1 platform (won't boot) due to memory map issue
      
       - Prevent stack unwinder from infinite looping
      
      * tag 'arc-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
        ARC: [plat-hsdk] Remap CCMs super early in asm boot trampoline
        ARC: stack unwinding: avoid indefinite looping
      4257087e
    • Linus Torvalds's avatar
      Merge tag 's390-5.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · ee518148
      Linus Torvalds authored
      Pull s390 fixes from Heiko Carstens:
      
       - fix reference counting for ap devices
      
       - fix paes selftest
      
       - fix pmd_deref()/pud_deref() so they can also handle large pages
      
       - remove unused vdso file and defines
      
       - update defconfigs
      
       - call rcu_cpu_starting() early in smp init code to avoid lockdep
         warnings
      
       - fix hotplug of PCI function missing bus
      
      * tag 's390-5.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/pci: fix hot-plug of PCI function missing bus
        s390/smp: move rcu_cpu_starting() earlier
        s390/pkey: fix paes selftest failure with paes and pkey static build
        s390: update defconfigs
        s390/vdso: remove unused constants
        s390/vdso: remove empty unused file
        s390/mm: make pmd/pud_deref() large page aware
        s390/ap: fix ap devices reference counting
      ee518148
    • Linus Torvalds's avatar
      Merge tag 'net-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 41f16530
      Linus Torvalds authored
      Pull networking fixes from Jakub Kicinski:
       "Networking fixes for 5.10-rc3, including fixes from wireless, can, and
        netfilter subtrees.
      
        Current merge window - bugs in new features:
      
         - can: isotp: isotp_rcv_cf(): enable RX timeout handling in
           listen-only mode
      
        Previous releases - regressions:
      
         - mac80211:
            - don't require VHT elements for HE on 2.4 GHz
            - fix regression where EAPOL frames were sent in plaintext
      
         - netfilter:
            - ipset: Update byte and packet counters regardless of whether
              they match
      
         - ip_tunnel: fix over-mtu packet send by allowing fragmenting even if
           inner packet has IP_DF (don't fragment) set in its header (when
           TUNNEL_DONT_FRAGMENT flag is not set on the tunnel dev)
      
         - net: fec: fix MDIO probing for some FEC hardware blocks
      
         - ip6_tunnel: set inner ipproto before ip6_tnl_encap to un-break gso
           support
      
         - sctp: Fix COMM_LOST/CANT_STR_ASSOC err reporting on big-endian
           platforms, sparse-related fix used the wrong integer size
      
        Previous releases - always broken:
      
         - netfilter: use actual socket sk rather than skb sk when routing
           harder
      
         - r8169: work around short packet hw bug on RTL8125 by padding frames
      
         - net: ethernet: ti: cpsw: disable PTPv1 hw timestamping
           advertisement, the hardware does not support it
      
         - chelsio/chtls: fix always leaking ctrl_skb and another leak caused
           by a race condition
      
         - fix drivers incorrectly writing into skbs on TX:
            - cadence: force nonlinear buffers to be cloned
            - gianfar: Account for Tx PTP timestamp in the skb headroom
            - gianfar: Replace skb_realloc_headroom with skb_cow_head for PTP
      
         - can: flexcan:
            - remove FLEXCAN_QUIRK_DISABLE_MECR quirk for LS1021A
            - add ECC initialization for VF610 and LX2160A
            - flexcan_remove(): disable wakeup completely
      
         - can: fix packet echo functionality:
            - peak_canfd: fix echo management when loopback is on
            - make sure skbs are not freed in IRQ context in case they need to
              be dropped
            - always clone the skbs to make sure they have a reference on the
              socket, and prevent it from disappearing
            - fix real payload length return value for RTR frames
      
         - can: j1939: return failure on bind if netdev is down, rather than
           waiting indefinitely
      
        Misc:
      
         - IPv6: reply ICMP error if the first fragment don't include all
           headers to improve compliance with RFC 8200"
      
      * tag 'net-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (66 commits)
        ionic: check port ptr before use
        r8169: work around short packet hw bug on RTL8125
        net: openvswitch: silence suspicious RCU usage warning
        chelsio/chtls: fix always leaking ctrl_skb
        chelsio/chtls: fix memory leaks caused by a race
        can: flexcan: flexcan_remove(): disable wakeup completely
        can: flexcan: add ECC initialization for VF610
        can: flexcan: add ECC initialization for LX2160A
        can: flexcan: remove FLEXCAN_QUIRK_DISABLE_MECR quirk for LS1021A
        can: mcp251xfd: remove unneeded break
        can: mcp251xfd: mcp251xfd_regmap_nocrc_read(): fix semicolon.cocci warnings
        can: mcp251xfd: mcp251xfd_regmap_crc_read(): increase severity of CRC read error messages
        can: peak_canfd: pucan_handle_can_rx(): fix echo management when loopback is on
        can: peak_usb: peak_usb_get_ts_time(): fix timestamp wrapping
        can: peak_usb: add range checking in decode operations
        can: xilinx_can: handle failure cases of pm_runtime_get_sync
        can: ti_hecc: ti_hecc_probe(): add missed clk_disable_unprepare() in error path
        can: isotp: padlen(): make const array static, makes object smaller
        can: isotp: isotp_rcv_cf(): enable RX timeout handling in listen-only mode
        can: isotp: Explain PDU in CAN_ISOTP help text
        ...
      41f16530
    • Christoph Hellwig's avatar
      proc "seq files": switch to ->read_iter · b24c30c6
      Christoph Hellwig authored
      Implement ->read_iter for all proc "seq files" so that splice works on
      them.
      Suggested-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b24c30c6
    • Greg Kroah-Hartman's avatar
      proc "single files": switch to ->read_iter · 7cfc630e
      Greg Kroah-Hartman authored
      Implement ->read_iter for all proc "single files" so that more bionic
      tests cases can pass when they call splice() on other fun files like
      /proc/version
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7cfc630e
    • Christoph Hellwig's avatar
      proc/stat: switch to ->read_iter · 28589f9e
      Christoph Hellwig authored
      Implement ->read_iter so that splice can be used on this file.
      Suggested-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      28589f9e
    • Christoph Hellwig's avatar
      proc/cpuinfo: switch to ->read_iter · 70fce7d2
      Christoph Hellwig authored
      Implement ->read_iter so that the Android bionic test suite can use
      this random proc file for its splice test case.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      70fce7d2
    • Christoph Hellwig's avatar
      proc: wire up generic_file_splice_read for iter ops · fe33850f
      Christoph Hellwig authored
      Wire up generic_file_splice_read for the iter based proxy ops, so
      that splice reads from them work.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Tested-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      fe33850f
    • Christoph Hellwig's avatar
      seq_file: add seq_read_iter · d4d50710
      Christoph Hellwig authored
      iov_iter based variant for reading a seq_file.  seq_read is
      reimplemented on top of the iter variant.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Tested-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d4d50710
    • Damien Le Moal's avatar
      null_blk: Fix scheduling in atomic with zoned mode · e1777d09
      Damien Le Moal authored
      Commit aa1c09cb ("null_blk: Fix locking in zoned mode") changed
      zone locking to using the potentially sleeping wait_on_bit_io()
      function. This is acceptable when memory backing is enabled as the
      device queue is in that case marked as blocking, but this triggers a
      scheduling while in atomic context with memory backing disabled.
      
      Fix this by relying solely on the device zone spinlock for zone
      information protection without temporarily releasing this lock around
      null_process_cmd() execution in null_zone_write(). This is OK to do
      since when memory backing is disabled, command processing does not
      block and the memory backing lock nullb->lock is unused. This solution
      avoids the overhead of having to mark a zoned null_blk device queue as
      blocking when memory backing is unused.
      
      This patch also adds comments to the zone locking code to explain the
      unusual locking scheme.
      
      Fixes: aa1c09cb ("null_blk: Fix locking in zoned mode")
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Signed-off-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      e1777d09
    • Tyler Hicks's avatar
      tpm: efi: Don't create binary_bios_measurements file for an empty log · 8ffd778a
      Tyler Hicks authored
      Mimic the pre-existing ACPI and Device Tree event log behavior by not
      creating the binary_bios_measurements file when the EFI TPM event log is
      empty.
      
      This fixes the following NULL pointer dereference that can occur when
      reading /sys/kernel/security/tpm0/binary_bios_measurements after the
      kernel received an empty event log from the firmware:
      
       BUG: kernel NULL pointer dereference, address: 000000000000002c
       #PF: supervisor read access in kernel mode
       #PF: error_code(0x0000) - not-present page
       PGD 0 P4D 0
       Oops: 0000 [#1] SMP PTI
       CPU: 2 PID: 3932 Comm: fwupdtpmevlog Not tainted 5.9.0-00003-g629990edad62 #17
       Hardware name: LENOVO 20LCS03L00/20LCS03L00, BIOS N27ET38W (1.24 ) 11/28/2019
       RIP: 0010:tpm2_bios_measurements_start+0x3a/0x550
       Code: 54 53 48 83 ec 68 48 8b 57 70 48 8b 1e 65 48 8b 04 25 28 00 00 00 48 89 45 d0 31 c0 48 8b 82 c0 06 00 00 48 8b 8a c8 06 00 00 <44> 8b 60 1c 48 89 4d a0 4c 89 e2 49 83 c4 20 48 83 fb 00 75 2a 49
       RSP: 0018:ffffa9c901203db0 EFLAGS: 00010246
       RAX: 0000000000000010 RBX: 0000000000000000 RCX: 0000000000000010
       RDX: ffff8ba1eb99c000 RSI: ffff8ba1e4ce8280 RDI: ffff8ba1e4ce8258
       RBP: ffffa9c901203e40 R08: ffffa9c901203dd8 R09: ffff8ba1ec443300
       R10: ffffa9c901203e50 R11: 0000000000000000 R12: ffff8ba1e4ce8280
       R13: ffffa9c901203ef0 R14: ffffa9c901203ef0 R15: ffff8ba1e4ce8258
       FS:  00007f6595460880(0000) GS:ffff8ba1ef880000(0000) knlGS:0000000000000000
       CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
       CR2: 000000000000002c CR3: 00000007d8d18003 CR4: 00000000003706e0
       DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
       DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
       Call Trace:
        ? __kmalloc_node+0x113/0x320
        ? kvmalloc_node+0x31/0x80
        seq_read+0x94/0x420
        vfs_read+0xa7/0x190
        ksys_read+0xa7/0xe0
        __x64_sys_read+0x1a/0x20
        do_syscall_64+0x37/0x80
        entry_SYSCALL_64_after_hwframe+0x44/0xa9
      
      In this situation, the bios_event_log pointer in the tpm_bios_log struct
      was not NULL but was equal to the ZERO_SIZE_PTR (0x10) value. This was
      due to the following kmemdup() in tpm_read_log_efi():
      
      int tpm_read_log_efi(struct tpm_chip *chip)
      {
      ...
      	/* malloc EventLog space */
      	log->bios_event_log = kmemdup(log_tbl->log, log_size, GFP_KERNEL);
      	if (!log->bios_event_log) {
      		ret = -ENOMEM;
      		goto out;
      	}
      ...
      }
      
      When log_size is zero, due to an empty event log from firmware,
      ZERO_SIZE_PTR is returned from kmemdup(). Upon a read of the
      binary_bios_measurements file, the tpm2_bios_measurements_start()
      function does not perform a ZERO_OR_NULL_PTR() check on the
      bios_event_log pointer before dereferencing it.
      
      Rather than add a ZERO_OR_NULL_PTR() check in functions that make use of
      the bios_event_log pointer, simply avoid creating the
      binary_bios_measurements_file as is done in other event log retrieval
      backends.
      
      Explicitly ignore all of the events in the final event log when the main
      event log is empty. The list of events in the final event log cannot be
      accurately parsed without referring to the first event in the main event
      log (the event log header) so the final event log is useless in such a
      situation.
      
      Fixes: 58cc1e4f ("tpm: parse TPM event logs based on EFI table")
      Link: https://lore.kernel.org/linux-integrity/E1FDCCCB-CA51-4AEE-AC83-9CDE995EAE52@canonical.com/Reported-by: default avatarKai-Heng Feng <kai.heng.feng@canonical.com>
      Reported-by: default avatarKenneth R. Crudup <kenny@panix.com>
      Reported-by: default avatarMimi Zohar <zohar@linux.ibm.com>
      Cc: Thiébaud Weksteen <tweek@google.com>
      Cc: Ard Biesheuvel <ardb@kernel.org>
      Signed-off-by: default avatarTyler Hicks <tyhicks@linux.microsoft.com>
      Reviewed-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
      Signed-off-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
      8ffd778a
    • Jerry Snitselaar's avatar
      tpm_tis: Disable interrupts on ThinkPad T490s · b154ce11
      Jerry Snitselaar authored
      There is a misconfiguration in the bios of the gpio pin used for the
      interrupt in the T490s. When interrupts are enabled in the tpm_tis
      driver code this results in an interrupt storm. This was initially
      reported when we attempted to enable the interrupt code in the tpm_tis
      driver, which previously wasn't setting a flag to enable it. Due to
      the reports of the interrupt storm that code was reverted and we went back
      to polling instead of using interrupts. Now that we know the T490s problem
      is a firmware issue, add code to check if the system is a T490s and
      disable interrupts if that is the case. This will allow us to enable
      interrupts for everyone else. If the user has a fixed bios they can
      force the enabling of interrupts with tpm_tis.interrupts=1 on the
      kernel command line.
      
      Cc: Peter Huewe <peterhuewe@gmx.de>
      Cc: Jason Gunthorpe <jgg@ziepe.ca>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarJerry Snitselaar <jsnitsel@redhat.com>
      Reviewed-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
      Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
      Reviewed-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
      Signed-off-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
      b154ce11
    • Michael Wu's avatar
      i2c: designware: slave should do WRITE_REQUESTED before WRITE_RECEIVED · 3b5f7f10
      Michael Wu authored
      Sometimes we would get the following flow when doing an i2cset:
      
      0x1 STATUS SLAVE_ACTIVITY=0x1 : RAW_INTR_STAT=0x514 : INTR_STAT=0x4
      I2C_SLAVE_WRITE_RECEIVED
      0x1 STATUS SLAVE_ACTIVITY=0x0 : RAW_INTR_STAT=0x714 : INTR_STAT=0x204
      I2C_SLAVE_WRITE_REQUESTED
      I2C_SLAVE_WRITE_RECEIVED
      
      Documentation/i2c/slave-interface.rst says that I2C_SLAVE_WRITE_REQUESTED,
      which is mandatory, should be sent while the data did not arrive yet. It
      means in a write-request I2C_SLAVE_WRITE_REQUESTED should be reported
      before any I2C_SLAVE_WRITE_RECEIVED.
      
      By the way, I2C_SLAVE_STOP didn't be reported in the above case because
      DW_IC_INTR_STAT was not 0x200.
      
      dev->status can be used to record the current state, especially Designware
      I2C controller has no interrupts to identify a write-request. This patch
      makes not only I2C_SLAVE_WRITE_REQUESTED been reported first when
      IC_INTR_RX_FULL is rising and dev->status isn't STATUS_WRITE_IN_PROGRESS
      but also I2C_SLAVE_STOP been reported when a STOP condition is received.
      Signed-off-by: default avatarMichael Wu <michael.wu@vatics.com>
      Acked-by: default avatarJarkko Nikula <jarkko.nikula@linux.intel.com>
      Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
      3b5f7f10