summaryrefslogtreecommitdiffstats
path: root/drivers/s390/char/tape.h
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2011-03-03 17:56:07 +0100
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2011-03-03 17:56:14 +0100
commit0c2bd9b24e73287aa4ee87844c847205e0da8a9b (patch)
tree4e56fae8cb7f8dcbc022771436e573c5c12b94fb /drivers/s390/char/tape.h
parentb652277b09d3d030cb074cc6a98ba80b34244c03 (diff)
downloadop-kernel-dev-0c2bd9b24e73287aa4ee87844c847205e0da8a9b.zip
op-kernel-dev-0c2bd9b24e73287aa4ee87844c847205e0da8a9b.tar.gz
[S390] tape: deadlock on system work queue
The 34xx and 3590 tape driver uses the system work queue to defer work from the interrupt function to process context, e.g. a medium sense after an unsolicited interrupt. The tape commands started by the work handler need to be asynchronous, otherwise a deadlock on the system work queue can occur. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/char/tape.h')
-rw-r--r--drivers/s390/char/tape.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/s390/char/tape.h b/drivers/s390/char/tape.h
index 7a242f0..267b54e 100644
--- a/drivers/s390/char/tape.h
+++ b/drivers/s390/char/tape.h
@@ -280,6 +280,14 @@ tape_do_io_free(struct tape_device *device, struct tape_request *request)
return rc;
}
+static inline void
+tape_do_io_async_free(struct tape_device *device, struct tape_request *request)
+{
+ request->callback = (void *) tape_free_request;
+ request->callback_data = NULL;
+ tape_do_io_async(device, request);
+}
+
extern int tape_oper_handler(int irq, int status);
extern void tape_noper_handler(int irq, int status);
extern int tape_open(struct tape_device *);
OpenPOWER on IntegriCloud