s390/qdio: handle PENDING state for QEBSM devices [Linux 4.4.187]

This Linux kernel change "s390/qdio: handle PENDING state for QEBSM devices" is included in the Linux 4.4.187 release. This change is authored by Julian Wiedmann <jwi [at] linux.ibm.com> on Mon Jun 3 07:47:04 2019 +0200. The commit for this change in Linux stable tree is 375fa4d (patch) which is from upstream commit 0431032. The same Linux upstream change may have been applied to various maintained Linux releases and you can find all Linux releases containing changes from upstream 0431032.

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

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>

There is one line of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/s390/cio/qdio_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c
index d64b401..8d7fc3b 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) {
        /* the adapter got it */
        DBF_DEV_EVENT(DBF_INFO, q->irq_ptr,
            "out empty:%1d %02x", q->nr, count);

Leave a Reply

Your email address will not be published. Required fields are marked *