mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* staging: comedi: COMEDI_BUFINFO: some behavioural changes
@ 2016-02-19 16:13 Ian Abbott
  2016-02-19 16:13 ` [PATCH 1/8] staging: comedi: COMEDI_BUFINFO: get amount freed, not amount allocated Ian Abbott
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Ian Abbott @ 2016-02-19 16:13 UTC (permalink / raw)
  To: devel; +Cc: Greg Kroah-Hartman, Ian Abbott, H Hartley Sweeten, linux-kernel

These patches change the behavior of the `COMEDI_BUFINFO` ioctl, which
is used to manage buffer positions for a previously set up asynchronous
acquisition command.  It is used instead of the read and write file
operations when the buffer has been mmapped.

Patches 1 to 4 are fairly innocuous.  Patches 5 to 8 change the error
handling when the asynchronous command is no longer running, allow the
subdevice to become "non-busy" automatically in more cases (causing
subsequent calls to return `-EINVAL`), and report abnormal command
termination with return value `-EPIPE` (which also makes the subdevice
become non-busy).

1) staging: comedi: COMEDI_BUFINFO: get amount freed, not amount
   allocated
2) staging: comedi: COMEDI_BUFINFO: force bytes_read or bytes_written to
   0
3) staging: comedi: COMEDI_BUFINFO: update buffer before becoming
   non-busy
4) staging: comedi: COMEDI_BUFINFO: force bytes_written to 0 if stopped
5) staging: comedi: COMEDI_BUFINFO: return error if no active command
6) staging: comedi: COMEDI_BUFINFO: become non-busy even if bytes_read
   is 0
7) staging: comedi: COMEDI_BUFINFO: return -EPIPE for abnormal read
8) staging: comedi: COMEDI_BUFINFO: terminate "write" command when
   stopped

 drivers/staging/comedi/comedi_fops.c | 84 +++++++++++++++++++-----------------
 1 file changed, 44 insertions(+), 40 deletions(-)

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-02-19 16:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-19 16:13 staging: comedi: COMEDI_BUFINFO: some behavioural changes Ian Abbott
2016-02-19 16:13 ` [PATCH 1/8] staging: comedi: COMEDI_BUFINFO: get amount freed, not amount allocated Ian Abbott
2016-02-19 16:13 ` [PATCH 2/8] staging: comedi: COMEDI_BUFINFO: force bytes_read or bytes_written to 0 Ian Abbott
2016-02-19 16:13 ` [PATCH 3/8] staging: comedi: COMEDI_BUFINFO: update buffer before becoming non-busy Ian Abbott
2016-02-19 16:13 ` [PATCH 4/8] staging: comedi: COMEDI_BUFINFO: force bytes_written to 0 if stopped Ian Abbott
2016-02-19 16:13 ` [PATCH 5/8] staging: comedi: COMEDI_BUFINFO: return error if no active command Ian Abbott
2016-02-19 16:13 ` [PATCH 6/8] staging: comedi: COMEDI_BUFINFO: become non-busy even if bytes_read is 0 Ian Abbott
2016-02-19 16:13 ` [PATCH 7/8] staging: comedi: COMEDI_BUFINFO: return -EPIPE for abnormal read Ian Abbott
2016-02-19 16:13 ` [PATCH 8/8] staging: comedi: COMEDI_BUFINFO: terminate "write" command when stopped Ian Abbott
2016-02-19 16:19 ` staging: comedi: COMEDI_BUFINFO: some behavioural changes Ian Abbott

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®