Received: by 2002:a17:90b:8d0:0:0:0:0 with SMTP id ds16csp4876579pjb; Mon, 27 Jul 2020 07:23:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXMyCx5+MykfXog8m49PDiQrzpxk0fQFIGvmD8/Bs0rVhIBanPjTuEqeYnmbbkKf+3rMUV X-Received: by 2002:a17:906:84ef:: with SMTP id zp15mr21049059ejb.3.1595859813567; Mon, 27 Jul 2020 07:23:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595859813; cv=none; d=google.com; s=arc-20160816; b=WDvqKMhAntHuxNn+X3p19fr91t7Dq6UCXheKzVym7Dz1KCS+Tl1FTlNgQAW/ob1XVG bM6DYzLv7X6iGCyl3HwRYadiF6w59h0wXl+q7c8nl+nBo1SCHslzu5d+1CsVf7i8CX6p H6jvYHrs0fK5BL0/atkE/oOG3OBV6wKv703YDZD4KdZ6QNylm/IgZE2Us5YVWFdzoRZi 6eVPk98Iinp3nRLVAMLt0R85/IuIjwkey5yYqxXUnrWitmIXpPEXfQ9C8lNSJoAM5pMj NvH9PQhUXN88GnYEFyoWlMPBjk4mTuJciI2PnGlyHRJH45zBW65ScRFSO84Cygz4emPv p+qw== 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=IEIKN3L0GQPWge4FSK+zRB32CAYrkS2ISPZjsVN0XCs=; b=nHO6ZShlqIIXsC+rhxq9NXzRmKUSXGCok1ru28dI5FfthP7EnAAFn2ZKbmyBobhhEw 7puIi3/piNZQVXaEOGlNOJ7nrymej2I1LQGNKew4m2bLqk/AHyJgVBvnrLBAcbmkO2Gc 9nBepxjjTzwLsjfktfV7j4jFWgL2G9ViKcfzGButGhA3tqodhpBhx3snvxiEgSbAXGpG Qp1CoQk7ls35yoZo9RGCx1N6sErOggmwXiwL0AkGorcSm+S0SoeKoqMhMeRnQYwQB8hf Ky+4/zxEz+sAiqs5EfgFi9JfVys7H65JT8HE0B6BJ5hOxPKc3rkaWr/jblmc5nQ8Qjfd wjDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=J0jryEQy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bv8si5580611ejb.476.2020.07.27.07.23.11; Mon, 27 Jul 2020 07:23:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=J0jryEQy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731603AbgG0OUo (ORCPT + 99 others); Mon, 27 Jul 2020 10:20:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:49022 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729871AbgG0OUl (ORCPT ); Mon, 27 Jul 2020 10:20:41 -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 7C9612070A; Mon, 27 Jul 2020 14:20:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595859641; bh=8fQOmzrojSKWlqJUC3E5/6JDT7PIiYuRQoMXQLibL04=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J0jryEQyh/MytZu/BbWpMsA1hAFLw2D62oDg+07O9MZJ+sEfdwuvfoYVCSEE+yxr6 WcTZLBNzOx5yys002chrT1NlIT5umHvvZZmtbmPP1XOt2Cdao92YPAyYTByKdTKOXS +AVGhH5t5Pf2TdFk1UHs72Jona+yakLtH2ZgJCG4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Matthew Gerlach , Xu Yilun , Wu Hao , Tom Rix , Moritz Fischer , Sasha Levin Subject: [PATCH 5.7 047/179] fpga: dfl: fix bug in port reset handshake Date: Mon, 27 Jul 2020 16:03:42 +0200 Message-Id: <20200727134934.958840022@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200727134932.659499757@linuxfoundation.org> References: <20200727134932.659499757@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 From: Matthew Gerlach [ Upstream commit 8614afd689df59d9ce019439389be20bd788a897 ] When putting the port in reset, driver must wait for the soft reset acknowledgment bit instead of the soft reset bit. Fixes: 47c1b19c160f (fpga: dfl: afu: add port ops support) Signed-off-by: Matthew Gerlach Signed-off-by: Xu Yilun Acked-by: Wu Hao Reviewed-by: Tom Rix Signed-off-by: Moritz Fischer Signed-off-by: Sasha Levin --- drivers/fpga/dfl-afu-main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/fpga/dfl-afu-main.c b/drivers/fpga/dfl-afu-main.c index 65437b6a68424..77e257c88a1df 100644 --- a/drivers/fpga/dfl-afu-main.c +++ b/drivers/fpga/dfl-afu-main.c @@ -83,7 +83,8 @@ int __afu_port_disable(struct platform_device *pdev) * on this port and minimum soft reset pulse width has elapsed. * Driver polls port_soft_reset_ack to determine if reset done by HW. */ - if (readq_poll_timeout(base + PORT_HDR_CTRL, v, v & PORT_CTRL_SFTRST, + if (readq_poll_timeout(base + PORT_HDR_CTRL, v, + v & PORT_CTRL_SFTRST_ACK, RST_POLL_INVL, RST_POLL_TIMEOUT)) { dev_err(&pdev->dev, "timeout, fail to reset device\n"); return -ETIMEDOUT; -- 2.25.1