30 Jul, 2013

1 commit


13 Apr, 2013

1 commit

  • Make sure to check ASYNC_INITIALISED before raising DTR when waking up
    from blocked open in block_til_ready.

    Currently DTR could get raised at hang up as a blocked process would
    raise DTR unconditionally before checking for hang up and returning.

    Signed-off-by: Johan Hovold
    Signed-off-by: Greg Kroah-Hartman

    Johan Hovold
     

19 Mar, 2013

1 commit


30 Jan, 2013

1 commit

  • Dan Carpenter noticed a missing set of parentheses
    around a multiple field addition.

    https://lkml.org/lkml/2013/1/27/166

    His original commit message:

    There is a kind of precedence problem here, but it doesn't affect how
    the code works because ->serial_signals is unsigned char. We want to
    clear two flags here.

    #define SerialSignal_RTS 0x20 /* Request to Send */
    #define SerialSignal_DTR 0x80 /* Data Terminal Ready */

    Without the parenthesis then it does:

    info->serial_signals &= 0x5f;

    With the parenthesis it does:

    info->serial_signals &= 0xffffff5f;

    info->serial_signals is an unsigned char so the two statements are
    equivalent, but it's cleaner to add the parenthesis. In other dtr_rts()
    functions the parenthesis are there so this makes it more consistent.

    Other changes:

    Convert all + uses to | for these bit operations.

    Reorder the multiple fields for consistency.
    Update the comments too.

    Reported-by: Dan Carpenter
    Signed-off-by: Joe Perches
    Signed-off-by: Greg Kroah-Hartman

    Joe Perches
     

16 Jan, 2013

4 commits

  • Now, we start converting tty buffer functions to actually use
    tty_port. This will allow us to get rid of the need of tty in many
    call sites. Only tty_port will needed and hence no more
    tty_port_tty_get in those paths.

    Now, the one where most of tty_port_tty_get gets removed:
    tty_flip_buffer_push.

    IOW we also closed all the races in drivers not using tty_port_tty_get
    at all yet.

    Also we move tty_flip_buffer_push declaration from include/linux/tty.h
    to include/linux/tty_flip.h to all others while we are changing it
    anyway.

    Signed-off-by: Jiri Slaby
    Signed-off-by: Greg Kroah-Hartman

    Jiri Slaby
     
  • One point is to have less places where we actually need tty pointer.
    The other is that low_latency is bound to buffer processing and
    buffers are now in tty_port. So it makes sense to move low_latency to
    tty_port too.

    Signed-off-by: Jiri Slaby
    Signed-off-by: Greg Kroah-Hartman

    Jiri Slaby
     
  • Now, we start converting tty buffer functions to actually use
    tty_port. This will allow us to get rid of the need of tty in many
    call sites. Only tty_port will needed and hence no more
    tty_port_tty_get in those paths.

    tty_insert_flip_char is the next one to proceed. This one is used all
    over the code, so the patch is huge.

    Signed-off-by: Jiri Slaby
    Signed-off-by: Greg Kroah-Hartman

    Jiri Slaby
     
  • Fix call to line discipline receive_buf by synclink drivers.
    Dummy flag buffer argument is ignored by N_HDLC line discipline but might
    be of insufficient size if accessed by a different line discipline
    selected by mistake. flag buffer allocation now matches max size of data
    buffer. Unused char_buf buffers are removed.

    Signed-off-by: Paul Fulghum
    Signed-off-by: Greg Kroah-Hartman

    Paul Fulghum
     

22 Nov, 2012

3 commits

  • CONFIG_HOTPLUG is going away as an option so __devexit is no
    longer needed.

    Signed-off-by: Bill Pemberton
    Cc: Jiri Slaby
    Cc: Alan Cox
    Acked-by: Tobias Klauser
    Cc: Lucas Tavares
    Cc: Daniel Walker
    Cc: Bryan Huntsman
    Cc: "David S. Miller"
    Cc: Peter Korsgaard
    Cc: Tony Prisk
    Acked-by: David Brown
    Signed-off-by: Greg Kroah-Hartman

    Bill Pemberton
     
  • CONFIG_HOTPLUG is going away as an option so __devinit is no longer
    needed.

    Signed-off-by: Bill Pemberton
    Cc: Jiri Slaby
    Cc: Alan Cox
    Cc: Lucas Tavares
    Cc: "David S. Miller"
    Cc: Peter Korsgaard
    Cc: Tony Prisk
    Acked-by: Tobias Klauser
    Acked-by: Nicolas Ferre
    Signed-off-by: Greg Kroah-Hartman

    Bill Pemberton
     
  • CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
    needed.

    Signed-off-by: Bill Pemberton
    Cc: Jiri Slaby
    Signed-off-by: Greg Kroah-Hartman

    Bill Pemberton
     

16 Nov, 2012

1 commit

  • After commit "TTY: move tty buffers to tty_port", the tty buffers are
    not freed in some drivers. This is because tty_port_destructor is not
    called whenever a tty_port is freed. This was an assumption I counted
    with but was unfortunately untrue. So fix the drivers to fulfil this
    assumption.

    To be sure, the TTY buffers (and later some stuff) are gone along with
    the tty_port, we have to call tty_port_destroy at tear-down places.
    This is mostly where the structure containing a tty_port is freed.
    This patch does exactly that -- put tty_port_destroy at those places.

    Signed-off-by: Jiri Slaby
    Signed-off-by: Greg Kroah-Hartman

    Jiri Slaby
     

06 Sep, 2012

1 commit

  • In most of the time, the driver needs to check if the cts flow control
    is enabled. But now, the driver checks the ASYNC_CTS_FLOW flag manually,
    which is not a grace way. So add a new wraper function to make the code
    tidy and clean.

    Signed-off-by: Huang Shijie
    Signed-off-by: Greg Kroah-Hartman

    Huang Shijie
     

14 Aug, 2012

1 commit

  • This has two outcomes:
    * we give the TTY layer a tty_port
    * we do not find the info structure every time open is called on that
    tty

    Signed-off-by: Jiri Slaby
    Acked-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Jiri Slaby
     

11 Aug, 2012

1 commit

  • The termios and other changes mean the other protections needed on the driver
    tty arrays should be adequate. Turn it all back on.

    This contains pieces folded in from the fixes made to the original patches

    | From: Geert Uytterhoeven (fix m68k)
    | From: Paul Gortmaker (fix cris)
    | From: Jiri Kosina (lockdep)
    | From: Eric Dumazet (lockdep)

    Signed-off-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Alan Cox
     

17 Jul, 2012

2 commits

  • This will let us sort out a whole pile of tty related races. The
    alternative would be to keep points and refcount the termios objects.
    However
    1. They are tiny anyway
    2. Many devices don't use the stored copies
    3. We can remove a pty special case

    Signed-off-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Alan Cox
     
  • I sent GregKH this after the pre-requisites. He dropped the pre-requesites
    for good reason and unfortunately then applied this patch. Without this
    reverted you get random kernel memory corruption which will make bisecting
    anything between it and the properly applied patches a complete sod.

    Signed-off-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Alan Cox
     

07 Jul, 2012

1 commit

  • The termios and other changes mean the other protections needed on the driver
    tty arrays should be adequate. Turn it all back on.

    This contains pieces folded in from the fixes made to the original patches

    | From: Geert Uytterhoeven (fix m68k)
    | From: Paul Gortmaker (fix cris)
    | From: Jiri Kosina (lockdep)
    | From: Eric Dumazet (lockdep)

    Signed-off-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Alan Cox
     

03 Jun, 2012

1 commit

  • This reverts the tty layer change to use per-tty locking, because it's
    not correct yet, and fixing it will require some more deep surgery.

    The main revert is d29f3ef39be4 ("tty_lock: Localise the lock"), but
    there are several smaller commits that built upon it, they also get
    reverted here. The list of reverted commits is:

    fde86d310886 - tty: add lockdep annotations
    8f6576ad476b - tty: fix ldisc lock inversion trace
    d3ca8b64b97e - pty: Fix lock inversion
    b1d679afd766 - tty: drop the pty lock during hangup
    abcefe5fc357 - tty/amiserial: Add missing argument for tty_unlock()
    fd11b42e3598 - cris: fix missing tty arg in wait_event_interruptible_tty call
    d29f3ef39be4 - tty_lock: Localise the lock

    The revert had a trivial conflict in the 68360serial.c staging driver
    that got removed in the meantime.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

05 May, 2012

1 commit

  • In each remaining case the tty_lock is associated with a specific tty. This
    means we can now lock on a per tty basis. We do need tty_lock_pair() for
    the pty case. Uglier but still a step in the right direction.

    [fixed up calls in 3 missing drivers - gregkh]

    Signed-off-by: Alan Cox
    Acked-by: Arnd Bergmann
    Signed-off-by: Greg Kroah-Hartman

    Alan Cox
     

29 Mar, 2012

1 commit


09 Mar, 2012

2 commits

  • Checking if tty->index is in bounds is not needed. The tty has the
    index set in the initial open. This is done in get_tty_driver. And it
    can be only in interval num).

    So remove the tests which check exactly this interval. Some are
    left untouched as they check against the current backing device count.
    (Leaving apart that the check is racy in most of the cases.)

    Signed-off-by: Jiri Slaby
    Signed-off-by: Greg Kroah-Hartman

    Jiri Slaby
     
  • All num, magic and owner are set by alloc_tty_driver. No need to
    re-set them on each allocation site.

    pti driver sets something different to what it passes to
    alloc_tty_driver. It is not a bug, since we don't use the lines
    parameter in any way. Anyway this is fixed, and now we do the right
    thing.

    Signed-off-by: Jiri Slaby
    Acked-by: Tilman Schmidt
    Signed-off-by: Greg Kroah-Hartman

    Jiri Slaby
     

13 Jan, 2012

1 commit


24 Aug, 2011

1 commit


20 Apr, 2011

1 commit


31 Mar, 2011

1 commit


23 Feb, 2011

1 commit