linux/drivers/staging/comedi
Ian Abbott 951348b377 staging: comedi: vmk80xx: wait for URBs to complete
For Velleman K8055 (aka VM110), `vmk80xx_read_packet()` and
`vmk8055_write_packet()` send an URB asynchronously and do not wait for
it complete.  However, callers of `vmk80xx_read_packet()` are assuming
the contents of the data buffer `devpriv->usb_rx_buf` are valid
immediately after that function returns.

For Velleman K8061 (aka VM140), `vmk80xx_read_packet()` and
`vmk80xx_write_packet()` punt the requests to `vmk80xx_do_bulk_msg()`
which *does* wait for the URBs to complete (albeit with no error
checking!).

Change `vmk80xx_read_packet()` and `vmk80xx_write_packet()` to use
`usb_interrupt_msg()` for the K8055, so the callers of
`vmk80xx_read_packet()` can assume the data buffer contents are valid
(if no error occurred).  Remove all the code for checking for transfers
in progress and busy waiting, as it's no longer needed.  Pretty much all
the callers of `vmk80xx_read_packet()` and `vmk80xx_write_packet()` hold
the same semaphore anyway, and the only caller that doesn't
(`vmk80xx_reset_device()` called during initialization of the device)
doesn't really matter.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-18 10:53:50 -08:00
..
drivers staging: comedi: vmk80xx: wait for URBs to complete 2013-02-18 10:53:50 -08:00
kcomedilib staging: comedi: use comedi_dev_from_minor() 2013-01-07 14:25:46 -08:00
comedi_buf.c staging: comedi: comedi_buf: remove noise in comedi_buf_read_free() 2013-01-17 16:56:01 -08:00
comedi_compat32.c staging: comedi: Makefile: conditionally compile multi-file core module 2013-01-07 14:51:11 -08:00
comedi_compat32.h staging: comedi: shrink comedi_compat32.h 2012-06-20 12:57:43 -07:00
comedi_fops.c staging: comedi: correct error message in comedi_alloc_subdevice_minor() 2013-02-07 17:17:17 -08:00
comedi_internal.h staging: comedi: remove 'comedi_autoconfig' module parameter 2013-02-05 11:22:08 -08:00
comedi_pci.c staging: comedi: conditionally build in PCI driver support 2013-01-31 10:38:10 +01:00
comedi_pcmcia.c staging: comedi: comedi_pcmcia: allow drivers to use a custom conf_check() 2013-02-05 18:16:19 -08:00
comedi_usb.c staging: comedi: comedi_usb: allow comedi usb drivers to pass a 'context' 2013-02-05 18:07:11 -08:00
comedi.h staging: comedi: deprecate loading firmware with comedi_config 2013-01-17 16:51:46 -08:00
comedidev.h staging: comedi: comedi_pcmcia: allow drivers to use a custom conf_check() 2013-02-05 18:16:19 -08:00
comedilib.h
drivers.c staging: Remove unnecessary OOM messages 2013-02-11 10:10:33 -08:00
Kconfig staging: comedi: das08: split out bus specific code 2013-02-03 17:33:08 -08:00
Makefile staging: comedi: conditionally build in PCMCIA driver support 2013-01-31 10:38:10 +01:00
proc.c staging: comedi: Makefile: conditionally compile multi-file core module 2013-01-07 14:51:11 -08:00
range.c staging: comedi: range: remove subdevice pointer math 2012-09-05 20:06:32 -07:00
TODO