Haiyang Zhang [Fri, 2 Dec 2011 19:56:25 +0000 (11:56 -0800)]
net/hyperv: Fix the stop/wake queue mechanism
The ring buffer is only used to pass meta data for outbound packets. The
actual payload is accessed by DMA from the host. So the stop/wake queue
mechanism based on counting and comparing number of pages sent v.s. number
of pages in the ring buffer is wrong. Also, there is a race condition in
the stop/wake queue calls, which can stop xmit queue forever.
The new stop/wake queue mechanism is based on the actual bytes used by
outbound packets in the ring buffer. The check for number of outstanding
sends after stop queue prevents the race condition that can cause wake
queue happening earlier than stop queue.
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reported-by: Long Li <longli@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Lars-Peter Clausen [Fri, 9 Dec 2011 16:12:42 +0000 (17:12 +0100)]
staging:iio:dac:ad5791: Add id entry for the ad5790
The ad5790 has a binary compatible interface to ad5791, so we just have to add
an entry to the drivers device table to add support for it.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Ravishankar karkala Mallikarjunayya [Thu, 8 Dec 2011 12:51:56 +0000 (18:21 +0530)]
Staging: comedi: fix initialise statics to 0 or NULL issue in cb_das16_cs.c
This is a patch to the cb_das16_cs.c file that fixes up a initialise
statics to 0 or NULL warning found by the checkpatch.pl tool.
Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Ravishankar karkala Mallikarjunayya [Thu, 8 Dec 2011 12:52:09 +0000 (18:22 +0530)]
Staging: comedi: fix initialise statics to 0 or NULL issue in dt3000.c
This is a patch to the dt3000.c file that fixes up a initialise
statics to 0 or NULL warning found by the checkpatch.pl tool.
Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Ravishankar karkala Mallikarjunayya [Thu, 8 Dec 2011 12:52:03 +0000 (18:22 +0530)]
Staging: comedi: fix line over 80 character issue in cb_pcimdda.c
This is a patch to the cb_pcimdda.c file that fixes up a
line over 80 character warning found by the checkpatch.pl tool.
Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Ravishankar karkala Mallikarjunayya [Thu, 8 Dec 2011 12:51:57 +0000 (18:21 +0530)]
Staging: comedi: fix brace coding style issue in daqboard2000.c
This is a patch to the daqboard2000.c file that fixes up a brace
warning found by the checkpatch.pl tool.
Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Florian Schmaus [Thu, 8 Dec 2011 11:12:45 +0000 (12:12 +0100)]
staging: comedi: comedi_fops: Removed int overflow check
This became unnecessary with the previous commit.
Improved the readability of the remaining check, by using UINT_MAX.
Signed-off-by: Florian Schmaus <fschmaus@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Florian Schmaus [Thu, 8 Dec 2011 11:12:44 +0000 (12:12 +0100)]
staging: comedi: comedi_fops: Replace deprecated strict_strtoul with kstrtouint
As reported by checkpatch.pl strict_strtoul should be replaced. It was
replaced with kstrtouint since async->max_bufsize is an unsigned int
anyway.
Signed-off-by: Florian Schmaus <fschmaus@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Thu, 8 Dec 2011 23:25:56 +0000 (15:25 -0800)]
Staging: lttng: remove from the drivers/staging/ tree
The "proper" way to do this is to work with the existing in-kernel
tracing subsystem and work to get the missing features that are in lttng
into those subsystems.
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Thu, 8 Dec 2011 23:17:40 +0000 (15:17 -0800)]
staging: remove intel_sst driver
Intel has asked that this driver now be removed from the tree, and I am
happy to oblige.
Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Mathieu Desnoyers [Tue, 6 Dec 2011 01:07:35 +0000 (20:07 -0500)]
staging: lttng: Update max symbol length to 256
The user-space tracer, along with the control tools, now support longer
event name strings (up to 256 chars, including \0).
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Mathieu Desnoyers [Sat, 3 Dec 2011 18:05:37 +0000 (13:05 -0500)]
staging: lttng: TODO update: lttng reported to work fine on -rt now
The patch "lttng: Fix recent modifications to string_from_user
operation" has been confirmed to fix the corrupted trace problem
experienced on -rt kernel by the original bug reporter. Remove the
entry from the LTTng TODO list.
Reported-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Yannick Brosseau [Sat, 3 Dec 2011 02:13:32 +0000 (21:13 -0500)]
staging: lttng: Fix recent modifications to string_from_user operation
Include: a fix for a recently introduced change: obviously max_t should
be used instead of min_t here. Also, a likely should apply to the result
of the comparison, not the variable per se.
Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Rob Clark [Tue, 6 Dec 2011 01:19:22 +0000 (19:19 -0600)]
drm/omap: add GEM support for tiled/dmm buffers
TILER/DMM provides two features for omapdrm GEM objects:
1) providing a physically contiguous view to discontiguous memory
for hw initiators that cannot otherwise support discontiguous
buffers (DSS scanout, IVAHD video decode/encode, etc)
2) providing untiling for 2d tiled buffers, which are used in some
cases to provide rotation and reduce memory bandwidth for hw
initiators that tend to access data in 2d block patterns.
For 2d tiled buffers, there are some additional complications when
it comes to userspace mmap'ings. For non-tiled buffers, the original
(potentially physically discontiguous) pages are used to back the
mmap. For tiled buffers, we need to mmap via the tiler/dmm region to
provide an unswizzled view of the buffer. But (a) the buffer is not
necessarily pinned in TILER all the time (it can be unmapped when
there is no DMA access to the buffer), and (b) when they are they
are pinned, they not necessarily page aligned from the perspective of
the CPU. And non-page aligned userspace buffer mapping is evil.
To solve this, we reserve one or more small regions in each of the 2d
containers when the driver is loaded to use as a "user-GART" where we
can create a second page-aligned mapping of parts of the buffer being
accessed from userspace. Page faulting is used to evict and remap
different regions of whichever buffers are being accessed from user-
space.
Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Andy Gross [Tue, 6 Dec 2011 01:19:21 +0000 (19:19 -0600)]
drm/omap: DMM/TILER support for OMAP4+ platform
Dynamic Memory Manager (DMM) is a hardware block in the OMAP4+
processor that contains at least one TILER instance. TILER, or
Tiling and Isometric Lightweight Engine for Rotation, provides
IOMMU capabilities through the use of a physical address translation
table. The TILER also provides zero cost rotation and mirroring.
The TILER provides both 1D and 2D access by providing different views
or address ranges that can be used to access the physical memory that
has been mapped in through the PAT. Access to the 1D view results in
linear access to the underlying memory. Access to the 2D views result
in tiled access to the underlying memory resulted in increased
efficiency.
The TILER address space is managed by a tiler container manager (TCM)
and allocates the address space through the use of the Simple Tiler
Allocation algorithm (SiTA). The purpose of the algorithm is to keep
fragmentation of the address space as low as possible.
Signed-off-by: Andy Gross <andy.gross@ti.com>
Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Mark Einon [Tue, 6 Dec 2011 23:23:10 +0000 (23:23 +0000)]
staging: et131x: Revert changes from previous commit
In commit
834d0ee317b (uintxy_t removal) not all changes were trival text replacements, some converted u64 -> dma_addr_t.
In some configurations dma_addr_t is a u32, meaning that some bit operations cause build warnings. From Randy Dunlap:
----------------
on i386 (X86_32) builds:
drivers/staging/et131x/et131x.c:2483:8: warning: right shift count >= width of type
drivers/staging/et131x/et131x.c:2531:8: warning: right shift count >= width of type
----------------
Removed these by reverting dma_addr_t back to u64 types, as well as
reverting some other non-trivial changes from the aforementioned commit.
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Valentin Rothberg [Mon, 5 Dec 2011 10:02:35 +0000 (11:02 +0100)]
Staging: olpc_dcon.c: obsolete use of strict_stroul
As Dan mentioned, dcon_write() will only write u16 values. The
appropriate parts have been changed. As a result of module_param()
not accepting u16 as a valid data type, ushort is used.
Signed-off-by: Valentin Rothberg <valentinrothberg@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Valentin Rothberg [Sun, 4 Dec 2011 11:17:32 +0000 (12:17 +0100)]
Staging: olpc_dcon.c: obsolete use of strict_strtoul
As noted by the checkpatch script, strict_strtoul is obsolete. Unsigned
longs are used, so it seems good to take kstrtoul.
Signed-off-by: Valentin Rothberg <valentinrothberg@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Oren Weil [Tue, 6 Dec 2011 21:25:18 +0000 (23:25 +0200)]
staging: mei: updating mei driver documentation
The following changes were made in the document:
1. Update URLs to working links
2. remove old information about module parameters
3. Add IOCTL information.
4. cleanups and fix spelling
5. driver changed from character device to misc character device
Signed-off-by: Oren Weil <oren.jer.weil@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Natalia Ovsyanikov [Sun, 4 Dec 2011 22:16:54 +0000 (00:16 +0200)]
staging/mei: fix failure for multiple mei clients connection
The irq handler processes queued mei clients connect requests, which were
not transferred to the device in ioctl context due to unavailability
of the write buffer.
The handler may transfer the connection request only if there is
no other ongoing requests for the same mei id.
This condition was implemented inversely which depending on
the write buffer availability lead to seemingly random
failures during connection attempts.
Cc: Oren Weil <oren.jer.weil@intel.com>
Signed-off-by: Natalia Ovsyanikov <natalia.ovsyanikov@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Tomas Winkler [Sun, 4 Dec 2011 14:16:27 +0000 (16:16 +0200)]
staging/mei: Don't check if loop cursor is null
list_for_each_entry_safe(pos, next, &head, list)
if (pos) {
....
}
This check isn't needed. The list cursor in a list_for_each()
loop is always a valid pointer
Cc: Oren Weil <oren.jer.weil@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Xi Wang [Fri, 2 Dec 2011 21:28:43 +0000 (16:28 -0500)]
staging: olpc_dcon: ->read_status() API change
Change ->read_status() by separating the error handling and the
status bits. This also fixes a signedness bug in dcon_interrupt()
that would break the error handling.
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Acked-by: Andres Salomon <dilinger@queued.net>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jerome Marchand [Wed, 30 Nov 2011 13:16:16 +0000 (14:16 +0100)]
Staging: zram: Add a missing GFP_KERNEL specifier in zram_init_device()
The allocation of zram->compress_buffer is misssing a GFP_* specifier.
This is equivalent to GFP_NOWAIT but it is more likely a omission.
Since the allocation just above it uses GFP_KERNEL, there is no reason
to use GFP_NOWAIT here. Therefore, add GFP_KERNEL.
Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sergey Datsevich [Wed, 7 Dec 2011 18:06:37 +0000 (19:06 +0100)]
Staging: zram/zram_sysfs.c: Fixed call of obsolete function strict_strtoX
As reported by checkpatch.pl strict_strtoX is obsolet and should be
replaced by kstrtoX.
Signed-off-by: Sergey Datsevich <srgdts@gmail.com>
Signed-off-by: Bjoern Meier <bjoernmeier@hotmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Wed, 7 Dec 2011 15:15:52 +0000 (07:15 -0800)]
Staging: hv: storvsc: Fix a bug in create_bounce_buffer()
Set the length field of the scatter gather elements correctly when we create
the bounce buffer. When we use the bounce buffer for a "write" operation,
the act of copying to the bounce buffer, correctly deals with this issue.
However, on the "read" side, the current code was not correctly setting
the buffer length. Fix this bug. Note that when we copy from the bounce
buffer (for the read case), the amount we copy is controlled by the original
scatter gather list given to the driver.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reported-by: Dadok Milan <dadok@kvados.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Johannes Tenschert [Wed, 7 Dec 2011 17:25:10 +0000 (18:25 +0100)]
staging: bcm: led_control.c: breaking of long lines
Signed-off-by: Johannes Tenschert <Johannes.Tenschert@informatik.stud.uni-erlangen.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Johannes Tenschert [Wed, 7 Dec 2011 17:25:09 +0000 (18:25 +0100)]
staging: bcm: led_control.c: fix parens/braces
Signed-off-by: Johannes Tenschert <Johannes.Tenschert@informatik.stud.uni-erlangen.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Johannes Tenschert [Wed, 7 Dec 2011 17:25:08 +0000 (18:25 +0100)]
staging: bcm: led_control.c: fix comments
Signed-off-by: Johannes Tenschert <Johannes.Tenschert@informatik.stud.uni-erlangen.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Johannes Tenschert [Wed, 7 Dec 2011 17:25:07 +0000 (18:25 +0100)]
staging: bcm: led_control.c: fix indentation
Signed-off-by: Johannes Tenschert <Johannes.Tenschert@informatik.stud.uni-erlangen.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Johannes Tenschert [Wed, 7 Dec 2011 17:25:06 +0000 (18:25 +0100)]
staging: bcm: led_control.c: fix whitespaces
Signed-off-by: Johannes Tenschert <Johannes.Tenschert@informatik.stud.uni-erlangen.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kevin McKinney [Tue, 6 Dec 2011 03:17:03 +0000 (22:17 -0500)]
Staging: bcm: Alter return value for copy_to/from_user() to "return -EFAULT" when an error occurs.
In this clean up patch, I altered functions: copy_to/
from_user() to return -EFAULT when an error occurs.
I also replaced break statements when an error occurs
from copy_to/from_user() with direct returns of -EFAULT.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kevin McKinney [Fri, 2 Dec 2011 03:02:16 +0000 (22:02 -0500)]
Staging: bcm: Alter code to move error handling closer to the calls; and remove white space, IOCTL_BCM_NVM_WRITE.
This is a clean up patch for IOCTL_BCM_NVM_WRITE
that replaces the assignment of the Status
variable with direct returns of the error code,
replaces the break statements with direct returns,
and removes a white space.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kevin McKinney [Fri, 2 Dec 2011 03:02:15 +0000 (22:02 -0500)]
Staging: bcm: Fix double free of 'pReadData' in IOCTL_BCM_NVM_WRITE.
This patch fixes a memory error in ioctl,
IOCTL_BCM_NVM_WRITE. While copying data to
user space, if an error occurs, pReadData
is freed. Then, at the end of the ioctl,
pReadData was being freed again.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Markus Grabner [Mon, 5 Dec 2011 22:51:53 +0000 (23:51 +0100)]
staging/line6: refactor device information and add POD HD 500
This patch refactors the device information code and adds preliminary support for the POD HD 500 device.
Signed-off-by: Markus Grabner <grabner@icg.tugraz.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Markus Grabner [Mon, 5 Dec 2011 22:51:52 +0000 (23:51 +0100)]
staging/line6: Remove obsolete code
This patch removes experimental code which is no longer used.
Signed-off-by: Markus Grabner <grabner@icg.tugraz.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Andor Daam [Mon, 5 Dec 2011 09:10:37 +0000 (10:10 +0100)]
Staging: line6/midi.c: Fixed call of obsolete function strict_strtoul
The obsolete function strict_strtoul should be replaced by the kstrto*
functions.
In this context kstrtou16 should be use, as midi_mask_receive is only
used as unsigned short. All corresponding datatypes were adapted
accordingly.
Signed-off-by: Andor Daam <andor.daam@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Andor Daam [Mon, 5 Dec 2011 09:09:25 +0000 (10:09 +0100)]
Staging: line6/midi.c: Fixed call of obsolete function strict_strtoul
The function strict_strtoul is obsolete and should be replaced by the
new kstrto* functions.
The variable midi_mask_transmit is only used as unsigned short and the
datatypes of all affected variables were adjusted accordingly.
Signed-off-by: Andor Daam <andor.daam@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Dan Carpenter [Wed, 30 Nov 2011 08:42:58 +0000 (11:42 +0300)]
Staging: comedi: unlock on error in usbduxsigma_attach()
We should release the udev->sem lock before returning.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Dan Carpenter [Wed, 30 Nov 2011 08:42:21 +0000 (11:42 +0300)]
Staging: comedi: unlock on error in usbdux_ao_inttrig()
If we had an invalid trignum (anything other than zero is invalid) then
we returned without unlocking. I've modified this function to just have
one return point.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 5 Dec 2011 22:10:49 +0000 (00:10 +0200)]
staging: xgifb: enable forcecrt2type as a module parameter
Enable forcecrt2type as a module parameter.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 5 Dec 2011 22:10:48 +0000 (00:10 +0200)]
staging: xgifb: enable forcecrt2type on XG21
Make "forcecrt2type" to apply also for XG21. The patch enables user to
switch LVDS LCD ON/OFF without the need to update the video BIOS.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 5 Dec 2011 22:10:47 +0000 (00:10 +0200)]
staging: xgifb: delete "userom" option
Delete a redundant option.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 5 Dec 2011 22:10:46 +0000 (00:10 +0200)]
staging: xgifb: vb_table: delete XGI21_LCDCapList
Delete XGI21_LCDCapList. This data is display specific and does not
belong to the driver. It should be provided by the video BIOS.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 5 Dec 2011 22:10:45 +0000 (00:10 +0200)]
staging: xgifb: move XGI21_LVDSCapStruct into xgifb_video_info
Move the LVDS data into a device-specific data, and eliminate the global
variable usage.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 5 Dec 2011 22:10:44 +0000 (00:10 +0200)]
staging: xgifb: disable LVDS on XG27
XG27 has the second display output already hardcoded to disabled. Just
in case, ensure that it has the LVDS code paths disabled. This will
simplify the future cleanups.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 5 Dec 2011 22:10:43 +0000 (00:10 +0200)]
staging: xgifb: delete XGIfb_GetXG21LVDSData()
Delete XGIfb_GetXG21LVDSData() and code which duplicates
xgifb_read_vbios().
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 5 Dec 2011 22:10:42 +0000 (00:10 +0200)]
staging: xgifb: ReadVBIOSTablData(): rename to xgifb_read_vbios()
Rename the function to xgifb_read_vbios().
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 5 Dec 2011 22:10:41 +0000 (00:10 +0200)]
staging: xgifb: ReadVBIOSTablData(): copy only a single LVDS entry
Only a single LVDS table entry is needed by the driver.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 5 Dec 2011 22:10:40 +0000 (00:10 +0200)]
staging: xgifb: ReadVBIOSTablData(): check the BIOS size
Check the BIOS size to avoid out of bounds array access. Disable LVDS
in case errors are detected.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 5 Dec 2011 22:10:39 +0000 (00:10 +0200)]
staging: xgifb: use u8 for video BIOS data
Use u8 for video BIOS data.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 5 Dec 2011 22:10:38 +0000 (00:10 +0200)]
staging: xgifb: delete pjVirtualRomBase
Delete a redundant struct member.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 5 Dec 2011 22:10:37 +0000 (00:10 +0200)]
staging: xgifb: delete ROMAddr
Delete a redundant struct member.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 5 Dec 2011 22:10:36 +0000 (00:10 +0200)]
staging: xgifb: move video BIOS handling completely to ReadVBIOSTablData()
We need the video BIOS only on XG21 and only during the init, so let's
do everything at the same place.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 5 Dec 2011 22:10:35 +0000 (00:10 +0200)]
staging: xgifb: XGINew_GetXG21Sense(): eliminate video BIOS access
Remove video BIOS access from the routine, use the flag instead which
is initialized according to the BIOS data.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 5 Dec 2011 22:10:34 +0000 (00:10 +0200)]
staging: xgifb: ReadVBIOSTablData(): use a pointer to access the array
Use a pointer variable to make some lines shorter and more readable.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 5 Dec 2011 22:10:33 +0000 (00:10 +0200)]
staging: xgifb: ReadVBIOSTablData(): rename pVideoMemory
Rename pVideoMemory to vbios, and also remove volatile at the same go.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 5 Dec 2011 22:10:32 +0000 (00:10 +0200)]
staging: xgifb: ReadVBIOSTablData(): use ARRAY_SIZE
Use ARRAY_SIZE.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 5 Dec 2011 22:10:31 +0000 (00:10 +0200)]
staging: xgifb: ReadVBIOSTablData(): rearrange code to avoid nesting
Rearrange code to avoid deep nesting.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 5 Dec 2011 22:10:30 +0000 (00:10 +0200)]
staging: xgifb: ReadVBIOSTablData(): avoid duplicating code
If the count (j) is 0xff, just do the loop once.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Thu, 8 Dec 2011 20:22:28 +0000 (12:22 -0800)]
Merge branch 'work-next' into staging-next
Lars-Peter Clausen [Thu, 8 Dec 2011 17:35:53 +0000 (18:35 +0100)]
staging:iio: Fix scan mask update
When updating the scan mask we have to check the actual scan mask for if the
channel is already enabled, not the matching scan mask from the available
scan masks. The bit will already be set there and as a result the actual
scan mask will not get updated and the channel stays disabled.
Also fix the return value of iio_scan_el_store which would return 1 instead of
the number of bytes written if the channel was already active in the scan mask.
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Thu, 8 Dec 2011 20:16:43 +0000 (12:16 -0800)]
Merge branch 'work-next' into staging-next
Lars-Peter Clausen [Thu, 8 Dec 2011 17:35:51 +0000 (18:35 +0100)]
staging:iio: Fix sw_ring memory corruption
The sw_ring does not properly handle the case where the write pointer already
has wrapped around, the read pointer has not and the remaining buffer space at
the end is enough to fill the read buffer:
+-----------------------------------+
| | |##data##| |
+-----------------------------------+
write_p read_p
In this case the current code will copy all available data to the buffer and
as a result will write beyond the bounds of the buffer and cause a memory
corruption.
To address this issue this patch adds code to calculate the available buffer
space and makes sure that the number of bytes to copy does not exceed this
number. This allows the code which copies the data around to be simplified as
it only has to consider two cases: Read wraps around and read does not wrap
around.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Lars-Peter Clausen [Thu, 8 Dec 2011 17:20:37 +0000 (18:20 +0100)]
staging:iio: Fix typo
Fix a small typo in the iio_modifer enum.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Mon, 5 Dec 2011 22:18:30 +0000 (22:18 +0000)]
staging:iio:buffer.h update struct buffer docs.
These docs have lagged recent developments.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Mon, 5 Dec 2011 22:18:29 +0000 (22:18 +0000)]
staging:iio:buffer struct iio_buffer doesn't need an indio_dev pointer.
In all existing cases, the calls are coming from a location where
the indio_dev is already available.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Mon, 5 Dec 2011 22:18:28 +0000 (22:18 +0000)]
staging:iio:buffer scrap to_iio_buffer as it no longer has meaning.
Now buffers do not have a specific dev structure, this is garbage.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Mon, 5 Dec 2011 22:18:27 +0000 (22:18 +0000)]
staging:iio:buffer stop allowing for read_last callback.
No longer needed now we don't allow sysfs acccess to buffer data.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Mon, 5 Dec 2011 22:18:26 +0000 (22:18 +0000)]
staging:iio:ring_sw don't provide read last function.
No longer needed as we don't have drivers providing sysfs access
to buffered data.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Mon, 5 Dec 2011 22:18:25 +0000 (22:18 +0000)]
staging:iio:adc:max1363 stop reading from buffer for sysfs access
No known use case and makes in kernel interface work more complex.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Mon, 5 Dec 2011 22:18:24 +0000 (22:18 +0000)]
staging:iio:adc:ad799x stop reading from buffer for sysfs accesses
No known use case and makes in kernel interface work more complex.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Mon, 5 Dec 2011 22:18:23 +0000 (22:18 +0000)]
staging:iio:adc:ad7887 stop reading from buffer for sysfs access.
No known use case and complicates in kernel interface work.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Mon, 5 Dec 2011 22:18:22 +0000 (22:18 +0000)]
staging:iio:adc:ad7993 stop reading from buffer for sysfs raw read.
No known usecase and makes in kernel interface work more complex.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Mon, 5 Dec 2011 22:18:21 +0000 (22:18 +0000)]
staging:iio:adc:ad7606 remove buffer access to data from sysfs read.
No known use case and complicates in kernel interface work.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Mon, 5 Dec 2011 22:18:20 +0000 (22:18 +0000)]
staging:iio:adc:ad7606 remove buffer access for sysfs interfaces.
No known use case and complicates in kernel interface work.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Mon, 5 Dec 2011 22:18:19 +0000 (22:18 +0000)]
staging:iio:adc:ad7476 scrap read from buffer for sysfs access.
No known use case and complicates in kernel interface work.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Mon, 5 Dec 2011 22:18:18 +0000 (22:18 +0000)]
staging:iio:adc:ad7192 scrap read from buffer for sysfs access.
No known use case and complicates in kernel interface work.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Mon, 5 Dec 2011 22:18:17 +0000 (22:18 +0000)]
staging:iio:accel:lis3l02dq scrap reading from buffer for sysfs access.
No obvious usecase and complicates in kernel interface work.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Mon, 5 Dec 2011 22:18:16 +0000 (22:18 +0000)]
staging:iio:buffer remove unused owner field from struct iio_buffer
Legacy of having multiple chrdevs that never got cleaned up.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Mon, 5 Dec 2011 22:18:15 +0000 (22:18 +0000)]
staging:iio: scrap scan_count and ensure all drivers use active_scan_mask
Obviously drivers should only use this for pushing to buffers.
They need buffer->scan_mask for pulling from them post demux.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Mon, 5 Dec 2011 22:18:14 +0000 (22:18 +0000)]
staging:iio:buffer move setup ops from buffer instance to iio_dev
These callbacks should not be buffer instance specific.
Hence move them out of the buffer.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Mon, 5 Dec 2011 22:18:13 +0000 (22:18 +0000)]
staging:iio: remove userspace access to bytes per datum.
There are no known reasons why userspace should want this value.
It can be established from the buffer description anyway.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Mon, 5 Dec 2011 22:18:12 +0000 (22:18 +0000)]
staging:iio:buffer drop bpe field.
Has no remaining users.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Mon, 5 Dec 2011 21:56:01 +0000 (21:56 +0000)]
staging:iio:adc:max1363 add datasheet_name entries.
Kind of obvious for this device but useful
for testing purposes.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Mon, 5 Dec 2011 21:56:00 +0000 (21:56 +0000)]
staging:iio: core: add datasheet_name to chan_spec
This allows for matching against the name given
on a datasheet, however silly/inconsistent it might
be.
Useful for in kernel interfaces.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Mon, 5 Dec 2011 21:37:16 +0000 (21:37 +0000)]
staging:iio:adc:max1363 correctly set channels as big endian.
Also, the differential channels should always have been signed.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Mon, 5 Dec 2011 21:37:15 +0000 (21:37 +0000)]
staging:iio:adc:max1363 use new demuxing support.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Mon, 5 Dec 2011 21:37:14 +0000 (21:37 +0000)]
staging:iio: add demux optionally to path from device to buffer
This gives you only what you ask for which is handy
for some devices with weird scan combinations.
Routes all data flow through a core utility function.
That and this demuxing support will be needed to do
demuxing to multiple destinations in kernel.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Mon, 5 Dec 2011 21:37:13 +0000 (21:37 +0000)]
staging:iio: make iio_sw_buffer_preenable much more general.
Also introduces active_scan_mask storage to tell the core what is
really being currently captured from the device (different from
what is desired as often has bonus channels).
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Mon, 5 Dec 2011 21:37:12 +0000 (21:37 +0000)]
staging:iio: add hook to allow core to perform scan related config.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Mon, 5 Dec 2011 21:37:11 +0000 (21:37 +0000)]
staging:iio:buffer add a cache of the timestamp scan index.
Basically avoids looking it up lots of times.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Mon, 5 Dec 2011 21:37:10 +0000 (21:37 +0000)]
staging:iio:find iio channel from scan index util function
Useful for getting to the channel based on scan mask alone.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Lars-Peter Clausen [Mon, 5 Dec 2011 15:53:05 +0000 (16:53 +0100)]
staging:iio: Remove redundant spi driver bus initialization
In ancient times it was necessary to manually initialize the bus field of an
spi_driver to spi_bus_type. These days this is done in spi_register_driver() so
we can drop the manual assignment.
The patch was generated using the following coccinelle semantic patch:
// <smpl>
@@
identifier _driver;
@@
struct spi_driver _driver = {
.driver = {
- .bus = &spi_bus_type,
},
};
// </smpl>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Lars-Peter Clausen [Tue, 6 Dec 2011 09:07:02 +0000 (10:07 +0100)]
staging:iio:dac: Add AD5380 driver
This patch adds support for the Analog Devices D5380, AD5381,
AD5382, AD5383, AD5384, AD5390, AD5391, AD5392 multi-channel
Digital to Analog Converters.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Lars-Peter Clausen [Mon, 5 Dec 2011 16:05:41 +0000 (17:05 +0100)]
staging:iio:dac: Add AD5764 driver
This patch adds support for the Analog Devices AD5764, AD5764R, AD5744, AD5744R
quad channel analog-to-digital converter.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Sun, 4 Dec 2011 20:44:36 +0000 (20:44 +0000)]
staging:iio:adc:max1363 actually make timestamp controllable
Previously timestamps were always on in this driver.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Sun, 4 Dec 2011 19:10:59 +0000 (19:10 +0000)]
staging:iio:generic_buffer example - handle endian differences
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Sun, 4 Dec 2011 19:10:58 +0000 (19:10 +0000)]
staging:iio:Documentation: cleanup properly in buffer handling code
Eating the endian description for now.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Bryan Freed [Fri, 2 Dec 2011 22:19:30 +0000 (14:19 -0800)]
iio: light sensor: Improve granularity of tsl2583 lux values.
When illuminance0_calibbias gets 4000 (for a 4x multiplier), we see lux
granularity of 4. Reversing the order of the right shift and multiplication
retains the precision of the unadjusted lux value.
Signed-off-by: Bryan Freed <bfreed@chromium.org>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Andreas Ruprecht [Fri, 2 Dec 2011 16:30:23 +0000 (17:30 +0100)]
Staging: iio/accel: Added a range check for val in store_measurement_mode()
In sca3000_store_measurement_mode() we use val to and it with a mask.
This mask is only two bits long (as we are only interested in the
lowest two bits), so a value bigger than 3 was silently ignored so
far.
Now this function will return -EINVAL, if val is bigger than 3.
Signed-off-by: Andreas Ruprecht <rupran@einserver.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>