Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1118496ybi; Fri, 2 Aug 2019 09:34:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqwn1KCy/PZLJeEXFhPtPXrCF5ny4PnQ4yjRuTHCAwFDVm7H0eN4soAWtXK1uQFz6u3wSYok X-Received: by 2002:a63:f048:: with SMTP id s8mr95892916pgj.26.1564763674538; Fri, 02 Aug 2019 09:34:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564763674; cv=none; d=google.com; s=arc-20160816; b=lb1ckD/CfUoqSU7bm/dZwUEXcdoLZ5F0LdqVgLCgOmzYDdvwoWgeBdE//mP1vFOfq4 qLUBFxK0VfCLQyvXUIvYeFwhGznfhFZlCsBPI98kQSdW+KJcFDuHDAm8gpzdl66AB/bX iRrRVRSZx5nGnrUxFZLz2n6sRjE8/0cWKv9ChYzsXHveiU9ItVHwSeyofiq6ckuM/2eg 2wm991QNApr4buWR3lumcWu6DZQXosbA5gddOW2g4zuMgim/IfjQC5GYaCTHY0vNfODf tPJ250fWHWdt8q19ZXcxKAw89QvZ+s3iFm4+4mIhcenk5slUCwlRwoTKoApl0VVI8gTS RPAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7oZJJq+slQS9yrR7kLO4ovhGXoCjGLM+L09XE0+YYqg=; b=Z4C1itZ70qKWr1WXQKKQlTK6I/2x/w5OcSj7aY0JX8kdiu1rAEDvTwp6SdX80AD8dP 6j302izhHLE4SM5GMOpEmW2mJAy2/10/Shn18AmjhNgyVsuU+ePFxkdguTgVdNOMqDM1 +7+Uo8mRKe4wbpcyf6HhcD81Yk9iPPfsnKHz291zMYPPmbO2GPcDh4hPBvGkDzzWfRHk icVP1fBc+zPGWJuP2SVFCXYZ1du+N9MLAEH0BlcFvwDQKeBipPFCxSMEjEWXolgroxwC dJsMSqTrpoCbQW9q7aTymyC/Cddq960WicJP07lJgmtm3gwezwgaB7jzoDaZwcaIP13e ZsxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cZXduzL6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k22si34539547pll.168.2019.08.02.09.34.16; Fri, 02 Aug 2019 09:34:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cZXduzL6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404973AbfHBJmG (ORCPT + 99 others); Fri, 2 Aug 2019 05:42:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:43984 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404942AbfHBJl7 (ORCPT ); Fri, 2 Aug 2019 05:41:59 -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 AD75D20679; Fri, 2 Aug 2019 09:41:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564738918; bh=7J/y1WK0Kc5VzLEIoJz0rRPaWWB4beZrvepjH6YqJN0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cZXduzL6696cyT1pZsBl3dNBh967up2v/UEPTeA9kGdBuIh0dJ4iRXUi1PxblB+7o CZbedw3/IaYbLDXfrhiZJp2ZmrQTumBBXljI2slS1gFbXhTSMHP37uxD3/eeCtQY4D +WscWC9dZ6077949MEjU7iHJ6BGlJisss1my/HLs= 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 4.9 031/223] s390/qdio: handle PENDING state for QEBSM devices Date: Fri, 2 Aug 2019 11:34:16 +0200 Message-Id: <20190802092241.012170566@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190802092238.692035242@linuxfoundation.org> References: <20190802092238.692035242@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 18ab84e9c6b2..58cd0e0c9680 100644 --- a/drivers/s390/cio/qdio_main.c +++ b/drivers/s390/cio/qdio_main.c @@ -758,6 +758,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); -- 2.20.1