From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 078D6C76186 for ; Wed, 24 Jul 2019 19:26:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D166B20659 for ; Wed, 24 Jul 2019 19:26:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563996382; bh=l4JjgKdCpkmqgSLmi99dSz4q204lNHwEMKF2TD08AOA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=KOJEfHZKicQTXo8IAFnywJ0okD/Nebv+tlsh0hMq61Yb9XVnA5bKjrwVvyXWPH6Nt qJM20ZJ/GSdqLdGpS2oxGJG1z0f3MiYzrh9BVloAiNTGec+JAc+EII8lb6NWoWdrCI fl28p2gLlOu77mjQzNrzbov0vMj9Q2TwNJa+ApLk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729242AbfGXT0V (ORCPT ); Wed, 24 Jul 2019 15:26:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:43276 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728571AbfGXT0T (ORCPT ); Wed, 24 Jul 2019 15:26:19 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C3318218EA; Wed, 24 Jul 2019 19:26:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563996378; bh=l4JjgKdCpkmqgSLmi99dSz4q204lNHwEMKF2TD08AOA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jpx/evy2GKc5bWNjXIhpoOM0VbpLqNz5rbx2KIdoqyrhCniE+wZn7/kgw4NM9G9Sk M9Q0KTNKnxh/d3UdYw6Q7OQ6SH0Nuid1nLH/13F1j97tliqIDuzHPN0YsR8ZZ6Qe4y io/xV+obssQbc88W9QYdj3Ey6O07N8k5M5L7rM1o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Julian Wiedmann , Heiko Carstens , Sasha Levin Subject: [PATCH 5.2 074/413] s390/qdio: handle PENDING state for QEBSM devices Date: Wed, 24 Jul 2019 21:16:05 +0200 Message-Id: <20190724191740.398055580@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191735.096702571@linuxfoundation.org> References: <20190724191735.096702571@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ 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 Signed-off-by: Heiko Carstens Signed-off-by: Sasha Levin --- 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 7b7620de2acd..730c4e68094b 100644 --- a/drivers/s390/cio/qdio_main.c +++ b/drivers/s390/cio/qdio_main.c @@ -736,6 +736,7 @@ static int get_outbound_buffer_frontier(struct qdio_q *q, unsigned int start) 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); -- 2.20.1