1. 30 Oct, 2017 1 commit
    • Xiaolei Li's avatar
      mtd: nand: mtk: fix infinite ECC decode IRQ issue · 1d2fcdcf
      Xiaolei Li authored
      For MT2701 NAND Controller, there may generate infinite ECC decode IRQ
      during long time burn test on some platforms. Once this issue occurred,
      the ECC decode IRQ status cannot be cleared in the IRQ handler function,
      and threads cannot be scheduled.
      
      ECC HW generates decode IRQ each sector, so there will have more than one
      decode IRQ if read one page of large page NAND.
      
      Currently, ECC IRQ handle flow is that we will check whether it is decode
      IRQ at first by reading the register ECC_DECIRQ_STA. This is a read-clear
      type register. If this IRQ is decode IRQ, then the ECC IRQ signal will be
      cleared at the same time.
      Secondly, we will check whether all sectors are decoded by reading the
      register ECC_DECDONE. This is because the current IRQ may be not dealed
      in time, and the next sectors have been decoded before reading the
      register ECC_DECIRQ_STA. Then, the next sectors's decode IRQs will not
      be generated.
      Thirdly, if all sectors are decoded by comparing with ecc->sectors, then we
      will complete ecc->done, set ecc->sectors as 0, and disable ECC IRQ by
      programming the register ECC_IRQ_REG(op) as 0. Otherwise, wait for the
      next ECC IRQ.
      
      But, there is a timing issue between step one and two. When we read the
      reigster ECC_DECIRQ_STA, all sectors are decoded except the last sector,
      and the ECC IRQ signal is cleared. But the last sector is decoded before
      reading ECC_DECDONE, so the ECC IRQ signal is enabled again by ECC HW, and
      it means we will receive one extra ECC IRQ later. In step three, we will
      find that all sectors were decoded, then disable ECC IRQ and return.
      When deal with the extra ECC IRQ, the ECC IRQ status cannot be cleared
      anymore. That is because the register ECC_DECIRQ_STA can only be cleared
      when the register ECC_IRQ_REG(op) is enabled. But actually we have
      disabled ECC IRQ in the previous ECC IRQ handle. So, there will
      keep receiving ECC decode IRQ.
      
      Now, we read the register ECC_DECIRQ_STA once again before completing the
      ecc done event. This ensures that there will be no extra ECC decode IRQ.
      
      Also, remove writel(0, ecc->regs + ECC_IRQ_REG(op)) from irq handler,
      because ECC IRQ is disabled in mtk_ecc_disable(). And clear ECC_DECIRQ_STA
      in mtk_ecc_disable() in case there is a timeout to wait decode IRQ.
      
      Fixes: 1d6b1e46 ("mtd: mediatek: driver for MTK Smart Device")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarXiaolei Li <xiaolei.li@mediatek.com>
      Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
      1d2fcdcf
  2. 29 Oct, 2017 1 commit
  3. 27 Oct, 2017 1 commit
    • Roger Quadros's avatar
      mtd: nand: omap2: Fix subpage write · 739c6441
      Roger Quadros authored
      Since v4.12, NAND subpage writes were causing a NULL pointer
      dereference on OMAP platforms (omap2-nand) using OMAP_ECC_BCH4_CODE_HW,
      OMAP_ECC_BCH8_CODE_HW and OMAP_ECC_BCH16_CODE_HW.
      
      This is because for those ECC modes, omap_calculate_ecc_bch()
      generates ECC bytes for the entire (multi-sector) page and this can
      overflow the ECC buffer provided by nand_write_subpage_hwecc()
      as it expects ecc.calculate() to return ECC bytes for just one sector.
      
      However, the root cause of the problem is present since v3.9
      but was not seen then as NAND buffers were being allocated
      as one big chunk prior to commit 3deb9979 ("mtd: nand: allocate
      aligned buffers if NAND_OWN_BUFFERS is unset").
      
      Fix the issue by providing a OMAP optimized write_subpage()
      implementation.
      
      Fixes: 62116e51 ("mtd: nand: omap2: Support for hardware BCH error correction.")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarRoger Quadros <rogerq@ti.com>
      Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
      739c6441
  4. 16 Oct, 2017 2 commits
  5. 14 Oct, 2017 4 commits
  6. 07 Oct, 2017 9 commits
  7. 22 Sep, 2017 14 commits
  8. 18 Sep, 2017 3 commits
  9. 16 Sep, 2017 5 commits
    • Linus Torvalds's avatar
      Linux 4.14-rc1 · 2bd6bf03
      Linus Torvalds authored
      2bd6bf03
    • Linus Torvalds's avatar
      Merge tag 'upstream-4.14-rc1' of git://git.infradead.org/linux-ubifs · 194a4ef9
      Linus Torvalds authored
      Pull UBI updates from Richard Weinberger:
       "Minor improvements"
      
      * tag 'upstream-4.14-rc1' of git://git.infradead.org/linux-ubifs:
        UBI: Fix two typos in comments
        ubi: fastmap: fix spelling mistake: "invalidiate" -> "invalidate"
        ubi: pr_err() strings should end with newlines
        ubi: pr_err() strings should end with newlines
        ubi: pr_err() strings should end with newlines
      194a4ef9
    • Linus Torvalds's avatar
      Merge branch 'for-linus-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml · 2896b80e
      Linus Torvalds authored
      Pull UML updates from Richard Weinberger:
      
       - minor improvements
      
       - fixes for Debian's new gcc defaults (pie enabled by default)
      
       - fixes for XSTATE/XSAVE to make UML work again on modern systems
      
      * 'for-linus-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
        um: return negative in tuntap_open_tramp()
        um: remove a stray tab
        um: Use relative modversions with LD_SCRIPT_DYN
        um: link vmlinux with -no-pie
        um: Fix CONFIG_GCOV for modules.
        Fix minor typos and grammar in UML start_up help
        um: defconfig: Cleanup from old Kconfig options
        um: Fix FP register size for XSTATE/XSAVE
      2896b80e
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 48bddb14
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Fix hotplug deadlock in hv_netvsc, from Stephen Hemminger.
      
       2) Fix double-free in rmnet driver, from Dan Carpenter.
      
       3) INET connection socket layer can double put request sockets, fix
          from Eric Dumazet.
      
       4) Don't match collect metadata-mode tunnels if the device is down,
          from Haishuang Yan.
      
       5) Do not perform TSO6/GSO on ipv6 packets with extensions headers in
          be2net driver, from Suresh Reddy.
      
       6) Fix scaling error in gen_estimator, from Eric Dumazet.
      
       7) Fix 64-bit statistics deadlock in systemport driver, from Florian
          Fainelli.
      
       8) Fix use-after-free in sctp_sock_dump, from Xin Long.
      
       9) Reject invalid BPF_END instructions in verifier, from Edward Cree.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (43 commits)
        mlxsw: spectrum_router: Only handle IPv4 and IPv6 events
        Documentation: link in networking docs
        tcp: fix data delivery rate
        bpf/verifier: reject BPF_ALU64|BPF_END
        sctp: do not mark sk dumped when inet_sctp_diag_fill returns err
        sctp: fix an use-after-free issue in sctp_sock_dump
        netvsc: increase default receive buffer size
        tcp: update skb->skb_mstamp more carefully
        net: ipv4: fix l3slave check for index returned in IP_PKTINFO
        net: smsc911x: Quieten netif during suspend
        net: systemport: Fix 64-bit stats deadlock
        net: vrf: avoid gcc-4.6 warning
        qed: remove unnecessary call to memset
        tg3: clean up redundant initialization of tnapi
        tls: make tls_sw_free_resources static
        sctp: potential read out of bounds in sctp_ulpevent_type_enabled()
        MAINTAINERS: review Renesas DT bindings as well
        net_sched: gen_estimator: fix scaling error in bytes/packets samples
        nfp: wait for the NSP resource to appear on boot
        nfp: wait for board state before talking to the NSP
        ...
      48bddb14
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · c8503720
      Linus Torvalds authored
      Pull more input updates from Dmitry Torokhov:
       "A second round of updates for the input subsystem:
      
         - a new driver for PWM-controlled vibrators
      
         - ucb1400 touchscreen driver had completely busted suspend/resume
           handling
      
         - we now handle "home" button found on some devices with Goodix
           touchscreens
      
         - assorted other fixups"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: i8042 - add Gigabyte P57 to the keyboard reset table
        Input: xpad - validate USB endpoint type during probe
        Input: ucb1400_ts - fix suspend and resume handling
        Input: edt-ft5x06 - fix access to non-existing register
        Input: elantech - make arrays debounce_packet static, reduces object code size
        Input: surface3_spi - make const array header static, reduces object code size
        Input: goodix - add support for capacitive home button
        Input: add a driver for PWM controllable vibrators
        Input: adi - make array seq static, reduces object code size
      c8503720