Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10120337ybi; Wed, 24 Jul 2019 16:27:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqzLEDYHrPCoi4tXRyVT40Yiq28nNS1qm9YkGKYOm5aEXsdpOSP2VFlI8ZAk/pexg/fIbmCr X-Received: by 2002:a17:902:f082:: with SMTP id go2mr92262249plb.25.1564010869193; Wed, 24 Jul 2019 16:27:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564010869; cv=none; d=google.com; s=arc-20160816; b=brNIRvKZX2Y0IqPFSKzKFwtSgsO9o3K8SdBaC6bLfaMI33TG99MM4jgR9X9NTfGLyl 5X/fhd7yp5z84SElaH638COHt+1iVWoxuXqFcRM4DbCMCgd26xL02DFxkgikfMjFDkS9 mQy7H66bmQuEii1QUWvWrMCA3XrjcrwSkgfeptsuAXkGtWk90SX+F/NA7c6eAU7XdzNK GG1HlaCjj47wEGiFWTZFrtzpKu8z1kTGZT/E70gg8d6IDp3tF70pJsj3S32/77zgIzKy T8L6m2Cy252vtdTpshKfn3+LozVkzazPnv4ODEMugUE0FLYJotRBA0Q56JlBqXyHifgz WtfQ== 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=F9ELcydHgnSLG7sR4193d87kM4ZxbxFy/ugIgbPJ/2E=; b=sn+bH2zayJf3rS0FTrDhnHU4KVKFPHwJKXrzHAouKhWkqb71o/CW5iCI5AVhfP0yrP ZtYewo9L6V1tEuhaGEzL1LJPGmN1boyKG7NSIcuzk4BV7pApKn8+L+zzTb//EA/lw/2Z +zG99dEclprZ8HBCxo4Tuvbi4OHV2qUyPcT0g239yXK+fFTNh2/aiwATmVFHl/kVt+yq jI55UUtH79qdazUCEn1RCjJVdl6G5eDMdyCnUlqN9Ynv+Emw1U/EOIC0XulK0k+NPLCx ee2UA22NWyr1nIp2J9x1ulIa465S/IYjBu8FEmuq7F6TRgHd7j1ZFqtuqSn+SUDcPZc5 6JWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Jpx/evy2"; 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 l64si13480697pjb.93.2019.07.24.16.27.34; Wed, 24 Jul 2019 16:27:49 -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="Jpx/evy2"; 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 S1729237AbfGXT0V (ORCPT + 99 others); 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