06 Jan, 2020
1 commit
-
ioremap has provided non-cached semantics by default since the Linux 2.6
days, so remove the additional ioremap_nocache interface.Signed-off-by: Christoph Hellwig
Acked-by: Arnd Bergmann
13 Oct, 2018
1 commit
-
Pointless dead assignments in moxa_set_serial_info() killed off;
they would've been a bug, if not for the fact that user-settable
flags had never been used in that driver. Bogus from day 1,
though...Signed-off-by: Al Viro
28 Nov, 2017
1 commit
-
The mode constants are taken from the GPL-2.0+ driver available
in the driver section of the Moxa homepage.It is tested on a C320Turbo PCI card per logic analyzer and
per a device which requires 9 bit character communication.The vendors driver supports CMSPAR unconditionally, so that all
other available firmware versions seems to support mark/space
parity modes as well.Signed-off-by: Lars Kanis
Signed-off-by: Greg Kroah-Hartman
22 Nov, 2017
1 commit
-
This changes all DEFINE_TIMER() callbacks to use a struct timer_list
pointer instead of unsigned long. Since the data argument has already been
removed, none of these callbacks are using their argument currently, so
this renames the argument to "unused".Done using the following semantic patch:
@match_define_timer@
declarer name DEFINE_TIMER;
identifier _timer, _callback;
@@DEFINE_TIMER(_timer, _callback);
@change_callback depends on match_define_timer@
identifier match_define_timer._callback;
type _origtype;
identifier _origarg;
@@void
-_callback(_origtype _origarg)
+_callback(struct timer_list *unused)
{ ... }Signed-off-by: Kees Cook
14 Nov, 2017
1 commit
-
Pull tty/serial updates from Greg KH:
"Here is the big tty/serial driver pull request for 4.15-rc1.Lots of serial driver updates in here, some small vt cleanups, and a
raft of SPDX and license boilerplate cleanups, messing up the diffstat
a bit.Nothing major, with no realy functional changes except better hardware
support for some platforms.All of these have been in linux-next for a while with no reported
issues"* tag 'tty-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (110 commits)
tty: ehv_bytechan: fix spelling mistake
tty: serial: meson: allow baud-rates lower than 9600
serial: 8250_fintek: Fix crash with baud rate B0
serial: 8250_fintek: Disable delays for ports != 0
serial: 8250_fintek: Return -EINVAL on invalid configuration
tty: Remove redundant license text
tty: serdev: Remove redundant license text
tty: hvc: Remove redundant license text
tty: serial: Remove redundant license text
tty: add SPDX identifiers to all remaining files in drivers/tty/
tty: serial: jsm: remove redundant pointer ts
tty: serial: jsm: add space before the open parenthesis '('
tty: serial: jsm: fix coding style
tty: serial: jsm: delete space between function name and '('
tty: serial: jsm: add blank line after declarations
tty: serial: jsm: change the type of local variable
tty: serial: imx: remove dead code imx_dma_rxint
tty: serial: imx: disable ageing timer interrupt if dma in use
serial: 8250: fix potential deadlock in rs485-mode
serial: m32r_sio: Drop redundant .data assignment
...
08 Nov, 2017
2 commits
-
Now that the SPDX tag is in all tty files, that identifies the license
in a specific and legally-defined manner. So the extra GPL text wording
can be removed as it is no longer needed at all.This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text. And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.No copyright headers or other non-license-description text was removed.
Cc: Jiri Slaby
Cc: James Hogan
Signed-off-by: Greg Kroah-Hartman -
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
05 Oct, 2017
1 commit
-
Drop the arguments from the macro and adjust all callers with the
following script:perl -pi -e 's/DEFINE_TIMER\((.*), 0, 0\);/DEFINE_TIMER($1);/g;' \
$(git grep DEFINE_TIMER | cut -d: -f1 | sort -u | grep -v timer.h)Signed-off-by: Kees Cook
Acked-by: Geert Uytterhoeven # for m68k parts
Acked-by: Guenter Roeck # for watchdog parts
Acked-by: David S. Miller # for networking parts
Acked-by: Greg Kroah-Hartman
Acked-by: Kalle Valo # for wireless parts
Acked-by: Arnd Bergmann
Cc: linux-mips@linux-mips.org
Cc: Petr Mladek
Cc: Benjamin Herrenschmidt
Cc: Lai Jiangshan
Cc: Sebastian Reichel
Cc: Kalle Valo
Cc: Paul Mackerras
Cc: Pavel Machek
Cc: linux1394-devel@lists.sourceforge.net
Cc: Chris Metcalf
Cc: linux-s390@vger.kernel.org
Cc: linux-wireless@vger.kernel.org
Cc: "James E.J. Bottomley"
Cc: Wim Van Sebroeck
Cc: Michael Ellerman
Cc: Ursula Braun
Cc: Viresh Kumar
Cc: Harish Patil
Cc: Stephen Boyd
Cc: Michael Reed
Cc: Manish Chopra
Cc: Len Brown
Cc: Arnd Bergmann
Cc: linux-pm@vger.kernel.org
Cc: Heiko Carstens
Cc: Tejun Heo
Cc: Julian Wiedmann
Cc: John Stultz
Cc: Mark Gross
Cc: linux-watchdog@vger.kernel.org
Cc: linux-scsi@vger.kernel.org
Cc: "Martin K. Petersen"
Cc: Greg Kroah-Hartman
Cc: "Rafael J. Wysocki"
Cc: Oleg Nesterov
Cc: Ralf Baechle
Cc: Stefan Richter
Cc: Guenter Roeck
Cc: netdev@vger.kernel.org
Cc: Martin Schwidefsky
Cc: Andrew Morton
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Sudip Mukherjee
Link: https://lkml.kernel.org/r/1507159627-127660-11-git-send-email-keescook@chromium.org
Signed-off-by: Thomas Gleixner
30 Jul, 2017
1 commit
-
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by work with
const pci_device_id. So mark the non-const structs as const.File size before:
text data bss dec hex filename
14201 656 1760 16617 40e9 drivers/tty/moxa.oFile size After adding 'const':
text data bss dec hex filename
14329 528 1760 16617 40e9 drivers/tty/moxa.oSigned-off-by: Arvind Yadav
Signed-off-by: Greg Kroah-Hartman
20 Apr, 2017
1 commit
-
When the kernel is running in secure boot mode, we lock down the kernel to
prevent userspace from modifying the running kernel image. Whilst this
includes prohibiting access to things like /dev/mem, it must also prevent
access by means of configuring driver modules in such a way as to cause a
device to access or modify the kernel image.To this end, annotate module_param* statements that refer to hardware
configuration and indicate for future reference what type of parameter they
specify. The parameter parser in the core sees this information and can
skip such parameters with an error message if the kernel is locked down.
The module initialisation then runs as normal, but just sees whatever the
default values for those parameters is.Note that we do still need to do the module initialisation because some
drivers have viable defaults set in case parameters aren't specified and
some drivers support automatic configuration (e.g. PNP or PCI) in addition
to manually coded parameters.This patch annotates drivers in drivers/tty/.
Suggested-by: Alan Cox
Signed-off-by: David Howells
Acked-by: Greg Kroah-Hartman
cc: Jiri Slaby
cc: linux-serial@vger.kernel.org
25 Dec, 2016
1 commit
-
This was entirely automated, using the script by Al:
PATT='^[[:blank:]]*#[[:blank:]]*include[[:blank:]]*'
sed -i -e "s!$PATT!#include !" \
$(git grep -l "$PATT"|grep -v ^include/linux/uaccess.h)to do the replacement at the end of the merge window.
Requested-by: Al Viro
Signed-off-by: Linus Torvalds
01 May, 2016
2 commits
-
Replace ASYNC_INITIALIZED bit in the tty_port::flags field with
TTY_PORT_INITIALIZED bit in the tty_port::iflags field. Introduce helpers
tty_port_set_initialized() and tty_port_initialized() to abstract
atomic bit ops.Note: the transforms for test_and_set_bit() and test_and_clear_bit()
are unnecessary as the state transitions are already mutually exclusive;
the tty lock prevents concurrent open/close/hangup.Signed-off-by: Peter Hurley
Signed-off-by: Greg Kroah-Hartman -
Abstract TTY_THROTTLED bit tests with tty_throttled().
Signed-off-by: Peter Hurley
Signed-off-by: Greg Kroah-Hartman
14 Dec, 2015
1 commit
-
SERIAL_DO_RESTART is not used by these 3 drivers; remove.
Signed-off-by: Peter Hurley
Signed-off-by: Greg Kroah-Hartman
09 Sep, 2014
1 commit
-
The prefix suggests the number should be printed in hex, so use
the %x specifier to do that.Found by using regex suggested by Joe Perches.
Signed-off-by: Hans Wennborg
Signed-off-by: Greg Kroah-Hartman
19 Mar, 2013
1 commit
-
It allows for cleaning up on a considerable amount of places. They did
port_get, hangup, kref_put. Now the only thing needed is to call
tty_port_tty_hangup which does exactly that. And they can also decide
whether to consider CLOCAL or completely ignore that.Signed-off-by: Jiri Slaby
Signed-off-by: Greg Kroah-Hartman
16 Jan, 2013
3 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.This is the last one: tty_schedule_flip
Signed-off-by: Jiri Slaby
Signed-off-by: Greg Kroah-Hartman -
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 -
Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty pointer in
many call sites. Only tty_port will be needed and hence no more
tty_port_tty_get calls in those paths.Now 4 string flipping ones are on turn:
* tty_insert_flip_string_flags
* tty_insert_flip_string_fixed_flag
* tty_prepare_flip_string
* tty_prepare_flip_string_flagsSigned-off-by: Jiri Slaby
Signed-off-by: Greg Kroah-Hartman
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 -
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 -
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
16 Nov, 2012
2 commits
-
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 -
We should do hangup on dcd loss if CLOCAL is false not true.
Signed-off-by: Alan Cox
Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=49911
Signed-off-by: Greg Kroah-Hartman
17 Aug, 2012
1 commit
-
We changed these from alloc_tty_driver() to tty_alloc_driver() so the
error handling needs to modified to check for IS_ERR() instead of NULL.Signed-off-by: Dan Carpenter
Acked-by: Jiri Slaby
Signed-off-by: Greg Kroah-Hartman
16 Aug, 2012
1 commit
-
Convert a 0 error return code to a negative one, as returned elsewhere in the
function.A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)//
@@
identifier ret;
expression e,e1,e2,e3,e4,x;
@@(
if (\(ret != 0\|ret < 0\) || ...) { ... return ...; }
|
ret = 0
)
... when != ret = e1
*x = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\|ioremap\|ioremap_nocache\|devm_ioremap\|devm_ioremap_nocache\)(...);
... when != x = e2
when != ret = e3
*if (x == NULL || ...)
{
... when != ret = e4
* return ret;
}
//Signed-off-by: Julia Lawall
Signed-off-by: Greg Kroah-Hartman
14 Aug, 2012
1 commit
-
This allows us to provide the tty layer with information about
tty_port for each link.We also provide a tty_port for the service port. For this one we allow
only ioctl, so this is pretty ugly.Signed-off-by: Jiri Slaby
Acked-by: Alan Cox
Signed-off-by: Greg Kroah-Hartman
17 Jul, 2012
1 commit
-
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 caseSigned-off-by: Alan Cox
Signed-off-by: Greg Kroah-Hartman
29 Mar, 2012
1 commit
-
Remove all #inclusions of asm/system.h preparatory to splitting and killing
it. Performed with the following command:perl -p -i -e 's!^#\s*include\s*.*\n!!' `grep -Irl '^#\s*include\s*' *`
Signed-off-by: David Howells
09 Mar, 2012
2 commits
-
This is supposed to be doing a shift before the comparison instead of
just doing a bitwise AND directly. The current code means the start()
just returns without doing anything.Signed-off-by: Dan Carpenter
Acked-by: Jiri Slaby
Cc: stable
Signed-off-by: Greg Kroah-Hartman -
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
02 Jul, 2011
1 commit
-
Since the printk_ratelimit() shouldn't be used anymore (see comment in
include/linux/printk.h), replace it with printk_ratelimited().Signed-off-by: Manuel Zerpies
Signed-off-by: Greg Kroah-Hartman
30 Apr, 2011
1 commit
-
The tty value that should be put is the one that was just gotten by
tty_port_tty_get, not the one that is the argument to the enclosing
function.The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)//
@exists@
local idexpression struct tty_struct *x;
expression ra,rr;
statement S1,S2;
@@x = tty_port_tty_get(...)
... when != x = rr
when any
when != tty_kref_put(x,...)
when != if (...) { ... tty_kref_put(x,...) ...}
(
if() S1 else S2
|
if(...) { ... when != x = ra
when forall
when != tty_kref_put(x,...)
*return...;
}
)
//Signed-off-by: Julia Lawall
Signed-off-by: Greg Kroah-Hartman
26 Apr, 2011
1 commit
-
moxa_write can be called from atomic context with irqs disabled (from
ppp_async_push). Don't enable interrupts by spin_unlock_bh as this
might cause deadlocks in the ppp layer.Instead, use irqsave/irqrestore spin_lock functions.
Signed-off-by: Jiri Slaby
Cc: Alan Cox
Signed-off-by: Greg Kroah-Hartman
20 Apr, 2011
2 commits
-
The bit is set in tty_port_block_til_ready (via moxa_open) and unset
in tty_port_close (via moxa_close). No need to pin it in the driver.Signed-off-by: Jiri Slaby
Cc: Alan Cox
Signed-off-by: Greg Kroah-Hartman -
drivers/tty/moxa.c:1287:2: warning: Value stored to 'port' is never read
port = tty->index;
^ ~~~~~~~~~~
drivers/tty/moxa.c:1763:2: warning: Value stored to 'cflag' is never read
cflag = termio->c_cflag; /* termio->c_cflag */
^ ~~~~~~~~~~~~~~~Signed-off-by: Jiri Slaby
Signed-off-by: Greg Kroah-Hartman
23 Feb, 2011
1 commit
-
As planned by Arnd Bergmann, this moves the following drivers from
drivers/char/ to drivers/tty/ as that's where they really belong:
amiserial
nozomi
synclink
rocket
cyclades
moxa
mxser
isicom
bfin_jtag_commCc: Arnd Bergmann
Cc: Alan Cox
Cc: Jiri Slaby
Signed-off-by: Greg Kroah-Hartman