1. 19 Mar, 2010 7 commits
    • Jason Wessel's avatar
      tty_port,usb-console: Fix usb serial console open/close regression · 336cee42
      Jason Wessel authored
      Commit e1108a63 ("usb_serial: Use the
      shutdown() operation") breaks the ability to use a usb console
      starting in 2.6.33.  This was observed when using
      console=ttyUSB0,115200 as a boot argument with an FTDI device.  The
      error is:
      
      ftdi_sio ttyUSB0: ftdi_submit_read_urb - failed submitting read urb, error -22
      
      The handling of the ASYNCB_INITIALIZED changed in 2.6.32 such that in
      tty_port_shutdown() it always clears the flag if it is set.  The fix
      is to add a variable to the tty_port struct to indicate when the tty
      port is a console.
      
      CC: Alan Cox <alan@linux.intel.com>
      CC: Alan Stern <stern@rowland.harvard.edu>
      CC: Oliver Neukum <oliver@neukum.org>
      CC: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      336cee42
    • Tobias Klauser's avatar
      tty: cpm_uart: use resource_size() · 23144366
      Tobias Klauser authored
      Use the resource_size function instead of manually calculating the
      resource size.  This reduces the chance of introducing off-by-one errors.
      Signed-off-by: default avatarTobias Klauser <tklauser@distanz.ch>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Kumar Gala <galak@gate.crashing.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      23144366
    • Fang Wenqi's avatar
      tty_buffer: Fix distinct type warning · d4bee0a6
      Fang Wenqi authored
      CC      drivers/char/tty_buffer.o
      drivers/char/tty_buffer.c: In function ‘tty_insert_flip_string_fixed_flag’:
      drivers/char/tty_buffer.c:251: warning: comparison of distinct pointer types lacks a cast
      drivers/char/tty_buffer.c: In function ‘tty_insert_flip_string_flags’:
      drivers/char/tty_buffer.c:288: warning: comparison of distinct pointer types lacks a cast
      
      Fix it by replacing min() with min_t() in tty_insert_flip_string_flags and
      					  tty_insert_flip_string_fixed_flag().
      Signed-off-by: default avatarFang Wenqi <antonf@turbolinux.com.cn>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      d4bee0a6
    • Amit Shah's avatar
      hvc_console: Fix race between hvc_close and hvc_remove · e74d098c
      Amit Shah authored
      Alan pointed out a race in the code where hvc_remove is invoked. The
      recent virtio_console work is the first user of hvc_remove().
      
      Alan describes it thus:
      
      The hvc_console assumes that a close and remove call can't occur at the
      same time.
      
      In addition tty_hangup(tty) is problematic as tty_hangup is asynchronous
      itself....
      
      So this can happen
      
              hvc_close                               hvc_remove
              hung up ? - no
                                                      lock
                                                      tty = hp->tty
                                                      unlock
              lock
              hp->tty = NULL
              unlock
              notify del
              kref_put the hvc struct
              close completes
              tty is destroyed
                                                      tty_hangup dead tty
                                                      tty->ops will be NULL
                                                      NULL->...
      
      This patch adds some tty krefs and also converts to using tty_vhangup().
      Reported-by: default avatarAlan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: default avatarAmit Shah <amit.shah@redhat.com>
      CC: Alan Cox <alan@lxorguk.ukuu.org.uk>
      CC: linuxppc-dev@ozlabs.org
      CC: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      e74d098c
    • David Miller's avatar
      uartlite: Fix build on sparc. · f157b585
      David Miller authored
      We can get this driver enabled via MFD_TIMBERDALE which only
      requires GPIO to be on.
      
      But the of_address_to_resource() function is only present on
      powerpc and microblaze, so we have to conditionalize the
      CONFIG_OF probing bits on that.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Acked-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      f157b585
    • Mel Gorman's avatar
      tty: Take a 256 byte padding into account when buffering below sub-page units · 352fa6ad
      Mel Gorman authored
      The TTY layer takes some care to ensure that only sub-page allocations
      are made with interrupts disabled. It does this by setting a goal of
      "TTY_BUFFER_PAGE" to allocate. Unfortunately, while TTY_BUFFER_PAGE takes the
      size of tty_buffer into account, it fails to account that tty_buffer_find()
      rounds the buffer size out to the next 256 byte boundary before adding on
      the size of the tty_buffer.
      
      This patch adjusts the TTY_BUFFER_PAGE calculation to take into account the
      size of the tty_buffer and the padding. Once applied, tty_buffer_alloc()
      should not require high-order allocations.
      Signed-off-by: default avatarMel Gorman <mel@csn.ul.ie>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      352fa6ad
    • Greg Kroah-Hartman's avatar
      Revert "tty: Add a new VT mode which is like VT_PROCESS but doesn't require a... · 87a6aca5
      Greg Kroah-Hartman authored
      Revert "tty: Add a new VT mode which is like VT_PROCESS but doesn't require a VT_RELDISP ioctl call"
      
      This reverts commit eec9fe7d.
      
      Ari writes as the reason this should be reverted:
      	The problems with this patch include:
      	1. There's at least one subtlety I overlooked - switching
      	between X servers (i.e. from one X VT to another) still requires
      	the cooperation of both X servers. I was assuming that KMS
      	eliminated this.
      	2. It hasn't been tested at all (no X server patch exists which
      	uses the new mode).
      
      As he was the original author of the patch, I'll revert it.
      
      Cc: Ari Entlich <atrigent@ccs.neu.edu>
      Cc: Alan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      
      87a6aca5
  2. 15 Mar, 2010 21 commits
  3. 14 Mar, 2010 12 commits