On Wed, Sep 07, 2016 at 05:57:38PM +0200, Romain Perier wrote: > + > +static int omap_rng_do_read(struct hwrng *rng, void *data, size_t max, > + bool wait) > { > struct omap_rng_dev *priv; > - int data, i; > > priv = (struct omap_rng_dev *)rng->priv; > > - for (i = 0; i < 20; i++) { > - data = priv->pdata->data_present(priv); > - if (data || !wait) > - break; > - /* RNG produces data fast enough (2+ MBit/sec, even > - * during "rngtest" loads, that these delays don't > - * seem to trigger. We *could* use the RNG IRQ, but > - * that'd be higher overhead ... so why bother? > - */ > - udelay(10); So in the wait case you're changing the driver's behaviour. Instead of waiting for 1us you'll now wait for 1s if there is no data. Is this what really what you want? Cheers, -- Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html