Prarit Bhargava [Tue, 5 May 2015 22:37:02 +0000 (18:37 -0400)]
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.
visorchannel's signal code should call visorchannel_write() directly.
This is more consistent and cleaner, and allows us to remove the last
memregion call.
Jes Sorensen [Tue, 5 May 2015 22:36:55 +0000 (18:36 -0400)]
staging: unisys: visorchannel_read(): Use memcpy_fromio() directly
Note, this changes the behavior of visorchannel_read(). The old code
would return the channel header, if the offset argument was 0, and the
caller tried to read beyond the size of the visorchannel. Note this
only worked for offset == 0, but not for
(offset > 0) && (offset < header_size), which was inconsistent.
The new implementation returns an error if someone tries to read
beyond the visorchannel size.
David Kershner [Tue, 5 May 2015 22:36:39 +0000 (18:36 -0400)]
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>
Jes Sorensen [Tue, 5 May 2015 22:36:32 +0000 (18:36 -0400)]
staging: unisys: memregion: Embed memregion in struct channel
This changes the API for visor_memregion_create() to require a
pre-allocated struct memregion. Embedding this in struct channel
avoids a layer of additional kmalloc()'s and error checks.
Prarit Bhargava [Tue, 5 May 2015 22:36:19 +0000 (18:36 -0400)]
staging: unisys: fix sig_read_data and sig_read_data functions
The sig_read_data() and sig_write_data() functions are involved in 2 steps
of calls. They really don't need to be and this makes for much simpler
code.
The error handling in this function was broken and while looking at that
I noticed that the whole function was in need of cleanup. This patch
fixes the error handling, specifically
if (!p) {
visorchannel_destroy(p);
channel = NULL;
}
and does a lot of cleanup. I also verified that the called functions
returned correct errors, and that led to a change in
visor_memregion_resize(), visorchannel_destroy() and
visor_memregion_destroy().
Prarit Bhargava [Tue, 5 May 2015 22:36:16 +0000 (18:36 -0400)]
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.
Prarit Bhargava [Tue, 5 May 2015 22:36:15 +0000 (18:36 -0400)]
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().
Prarit Bhargava [Tue, 5 May 2015 22:36:07 +0000 (18:36 -0400)]
staging: unisys: unify devmajorminor attributes into visorbus_main.c
The code in devmajorminor_attr.[ch] only creates sysfs files and is
called only in visorbus_main.c. This code should be unified into
visorbus_main.c. The only changes are a forward declaration issue with
register_devmajorminor_attributes() and making the functions static.
Prarit Bhargava [Tue, 5 May 2015 22:36:06 +0000 (18:36 -0400)]
staging: unisys: unify channel attributes into visorbus_main.c
The code in channel_attr.[ch] only creates sysfs files and is called
only in visorbus_main.c. This code should be unified into
visorbus_main.c. There are some functions that have been made static.
Prarit Bhargava [Tue, 5 May 2015 22:36:05 +0000 (18:36 -0400)]
staging: unisys: unify businst attributes into visorbus_main.c
The code in businst_attr.[ch] only creates sysfs files and is called
only in visorbus_main.c. This code should be unified into
visorbus_main.c. There are some functions that have been made static.
Don Zickus [Tue, 5 May 2015 22:36:04 +0000 (18:36 -0400)]
staging: unisys: Remove unused driver
The visorchannel feature is rolled into visorbus now and its headers
are public under visorbus.h. Remove the unused driver, the old
header file and all the ccflag includes in the Makefile.
Also remove VISORCHANNEL from all Kconfigs as it is not needed.
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>
Don Zickus [Tue, 5 May 2015 22:36:02 +0000 (18:36 -0400)]
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>
Don Zickus [Tue, 5 May 2015 22:36:01 +0000 (18:36 -0400)]
staging: unisys: Move visorchannel into visorbus
visorchannel seems to be a necessary component to visorbus and can never
function as a standalone module. Let's treat it like a visorbus feature
that is always enabled.
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>
Erik Arfvidson [Tue, 5 May 2015 22:36:00 +0000 (18:36 -0400)]
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>
struct timeval tv is used to get current time.
32-bit systems using 'struct timeval' will break in the year 2038, so
we have to replace that code with more appropriate types.
Paul Gortmaker [Fri, 1 May 2015 01:47:46 +0000 (21:47 -0400)]
drivers/staging: include <module.h> for modular android tegra_ion code
This file is built off of a tristate Kconfig option and also contains
modular function calls so it should explicitly include module.h to
avoid compile breakage during header shuffles done in the future.
Paul Gortmaker [Mon, 27 Apr 2015 05:25:40 +0000 (01:25 -0400)]
rtl8192u: delete another embedded instance of generic reason codes
We have global copies of all these reason codes. We don't need local
copies. Worse is that these seem totally unused; a grep for some of
the fields comes up empty, and it still compiles after its complete
removal.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Paul Gortmaker [Mon, 27 Apr 2015 05:25:39 +0000 (01:25 -0400)]
rtl8192u: don't duplicate ieee80211 constants for status/auth/reason
These are all defined as a part of the standard and should not be
duplicated on a per-driver basis. Use the global ones and delete the
local ones.
In switching to <linux/ieee80211.h> we have to delete a local copy of
an identical struct that we prepped earlier to have identical field
names, and we add explicit include <...> where needed in order to
preserve getting a successful compile.
This isn't the totality of duplicated data removed, but it is a start.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Paul Gortmaker [Mon, 27 Apr 2015 05:25:38 +0000 (01:25 -0400)]
rtl8192u: align local ieee80211_wmm_ac_param struct fields with global
The <linux/ieee80211.h> and this local file both have a struct of the
same name. They also have the same field sizes and generally the
same fields, as can be seen here:
Here we just align the local field names with the main system one. Then
we can add an include of the system one and delete the local copy in one
smooth step in a follow-on commit.
Not that the replacement:
for i in `find . -name '*.[ch]'` ; do sed -i 's/ac_aci_acm_aifsn/aci_aifsn/g' $i ; done
for i in `find . -name '*.[ch]'` ; do sed -i 's/ac_ecwmin_ecwmax/cw/g' $i ; done
for i in `find . -name '*.[ch]'` ; do sed -i 's/ac_txop_limit/txop_limit/g' $i ; done
implicitly shows that only one of the three fields is currently used.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Paul Gortmaker [Mon, 27 Apr 2015 05:25:37 +0000 (01:25 -0400)]
rtl8192u: promote auth_mode to a full 8 bits
Currently LEAP is defined to two locally but the identically named
global constant is 128 in <linux/ieee80211.h>. In order for us to
switch over to using the global value, we need to adjust the local
storage which is currently not enough to hold the larger value.
This is now consistent with the similar struct used in
drivers/net/wireless/ipw2x00/libipw.h and other drivers.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Paul Gortmaker [Mon, 27 Apr 2015 05:25:36 +0000 (01:25 -0400)]
rtl8192u: don't trample on <linux/ieee80211.h> struct namespace
In order to start reducing the duplicated code/constants/macros in this
driver, we need to include <linux/ieee80211.h> to provide the defacto
versions. However this driver has structs with the same name as the
ones in the main include, so namespace collision prevents us from doing
step #1.
Since the structs actually differ in their respective fields, we can't
simply delete the local ones without impacting the runtime; a conversion
to use the global ones can be considered at a later date if desired.
Rename the ones here with a vendor specific prefix so that we won't have
the namespace collision, and hence can continue on with the cleanup.
Automated conversion done with:
for i in `find . -name '*.[ch]'` ; do \
sed -i 's/struct ieee80211_hdr/struct rtl_80211_hdr/g' $i ; \
done
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Paul Gortmaker [Mon, 27 Apr 2015 05:25:35 +0000 (01:25 -0400)]
rtl8712: don't duplicate ieee80211 constants for status/reason
These are all defined as a part of the standard and should not be
duplicated on a per-driver basis. Use the global ones and delete the
local ones.
It seems that ieee80211 was already included everywhere it was needed,
since no explicit include <...> were needed to be added in order to
preserve getting a successful compile.
This isn't the totality of duplicated data removed, but it is a start.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Paul Gortmaker [Mon, 27 Apr 2015 05:25:34 +0000 (01:25 -0400)]
rtl8188eu: don't duplicate ieee80211 constants for status/reason
These are all defined as a part of the standard and should not be
duplicated on a per-driver basis. Use the global ones and delete the
local ones.
Note that a couple of them had slight wording differences, things like
INVALID vs. NOT_VALID or similar, so they are aligned with the global
naming conventions here, as dictated by compile testing.
This isn't the totality of duplicated data removed, but it is a start.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>