1. 06 3月, 2020 4 次提交
  2. 14 2月, 2020 1 次提交
  3. 13 2月, 2020 3 次提交
    • S
      tty: serial: qcom_geni_serial: Fix RX cancel command failure · 679aac5e
      satya priya 提交于
      RX cancel command fails when BT is switched on and off multiple times.
      
      To handle this, poll for the cancel bit in SE_GENI_S_IRQ_STATUS register
      instead of SE_GENI_S_CMD_CTRL_REG.
      
      As per the HPG update, handle the RX last bit after cancel command
      and flush out the RX FIFO buffer.
      Signed-off-by: Nsatya priya <skakit@codeaurora.org>
      Cc: stable <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/1581415982-8793-1-git-send-email-skakit@codeaurora.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      679aac5e
    • A
      serial: 8250: Check UPF_IRQ_SHARED in advance · 7febbcbc
      Andy Shevchenko 提交于
      The commit 54e53b2e
        ("tty: serial: 8250: pass IRQ shared flag to UART ports")
      nicely explained the problem:
      
      ---8<---8<---
      
      On some systems IRQ lines between multiple UARTs might be shared. If so, the
      irqflags have to be configured accordingly. The reason is: The 8250 port startup
      code performs IRQ tests *before* the IRQ handler for that particular port is
      registered. This is performed in serial8250_do_startup(). This function checks
      whether IRQF_SHARED is configured and only then disables the IRQ line while
      testing.
      
      This test is performed upon each open() of the UART device. Imagine two UARTs
      share the same IRQ line: On is already opened and the IRQ is active. When the
      second UART is opened, the IRQ line has to be disabled while performing IRQ
      tests. Otherwise an IRQ might handler might be invoked, but the IRQ itself
      cannot be handled, because the corresponding handler isn't registered,
      yet. That's because the 8250 code uses a chain-handler and invokes the
      corresponding port's IRQ handling routines himself.
      
      Unfortunately this IRQF_SHARED flag isn't configured for UARTs probed via device
      tree even if the IRQs are shared. This way, the actual and shared IRQ line isn't
      disabled while performing tests and the kernel correctly detects a spurious
      IRQ. So, adding this flag to the DT probe solves the issue.
      
      Note: The UPF_SHARE_IRQ flag is configured unconditionally. Therefore, the
      IRQF_SHARED flag can be set unconditionally as well.
      
      Example stack trace by performing `echo 1 > /dev/ttyS2` on a non-patched system:
      
      |irq 85: nobody cared (try booting with the "irqpoll" option)
      | [...]
      |handlers:
      |[<ffff0000080fc628>] irq_default_primary_handler threaded [<ffff00000855fbb8>] serial8250_interrupt
      |Disabling IRQ #85
      
      ---8<---8<---
      
      But unfortunately didn't fix the root cause. Let's try again here by moving
      IRQ flag assignment from serial_link_irq_chain() to serial8250_do_startup().
      
      This should fix the similar issue reported for 8250_pnp case.
      
      Since this change we don't need to have custom solutions in 8250_aspeed_vuart
      and 8250_of drivers, thus, drop them.
      
      Fixes: 1c2f0493 ("serial: 8250: add IRQ trigger support")
      Reported-by: NLi RongQing <lirongqing@baidu.com>
      Cc: Kurt Kanzenbach <kurt@linutronix.de>
      Cc: Vikram Pandita <vikram.pandita@ti.com>
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: stable <stable@vger.kernel.org>
      Acked-by: NKurt Kanzenbach <kurt@linutronix.de>
      Link: https://lore.kernel.org/r/20200211135559.85960-1-andriy.shevchenko@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7febbcbc
    • F
      tty: serial: imx: setup the correct sg entry for tx dma · f7670783
      Fugang Duan 提交于
      There has oops as below happen on i.MX8MP EVK platform that has
      6G bytes DDR memory.
      
      when (xmit->tail < xmit->head) && (xmit->head == 0),
      it setups one sg entry with sg->length is zero:
      	sg_set_buf(sgl + 1, xmit->buf, xmit->head);
      
      if xmit->buf is allocated from >4G address space, and SDMA only
      support <4G address space, then dma_map_sg() will call swiotlb_map()
      to do bounce buffer copying and mapping.
      
      But swiotlb_map() don't allow sg entry's length is zero, otherwise
      report BUG_ON().
      
      So the patch is to correct the tx DMA scatter list.
      
      Oops:
      [  287.675715] kernel BUG at kernel/dma/swiotlb.c:497!
      [  287.680592] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
      [  287.686075] Modules linked in:
      [  287.689133] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.4.3-00016-g3fdc4e0-dirty #10
      [  287.696872] Hardware name: FSL i.MX8MP EVK (DT)
      [  287.701402] pstate: 80000085 (Nzcv daIf -PAN -UAO)
      [  287.706199] pc : swiotlb_tbl_map_single+0x1fc/0x310
      [  287.711076] lr : swiotlb_map+0x60/0x148
      [  287.714909] sp : ffff800010003c00
      [  287.718221] x29: ffff800010003c00 x28: 0000000000000000
      [  287.723533] x27: 0000000000000040 x26: ffff800011ae0000
      [  287.728844] x25: ffff800011ae09f8 x24: 0000000000000000
      [  287.734155] x23: 00000001b7af9000 x22: 0000000000000000
      [  287.739465] x21: ffff000176409c10 x20: 00000000001f7ffe
      [  287.744776] x19: ffff000176409c10 x18: 000000000000002e
      [  287.750087] x17: 0000000000000000 x16: 0000000000000000
      [  287.755397] x15: 0000000000000000 x14: 0000000000000000
      [  287.760707] x13: ffff00017f334000 x12: 0000000000000001
      [  287.766018] x11: 00000000001fffff x10: 0000000000000000
      [  287.771328] x9 : 0000000000000003 x8 : 0000000000000000
      [  287.776638] x7 : 0000000000000000 x6 : 0000000000000000
      [  287.781949] x5 : 0000000000200000 x4 : 0000000000000000
      [  287.787259] x3 : 0000000000000001 x2 : 00000001b7af9000
      [  287.792570] x1 : 00000000fbfff000 x0 : 0000000000000000
      [  287.797881] Call trace:
      [  287.800328]  swiotlb_tbl_map_single+0x1fc/0x310
      [  287.804859]  swiotlb_map+0x60/0x148
      [  287.808347]  dma_direct_map_page+0xf0/0x130
      [  287.812530]  dma_direct_map_sg+0x78/0xe0
      [  287.816453]  imx_uart_dma_tx+0x134/0x2f8
      [  287.820374]  imx_uart_dma_tx_callback+0xd8/0x168
      [  287.824992]  vchan_complete+0x194/0x200
      [  287.828828]  tasklet_action_common.isra.0+0x154/0x1a0
      [  287.833879]  tasklet_action+0x24/0x30
      [  287.837540]  __do_softirq+0x120/0x23c
      [  287.841202]  irq_exit+0xb8/0xd8
      [  287.844343]  __handle_domain_irq+0x64/0xb8
      [  287.848438]  gic_handle_irq+0x5c/0x148
      [  287.852185]  el1_irq+0xb8/0x180
      [  287.855327]  cpuidle_enter_state+0x84/0x360
      [  287.859508]  cpuidle_enter+0x34/0x48
      [  287.863083]  call_cpuidle+0x18/0x38
      [  287.866571]  do_idle+0x1e0/0x280
      [  287.869798]  cpu_startup_entry+0x20/0x40
      [  287.873721]  rest_init+0xd4/0xe0
      [  287.876949]  arch_call_rest_init+0xc/0x14
      [  287.880958]  start_kernel+0x420/0x44c
      [  287.884622] Code: 9124c021 9417aff8 a94363f7 17ffffd5 (d4210000)
      [  287.890718] ---[ end trace 5bc44c4ab6b009ce ]---
      [  287.895334] Kernel panic - not syncing: Fatal exception in interrupt
      [  287.901686] SMP: stopping secondary CPUs
      [  288.905607] SMP: failed to stop secondary CPUs 0-1
      [  288.910395] Kernel Offset: disabled
      [  288.913882] CPU features: 0x0002,2000200c
      [  288.917888] Memory Limit: none
      [  288.920944] ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]---
      Reported-by: NEagle Zhou <eagle.zhou@nxp.com>
      Tested-by: NEagle Zhou <eagle.zhou@nxp.com>
      Signed-off-by: NFugang Duan <fugang.duan@nxp.com>
      Cc: stable <stable@vger.kernel.org>
      Fixes: 7942f857 ("serial: imx: TX DMA: clean up sg initialization")
      Reviewed-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Link: https://lore.kernel.org/r/1581401761-6378-1-git-send-email-fugang.duan@nxp.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f7670783
  4. 11 2月, 2020 3 次提交
  5. 09 2月, 2020 1 次提交
    • L
      Fix up remaining devm_ioremap_nocache() in SGI IOC3 8250 UART driver · b0ef7cda
      Linus Torvalds 提交于
      This is a merge error on my part - the driver was merged into mainline
      by commit c5951e7c ("Merge tag 'mips_5.6' of git://../mips/linux")
      over a week ago, but nobody apparently noticed that it didn't actually
      build due to still having a reference to the devm_ioremap_nocache()
      function, removed a few days earlier through commit 6a1000bd ("Merge
      tag 'ioremap-5.6' of git://../ioremap").
      
      Apparently this didn't get any build testing anywhere.  Not perhaps all
      that surprising: it's restricted to 64-bit MIPS only, and only with the
      new SGI_MFD_IOC3 support enabled.
      
      I only noticed because the ioremap conflicts in the ARM SoC driver
      update made me check there weren't any others hiding, and I found this
      one.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b0ef7cda
  6. 22 1月, 2020 8 次提交
  7. 14 1月, 2020 10 次提交
  8. 11 1月, 2020 2 次提交
  9. 10 1月, 2020 4 次提交
  10. 07 1月, 2020 4 次提交