<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/staging, branch v3.0.94</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/staging?h=v3.0.94</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/staging?h=v3.0.94'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-08-04T07:43:34Z</updated>
<entry>
<title>staging: comedi: COMEDI_CANCEL ioctl should wake up read/write</title>
<updated>2013-08-04T07:43:34Z</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2013-07-08T12:36:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=dbe048b2eebb75f9b5c17b0d948fe5a8ec396cc5'/>
<id>urn:sha1:dbe048b2eebb75f9b5c17b0d948fe5a8ec396cc5</id>
<content type='text'>
commit 69acbaac303e8cb948801a9ddd0ac24e86cc4a1b upstream.

Comedi devices can do blocking read() or write() (or poll()) if an
asynchronous command has been set up, blocking for data (for read()) or
buffer space (for write()).  Various events associated with the
asynchronous command will wake up the blocked reader or writer (or
poller).  It is also possible to force the asynchronous command to
terminate by issuing a `COMEDI_CANCEL` ioctl.  That shuts down the
asynchronous command, but does not currently wake up the blocked reader
or writer (or poller).  If the blocked task could be woken up, it would
see that the command is no longer active and return.  The caller of the
`COMEDI_CANCEL` ioctl could attempt to wake up the blocked task by
sending a signal, but that's a nasty workaround.

Change `do_cancel_ioctl()` to wake up the wait queue after it returns
from `do_cancel()`.  `do_cancel()` can propagate an error return value
from the low-level comedi driver's cancel routine, but it always shuts
the command down regardless, so `do_cancel_ioctl()` can wake up he wait
queue regardless of the return value from `do_cancel()`.

Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>staging: vt6656: use free_netdev instead of kfree</title>
<updated>2013-06-07T19:46:34Z</updated>
<author>
<name>Hema Prathaban</name>
<email>hemaklnce@gmail.com</email>
</author>
<published>2013-05-11T17:09:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bbb17fe79731a9d580ab2338fe001b900fc29311'/>
<id>urn:sha1:bbb17fe79731a9d580ab2338fe001b900fc29311</id>
<content type='text'>
commit 0a438d5b381e2bdfd5e02d653bf46fcc878356e3 upstream.

use free_netdev() instead of kfree(pDevice-&gt;apdev)

Signed-off-by: Hema Prathaban &lt;hemaklnce@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>staging: comedi: s626: fix continuous acquisition</title>
<updated>2013-04-05T17:16:35Z</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2013-03-22T15:16:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3d8c163a2ecea7dd6c2c9efd68b6348ef0248733'/>
<id>urn:sha1:3d8c163a2ecea7dd6c2c9efd68b6348ef0248733</id>
<content type='text'>
commit e4317ce877a31dbb9d96375391c1c4ad2210d637 upstream.

For the s626 driver, there is a bug in the handling of asynchronous
commands on the AI subdevice when the stop source is `TRIG_NONE`.  The
command should run continuously until cancelled, but the interrupt
handler stops the command running after the first scan.

The command set-up function `s626_ai_cmd()` contains this code:

	switch (cmd-&gt;stop_src) {
	case TRIG_COUNT:
		/*  data arrives as one packet */
		devpriv-&gt;ai_sample_count = cmd-&gt;stop_arg;
		devpriv-&gt;ai_continous = 0;
		break;
	case TRIG_NONE:
		/*  continous acquisition */
		devpriv-&gt;ai_continous = 1;
		devpriv-&gt;ai_sample_count = 0;
		break;
	}

The interrupt handler `s626_irq_handler()` contains this code:

		if (!(devpriv-&gt;ai_continous))
			devpriv-&gt;ai_sample_count--;
		if (devpriv-&gt;ai_sample_count &lt;= 0) {
			devpriv-&gt;ai_cmd_running = 0;
			/* ... */
		}

So `devpriv-&gt;ai_sample_count` is only decremented for the `TRIG_COUNT`
case, but `devpriv-&gt;ai_cmd_running` is set to 0 (and the command
stopped) regardless.

Fix this in `s626_ai_cmd()` by setting `devpriv-&gt;ai_sample_count = 1`
for the `TRIG_NONE` case.  The interrupt handler will not decrement it
so it will remain greater than 0 and the check for stopping the
acquisition will fail.

Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>staging: vt6656: Fix oops on resume from suspend.</title>
<updated>2013-03-20T19:58:51Z</updated>
<author>
<name>Malcolm Priestley</name>
<email>tvboxspy@gmail.com</email>
</author>
<published>2013-02-18T19:54:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e41eeb8a041667163b0d9efd6d30c01440179c9a'/>
<id>urn:sha1:e41eeb8a041667163b0d9efd6d30c01440179c9a</id>
<content type='text'>
commit 6987a6dabfc40222ef767f67b57212fe3a0225fb upstream.

Remove usb_put_dev from vt6656_suspend and usb_get_dev
from vt6566_resume.

These are not normally in suspend/resume functions.

Signed-off-by: Malcolm Priestley &lt;tvboxspy@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>staging: comedi: check s-&gt;async for poll(), read() and write()</title>
<updated>2013-03-03T22:09:07Z</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2013-02-27T10:56:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6c80ee53f3737993f693bf2a3b4b3e4bbde9b51f'/>
<id>urn:sha1:6c80ee53f3737993f693bf2a3b4b3e4bbde9b51f</id>
<content type='text'>
commit cc400e185c07c15a42d2635995f422de5b94b696 upstream.

Some low-level comedi drivers (incorrectly) point `dev-&gt;read_subdev` or
`dev-&gt;write_subdev` to a subdevice that does not support asynchronous
commands.  Comedi's poll(), read() and write() file operation handlers
assume these subdevices do support asynchronous commands.  In
particular, they assume `s-&gt;async` is valid (where `s` points to the
read or write subdevice), which it won't be if it has been set
incorrectly.  This can lead to a NULL pointer dereference.

Check `s-&gt;async` is non-NULL in `comedi_poll()`, `comedi_read()` and
`comedi_write()` to avoid the bug.

Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>staging: comedi: ni_labpc: set up command4 register *after* command3</title>
<updated>2013-03-03T22:09:07Z</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2013-02-27T12:52:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=544da4403b05e874e134919db7124def003ef7cf'/>
<id>urn:sha1:544da4403b05e874e134919db7124def003ef7cf</id>
<content type='text'>
Commit 22056e2b46246d97ff0f7c6e21a77b8daa07f02c upstream.

Tuomas &lt;tvainikk _at_ gmail _dot_ com&gt; reported problems getting
meaningful output from a Lab-PC+ in differential mode for AI cmds, but
AI insn reads gave correct readings.  He tracked it down to two
problems, one of which is addressed by this patch.

It seems that writing to the command3 register after writing to the
command4 register in `labpc_ai_cmd()` messes up the differential
reference bit setting in the command4 register.  Set up the command4
register after the command3 register (as in `labpc_ai_rinsn()`) to avoid
the problem.

Thanks to Tuomas for suggesting the fix.

Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>staging: comedi: ni_labpc: correct differential channel sequence for AI commands</title>
<updated>2013-03-03T22:09:07Z</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2013-02-27T12:52:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5e6af63de116db55be85da4374441f7963d11281'/>
<id>urn:sha1:5e6af63de116db55be85da4374441f7963d11281</id>
<content type='text'>
Commit 4c4bc25d0fa6beaf054c0b4c3b324487f266c820 upstream.

Tuomas &lt;tvainikk _at_ gmail _dot_ com&gt; reported problems getting
meaningful output from a Lab-PC+ in differential mode for AI cmds, but
AI insn reads gave correct readings.  He tracked it down to two
problems, one of which is addressed by this patch.

It seems the setting of the channel bits for particular scanning modes
was incorrect for differential mode.  (Only half the number of channels
are available in differential mode; comedi refers to them as channels 0,
1, 2 and 3, but the hardware documentation refers to them as channels 0,
2, 4 and 6.)  In differential mode, the setting of the channel enable
bits in the command1 register should depend on whether the scan enable
bit is set.  Effectively, we need to double the comedi channel number
when the scan enable bit is not set in differential mode.  The scan
enable bit gets set when the AI scan mode is `MODE_MULT_CHAN_UP` or
`MODE_MULT_CHAN_DOWN`, and gets cleared when the AI scan mode is
`MODE_SINGLE_CHAN` or `MODE_SINGLE_CHAN_INTERVAL`.  The existing test
for whether the comedi channel number needs to be doubled in
differential mode is incorrect in `labpc_ai_cmd()`.  This patch corrects
the test.

Thanks to Tuomas for suggesting the fix.

Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>staging: vt6656: Fix URB submitted while active warning.</title>
<updated>2013-02-28T14:32:26Z</updated>
<author>
<name>Malcolm Priestley</name>
<email>tvboxspy@gmail.com</email>
</author>
<published>2013-01-30T20:07:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=02424a5539959f519256b3a1a9e046f4caed6e65'/>
<id>urn:sha1:02424a5539959f519256b3a1a9e046f4caed6e65</id>
<content type='text'>
commit ae5943de8c8c4438cbac5cda599ff0b88c224468 upstream.

This error happens because PIPEnsControlOut and PIPEnsControlIn unlock the
spin lock for delay, letting in another thread.

The patch moves the current MP_SET_FLAG to before filling
of sUsbCtlRequest for pControlURB and clears it in event of failing.

Any thread calling either function while fMP_CONTROL_READS or fMP_CONTROL_WRITES
flags set will return STATUS_FAILURE.

Signed-off-by: Malcolm Priestley &lt;tvboxspy@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>staging: comedi: disallow COMEDI_DEVCONFIG on non-board minors</title>
<updated>2013-02-28T14:32:26Z</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2013-01-28T16:14:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1646fff8a00d797cbaa0d711f29d3102cc7c022f'/>
<id>urn:sha1:1646fff8a00d797cbaa0d711f29d3102cc7c022f</id>
<content type='text'>
commit 754ab5c0e55dd118273ca2c217c4d95e9fbc8259 upstream.

Comedi has two sorts of minor devices:
(a) normal board minor devices in the range 0 to
COMEDI_NUM_BOARD_MINORS-1 inclusive; and
(b) special subdevice minor devices in the range COMEDI_NUM_BOARD_MINORS
upwards that are used to open the same underlying comedi device as the
normal board minor devices, but with non-default read and write
subdevices for asynchronous commands.

The special subdevice minor devices get created when a board supporting
asynchronous commands is attached to a normal board minor device, and
destroyed when the board is detached from the normal board minor device.
One way to attach or detach a board is by using the COMEDI_DEVCONFIG
ioctl.  This should only be used on normal board minors as the special
subdevice minors are too ephemeral.  In particular, the change
introduced in commit 7d3135af399e92cf4c9bbc5f86b6c140aab3b88c ("staging:
comedi: prevent auto-unconfig of manually configured devices") breaks
horribly for special subdevice minor devices.

Since there's no legitimate use for the COMEDI_DEVCONFIG ioctl on a
special subdevice minor device node, disallow it and return -ENOTTY.

Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>NLS: improve UTF8 -&gt; UTF16 string conversion routine</title>
<updated>2013-02-28T14:32:26Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2011-11-17T21:42:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8eac4364548b8f53476602969a2fba65d029d8b7'/>
<id>urn:sha1:8eac4364548b8f53476602969a2fba65d029d8b7</id>
<content type='text'>
commit 0720a06a7518c9d0c0125bd5d1f3b6264c55c3dd upstream.

The utf8s_to_utf16s conversion routine needs to be improved.  Unlike
its utf16s_to_utf8s sibling, it doesn't accept arguments specifying
the maximum length of the output buffer or the endianness of its
16-bit output.

This patch (as1501) adds the two missing arguments, and adjusts the
only two places in the kernel where the function is called.  A
follow-on patch will add a third caller that does utilize the new
capabilities.

The two conversion routines are still annoyingly inconsistent in the
way they handle invalid byte combinations.  But that's a subject for a
different patch.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
CC: Clemens Ladisch &lt;clemens@ladisch.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
