<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/staging, branch v3.4.55</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/staging?h=v3.4.55</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/staging?h=v3.4.55'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-06-07T19:49:10Z</updated>
<entry>
<title>staging: vt6656: use free_netdev instead of kfree</title>
<updated>2013-06-07T19:49:10Z</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=622be96e6177c9bd787ad5f163f0e28f9ab6925f'/>
<id>urn:sha1:622be96e6177c9bd787ad5f163f0e28f9ab6925f</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:04:15Z</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=d8022cb2b0ea2e5d926c9e2a041e411d71fd3d9e'/>
<id>urn:sha1:d8022cb2b0ea2e5d926c9e2a041e411d71fd3d9e</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-20T20:04:58Z</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=a4371b6605f7b6930ba95df316948be6b306be73'/>
<id>urn:sha1:a4371b6605f7b6930ba95df316948be6b306be73</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:06:45Z</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=0685b5924819447dad0413312b508e68168a1ee2'/>
<id>urn:sha1:0685b5924819447dad0413312b508e68168a1ee2</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:06:45Z</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=e4cd1e4dba29c756272c2ee9d06b094b4319b90a'/>
<id>urn:sha1:e4cd1e4dba29c756272c2ee9d06b094b4319b90a</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:06:44Z</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=1e05b9964644382e9994e62dc5c8eb815e5225fa'/>
<id>urn:sha1:1e05b9964644382e9994e62dc5c8eb815e5225fa</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:59:04Z</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=4aee4099c7309d0610cf857d9d02d27ebfeb1b95'/>
<id>urn:sha1:4aee4099c7309d0610cf857d9d02d27ebfeb1b95</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:59:04Z</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=59959c9505e28cc7b9ead416cb064b4e56ba7dd5'/>
<id>urn:sha1:59959c9505e28cc7b9ead416cb064b4e56ba7dd5</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>staging: vt6656: Fix inconsistent structure packing</title>
<updated>2013-01-21T19:45:26Z</updated>
<author>
<name>Ben Hutchings</name>
<email>ben@decadent.org.uk</email>
</author>
<published>2013-01-14T01:29:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=111be1d7aaa33a36bc3e426d882454ca9b966721'/>
<id>urn:sha1:111be1d7aaa33a36bc3e426d882454ca9b966721</id>
<content type='text'>
commit 1ee4c55fc9620451b2a825d793042a7e0775391b upstream.

vt6656 has several headers that use the #pragma pack(1) directive to
enable structure packing, but never disable it.  The layout of
structures defined in other headers can then depend on which order the
various headers are included in, breaking the One Definition Rule.

In practice this resulted in crashes on x86_64 until the order of header
inclusion was changed for some files in commit 11d404cb56ecd ('staging:
vt6656: fix headers and add cfg80211.').  But we need a proper fix that
won't be affected by future changes to the order of inclusion.

This removes the #pragma pack(1) directives and adds __packed to the
structure definitions for which packing appears to have been intended.

Reported-and-tested-by: Malcolm Priestley &lt;tvboxspy@gmail.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>staging: wlan-ng: Fix clamping of returned SSID length</title>
<updated>2013-01-21T19:45:26Z</updated>
<author>
<name>Tormod Volden</name>
<email>debian.tormod@gmail.com</email>
</author>
<published>2013-01-09T21:23:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d7ddb69a53cd7c03c4c0660d13534214d2782c21'/>
<id>urn:sha1:d7ddb69a53cd7c03c4c0660d13534214d2782c21</id>
<content type='text'>
commit 811a37effdb11e54e1ff1ddaa944286c88f58487 upstream.

Commit 2e254212 broke listing of available network names, since it
clamped the length of the returned SSID to WLAN_BSSID_LEN (6) instead of
WLAN_SSID_MAXLEN (32).

https://bugzilla.kernel.org/show_bug.cgi?id=52501

Signed-off-by: Tormod Volden &lt;debian.tormod@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

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