<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pm24.git/drivers/staging/comedi, branch v3.9</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://git.kobert.dev/pm24.git/atom?h=v3.9</id>
<link rel='self' href='https://git.kobert.dev/pm24.git/atom?h=v3.9'/>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/'/>
<updated>2013-03-25T18:35:38Z</updated>
<entry>
<title>staging: comedi: s626: fix continuous acquisition</title>
<updated>2013-03-25T18:35:38Z</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.kobert.dev/pm24.git/commit/?id=e4317ce877a31dbb9d96375391c1c4ad2210d637'/>
<id>urn:sha1:e4317ce877a31dbb9d96375391c1c4ad2210d637</id>
<content type='text'>
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.

Cc: stable &lt;stable@vger.kernel.org&gt;
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: dt9812: use CR_CHAN() for channel number</title>
<updated>2013-03-11T17:21:05Z</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2013-03-05T13:13:44Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=564c526a1bed5e42b5cd52cfe1752c4296ef17a6'/>
<id>urn:sha1:564c526a1bed5e42b5cd52cfe1752c4296ef17a6</id>
<content type='text'>
As pointed out by Dan Carpenper in
&lt;http://driverdev.linuxdriverproject.org/pipermail/devel/2013-February/036025.html&gt;,
the dt9812 comedi driver's use of the `chanspec` member of `struct
comedi_insn` as a channel number is incorrect.  Change it to use
`CR_CHAN(insn-&gt;chanspec)` as the channel number (where `insn` is a
pointer to the `struct comedi_insn` being processed).

Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt; # 3.8 onwards
Cc: Anders Blomdell &lt;anders.blomdell@control.lth.se&gt;
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: drivers: usbduxsigma.c: fix DMA buffers on stack</title>
<updated>2013-03-11T16:38:37Z</updated>
<author>
<name>Kumar Amit Mehta</name>
<email>gmate.amit@gmail.com</email>
</author>
<published>2013-02-22T06:07:08Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=b5ae11463a67a5e468dd67482ab2308994da9b2b'/>
<id>urn:sha1:b5ae11463a67a5e468dd67482ab2308994da9b2b</id>
<content type='text'>
This patch fixes an instance of DMA buffer on stack(being passed to
usb_control_msg)for the USB-DUXsigma Board driver. Found using smatch.

Signed-off-by: Kumar Amit Mehta &lt;gmate.amit@gmail.com&gt;
Reviewed-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reviewed-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: drivers: usbduxfast.c: fix for DMA buffers on stack</title>
<updated>2013-03-11T16:30:04Z</updated>
<author>
<name>Kumar Amit Mehta</name>
<email>gmate.amit@gmail.com</email>
</author>
<published>2013-02-22T18:07:30Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=161f440c8d915181b34f5a64f52a543beca6b1e9'/>
<id>urn:sha1:161f440c8d915181b34f5a64f52a543beca6b1e9</id>
<content type='text'>
fix for instances of DMA buffer on stack(being passed to usb_control_msg) for
the USB-DUXfast Board driver.

Signed-off-by: Kumar Amit Mehta &lt;gmate.amit@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: comedi: drivers: usbdux.c: fix DMA buffers on stack</title>
<updated>2013-03-11T16:30:04Z</updated>
<author>
<name>Kumar Amit Mehta</name>
<email>gmate.amit@gmail.com</email>
</author>
<published>2013-02-22T18:07:03Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=d49c3d61cfdb33165d2760817ec9601d277575d4'/>
<id>urn:sha1:d49c3d61cfdb33165d2760817ec9601d277575d4</id>
<content type='text'>
fix for instances of DMA buffer on stack(being passed to usb_control_msg) for
the USB-DUX-D Board driver.

Signed-off-by: Kumar Amit Mehta &lt;gmate.amit@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>more file_inode() open-coded instances</title>
<updated>2013-02-27T21:59:05Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2013-02-27T21:59:05Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=6131ffaa1f091415b7a24abb01f033d9c0a727f4'/>
<id>urn:sha1:6131ffaa1f091415b7a24abb01f033d9c0a727f4</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>staging: comedi: vmk80xx: wait for URBs to complete</title>
<updated>2013-02-18T18:53:50Z</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2013-02-18T11:15:55Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=951348b377385475aa256c27e1c9e2564c9ec160'/>
<id>urn:sha1:951348b377385475aa256c27e1c9e2564c9ec160</id>
<content type='text'>
For Velleman K8055 (aka VM110), `vmk80xx_read_packet()` and
`vmk8055_write_packet()` send an URB asynchronously and do not wait for
it complete.  However, callers of `vmk80xx_read_packet()` are assuming
the contents of the data buffer `devpriv-&gt;usb_rx_buf` are valid
immediately after that function returns.

For Velleman K8061 (aka VM140), `vmk80xx_read_packet()` and
`vmk80xx_write_packet()` punt the requests to `vmk80xx_do_bulk_msg()`
which *does* wait for the URBs to complete (albeit with no error
checking!).

Change `vmk80xx_read_packet()` and `vmk80xx_write_packet()` to use
`usb_interrupt_msg()` for the K8055, so the callers of
`vmk80xx_read_packet()` can assume the data buffer contents are valid
(if no error occurred).  Remove all the code for checking for transfers
in progress and busy waiting, as it's no longer needed.  Pretty much all
the callers of `vmk80xx_read_packet()` and `vmk80xx_write_packet()` hold
the same semaphore anyway, and the only caller that doesn't
(`vmk80xx_reset_device()` called during initialization of the device)
doesn't really matter.

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: drivers: addi-data: hwdrv_apci3200.c: Add a missing semicolon</title>
<updated>2013-02-18T18:53:50Z</updated>
<author>
<name>Kumar Amit Mehta</name>
<email>gmate.amit@gmail.com</email>
</author>
<published>2013-02-17T06:54:58Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=6b07b30892ad972286871787079ed68d07779ba4'/>
<id>urn:sha1:6b07b30892ad972286871787079ed68d07779ba4</id>
<content type='text'>
fix for missing end-of-statement by adding a semicolon

Signed-off-by: Kumar Amit Mehta &lt;gmate.amit@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging/comedi: Remove if(); statement without effect</title>
<updated>2013-02-15T18:20:14Z</updated>
<author>
<name>Peter Huewe</name>
<email>peterhuewe@gmx.de</email>
</author>
<published>2013-02-15T12:14:26Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=a81875dd7a6e31e69ea1f6ed22209acb8f82bf36'/>
<id>urn:sha1:a81875dd7a6e31e69ea1f6ed22209acb8f82bf36</id>
<content type='text'>
Smatch warns about:
staging/comedi/drivers/cb_pcidas64.c:3304 prep_ao_dma() warn: if();

So the check currently does nothing and can be removed, as indicated by
Ian.

Signed-off-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
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: Use &amp;&amp; instead of &amp; for logical comparision</title>
<updated>2013-02-15T18:20:14Z</updated>
<author>
<name>Peter Huewe</name>
<email>peterhuewe@gmx.de</email>
</author>
<published>2013-02-14T21:27:06Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=8289ad0578ad7e66b2052754746b4deb1a88cc4a'/>
<id>urn:sha1:8289ad0578ad7e66b2052754746b4deb1a88cc4a</id>
<content type='text'>
sparse complains that:
drivers/staging/comedi/drivers/adl_pci9118.c:813 pci9118_calc_divisors()
warn: maybe use &amp;&amp; instead of &amp;

usessh is used as a boolean flag (0 and 1) and is compared to a boolean
value so we should use &amp;&amp; here.

Signed-off-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
