03 Jan, 2009
40 commits
-
In serial8250_isa_init_ports(), the port's lock is initialized. We
should not overwrite it. In early_serial_setup(), only copy in the
fields we need. Since the early console code only uses a subset of
the fields, these are sufficient.Signed-off-by: David Daney
Signed-off-by: Tomaso Paoletti
Signed-off-by: Andrew Morton
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
Hi Alan
next-20081204 crashes with the following message:
BUG: unable to handle kernel paging request at ffff88007d320248
IP: [] uart_remove_one_port+0xef/0x111
kfree(info);
393: 49 8d 7d 10 lea 0x10(%r13),%rdi
397: e8 00 00 00 00 callq 39cSigned-off-by: Alexander Beregalov
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
Move the tty_port and uart_info bits around a little. By embedding the uart_info
into the uart_port we get rid of lots of corner case testing and also get the
ability to go portstateinfo which is a bit more elegant than the current
data structures.Downsides - we allocate a tiny bit more memory for unused ports, upside we've
removed as much code as it saved for most users..Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
Signed-off-by: Harvey Harrison
Signed-off-by: Andrew Morton
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
In the commit below a new struct serial_rs485 was introduced for a new
ioctl:commit c26c56c0f40e200e61d1390629c806f6adaffbcc
Author: Alan Cox
Date: Mon Oct 13 10:37:48 2008 +0100tty: Cris has a nice RS485 ioctl so we should steal it
This structure uses the __u32 types for some of its members, which leads
to the following compile error:$ cc -I.../include -c X.c
In file included from X.c:2: .../include/linux/serial.h:185:
error: expected specifier-qualifier-list before ‘__u32’
$It seems that these types are appropriate for this structure as it is
to be exposed to userspace. These types are available via linux/types.h
so move the include of that outside the __KERNEL__ section.Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
We don't need the BKL here any more so it can go. In a couple of spots the
driver requirements are not clear so push the lock down into the driver.Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
Use the tty port operations, add refcounting, and refactor a bit to make the
refcounting work cleanly.Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
Now we have our ducks in order we can begin switching to the port
operationsSigned-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
We will need this kref fitted to make full use of the port operations.
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
We need to this ready for using the standard helpers
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
Bring this driver into the port locking model
Signed-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 -
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
Bring epca into line with the port locking.
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
Makes TIOCM ioctls for Data Carrier Detect & related functions
work like /drivers/serial/serial-core.c potentially needed
for pppd & similar user programs.Signed-off-by: Denis Joseph Barrow
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
Init the tty structure once
Don't set ->low_latency twice in a row
Don't force bits we should be leaving to the user
Don't allocate termios arrays as these are in fact allocated by the tty layer
for you and just overwrite the ones allocated in the driverSigned-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
Checking tty == NULL doesn't help us unless we have a clear semantic for
the locking of the tty object in the driver. Use the tty kref objects so that
we can take references to the tty in the USB event handling paths.Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
Update the nozomi driver to use krefs
Signed-off-by: Linus Torvalds
-
disc_data and driver_data are void *
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
The write wakeup is done anyway for the poll while DO_WRITE_WAKUP is
cleared, set and managed by the ldisc layer and is no business of the pty
code.Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
The N_TTY ldisc layer does not send SIGIO POLL_OUTs correctly when output is
possible due to flawed handling of the TTY_DO_WRITE_WAKEUP bit. It will
either send no SIGIOs at all or on every tty wakeup.The fix is to set the bit when the tty driver write would block and test
and clear it on write wakeup.[Merged with existing N_TTY patches and a small buglet fixed -- Alan]
Signed-off-by: Thomas Pfaff
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
The underlying problem is that the device methods don't all correctly
handle disconnected status and some keep reporting bytes pending which
causes tcdrain to stall.When the cable is unplugged they are definitely gone, and as this is true
for all USB cables we can fix it in the core usb serial code.Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
The PCI-card identified as "Oxford Semiconductor Ltd EXSYS EX-41092 Dual
16950 Serial adapter" is only usable with other devices (i.e. not the same
card) after doing a "setserial /dev/ttyS baud_base 115200". This
baud_base should be default for this card.Signed-off-by: Niels de Vos
Signed-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 -
Mark it broken
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
Signed-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 -
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
Normalise them so we can use the common helpers later on
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
Switch generic_serial to do port count locking via the tty_port structure
ready for moving to a common port wait routine. Keep the old driver lock for
internal calling so we don't risk messing up the drivers below until we
are ready.Still needs kref conversions
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 was an alloc/clear wrapper but makes even less sense now it uses
kzalloc. Kill it off.Signed-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 -
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
Wrap access to task credentials so that they can be separated more easily from
the task_struct during the introduction of COW creds.Change most current->(|e|s|fs)[ug]id to current_(|e|s|fs)[ug]id().
Change some task->e?[ug]id to task_e?[ug]id(). In some places it makes more
sense to use RCU directly rather than a convenient wrapper; these will be
addressed by later patches.Signed-off-by: David Howells
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
Add device funtion for usb serial console, so we can open /dev/console
when we use a usb serial device as console.(Typecast removed as noted by Sergei Shtylyov)
Signed-off-by: Kevin Hao
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds