[PATCH] staging: comedi: usbduxsigma: usbduxfast_ai_cmdtest rounding error

2019-11-18 Thread Bernd Porr
odified. In addion the case of steps being 0 wasn't checked which is also now done. Signed-off-by: Bernd Porr --- drivers/staging/comedi/drivers/usbduxfast.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/drivers/staging/comedi/drivers/usbduxfas

[PATCH] staging: comedi: usbduxfast: usbduxfast_ai_cmdtest rounding error

2019-11-18 Thread Bernd Porr
x27;convert_arg' if 'steps' has actually been modified. In addition the case of steps being 0 wasn't checked which is also now done. Signed-off-by: Bernd Porr --- drivers/staging/comedi/drivers/usbduxfast.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletion

Re: [PATCH] staging: comedi: usbdux: bug fix for accessing 'ao_chanlist' in private data

2014-03-31 Thread Bernd Porr
access the 'ao_readback' array in the private data. So instead of accessing the array as 0, 1, 2, 3, it accesses it as 0x00, 0x40, 0x80, 0xc0. Fix this by storing the raw channel number in 'ao_chanlist' and doing the bit-shift when creating the command. Signed-off-by: H Hartley Sweete

Re: [PATCH 2/6] staging: comedi: usbduxsigma: don't clobber ao_timer in command test

2015-07-24 Thread Bernd Porr
Reviewed-by: Bernd Porr Ian Abbott wrote: `devpriv->ao_timer` is used while an asynchronous command is running on the AO subdevice. It also gets modified by the subdevice's `cmdtest` handler for checking new asynchronous commands, `usbduxsigma_ao_cmdtest()`, which is not correct

Re: [PATCH 5/6] staging: comedi: usbduxsigma: remove unused "convert" timing for AO

2015-07-24 Thread Bernd Porr
Reviewed-by: Bernd Porr Ian Abbott wrote: The `cmdtest` and `cmd` handlers for the AO subdevice (`usbduxsigma_ao_cmdtest()` and `usbduxsigma_ao_cmd()`) support "scan" timing of commands with all channels updated every "scan" period. There is some disabled code to use &quo

Re: [PATCH 6/6] staging: comedi: usbduxsigma: round down AO scan_begin_arg at step 4.

2015-07-24 Thread Bernd Porr
Reviewed-by: Bernd Porr Ian Abbott wrote: The return value of the `cmdtest` handler for a subdevice checks the prospective new command in various steps and returns the step number at which any problem was detected, or 0 if no problem was detected. It is allowed to modify the command in

Re: [PATCH 4/6] staging: comedi: usbduxsigma: round down AI scan_begin_arg at step 4.

2015-07-24 Thread Bernd Porr
Reviewed-by: Bernd Porr Ian Abbott wrote: The return value of the `cmdtest` handler for a subdevice checks the prospective new command in various steps and returns the step number at which any problem was detected, or 0 if no problem was detected. It is allowed to modify the command in

Re: [PATCH 3/6] staging: comedi: usbduxsigma: remove AI scan_begin_src == TRIG_FOLLOW

2015-07-24 Thread Bernd Porr
Reviewed-by: Bernd Porr Ian Abbott wrote: The AI subdevice `cmdtest` handler `usbduxsigma_ai_cmdtest()` ensures that `cmd->scan_begin_src == TRIG_TIMER` by the end of step 2 of the command checking code, so assume that this is the case for step 3 onwards and remove the redundant code. Sig

Re: [PATCH 1/6] staging: comedi: usbduxsigma: don't clobber ai_timer in command test

2015-07-24 Thread Bernd Porr
Reviewed-by: Bernd Porr Ian Abbott wrote: `devpriv->ai_timer` is used while an asynchronous command is running on the AI subdevice. It also gets modified by the subdevice's `cmdtest` handler for checking new asynchronous commands (`usbduxsigma_ai_cmdtest()`), which is not correct

Re: [PATCH] staging: comedi: drivers: usbduxsigma: Removed variables that is never used

2015-01-29 Thread Bernd Porr
Indeed. It can be completely removed. I was intending to speed up DIO reads during async acquisition but I decided against it because it would create unpredictable latencies. Thanks Ian for flagging it! /Bernd Ian Abbott wrote: On 28/01/15 22:39, Rickard Strandqvist wrote: Variable ar assig

Re: [PATCH v2] staging: comedi: drivers: usbduxsigma: Removed variables that is never used

2015-01-30 Thread Bernd Porr
allow external trigger */ -dio_state = be32_to_cpu(devpriv->in_buf[0]); - /* get the data from the USB bus and hand it over to comedi */ for (i = 0; i < cmd->chanlist_len; i++) { /* transfer data, note first byte is the DIO state */ Reviewed-by: Ian Ab

staging: comedi: USB devs not working / some comedi core reorganization

2013-12-10 Thread Bernd Porr
Hi all, I've just checked out after a while the newest RC kernel and the usb-auto config/attach is broken. Seems so that the driver specific usb attach is no longer called and no firmware is loaded. Hartly, can you point me to the code bits which should call the driver spcific attach or give

Re: staging: comedi: USB devs not working / some comedi core reorganization

2013-12-10 Thread Bernd Porr
-[ end trace 69c2b5c4559cdf1b ]--- I guess that subdevice no longer exists at this point? /Bernd On 10/12/13 16:31, Hartley Sweeten wrote: On Tuesday, December 10, 2013 4:48 AM, Bernd Porr wrote: I've just checked out after a while the newest RC kernel and the usb-auto config/attach is broken. S

Re: staging: comedi: USB devs not working / some comedi core reorganization

2013-12-10 Thread Bernd Porr
Good point. Nobody cares really how many bytes the firmware uploader sends to the DUX-board. /Bernd On 10/12/13 21:30, Ian Abbott wrote: On 2013-12-10 21:07, Bernd Porr wrote: Date: Tue, 10 Dec 2013 19:42:13 + Subject: [PATCH 1/1] comedi_load_firmware returns the number of transmitted

Re: staging: comedi: USB devs not working / some comedi core reorganization

2013-12-10 Thread Bernd Porr
callback functions that upload the firmware in the comedi drivers return a positive value indicating the number of bytes sent to the device. Detect this condition and just return '0' to indicate a successful upload. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartm

Re: staging: comedi: USB devs not working / some comedi core reorganization

2013-12-10 Thread Bernd Porr
hacked cfc_check_trigger_src: - static inline int cfc_check_trigger_src(unsigned int *src, unsigned int flags) { unsigned int orig_src = *src; *src = orig_src & flags; printk("cfc_check_trigger_src: orig_src=%x, *src=%x \n",orig_src,*sr

Re: staging: comedi: USB devs not working / some comedi core reorganization

2013-12-11 Thread Bernd Porr
ev_err(dev->class_dev, "BUG: (?) do_become_nonbusy called with async=NULL\n"); } s->busy = NULL; } Ian Abbott wrote: On 2013-12-10 21:07, Bernd Porr wrote: Hi all, here is the patch to fix the original bug. That was easier than I expected.

[PATCH] staging: comedi: drivers: fix kernel oops when channel list has invalid pointer

2013-12-11 Thread Bernd Porr
7 University of Glasgow School of Engineering Rankine Building, Oakfield Avenue, Glasgow, G12 8LT >From d83a3e0cda7559e9b91759ab4ef8a6c3eb19fbc0 Mon Sep 17 00:00:00 2001 From: Bernd Porr Date: Wed, 11 Dec 2013 11:45:09 + Subject: [PATCH 1/1] If the cha

Re: staging: comedi: USB devs not working / some comedi core reorganization

2013-12-20 Thread Bernd Porr
ll be fixed by other changes I made to the comedi core recently that aren't in the RC kernel yet. -- http://www.berndporr.me.uk http://www.linux-usb-daq.co.uk http://www.imdb.com/name/nm3293421/ +44 (0)7840 340069 >From 5971245d01f25890826fc05f7bab0d2b8d6bfd63 Mon Sep 17 00:00:00 20

patch to add a success/failure message to comedi autoconfig

2013-12-22 Thread Bernd Porr
own failures in autoconfig would be really tricky. /Bernd -- http://www.berndporr.me.uk http://www.linux-usb-daq.co.uk http://www.imdb.com/name/nm3293421/ +44 (0)7840 340069 >From e516c966fb36a9a8fee3e743ec97d4732cd9285c Mon Sep 17 00:00:00 2001 From: Bernd Porr Date: Sat, 21 Dec 2013 09:52:11 +

Re: patch to add a success/failure message to comedi autoconfig

2013-12-23 Thread Bernd Porr
cember 22, 2013 1:30 PM, Bernd Porr wrote: Hi all, I've added a success / fail message to comedi autoconfig. That's badly needed to see which driver has been associated with which comedi dev in udev. Also, as far as I know an error in the USB probe callback won't cause the ker

[PATCH 2/2] staging: comedi: report success/failure of autoconfig

2013-12-27 Thread Bernd Porr
mix of USB and PCI devices. Signed-off-by: Bernd Porr --- drivers/staging/comedi/drivers.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c index d6dc58a..58c7f23 100644 --- a/drivers

[PATCH 1/2] staging: comedi: fix auto-unconfig kernel error

2013-12-27 Thread Bernd Porr
Signed-off-by: Bernd Porr Merging un-registering of both the subdevices and the main comedi device into one function and the module which actually associated with it. The kernel oops observed before was because the main device was un-registered first and then the subdevices which were then no

Re: [PATCH 1/2] staging: comedi: fix auto-unconfig kernel error

2013-12-28 Thread Bernd Porr
"Signed-off-by" should be after the description. :) How did I manage that? ;) Merging un-registering of both the subdevices and the main comedi device into one function and the module which actually associated with it. The kernel oops observed before was because the main device was un-registe

Re: [PATCH 1/2] staging: comedi: fix auto-unconfig kernel error

2013-12-28 Thread Bernd Porr
commit message. /Bernd Ian Abbott wrote: On 27/12/13 23:49, Bernd Porr wrote: Signed-off-by: Bernd Porr "Signed-off-by" should be after the description. :) Merging un-registering of both the subdevices and the main comedi device into one function and the module which actually asso

[PATCH 2/3] staging: comedi: report success/failure of autoconfig

2013-12-28 Thread Bernd Porr
mix of USB and PCI devices. As Ian suggested we should report both the driver and the board which might have different names, esp if one driver covers a range of different boards. Signed-off-by: Bernd Porr --- drivers/staging/comedi/drivers.c | 19 +-- 1 file changed, 17

[PATCH 3/3] staging: comedi: drivers: streamlined auto attach with main comedi

2013-12-28 Thread Bernd Porr
rted. Signed-off-by: Bernd Porr --- drivers/staging/comedi/drivers/usbduxsigma.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/usbduxsigma.c b/drivers/staging/comedi/drivers/usbduxsigma.c index a5363de..125eae5 100644 --- a/drivers/st

[PATCH 1/3] staging: comedi: fix auto-unconfig kernel error

2013-12-28 Thread Bernd Porr
been also tested with 'comedi_config -r' for both autoconfigured and legacy devices. Signed-off-by: Bernd Porr --- drivers/staging/comedi/comedi_fops.c | 19 +++ drivers/staging/comedi/drivers.c | 18 -- 2 files changed, 19 insertions(+), 18 deletion

Re: staging: comedi: USB devs not working / some comedi core reorganization

2014-01-02 Thread Bernd Porr
Hi Dan, see my re-submission of these patches. I did that properly with the git email this time. Hope that's now all properly formatted. Thanks also for the link. Best, /Bernd Dan Carpenter wrote: On Fri, Dec 20, 2013 at 11:48:31PM +0000, Bernd Porr wrote:

Re: [PATCH 1/3] staging: comedi: fix auto-unconfig kernel error

2014-01-06 Thread Bernd Porr
mote would be the most cutting edge version? Should I just patch against linux-next? /Bernd Ian Abbott wrote: On 2013-12-28 21:31, Bernd Porr wrote: Merging the un-registering of both the subdevices and the main comedi device into one function and the module which actually associated with it.

Re: [PATCH 1/3] staging: comedi: fix auto-unconfig kernel error

2014-01-07 Thread Bernd Porr
Ian Abbott wrote: On 2013-12-28 21:31, Bernd Porr wrote: Merging the un-registering of both the subdevices and the main comedi device into one function and the module which actually associated with it. The kernel oops observed before was because the main device was un-registered first and

Re: [PATCH 1/3] staging: comedi: fix auto-unconfig kernel error

2014-01-07 Thread Bernd Porr
Ian Abbott wrote: On 2014-01-07 10:01, Bernd Porr wrote: Ian Abbott wrote: On 2013-12-28 21:31, Bernd Porr wrote: This doesn't apply to linux-next any more. (For example, cleanup_device() function was renamed amongst other stuff.) I've also fixed a load of stuff related to this

[PATCH 2/3] staging: comedi: usbduxsigma: return failure of auto attach

2014-01-07 Thread Bernd Porr
the auto attachement. The return command also prevents printing out the offset value in case of a fault. Signed-off-by: Bernd Porr --- drivers/staging/comedi/drivers/usbduxsigma.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers

[PATCH v2 1/3] staging: comedi: report success/failure of autoconfig

2014-01-07 Thread Bernd Porr
there is a mix of USB and PCI devices. As Ian suggested we should report both the driver and the board which might have different names, especially if one driver covers a range of different boards. Signed-off-by: Bernd Porr --- drivers/staging/comedi/drivers.c | 20 ++-- 1 file

[PATCH 3/3] staging: comedi: usbduxsigma: removing unneccesay attached info

2014-01-07 Thread Bernd Porr
r for debugging purposes. Signed-off-by: Bernd Porr --- drivers/staging/comedi/drivers/usbduxsigma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/usbduxsigma.c b/drivers/staging/comedi/drivers/usbduxsigma.c index ff521b3..3beeb12 100644 --- a/dr

[PATCH 3/3] staging: comedi: usbduxfast: updated address details

2014-10-10 Thread Bernd Porr
Updated the range of years, e-mail and added driver desription as usually done in comedi. Signed-off-by: Bernd Porr --- drivers/staging/comedi/drivers/usbduxfast.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/usbduxfast.c b

[PATCH 1/3] staging: comedi: usbduxsigma: updated contact details and status

2014-10-10 Thread Bernd Porr
I've updated my contact details of the driver. I've also tested it thoroughly and it works perfectly. I've changed the status to stable. Signed-off-by: Bernd Porr --- drivers/staging/comedi/drivers/usbduxsigma.c | 8 1 file changed, 4 insertions(+), 4 deletions(-

[PATCH 2/3] staging: comedi: usbdux: updated contact details / comments

2014-10-10 Thread Bernd Porr
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(-) diff --git a/drivers/staging/comedi/drivers/usbdux.c b/dr

Re: [PATCH 1/5] staging: comedi: usbdux: introduce usbduxsub_ao_handle_urb()

2014-10-14 Thread Bernd Porr
Sweeten Reviewed-by: Bernd Porr ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 2/5] staging: comedi: usbdux: introduce usbduxsub_ai_handle_urb()

2014-10-14 Thread Bernd Porr
Signed-off-by: H Hartley Sweeten Reviewed-by: Bernd Porr ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 3/5] staging: comedi: usbduxfast: introduce usbduxfast_ai_handle_urb()

2014-10-14 Thread Bernd Porr
Signed-off-by: H Hartley Sweeten Reviewed-by: Bernd Porr ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 5/5] staging: comedi: usbduxsigma: introduce usbduxsigma_ai_handle_urb()

2014-10-14 Thread Bernd Porr
Signed-off-by: H Hartley Sweeten Reviewed-by: Bernd Porr ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 4/5] staging: comedi: usbduxsigma: introduce usbduxsigma_ao_handle_urb()

2014-10-14 Thread Bernd Porr
Signed-off-by: H Hartley Sweeten Reviewed-by: Bernd Porr ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel