core: improve abort and data_done mechanism
The helper zio_trigger_abort() is introduced; it can be used to abort a data transfer. The bit flag ZTI_COMPLETING is introduced: if high ZIO is completing the transfert operation by invokng the data_done() function; if low the transfer is running or the trigger is waiting for event. If abort() is called when this glag is high, the functions does nothing. The helper zio_trigger_data_done() is introduced; insted of call the data_done() function with cset->ti->t_op->data_done() and manually set the ZTI_COMPLETING flag, this hellper must be used. If the trigger operation data_done is not set, then use the __zio_internal_data_done Signed-off-by:Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
Showing
- drivers/zio-ad788x.c 1 addition, 1 deletiondrivers/zio-ad788x.c
- include/linux/zio-trigger.h 1 addition, 0 deletionsinclude/linux/zio-trigger.h
- include/linux/zio.h 3 additions, 0 deletionsinclude/linux/zio.h
- triggers/zio-trig-irq.c 0 additions, 1 deletiontriggers/zio-trig-irq.c
- triggers/zio-trig-timer.c 0 additions, 1 deletiontriggers/zio-trig-timer.c
- triggers/zio-trig-user.c 0 additions, 1 deletiontriggers/zio-trig-user.c
- zio-sys.c 69 additions, 16 deletionszio-sys.c
Please register or sign in to comment