Commit graph

43 commits

Author SHA1 Message Date
Ken Depro ca68b110a2 staging: unisys: Remove extra blank lines from virthba files
This patch removes extra blank lines from the virthba header and source
files.  This is the first of a set of patches that will clean up the
virthba source file.  The only checkpatch issue in the header file was
the blank line warnings.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Ben Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-05 11:52:17 -08:00
Benjamin Romer 55f714cd48 staging: unisys: fix CamelCase members of virtpci_dev
Fix CamelCase names in this structure:

busNo => bus_no
deviceNo => device_no

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 17:42:07 +08:00
Benjamin Romer be3c366905 staging: unisys: fix CamelCase in uiscmdrsp_disknotify
Fix the CamelCase member of this structure:

vHba => v_hba

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27 10:33:14 +08:00
Benjamin Romer 3f549af379 staging: unisys: fix CamelCase names in struct sense_data
Fix CamelCase names:

ErrorCode => error_code
Valid => valid
SegmentNumber => segment_number
SenseKey => sense_key
Reserved => reserved
IncorrectLength => incorrect_length
EndOfMedia => end_of_media
FileMark => file_mark
Information => information
AdditionalSenseLength => additional_sense_length
CommandSpecificInformation => commmand_specific_information
AdditionalSenseCode => additional_sense_code
AdditionalSenseCodeQualifier => additional_sense_code_qualifier
FieldReplaceableUnitCode => fru_code
SenseKeySpecific => sense_key_specific

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27 10:33:14 +08:00
Benjamin Romer c8cf5d075e staging: unisys: refactor enum VDISK_MGMT_TYPES
Get rid of the typedef and use enum vdisk_mgmt_types instead. Reformat the
enumeration names and update any references to use the enum directly.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27 10:33:14 +08:00
Benjamin Romer 63f06ba1ee staging: unisys: refactor TASK_MGMT_TYPES
Get rid of the typedef and use enum task_mgmt_types in its place. Clean up
the indentation of the enumeration values and update all use of the name to
the new name.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27 10:33:14 +08:00
Benjamin Romer af3286bdb4 staging: unisys: fix CamelCase names in struct irq_info
Fix CamelCase names in structure, and references to them:

sendInterruptHandle => send_irq_handle
recvInterruptHandle => recv_irq_handle
recvInterruptVector => recv_irq_vector
recvInterruptShared => recv_irq_shared

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27 10:33:10 +08:00
Benjamin Romer a17f5b4af7 staging: unisys: refactor visor_signalqueue_empty()
Rename visor_signalqueue_empty() to spar_signalqueue_empty(), and fix
CamelCase parameter names:

pChannel => ch
Queue => queue

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27 10:33:09 +08:00
Benjamin Romer 153cf71072 staging: unisys: fix CamelCase in struct signal_queue_header
Fix CamelCase names:
VersionId => version
Type => chtype
Size => size
oSignalBase => sig_base_offset
FeatureFlags => features
NumSignalsSent => num_sent
NumOverflows => num_overflows
SignalSize => signal_size
MaxSignalSlots => max_slots
MaxSignals => max_signals
Head => head
NumSignalsReceived => num_received
Tail => tail
Reserved1 => reserved1
Reserved2 => reserved2
ClientQueue => client_queue
NumInterruptsReceived => num_irq_received
NumEmptyCnt => num_empty
ErrorFlags => errorflags
Filler => filler

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27 10:33:09 +08:00
Benjamin Romer e0fed862c8 staging: unisys: remove typedef SIGNAL_QUEUE_HEADER
Get rid of the typedef for SIGNAL_QUEUE_HEADER and use struct
signal_queue_header directly instead. Fix all references to the typedef
to use the struct.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27 10:33:09 +08:00
Benjamin Romer 0859891848 staging: unisys: refactor ULTRA_channel_client_release_os()
Remove the unnecessary macro ULTRA_CHANNEL_CLIENT_RELEASE_OS(), rename
the function to spar_channel_client_release_os(), fix references to the
macro to call the function directly instead, remove the unnecessary
logCtx, file, and line parameters, and fix CamelCase names:

pChannel => ch
chanId => id
pChan => hdr

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27 10:33:09 +08:00
Benjamin Romer 9f16930e55 staging: unisys: refactor ULTRA_channel_client_acquire_os()
Remove the unnecessary macro ULTRA_CHANNEL_CLIENT_ACQUIRE_OS for calling
the function, and rename the function to
spar_channel_client_acquire_os(). Get rid of unneeded parameters logCtx,
file, and line, and Fix CamelCase names:

pChannel => ch
chanId => id
pChan => hdr

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27 10:33:09 +08:00
Benjamin Romer ff97a3fdf5 staging: unisys: fix up ULTRA_CHANNEL_CLIENT_TRANSITION macro
Rename the macro to SPAR_CHANNEL_CLIENT_TRANSITION, and fix CamelCase
parameters:

pChan => ch
chanId => id
logCtx => log

Update all places the macro was used to call the new name.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27 10:33:09 +08:00
Benjamin Romer a8a31f6177 staging: unisys: fix CamelCase names in struct channel_header
Fix CamelCase names:
Signature => signature
LegacySignature => legacy_signature
HeaderSize => header_size
Size => size
Features => features
Type => chtype
PartitionHandle => partition_handle
Handle => handle
oChannelSpace => ch_space_offset
VersionId => version_id
PartitionIndex => partition_index
ZoneGuid => zone_uuid
oClientString => cli_str_offset
CliStateBoot => cli_state_boot
CmdStateCli => cmd_state_cli
CliStateOs => cli_state_os
ChannelCharacteristics => ch_characteristic
CmdStateSrv => cmd_state_srv
srvState => srv_state
CliErrorBoot => cli_error_boot
CliErrorOs => cli_error_os
Filler => filler
RecoverChannel => recover_channel

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27 10:33:08 +08:00
Benjamin Romer 9fd1b95aab staging: unisys: remove typedef for CHANNEL_HEADER
Switch everywhere that CHANNEL_HEADER, pCHANNEL_HEADER, or
ULTRA_CHANNEL_PROTOCOL was used, to struct channel_header.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27 10:33:08 +08:00
Benjamin Romer 4eddbf1390 staging: unisys: fix CamelCase name for struct InterruptInfo
Fix CamelCase names:
InterruptInfo => irq_info

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:05 +08:00
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