1. 10 3月, 2018 2 次提交
  2. 28 2月, 2018 27 次提交
  3. 07 2月, 2018 1 次提交
  4. 25 1月, 2018 1 次提交
    • A
      tty: serial: exar: Relocate sleep wake-up handling · c7e1b405
      Aaron Sierra 提交于
      Exar sleep wake-up handling has been done on a per-channel basis by
      virtue of INT0 being accessible from each channel's address space. I
      believe this was initially done out of necessity, but now that Exar
      devices have their own driver, we can do things more efficiently by
      registering a dedicated INT0 handler at the PCI device level.
      
      I see this change providing the following benefits:
      
          1. If more than one port is active, eliminates the redundant bus
             cycles for reading INT0 on every interrupt.
          2. This note associated with hooking in the per-channel handler in
             8250_port.c is resolved:
              /* Fixme: probably not the best place for this */
      
      Cc: Matt Schulte <matts@commtech-fastcom.com>
      Signed-off-by: NAaron Sierra <asierra@xes-inc.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c7e1b405
  5. 22 1月, 2018 4 次提交
    • M
      serial: imx: fix endless loop during suspend · 09df0b34
      Martin Kaiser 提交于
      Before we go into suspend mode, we enable the imx uart's interrupt for
      the awake bit in the UART Status Register 1. If, for some reason, the
      awake bit is already set before we enter suspend mode, we get an
      interrupt immediately when we enable interrupts for awake. The uart's
      clk_ipg is disabled at this point (unless there's an ongoing transfer).
      We end up in the interrupt handler, which usually tries to clear the
      awake bit. This doesn't work with the clock disabled. Therefore, we
      keep getting interrupts forever, resulting in an endless loop.
      
      Clear the awake bit before setting the awaken bit to signal that we want
      an imx interrupt when the awake bit will be set. This ensures that we're
      not woken up by events that happened before we started going into
      suspend mode.
      
      Change the clock handling so that suspend prepares and enables the clock
      and suspend_noirq disables it. Revert these operations in resume_noirq and
      resume.
      
      With these preparations in place, we can now modify awake and awaken in
      the suspend function when the actual imx interrupt is disabled and the
      required clk_ipg is active.
      
      Update the thaw and freeze functions to use the new clock handling since
      we share the suspend_noirq function between suspend and hibernate.
      Signed-off-by: NMartin Kaiser <martin@kaiser.cx>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      09df0b34
    • S
      serial: core: mark port as initialized after successful IRQ change · 44117a1d
      Sebastian Andrzej Siewior 提交于
      setserial changes the IRQ via uart_set_info(). It invokes
      uart_shutdown() which free the current used IRQ and clear
      TTY_PORT_INITIALIZED. It will then update the IRQ number and invoke
      uart_startup() before returning to the caller leaving
      TTY_PORT_INITIALIZED cleared.
      
      The next open will crash with
      |  list_add double add: new=ffffffff839fcc98, prev=ffffffff839fcc98, next=ffffffff839fcc98.
      since the close from the IOCTL won't free the IRQ (and clean the list)
      due to the TTY_PORT_INITIALIZED check in uart_shutdown().
      
      There is same pattern in uart_do_autoconfig() and I *think* it also
      needs to set TTY_PORT_INITIALIZED there.
      Is there a reason why uart_startup() does not set the flag by itself
      after the IRQ has been acquired (since it is cleared in uart_shutdown)?
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      44117a1d
    • W
      serial: mxs-auart: don't use GPIOF_* with gpiod_get_direction · f8bdfe9d
      Wolfram Sang 提交于
      The documentation was wrong, gpiod_get_direction() returns 0/1 instead
      of the GPIOF_* flags. The docs were fixed with commit 94fc7309
      ("gpio: correct docs about return value of gpiod_get_direction"). Now,
      fix this user (until a better, system-wide solution is in place). This
      also means we can drop the deprecated use of 'linux/gpio.h'. Yay!
      Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f8bdfe9d
    • A
      serial: 8250_dw: Revert "Improve clock rate setting" · c14b65fe
      Andy Shevchenko 提交于
      The commit
      
        de9e33bd ("serial: 8250_dw: Improve clock rate setting")
      
      obviously tries to cure symptoms, and not a root cause.
      
      The root cause is the non-flexible rate calculation inside the
      corresponding clock driver. What we need is to provide maximum UART
      divisor value to the clock driver to allow it do the job transparently
      to the caller.
      
      Since from the initial commit message I have got no clue which clock
      driver actually needs to be amended, I leave this exercise to the people
      who know better the case.
      
      Moreover, it seems [1] the fix introduced a regression. And possible
      even one more [2].
      
      Taking above, revert the commit de9e33bd for now.
      
      [1]: https://www.spinics.net/lists/linux-serial/msg28872.html
      [2]: https://github.com/Dunedan/mbp-2016-linux/issues/29#issuecomment-357583782
      
      Fixes: de9e33bd ("serial: 8250_dw: Improve clock rate setting")
      Cc: stable <stable@vger.kernel.org> # 4.15
      Cc: Ed Blake <ed.blake@sondrel.com>
      Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
      Cc: Lukas Wunner <lukas@wunner.de>
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c14b65fe
  6. 10 1月, 2018 1 次提交
  7. 09 1月, 2018 4 次提交