12 Dec, 2009

7 commits

  • Users of tty port need a way to refcount ports when hotplugging is
    involved.

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

    Alan Cox
     
  • Some devices want to set IO_ERROR in their activate methods so that you can
    be handed a 'dead' port for operations like setserial. Thus we need to
    clear the flag before activate so that activate can choose to set the flag
    and still return 0.

    This is fine as the file handle/tty are not accessible to the user yet.

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

    Alan Cox
     
  • To propogate tty_port_open/close to a few other devices we need to start
    handling the IO_ERROR flag on the tty. We can do this pretty trivially.

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

    Alan Cox
     
  • We want to be able to do this without regard for the activate/own open
    method being used which causes a problem using port->mutex. Add another
    mutex for now. Once everything uses port_open to do buffer allocs we can
    kill it back off

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

    Alan Cox
     
  • Move the HUCPL handling from the end of close_port_start to the beginning
    of close_port_end. What this actually does is change the ordering from

    port shutdown
    port->dtr_rts

    to

    port->dtr_rts
    port shutdown

    Some hardware drops the physical connection on shutdown so we must perform
    the port operations before the shutdown.

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

    Alan Cox
     
  • Mind the hoover wire...

    Signed-off-by: Alan Cox
    Cc: Alan Stern
    Cc: Oliver Neukum
    Signed-off-by: Greg Kroah-Hartman

    Alan Cox
     
  • For the moment this just moves the USB logic over and fixes the 'what if
    we open and hangup at the same time' race noticed by Oliver Neukum.

    Signed-off-by: Alan Cox
    Cc: Alan Stern
    Cc: Oliver Neukum
    Signed-off-by: Greg Kroah-Hartman

    Alan Cox
     

01 Dec, 2009

1 commit


18 Nov, 2009

1 commit

  • Original discussion:
    http://thread.gmane.org/gmane.linux.usb.general/23217/focus=23248
    or
    http://marc.info/?l=linux-usb&m=125553790714133&w=2

    The tty_port code inherited a bug common to various drivers it was based
    upon. If the tty is opened O_NONBLOCK we do not wait for the carrier to be
    raised but we must still raise our modem lines if appropriate.

    (There is a second question here about whether we should do so if CLOCAL is
    set but that can wait)

    Signed-off-by: Alan Cox
    Reported-by: Karl Hiramoto
    Tested-by: Karl Hiramoto
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Alan Cox
     

20 Sep, 2009

3 commits

  • This patch (as1282) fixes some obvious typos in the TTY core.

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

    Alan Stern
     
  • This is used by various drivers not just serial and can be extracted
    as commonality

    Signed-off-by: Alan Cox

    Alan Cox
     
  • Now we are extracting out methods for shutdown and the like we can add a
    proper tty_port_close method that knows all the innards of the tty closing
    process and hides the lot from the caller.

    At some point in the future this will be paired with a similar open()
    helper and the drivers can stick to hardware management.

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

    Alan Cox
     

17 Jul, 2009

1 commit


25 Jun, 2009

1 commit

  • Since commit 3e3b5c087799e536871c8261b05bc28e4783c8da ("tty: use
    prepare/finish_wait"), tty_port_block_til_ready() is using
    prepare_to_wait()/finish_wait(). Those functions require that the
    wait_queue_t be initialised with .func=autoremove_wake_function, via
    DEFINE_WAIT().

    But the conversion from DECLARE_WAITQUEUE() to DEFINE_WAIT() was not made,
    so this code will oops in finish_wait().

    Signed-off-by: Jiri Slaby
    Signed-off-by: Andrew Morton
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     

11 Jun, 2009

4 commits

  • Use prepare_to_wait and finish_wait instead of add_wait_queue and
    remove_wait_queue.

    This avoids us setting a task state.

    Signed-off-by: Jiri Slaby
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     
  • Use wait_event instead of sleep_on in tty_block_til_ready.

    Wait for ASYNC_CLOSING flag being 0.

    Signed-off-by: Jiri Slaby
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     
  • We need this for devices that cannot flush and wait, but which do not order
    data and modem events. Without it we will hang up before all the data
    clears the hardware. Needed for the USB changes.

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Some drivers implement this internally, others miss it out. Push the
    behaviour into the core code as that way everyone will do it consistently.

    Update the dtr rts method to raise or lower depending upon flags. Having a
    single method in this style fits most of the implementations more cleanly than
    two funtions.

    We need this in place before we tackle the USB side

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     

03 Jan, 2009

8 commits


24 Oct, 2008

1 commit

  • Pass the brown paper bags please. I changed the semantics of this so the
    function was supposed to do the extra kref itself then forgot to do the
    change.. duh....

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     

14 Oct, 2008

2 commits

  • Use kref in the USB serial drivers so that we don't free tty structures
    from under the URB receive handlers as has historically been the case if
    you were unlucky. This also gives us a framework for general tty drivers to
    use tty_port objects and refcount.

    Contains two err->dev_err changes merged together to fix clashes in the
    -next tree.

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Not much in it yet but this will grow a lot

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox