From: Julian Wiedmann Date: Mon, 3 Jun 2019 05:47:04 +0000 (+0200) Subject: s390/qdio: handle PENDING state for QEBSM devices X-Git-Tag: v3.16.76~38 X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=d94e6466aa2f5defd5910b35b2cfa35d7e31c640;p=wrapfs-4.13.y.git s390/qdio: handle PENDING state for QEBSM devices commit 04310324c6f482921c071444833e70fe861b73d9 upstream. 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 Signed-off-by: Heiko Carstens Signed-off-by: Ben Hutchings --- diff --git a/drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c index 90f93c2be8cd..dae0196a61b6 100644 --- a/drivers/s390/cio/qdio_main.c +++ b/drivers/s390/cio/qdio_main.c @@ -752,6 +752,7 @@ static int get_outbound_buffer_frontier(struct qdio_q *q) switch (state) { case SLSB_P_OUTPUT_EMPTY: + case SLSB_P_OUTPUT_PENDING: /* the adapter got it */ DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "out empty:%1d %02x", q->nr, count);