If a deferred CC happens there will be lots of messages, because the retry is
done immediatly in the interrupt handler which can be too fast. To avoid this
requeue the request and schedule the queue to be processed.
Signed-off-by: Stefan Bader <shbader@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/*
* If the condition code is not zero and the start function bit is
* still set, this is an deferred error and the last start I/O did
/*
* If the condition code is not zero and the start function bit is
* still set, this is an deferred error and the last start I/O did
- * not succeed. Restart the request now.
+ * not succeed. At this point the condition that caused the deferred
+ * error might still apply. So we just schedule the request to be
+ * started later.
*/
if (irb->scsw.cc != 0 && (irb->scsw.fctl & SCSW_FCTL_START_FUNC)) {
PRINT_WARN("(%s): deferred cc=%i. restaring\n",
cdev->dev.bus_id,
irb->scsw.cc);
*/
if (irb->scsw.cc != 0 && (irb->scsw.fctl & SCSW_FCTL_START_FUNC)) {
PRINT_WARN("(%s): deferred cc=%i. restaring\n",
cdev->dev.bus_id,
irb->scsw.cc);
- rc = __tape_start_io(device, request);
- if (rc)
- __tape_end_request(device, request, rc);
+ request->status = TAPE_REQUEST_QUEUED;
+ schedule_work(&device->tape_dnr);