Patch "staging: comedi: ni_mio_common: fix M Series ni_ai_insn_read() data mask" has been added to the 4.4-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
staging: comedi: ni_mio_common: fix M Series ni_ai_insn_read() data mask
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
staging-comedi-ni_mio_common-fix-m-series-ni_ai_insn_read-data-mask.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
655c4d442d1213b617926cc6d54e2a9a793fb46bMon Sep 17 00:00:00 2001
From: Ian Abbott <[email protected]>
Date: Mon, 14 Nov 2016 20:16:21 +0000
Subject: staging: comedi: ni_mio_common: fix M Series ni_ai_insn_read() data mask
From: Ian Abbott <[email protected]>
commit 655c4d442d1213b617926cc6d54e2a9a793fb46b upstream.
For NI M Series cards, the Comedi insn_read handler for the AI subdevice is broken due to ANDing the value read from the AI FIFO data register with an incorrect mask. The incorrect mask clears all but the most significant bit of the sample data. It should preserve all the sample data bits. Correct it.
--- drivers/staging/comedi/drivers/ni_mio_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/comedi/drivers/ni_mio_common.c +1 -1
@@ -1929,7 +1929,7 @@ static int ni_ai_insn_read(struct comedi unsigned int *data) {struct ni_private *devpriv = dev->private; -unsigned int mask = (s->maxdata +1 ) >>1 ; +unsigned int mask = s->maxdata;int i, n;unsigned signbits;unsigned int d;
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/staging-comedi-ni_mio_common-fix-m-series-ni_ai_insn_read-data-mask.patch queue-4.4/staging-comedi-ni_mio_common-fix-e-series-ni_ai_insn_read-data.patch