Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp340147ybl; Wed, 29 Jan 2020 01:19:16 -0800 (PST) X-Google-Smtp-Source: APXvYqx5N0rmZqVFprFsIqcmiwTnxRaa+EMu04YXQWCq/uhdLEGTgGZZvvbErw9qd9lYer1o0yZQ X-Received: by 2002:a05:6830:1047:: with SMTP id b7mr20739583otp.77.1580289556469; Wed, 29 Jan 2020 01:19:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580289556; cv=none; d=google.com; s=arc-20160816; b=iT9Bfk/OYeTpS+bjH1DMZDxmgXT3iEzlY6frwYr23HQeBnaWGAnT1/kd1qI4oUKiJE 8NETMdOMelvQ4hgSCNG6uZynCf5Ul/C19cdBtvU/2ReNXu3x8lHfYoFa7T3dQ0g7pnMJ eSUr8uGrUSD8zslIbE4eIkKhR9sQbZOE1CumoXUe3RmJjHKrsvDnwwHNlAl+iN6pFXaX A/qogDz90F5entHenyhxy1nF/AXmm44cok1B4fFmk9OEAsaBS/dj/MqFx5keZdDevd/H feABx1v2BwMCsjlZ8RfwiSg5bqzfBg3T3rgGPW0cpPvU02K4wNEru3sDwLsRB+obxgnZ p2hA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=bNAC2+oIozcnNbPThp/wFML15nI58BBOU0+BFe2CZdw=; b=UTyTzOECL14YDYvM56pQiN8h84o0Z3andUXyf2UrPqeSZbe9rEpT6jj0tz9sUFMmUP kLKoywWfoVkjhCtxY8i+YIcZsbq+4jmG85SllFxZbon7t0wokbsuuMH8A+TNHz2hNyBv 7WPMHKF81F2UA1ep+8DNqjLeT1oZY8p8PXWsGdbjm2VQv7gYhiau8PwuD8ewjw1Dw7NA 1y/N/+Cb+ylUSo9+9levDuCK5kihl4h6Basua3iPSTLQ7YzimULyRDfVgDst8WGmnnEg g+czjVCQ+j0W7R0aer73Jw1vOlDQcfNHdxAtUIctnHUkJk2yvpLkWqQheMg09OeCUqQc iCZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@benyossef-com.20150623.gappssmtp.com header.s=20150623 header.b=AB5tIAhP; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-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 a13si857786otq.201.2020.01.29.01.19.03; Wed, 29 Jan 2020 01:19:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-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=@benyossef-com.20150623.gappssmtp.com header.s=20150623 header.b=AB5tIAhP; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726157AbgA2JRe (ORCPT + 99 others); Wed, 29 Jan 2020 04:17:34 -0500 Received: from mail-vs1-f67.google.com ([209.85.217.67]:40097 "EHLO mail-vs1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725930AbgA2JRd (ORCPT ); Wed, 29 Jan 2020 04:17:33 -0500 Received: by mail-vs1-f67.google.com with SMTP id g23so9963296vsr.7 for ; Wed, 29 Jan 2020 01:17:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=benyossef-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bNAC2+oIozcnNbPThp/wFML15nI58BBOU0+BFe2CZdw=; b=AB5tIAhPfSaTUA30b2rz5nRhgwFARjT/wGDh/jXm589vlqC83Oc2T6QUmOtSTs4C5U ii0gtU5y/tXxYG4+s59v464GcBzW2yVF52O6FaIHNmHPSfvGeolEnZh9s/1doMOx+4ZW JApBsw9NjruJop5KT1CwDLLMmh2eBLTMAr9L0IG74JFKCDAOy2tXQchChyx57VDDMZBp BCK5Ibw1MbOG2iMXVUyNWT43B9G8aEMkiu0TSmf6O0OpD2fT9ThSeXva5TZzS/5aZ3uM Ec6OkU8ADPyWrUvHheawMHJP+tlU84XeAMlDQLZfVQo5B8rtWkrCXiso33tdrfEfrms3 9skQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bNAC2+oIozcnNbPThp/wFML15nI58BBOU0+BFe2CZdw=; b=cUutYZtcmFDgcczxppNuD+/FpWZVuGfWcjrggXlK2dtLhk+ssfBVpg1jVyvvQvKktT Fi81CI94LDY/DS5SnDZMrarcfOijn/60WfhssI/XA7HgsxLioj6JPWxHBh9QTp7Kvf4p K6J0mjXCfwz8uuw+dfNBQluZe7NuI45ZoOKCrgd3XGu15ReK7LQ1yEGBlEMsUL/bPruJ /DMuURxaxSzdMMfNPf3/nidJKXr7I+/oLwSBevi1usUXTJ780Ogs0wqq0yQStbJ4WDff mAekY77cx5T0kRu5fOqzLEeRjyk8MEFrQEw+YyZo4XipYfxxETg2A8wlCmnCBVNQP9/r ATXA== X-Gm-Message-State: APjAAAUtnMdtK27pLMVag5t/isJJ/6VlhAGb2nELRocbvPuvqRnEuy06 nTJfX4iSmltKVakmOjQc5l0hRRMJNVt6F4ODz2VrVg== X-Received: by 2002:a67:f683:: with SMTP id n3mr15974310vso.117.1580289452828; Wed, 29 Jan 2020 01:17:32 -0800 (PST) MIME-Version: 1.0 References: <20200128190913.23086-1-geert+renesas@glider.be> In-Reply-To: From: Gilad Ben-Yossef Date: Wed, 29 Jan 2020 11:17:22 +0200 Message-ID: Subject: Re: [PATCH] [RFC] crypto: ccree - fix retry handling in cc_send_sync_request() To: Geert Uytterhoeven Cc: Herbert Xu , "David S . Miller" , Linux Crypto Mailing List , Linux-Renesas , Linux kernel mailing list Content-Type: text/plain; charset="UTF-8" Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Wed, Jan 29, 2020 at 11:11 AM Gilad Ben-Yossef wrote: > > On Tue, Jan 28, 2020 at 9:09 PM Geert Uytterhoeven > wrote: > > > > If cc_queues_status() indicates that the queue is full, > > cc_send_sync_request() should loop and retry. > > > > However, cc_queues_status() returns either 0 (for success), or -ENOSPC > > (for queue full), while cc_send_sync_request() checks for real errors by > > comparing with -EAGAIN. Hence -ENOSPC is always considered a real > > error, and the code never retries the operation. > > > > Fix this by just removing the check, as cc_queues_status() never returns > > any other error value than -ENOSPC. > OK, it took me a minute but I now see what you mean... your patch does the right thing. Acked-by: Gilad Ben-Yossef Gilad