18 Aug, 2020
1 commit
-
With W=1, the kernel-doc checker complains quite a lot in the tty layer.
Over the time, many documented parameters were renamed, removed or
switched from tty to tty_port and similar. Some were mistyped in the doc
too.So fix all these in the tty core. (But do not add the missing ones which
the checker complains about too. Not now.) The rest in the tty layer
will follow in the next patches.Signed-off-by: Jiri Slaby
Link: https://lore.kernel.org/r/20200818085655.12071-4-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman
22 Jan, 2020
2 commits
-
According to termbits.h SPARC supports few more baud rates
than currently defined in tty_baudrate.c.Append supported ones to baud_table[] and baud_bits[].
Signed-off-by: Andy Shevchenko
Link: https://lore.kernel.org/r/20200115224124.74684-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman -
Synchronize baud rate tables baud_table and baud_bits with each other
for better readability. This makes clear what is being used for SPARC.
No functional change intended.Signed-off-by: Andy Shevchenko
Link: https://lore.kernel.org/r/20200115224124.74684-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman
08 Nov, 2018
1 commit
-
On architectures with CBAUDEX == 0 (Alpha and PowerPC), the code in tty_baudrate.c does
not do any limit checking on the tty_baudrate[] array, and in fact a
buffer overrun is possible on both architectures. Add a limit check to
prevent that situation.This will be followed by a much bigger cleanup/simplification patch.
Signed-off-by: H. Peter Anvin (Intel)
Requested-by: Cc: Johan Hovold
Cc: Jiri Slaby
Cc: Al Viro
Cc: Richard Henderson
Cc: Ivan Kokshaysky
Cc: Matt Turner
Cc: Thomas Gleixner
Cc: Kate Stewart
Cc: Philippe Ombredanne
Cc: Eugene Syromiatnikov
Cc: Alan Cox
Cc: stable
Signed-off-by: Greg Kroah-Hartman
16 Jul, 2018
3 commits
-
Since commit edc6afc54968 ("[PATCH] tty: switch to ktermios and new
framework") arbitrary baud rates can be requested using BOTHER and input
rates can be requested using the termios CIBAUD bits (CBAUD shifted
IBSHIFT bits).This functionality has been conditionally compiled depending on whether
an architecture defines BOTHER and IBSHIFT respectively, but would in
fact fail to compile unless both symbols were defined due to cross
dependencies.Relax the IBSHIFT => BOTHER dependency so that an architecture could
theoretically support CIBAUD without the Linux-specific BOTHER, while
hopefully making the current conditional-compilation directives a bit
less confusing.Note that the long-term goal is still to have all architectures support
both features, so an alternative could just be to have the lot depend on
BOTHER.Signed-off-by: Johan Hovold
Signed-off-by: Greg Kroah-Hartman -
When the termios CIBAUD bits are left unset (i.e. B0), we use the same
output and input speed and should leave CIBAUD unchanged.When the user requests a rate using BOTHER and c_ospeed which the driver
cannot set exactly, the driver can report back the actual baud rate
using tty_termios_encode_baud_rate(). If this rate is close enough to a
standard rate however, we could end up setting CIBAUD to a Bfoo value
despite the user having left it unset.This in turn could lead to an unexpected input rate being set on
subsequent termios updates.Fix this by using a zero tolerance value also for the input rate when
CIBAUD is clear so that the matching logic works as expected.Fixes: 78137e3b34e1 ("[PATCH] tty: improve encode_baud_rate logic")
Signed-off-by: Johan Hovold
Signed-off-by: Greg Kroah-Hartman -
Make sure to clear the CIBAUD bits before OR-ing the new mask when
encoding the termios input baud rate.This could otherwise lead to an incorrect input rate being reported back
and incidentally set on subsequent termios updates.Fixes: edc6afc54968 ("[PATCH] tty: switch to ktermios and new framework")
Signed-off-by: Johan Hovold
Signed-off-by: Greg Kroah-Hartman
08 Nov, 2017
1 commit
-
It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.Update the drivers/tty files files with the correct SPDX license
identifier based on the license text in the file itself. The SPDX
identifier is a legally binding shorthand, which can be used instead of
the full boiler plate text.This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.Cc: Jiri Slaby
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Michael Ellerman
Cc: Chris Metcalf
Cc: Jiri Kosina
Cc: David Sterba
Cc: James Hogan
Cc: Rob Herring
Cc: Eric Anholt
Cc: Stefan Wahren
Cc: Florian Fainelli
Cc: Ray Jui
Cc: Scott Branden
Cc: bcm-kernel-feedback-list@broadcom.com
Cc: "James E.J. Bottomley"
Cc: Helge Deller
Cc: Joachim Eastwood
Cc: Matthias Brugger
Cc: Masahiro Yamada
Cc: Tobias Klauser
Cc: Russell King
Cc: Vineet Gupta
Cc: Richard Genoud
Cc: Alexander Shiyan
Cc: Baruch Siach
Cc: "Maciej W. Rozycki"
Cc: "Uwe Kleine-König"
Cc: Pat Gefre
Cc: "Guilherme G. Piccoli"
Cc: Jason Wessel
Cc: Vladimir Zapolskiy
Cc: Sylvain Lemieux
Cc: Carlo Caione
Cc: Kevin Hilman
Cc: Liviu Dudau
Cc: Sudeep Holla
Cc: Lorenzo Pieralisi
Cc: Andy Gross
Cc: David Brown
Cc: "Andreas Färber"
Cc: Kevin Cernekee
Cc: Laxman Dewangan
Cc: Thierry Reding
Cc: Jonathan Hunter
Cc: Barry Song
Cc: Patrice Chotard
Cc: Maxime Coquelin
Cc: Alexandre Torgue
Cc: "David S. Miller"
Cc: Peter Korsgaard
Cc: Timur Tabi
Cc: Tony Prisk
Cc: Michal Simek
Cc: "Sören Brinkmann"
Cc: Thomas Gleixner
Cc: Kate Stewart
Cc: Philippe Ombredanne
Cc: Jiri Slaby
Signed-off-by: Greg Kroah-Hartman
19 Apr, 2017
1 commit
-
To allow reuse without the rest of the tty_ioctl code.
No logical changes from this patch.Signed-off-by: Nicolas Pitre
Signed-off-by: Greg Kroah-Hartman