1. 18 11月, 2011 2 次提交
    • J
      TTY: ldisc, move wait idle to caller · 30042072
      Jiri Slaby 提交于
      It is the only place where reinit is called from. And we really need
      to wait for the old ldisc to go once. Actually this is the place where
      the waiting originally was (before removed and re-added later).
      
      This will make the fix in the following patch easier to implement.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: Dave Young <hidave.darkstar@gmail.com>
      Cc: Dave Jones <davej@redhat.com>
      Cc: Ben Hutchings <ben@decadent.org.uk>
      Cc: Dmitriy Matrosov <sgf.dma@gmail.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      30042072
    • J
      TTY: ldisc, allow waiting for ldisc arbitrarily long · df92d056
      Jiri Slaby 提交于
      To fix a nasty bug in ldisc hup vs. reinit we need to wait infinitely
      long for ldisc to be gone. So here we add a parameter to
      tty_ldisc_wait_idle to allow that.
      
      This is only a preparation for the real fix which is done in the
      following patches.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: Dave Young <hidave.darkstar@gmail.com>
      Cc: Dave Jones <davej@redhat.com>
      Cc: Ben Hutchings <ben@decadent.org.uk>
      Cc: Dmitriy Matrosov <sgf.dma@gmail.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      df92d056
  2. 16 11月, 2011 9 次提交
  3. 07 11月, 2011 2 次提交
  4. 02 11月, 2011 1 次提交
  5. 01 11月, 2011 2 次提交
  6. 25 10月, 2011 1 次提交
  7. 20 10月, 2011 1 次提交
    • D
      TTY: serial_core: Fix crash if DCD drop during suspend · d208a3bf
      Doug Anderson 提交于
      This crash was showing up 100% of the time on Tegra CPUs when an
      agetty was running on the serial port and the console was not running
      on the serial port.  The reason the Tegra saw it so reliably is that
      the Tegra CPU internally ties DTR to DCD/DSR.  That means when we
      dropped DTR during suspend we would get always get an immediate DCD
      drop.
      
      The specific order of operations that were running:
      * uart_suspend_port() would be called to put the uart in suspend mode
      * we'd drop DTR (ops->set_mctrl(uport, 0)).
      * the DTR drop would be looped back in the CPU to be a DCD drop.
      * the DCD drop would look to the serial driver as a hangup
      * the hangup would call uart_shutdown()
      * ... suspend / resume happens ...
      * uart_resume_port() would be called and run the code in the
        (port->flags & ASYNC_SUSPENDED) block, which would startup the port
        (and enable tx again).
      * Since the UART would be available for tx, we'd immediately get
        an interrupt, eventually calling transmit_chars()
      * The transmit_chars() function would crash.  The first crash would
        be a dereference of a NULL tty member, but since the port has been
        shutdown that was just a symptom.
      
      I have proposed a patch that would fix the Tegra CPUs here (see
      https://lkml.org/lkml/2011/10/11/444 - tty/serial: Prevent drop of DCD
      on suspend for Tegra UARTs).  However, even with that fix it is still
      possible for systems that have an externally visible DCD line to see a
      crash if the DCD drops at just the right time during suspend: thus
      this patch is still useful.
      Signed-off-by: NDoug Anderson <dianders@chromium.org>
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d208a3bf
  8. 19 10月, 2011 13 次提交
  9. 17 10月, 2011 1 次提交
    • H
      PM / VT: Cleanup #if defined uglyness and fix compile error · 37cce26b
      H Hartley Sweeten 提交于
      Introduce the config option CONFIG_VT_CONSOLE_SLEEP in order to cleanup
      the #if defined ugliness for the vt suspend support functions. Note that
      CONFIG_VT_CONSOLE is already dependant on CONFIG_VT.
      
      The function pm_set_vt_switch is actually dependant on CONFIG_VT and not
      CONFIG_PM_SLEEP. This fixes a compile error when CONFIG_PM_SLEEP is
      not set:
      
      drivers/tty/vt/vt_ioctl.c:1794: error: redefinition of 'pm_set_vt_switch'
      include/linux/suspend.h:17: error: previous definition of 'pm_set_vt_switch' was here
      
      Also, remove the incorrect path from the comment in console.c.
      
      [rjw: Replaced #if defined() with #ifdef in suspend.h.]
      Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      37cce26b
  10. 13 10月, 2011 1 次提交
  11. 06 10月, 2011 1 次提交
    • G
      devicetree: fix build error on drivers/tty/serial/altera_jtaguart.c · 6b3754d6
      Grant Likely 提交于
      This patch fixes the following build error caused by commit
      85888069 ("tty: use of_match_ptr() for of_match_table entry").
      The problem was a missing #include <linux/of.h> which is where
      of_match_ptr() is defined.
      
      drivers/tty/serial/altera_jtaguart.c:483:3: error: implicit declaration of function 'of_match_ptr' [-Werror=implicit-function-declaration]
      drivers/tty/serial/altera_jtaguart.c:483:34: error: 'altera_jtaguart_match' undeclared here (not in a function)
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Cc: Ben Dooks <ben-linux@fluff.org>
      Cc: Tobias Klauser <tklauser@distanz.ch> (maintainer:ALTERA UART/JTAG...)
      Cc: Alan Cox <alan@linux.intel.com> (maintainer:SERIAL DRIVERS)
      6b3754d6
  12. 30 9月, 2011 2 次提交
  13. 27 9月, 2011 4 次提交