linux_dsm_epyc7002/drivers/s390
Julian Wiedmann dae55b6fef s390/qdio: don't retry EQBS after CCQ 96
Immediate retry of EQBS after CCQ 96 means that we potentially misreport
the state of buffers inspected during the first EQBS call.

This occurs when
1. the first EQBS finds all inspected buffers still in the initial state
   set by the driver (ie INPUT EMPTY or OUTPUT PRIMED),
2. the EQBS terminates early with CCQ 96, and
3. by the time that the second EQBS comes around, the state of those
   previously inspected buffers has changed.

If the state reported by the second EQBS is 'driver-owned', all we know
is that the previous buffers are driver-owned now as well. But we can't
tell if they all have the same state. So for instance
- the second EQBS reports OUTPUT EMPTY, but any number of the previous
  buffers could be OUTPUT ERROR by now,
- the second EQBS reports OUTPUT ERROR, but any number of the previous
  buffers could be OUTPUT EMPTY by now.

Effectively, this can result in both over- and underreporting of errors.

If the state reported by the second EQBS is 'HW-owned', that doesn't
guarantee that the previous buffers have not been switched to
driver-owned in the mean time. So for instance
- the second EQBS reports INPUT EMPTY, but any number of the previous
  buffers could be INPUT PRIMED (or INPUT ERROR) by now.

This would result in failure to process pending work on the queue. If
it's the final check before yielding initiative, this can cause
a (temporary) queue stall due to IRQ avoidance.

Fixes: 25f269f173 ("[S390] qdio: EQBS retry after CCQ 96")
Cc: <stable@vger.kernel.org> #v3.2+
Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Reviewed-by: Benjamin Block <bblock@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2018-03-26 16:12:53 +02:00
..
block s390/dasd: set timestamps unconditionally 2018-02-27 08:05:29 +01:00
char s390/defkeymap: fix global init to zero 2018-03-18 23:02:02 -07:00
cio s390/qdio: don't retry EQBS after CCQ 96 2018-03-26 16:12:53 +02:00
crypto treewide: Use DEVICE_ATTR_RO 2018-01-09 16:34:34 +01:00
net s390/qeth: fix SETIP command handling 2018-02-09 14:30:23 -05:00
scsi s390: add a few more SPDX identifiers 2017-12-05 07:51:09 +01:00
virtio virtio/s390: implement PM operations for virtio_ccw 2018-02-14 14:34:09 +02:00
Makefile s390: add a few more SPDX identifiers 2017-12-05 07:51:09 +01:00