1. 11 1月, 2017 3 次提交
  2. 30 11月, 2016 3 次提交
    • L
      serial: 8250_mid fix calltrace when hotplug 8250 serial controller · a9b01b58
      Liwei Song 提交于
      Fix the following Calltrace:
      [   77.768221] WARNING: CPU: 5 PID: 645 at drivers/dma/dmaengine.c:1069 dma_async_device_unregister+0xe2/0xf0
      [   77.775058] dma_async_device_unregister called while 1 clients hold a reference
      [   77.825048] CPU: 5 PID: 645 Comm: sh Not tainted 4.8.8-WR9.0.0.0_standard+ #3
      [   77.832550] Hardware name: Intel Corp. Aspen Cove/Server, BIOS HAVLCRB1.X64.0012.D58.1604140405 04/14/2016
      [   77.840396]  0000000000000000 ffffc90008adbc80 ffffffff81403456 ffffc90008adbcd0
      [   77.848245]  0000000000000000 ffffc90008adbcc0 ffffffff8105e2e1 0000042d08adbf20
      [   77.855934]  ffff88046a861c18 ffff88046a85c420 ffffffff820d4200 ffff88046ae92318
      [   77.863601] Call Trace:
      [   77.871113]  [<ffffffff81403456>] dump_stack+0x4f/0x69
      [   77.878655]  [<ffffffff8105e2e1>] __warn+0xd1/0xf0
      [   77.886102]  [<ffffffff8105e34f>] warn_slowpath_fmt+0x4f/0x60
      [   77.893508]  [<ffffffff814187a9>] ? find_next_bit+0x19/0x20
      [   77.900730]  [<ffffffff814bf83e>] ? dma_channel_rebalance+0x23e/0x270
      [   77.907814]  [<ffffffff814bfee2>] dma_async_device_unregister+0xe2/0xf0
      [   77.914992]  [<ffffffff814c53aa>] hsu_dma_remove+0x1a/0x60
      [   77.921977]  [<ffffffff814ee14c>] dnv_exit+0x1c/0x20
      [   77.928752]  [<ffffffff814edff6>] mid8250_remove+0x26/0x40
      [   77.935607]  [<ffffffff8144f1b9>] pci_device_remove+0x39/0xc0
      [   77.942292]  [<ffffffff8160cfea>] __device_release_driver+0x9a/0x140
      [   77.948836]  [<ffffffff8160d0b3>] device_release_driver+0x23/0x30
      [   77.955364]  [<ffffffff81447dcc>] pci_stop_bus_device+0x8c/0xa0
      [   77.961769]  [<ffffffff81447f0a>] pci_stop_and_remove_bus_device_locked+0x1a/0x30
      [   77.968113]  [<ffffffff81450d4e>] remove_store+0x5e/0x70
      [   77.974267]  [<ffffffff81607ed8>] dev_attr_store+0x18/0x30
      [   77.980243]  [<ffffffff8123006a>] sysfs_kf_write+0x3a/0x50
      [   77.986180]  [<ffffffff8122f5ab>] kernfs_fop_write+0x10b/0x190
      [   77.992118]  [<ffffffff811bf1c8>] __vfs_write+0x18/0x40
      [   77.998032]  [<ffffffff811bfdee>] vfs_write+0xae/0x190
      [   78.003747]  [<ffffffff811c1016>] SyS_write+0x46/0xb0
      [   78.009234]  [<ffffffff81a4c31b>] entry_SYSCALL_64_fastpath+0x13/0x8f
      [   78.014809] ---[ end trace 0c36dd73b7408eb2 ]---
      
      This happens when the 8250 serial controller is hotplugged as follows:
      echo 1 > /sys/bus/pci/devices/0000:00:1a.0/remove
      
      This trace happens due to the serial port still holding a reference when
      the dma device is unregistered.
      The dma unregister routine will check if there is still a reference exist,
      if so it will give the WARNING(here serial port still was not unregister).
      
      To fix this, We need to unregister the serial port first, then do DMA
      device unregister to make sure there is no reference when to DMA routine.
      Signed-off-by: NLiwei Song <liwei.song@windriver.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a9b01b58
    • E
      dmaengine: DW DMAC: add multi-block property to device tree · bd2c6636
      Eugeniy Paltsev 提交于
      Several versions of DW DMAC have multi block transfers hardware
      support. Hardware support of multi block transfers is disabled
      by default if we use DT to configure DMAC and software emulation
      of multi block transfers used instead.
      Add multi-block property, so it is possible to enable hardware
      multi block transfers (if present) via DT.
      
      Switch from per device is_nollp variable to multi_block array
      to be able enable/disable multi block transfers separately per
      channel.
      Acked-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NEugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      bd2c6636
    • G
      serial: 8250_pci: Detach low-level driver during PCI error recovery · f209fa03
      Gabriel Krisman Bertazi 提交于
      During a PCI error recovery, like the ones provoked by EEH in the ppc64
      platform, all IO to the device must be blocked while the recovery is
      completed.  Current 8250_pci implementation only suspends the port
      instead of detaching it, which doesn't prevent incoming accesses like
      TIOCMGET and TIOCMSET calls from reaching the device.  Those end up
      racing with the EEH recovery, crashing it.  Similar races were also
      observed when opening the device and when shutting it down during
      recovery.
      
      This patch implements a more robust IO blockage for the 8250_pci
      recovery by unregistering the port at the beginning of the procedure and
      re-adding it afterwards.  Since the port is detached from the uart
      layer, we can be sure that no request will make through to the device
      during recovery.  This is similar to the solution used by the JSM serial
      driver.
      
      I thank Peter Hurley <peter@hurleysoftware.com> for valuable input on
      this one over one year ago.
      Signed-off-by: NGabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f209fa03
  3. 16 11月, 2016 5 次提交
  4. 10 11月, 2016 5 次提交
  5. 27 10月, 2016 15 次提交
  6. 27 9月, 2016 2 次提交
  7. 22 9月, 2016 2 次提交
    • J
      tty/serial/8250: Touch NMI watchdog in wait_for_xmitr · 54f19b4a
      Jiri Olsa 提交于
      First loop in wait_for_xmitr could also trigger NMI
      watchdog in case reading from the port is slow:
      
        PID: 0      TASK: ffffffff819c1460  CPU: 0   COMMAND: "swapper/0"
         #0 [ffff88019f405e58] crash_nmi_callback at ffffffff8104d382
         #1 [ffff88019f405e68] nmi_handle at ffffffff8168ead9
         #2 [ffff88019f405eb0] do_nmi at ffffffff8168ec53
         #3 [ffff88019f405ef0] end_repeat_nmi at ffffffff8168df13
            [exception RIP: delay_tsc+50]
            RIP: ffffffff81325642  RSP: ffff88019f403bb0  RFLAGS: 00000083
            RAX: 00000000000005c8  RBX: ffffffff81f83000  RCX: 0000024e4fb88a8b
            RDX: 0000024e4fb89053  RSI: 0000000000000000  RDI: 00000000000007d1
            RBP: ffff88019f403bb0   R8: 000000000000000a   R9: 0000000000000000
            R10: 0000000000000000  R11: ffff88019f403ad6  R12: 000000000000250f
            R13: 0000000000000020  R14: ffffffff81d360c7  R15: 0000000000000047
            ORIG_RAX: ffffffffffffffff  CS: 0010  SS: 0018
        --- <NMI exception stack> ---
         #4 [ffff88019f403bb0] delay_tsc at ffffffff81325642
         #5 [ffff88019f403bb8] __const_udelay at ffffffff813255a8
         #6 [ffff88019f403bc8] wait_for_xmitr at ffffffff81404390
         #7 [ffff88019f403bf0] serial8250_console_putchar at ffffffff8140455c
         #8 [ffff88019f403c10] uart_console_write at ffffffff813ff00a
         #9 [ffff88019f403c40] serial8250_console_write at ffffffff814044ae
        #10 [ffff88019f403c88] call_console_drivers.constprop.15 at ffffffff81086b01
        #11 [ffff88019f403cb0] console_unlock at ffffffff8108842f
        #12 [ffff88019f403ce8] vprintk_emit at ffffffff81088834
        #13 [ffff88019f403d58] vprintk_default at ffffffff81088ba9
        #14 [ffff88019f403d68] printk at ffffffff8167f034
      
      Adding touch_nmi_watchdog call to the first loop as well.
      Reported-by: NChunyu Hu <chuhu@redhat.com>
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      54f19b4a
    • J
      serial: 8250_pci: Use symbolic constants for EXAR's MPIO registers · b6fce738
      Jan Kiszka 提交于
      Less magic that only requires comments.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b6fce738
  8. 15 9月, 2016 1 次提交
  9. 02 9月, 2016 4 次提交