[PATCH 00/49] staging: comedi: start cleaning up the async commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Async commands are passed from user space to the drivers by the comedi core.
The triggers and arguments for the command is passed in a struct comedi_cmd
that is initially validated by the core then validated by the drivers in the
subdevice (*do_cmdtest) function. If the validation succeeds, the command is
then executed by the subdevice (*do_cmd) function.

Start cleaning by the async commands by:

  1. have the core validate the cmd->chanlist_len (min/max)
  2. validate the cmd->scan_end_arg in all drivers
  3. tidy up step 5 of the (*do_cmdtest) in all drivers
  4. validate the cmd->start_arg in all drivers
  5. remove some unnecessat step 2b validation
  6. cleanup the pacer timer code in the amplc_pci224 driver

H Hartley Sweeten (49):
  staging: comedi: drivers: core validates chanlist_len max
  staging: comedi: have core check cmd->chanlist_len min
  staging: comedi: drivers: properly validate cmd->scan_end_arg
  staging: comedi: addi_apci_3xxx: fix ai subdevice 'len_chanlist'
  staging: comedi: adl_pci9111: factor out step 5 of (*do_cmdtest)
  staging: comedi: amplc_pci224: factor out step 5 of (*do_cmdtest)
  staging: comedi: amplc_pci230: factor out step 5 of (*do_cmdtest)
  staging: comedi: cb_pcidas: factor out step 5 of (*do_cmdtest)
  staging: comedi: cb_pcidas64: factor out step 5 of (*do_cmdtest)
  staging: comedi: das16: factor out step 5 of (*do_cmdtest)
  staging: comedi: das16m1: factor out step 5 of (*do_cmdtest)
  staging: comedi: das1800: factor out step 5 of (*do_cmdtest)
  staging: comedi: das800: factor out step 5 of (*do_cmdtest)
  staging: comedi: dmm32at: factor out step 5 of (*do_cmdtest)
  staging: comedi: gsc_hpdi: factor out step 5 of (*do_cmdtest)
  staging: comedi: me4000: cleanup ai_check_chanlist()
  staging: comedi: ni_at_a2150: factor out step 5 of (*do_cmdtest)
  staging: comedi: ni_labpc: cleanup labpc_ai_chanlist_invalid()
  staging: comedi: ni_mio_common: factor out step 5 of (*do_cmdtest)
  staging: comedi: adl_pci9111: rename local var in pci9111_ai_do_cmd_test()
  staging: comedi: comedi_test: ao subdevice does not support async commands
  staging: comedi: hwdrv_apci3200: properly validata the ai cmd->start_arg
  staging: comedi: adl_pci9118: fix the ai cmd->start_arg validation and use
  staging: comedi: amplc_dio200_common: fix the cmd->start_arg use
  staging: comedi: amplc_pci224: fix the ao cmd->start_arg use
  staging: comedi: amplc_pci230: fix the ai/ao cmd->start_arg use for TRIG_INT
  staging: comedi: cb_pcidas: clarify the ai cmd->start_arg validation
  staging: comedi: cb_pcidas: fix the ao cmd->start_arg use for TRIG_INT
  staging: comedi: cb_pcidas64: validate the ai/ao cmd->start_arg
  staging: comedi: dt282x: fix the ao cmd->start_arg use for TRIG_INT
  staging: comedi: gsc_hpdi: validate the cmd->start_arg
  staging: comedi: me4000: validate the cmd->start_arg
  staging: comedi: ni_pcidio: fix the cmd->start_arg use for TRIG_INT
  staging: comedi: ni_tiocmd: clarify the cmd->start_arg validation and use
  staging: comedi: ni_labpc: clarify the cmd->start_arg validation
  staging: comedi: pcmmio: fix the cmd->start_arg use for TRIG_INT
  staging: comedi: pcmuio: fix the cmd->start_arg use for TRIG_INT
  staging: comedi: s626: clarify the cmd->start_arg validation and use
  staging: comedi: usbduxsigma: fix the ai/ao cmd->start_arg use for TRIG_INT
  staging: comedi: usbduxfast: fix the cmd->start_arg validation and use
  staging: comedi: usbdux: fix the cmd->start_arg use
  staging: comedi: ni_mio_common: clarify the cmd->start_arg validation and use
  staging: comedi: adl_pci911: clarify Step 2b of the (*do_cmdtest)
  staging: comedi: cb_pcidas64: remove unnecessary Step 2b test in (*do_cmdtest)
  staging: comedi: me4000: remove unnecessary Step 2b test in (*do_cmdtest)
  staging: comedi: amplc_pci224: remove pci224_cascade_ns_to_timer()
  staging: comedi: amplc_pci224: factor out the 'start pacer' code
  staging: comedi: amplc_pci224: always cascade the 8254 timers
  staging: comedi: amplc_pci224: only calc the pacer divisors once

 drivers/staging/comedi/comedi_fops.c               |  31 +-
 drivers/staging/comedi/drivers/8255.c              |   3 +-
 .../comedi/drivers/addi-data/hwdrv_apci3120.c      |   5 +-
 .../comedi/drivers/addi-data/hwdrv_apci3200.c      |  43 ++-
 drivers/staging/comedi/drivers/addi_apci_1032.c    |   3 +-
 drivers/staging/comedi/drivers/addi_apci_3xxx.c    |  40 ++-
 drivers/staging/comedi/drivers/adl_pci9111.c       | 130 ++++-----
 drivers/staging/comedi/drivers/adl_pci9118.c       |  24 +-
 .../staging/comedi/drivers/amplc_dio200_common.c   |  27 +-
 drivers/staging/comedi/drivers/amplc_pc236.c       |   3 +-
 drivers/staging/comedi/drivers/amplc_pci224.c      | 264 +++++------------
 drivers/staging/comedi/drivers/amplc_pci230.c      | 320 +++++++++------------
 drivers/staging/comedi/drivers/cb_pcidas.c         |  87 +++---
 drivers/staging/comedi/drivers/cb_pcidas64.c       | 127 ++++----
 drivers/staging/comedi/drivers/comedi_parport.c    |   3 +-
 drivers/staging/comedi/drivers/comedi_test.c       |   5 -
 drivers/staging/comedi/drivers/das16.c             |  50 ++--
 drivers/staging/comedi/drivers/das16m1.c           |  48 ++--
 drivers/staging/comedi/drivers/das1800.c           |  38 +--
 drivers/staging/comedi/drivers/das800.c            |  52 ++--
 drivers/staging/comedi/drivers/dmm32at.c           |  51 ++--
 drivers/staging/comedi/drivers/dt282x.c            |   8 +-
 drivers/staging/comedi/drivers/gsc_hpdi.c          |  37 ++-
 drivers/staging/comedi/drivers/me4000.c            | 131 +++------
 drivers/staging/comedi/drivers/ni_6527.c           |   3 +-
 drivers/staging/comedi/drivers/ni_65xx.c           |   3 +-
 drivers/staging/comedi/drivers/ni_at_a2150.c       |  72 +++--
 drivers/staging/comedi/drivers/ni_labpc.c          | 123 ++++----
 drivers/staging/comedi/drivers/ni_mio_common.c     |  97 ++++---
 drivers/staging/comedi/drivers/ni_pcidio.c         |   6 +-
 drivers/staging/comedi/drivers/ni_tiocmd.c         |  18 +-
 drivers/staging/comedi/drivers/pcl726.c            |   3 +-
 drivers/staging/comedi/drivers/pcl812.c            |   2 -
 drivers/staging/comedi/drivers/pcl816.c            |  10 +-
 drivers/staging/comedi/drivers/pcl818.c            |   9 +-
 drivers/staging/comedi/drivers/pcmmio.c            |  22 +-
 drivers/staging/comedi/drivers/pcmuio.c            |  22 +-
 drivers/staging/comedi/drivers/rtd520.c            |   6 +-
 drivers/staging/comedi/drivers/s626.c              |  19 +-
 drivers/staging/comedi/drivers/usbdux.c            |  22 +-
 drivers/staging/comedi/drivers/usbduxfast.c        |  25 +-
 drivers/staging/comedi/drivers/usbduxsigma.c       |  12 +-
 42 files changed, 972 insertions(+), 1032 deletions(-)

-- 
1.8.5.2

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux