`, `comedi_read()` and
`comedi_write()` to avoid the bug.
Signed-off-by: Ian Abbott
---
Applies to all stable/longterm kernels from (at least) 2.6.32.x to 3.8.x.
---
drivers/staging/comedi/comedi_fops.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/c
.
Thanks to Tuomas for suggesting the fix.
Signed-off-by: Ian Abbott
---
Applies to stable/longterm kernels 3.0.x to 3.6.x inclusive.
---
drivers/staging/comedi/drivers/ni_labpc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/comedi/drivers/ni_labpc.c
b
suggesting the fix.
Signed-off-by: Ian Abbott
---
Applies to stable/longterm kernels 3.0.x to 3.6.x inclusive.
---
drivers/staging/comedi/drivers/ni_labpc.c | 31 ---
1 file changed, 16 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/comedi/drivers/ni_labpc.c
b
.
Thanks to Tuomas for suggesting the fix.
Signed-off-by: Ian Abbott
---
Applies to 2.6.34.x longterm/stable kernel.
---
drivers/staging/comedi/drivers/ni_labpc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/comedi/drivers/ni_labpc.c
b/drivers/staging/comedi
suggesting the fix.
Signed-off-by: Ian Abbott
---
Applies to 2.6.34.x longterm/stable kernel.
---
drivers/staging/comedi/drivers/ni_labpc.c | 31 ---
1 file changed, 16 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/comedi/drivers/ni_labpc.c
b/drivers/staging
.
Thanks to Tuomas for suggesting the fix.
Signed-off-by: Ian Abbott
---
Applies to 2.6.32 longterm/stable kernel.
---
drivers/staging/comedi/drivers/ni_labpc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/comedi/drivers/ni_labpc.c
b/drivers/staging/comedi
suggesting the fix.
Signed-off-by: Ian Abbott
---
Applies to 2.6.32 longterm/stable kernel.
---
drivers/staging/comedi/drivers/ni_labpc.c | 31 ---
1 file changed, 16 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/comedi/drivers/ni_labpc.c
b/drivers/staging
as the channel number (where `insn` is a
pointer to the `struct comedi_insn` being processed).
Cc: # 3.8 onwards
Cc: Dan Carpenter
Cc: Anders Blomdell
Signed-off-by: Ian Abbott
---
Note: Needs a little backporting for kernels below 3.8.
---
drivers/staging/comedi/drivers/dt9812.c | 16 ++
il.
Cc: stable@vger.kernel.org
Signed-off-by: Ian Abbott
---
Resent to correct the stable@vger.kernel.org address. Sorry.
---
drivers/staging/comedi/drivers/s626.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/comedi/drivers/s626.c
b/drivers/staging/co
upstream
commit 34ffb33e09132401872fe79e95c30824ce194d23
The 'ni_at_a2150' module links to `cfc_write_to_buffer` in the
'comedi_fc' module, so selecting 'COMEDI_NI_AT_A2150' in the kernel
config needs to also select 'COMEDI_FC'.
Signed-off-by: Ian Abbot
On 15/01/13 18:45, Greg KH wrote:
On Tue, Jan 15, 2013 at 10:15:57AM -0800, Greg KH wrote:
On Tue, Jan 15, 2013 at 02:45:20PM +, Ian Abbott wrote:
upstream
commit 34ffb33e09132401872fe79e95c30824ce194d23
The 'ni_at_a2150' module links to `cfc_write_to_buffer` in the
'comedi
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
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
Cc: # 3.7.x, 3.8.x
they assume `s->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->async` is non-NULL in `comedi_poll()`, `comedi_read()` and
`comedi_write()` to avoid the bug.
Sig
On 2013-02-04 14:56, Ian Abbott wrote:
Some low-level comedi drivers (incorrectly) point `dev->read_subdev` or
`dev->write_subdev` to a subdevice that does not support asynchronous
commands. Comedi's poll(), read() and write() file operation handlers
assume these subdevices
medi_read()` and `comedi_write()` while calling
`do_become_nonbusy()` in order to avoid moving the race condition to a
point within that function.
Change some error handling `goto cleanup` statements in `do_cmd_ioctl()`
to simple `return -ERRFOO` statements as a result of changing when the
`busy` point
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
Cc:
---
drivers/staging/comedi/comedi_fops.c | 7 ++-
1 file changed, 6
follow f6b316bcd8c421acd6fa5a6e18b4c846ecb9d965
[Split from original patch subject: "staging: comedi: ssv_dnp: use
comedi_dio_update_state()"]
Also, fix a bug where the state of the channels is returned in data[0].
The comedi core expects it to be returned in data[1].
Signed-off-by:
follow 97f4289ad08cffe55de06d4ac4f89ac540450aee
[Split from original patch subject: "staging: comedi: drivers: use
comedi_dio_update_state() for simple cases"]
Also, fix a bug in the amplc_pc263 and amplc_pci263 drivers where the
current state is not returned in data[1].
Signed-o
follow 97f4289ad08cffe55de06d4ac4f89ac540450aee
[Split from original patch subject: "staging: comedi: drivers: use
comedi_dio_update_state() for simple cases"]
Also, fix a bug in the amplc_pc263 and amplc_pci263 drivers where the
current state is not returned in data[1].
Signed-o
sed to `kfree()` is non-NULL, so remove that check.
Signed-off-by: Ian Abbott
---
Applies to 3.11.y only (e.g. Debian jessie/testing).
---
drivers/staging/comedi/drivers/pcmuio.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/comedi/drivers/pcmuio.c
sed to `kfree()` is non-NULL, so remove that check.
Signed-off-by: Ian Abbott
---
Applies to 3.10.y only.
---
drivers/staging/comedi/drivers/pcmuio.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/comedi/drivers/pcmuio.c
b/drivers/staging/com
sed to `kfree()` is non-NULL, so remove that check.
Signed-off-by: Ian Abbott
---
Applies to 3.6.y to 3.9.y inclusive if any distros want it.
---
drivers/staging/comedi/drivers/pcmuio.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/comedi/driv
sed to `kfree()` is non-NULL, so remove that check.
Signed-off-by: Ian Abbott
---
Applies to 3.5.y only (if any distro is still using it).
---
drivers/staging/comedi/drivers/pcmuio.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/comedi/driv
sed to `kfree()` is non-NULL, so remove that check.
Signed-off-by: Ian Abbott
---
Applies to 2.6.32.y through to 3.4.y inclusive.
Does not apply to 3.5.y onwards.
---
drivers/staging/comedi/drivers/pcmuio.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/driv
oop.
Signed-off-by: Ian Abbott
---
Applies to 3.10.y and 3.11.y only.
Not needed for other kernels.
---
drivers/staging/comedi/drivers/pcmmio.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/comedi/drivers/pcmmio.c
b/drivers/staging/comedi/driv
On 2013-12-12 13:41, Ian Abbott wrote:
follow b88e75bb6576d99e0ba4f6edc978293d1ff9c01b
As pointed out by Dan carpenter for the similar pcmuio driver, there is
no need to check the pointer passed to `kfree()`, so remove that check
from `pcmmio_detach()`.
Also, check the `devpriv` (`dev
e for both entries.
Signed-off-by: Ian Abbott
---
Cc: # 3.10.y # 3.11.y # 3.12.y # 3.13.y
---
drivers/staging/comedi/drivers/8255_pci.c | 15 ---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/comedi/drivers/8255_pci.c
b/drivers/staging/comedi/drivers/
introduced a
NULL pointer dereference bug as `dev->driver` is NULL after the call to
`comedi_device_detach()`. We still have a pointer to the low-level
comedi driver structure in the `driv` variable, so use that instead.
Signed-off-by: Ian Abbott
Cc: # 3.10.x
Cc: # 3.11.x
---
drivers/staging/com
ration, increasing by 8 for
each subsequent operation.)
Signed-off-by: Ian Abbott
Cc: # 3.10.y 3.11.y 3.12.y
---
Needs backporting for longterm kernels before 3.10.y
---
drivers/staging/comedi/drivers/ni_65xx.c | 25 ++---
1 file changed, 10 insertions(+), 15 deletions(-
avoid unnecessary use of a spin-lock.
Signed-off-by: Ian Abbott
Cc: # 3.11.y
---
v2: Replaced call to `comedi_set_subdevice_runflags()` from
`comedi_alloc_spriv()` with a simple OR-assignment, as suggested by
Hartley S Sweeten.
Note: The first version of this patch was posted on 2013-07-05 but I
tshift` will be
between -7 and 7 inclusive on the first iteration, increasing by 8 for
each subsequent operation.)
Signed-off-by: Ian Abbott
---
This patch applies to kernels 2.6.34.y through to 3.5.y inclusive.
Similar patch already queued for 3.10.y and 3.11.y by Greg-KH.
I can post similar pa
tshift` will be
between -7 and 7 inclusive on the first iteration, increasing by 8 for
each subsequent operation.)
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/drivers/ni_65xx.c | 25 +++--
1 file changed, 11 insertions(+), 14 deletions(-)
diff --git a/drivers
always clearing the `hardware_device`
cookie in the `struct comedi_dev_file_info` whenever the
`COMEDI_DEVCONFIG` ioctl call is successful.
Signed-off-by: Ian Abbott
Cc: stable@vger.kernel.org
---
drivers/staging/comedi/comedi_fops.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers
,
which starts 5 years ago). My guess is that it comes from reading the
specification stating a 2.8 MHz rate (~ 357 ns). The latest
specification states a 2.86 MHz rate (~ 350 ns), which makes a lot
more sense.
Tested on a pci-6251.
Signed-off-by: Éric Piel
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
On 20/12/12 14:09, Éric Piel wrote:
On 19/12/12 17:43, Ian Abbott wrote:
Looks reasonable. The AO speed checks were added to the NI drivers (in
the out-of-tree Comedi sources before they were imported into "staging")
in early May 2007 but probably weren't tested to the limits.
always clearing the `hardware_device`
cookie in the `struct comedi_dev_file_info` whenever the
`COMEDI_DEVCONFIG` ioctl call is successful.
Signed-off-by: Ian Abbott
Cc: stable@vger.kernel.org
---
@Greg: This was originally sent on 4th December. It clashes with
Hartley's "[PATCH 04/2
On 2013-01-03 12:15, Ian Abbott wrote:
The 'ni_at_a2150' module links to `cfc_write_to_buffer` in the
'comedi_fc' module, so selecting 'COMEDI_NI_AT_A2150' in the kernel config
needs to also select 'COMEDI_FC'.
Signed-off-by: Ian Abbott
Cc: # 3.6+
ecome_nonbusy()` in "comedi_fops.c" but a previously scheduled
`waveform_ai_interrupt()` timer function will dereference that pointer
regardless, leading to the oops.
Fix it by replacing the `del_timer()` call in `waveform_ai_cancel()`
with `del_timer_sync()`.
Signed-off-by: Ian Abbott
Rep
On 2013/01/07 11:35 PM, Greg Kroah-Hartman wrote:
> On Mon, Jan 07, 2013 at 05:34:28PM -0600, H Hartley Sweeten wrote:
>> On Monday, January 07, 2013 4:23 PM, Greg Kroah-Hartman wrote:
>>> On Wed, Jan 02, 2013 at 04:21:23PM +, Ian Abbott wrote:
>>>> When
l with so use a local, simpler
initialization function.
Signed-off-by: Ian Abbott
Cc: # 3.10.y, 3.11.y, 3.12.y, 3.13.y, 3.14.y
---
Needs backporting for kernels 3.7.y to 3.9.y if any distros are
maintaining them.
---
drivers/staging/comedi/drivers/8255_pci.c | 34 +++
to use the fact that the
PCI BAR 2 region will have non-zero length only on the newer design, so
use that fact to distinguish them.
Signed-off-by: Ian Abbott
Cc: kernel-t...@lists.ubuntu.com
---
drivers/staging/comedi/drivers/8255_pci.c | 20 +---
1 file changed, 17 insertions(
of `struct
pcidio_board` redundant. The `pcicontroler_badrindex` member is also
unused, so remove both members.
Signed-off-by: Ian Abbott
Cc: kernel-t...@lists.ubuntu.com
---
Applies to 3.4.y and 3.5.y (Ubuntu Extended Stable).
Note that other changes make this patch somewhat different to the
upstr
of `struct
pcidio_board` redundant. The `pcicontroler_badrindex` member is also
unused, so remove both members.
Signed-off-by: Ian Abbott
Cc: kernel-t...@lists.ubuntu.com
---
Applies to stable kernels 2.6.32.y through to 3.2.y.
Note that other changes make this patch somewhat different to the
upstr
wed-by: Ian Abbott
Signed-off-by: Greg Kroah-Hartman
---
Applies to stable kernels 3.7.y to 3.12.y inclusive.
Not needed for kernels prior to 3.7.y
---
drivers/staging/comedi/drivers/adl_pci9111.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/comedi/d
On 2014-01-21 13:21, Ian Abbott wrote:
From: H Hartley Sweeten
commit 48108fe3daa0d142f9b97178fdb23704ea3a407b upstream
The dev->irq passed to request_irq() will always be 0 when the auto_attach
function is called. The pcidev->irq should be used instead to get the correct
irq number.
From: H Hartley Sweeten
commit 90daf69a7a3f1d1a41018c799968a0bb896d65e0 upstream
The SDF_CMD_READ should be one of the s->subdev_flags not part of
the s->type.
Signed-off-by: H Hartley Sweeten
Reviewed-by: Ian Abbott
Signed-off-by: Greg Kroah-Hartman
---
Applies to stable kernels 3.
ULL and checking this in do_become_nonbusy prevents the oops.
[Ian Abbott] Also do the same for the chanlist allocated in
do_cmdtest_ioctl().
Signed-off-by: Bernd Porr
Signed-off-by: Ian Abbott
Signed-off-by: Greg Kroah-Hartman
---
drivers/staging/comedi/comedi_fops.c | 2 ++
1 file changed
d, 4 insertions(+), 4 deletions(-)
Reviewed-by: Ian Abbott
--
-=( Ian Abbott @ MEV Ltd.E-mail: )=-
-=( Web: http://www.mev.co.uk/ )=-
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majord...@vger.kernel.o
Abbott
--
-=( Ian Abbott @ MEV Ltd.E-mail: )=-
-=( Web: http://www.mev.co.uk/ )=-
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On 10/10/14 20:34, Bernd Porr wrote:
I've updated my contact details and removed obsolete comments.
Signed-off-by: Bernd Porr
---
drivers/staging/comedi/drivers/usbdux.c | 59 -
1 file changed, 28 insertions(+), 31 deletions(-)
Reviewed-by: Ian A
As a follow-up to commit 6cab7a37f5c04 ("staging: comedi: (regression)
channel list must be set for COMEDI_CMD ioctl"), Hartley Sweeten pointed
out another couple of bugs stemming from commit 6cab7a37f5c04 ("staging:
comedi: comedi_fops: introduce __comedi_get_user_chanlist()").
Firstly, `do_cmdte
On 20/10/14 22:38, Hartley Sweeten wrote:
On Monday, October 20, 2014 7:11 AM, Ian Abbott wrote:
As a follow-up to commit 6cab7a37f5c04 ("staging: comedi: (regression)
channel list must be set for COMEDI_CMD ioctl"), Hartley Sweeten pointed
out another couple of bugs stemming f
; m->nr_pages)` will be false (due to promotion of `rc` to a
large `unsigned int`) and the code will continue on to call
`genwqe_map_pages()` with an invalid list of page pointers. Fix it by
bailing out if `get_user_pages_fast()` returns a negative error value.
Signed-off-by: Ian Abbott
Cc:
I got a patch from the original author, Fred Brooks, to add a small
settling delay after setting the AI channel multiplexor. The lack of
delay resulted in unstable or scrambled data on faster processors.
Signed-off-by: Ian Abbott
Reported-by: Fred Brooks
Cc: # 3.7.x - 3.15.x
---
drivers
the bug via an initial patch sent
privately.
Fixes: c6cd0eefb27b ("staging: comedi: comedi_fops: introduce
__comedi_get_user_chanlist()")
Reported-by: Bernd Porr
Signed-off-by: Ian Abbott
Cc: Bernd Porr
Cc: # 3.15.y 3.16.y 3.17.y
---
drivers/staging/comedi/comedi_fops.c | 15 +++--
On 09/10/14 00:13, Hartley Sweeten wrote:
On Wednesday, October 08, 2014 8:09 AM, Ian Abbott wrote:
`do_cmd_ioctl()`, the handler for the `COMEDI_CMD` ioctl can incorrectly
call the Comedi subdevice's `do_cmd()` handler with a NULL channel list
pointer. This is a regression as the `d
ncremented and a pointer to it is returned. The
comedi subdevice's spin-lock is used to protect the checks. Also use
the spin-lock in `__comedi_buf_alloc()` and `__comedi_buf_free()` to
protect changes to the subdevice's buffer map structure pointer and the
buffer map structure'
last check.
Reported-by: coverity (CID 1271132)
Signed-off-by: H Hartley Sweeten
Reviewed-by: Ian Abbott
Cc: stable
Signed-off-by: Greg Kroah-Hartman
diff --git a/drivers/staging/comedi/drivers/comedi_isadma.c
b/drivers/staging/comedi/drivers/comedi_isadma.c
index dbdea71d6b95..e856f01ca077 1
ays enable
PCI171x_PARANOIDCHECK code")
Signed-off-by: Ian Abbott
---
Sorry, the original upstream commit didn't apply!
---
drivers/staging/comedi/drivers/adv_pci1710.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/comedi/drivers/adv_pci1710.c
b/drivers/st
ed tx buffer before it reaches an
invalid user memory address. Fix it by checking that neither the total
nor the individual transfer lengths exceed the maximum allowed value.
Thanks to Dan Carpenter for reporting the potential integer overflow.
Signed-off-by: Ian Abbott
Cc: # 4.0+
---
This cou
On 23/03/15 18:50, Mark Brown wrote:
On Mon, Mar 23, 2015 at 05:50:27PM +, Ian Abbott wrote:
Signed-off-by: Ian Abbott
Cc: # 4.0+
This doesn't apply against Linus' tree as far as I can tell - if you
think this needs to go to stable please send a version that applies
ag
`ai_range_bits_6xxx()` to use a look-up table pointed to by new
member `ai_range_codes` of `struct pcidas64_board` to map the comedi
range table indices to the hardware range codes. Use a new comedi range
table for the PCI-DAS64/Mx/16 boards (and the commented out variants).
Signed-off-by: Ian
On 02/12/14 12:59, Frank Haverkamp wrote:
Hi Ian,
thanks for reviewing our code and sorry for not answering immediately.
Am Donnerstag, den 06.11.2014, 16:23 + schrieb Ian Abbott:
`genwqe_user_vmap()` calls `get_user_pages_fast()` and if the return
value is less than the number of pages
uxsigma: tidy up analog input
command support)
Signed-off-by: Ian Abbott
Cc: # 3.19 onwards
---
drivers/staging/comedi/drivers/usbduxsigma.c | 37
1 file changed, 16 insertions(+), 21 deletions(-)
diff --git a/drivers/staging/comedi/drivers/usbduxsigma.c
b/drivers/stag
being used, although currently only "scan" timing is
supported.
Fixes: fb1ef622e7a3 ("staging: comedi: usbduxsigma: tidy up analog output
command support")
Signed-off-by: Ian Abbott
Cc: # 3.19 onwards
---
drivers/staging/comedi/drivers/usbduxsigma.c | 33 ---
On 22/09/15 22:48, Luis Henriques wrote:
On Tue, Sep 22, 2015 at 09:29:14PM +0200, Jiri Slaby wrote:
On 09/22/2015, 08:47 PM, Luis Henriques wrote:
On Wed, Sep 16, 2015 at 09:38:12PM +0200, Jiri Slaby wrote:
From: Ian Abbott
This patch has been added to the 3.12 stable tree. If you have any
the user manual says it should do.
Fixes: 8f567c373c4b ("staging: comedi: new adl_pci7x3x driver")
Signed-off-by: Ian Abbott
Cc: # 3.13+, needs backporting for 3.7 to 3.12
---
drivers/staging/comedi/drivers/adl_pci7x3x.c | 16 ++--
1 file changed, 14 insertions(+), 2 deletions
both for what the board actually does and
for what the user manual says it should do.
Fixes: 8f567c373c4b ("staging: comedi: new adl_pci7x3x driver")
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/drivers/adl_pci7x3x.c | 15 +--
1 file changed, 13 insertions(+), 2 deleti
dv_pci1710: always enable
PCI171x_PARANOIDCHECK code")
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/drivers/adv_pci1710.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/comedi/drivers/adv_pci1710.c
b/drivers/staging/comedi/drivers/adv_pci1710.
On 16/09/15 11:37, Ian Abbott wrote:
commit abe46b8932dd9a6dfc3698e3eb121809b7b9ed28 upstream
Reading of analog input channels by the `INSN_READ` comedi instruction
is broken for all except channel 0. `pci171x_insn_read_ai()` calls
`pci171x_ai_dropout()` with the wrong value for the third
log input
command support)
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/drivers/usbduxsigma.c | 53 +---
1 file changed, 24 insertions(+), 29 deletions(-)
diff --git a/drivers/staging/comedi/drivers/usbduxsigma.c
b/drivers/staging/comedi/drivers/usbduxsigma.c
in
though currently only "scan" timing is
supported.
Fixes: fb1ef622e7a3 ("staging: comedi: usbduxsigma: tidy up analog output
command support")
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/drivers/usbduxsigma.c | 46
1 file changed, 20 inserti
g: comedi: usbduxsigma: tidy up analog input
command support)
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/drivers/usbduxsigma.c | 58 +---
1 file changed, 27 insertions(+), 31 deletions(-)
diff --git a/drivers/staging/comedi/drivers/usbduxsigma.c
b/drivers/stagin
vert"
timing is being used, although currently only "scan" timing is
supported.
Fixes: fb1ef622e7a3 ("staging: comedi: usbduxsigma: tidy up analog output
command support")
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/drivers/usbduxsigma.c | 41 ---
o user-space, which is
at odds with the way the regular `COMEDI_CMD` ioctl is handled. To fix
it, change `compat_cmd()` to copy a 32-bit compatible version of the
`struct comedi_cmd` back to user-space when the main ioctl handler
returns `-EAGAIN`.
Signed-off-by: Ian Abbott
Cc:
---
drivers/staging
On 27/01/15 15:50, Ian Abbott wrote:
`do_cmd_ioctl()` in "comedi_fops.c" handles the `COMEDI_CMD` ioctl.
This returns `-EAGAIN` if it has copied a modified `struct comedi_cmd`
back to user-space. (This occurs when the low-level Comedi driver's
`do_cmdtest()` handler returns non-z
On 27/01/15 17:20, Hartley Sweeten wrote:
On Tuesday, January 27, 2015 8:59 AM, Ian Abbott wrote:
On 27/01/15 15:50, Ian Abbott wrote:
`do_cmd_ioctl()` in "comedi_fops.c" handles the `COMEDI_CMD` ioctl.
This returns `-EAGAIN` if it has copied a modified `struct comedi_cmd`
back to
o user-space, which is
at odds with the way the regular `COMEDI_CMD` ioctl is handled. To fix
it, change `compat_cmd()` to copy a 32-bit compatible version of the
`struct comedi_cmd` back to user-space when the main ioctl handler
returns `-EAGAIN`.
Signed-off-by: Ian Abbott
Cc:
---
v2: keep exist
boards (and the commented out variants).
Signed-off-by: Ian Abbott
Signed-off-by: Greg Kroah-Hartman
---
Note: The upstream patch has previously been Cc'd to stable for 3.18.y
but it also applies to 3.19.y.
---
drivers/staging/comedi/drivers/cb_pcidas64.c | 122 ---
1
boards (and the commented out variants).
Signed-off-by: Ian Abbott
Signed-off-by: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas64.c | 122 ---
1 file changed, 75 insertions(+), 47 deletions(-)
diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c
b
boards (and the commented out variants).
Signed-off-by: Ian Abbott
Signed-off-by: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas64.c | 122 ---
1 file changed, 75 insertions(+), 47 deletions(-)
diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c
b
boards (and the commented out variants).
Signed-off-by: Ian Abbott
Signed-off-by: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas64.c | 122 ---
1 file changed, 75 insertions(+), 47 deletions(-)
diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c
b
boards (and the commented out variants).
Signed-off-by: Ian Abbott
Signed-off-by: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas64.c | 123 ---
1 file changed, 75 insertions(+), 48 deletions(-)
diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c
b
n Carpenter for reporting the potential integer overflow.
Signed-off-by: Ian Abbott
---
Note: original commit compares the lengths to INT_MAX instead of bufsiz
due to changes in earlier commits.
---
drivers/spi/spidev.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers
are registers can be accessed. It also implies the
comedi device private data pointer is valid, so there is no need to
check it.
Signed-off-by: Ian Abbott
---
This patch is for the stable 3.4 kernel.
---
drivers/staging/comedi/drivers/amplc_pc236.c | 2 +-
1 file changed, 1 insertion(+), 1 delet
are registers can be accessed. It also implies the
comedi device private data pointer is valid, so there is no need to
check it.
Signed-off-by: Ian Abbott
---
This patch is for the stable 3.0 kernel.
---
drivers/staging/comedi/drivers/amplc_pc236.c | 2 +-
1 file changed, 1 insertion(+), 1 delet
to Stephen N Chivers for discovering the bug and suggesting the
fix.
Cc: # 3.5.x
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/drivers.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c
index
On 2012-08-14 13:04, Dan Carpenter wrote:
On Tue, Aug 14, 2012 at 11:29:17AM +0100, Ian Abbott wrote:
Commit 3902a370281d2f2b130f141e8cf94eab40125769 by yours truly
Please give a human readable patch title as well.
Sorry. It's:
staging: comedi: refactor comedi_device_attach() a bit
a
Don't zero out bits 15..12 of the data value in `das08jr_ao_winsn()` as
that knobbles the upper three-quarters of the output range for the
'das08jr-16-ao' board.
Cc:
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/drivers/das08.c | 2 +-
1 file changed, 1 insertion(+), 1 de
er at offset 0 seems incorrect in
the user manual "cio-das08jr-16-ao.pdf" as it implies that the AI
resolution is only 12 bits. The diagrams of the A/D LSB and MSB
registers show 15 data bits and a sign bit, which matches what the
software expects for the `das08_encode16` AI encoding method.
gned-off-by: Ian Abbott
---
drivers/staging/comedi/comedi_fops.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/comedi/comedi_fops.c
b/drivers/staging/comedi/comedi_fops.c
index 55722b3..b266cb2 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/sta
e_nonbusy()` instead of `do_cmd_ioctl()` and clear the
pointer to prevent it being freed more than once.
Note that `cleanup_device()` could be called at an inappropriate time
while the comedi device is open, but that's a separate bug not related
to this this patch.
Cc: stable@vger.kernel.org
Signed-off-
`s626_enc_insn_config()` is incorrectly dereferencing `insn->data` which
is a pointer to user memory. It should be dereferencing the separate
`data` parameter that points to a copy of the data in kernel memory.
Cc: stable@vger.kernel.org
Signed-off-by: Ian Abbott
---
drivers/staging/com
Correct a direct dereference of I/O memory to use an appropriate I/O
memory access function. Note that the pointer being dereferenced is not
currently tagged with `__iomem` but I plan to correct that for 3.7.
Cc: stable@vger.kernel.org
Signed-off-by: Ian Abbott
---
drivers/staging/comedi
95 matches
Mail list logo