<feed xmlns='http://www.w3.org/2005/Atom'>
<title>BMC/Intel-BMC/linux.git/drivers/iio/industrialio-buffer.c, branch dev-4.4</title>
<subtitle>Intel OpenBMC Linux kernel source tree (mirror)</subtitle>
<id>https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev-4.4</id>
<link rel='self' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev-4.4'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/'/>
<updated>2016-09-24T08:07:38+00:00</updated>
<entry>
<title>iio: ensure ret is initialized to zero before entering do loop</title>
<updated>2016-09-24T08:07:38+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2016-09-05T14:39:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=73c165a6f3828c61d2a0e725597ffc6e07c0c40b'/>
<id>urn:sha1:73c165a6f3828c61d2a0e725597ffc6e07c0c40b</id>
<content type='text'>
commit 5dba4b14bafe801083d01e1f400816df7e5a8f2e upstream.

A recent fix to iio_buffer_read_first_n_outer removed ret from being set by
a return from wait_event_interruptible and also added a continue in a loop
which causes the variable ret to not be set when it reaches the end of the
loop.  Fix this by initializing ret to zero.

Also remove extraneous white space at the end of the loop.

Fixes: fcf68f3c0bb2a5 ("fix sched WARNING "do not call blocking ops when !TASK_RUNNING")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>iio: fix sched WARNING "do not call blocking ops when !TASK_RUNNING"</title>
<updated>2016-09-07T06:32:41+00:00</updated>
<author>
<name>Brian Norris</name>
<email>briannorris@chromium.org</email>
</author>
<published>2016-08-09T00:19:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=6cb6e951522723e17cad4419eef2cdc75c7ecc95'/>
<id>urn:sha1:6cb6e951522723e17cad4419eef2cdc75c7ecc95</id>
<content type='text'>
commit fcf68f3c0bb2a541aa47a2a38b8939edf84fd529 upstream.

When using CONFIG_DEBUG_ATOMIC_SLEEP, the scheduler nicely points out
that we're calling sleeping primitives within the wait_event loop, which
means we might clobber the task state:

[   10.831289] do not call blocking ops when !TASK_RUNNING; state=1 set at [&lt;ffffffc00026b610&gt;]
[   10.845531] ------------[ cut here ]------------
[   10.850161] WARNING: at kernel/sched/core.c:7630
...
[   12.164333] ---[ end trace 45409966a9a76438 ]---
[   12.168942] Call trace:
[   12.171391] [&lt;ffffffc00024ed44&gt;] __might_sleep+0x64/0x90
[   12.176699] [&lt;ffffffc000954774&gt;] mutex_lock_nested+0x50/0x3fc
[   12.182440] [&lt;ffffffc0007b9424&gt;] iio_kfifo_buf_data_available+0x28/0x4c
[   12.189043] [&lt;ffffffc0007b76ac&gt;] iio_buffer_ready+0x60/0xe0
[   12.194608] [&lt;ffffffc0007b7834&gt;] iio_buffer_read_first_n_outer+0x108/0x1a8
[   12.201474] [&lt;ffffffc000370d48&gt;] __vfs_read+0x58/0x114
[   12.206606] [&lt;ffffffc000371740&gt;] vfs_read+0x94/0x118
[   12.211564] [&lt;ffffffc0003720f8&gt;] SyS_read+0x64/0xb4
[   12.216436] [&lt;ffffffc000203cb4&gt;] el0_svc_naked+0x24/0x28

To avoid this, we should (a la https://lwn.net/Articles/628628/) use the
wait_woken() function, which avoids the nested sleeping while still
handling races between waiting / wake-events.

Signed-off-by: Brian Norris &lt;briannorris@chromium.org&gt;
Reviewed-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>iio: fix some warning messages</title>
<updated>2015-11-21T16:00:05+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2015-11-21T10:33:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=231bfe53c57e89857753c940192acba933cba56c'/>
<id>urn:sha1:231bfe53c57e89857753c940192acba933cba56c</id>
<content type='text'>
WARN_ON() only takes a condition argument.  I have changed these to
WARN() instead.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Cc: &lt;Stable@vger.kernel.org&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: industrialio-buffer: Fix iio_buffer_poll return value</title>
<updated>2015-08-12T18:26:34+00:00</updated>
<author>
<name>Cristina Opriceana</name>
<email>cristina.opriceana@gmail.com</email>
</author>
<published>2015-08-03T10:37:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=1bdc0293901cbea23c6dc29432e81919d4719844'/>
<id>urn:sha1:1bdc0293901cbea23c6dc29432e81919d4719844</id>
<content type='text'>
Change return value to 0 if no device is bound since
unsigned int cannot support negative error codes.

Fixes: f18e7a068 ("iio: Return -ENODEV for file operations if the
device has been unregistered")

Signed-off-by: Cristina Opriceana &lt;cristina.opriceana@gmail.com&gt;
Cc: &lt;Stable@vger.kernel.org&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: buffer: Fix kernel docs warnings</title>
<updated>2015-08-02T17:27:09+00:00</updated>
<author>
<name>Cristina Opriceana</name>
<email>cristina.opriceana@gmail.com</email>
</author>
<published>2015-07-24T13:18:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=0123635a77f72e0787f6f8b3ac796a40f796fcc4'/>
<id>urn:sha1:0123635a77f72e0787f6f8b3ac796a40f796fcc4</id>
<content type='text'>
Fix kernel docs for structures and functions in order to
remove some warnings when the documentation gets generated.

Signed-off-by: Cristina Opriceana &lt;cristina.opriceana@gmail.com&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: allow userspace to flush the hwfifo with non-blocking reads</title>
<updated>2015-06-21T13:51:13+00:00</updated>
<author>
<name>Octavian Purdila</name>
<email>octavian.purdila@intel.com</email>
</author>
<published>2015-06-05T12:56:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=c6f67a1f55a7f8a8373068ca07553bd2b2731949'/>
<id>urn:sha1:c6f67a1f55a7f8a8373068ca07553bd2b2731949</id>
<content type='text'>
This patch changes the semantics of non-blocking reads so that a
hardware fifo flush is triggered if the available data in the device
buffer is less then the requested size.

This allows userspace to accurately generate hardware fifo flushes, by
doing a non-blocking read with a size greater then the sum of the
device buffer and hardware fifo size.

Signed-off-by: Octavian Purdila &lt;octavian.purdila@intel.com&gt;
Reviewed-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: Require strict scan mask matching in hardware mode</title>
<updated>2015-06-01T10:34:54+00:00</updated>
<author>
<name>Lars-Peter Clausen</name>
<email>lars@metafoo.de</email>
</author>
<published>2015-05-29T16:14:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=1e1ec2861e0d4307267096c3f74c17298c1cde98'/>
<id>urn:sha1:1e1ec2861e0d4307267096c3f74c17298c1cde98</id>
<content type='text'>
In hardware mode we can not use the software demuxer, this means that the
selected scan mask needs to match one of the available scan masks exactly.

It also means that all attached buffers need to use the same scan mask.
Given that when operating in hardware mode there is typically only a single
buffer attached to the device this not an issue. Add a sanity check to make
sure that only a single buffer is attached in hardware mode nevertheless.

Signed-off-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: Specify supported modes for buffers</title>
<updated>2015-06-01T10:31:12+00:00</updated>
<author>
<name>Lars-Peter Clausen</name>
<email>lars@metafoo.de</email>
</author>
<published>2015-05-29T16:14:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=225d59adf1c899176cce0fc80e42b1d1c12f109f'/>
<id>urn:sha1:225d59adf1c899176cce0fc80e42b1d1c12f109f</id>
<content type='text'>
For each buffer type specify the supported device modes for this buffer.
This allows us for devices which support multiple different operating modes
to pick the correct operating mode based on the modes supported by the
attached buffers.

It also prevents that buffers with conflicting modes are attached
to a device at the same time or that a buffer with a non-supported mode is
attached to a device (e.g. in-kernel callback buffer to a device only
supporting hardware mode).

Signed-off-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: Always compute masklength</title>
<updated>2015-06-01T10:24:57+00:00</updated>
<author>
<name>Lars-Peter Clausen</name>
<email>lars@metafoo.de</email>
</author>
<published>2015-05-29T16:14:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=629bc02331f7aae6ef775fb4c15e6d8aa58722f1'/>
<id>urn:sha1:629bc02331f7aae6ef775fb4c15e6d8aa58722f1</id>
<content type='text'>
Even if no userspace consumer buffer is attached to the IIO device at
registration we still need to compute the masklength, since it is possible
that a in-kernel consumer buffer is going to get attached to the device at
a later point.

Signed-off-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>iio: buffer: remove unneeded test</title>
<updated>2015-06-01T07:47:22+00:00</updated>
<author>
<name>Laurent Navet</name>
<email>laurent.navet@gmail.com</email>
</author>
<published>2015-05-30T20:35:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=ff7d4f5981a8a139ead70adef3c1d0ed574bca01'/>
<id>urn:sha1:ff7d4f5981a8a139ead70adef3c1d0ed574bca01</id>
<content type='text'>
The same code is executed regardless ret value, so this test
can be removed.
Also fix coverity scan CID 1268786.

Signed-off-by: Laurent Navet &lt;laurent.navet@gmail.com&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
</feed>
