Commit graph

309 commits

Author SHA1 Message Date
Bryan Thompson af8bc2fb99 staging: unisys: visorbus: Remove two passthrough postcode macros
Remove two passthrough macros that are only called from a single
location and make the resultant vmcall directly.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-12-01 09:58:48 +01:00
Bryan Thompson c6bc82f144 staging: unisys: visorbus: Remove POSTCODE_SEVERITY levels
Use the already defined DIAG_SEVERITY values directly instead of special
postcode macro names.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-12-01 09:58:48 +01:00
Bryan Thompson a96b44f058 staging: unisys: visorbus: Fix spelling error (FAIULRE to FAILURE)
There were two instances of FAILURE being misspelled in the s-Par
firmware postcode event enum that are fixed.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-12-01 09:58:48 +01:00
Bryan Thompson df4c13921e staging: unisys: visorbus: Remove unused values from guestlinuxdebug
Remove guestlinuxdebug enum values that are no longer being used and
renumber remaining values accordingly.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-12-01 09:58:48 +01:00
Bryan Thompson 3d118a421b staging: unisys: visorbus: Update visorchipset postcode values
The visorchipset.c functionality was moved into the visorbus driver
previously. This patch updates the s-Par firmware postcode values to
reflect this status.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-12-01 09:58:48 +01:00
Bryan Thompson f30c2c355c staging: unisys: visorbus: Remove POSTCODE_LINUX_4 macro
Call POSTCODE_LINUX directly instead of passing through POSTCODE_LINUX_4.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-12-01 09:58:48 +01:00
Bryan Thompson 6daa8205e1 staging: unisys: visorbus: Remove POSTCODE_LINUX_3 macro
Call POSTCODE_LINUX directly instead of passing through POSTCODE_LINUX_3.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-12-01 09:58:48 +01:00
Bryan Thompson 3840b772f5 staging: unisys: visorbus: Remove POSTCODE_LINUX_2 macro
Call POSTCODE_LINUX directly instead of passing through POSTCODE_LINUX_2.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-12-01 09:58:48 +01:00
Bryan Thompson c0e87ae270 staging: unisys: visorbus: Use CURRENT_FILE_PC in base postcode macro
Use CURRENT_FILE_PC directly in the POSTCODE_LINUX macro instead of
relying on passthrough macros to provide it.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-12-01 09:58:48 +01:00
Bryan Thompson c7e047768b staging: unisys: visorbus: Replace two base postcode macros with one
Leverage the 3 existing s-Par postcode macros to do a bit more work
and provide only 1 base postcode macro.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-12-01 09:58:48 +01:00
Erik Arfvidson 22744c96c7 staging: unisys: visorbus: vbuschannel.h remove unused pound defines
This patch removes all the unused pound defines currently in
vbuschannel.h.

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-12-01 09:58:48 +01:00
Erik Arfvidson a96f58c1dc staging: unisys: visorbus: vmcallinterface.h remove unused pound defines
This patch removes all the unused pound defines currently in
vmcallinterface.h.

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-12-01 09:58:48 +01:00
David Kershner c71529fef3 staging: unisys: visorbus: bus_configure add error handling
Add proper error handling to bus_configure and have it propagate errors
back up the stack. This helped to streamline the function as well.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-23 10:01:57 +01:00
David Kershner 5d295bc3e7 staging: unisys: visorbus: return EAGAIN when empty
It really isn't an error when you call visorchannel_signalremove and
there isn't anything in the queue. Just means that the IOSP didn't
process anything since the last time you checked. Just inform the
caller that it is empty by returning -EAGAIN.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-23 10:01:57 +01:00
David Kershner 29b2780974 staging: unisys: visorbus: device_responder add error handling
The function controlvm_respond returns proper error handling, so now we
can propagate the error up and handle it appropriately.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-23 10:01:57 +01:00
David Kershner 68f99d4911 staging: unisys: visorbus: device_changestate_responder add error handling
Pass the error returned from visorchannel_signalinsert up the stack
instead of just ignoring it.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-23 10:01:57 +01:00
David Kershner 734ad93a23 staging: unisys: visorbus: bus_responder add error handling
Controlvm_respond now returns an error. Add error handling to the
bus_responder function.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-23 10:01:57 +01:00
David Kershner 8dff01f7d0 staging: unisys: visorbus: save_crash_message add error handling
Add proper error handling to the function save_crash_message.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-23 10:01:57 +01:00
David Kershner 2c4ef563f4 staging: unisys: visorbus: controlvm_respond_physdev_changestate add error handling
Propagate the error up the stack instead of ignoring it.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-23 10:01:57 +01:00
David Kershner 2d26aeb773 staging: unisys: visorbus: controlvm_respond add error handling
The function visorchanel_signalinsert now returns an error, propagate
the error up the stack to be handled.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-23 10:01:57 +01:00
David Kershner 79c3f971d9 staging: unisys: visorbus: chipset_init add error handling
Controlvm_respond_chipset_init now errors out correctly. Pass the errors
back up to the stack to be processed.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-23 10:01:56 +01:00
David Kershner 1d7f552203 staging: unisys: visorbus: controlvm_respond_chipset_init add error handling
Now that visorchannel_signalinsert returns a Linux error code, we need
to convert controlvm_respond_chipset_init to return an error instead of
a void.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-23 10:01:56 +01:00
Erik Arfvidson 9ed146cdb9 staging: unisys: visorbus: visorbus_private rename 'local' var to 'dest'
This patch renames the poorly named 'local' var to 'dest' in
the visorbus_private.h file

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-23 10:01:56 +01:00
Erik Arfvidson 8c3c1e47fa staging: unisys: visorbus: visorchannel.c rename 'local' variable to 'dest'
This patch renames poorly named 'local' variable to 'dest'.

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-23 10:01:56 +01:00
David Binder 0762188b8f staging: unisys: visorbus: Adjust formatting of variable assignment
Adjusts the formatting of a variable assignment to use fewer line breaks,
making it follow the convention used elsewhere in the s-Par driver set.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-07 10:56:39 +01:00
David Kershner 9e9eec6b81 staging: unisys: visorbus: in my_device_destroy don't call device_epilog
The function my_device_destroy should call chipset_device_destroy
directly instead of calling device_epilog. Since this was the last
function to use device_epilog that function was removed as well.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-07 10:56:39 +01:00
David Kershner 8e609b5b6f staging: unisys: visorbus: my_device_changestate: no longer call device_epilog
Function my_device_changestate should call chipset_device_changestate
directly instead of calling device_epilog.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-07 10:56:39 +01:00
David Kershner 0825f191ec staging: unisys: visorbus: my_device_changestate: add error response
The function my_device_changestate was not sending a response if there
was an error with the CONTROLVM message.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-07 10:56:39 +01:00
David Kershner 5a80e98aaf staging: unisys: visorbus: my_device_create does not call device_epilog
Don't have my_device_create call device_epilog, have it call
chipset_device_create directly instead.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-07 10:56:39 +01:00
David Kershner b6b057d860 staging: unisys: visorbus: remove bus_epilog
Remove the function bus_epilog since no one is calling it.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-07 10:56:39 +01:00
David Kershner 33161a29c8 staging: unisys: visorbus: bus_create fix error handling
Add error handling to bus_create function.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-07 10:56:39 +01:00
David Kershner 30f6c3f5ff staging: unisys: visorbus: bus_destroy add error handling
Do proper error handling and return error codes instead of just ignoring
them.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-07 10:56:39 +01:00
David Kershner 3e0e8db92f staging: unisys: visorbus: bus_destroy do not call bus_epilog
Have bus_destroy call chipset_bus_destroy directly instead of going
through bus_epilog.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-07 10:56:39 +01:00
David Kershner 8f334e30c3 staging: unisys: visorbus: bus_create no longer calls bus_epilog
Have bus_create call chipset_bus_create directly instead of going
through the function bus_epilog.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-07 10:56:39 +01:00
David Kershner ca1cbf9070 staging: unisys: visorbus: fix double response
This patch addresses the problem that we were sending double responses
back to the s-Par Firmware when processing CONTROLVM Messages. Every
message responds individually and the epilog functions would send a
response as well.

Since a message could delay the response, it was decided to remove the
extra response from the epilog function.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-07 10:56:39 +01:00
Sameer Wadgaonkar c4fe36cd26 staging: unisys: visorbus: remove unused initializations
Removed intializations from visorchipset_open(), visorchipset_init()
and moved the memset in initialize_controlvm_payload_info() down in
case of early returns from the function.

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-07 10:56:39 +01:00
Tim Sell 8217becc1b staging: unisys: visorbus: convert client_bus_info sysfs to debugfs
Previously, the sysfs entry (assuming traditional sysfs mountpoint):

    /sys/bus/visorbus/devices/visorbus<n>/client_bus_info

violated kernel conventions by printing more than one item.  This along
with the fact that the data emitted was diagnostic data (intended to
shadow the client driver info provided via s-Par livedumps) made it a
logical candidate for debugfs.  So this patch moves this sysfs entry to
debugfs as (assuming traditional debugfs mountpoint):

    /sys/kernel/debug/visorbus/visorbus<n>/client_bus_info

Data for this debugfs is emitted using the preferred seq_file interface,
which allowed a vastly-simplified version of vbuschannel_print_devinfo()
to format the individual output components.

Functionality was verified as follows:

  [root@sparguest visorbus]# mount | grep debug
  debugfs on /sys/kernel/debug type debugfs (rw)
  [root@sparguest visorbus]# pwd
  /sys/kernel/debug/visorbus
  [root@sparguest visorbus]# l visorbus1/
  total 0
  drwxr-xr-x 2 root root 0 Sep 28 16:36 .
  drwxr-xr-x 4 root root 0 Sep 28 16:36 ..
  -r--r----- 1 root root 0 Sep 28 16:36 client_bus_info
  [root@sparguest visorbus]# l visorbus2
  total 0
  drwxr-xr-x 2 root root 0 Sep 28 16:36 .
  drwxr-xr-x 4 root root 0 Sep 28 16:36 ..
  -r--r----- 1 root root 0 Sep 28 16:36 client_bus_info
  [root@sparguest visorbus]# cat visorbus1/client_bus_info
  Client device / client driver info for s-Par Console partition (vbus #1):
     chipset          visorchipset     kernel ver. 4.8.0-rc6-ARCH+
     clientbus        visorbus         kernel ver. 4.8.0-rc6-ARCH+
  [2]keyboard         visorinput       kernel ver. 4.8.0-rc6-ARCH+
  [3]mouse            visorinput       kernel ver. 4.8.0-rc6-ARCH+
  [root@sparguest visorbus]# cat visorbus2/client_bus_info
  Client device / client driver info for s-Par IOVM partition (vbus #2):
     chipset          visorchipset     kernel ver. 4.8.0-rc6-ARCH+
     clientbus        visorbus         kernel ver. 4.8.0-rc6-ARCH+
  [0]ultravnic        visornic         kernel ver. 4.8.0-rc6-ARCH+
  [1]ultravnic        visornic         kernel ver. 4.8.0-rc6-ARCH+
  [2]sparvhba         visorhba         kernel ver. 4.8.0-rc6-ARCH+

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-07 10:56:38 +01:00
Tim Sell a25280b317 staging: unisys: visorbus: move DEVICE_ATTR_RO defs as-per conventions
The kernel convention is for DEVICE_ATTR_RO(<attr>) definitions to occur
immediately after the functions that implement the attribute behaviors.
DEVICE_ATTR_RO definitions in visorbus_main.c have been moved to comply
with this convention.

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-07 10:56:38 +01:00
Cathal Mullaney f0208b7155 staging: unisys: visorbus: visorchannel: Refactor locking code to be statically deterministic.
This patch makes locking in visorchannel_signalempty statically
deterministic.
As a result this patch fixes the sparse warning:
Context imbalance in 'visorchannel_signalempty' - different lock
contexts for basic block.

The logic of the locking code doesn't change but the layout of the
original code is "frowned upon"
according to mails on sparse context checking.
Refactoring removes the warning and makes the code more readable.

Signed-off-by: Cathal Mullaney <chuckleberryfinn@gmail.com>
Tested-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-25 10:53:27 +02:00
Mihaela Muraru a2d1e42855 Staging: unisys: visorbus: Make a read-only structure
This patch add const qualifier at the declaration of the structure.
The structure become a read-only data, this increase the security.

Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-17 10:27:55 +02:00
Laurent Navet ae719092fe staging: unisys: visorbus: add missing include
this removes lots of sparse warnings :
warning: symbol 'visorchannel_destroy' was not declared. Should it be static?
warning: symbol 'visorchannel_get_physaddr' was not declared. Should it be static?
warning: symbol 'visorchannel_get_nbytes' was not declared. Should it be static?
warning: symbol 'visorchannel_uuid_id' was not declared. Should it be static?
warning: symbol 'visorchannel_id' was not declared. Should it be static?
warning: symbol 'visorchannel_zoneid' was not declared. Should it be static?
warning: symbol 'visorchannel_get_clientpartition' was not declared. Should it be static?
warning: symbol 'visorchannel_set_clientpartition' was not declared. Should it be static?
warning: symbol 'visorchannel_read' was not declared. Should it be static?
warning: symbol 'visorchannel_write' was not declared. Should it be static?
warning: symbol 'visorchannel_get_header' was not declared. Should it be static?
warning: symbol 'visorchannel_create' was not declared. Should it be static?
warning: symbol 'visorchannel_create_with_lock' was not declared. Should it be static?

Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-17 09:54:15 +02:00
Tim Sell bfc2cc0217 staging: unisys: visorbus: fix typos with client_bus_info /sys entry
Example corrected output:

    $ pwd
    /sys/bus/visorbus/devices/visorbus1
    $ cat client_bus_info
    Client device / client driver info for s-Par Console partition
							 (vbus #1):
       chipset         visorchipset    kernel ver. 4.8.0-rc6-ARCH+
       clientbus       visorbus        kernel ver. 4.8.0-rc6-ARCH+
    [2]keyboard        visorinput      kernel ver. 4.8.0-rc6-ARCH+
    [3]mouse           visorinput      kernel ver. 4.8.0-rc6-ARCH+

    $ cat ../visorbus2/client_bus_info
    Client device / client driver info for s-Par IOVM partition
						         (vbus #2):
       chipset         visorchipset    kernel ver. 4.8.0-rc6-ARCH+
       clientbus       visorbus        kernel ver. 4.8.0-rc6-ARCH+
    [0]ultravnic       visornic        kernel ver. 4.8.0-rc6-ARCH+
    [1]ultravnic       visornic        kernel ver. 4.8.0-rc6-ARCH+
    [2]sparvhba        visorhba        kernel ver. 4.8.0-rc6-ARCH+

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-28 11:30:52 +02:00
Tim Sell 5990b39e26 staging: unisys: visorbus: fix vbus info generated for s-Par livedumps
Previously, the lines describing devices controlled by the visorinput,
visornic, and visorhba drivers (keyboard, mouse, ultravnic, sparvhba) would
be missing from the vbus channel header.  This is important info that is
collected as part of s-Par livedumps, and can be examined via
/sys/bus/visorbus/devices/visorbus<n>/client_bus_info, e.g.:

    $ pwd
    /sys/bus/visorbus/devices
    $ cat visorbus1/client_bus_info
    Client device / client driver info for s-Par Console eartition
                                                 (vbus #4294967295):
       chipset         visorchipset    kernel ver. 4.8.0-rc6-ARCH+
       clientbus       visorbus        kernel ver. 4.8.0-rc6-ARCH+
 -> [2]keyboard        visorinput      kernel ver. 4.8.0-rc6-ARCH+
 -> [3]mouse           visorinput      kernel ver. 4.8.0-rc6-ARCH+

    $ cat visorbus2/client_bus_info
    Client device / client driver info for s-Par IOVM eartition
                                                 (vbus #4294967295):
       chipset         visorchipset    kernel ver. 4.8.0-rc6-ARCH+
       clientbus       visorbus        kernel ver. 4.8.0-rc6-ARCH+
 -> [0]ultravnic       visornic        kernel ver. 4.8.0-rc6-ARCH+
 -> [1]ultravnic       visornic        kernel ver. 4.8.0-rc6-ARCH+
 -> [2]sparvhba        visorhba        kernel ver. 4.8.0-rc6-ARCH+

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-28 11:30:52 +02:00
Tim Sell f7a34ff7c0 staging: unisys: visorbus: fix sloppy unsigned/signed int conversions
Several implicit unsigned --> signed int conversions were corrected.
No runtime effects were observed here, nevertheless implicit conversions
between integral types can lead to unexpected behavior.

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-28 11:30:52 +02:00
David Binder 264f7b8ac3 staging: unisys: visorbus: Convert visorchannel_signalinsert() return val
Per Documentation/CodingStyle, function names that convey an action or an
imperative command should return an integer. This commit converts the
visorbus API function, visorchannel_signalinsert(), to returning integer
values. All uses of this function are updated accordingly.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-27 13:06:16 +02:00
David Binder f621a96850 staging: unisys: visorbus: Convert visorchannel_signalremove() return val
Per Documentation/CodingStyle, function names that convey an action or an
imperative command should return an integer. This commit converts the
visorbus API function, visorchannel_signalremove(), to returning integer
values. All uses of this function are updated accordingly.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-27 13:06:16 +02:00
David Binder 1306c429e2 staging: unisys: visorbus: Change support functions to integer return vals
Per Documentation/CodingStyle, function names that convey an action or an
imperative command should return an integer value. This commit changes
several functions and a macro, internal to visorchannel.c, to follow this
paradigm. These changes will be necessary later on to change other
functions in this file, which are part of the visorbus API, to return
integer values in lieu of a boolean.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-27 13:06:16 +02:00
Jon Frisch bff8c1a160 staging: unisys: make MODULE_DESCRIPTIONs consistent
This patch ensures that consistent verbiage is used in the
MODULE_DESCRIPTION text (reported by 'modinfo') for all of
the Unisys s-Par drivers.

Signed-off-by: Jon Frisch <jon.frisch@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-27 13:06:16 +02:00
Jon Frisch 20cba4a6bb staging: unisys: remove version.h
This patch removes version.h and the last version.h
include in visorchannel.c.

Signed-off-by: Jon Frisch <jon.frisch@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-27 13:06:16 +02:00
Jon Frisch beedcc51b4 staging: unisys: visorbus: remove driver version from visorchipset.c
This patch removes the driver version and the version.h include
from visorchipset.c

Signed-off-by: Jon Frisch <jon.frisch@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-27 13:06:16 +02:00