linux-uconsole/drivers/staging
Ian Abbott 09d6b9a9dd staging: comedi: don't consider "unmunged" data when becoming non-busy
If an asynchronous "read" command is no longer running but the subdevice
is still busy, it becomes non-busy once there is no more data available
in the buffer.  Some or all of the data written to the buffer might not
have been "munged" yet, and it cannot be read until it has been munged
by the writer.  However, since the command is no longer running, we
cannot expect any remaining unmunged data to get munged so we should
ignore it.  Call `comedi_buf_read_n_available()` to check the amount of
munged data available to be read, replacing the call to
`comedi_buf_n_bytes_ready()` which checked the amount of written (but
possibly not yet munged) data available to be read.  This affects both
the "read" file operation (done in `comedi_read()`) and the
`COMEDI_BUFINFO` ioctl handling (done in `do_bufinfo_ioctl()`).  (The
latter is used when data is transferred directly through the mmapped
buffer instead of via the "read" file operation.)

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13 10:29:48 -07:00
..
android drivers/staging: make android timed_output.c explicitly non-modular 2015-10-12 21:12:17 -07:00
board
clocking-wizard
comedi staging: comedi: don't consider "unmunged" data when becoming non-busy 2015-10-13 10:29:48 -07:00
dgap staging: dgap: remove unused configuration 2015-10-12 21:09:47 -07:00
dgnc staging: dgnc: simplify a trivial if-return sequence 2015-10-12 21:09:51 -07:00
emxx_udc drivers/staging: make emxx_udc.c explicitly non-modular 2015-10-12 21:12:17 -07:00
fbtft Staging: fbtbt: Replace timespec with ktime_t 2015-10-08 10:50:27 +01:00
fsl-mc staging: fsl-mc: remove references to dev_root 2015-10-04 09:55:45 +01:00
ft1000
fwserial
gdm72xx staging: gdmwm: move variables to right side of comparison test 2015-10-12 20:55:00 -07:00
gdm724x
goldfish
gs_fpgaboot
iio Staging: iio: Remove exceptional & on function name 2015-10-13 10:11:03 -07:00
lustre staging: lustre: add a blank line after function/struct/union/enum declarations 2015-10-13 10:21:10 -07:00
media Staging: media: lirc: Use USB API functions rather than constants 2015-09-30 04:02:58 +02:00
most Staging: most: Remove exceptional & on function name 2015-10-13 10:11:03 -07:00
mt29f_spinand
netlogic
nvec
octeon staging: octeon-ethernet: xaui: use common init 2015-10-12 20:52:39 -07:00
octeon-usb
olpc_dcon Staging: olpc_dcon: Remove braces 2015-10-12 21:09:51 -07:00
panel Staging: panel: Replace NULL comparison. 2015-10-04 09:37:23 +01:00
rdma staging: rdma: hfi1: remove unnecessary out of memory messages 2015-10-12 20:35:21 -07:00
rtl8188eu staging: rtl8188eu: spaces preferred around that + inserted 2015-10-12 20:48:09 -07:00
rtl8192e Staging: rtl8192e: Use kcalloc instead of kzalloc to allocate array 2015-10-12 20:54:14 -07:00
rtl8192u staging: rtl8192u: r8192U_wx: fix negative noise and level values 2015-10-12 20:40:48 -07:00
rtl8712 staging: rtl8712: fix negative level value 2015-10-12 20:43:20 -07:00
rtl8723au Staging: rtl8723au: Use snprintf instead rsprintf 2015-10-13 10:16:23 -07:00
rts5208 Staging: rts5208: Coding style warnings fix for block comments 2015-09-21 09:56:50 -07:00
skein Staging: skein: Remove space after cast 2015-10-12 16:37:26 -07:00
slicoss staging: slicoss: use status in isr 2015-09-18 19:53:51 -07:00
sm750fb staging: sm750fb: Fix the power state error in resume 2015-10-12 20:33:51 -07:00
speakup Merge 4.3-rc5 into staging-next 2015-10-12 10:46:53 -07:00
ste_rmi4
unisys Staging: unisys: visorinput: Remove unused code 2015-10-13 09:51:48 -07:00
vme
vt6655 Staging: vt6655: mac: Remove extra braces 2015-10-12 20:54:14 -07:00
vt6656 staging: vt6656: Remove space before closing brace 2015-10-08 10:50:27 +01:00
wilc1000 Staging: wilc1000: wilc_wlan: Remove unnecessary cast 2015-10-13 10:07:06 -07:00
wlan-ng staging: wlan-ng: prism2sta: replace memcmp with ether_addr_equal 2015-10-04 08:27:48 +01:00
xgifb Staging: xgifb: vb_util: Fixed sparse warning of bit truncation due to cast 2015-10-02 11:36:00 +02:00
Kconfig
Makefile
staging.c