[PATCH v2 00/25] staging: comedi: tidy up async command termination

Ian Abbott abbotti at mev.co.uk
Sun Oct 5 17:58:31 UTC 2014


On 18/09/14 19:35, H Hartley Sweeten wrote:
> The comedi async commands should stop if an error/overflow happens or when
> the end-of-acquisition for the command is detected. Some of the drivers
> do this correctly but many don't.
>
> The comedi_handle_events() function automatically detects the events that
> would terminate a command. If the events are set it calls the subdevice
> (*cancel) operation to stop the command.
>
> Convert the drivers to use comedi_handle_events() instead of
> comedi_event().
> This allows removing the unnecessary cancel in the driver, if present, and
> ensures that all the drivers terminate the commands if necessary.
>
> The only drivers that still use comedi_event() are the usbdux drivers.
> These
> have a "cancel" in the urb completion routines that does not do what the
> (*cancel) does. I'm waiting for a reply from the author to see if this can
> be changed.
>
> This series applies after:
> PATCH 00/11] staging: comedi: move comedi_fc functionality into core
>
> v2: use comedi_handle_events() instead of cfc_handle_events()
>
> H Hartley Sweeten (25):
>   staging: comedi: hwdrv_apci3200: use comedi_handle_events()
>   staging: comedi: addi_apci_1032: use comedi_handle_events()
>   staging: comedi: addi_apci_1564: use comedi_handle_events()
>   staging: comedi: addi_apci_3xxx: use comedi_handle_events()
>   staging: comedi: amplc_pc236_common: use comedi_handle_events()
>   staging: comedi: comedi_parport: use comedi_handle_events()
>   staging: comedi: dmm32at: use comedi_handle_events()
>   staging: comedi: dt2814: use comedi_handle_events()
>   staging: comedi: ni_6527: use comedi_handle_events()
>   staging: comedi: ni_65xx: use comedi_handle_events()
>   staging: comedi: ni_atmio16d: use comedi_handle_events()
>   staging: comedi: pcl726: use comedi_handle_events()
>   staging: comedi: hwdrv_apci3120: use comedi_handle_events()
>   staging: comedi: hwdrv_apci3120: do comedi_handle_events() at end of
> interrupt
>   staging: comedi: addi_apci_2032: use comedi_handle_events()
>   staging: comedi: amplc_dio200_common: use comedi_handle_events()
>   staging: comedi: comedi_test: use comedi_handle_events()
>   staging: comedi: me4000: use comedi_handle_events()
>   staging: comedi: pcl711: use comedi_handle_events()
>   staging: comedi: pcmmio: use comedi_handle_events()
>   staging: comedi: pcmuio: use comedi_handle_events()
>   staging: comedi: s626: use comedi_handle_events()
>   staging: comedi: rtd520: clear FIFO when canceling async command
>   staging: comedi: rtd520: use comedi_handle_events()
>   staging: comedi: amplc_pci230: use comedi_handle_events()
>
> .../comedi/drivers/addi-data/hwdrv_apci3120.c      | 15 +-----
> .../comedi/drivers/addi-data/hwdrv_apci3200.c      |  3 +-
> drivers/staging/comedi/drivers/addi_apci_1032.c    |  2 +-
> drivers/staging/comedi/drivers/addi_apci_1564.c    |  2 +-
> drivers/staging/comedi/drivers/addi_apci_2032.c    |  8 +---
> drivers/staging/comedi/drivers/addi_apci_3xxx.c    |  2 +-
> .../staging/comedi/drivers/amplc_dio200_common.c   | 10 +---
> .../staging/comedi/drivers/amplc_pc236_common.c    |  2 +-
> drivers/staging/comedi/drivers/amplc_pci230.c      | 48 +++++++------------
> drivers/staging/comedi/drivers/comedi_parport.c    |  2 +-
> drivers/staging/comedi/drivers/comedi_test.c       |  7 +--
> drivers/staging/comedi/drivers/dmm32at.c           |  3 +-
> drivers/staging/comedi/drivers/dt2814.c            |  2 +-
> drivers/staging/comedi/drivers/me4000.c            |  3 +-
> drivers/staging/comedi/drivers/ni_6527.c           |  2 +-
> drivers/staging/comedi/drivers/ni_65xx.c           |  2 +-
> drivers/staging/comedi/drivers/ni_atmio16d.c       |  2 +-
> drivers/staging/comedi/drivers/pcl711.c            |  6 +--
> drivers/staging/comedi/drivers/pcl726.c            |  2 +-
> drivers/staging/comedi/drivers/pcmmio.c            | 16 ++-----
> drivers/staging/comedi/drivers/pcmuio.c            | 16 ++-----
> drivers/staging/comedi/drivers/rtd520.c            | 56
> +++-------------------
> drivers/staging/comedi/drivers/s626.c              | 14 +-----
> 23 files changed, 57 insertions(+), 168 deletions(-)
>

Reviewed-by: Ian Abbott <abbotti at mev.co.uk>

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti at mev.co.uk>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-


More information about the devel mailing list