Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp928313ybi; Fri, 2 Aug 2019 06:37:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqyV6q8D/SitKEjskCFLEhV6nRQm4tfYrEXmzCKQ/07elNRYbHUnGDXjVX9AYb3mdkKHgRzL X-Received: by 2002:a17:902:8bc1:: with SMTP id r1mr82669288plo.42.1564753057228; Fri, 02 Aug 2019 06:37:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564753057; cv=none; d=google.com; s=arc-20160816; b=OzQOMmwn7FP49mjFnBFOl7RZCV678NKe2Oy7Ca6c6SJqqQyRFyq6+wtumTvKbtcsw+ exQt8GCp/pYMT7JnYofpeqroWNYbKVi9JcYJGGJ2DJ11k7EcnR2JL68BbVMMD8Vh60tt m+/KAEJ28CO9IPCyT+UfKCrHR7MMvdccxAulL6CtaMpgx9utksxOh2j21SOpXnx2ZCVk 6LIqHVrnH/7O0t2SvO3mu3aPaWpH9d53OmC1oQsW1ieYERTu9ITT/URCmvrcVGunLZ0j m2qR2Qae7TaPWo0gc/c/4btjKQVWJHS0v7TBGxPDtjnEP0sVnMpPgqn/Mr/iXJL2UlQi yGQg== 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=XQGBcLgQSC0hO4Ao8ekoKVO6jfR7QhdRqdA8uoOGRsI=; b=fzYE2aYBsIfKnkMvRaM5sb9UHRF0X589Sp/XunJukXWk8DNOoaLB5dFNwFTSdF/lAj 2qrVWwRBX2PrSGi+W39YS4EIwdTITfKsBBV14sZ41x2VAq/VCGWu8yknIRWGZJxK25Ik Xi3OPkj04NERa8t9SJrqI/6r+hrZksb3BtWZRwN+1i3fGhxWKGXHGMpkLXRJnErtZ9qP i0OkVsV4PAVzlgY738Z/4S6cOavLHG6IYOlMza9PW5iUTog/L+Q6EvxfUSGEOJfmRrrS 4RdD6IqfnQppazPTt6Gf6WDfkYOZBvG/O48WTceZp1B8dDyXcBuIvepEtwAZNK57LVNt 2DGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=az642VA+; 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 l21si17588095pgk.259.2019.08.02.06.37.21; Fri, 02 Aug 2019 06:37:37 -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=az642VA+; 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 S2391742AbfHBKGt (ORCPT + 99 others); Fri, 2 Aug 2019 06:06:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:56178 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389621AbfHBJah (ORCPT ); Fri, 2 Aug 2019 05:30:37 -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 B8C8321773; Fri, 2 Aug 2019 09:30:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564738236; bh=fB2WSUjkbYwB+oO+NgmUDtNNu/P8tsF/bgX8F9W6VyQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=az642VA+QddIeKZ9nYU9ree+1YPewxY50rnt43iLM+03Zc7ob811/ExWNeN5ndvSz nfBRv4r0UBvge0qezXDqoj47w8AGVNkC84txGzTSdsPPOFKcfrj+xArktlazjaoOzc sHspKZbPYk/NbxubUX1gkE4NJVA+6Bor+0a/JTYk= 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.4 025/158] s390/qdio: handle PENDING state for QEBSM devices Date: Fri, 2 Aug 2019 11:27:26 +0200 Message-Id: <20190802092208.701766096@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190802092203.671944552@linuxfoundation.org> References: <20190802092203.671944552@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 d64b401f3d05..8d7fc3b6ca63 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) { 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