Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp5620462rwl; Sun, 8 Jan 2023 19:13:59 -0800 (PST) X-Google-Smtp-Source: AMrXdXuOgdxgTKMZ6xJIwflO+LLqo4ONSew5hFL1eSy5duatSyH0BSQLrFnyeqWNREYsPoQ77Dtg X-Received: by 2002:a05:6a00:4c8c:b0:581:61a7:c8f0 with SMTP id eb12-20020a056a004c8c00b0058161a7c8f0mr43892107pfb.4.1673234038796; Sun, 08 Jan 2023 19:13:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673234038; cv=none; d=google.com; s=arc-20160816; b=EJkfN/eWtuOUhmWbDgLq0oG+Qrox7S8HrkpXTA2ZMC2v3mPWdJqMWpX6QRRTSxmZMk faedjjWqerwkWLid+aMRsHypXnGaxpwtyZRqz1E2f7MQTfmnv4y5hv55flCvK1lI80O2 0kBlIK94EmAajIEYlsA4LTGZMPsQCyymy1ZjEksbuQq08WwueRsabPWDDA/t8WrBoKzC pwbIhvjEnb6Uv3YKSjDvSX3rkY9i3uxD8FecsXFTW8auX2LSmWcPUiRgtHsqkTkeI3/E 2KRUVDvGF3NusozeLPWE4PSh/miOJdw/UxIiIzYih22dnng6kEw5qTBeV/KgldXHxMfK 6bZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=UwtAg8YaQfWVpNwYtcweMDmQR47rW4Zc9jCm5z3qNqw=; b=vguhra7d9qhAKkJO7Dr2avB6W+3uNP9Z/xS/rtF3GRuAlNkkE/BJ1webZaPgFxIM7d B32Q9bXB+FLtqpm83+YSXKlVUPs0v3iEGJr1ZUsNTKZvyxxt/tqrHyDttQaBAVX1jctE khyglFTYrGdU6xDPuJesIrZxIlROogznJ1D1ov7jL+MQoblZyxT3rfYgNjn7vXvD7ws4 4IxE4+MLt2F9AZoSf9nsfY3Qr5k6sAWVH/eRo1fzh5XjjzG+NyNFdReqehBBqT8Qs3pN vf2WS43Lj/Y1Lz4roNW2zBkiIuQ4Q1CGXlM/tK609+nfo3kPUEq0eJXtzTgbdqQBdf/d vTog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cd16-20020a056a00421000b005832ed9e605si8057777pfb.123.2023.01.08.19.13.45; Sun, 08 Jan 2023 19:13:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234192AbjAIDEi (ORCPT + 99 others); Sun, 8 Jan 2023 22:04:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234122AbjAIDEg (ORCPT ); Sun, 8 Jan 2023 22:04:36 -0500 Received: from formenos.hmeau.com (helcar.hmeau.com [216.24.177.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61F601116E; Sun, 8 Jan 2023 19:04:34 -0800 (PST) Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1pEiS3-00FR6F-K4; Mon, 09 Jan 2023 11:03:56 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Mon, 09 Jan 2023 11:03:55 +0800 Date: Mon, 9 Jan 2023 11:03:55 +0800 From: Herbert Xu To: JiaJie Ho Cc: Olivia Mackall , Rob Herring , Krzysztof Kozlowski , Emil Renner Berthing , Conor Dooley , "linux-crypto@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-riscv@lists.infradead.org" Subject: Re: [PATCH v2 2/3] hwrng: starfive - Add TRNG driver for StarFive SoC Message-ID: References: <20221228071103.91797-1-jiajie.ho@starfivetech.com> <20221228071103.91797-3-jiajie.ho@starfivetech.com> <7c2cc6e9cdf241318fc73162a5ec221d@EXMBX168.cuchost.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7c2cc6e9cdf241318fc73162a5ec221d@EXMBX168.cuchost.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Mon, Jan 09, 2023 at 02:58:14AM +0000, JiaJie Ho wrote: > > My trng device requires sending a generate new number cmd before each read. > It then only populates the data registers with new random number and raise an interrupt when ready. > If user choose to not wait, they will always get stale bits. > Is it okay to always return error if wait=false ? What is the length of the wait time? Is there an upper bound? What is the average wait time? Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt