Commit graph

19 commits

Author SHA1 Message Date
Benjamin Romer 6f14cc18f8 staging: unisys: fix copyright statements
The copyright statements in the drivers need to be correct and
consistent; this patch fixes the year for all of them, and makes the
statement text cover just the GPL V2.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-16 10:12:45 -07:00
Don Zickus a298bc0b59 staging: unisys: Convert device creation to use visor_device
This patch removes the legacy dev_info struct and instead creates
and passes around a traditional struct device.

This allows us to remove a lot of the various look up code and
removes the doubt if the struct exists or not.

Half of the churn is just the conversion of visorchipset_device_info
to visor_device.  Various cleanups include re-arranging the failure
paths to make more sense.

Pay attention to the create_visor_device function.  This had a lot of
churn to simplify everything.

Lots of functions disappeared because they are not needed any more.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:36:43 -07:00
Don Zickus d32517e392 staging: unisys: Convert bus creation to use visor_device
This patch removes the legacy bus_info struct and instead creates
and passes around a traditional struct device.

This allows us to remove a lot of the various look up code and
removes the doubt if the struct exists or not.

Half of the churn is just the conversion of visorchipset_bus_info
to visor_device.  Various cleanups include re-arranging the failure
paths to make more sense.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:36:43 -07:00
Don Zickus ee983d902e staging: unisys: Remove server flags
The bus driver doesn't work in server mode, just remove the left over
pieces.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:36:43 -07:00
Don Zickus 52c4cbd3fd staging: unisys: Remove unused cruft
Removing stuff that isn't being used.  Another prepartion patch to
allow us to use visor_device everywhere without the baggage of
bus/dev_info.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:36:43 -07:00
Don Zickus 0274b5aec1 staging: unisys: Convert pending_msg_hdr to a pointer
In order for bus/dev_info structs to become public structs, one
element, pending_msg_hdr, needs to become opaque.  This is to keep
all the internals of the controlvm struct private to the bus layer.

So a simple conversion of embedding the pending_msg_hdr struct into
a pointer is done.  The rest of the patch is the fallout.

The rules are modified slightly.  Instead of relying on the 'id' to be
CONTROLVM_INVALID to indicate invalid, just use the pointer set to NULL.

In addition, because bus/dev_info can be NULL and we still need to send
a
response, pass pending_msg_hdr to all 'responders' instead of bus/

That change causes some fallout in the success case.  Instead of setting
state
bits and clearing info in the responders, do all that magic in the
responder
wrappers.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 14:22:49 +09:00
Don Zickus b32c4997c0 staging: unisys: Move channel creation up the stack
Instead of creating a channel struct to temporarily hold the channel
info and passing it through multiple functions until the device is
created, just create the channel from the start.

This allows us to remove the channel_info struct.

I noticed 'chan_info.addr_type' was not being used, so I just deleted it.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 14:22:49 +09:00
Don Zickus b4b598fdde staging: unisys: Convert device functions to pass dev_info pointer around
Most device functions pass bus_no and dev_no around and then do a lookup
inside each function to find the dev_info struct.  Instead just pass the
pointer.

This prepares us for a later conversion to using visor device.

No real technical changes.  Just function header changes and little
cleanups as a result.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 13:30:31 -07:00
Don Zickus 3032aeddd8 staging: unisys: Convert bus functions to pass bus_info pointer around
Most bus functions pass bus_no around and then do a lookup inside each
function to find the bus_info struct.  Instead just pass the pointer.

This prepares us for a later conversion to using visor_device.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 13:28:56 -07:00
Don Zickus 1fb3016eab staging: unisys: Prep for removing 'info' structs
The visorbus driver has three _info structs lying around
(device, bus, channel) that store subsets of info from the
bigger structs.

Having these structs around make resource handling very difficult
and more complicated than it needs to be.  Use the device
infrastructure and instead pass 'struct visor_device' all
over the place.

In order to do that 'struct visor_device' needs to get smarter.
This patch adds the pieces to prep for it.  The new elements
will be used in later patches.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 13:28:55 -07:00
Erik Arfvidson c0a14641b1 staging: unisys: remove timskmod.h and procobjecttree.h
This patch move the needed linux include files from timskmod.h
to the files that calls those include. Also procobjecttree.h is
removed since it is dead code.

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 15:27:32 +02:00
Erik Arfvidson d5b3f1dcce staging: unisys: move timskmod.h functionality
This patch removes all timksmod.h pound defines. It also removes
visorkmodutils.c since it no longer has any use by itself. Since
visorkmodutils.c is no longer needed the module_init for
visorchipset.c is modified to call visorutil_spar_detect directly
instead of the extern variable in timksmod.h.

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 15:27:31 +02:00
Prarit Bhargava 55c67dcaac staging: unisys: add acpi pnp driver
According to Unisys, another OS detects the PNP0A07 as the auto load
device.  We can also do this in the linux kernel by simply converting the
driver over to the ACPI driver model.

Notes: This changes the usage of __init and it had to be removed from some
functions to avoid a !__init function calling an __init function.
Additionally I also cleaned up the headers in visorchipset.c since I was
adding a header file.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 15:27:31 +02:00
David Kershner 4da3336c25 staging: unisys: remove server crust from visorchipset.
The visorchipset driver originally serviced both servers and
clients. This implementation is client only so remove some
more server side implementation.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 15:26:05 +02:00
Prarit Bhargava 2ee0deec49 staging: unisys: cleanup visorbus_private.h
visorbus_private.h contains code that is called from visorbus into the
visorchipset code.  Now that the visorchipset code has been brought into
the visorbus directory, many of the declarations are not necessary and
can be cleaned up.

TODO: PARSER_WHICH_STRING enum only has one member used
(PARSERSTRING_NAME).

TODO: crash_obj_type appears to be unnecessary in the overall scheme of
code.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 15:26:01 +02:00
Prarit Bhargava c79b28f733 staging: unisys: move visorchipset files to visorbus
Move visorchipset_main.c and visorchipset.h to visorbus/visorchipset.c and
visorbus/visorbus_private.h.  This leaves an empty visorchipset directory
which can also be destroyed.

As a result of this patch the visorchipset init code now calls the
visorbus_init() directly.  Similarily the visorchipset exit code now
cleans up by calling visorbus_exit().

No other functional changes were made.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 15:26:01 +02:00
Prarit Bhargava 4b78000ecf staging: unisys: remove visorbus_private.h
visorbus_private.h is only included from visorbus_main.c and has no
other purpose.  The code can be easily moved into visorbus_main.c.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 15:25:59 +02:00
Don Zickus f6439218bb staging: unisys: Dissolve visorchannel.h
This header is needed by other drivers and should be in a global namespace.
In addition, functionally it is part of visorbus, so roll the contents
into that header file.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 15:25:58 +02:00
Erik Arfvidson 3703987cd4 staging: unisys: add visorbus driver
This base driver provides bus functionality to visorhid, visorhba,
and visornic which will be later added to our driver base. Visorbus
supports sPar bus model and manages bus specific functionality. It
maintains the sysfs subtree /sys/devices/visorbus*/.It is
responsible for device creation and destruction of the devices on
its bus.

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 15:25:57 +02:00