Mike Rapoport [Sun, 17 Jan 2016 17:59:49 +0000 (19:59 +0200)]
staging: sm750fb: disable PCI device if lynxfb_pci_probe fails
In case of error during lynxfb_pci_probe, the function returned without
calling pci_disable_device. Fix it by adding pci_disable_device on the
error cleanup path.
Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ira Weiny [Tue, 22 Dec 2015 02:57:45 +0000 (21:57 -0500)]
staging/rdma/hfi1: Fix Xmit Wait calculation
Total XMIT wait needs to sum the xmit wait values of all the VLs not just
those requested in the query. Also, make the algorithm used for both
PortStatus and PortDataCounters the same.
Reviewed-by: Arthur Kepner <arthur.kepner@intel.com> Reviewed-by: Breyer, Scott J <scott.j.breyer@intel.com> Signed-off-by: Ira Weiny <iweiny@gmail.com> Signed-off-by: Jubin John <jubin.john@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Paul Gortmaker [Tue, 17 Nov 2015 00:58:49 +0000 (19:58 -0500)]
staging: drop kbuild workaround dummy module from top dir
This is essentially a revert of 86f69fe9c069dd8608d238581eea259caa1dfc99
("Staging: workaround build system bug"), but to call it a revert would
imply it was wrong -- rather it seems more like it is just no longer
required anymore.
It doesn't list the full details of the failing use case, but the most
obvious would appear to be a "make allnoconfig" that subsequently had set
just CONFIG_STAGING=y in the .config file, to give:
paul@builder:~/git/linux-head$ grep STAGING ../staging-allno/.config
CONFIG_STAGING=y
# CONFIG_STAGING_MEDIA is not set
# CONFIG_STAGING_BOARD is not set
paul@builder:~/git/linux-head$
After building this .config (on ARM, just to be different), we see that
built-in.o is created, and the final vmlinux links OK:
paul@builder:~/git/linux-head$ ls -l ../staging-allno/drivers/staging/built-in.o
-rw-rw-r-- 1 paul paul 257 Nov 16 18:06 ../staging-allno/drivers/staging/built-in.o
paul@builder:~/git/linux-head$ file ../staging-allno/drivers/staging/built-in.o
../staging-allno/drivers/staging/built-in.o: ELF 32-bit LSB relocatable, ARM, version 1, not stripped
paul@builder:~/git/linux-head$ nm ../staging-allno/drivers/staging/built-in.o
nm: ../staging-allno/drivers/staging/built-in.o: no symbols
paul@builder:~/git/linux-head$ ls -l ../staging-allno/vmlinux
-rwxrwxr-x 1 paul paul 1236326 Nov 16 18:07 ../staging-allno/vmlinux
paul@builder:~/git/linux-head$
I also tested an "allmodconfig" and did not see any problems there
either. Switching back to x86-64 and testing several things there didn't
show any issues either. So it appears we do not need to carry the
workaround in tree any longer.
Cc: linux-kbuild@vger.kernel.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Michal Marek <mmarek@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Pablo G. Gallardo <pggllrd@gmail.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
STAGING: COMEDI: Remove unnecessary typecast of c90 int constant
This patch removes unnecessary typecast of c90 int constant.
Signed-off-by: Pablo G. Gallardo <pggllrd@gmail.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Spencer E. Olson [Wed, 27 Jan 2016 21:28:29 +0000 (14:28 -0700)]
staging: comedi: ni_mio_common: add finite regeneration to dio output
This patch continues the implementation of reinterpreting stop_arg when
stop_src == TRIG_NONE for national instruments cdio output on e/m-series
devices. This is part of a series of patches that allow a user to have a
specific buffer repeated as-is indefinitely. The contents of the DMA
buffer can be left static or changed by the user via mmap access to the DMA
buffer. If the contents are changed by the user, additional munging is not
performed by the driver and only a single call to
comedi_mark_buffer_written should be done. The original behavior is
preserved when stop_arg == 0, as would be the prior use case.
As opposed to analog output, this patch is relatively simple. First, the
digital output capabilities are much more limited/simple as compared to the
analog output device on NI e/m-series hardware, and second, this patch
relies on changes made with the earlier patch to accomplish limiting the
DMA buffer transfer.
Signed-off-by: Spencer E. Olson <olsonse@umich.edu> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Spencer E. Olson [Wed, 27 Jan 2016 21:28:28 +0000 (14:28 -0700)]
staging: comedi: ni_mio_common: adds finite regeneration to AO output
This patch implements for analog output the reinterpretation of stop_arg
when stop_src == TRIG_NONE to allow the user to specify the length of the
buffer that should be repeated. The intent is to allow a user to have a
specific buffer repeated as-is indefinitely. The contents of the DMA
buffer can be left static or changed by the user via mmap access to the DMA
buffer. If the contents are changed by the user, additional munging is not
performed by the driver and only a single call to
comedi_mark_buffer_written should be done.
Signed-off-by: Spencer E. Olson <olsonse@umich.edu> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch implements ni_ao_cmd much more closely organized like NI MHDDK
examples and DAQ-STC pseudo-code. Adds comments with some more specific
references to the DAQ-STC.
For stop_src==TRIG_NONE (continuous output mode of entire buffer), the
count for the UC counter was corrected to represent the maximum count
possible (0xffffff). Prior behavior for stop_src=TRIG_NONE did not
actually follow the DAQ-STC. Furthermore, stop_src==TRIG_NONE now
correctly uses code specialized for either m-series or e-series devices.
It should be noted that stop_src==TRIG_NONE does _not_ with this patch
(or with prior behavior in ni_mio_common) actually implement true
continuous output. Rather, the output is simply configured to operate as a
single buffer output, but where the buffer is as large as is possible with
NI-STC hardware.
Signed-off-by: Spencer E. Olson <olsonse@umich.edu> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Spencer E. Olson [Wed, 27 Jan 2016 21:28:26 +0000 (14:28 -0700)]
staging: comedi: ni_mio_common: make more bits in ao_cmd1 reg be stateful
Bits NISTC_AO_CMD1_DAC0_UPDATE_MODE and NISTC_AO_CMD1_DAC1_UPDATE_MODE are
now saved in the local copy of the AO_CMD1 register. This is more
appropriate than prior methods of setting these bits specifically _both_
in the ni_ao_cmd configuration function _and_ the ni_ao_inttrig trigger
function. With this patch, the bits are only specifically called out now
in the ni_ao_cmd configuration function. In the ni_ao_inttrig trigger
function, only the UI_ARM, UC_ARM, BC_ARM bits of the ao_cmd1 register are
specifically called out. Each of these bits is a strobe bit, while the
DAC[0-1]_UPDATE_MODE bits are simple write bits.
Signed-off-by: Spencer E. Olson <olsonse@umich.edu> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch implements ni_ao_reset much more closely organized like NI MHDDK
examples and DAQ-STC pseudo-code. Adds comments with some more specific
references to the DAQ-STC.
Signed-off-by: Spencer E. Olson <olsonse@umich.edu> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Spencer E. Olson [Wed, 27 Jan 2016 21:28:24 +0000 (14:28 -0700)]
staging: comedi: mite: enable continuous regeneration of finite samples
This change enables the mite DMA controller to only transfer the amount of
data needed by a command. By default, the old behavior of transferring the
entire comedi DMA data buffer is still in effect. These changes allow a
command to only transmit a limited portion of that data buffer as needed.
This patch begins to reinterprets stop_arg when stop_src == TRIG_NONE to
allow the user to specify the length of the buffer that should be repeated.
The intent is to allow a user to have a specific buffer repeated as-is
indefinitely. The contents of the DMA buffer can be left static or changed
by the user via mmap access to the DMA buffer. If the contents are changed
by the user, additional munging is not performed by the driver and only a
single call to comedi_mark_buffer_written should be done.
Signed-off-by: Spencer E. Olson <olsonse@umich.edu> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Spencer E. Olson [Tue, 12 Jan 2016 18:05:10 +0000 (11:05 -0700)]
staging: comedi: ni_mio_common: use CR_CHAN more consistently
Generally, the CR_CHAN macro is/should be used to access the relevant bits
for channel identification in cmd->*_arg when the corresponding
cmd->*_src==TRIG_EXT, including cmd->convert_arg in this case.
This patch does not fix a bug per se, as NISTC_AI_MODE1_CONVERT_SRC() already
masks the value sufficiently, but using CR_CHAN() here makes the code clearer as
it avoids passing some irrelevant bits to NISTC_AI_MODE1_CONVERT_SRC() in the
first place.
Signed-off-by: Spencer E. Olson <olsonse@umich.edu> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rohit kumar [Tue, 12 Jan 2016 04:01:46 +0000 (09:31 +0530)]
staging/ion: Add support to get ion handle from dma buf
Currently we can only import dma buf fd's to get ion_handle.
Adding support to import dma buf handles to support kernel
specific use cases.
An example use case is in linux platforms such as Tizen, in which
DRM-GEM is used for buffer management for graphics. It has gem_handle
corresponding to a buffer and uses gem_name for sharing the buffer
with other processes. However,it also uses dma_buf fd for 3d operations.
For wayland, there are multiple calls for gem_handle to dma_buf fd
conversion. So, we store dma_buf associated with buffer. But, there is
no api for getting ion_handle from dma_buf. This patch exposes api to
retrieve the ion handle from dma_buf for similar use cases. With this
patch, we can integrate ION within DRM-GEM for buffer management and
dma_buf sharing.
Gustavo Padovan [Wed, 3 Feb 2016 13:25:33 +0000 (11:25 -0200)]
staging/android: remove driver_data from struct sync_fence_info
It is unclear in what situations driver_data should be used thus better do
not upstream it for now. If a need arises in the future a discussion can
be started to re-add it.
Gustavo Padovan [Wed, 3 Feb 2016 13:25:31 +0000 (11:25 -0200)]
staging/android: rename sync_pt_info to sync_fence_info
As struct sync_pt doesn't exist anymore it is a good idea remove any
reference to it in the sync_framework. sync_pts were replaced directly by
fences and here we rename it to sync_fence_info to let the fence namespace
clean.
v2: rename fence_info to sync_fence_info (Maarten)
Gustavo Padovan [Wed, 3 Feb 2016 13:25:30 +0000 (11:25 -0200)]
staging/android: remove SYNC_WAIT ioctl
This ioctl is replicating the work of poll() syscall so let's take the
opportunity that this is still on staging tree and remove the duplication
and force new users to use the poll() standard interface.
Gustavo Padovan [Thu, 21 Jan 2016 12:49:23 +0000 (10:49 -0200)]
staging/android: remove pointless sync_timeline_signal at destroy phase
All changes to timeline value come through the user via
sync_timeline_signal() calls. When sync_timeline_destroy() is called no
changes on timeline->value happens hence call sync_timeline_signal() with
no increment is pointless.
Gustavo Padovan [Thu, 21 Jan 2016 12:49:21 +0000 (10:49 -0200)]
staging/android: remove struct sync_pt
struct sync_pt was just wrapping around struct fence and creating an
extra abstraction layer. The only two members of struct sync_pt, child_list
and active_list, were moved to struct fence in an earlier commit. After
removing those two members struct sync_pt is nothing more than struct
fence, so remove it all and use struct fence directly.
Gustavo Padovan [Thu, 21 Jan 2016 12:49:19 +0000 (10:49 -0200)]
staging/android: rename sync_fence to sync_file
sync_file has a more close meaning to what a sync_fence really, a struct
that represent a file that can be used by userspace to get information on
a fence, or wait for it to be signaled.
Chen Feng [Fri, 15 Jan 2016 02:38:19 +0000 (10:38 +0800)]
staging: ion : Donnot wakeup kswapd in ion system alloc
Since ion alloc can be called by userspace,eg gralloc.
When it is called frequently, the efficiency of kswapd is
to low. And the reclaimed memory is too lower. In this way,
the kswapd can use to much cpu resources.
Rajmal Menariya [Sat, 30 Jan 2016 06:07:35 +0000 (22:07 -0800)]
staging: ion: Set minimum carveout heap allocation order to PAGE_SHIFT
In carveout heap, change minimum allocation order from 12 to
PAGE_SHIFT. After this change each bit in bitmap (genalloc -
General purpose special memory pool) represents one page size
memory.
Colin Cross [Sat, 30 Jan 2016 06:07:33 +0000 (22:07 -0800)]
staging: lowmemorykiller: Make default lowmemorykiller debug message useful
lowmemorykiller debug messages are inscrutable and mostly useful
for debugging the lowmemorykiller, not explaining why a process
was killed. Make the messages more useful by prefixing them
with "lowmemorykiller: " and explaining in more readable terms
what was killed, who it was killed for, and why it was killed.
The messages now look like:
[ 76.997631] lowmemorykiller: Killing 'droid.gallery3d' (2172), adj 1000,
[ 76.997635] to free 27436kB on behalf of 'kswapd0' (29) because
[ 76.997638] cache 122624kB is below limit 122880kB for oom_score_adj 1000
[ 76.997641] Free memory is -53356kB above reserved
A negative number for free memory above reserved means some of the
reserved memory has been used and is being regenerated by kswapd,
which is likely what called the shrinkers.
Cc: Android Kernel Team <kernel-team@android.com> Cc: Greg KH <gregkh@linuxfoundation.org> Signed-off-by: Colin Cross <ccross@android.com>
[jstultz: Minor checkpatch tweaks] Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christian Gromm [Tue, 22 Dec 2015 09:53:05 +0000 (10:53 +0100)]
staging: most: change type of access_ref
This patch changes the type of the access reference from atomit_t to int.
It is needed, because the reference variable is secured by synchronization
locks and does not need to be atomic anymore.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christian Gromm [Tue, 22 Dec 2015 09:53:04 +0000 (10:53 +0100)]
staging: most: fix race conditions
This patch fixes race conditions that might emerge from functions
aim_open, aim_close, aim_read, aim_write and aim_disconnect_channel
within module cdev.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christian Gromm [Tue, 22 Dec 2015 09:53:00 +0000 (10:53 +0100)]
staging: most: remove redundant call to wake_up_interruptible
This patch prevents the cdev module from rousing the channel wait queue in
case the channel is about to be closed. It is safe to do so, because the
application can not be waiting within read or write and at the same time
be calling close.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christian Gromm [Tue, 22 Dec 2015 09:52:58 +0000 (10:52 +0100)]
staging: most: remove code to destroy channel
This patch removes unnecessary code to destroy channel objects. It is
needed, because function most_stop_channel, which is indirectly
triggered by function most_deregister_interface, already destroys the
channels.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christian Gromm [Tue, 22 Dec 2015 09:52:53 +0000 (10:52 +0100)]
staging: most: move initialization of pointer
This patch makes function store_add_link initialize the pointer to an AIM
right before the channel is probed. It is needed, the AIM may already call
most_start_channel while probe_channel is still running. At this point the
pointer to the AIM must not be NULL.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christian Gromm [Tue, 22 Dec 2015 09:52:47 +0000 (10:52 +0100)]
staging: most: fix mbo leak
This patch fixes a potential MBO leak in case function aim_read()
exits right after the MBO has been fetched from kfifo and before
it has been saved to the variable stacked_mbo.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The MBO pointer stacked_mbo and the boolean variable keep_mbo are
always changed together and therefore provide the same information.
This patch removes keep_mbo and uses stacked_mbo instead.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Thu, 7 Jan 2016 09:34:13 +0000 (12:34 +0300)]
staging: unisys: remove some dead code
queue_delayed_work() returns bool, not negative error codes. It returns
false if the work has already been queued or true otherwise. Since
we don't care about that, we can just remove the test.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Acked-by: Don Zickus <dzickus@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Fri, 5 Feb 2016 01:35:13 +0000 (10:35 +0900)]
staging: wilc1000: fix return type of wilc_deinit
This patch changes return type of wilc_deinit from s32 to int.
The result variable gets return value from wilc_mq_send that has return
type of int. It should be changed return type of this function as well
as data type of result variable.
Chaehyun Lim [Fri, 5 Feb 2016 01:35:11 +0000 (10:35 +0900)]
staging: wilc1000: fix return type of wilc_hif_set_cfg
This patch changes return type of wilc_hif_set_cfg from s32 to int.
The result variable gets return value from wilc_mq_send that has data
type of int. It should be changed return type of this function as well
as data type of result variable.
Chris Park [Thu, 4 Feb 2016 09:24:30 +0000 (18:24 +0900)]
staging: wilc1000: remove unnecessary log message using GENERIC_DBG tag
This patch remove unnecessary log message using GENERIC_DBG tag.
Needed log messages has changed netdev_dbg from PRINT_D.
And removes variables that were used to log message.
Signed-off-by: Chris Park <chris.park@atmel.com> Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chris Park [Thu, 4 Feb 2016 09:24:29 +0000 (18:24 +0900)]
staging: wilc1000: remove unused debug tag
This patch remove unused debug tag INT_DBG, LOCK_DBG, BUS_DBG,
MEM_DBG and FIRM_DBG
Signed-off-by: Chris Park <chris.park@atmel.com> Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chris Park [Thu, 4 Feb 2016 09:24:28 +0000 (18:24 +0900)]
staging: wilc1000: remove unused log message using the RX_DBG tag
This patch remove unused log message using the RX_DBG tag
Signed-off-by: Chris Park <chris.park@atmel.com> Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chris Park [Thu, 4 Feb 2016 09:24:27 +0000 (18:24 +0900)]
staging: wilc1000: remove unnecessary wilc_rx_complete function
This patch remove unnecessary wilc_rx_complete function
because this function only print unused log message.
remove unused has_packet variable nomore.
Signed-off-by: Chris Park <chris.park@atmel.com> Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>