From: "Auer, Lukas" Subject: Re: [PATCH v3 2/5] crypto: caam: Fix endless loop when RNG is already initialized Date: Mon, 5 Feb 2018 13:54:43 +0000 Message-ID: <1517838882.2601.12.camel@aisec.fraunhofer.de> References: <1517364040-27607-1-git-send-email-pure.logic@nexus-software.ie> <1517364040-27607-3-git-send-email-pure.logic@nexus-software.ie> <78ad6a62-190c-e4fe-dd23-e1d058f9bbb2@nexus-software.ie> <1517576063.2002.19.camel@aisec.fraunhofer.de> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Cc: "peng.fan@nxp.com" , "davem@davemloft.net" , "ryan.harkin@linaro.org" , "fabio.estevam@nxp.com" , "rui.silva@linaro.org" , "herbert@gondor.apana.org.au" To: "linux-kernel@vger.kernel.org" , "aymen.sghaier@nxp.com" , "horia.geanta@nxp.com" , "pure.logic@nexus-software.ie" , "linux-crypto@vger.kernel.org" Return-path: Received: from mail-edgeDD24.fraunhofer.de ([192.102.167.24]:57903 "EHLO mail-edgeDD24.fraunhofer.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752607AbeBEOFp (ORCPT ); Mon, 5 Feb 2018 09:05:45 -0500 In-Reply-To: Content-Language: en-US Content-ID: <77ED0A1B7A0D954C88D393EDE2337E77@xch.fraunhofer.de> Sender: linux-crypto-owner@vger.kernel.org List-ID: T24gTW9uLCAyMDE4LTAyLTA1IGF0IDA4OjQ1ICswMDAwLCBIb3JpYSBHZWFudMSDIHdyb3RlOg0K PiBPbiAyLzIvMjAxOCAyOjU0IFBNLCBBdWVyLCBMdWthcyB3cm90ZToNCj4gPiBPbiBGcmksIDIw MTgtMDItMDIgYXQgMTE6MjAgKzAwMDAsIEJyeWFuIE8nRG9ub2dodWUgd3JvdGU6DQo+ID4gPiBP biAwMS8wMi8xOCAxMjoxNiwgSG9yaWEgR2VhbnTEgyB3cm90ZToNCj4gPiA+ID4gSWYgdGhlIGxv b3AgY2Fubm90IGV4aXQgYmFzZWQ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