Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3783946ybi; Mon, 29 Jul 2019 12:33:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqwKSyHNDk3sTEU3rlwaGytwIUIhadJexzlKS3megCT7Y5lzusrWk0mhpEL76c/oHTmd4T96 X-Received: by 2002:a17:90a:8c90:: with SMTP id b16mr112813118pjo.133.1564428796748; Mon, 29 Jul 2019 12:33:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564428796; cv=none; d=google.com; s=arc-20160816; b=N9Zo+qAHlOcI50ZbMOUaj8H03ECaTeClLKZbi0s5Plyh82tohplSc9fPYn5VvODapi 2sUFRxYO5uHoY2YhEDfz95sYvWp+nss+zR/OvjOv9YDd3MAwWd6gpbfhyRCOlKIURolV zFaHRv+qMrwIvMwg+SuLkSIhx9aOhVliFjuPzrrReFaSMABGRssUdDssfdrBeq/ajRHH BZv1tIPv3VEmXjilD6kSSOoBGmb3LblaUutYdwWXK5ef8IelC5Y54HcI3yqOHsQs2rSi 8orbBl7UnzteuYdtgFjTa2ew6fi6isLPH/PH+7NCREQgmxDvOMZDDgtv28nw4T2AqPU/ u6hw== 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=cACHeh69nBTAxAw7hukQ2xsVMdqN7Na3pT76yqATDcU=; b=oQHmB6M+H7fvlBI2gKEi9hCK2y9gkSFj94kAaiiEqWKKFxb/YK8D/yhx/nM5CLfrWx Qq+GpwfQuHsVyKCXQzumdGNLgxqbqnFom//e9ENZua6tlbG26cXdBIU60YghEVFzLIbH cjVhbGkY34Kttyz+xJg5mk/XZWw07iqkCzP++Cm8y0tsq4qmXBv72qld+KP7g6oVyQy4 ocdztd7WJUe9mHyGkaYwlT6NX0Kl/+3ThtoPrP7oE0mNJrqGk8Cd3LpPWimYiDnunUWi e9aFAwE/J+Xo1814wtln7THEZyMLylWDYMDf+OvC+MUJW6OYlMqgdC/GHV+23L5C13hS 6uXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ltB3OEGU; 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 u15si29207637pfh.213.2019.07.29.12.33.02; Mon, 29 Jul 2019 12:33:16 -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=ltB3OEGU; 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 S2388283AbfG2TZV (ORCPT + 99 others); Mon, 29 Jul 2019 15:25:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:37576 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387496AbfG2TZR (ORCPT ); Mon, 29 Jul 2019 15:25:17 -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 554A920C01; Mon, 29 Jul 2019 19:25:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564428316; bh=r0jPVWdP2h3eaXNjoHKlq5SroAKe5morQsPOLgWPTyU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ltB3OEGUf+ugLUa/bTTGKWvJBjRBj+JFt4iB17rDpZHIJU8GkVfP67OL2nGWjyvdx OyRSs8ltwKfBIPf0JNL20YNI8k9ME56sqKqeuETdA0+/l8TR7Hhh1d3/Xwi6R1m6Q8 /NclKg36Sy4MbayjiKqn4eX6hP9lDMdPx5tZbtqg= 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.14 037/293] s390/qdio: handle PENDING state for QEBSM devices Date: Mon, 29 Jul 2019 21:18:48 +0200 Message-Id: <20190729190825.142115457@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190820.321094988@linuxfoundation.org> References: <20190729190820.321094988@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 c7afdbded26b..ab8dd81fbc2b 100644 --- a/drivers/s390/cio/qdio_main.c +++ b/drivers/s390/cio/qdio_main.c @@ -759,6 +759,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