Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp794166ybt; Wed, 8 Jul 2020 11:50:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJze0jF7sFbSxnFoAuLucVztLn866m8dPbYo9JAdJlUGSMNylafS/8VfCMErXlYJeEiY/x3b X-Received: by 2002:a05:6402:b72:: with SMTP id cb18mr30630642edb.352.1594234257260; Wed, 08 Jul 2020 11:50:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594234257; cv=none; d=google.com; s=arc-20160816; b=KlDan/5WTG5LP9wQrjKIHdSiGJ7grjWkgpPp+YKFyNE5JoAhuDW9eGLU/oEx5jpGBw C4xd+7VaCgbLZlXi5BkeMMx/xOUBr17i5uVHeGjyU0eSfGQekOLybbZw0rPid2DCr/CK 2t1aW/7bdokC0AN5QNFNOAWlvlSfm62aYkH7A9yRlIiREAb7Av/XfewAJZBiLv/2CRNP KgiFMnKvO8mE22vqipe1seHf57c8U7vzZ6fWxrYmpKC5qasltyEMNQu+sndHVBjqLos9 uarxW5OlHFCisqIVm2TiaIDl2klIQEF9eUlWeUGO4havhRWFRawfMVh8XuJdih30O4BP I41w== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:from:references:cc:to:subject:dkim-signature; bh=wmtmrtSDr9mkZKMk2IAZJKTGq0/2mXAdgCJdaf4l+fc=; b=DXDqpIQ6j9YVG9NVBVZVgP3fVvsabAkI2dY79MFoMefq0t9F3CpJhxObSAsJdt5I5z LUTJ1KJ4Ql42drO3tRU7GZDVaP2Px9qAP8z9WXrEzkrL/zfEDt0E1B+J+26KLdNHZhX9 vZI7yzWHkzUREA3LKJOav2tbWGkwIQ2pdwtdiZ+0KvtiXlzaoS4m9mM3+a8YmWou137K XabcRAM+P77Ue/R2OnG3S72781uhomAx8aCySmTz9Cowz1V5yXdqiGP15rEfHEXeNSTh JWUIl+qfnApcxwpB2XK40t2ocgmiAerUwzpF6b5tlEtKo36ZSLHY9WjcVPd9UegxPbzu 80RA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=W3lbJDL+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dm7si559538edb.43.2020.07.08.11.50.34; Wed, 08 Jul 2020 11:50:57 -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=W3lbJDL+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726806AbgGHSru (ORCPT + 99 others); Wed, 8 Jul 2020 14:47:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:52496 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726325AbgGHSrr (ORCPT ); Wed, 8 Jul 2020 14:47:47 -0400 Received: from [192.168.1.26] (cpe-70-114-128-244.austin.res.rr.com [70.114.128.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 28A5120786; Wed, 8 Jul 2020 18:47:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594234066; bh=2uSG0t2YmRHLEmxRcypEIRroELoGimw9U9d+Xr4ZGus=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=W3lbJDL+MwORmPfom6ckuoowJu1w46H7yQ5Ox8S4MJtmgL9japkFLheENhRWOc7YY wGfqQxQADW54+mtKmXRo7dQk9N6D3ZE8OusIX5f2DLrbIgqBUsW1oEuyLkb7bbrISe +4DcBOFhFScsx0k0gl/JXHZaNfXKlty25XHTurlA= Subject: Re: [PATCH] fpga: stratix10-soc: make FPGA task un-interruptible To: Richard Gong , mdf@kernel.org Cc: linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org, richard.gong@intel.com References: <1594138447-21488-1-git-send-email-richard.gong@linux.intel.com> <3e45e4a4-f002-ecf8-110f-bf7d646a5dbe@kernel.org> <5be15818-9170-b2a5-e92b-bbe6b1fcba21@linux.intel.com> From: Dinh Nguyen Autocrypt: addr=dinguyen@kernel.org; prefer-encrypt=mutual; keydata= xsFNBFEnvWwBEAC44OQqJjuetSRuOpBMIk3HojL8dY1krl8T8GJjfgc/Gh97CfVbrqhV5yQ3 Sk/MW9mxO9KNvQCbZtthfn62YHmroNwipjZ6wKOMfKdtJR4+8JW/ShIJYnrMfwN8Wki6O+5a yPNNCeENHleV0FLVXw3aACxOcjEzGJHYmg4UC+56rfoxPEhKF6aGBTV5aGKMtQy77ywuqt12 c+hlRXHODmXdIeT2V4/u/AsFNAq6UFUEvHrVj+dMIyv2VhjRvkcESIGnG12ifPdU7v/+wom/ smtfOAGojgTCqpwd0Ay2xFzgGnSCIFRHp0I/OJqhUcwAYEAdgHSBVwiyTQx2jP+eDu3Q0jI3 K/x5qrhZ7lj8MmJPJWQOSYC4fYSse2oVO+2msoMTvMi3+Jy8k+QNH8LhB6agq7wTgF2jodwO yij5BRRIKttp4U62yUgfwbQtEUvatkaBQlG3qSerOzcdjSb4nhRPxasRqNbgkBfs7kqH02qU LOAXJf+y9Y1o6Nk9YCqb5EprDcKCqg2c8hUya8BYqo7y+0NkBU30mpzhaJXncbCMz3CQZYgV 1TR0qEzMv/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T+i5Hov cJEJNezizexE0dVclt9OS2U9Xwb3VOjs1ITMEYUf8T1j83iiCCFuXqH4U3Eji0nDEiEN5Ac0 Jn/EGOBG2qGyKZ4uOec9j5ABF7J6hyO7H6LJaX5bLtp0Z7wUbyVaR4UIGdIOchNgNQk4stfm JiyuXyoFl/1ihREfvUG/e7+VAAoOBnMjitE5/qUERDoEkkuQkMcAHyEyd+XZMyXY Message-ID: <39936d44-a802-8105-7d60-97a1e44c163d@kernel.org> Date: Wed, 8 Jul 2020 13:47:45 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <5be15818-9170-b2a5-e92b-bbe6b1fcba21@linux.intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/8/20 1:30 PM, Richard Gong wrote: > Hi Dinh, > > > On 7/8/20 12:08 PM, Dinh Nguyen wrote: >> Hi >> >> On 7/7/20 11:14 AM, richard.gong@linux.intel.com wrote: >>> From: Richard Gong >>> >>> When CTRL+C occurs during the process of FPGA reconfiguration, the FPGA >>> reconfiguration process stops and the user can't perform a new FPGA >>> reconfiguration properly. >>> >>> Set FPGA complete task to be not interruptible so that the user can >>> properly perform FPGA reconfiguration after CTRL+C event. >>> >>> Signed-off-by: Richard Gong >>> --- >>>   drivers/fpga/stratix10-soc.c | 23 +++-------------------- >>>   1 file changed, 3 insertions(+), 20 deletions(-) >>> >>> diff --git a/drivers/fpga/stratix10-soc.c b/drivers/fpga/stratix10-soc.c >>> index 44b7c56..657a70c 100644 >>> --- a/drivers/fpga/stratix10-soc.c >>> +++ b/drivers/fpga/stratix10-soc.c >>> @@ -196,17 +196,13 @@ static int s10_ops_write_init(struct >>> fpga_manager *mgr, >>>       if (ret < 0) >>>           goto init_done; >>>   -    ret = wait_for_completion_interruptible_timeout( >>> +    ret = wait_for_completion_timeout( >>>           &priv->status_return_completion, S10_RECONFIG_TIMEOUT); >>>       if (!ret) { >>>           dev_err(dev, "timeout waiting for RECONFIG_REQUEST\n"); >>>           ret = -ETIMEDOUT; >>>           goto init_done; >>>       } >>> -    if (ret < 0) { >>> -        dev_err(dev, "error (%d) waiting for RECONFIG_REQUEST\n", ret); >>> -        goto init_done; >>> -    } >>>         ret = 0; >>>       if (!test_and_clear_bit(SVC_STATUS_OK, &priv->status)) { >>> @@ -318,7 +314,7 @@ static int s10_ops_write(struct fpga_manager >>> *mgr, const char *buf, >>>            */ >>>           wait_status = 1; /* not timed out */ >>>           if (!priv->status) >>> -            wait_status = wait_for_completion_interruptible_timeout( >>> +            wait_status = wait_for_completion_timeout( >>>                   &priv->status_return_completion, >>>                   S10_BUFFER_TIMEOUT); >>>   @@ -340,13 +336,6 @@ static int s10_ops_write(struct fpga_manager >>> *mgr, const char *buf, >>>               ret = -ETIMEDOUT; >>>               break; >>>           } >>> -        if (wait_status < 0) { >>> -            ret = wait_status; >>> -            dev_err(dev, >>> -                "error (%d) waiting for svc layer buffers\n", >>> -                ret); >>> -            break; >>> -        } >>>       } >>>         if (!s10_free_buffers(mgr)) >>> @@ -372,7 +361,7 @@ static int s10_ops_write_complete(struct >>> fpga_manager *mgr, >>>           if (ret < 0) >>>               break; >>>   -        ret = wait_for_completion_interruptible_timeout( >>> +        ret = wait_for_completion_timeout( >>>               &priv->status_return_completion, timeout); >>>           if (!ret) { >>>               dev_err(dev, >>> @@ -380,12 +369,6 @@ static int s10_ops_write_complete(struct >>> fpga_manager *mgr, >>>               ret = -ETIMEDOUT; >>>               break; >>>           } >>> -        if (ret < 0) { >>> -            dev_err(dev, >>> -                "error (%d) waiting for RECONFIG_COMPLETED\n", >>> -                ret); >>> -            break; >>> - >>>           /* Not error or timeout, so ret is # of jiffies until >>> timeout */ >>>           timeout = ret; >>>           ret = 0; >>> >> >> Do you need the same change in drivers/fpga/socfpga.c? > It is not required. Why not? > Also, you did not >> include Moritz Fisher on this. He's the maintainer. >> > I did include Moritz Fisher in the submission, is > something change recently? > My bad, I didn't see his name in the email. Dinh