1. 15 12月, 2011 2 次提交
    • G
      ARM: OMAP2+: UART: Remove mapbase/membase fields from pdata. · edd70ad7
      Govindraj.R 提交于
      The mapbase (start_address), membase(io_remap cookie) part of
      pdata struct omap_uart_port_info are removed as this should be
      derived within driver.
      Signed-off-by: NGovindraj.R <govindraj.raja@ti.com>
      Acked-by: Greg Kroah-Hartman <gregkh@suse.de> (for drivers/tty changes)
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      edd70ad7
    • G
      ARM: OMAP2+: UART: Cleanup part of clock gating mechanism for uart · 273558b3
      Govindraj.R 提交于
      Currently we use a shared irq handler to identify uart activity and then
      trigger a timer. By default the timeout value is zero and can be set or
      modified from sysfs. If there was no uart activity for the period set
      through sysfs, the timer will expire and call timer handler this will
      set a flag can_sleep using which decision to gate uart clocks can be taken.
      
      Since the clock gating mechanism is outside the uart driver, we currently
      use this mechanism. In preparation to runtime implementation for omap-serial
      driver we can cleanup this mechanism and use runtime API's to gate uart clocks.
      
      Removes the following:
      * timer related info from local uart_state struct
      * the code used to set timeout value from sysfs.
      * irqflags used to set shared irq handler.
      * un-used function omap_uart_check_wakeup.
      Signed-off-by: NGovindraj.R <govindraj.raja@ti.com>
      Acked-by: Greg Kroah-Hartman <gregkh@suse.de> (for drivers/tty changes)
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      273558b3
  2. 18 11月, 2011 3 次提交
    • J
      TTY: ldisc, wait for ldisc infinitely in hangup · 0c73c08e
      Jiri Slaby 提交于
      For /dev/console case, we do not kill all ldisc users. It's due to
      redirected_tty_write test in __tty_hangup. In that case there still
      might be a process waiting e.g. in n_tty_read for input.
      
      We wait for such processes to disappear. The problem is that we use a
      timeout. After this timeout, we continue closing the ldisc and start
      freeing tty resources. It obviously leads to crashes when the other
      process is woken.
      
      So to fix this, we wait infinitely before reiniting the ldisc. (The
      tiocsetd remains untouched -- times out after 5s.)
      
      This is nicely reproducible with this run from shell:
        exec 0<>/dev/console 1<>/dev/console 2<>/dev/console
      and stopping a getty like:
        systemctl stop serial-getty@ttyS0.service
      
      The crash proper may be produced only under load or with constified
      timing the same as for 92f6fa09.
      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>
      0c73c08e
    • 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
  3. 16 11月, 2011 9 次提交
  4. 09 11月, 2011 1 次提交
    • A
      n_gsm: Fix timings · a8d12007
      Alan Cox 提交于
      Alek Du reported that the code erroneously applies time to jiffies
      conversions twice to the t1 and t2 values. In normal use on a modem link
      this cases no visible problem but on a slower link it will break as with
      HZ=1000 as is typical we are running t1/t2 ten times too fast.
      
      Alek's original patch removed the conversion from the timer setting but we
      in fact have to be more careful as the contents of t1/t2 are visible via
      the device API and we thus need to correct the constants.
      Signed-off-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a8d12007
  5. 07 11月, 2011 2 次提交
  6. 04 11月, 2011 1 次提交
  7. 02 11月, 2011 1 次提交
  8. 01 11月, 2011 2 次提交
  9. 25 10月, 2011 1 次提交
  10. 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
  11. 19 10月, 2011 13 次提交
  12. 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
  13. 13 10月, 2011 1 次提交
  14. 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
  15. 30 9月, 2011 1 次提交