remarkable-linux/drivers/scsi/csiostor
Daniel Wagner 3e3f5a8a0f scsi: csiostor: Fix completion usage
The (re)initializing of the completion object should be done before we
trigger the transfer. Doing this after triggering the hardware opens up
a race window. Without the timeout we would problaly even deadlock. Use
also reinit_completion because we initalize the whole data structure in
csio_scscim_init().

There is only one waiter for the completion, therefore there is no need
to use complete_all(). Let's make that clear by using complete() instead
of complete_all().

The usage pattern of the completion is:

waiter context                          waker context

csio_eh_abort_handler()
  reinit_completion()
  wait_for_completion_timeout()

                                        csio_scsi_err_handler()
                                          complete()

[mkp: fix typo]

Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2016-09-14 13:19:15 -04:00
..
csio_attr.c
csio_defs.h
csio_hw.c csiostor: fix an error code in csio_hw_init() 2015-05-25 08:46:26 -07:00
csio_hw.h csiostor:T5 Firmware fix and cleanup. 2015-01-27 17:17:31 -08:00
csio_hw_chip.h csiostor:Use firmware version from cxgb4/t4fw_version.h 2015-02-04 14:00:30 -08:00
csio_hw_t5.c
csio_init.c cxgb4/cxgb4vf/csiostor: Make PCI Device ID Tables be "const" 2015-03-19 15:30:21 -04:00
csio_init.h
csio_isr.c
csio_lnode.c
csio_lnode.h
csio_mb.c csiostor:Use firmware version from cxgb4/t4fw_version.h 2015-02-04 14:00:30 -08:00
csio_mb.h
csio_rnode.c
csio_rnode.h
csio_scsi.c scsi: csiostor: Fix completion usage 2016-09-14 13:19:15 -04:00
csio_scsi.h
csio_wr.c csiostor:Remove T4 FCoE Support. 2015-01-19 15:30:02 -05:00
csio_wr.h
Kconfig
Makefile csiostor:Removed file csio_hw_t4.c 2015-01-19 15:30:02 -05:00
t4fw_api_stor.h