]> git.baikalelectronics.ru Git - kernel.git/commit
s390/qdio: simplify SBAL range calculation
authorJulian Wiedmann <jwi@linux.ibm.com>
Thu, 28 Mar 2019 09:43:46 +0000 (10:43 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 10 Apr 2019 15:47:25 +0000 (17:47 +0200)
commit330c2d6618e7b772861f98d69c8a69c1585e27e3
tree566a4e829338583e5b3109bf9670af4f5e472958
parent2cbd43ba97764a15df20d2f417c8e281c3bad9d5
s390/qdio: simplify SBAL range calculation

When passing a range of ready-to-process SBALs to the upper-layer
driver, use the available 'count' instead of calculating the distance
between the first_to_check and first_to_kick cursors.

This simplifies the logic of the queue-scan path, and opens up the
possibility of scanning all 128 SBALs in one go (as determining the
reported count no longer requires wrap-around safe arithmetic on the
queue's cursors).

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Reviewed-by: Jens Remus <jremus@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/cio/qdio_main.c