summaryrefslogtreecommitdiffstats
path: root/drivers/staging/unisys
Commit message (Collapse)AuthorAgeFilesLines
* staging: unisys: visornic: change return statementsDavid Binder2016-06-071-9/+7
| | | | | | | | | | Changes return statements in visornic_rx() to use literals instead of a variable. Also changes function description to reflect the correct return type. 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>
* staging: unisys: iovmcall_gnuc.h change -1 return valuesErik Arfvidson2016-06-071-2/+2
| | | | | | | | | | | This patch changes the vague -1 return values to -EPERM. This operation is not supported is a good alternative to -1 because the return is basically telling the caller that the processor doesn't support vmcall operations. 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>
* staging: unisys: visorchipset change -1 return valueErik Arfvidson2016-06-071-1/+1
| | | | | | | | This patch changes the vague -1 return value to -EINVAL 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>
* staging: unisys: visorbus change -1 return valuesErik Arfvidson2016-06-071-6/+6
| | | | | | | | | | | This patch changes the vague -1 return values to -EFAULT since it would be the most appropriate, given that this error would only occur in an unexpected bad offset field. Resulting in a bad address. 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>
* staging: unisys: visorhba change -1 return valueErik Arfvidson2016-06-071-2/+2
| | | | | | | | This patch changes the vague -1 return value to -EBUSY 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>
* staging: unisys: visorinput change -1 return valueErik Arfvidson2016-06-071-1/+1
| | | | | | | | This patch changes the vague -1 return value to -EINVAL 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>
* staging: unisys: visorhba: "Prefer 'unsigned int'" checkpatch warningsTim Sell2016-06-071-3/+3
| | | | | | | | | | This patch fixes a few checkpatch warnings in visorhba: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' 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>
* staging: unisys: visornic: remove extraneous error checkDavid Binder2016-06-071-3/+1
| | | | | | | | | | Removes an extraneous error check in devdata_initialize(), and updates the function comment accordingly. Signed-off-by: David Binder <david.binder@unisys.com> Reviewed-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>
* staging: unisys: visornic: check for error instead of successDavid Binder2016-06-071-2/+4
| | | | | | | | | Changes the conditional logic to check for an error code instead of a success code. 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>
* staging: unisys: visorhba: return 0 literalDavid Binder2016-06-071-1/+1
| | | | | | | | Returns 0 instead of variable rc in visorhba_init(). 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>
* staging: unisys: visornic: cleanup error handlingDavid Binder2016-06-071-3/+3
| | | | | | | | Adjusts goto labels to prevent attempts to free unallocated resources. 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>
* staging: unisys: visornic: simplify visornic if statementsDavid Binder2016-06-071-19/+22
| | | | | | | | | | Changes the conditional logic by looking for the absence of work to do, instead of the opposite. Signed-off-by: David Binder <david.binder@unisys.com> Reviewed-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>
* staging: unisys: visorhba: visorhbas_open[] no longer used, so deletedTim Sell2016-06-071-11/+1
| | | | | | | | | | The prior patch which simplified the visorhba debugfs interface made it so visorhbas_open[] and VISORHBA_OPEN_MAX were no longer needed, so they have now been deleted. 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>
* staging: unisys: visorhba: simplify and enhance debugfs interfaceTim Sell2016-06-071-71/+65
| | | | | | | | | | | | | | | | | debugfs info for each visorhba device is now presented by a file named of the following form within the debugfs tree: visorhba/vbus<x>:dev<y>/info where <x> is the vbus number, and <y> is the relative device number. Also, the debugfs presentation function was converted to use the seq_file interface, so that it could access the device context without resorting to a global array. This also simplified the function. 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>
* staging: unisys: visorhba: remove unused (and broken) logicTim Sell2016-06-071-74/+4
| | | | | | | | | | The handling of CMD_NOTIFYGUEST_TYPE messages from the IO partition appears to be only partially implemented, but fortunately it is never used in our current environment. This patch deletes the unused code. 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>
* staging: unisys: visorhba: correct scsi task mgmt completion handlingTim Sell2016-06-071-27/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is necessary to enable ANY task mgmt command to complete successfully via visorhba. When issuing a task mgmt command (CMD_SCSITASKMGMT_TYPE) to the IO partition (back-end), forward_taskmgmt_command() includes pointers within the command area that will be used to wake up the issuing process and provide the result when the command completes: cmdrsp->scsitaskmgmt.notify_handle = (u64)&notifyevent; cmdrsp->scsitaskmgmt.notifyresult_handle = (u64)&notifyresult; 'notify_handle' is a pointer to a 'wait_queue_head_t' variable, and 'notifyresult' is a pointer to an int. Both of these are just local stack variables in the issuing process. The way it's supposed to happen is that when the IO partition completes the command, in our completion handling we get copies of those pointers back from the IO partition, where we stash the result of the command at '*notifyresult' (which should not be 0xffff, because that is the initial value that the caller is looking to see a change in), and wake up the wait queue at '*notify_handle'. There are several places we do that dance, but prior to this patch, we always do it WRONG, like: cmdrsp->scsitaskmgmt.notifyresult_handle = TASK_MGMT_FAILED; wake_up_all((wait_queue_head_t *)cmdrsp->scsitaskmgmt.notify_handle); The wake_up_all() part is correct (albeit with the help of the sloppy pointer casting, but that's irrelevant to the bug), but the assignment of 'notifyresult_handle' is WRONG, and SHOULD read: *(int *)(cmdrsp->scsitaskmgmt.notifyresult_handle) = TASK_MGMT_FAILED; Without this change, the caller is NEVER going to notice a change in his local value of 'notifyresult' when he does the: if (!wait_event_timeout(notifyevent, notifyresult != 0xffff, msecs_to_jiffies(45000))) and hence will be timing out EVERY taskmgmt command. This patch also eliminates the need for sloppy casting of pointers back-and-forth between u64 values, with the help of idr_alloc() to provide handles for us. It is the generated int handles we pass to the IO partition to denote our completion context, and these are validated and converted back to the required pointers when the task mgmt commands are returned back to us by the IO partition. == Testing == You must enable dynamic debugging in visorhba (build kernel with 'CONFIG_DYNAMIC_DEBUG=y', provide kernel parameter 'visorhba.dyndbg=+p') to see kernel messages involved with visorhba scsi task mgmt commands, which were added in this patch in the form of a few dev_dbg() / pr_debug() messages. In order to inject faults necessary to get visorhba to actully issue scsi task mgmt commands, you will need to compile a kernel with CONFIG_FAIL_IO_TIMEOUT and friends, in the "Kernel hacking" section: * Enable "Fault-injection framework" * Enable "Fault-injection capability for disk IO" * Enable "Fault-injection capability for faking disk interrupts" * Enable "Debugfs entries for fault-injection capabilities" When running a kernel with those options, you can manually inject a fault that will force a scsi task mgmt command to be issued like this: # mount -t debugfs nodev /sys/kernel/debug # cd /sys/kernel/debug/fail_io_timeout # cat interval 1 # cat probability 0 # cat times 1 # echo 100 >probability # cd /sys/block/sda # l | grep fail -rw-r--r-- 1 root root 4096 May 5 10:53 io-timeout-fail -rw-r--r-- 1 root root 4096 May 5 10:54 make-it-fail # echo 1 >io-timeout-fail # echo 1 >make-it-fail To test this patch, after performing the above steps, I did something to force a block device i/o, then shortly afterwards examined the kernel log. There I found evidence that visorhba had successfully issued a task mgmt command, and that it completed successfully: [ 333.352612] FAULT_INJECTION: forcing a failure. name fail_io_timeout, interval 1, probability 100, space 0, times 1 [ 333.352617] CPU: 0 PID: 295 Comm: vhba_incoming Tainted: G C 4.6.0-rc3-ARCH+ #2 [ 333.352619] Hardware name: Dell Inc. PowerEdge T110/ , BIOS 1.23 12/15/2009 [ 333.352620] 0000000000000000 ffff88001d1a7dd0 ffffffff8125beeb ffffffff818507c0 [ 333.352623] 0000000000000064 ffff88001d1a7df0 ffffffff8128047a ffff8800113462b0 [ 333.352625] ffff88000e523000 ffff88001d1a7e00 ffffffff81241c79 ffff88001d1a7e18 [ 333.352627] Call Trace: [ 333.352634] [<ffffffff8125beeb>] dump_stack+0x4d/0x72 [ 333.352637] [<ffffffff8128047a>] should_fail+0x11a/0x120 [ 333.352641] [<ffffffff81241c79>] blk_should_fake_timeout+0x29/0x30 [ 333.352643] [<ffffffff81241c36>] blk_complete_request+0x16/0x30 [ 333.352654] [<ffffffffa0118b36>] scsi_done+0x26/0x80 [scsi_mod] [ 333.352657] [<ffffffffa014a56c>] process_incoming_rsps+0x2bc/0x770 [visorhba] [ 333.352661] [<ffffffff81095630>] ? wait_woken+0x80/0x80 [ 333.352663] [<ffffffffa014a2b0>] ? add_scsipending_entry+0x100/0x100 [visorhba] [ 333.352666] [<ffffffff81077759>] kthread+0xc9/0xe0 [ 333.352669] [<ffffffff814609d2>] ret_from_fork+0x22/0x40 [ 333.352671] [<ffffffff81077690>] ? kthread_create_on_node+0x180/0x180 [ 364.025672] sd 0:0:1:1: visorhba: initiating type=1 taskmgmt command [ 364.029721] visorhba: notifying initiator with result=0x1 [ 364.029726] sd 0:0:1:1: visorhba: taskmgmt type=1 success; result=0x1 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>
* staging: unisys: visorhba: delete processing of vdiskmgmt commandsTim Sell2016-06-071-22/+0
| | | | | | | | | We never issue SCSI commands of type CMD_VDISKMGMT_TYPE, so there is no need to have code that processes their completions. 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>
* Merge tag 'staging-4.7-rc1' of ↵Linus Torvalds2016-05-2013-1007/+501
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging and IIO driver updates from Greg KH: "Here's the big staging and iio driver update for 4.7-rc1. I think we almost broke even with this release, only adding a few more lines than we removed, which isn't bad overall given that there's a bunch of new iio drivers added. The Lustre developers seem to have woken up from their sleep and have been doing a great job in cleaning up the code and pruning unused or old cruft, the filesystem is almost readable :) Other than that, just a lot of basic coding style cleanups in the churn. All have been in linux-next for a while with no reported issues" * tag 'staging-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (938 commits) Staging: emxx_udc: emxx_udc: fixed coding style issue staging/gdm724x: fix "alignment should match open parenthesis" issues staging/gdm724x: Fix avoid CamelCase staging: unisys: rename misleading var ii with frag staging: unisys: visorhba: switch success handling to error handling staging: unisys: visorhba: main path needs to flow down the left margin staging: unisys: visorinput: handle_locking_key() simplifications staging: unisys: visorhba: fail gracefully for thread creation failures staging: unisys: visornic: comment restructuring and removing bad diction staging: unisys: fix format string %Lx to %llx for u64 staging: unisys: remove unused struct members staging: unisys: visorchannel: correct variable misspelling staging: unisys: visorhba: replace functionlike macro with function staging: dgnc: Need to check for NULL of ch staging: dgnc: remove redundant condition check staging: dgnc: fix 'line over 80 characters' staging: dgnc: clean up the dgnc_get_modem_info() staging: lustre: lnet: enable configuration per NI interface staging: lustre: o2iblnd: properly set ibr_why staging: lustre: o2iblnd: remove last of kiblnd_tunables_fini ...
| * staging: unisys: rename misleading var ii with fragErik Arfvidson2016-05-091-5/+5
| | | | | | | | | | | | | | | | | | | | | | This patch removes misleading variable name with a more appropriate name. Since ii is keeping track of fragments inside a for loop I renamed it frag. ii->frag 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>
| * staging: unisys: visorhba: switch success handling to error handlingDavid Binder2016-05-091-8/+9
| | | | | | | | | | | | | | | | | | Addresses code audit feeback to switch from success handling to error handling in visorhba_main.c/process_disk_notify(). 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>
| * staging: unisys: visorhba: main path needs to flow down the left marginTim Sell2016-05-091-8/+9
| | | | | | | | | | | | | | | | | | | | | | In del_scsipending_ent(), the error-path and main-path were switched, so the error-path is handled like 'if (err) return;', and the main-path flows down the left margin. This also allowed us to remove the initialization of "sent". 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>
| * staging: unisys: visorinput: handle_locking_key() simplificationsTim Sell2016-05-091-11/+7
| | | | | | | | | | | | | | | | | | | | By directly returning for the error-case, a test was eliminated. Also, the old_state variable was removed as it was not necessary, and some redundant parens were removed. 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>
| * staging: unisys: visorhba: fail gracefully for thread creation failuresTim Sell2016-05-091-26/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, if visorhba ever failed to create its thread, it would have subsequently attempted to do a kthread_stop() on an invalid task_struct pointer. This was fixed via the new visor_thread_stop() function, which validates the task_struct pointer before doing the kthread_stop(). Also, the other thread-related fields in visor_thread_info (has_stopped and id) were not being used, so visor_thead_info was just removed. We also now spit out an error message if thread creation fails. 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>
| * staging: unisys: visornic: comment restructuring and removing bad dictionErik Arfvidson2016-05-091-94/+58
| | | | | | | | | | | | | | | | | | | | | | The purpose of this patch is to clean up commenting and making the code with comments be pleasant to eyes. Also make commenting be consistent throughout the file. Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: unisys: fix format string %Lx to %llx for u64Erik Arfvidson2016-05-091-5/+5
| | | | | | | | | | | | | | | | | | | | this patch fixes the following sonarqube issue. %Lx in format string (no. 1) requires 'unsigned long long' but the argument type is 'unsigned long long' 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>
| * staging: unisys: remove unused struct membersErik Arfvidson2016-05-091-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | The following struct members were never used: putfile_active_buffer::pnext putfile_request::file_request_number putfile_request::data_sequence_number Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: unisys: visorchannel: correct variable misspellingDavid Binder2016-05-091-1/+1
| | | | | | | | | | | | | | | | Fixes the spelling of a global variable passed into a kernel macro. 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>
| * staging: unisys: visorhba: replace functionlike macro with functionAlexander Curtin2016-05-092-46/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The `set_no_disk_inquiry_request` function now uses the correct min macro. Also I removed an unnecessary conditional. Get rid of u8 casts, u32 len, and u32 lun (which is actually defined as a u64 in the scsidev->lun field from whence it originated). Signed-off-by: Alexander Curtin <alexander.curtin@unisys.com> Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> 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>
| * staging: unisys: visorbus: initialize variablesDavid Binder2016-04-281-4/+4
| | | | | | | | | | | | | | | | | | Initializes previously uninitialized variables that were flagged as being problematic by Smatch. 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>
| * staging: unisys: visorbus: remove unused chipsetready informationErik Arfvidson2016-04-282-102/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Chipsetready sysfs entry is not used by any guests or service partitions. remove unused g_chipset_msg_hdr our service partition remove unused chipsetready_store and driver attributes: chipsetready_store() visorchipset_guest_attrs visorchipset_guest_groupw remove unused chipsets_events: check_chipset_events() clear_chipset_events() visorchipset_holdchipsetready remove sysfs documentation dealing with chipsetready 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>
| * staging: unisys: include: Added kerneldoc comments to visor_deviceAlexander Curtin2016-04-281-11/+34
| | | | | | | | | | | | | | | | | | | | The visor_device struct is used between multiple drivers, so this adds kerneldoc comments to the fields. Signed-off-by: Alexander Curtin <alexander.curtin@unisys.com> 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>
| * staging: unisys: include: Added kernel-doc for struct visor_driverAlexander Curtin2016-04-281-31/+34
| | | | | | | | | | | | | | | | | | | | This adds kerneldoc style comments to the visor_driver struct since it's shared between multiple modules. Signed-off-by: Alexander Curtin <alexander.curtin@unisys.com> 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>
| * staging: unisys: include: remove unused fields from struct visor_driverTim Sell2016-04-281-2/+0
| | | | | | | | | | | | | | | | The build_date and build_time fields are not used, and have been removed. 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>
| * staging: unisys: Documentation: Remove proc-entries.txtDavid Binder2016-04-282-94/+0
| | | | | | | | | | | | | | | | | | Unisys drivers no longer utilize procfs. Therefore, the documentation for our procfs entries is no longer needed. 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>
| * staging: unisys: added display string size defineErik Arfvidson2016-04-281-2/+5
| | | | | | | | | | | | | | | | | | | | | | Display string size that is guaranteed to be no longer the 99 characters. Don't use a magic number throughout the code, define it once and use it throughout. 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>
| * staging: unisys: visornic: convert BUG_ON to dev_err() messageTim Sell2016-04-281-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The caller of visor_copy_fragsinfo_from_skb() is prepared to log a dev_err() message if it fails (by returning a negative value), so we now just fail in the one occasion where visor_copy_fragsinfo_from_skb() was doing a BUG_ON. There was also a problem before where visor_copy_fragsinfo_from_skb() was returning a negative to indicate error, yet it was declared to return an unsigned value! So obviously that needed correcting too. 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>
| * staging: unisys: visornic: prevent double-unlock of priv_lockTim Sell2016-04-111-15/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, devdata->priv_lock was being unlocked in visornic_serverdown() both before calling visornic_serverdown_complete(), then again at the end of the function. This bug was corrected. The structure of visornic_serverdown() was also improved to make it easier to follow and to decrease the chance that such bugs will be introduced again. The main-path logic now falls thru down the left-side of the page, with a common error-exit point to handle error conditions. 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>
| * staging: unisys: visorinput: remove erroneous 'FIXME' commentsTim Sell2016-04-111-3/+3
| | | | | | | | | | | | | | | | These comments were mistakenly carried forward by a previous copy/paste. 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>
| * staging: unisys: removed unused 'visor_device.respond_to_device_create'Alexander Curtin2016-04-111-1/+0
| | | | | | | | | | | | | | | | | | | | | | The respond_to_device_create flag was used previously when we used to delay responses to create requests until the drivers were finished loading. This behaviour was removed some time ago, yet the field still existed, while never being referenced or even initialized. Signed-off-by: Alexander Curtin <alexander.curtin@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: unisys: visorbus: make bus_epilog match device_epilogDavid Kershner2016-04-111-16/+3
| | | | | | | | | | | | | | The paths in bus_epilog should match device_epilog. Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: unisys: visorbus: device_epilog: clean up gotosDavid Kershner2016-04-111-23/+13
| | | | | | | | | | | | | | | | The away flag is ambiguous, rename it to out and appropriately call the correct goto. Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: unisys: visorbus: visorchipset_init clean up gotosDavid Kershner2016-04-111-28/+40
| | | | | | | | | | | | | | | | | | | | | | Several error paths were not logging a message to s-Par during failure. Error paths in visorchipset_init() were corrected so that they now all do proper clean-ups. This made it necessary to move the function visorchipset_file_cleanup() above visorchipset_init so it can be referenced. Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: unisys: visorchannel: remove redundant member sizeDavid Binder2016-04-111-4/+1
| | | | | | | | | | | | | | | | | | Removes size member from the visorchannel struct, since it was a duplicate of the nbytes member. 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>
| * staging: unisys: visornic: CHECK: Alignment should match open parenthesisTim Sell2016-04-111-6/+7
| | | | | | | | | | | | | | | | | | Fix 'CHECK: Alignment should match open parenthesis' as recommended by checkpatch. 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>
| * staging: unisys: visorbus: CHECK: Alignment should match open parenthesisTim Sell2016-04-111-35/+45
| | | | | | | | | | | | | | | | | | Fix 'CHECK: Alignment should match open parenthesis' as recommended by checkpatch. 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>
| * staging: unisys: visorbus: 'unsigned' --> 'unsigned int'Tim Sell2016-04-111-1/+1
| | | | | | | | | | | | | | | | Fix as recommended by checkpatch. 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>
| * staging: unisys: visorbus: remove unnecessary poll_count logicTim Sell2016-03-311-7/+0
| | | | | | | | | | | | | | | | | | The use of poll_count is a vestige from long-ago testing, which is no longer needed. It is removed by this patch. 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>
| * staging: unisys: remove wmb() in visordriver_remove_deviceDavid Kershner2016-03-301-10/+2
| | | | | | | | | | | | | | | | Don't need to have a wmb() in visordriver_remove_device. Also removed an unnecessary check for drv being null. Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: unisys: removed unused channel_bytes attributeAlexander Curtin2016-03-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | The channel_bytes attribute in the visor_device struct was meant to keep track of the number of bytes in the associated channel of the device. Not only is the variable never set nor used, but the information can already be accessed by referencing visor_device->visorchannel->nbytes. Signed-off-by: Alexander Curtin <alexander.curtin@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: unisys: removed 'visor_device.devnodes' fieldAlexander Curtin2016-03-301-6/+0
| | | | | | | | | | | | | | | | | | | | The 'visor_device.devnodes' field was used for displaying driver version information through the devmajorminor sysfs attribute, which has recently been removed, rendering the field unnecessary. Signed-off-by: Alexander Curtin <alexander.curtin@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud