staging: comedi: das1800: fix comments about the 'ao' board range
The waveform analog outputs on the 'ao' boards are not currently
supported. Modify the comment about the analog output range on
these boards so that the information is saved but fixes the
checkpatch.pl issues:
WARNING: Block comments use a trailing */ on a separate line
Move the comment so it's grouped with the comedi_lrange info.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: das1800: clarify step 4 of the ai (*do_cmdtest)
This step of the (*do_cmdtest) fixes the timing arguments when the
cmd->convert_src is TRIG_TIMER. The code is compact but it's a bit
hard to understand the "burst mode" vs. "non burst mode" (i.e. paced)
timing.
Clarify the fixup by splitting it into separate functions to check
the arguments based on if the command is doing 'paced' or 'burst'
timing. Add some comments to clarify the fixups.
This also fixes a minor issue with the 'burst' timing. When the
cmd->scan_begin_src is also TRIG_TIMER the pacer clock is used to
start each scan. The cmd->scan_begin_arg specifies the scan time.
The minimum (not maximum) value for this time must be large enough
for the 'burst' conversion time to sample all the channels.
The current 'max' check limits the scan time to the minimum time
(i.e. the max conversion speed).
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The comedi_device spinlock is used to protect the indirect addressing
selected by the DAS1800_SELECT register. It also prevents races between
the interrupt handler and the analog input (*poll).
Update the comments to make this clear.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The "hc" type boards have 64 analog input channels with a 64
entry queue. All the others have 16 channels and a 256 entry
queue.
EXP-1800 expansion boards can be used to increase the number
of analog inputs on the 16 channel boards, 16 channels per
EXP-1800, for a total of 256 channels.
Remove the 'qram_len' member of the boardinfo and use the
'id' member to determine the number of channels.
Add a comment about the number of channels and the unclear
mapping of the channels when EXP-1800 boards are used.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The boards supported by this driver have analog inputs with gains
of 1, 10, 50, and 250 ("01" type) or 1, 2, 4, and 8 ("02" type).
Unfortunately, the "01"/"02" type cannot be determined from the
boards id or by probing.
Replace the 'range_ai' member of the boardinfo with a bit-field flag,
'is_01_series' and only set it for the "01" type boards. Remove the
unnecessary initialization for the "02" type boards.
For aesthetics, rename the comedi_lrange arrays and document the gain.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: das1800: tidy up das1800_ao_insn_write()
The (*insn_write) functions are supposed to write insn->n values to the
specified channel. Tidy up this function and make it work like the core
expects.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: das1800: initialize all analog outputs
The current code used to initialize the analog outputs only sets the
last channel. The other channels will be reloaded with the last value
that was written to them.
Move the code into the subdevice init and properly initialize all the
channels to 0V.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: das1800: use comedi_offset_munge() for analog output
The analog outputs expect 2's complement data. For aesthetics, use
the helper function to handle the munging instead of depending on
the boardinfo 'resolution'.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Refactor das1800_probe() to return an errno instead of the boardinfo
pointer.
Add the board 'id' to the boardinfo to tidy up this function to clarify
the sanity check when the user provided a board name when trying to
attach to the driver.
Currently when this function probes for a boardinfo based on the board
id it returns the wrong boardinfo for the "st-da" and "hr-da" types.
This causes the analog input subdevice for those boards to not be
available. Fix the probe so that a proper boardinfo is used.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: das1800: fix analog input sample munging
The analog input samples are 2's complement when the inputs are configured
for bipolar ranges and offset binary when they are unipolar ranges. For
bipolar ranges the sample needs to be munged to the offset binary format
that comedi uses.
The (*insn_read) does the munging correctly but the async command support
incorrectly munges the data for both bipolar and unipolar ranges when
reading the remaining samples from the fifo in das1800_handle_fifo_not_empty().
Add a (*munge) function to the analog input subdevice so that the samples
are correctly munged when they are added to the async buffer by
comedi_buf_write_samples(). Add a flag to the private data and set it in
the (*do_cmd) so that the munging is only done for bipolar ranges.
Clarify the code by using the core helper functions to check the range and
do the munging.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: das1800: fix possible NULL dereference
DMA is optional with this driver. If it was not enabled the devpriv->dma
pointer will be NULL.
Fix the possible NULL pointer dereference when trying to disable the DMA
channels in das1800_ai_cancel() and tidy up the comments to fix the
checkpatch.pl issues:
WARNING: line over 80 characters
It's probably harmless in das1800_ai_setup_dma() because the 'desc' pointer
will not be used if DMA is disabled but fix it there also.
Fixes: 99dfc3357e98 ("staging: comedi: das1800: remove depends on ISA_DMA_API limitation") Cc: <stable@vger.kernel.org> # 4.0+ Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tim Sell [Wed, 13 Apr 2016 15:56:36 +0000 (11:56 -0400)]
staging: unisys: visornic: convert BUG_ON to dev_err() message
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: wilc1000: rename result in handle_set_ip_address
This patch renames result to ret that is used to get return value from
wilc_send_config_pkt. Some handle_*() functions are used as result,
others are used as ret. It will be changed as ret in all handle_*()
functions to match variable name.
staging: wilc1000: change data type of result in handle_set_ip_address
This patch changes data type of result variable from s32 to int. result
is used to get return value from wilc_send_config_pkt that has return
type of int.
staging: wilc1000: change handle_set_ip_address's return type to void
When handle_set_ip_address is called in hostIFthread that is a kernel
thread, it is not checked return type of this function. This patch
changes return type to void and removes braces if statement due to have
a single statement.
staging: wilc1000: rename result in handle_set_operation_mode
This patch renames result to ret that is used to get return value from
wilc_send_config_pkt. Some handle_*() functions are used as result,
others are used as ret. It will be changed as ret in all handle_*()
functions to match variable name.
staging: wilc1000: change data type of result in handle_set_operation_mode
This patch changes data type of result variable from s32 to int. result
is used to get return value from wilc_send_config_pkt that has return
type of int.
staging: wilc1000: change handle_set_operation_mode's return type to void
When handle_set_operation_mode is called in hostIFthread that is a
kernel thread, it is not checked return type of this function. This
patch changes return type to void and removes braces if statement due to
have a single statement.
staging: wilc1000: rename result in handle_set_wfi_drv_handler
This patch renames result to ret that is used to get return value from
wilc_send_config_pkt. Some handle_*() function are used as result,
others are used as ret. It will be changed as ret in all handle_*()
function to match variable name.
staging: wilc1000: change data type of result in handle_set_wfi_drv_handler
This patch changes data type of result variable from s32 to int.
result is used to get return value from wilc_send_config_pkt that has
return type of int.
staging: wilc1000: change handle_set_wfi_drv_handler's return type to void
When handle_set_wfi_drv_handler is called in hostIFthread that is a
kernel thread, it is not checked return type of this function. This
patch changes return type to void and removes braces if statement due to
have a single statement.
Leo Kim [Fri, 1 Apr 2016 08:44:19 +0000 (17:44 +0900)]
staging: wilc1000: adds a check routine when performed del_key()
This patch is adds a check routine when performed del_key().
We was find this situation while test the 'rmmod sdio'.
That is received inform a .del_key cmd from cfg80211.
If is not exist wep keys, must be ignore a wilc_remove_wep_key() function.
Thus, adds a check routine that key length of wep.
Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Fri, 1 Apr 2016 08:44:18 +0000 (17:44 +0900)]
staging: wilc1000: adds a cfg80211_disconnected() function
This patch is adds a cfg80211_disconnected() when connection is lost already.
We was find this situation while test the 'rmmod sdio'.
SDIO remove function are include both remove mac_close and unregister net_device.
That is received one more a disconnect cmd from cfg80211.
Driver was already performed disconnect.
If wilc->close value was set to true, adds a call to cfg80211_disconnected().
Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Fri, 1 Apr 2016 08:44:15 +0000 (17:44 +0900)]
staging: wilc1000: txq_thread_started: replaces a semaphore with a completion
This patch replaces a semaphore(txq_thread_started) with a completion.
Struct semaphore txq_thread_started is used to signal completion of txq thread.
It is better to use completion than semaphore for this case.
Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Fri, 1 Apr 2016 08:44:13 +0000 (17:44 +0900)]
staging: wilc1000: changes logic when happened mq_send fail
This patch changes logic when happened mq_send fail.
The check as a result value that mq_send fail.
But, regardless of the result value then perform a semaphore up.
That is an occur that semaphore locking.
Add to 'else' routine and move to 'else' position a semaphore up.
Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Andreas Dilger [Thu, 28 Apr 2016 16:07:38 +0000 (12:07 -0400)]
staging: lustre: llite: quiet overly verbose info message
The client doesn't need to print a message for every client mount that
the layout lock feature is enabled. This can be found at runtime via
the "import" proc file.
I also noticed that deleting OST objects logs into the debug log with
D_HA status, which is enabled by default. Move this over to D_INODE
so it doesn't fill the OST debug logs.
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-1095
Reviewed-on: http://review.whamcloud.com/7918 Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: Emoly Liu <emoly.liu@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Emoly Liu [Thu, 28 Apr 2016 16:07:37 +0000 (12:07 -0400)]
staging: lustre: debugfs: improve osc/mdc "imports" connect data
Improve /sys/debug/fs/lustre/{osc,mdc}/*/import files to print
the struct obd_connect_data data fields as "connect_data:"
in addition to the "connect_flags:" field.
Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3386
Reviewed-on: http://review.whamcloud.com/6588 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: James Simmons <uja.ornl@gmail.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Emoly Liu [Thu, 28 Apr 2016 16:07:36 +0000 (12:07 -0400)]
staging: lustre: obd: add case LCFG_PARAM to osd_process_config
Some proc parameters were moved from ofd to osd module and only
their symlinks were kept in ofd for interoperability/compatibility.
To process this kind of config params passed by ofd, this patch is
to do the following fixes:
- since these parameters are not included by the static lprocfs var
list, a pre-check is added for them to avoid "unknown param" error
message confuses the uses. If they are matched in this check, they
will be passed to the osd directly.
- improve the error messages in class_process_proc_param() and
class_process_proc_seq_param() a little.
Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4221
Reviewed-on: http://review.whamcloud.com/8238 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
wang di [Thu, 28 Apr 2016 16:07:34 +0000 (12:07 -0400)]
staging: lustre: fld: add local fldb to each target
Add local FLDB to each MDT, so OSD/OUT can check whether
FID is remote by looking up local FLDB, i.e. no need send RPC
to MDT0. This is just the client part of the work.
Signed-off-by: wang di <di.wang@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4076
Reviewed-on: http://review.whamcloud.com/7884 Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>