OSDN Git Service

s390/qdio: reset old sbal_state flags
authorJulian Wiedmann <jwi@linux.ibm.com>
Wed, 16 May 2018 07:37:25 +0000 (09:37 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Sep 2018 07:29:52 +0000 (09:29 +0200)
commitd695333c5de693a22b94d071a28c9f3408e17026
tree2d03ad83856c7144fea4b92ab0142fe148e1db80
parentdacf5e5947082e8ae4df3b3105eb3d851bcda23a
s390/qdio: reset old sbal_state flags

commit 64e03ff72623b8c2ea89ca3cb660094e019ed4ae upstream.

When allocating a new AOB fails, handle_outbound() is still capable of
transmitting the selected buffer (just without async completion).

But if a previous transfer on this queue slot used async completion, its
sbal_state flags field is still set to QDIO_OUTBUF_STATE_FLAG_PENDING.
So when the upper layer driver sees this stale flag, it expects an async
completion that never happens.

Fix this by unconditionally clearing the flags field.

Fixes: 104ea556ee7f ("qdio: support asynchronous delivery of storage blocks")
Cc: <stable@vger.kernel.org> #v3.2+
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/s390/include/asm/qdio.h
drivers/s390/cio/qdio_main.c