s390/scm_blk: fix request number accounting
authorSebastian Ott <sebott@linux.vnet.ibm.com>
Thu, 28 Feb 2013 11:07:27 +0000 (12:07 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 7 Mar 2013 08:52:20 +0000 (09:52 +0100)
commit8360cb5f389ebd36b708978e0f776a285a2deb5a
treeb7b9a241facfc1097297154ea1bae4ffc4fe12ad
parentf6a70a07079518280022286a1dceb797d12e1edf
s390/scm_blk: fix request number accounting

If a block device driver cannot fetch all requests from the blocklayer
it's in his responsibility to call the request function at a later time.
Normally this would be done after the next irq for the underlying device
is handled. However in situations where we have no outstanding request
we have to schedule the request function for a later time.

This is determined using an internal counter of requests issued to the
hardware.

In some cases where we give a request back to the block layer unhandled
the number of queued requests was not adjusted. Fix this class of
failures by adjusting queued_requests in all functions used to give
a request back to the block layer.

Reviewed-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/block/scm_blk.c