Commit Graph

27 Commits

Author SHA1 Message Date
Benjamin Romer 17f5e49167 staging: unisys: fix camelcase function uisqueue_InterlockedOr()
Clean up CamelCase names:
uisqueue_InterlockedOr => uisqueue_interlocked_or
Target => tgt
Set => set

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-02 09:42:30 -07:00
Catalina Mocanu d870f87dec staging: unisys: virthba: remove unnecessary return statement
This fixes the following checkpatch.pl warning:
WARNING: void function return statements are not generally useful

Signed-off-by: Catalina Mocanu <catalina.mocanu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:33:34 -07:00
Honggang Li 912f102890 staging: unisys/virthba/virthba.c print u64 with %llu
drivers/staging/unisys/virthba/virthba.c:520:2: warning: format ‘%u’
expects argument of type ‘unsigned int’, but argument 4 has type ‘u64’
[-Wformat=]
drivers/staging/unisys/virthba/virthba.c:749:2: warning: format ‘%d’
expects argument of type ‘int’, but argument 5 has type ‘u64’
[-Wformat=]
drivers/staging/unisys/virthba/virthba.c:1142:4: warning: format ‘%d’
expects argument of type ‘int’, but argument 7 has type ‘u64’
[-Wformat=]
drivers/staging/unisys/virthba/virthba.c:1151:5: warning: format ‘%d’
expects argument of type ‘int’, but argument 5 has type ‘u64’
[-Wformat=]

After apply the patch:
linux-next]$ make C=1 drivers/staging/unisys/virthba/virthba.o
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CALL    scripts/checksyscalls.sh
  CHECK   drivers/staging/unisys/virthba/virthba.c
  CC [M]  drivers/staging/unisys/virthba/virthba.o

Signed-off-by: Honggang Li <enjoymindful@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-26 12:17:31 -07:00
Benjamin Romer 5fc0229ae5 staging: unisys: remove U64 type
This patch switches all use of the U64 typedef to use the kernel's u64 type
instead.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-01 14:38:44 -07:00
Benjamin Romer b3c55b13a1 staging: unisys: remove U32 type
This patch switches all use of the U32 typedef to use the kernel's u32 type
instead.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-01 14:38:44 -07:00
Benjamin Romer c242233e5b staging: unisys: remove U8 type
This patch switches all use of the U8 typedef to use the kernel's u8 type
instead.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:11:10 -07:00
Erik Arfvidson cfe4571f72 staging: unisys: fix and remove virthba comments
This patch fixes formatting and cleans up unneeded comments

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>
2014-07-22 16:18:56 -07:00
Erik Arfvidson 79014eb1f2 staging: unisys: added virthba enable_ints entry
This patch adds enable_ints entry to virthba directory

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>
2014-07-21 14:27:34 -07:00
Erik Arfvidson 5d1501913b staging: unisys: added virthba rqwait entry
This patch adds the rqwait entry into the virthba debugfs directory

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>
2014-07-21 14:27:34 -07:00
Erik Arfvidson d9c5607e51 staging: unisys: added virthba debugfs dir and info entry
This patch adds virthba debugfs directory and info entry

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>
2014-07-21 14:25:17 -07:00
Erik Arfvidson 29a2600ce4 staging: unisys: remove virthba proc files
This patch removes all proc entries, directories, and functions

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>
2014-07-21 14:23:08 -07:00
Ken Cox 836bee9eee Staging: unisys: remove references to __DATE__ and __TIME__
The use of __DATE__ and __TIME__ is no longer allowed in the kernel so this
commit removes those.  They were once useful when the drivers were being
built externally, but now that the drivers are in the kernel the use of the
macros is redundant since the kernel already has the same information
elsewhere.

In addition, using these macros breaks the build if using gcc 4.9.0

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ken Cox <jkc@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:15:27 -04:00
Paul Bolle 5573e4f615 staging: unisys: remove unused macros
The macros CONFIG_SPAR_GUEST, GUESTDRIVERBUILD, and NOAUTOVERSION are
defined in Makefiles for the Unisys SPAR driver. They are never used.
Remove the lines that define these macros.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:13:40 -04:00
Ken Cox 385914c39d Staging: unisys: virthba: declare virthba_queue_command as static
virthba_queue_command() is only used inside virthba.c so declare it static.

Signed-off-by: Ken Cox <jkc@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23 20:21:10 +09:00
Ken Cox fcd0157ece Staging: unisys: detect s-Par firmware
This patch adds support for detection of s-Par firmware by checking for
the hypervisor bit in the CPU capabilities, and then querying the hypervisor
ID cpuid leaf.

This functionality will be used by the unisys drivers to determine if
they are being loaded on an s-Par platform and refuse to load if no
s-Par firmware is present.

This fixes a problem reported from upstream where a panic occurs if the
unisys drivers are loaded on a non s-Par system.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Ken Cox <jkc@redhat.com>
Tested by: Ken Cox <jkc@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18 09:44:17 -07:00
Ken Cox 87995171ac Staging: unisys: virthba: add MODULE_DEVICE_TABLE
Add x86_cpu_id struct and call to MODULE_DEVICE_TABLE so this module
will be auto loaded on boot.

Signed-off-by: Ken Cox <jkc@redhat.com>
Tested-by: Ken Cox <jkc@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-25 15:32:17 -07:00
Benjamin Romer f6d0c1e62b staging: unisys: fix copyright notices
This patch changes all of the various representations of the copyright symbol
to (C).

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-25 15:25:40 -07:00
Masanari Iida fb90c6095f staging: unisys: Fix typo in comment and printk
Fix spelling typo in comments and printk within unisys.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-25 15:25:40 -07:00
Masanari Iida 5494f95bad staging: unisys: Fix format string mismatch in virthba.c
Fix format string mismatch in info_proc_read() within virthba.c.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-25 15:25:39 -07:00
Silvio F a3acc83a4a staging: unisys: kmalloc/memset to kzalloc conversation
This patch solves the Coccinelle warning: "kzalloc should be used
instead of kmalloc/memset"

This patch is a fixup for

	linux-next: 97a84f1203
	"Staging: unisys: Replace kmalloc/memset with kzalloc"

The ALLOC_CMDRSP #define is after transformation to kzalloc only a
rename for kzalloc and was completly removed.

Signed-off-by: Silvio F <silvio.fricke@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18 16:22:27 -07:00
Ken Cox a8d7f21d14 Staging: unisys: Clean multiple sparse warnings
Cleaned up multiple sparse warnings, mostly due to improper access of I/O
space.  Also declared functions and variables that were only used locally
as static.

Removed ULTRA_disp_channel_header(), ULTRA_disp_channel(),
ULTRA_disp_vnic_channel() because they were never called.

Signed-off-by: Ken Cox <jkc@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:45:44 -07:00
Andreea-Cristina Bernat 97a84f1203 Staging: unisys: Replace kmalloc/memset with kzalloc
This patch solves the Coccinelle warning: "kzalloc should be used instead of
kmalloc/memset".

Signed-off-by: Andreea-Cristina Bernat <bernat.ada@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 18:20:10 -07:00
Ken Cox 61a0bc0f1f Staging: unisys: Fix multiple variable length array declarations
There were multiple variable length arrays declared on the stack in proc
handlers:
	char buf[count];

I changed these to be fixed length arrays.

Signed-off-by: Ken Cox <jkc@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-08 22:42:15 -08:00
Ken Cox bed3b10d20 Staging: unisys: virthba: Fix variable length array
A character array was declared on the stack with variable length.  This has
been corrected to use a fixed length.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ken Cox <jkc@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-08 22:42:14 -08:00
Ken Cox 7091be3703 Staging: unisys: virthba: Add dependency on SCSI
If CONFIG_SCSI is not enabled, compiling virthba.c goes horribly wrong with
undefined symbols.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Ken Cox <jkc@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-06 12:01:49 -08:00
Ken Cox 927c7927ee staging: unisys: Give exported symbols unique names
Many exported symbols had very generic names.  This commit changes the names
so that they will be unique.

Signed-off-by: Ken Cox <jkc@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-06 12:01:49 -08:00
Ken Cox dc95086172 staging: virthba driver to access shared SCSI hba
The virthba module provides access to a shared SCSI host bus adapter
and one or more disk devices, by proxying SCSI commands between the
guest and the service partition that owns the shared SCSI adapter,
using a channel between the guest and the service partition. The disks
that appear on the shared bus are defined by the s-Par configuration
and enforced by the service partition, while the guest driver handles
sending commands and handling responses. Each disk is shared as a
whole to a guest. Sharing the bus adapter in this way provides
resiliency; should the device encounter an error, only the service
partition is rebooted, and the device is reinitialized. This allows
guests to continue running and to recover from the error.

Signed-off-by: Ken Cox <jkc@redhat.com>
Cc: Ben Romer <sparmaintainer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-04 17:03:22 -08:00