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 -
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 -
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 -
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 offSigned-off-by: Alan Cox
Signed-off-by: Greg Kroah-Hartman -
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 fromport shutdown
port->dtr_rtsto
port->dtr_rts
port shutdownSome 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 -
Mind the hoover wire...
Signed-off-by: Alan Cox
Cc: Alan Stern
Cc: Oliver Neukum
Signed-off-by: Greg Kroah-Hartman -
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
01 Dec, 2009
1 commit
-
Some drivers allow O_NDELAY of a dead port (eg for setserial to work). In that
situation we must not try to raise the carrier.Signed-off-by: Alan Cox
Cc: stable
Signed-off-by: Greg Kroah-Hartman
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=2The 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
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 -
This is used by various drivers not just serial and can be extracted
as commonalitySigned-off-by: 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
17 Jul, 2009
1 commit
-
Whoops.. fortunately not many people use this yet.
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds
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
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 -
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 -
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 -
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
03 Jan, 2009
8 commits
-
Now we have our ducks in order we can begin switching to the port
operationsSigned-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
Now the locking is straight and the port kref usage is straight we can
replace lots of chunks of code with the standard port helpersSigned-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
Again this is a lot of common code we can unify
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
If we have no speed set at some point then we should not raise DTR/RTS at
that point when opening as the tty is not readySigned-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
Start sucking more commonality out of the drivers into a single piece of
core code.Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
This helps set the basis for moving block_til_ready into common code. We also
introduce a tty_port_hangup helper as this will also be generally needed.Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
This moves another per device special out of what should be shared open
wait paths into private methodsSigned-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
This is the first step to generalising the various pieces of waiting logic
duplicated in all sorts of serial drivers.Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds
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
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 -
Not much in it yet but this will grow a lot
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds