s390/qdio: handle PENDING state for QEBSM devices
authorJulian Wiedmann <jwi@linux.ibm.com>
Mon, 3 Jun 2019 05:47:04 +0000 (07:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Aug 2019 07:33:18 +0000 (09:33 +0200)
commit4eebf3147cf0e88179cbbde179bc56daf2834111
treecd92c799cfd25ee3cea501b3bcf542e144d34298
parentf4ba42d6f283cf26f701af4c997566fcd63362ea
s390/qdio: handle PENDING state for QEBSM devices

[ Upstream commit 04310324c6f482921c071444833e70fe861b73d9 ]

When a CQ-enabled device uses QEBSM for SBAL state inspection,
get_buf_states() can return the PENDING state for an Output Queue.
get_outbound_buffer_frontier() isn't prepared for this, and any PENDING
buffer will permanently stall all further completion processing on this
Queue.

This isn't a concern for non-QEBSM devices, as get_buf_states() for such
devices will manually turn PENDING buffers into EMPTY ones.

Fixes: 104ea556ee7f ("qdio: support asynchronous delivery of storage blocks")
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/s390/cio/qdio_main.c