Commit Graph

17 Commits

Author SHA1 Message Date
Kees Cook 4790b6dc7a tty: vcc: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: sparclinux@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-04 12:01:54 +01:00
Allen Pais a386ab2b28 drivers: tty: vcc: use setup_timer() helper.
Use setup_timer function instead of initializing timer with the
    function and data fields.

Signed-off-by: Allen Pais <allen.lkml@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-03 20:28:36 +02:00
Bhumika Goyal 5bd0ea9107 sparc64: vcc: make ktermios const
Make this const as it is not modified anywhere.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-29 15:10:44 -07:00
Dan Carpenter c6b4ee9eba sparc64: vcc: Check for IS_ERR() instead of NULL
The tty_alloc_driver() function never returns NULL, it returns error
pointers on error.

Fixes: ce808b7463 ("sparc64: vcc: TTY driver initialization and cleanup")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-28 15:39:55 -07:00
Jag Raman 8f03f948ba sparc64: vcc: Add install & cleanup TTY operations
Add handlers to support TTY install & cleanup operations

Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-15 21:33:54 -07:00
Jag Raman e942e5775c sparc64: vcc: Add break_ctl TTY operation
Add handler to support TTY break_ctl operation

Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-15 21:33:54 -07:00
Jag Raman aeee7debf3 sparc64: vcc: Add chars_in_buffer TTY operation
Add handler to support TTY chars_in_buffer operation

Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-15 21:33:54 -07:00
Jag Raman cf0452600b sparc64: vcc: Add write & write_room TTY operations
Add handlers to support TTY write & write_room operations

Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-15 21:33:53 -07:00
Jag Raman 6a3ff25bc6 sparc64: vcc: Add hangup TTY operation
Add handler to support TTY hangup operation

Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-15 21:33:53 -07:00
Jag Raman 63a7174484 sparc64: vcc: Add open & close TTY operations
Add handlers to support TTY open & close operations

Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-15 21:33:53 -07:00
Jag Raman 103b9b0bc9 sparc64: vcc: Enable LDC event processing engine
Enable event processing engine to handle LDC events

Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-15 21:33:52 -07:00
Jag Raman f8c553354e sparc64: vcc: Add RX & TX timer for delayed LDC operation
Add RX & TX timers to perform delayed/asynchronous LDC
read and write operations.

Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-15 21:33:52 -07:00
Jag Raman 8868e44a56 sparc64: vcc: Create sysfs attribute group
Create sysfs attribute group to show the domain name and
send break command.

Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-15 21:33:52 -07:00
Jag Raman 5d171050e2 sparc64: vcc: Enable VCC port probe and removal
Enables VCC port probe and removal to initialize and terminate
VCC ports respectively. When a device/port matching the VCC driver
is added, the probe function is invoked along with a reference
to the device. remove function is called when the device is
removed.

Also add APIs to cache and retrieve VCC ports from a VCC table

Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-15 21:33:51 -07:00
Jag Raman ce808b7463 sparc64: vcc: TTY driver initialization and cleanup
Allocate and register TTY driver during module init. Cleanup
TTY driver during module exit.

Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-15 21:33:51 -07:00
Jag Raman f283ebd564 sparc64: vcc: Add VCC debug message macros
Add C macros to print debug messages from VCC module

Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-15 21:33:51 -07:00
Jag Raman 55bd2133fc sparc64: vcc: Enable VCC module in linux
Enables the Virtual Console Concentrator (VCC) module
in linux kernel

Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-15 21:33:50 -07:00