Re: [PATCH v3 3/3] Input: snvs_pwrkey - only IRQ_HANDLED for our own events

2020-07-29 Thread Dmitry Torokhov
Hi Marco, On Wed, Jul 29, 2020 at 09:55:13AM +0200, Marco Felsch wrote: > Hi, > > On 20-07-23 10:43, Horia Geantă wrote: > > From: André Draszik > > > > The snvs_pwrkey shares the SNVS LPSR status register with the snvs_rtc. > > > > This driver here should only return IRQ_HANDLED if the status

Re: [PATCH v3 2/3] Input: snvs_pwrkey - enable snvs clock as needed

2020-07-29 Thread Dmitry Torokhov
On Wed, Jul 29, 2020 at 09:33:23AM +0200, Marco Felsch wrote: > Hi, > > On 20-07-23 10:43, Horia Geantă wrote: > > From: André Draszik > > > > At the moment, enabling this driver without the SNVS RTC driver > > being active will hang the kernel as soon as the power button > > is pressed. > > >

Re: [tpmdd-devel] [PATCH] tpm: remove chip_num parameter from in-kernel API

2017-10-24 Thread Dmitry Torokhov
On Tue, Oct 24, 2017 at 11:37:57AM -0600, Jason Gunthorpe wrote: > On Tue, Oct 24, 2017 at 10:02:00AM -0700, Dmitry Torokhov wrote: > > tpm-rng is abomination that should be kicked out as soon as possible. > > It wrecks havoc with the power management (TPM chip drivers may go &

Re: [tpmdd-devel] [PATCH] tpm: remove chip_num parameter from in-kernel API

2017-10-24 Thread Dmitry Torokhov
On Tue, Oct 24, 2017 at 9:11 AM, Jason Gunthorpe wrote: > On Tue, Oct 24, 2017 at 09:37:33PM +0530, PrasannaKumar Muralidharan wrote: >> Hi Jason, >> >> On 24 October 2017 at 21:25, Jason Gunthorpe >> wrote: >> > On Tue, Oct 24, 2017 at 09:21:15PM +0530, PrasannaKumar Muralidharan wrote: >> > >>

Re: [PATCH v5 REPOST 1/6] hw_random: place mutex around read functions and buffers.

2017-09-26 Thread Dmitry Torokhov
On Tue, Sep 26, 2017 at 02:36:57AM -0400, Pankaj Gupta wrote: > > > > > A bit late to a party, but: > > > > On Mon, Dec 8, 2014 at 12:50 AM, Amos Kong wrote: > > > From: Rusty Russell > > > > > > There's currently a big lock around everything, and it means that we > > > can't query sysfs (eg /

Re: [PATCH v5 REPOST 1/6] hw_random: place mutex around read functions and buffers.

2017-09-25 Thread Dmitry Torokhov
A bit late to a party, but: On Mon, Dec 8, 2014 at 12:50 AM, Amos Kong wrote: > From: Rusty Russell > > There's currently a big lock around everything, and it means that we > can't query sysfs (eg /sys/devices/virtual/misc/hw_random/rng_current) > while the rng is reading. This is a real proble

Re: USB HID devices not linked to RNG

2015-09-08 Thread Dmitry Torokhov
On Mon, Sep 7, 2015 at 2:09 PM, Stephan Mueller wrote: > Am Montag, 7. September 2015, 15:07:47 schrieb Mike Mestnik: > > Hi Mike, > >>This is just an off the wall guess. Wouldn't such entropy already be >>collected at a lower level, like raw usb traffic? > > The RNG collects data from interrupts

[PATCH 5/6] hwrng: iproc-rng200 - do not use static structure

2015-03-12 Thread Dmitry Torokhov
Instead of using static hwrng structure that is reused between binds/unbinds of the device let's embed it into driver's private structure that we allocate. This way we are guaranteed not to stumble onto something left from previous bind attempt. Signed-off-by: Dmitry Torokhov --- dr

[PATCH 0/6] Introduce devm_hwrng_register and convert a few dirvers

2015-03-12 Thread Dmitry Torokhov
A few drivers can benefit from devm-style interface for hwrng since it is quite often the last thing that isn't automatically managed. Using devm_hwrng_register() in such drivers allows get rid of manual error unwinding and drivers' remove() methods. I tested changes to iproc-rng200, the rest are

[PATCH 6/6] hwrng: iproc-rng200 - make use of devm_hwrng_register

2015-03-12 Thread Dmitry Torokhov
This allows us to get rid of driver's remove() method. Signed-off-by: Dmitry Torokhov --- drivers/char/hw_random/iproc-rng200.c | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/char/hw_random/iproc-rng200.c b/drivers/char/hw_random/iproc-rng

[PATCH 4/6] hwrng: msm - make use of devm_hwrng_register

2015-03-12 Thread Dmitry Torokhov
This allows us to get rid of remove() method. Signed-off-by: Dmitry Torokhov --- drivers/char/hw_random/msm-rng.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/char/hw_random/msm-rng.c b/drivers/char/hw_random/msm-rng.c index cea1c70..96fb986 100644

[PATCH 1/6] hwrng: add devm_* interfaces

2015-03-12 Thread Dmitry Torokhov
This change adds devm_hwrng_register and devm_hwrng_unregister which use can simplify error unwinding and unbinding code paths in device drivers. Signed-off-by: Dmitry Torokhov --- drivers/char/hw_random/core.c | 42 ++ include/linux/hw_random.h | 4

[PATCH 2/6] hwrng: bcm63xx - make use of devm_hwrng_register

2015-03-12 Thread Dmitry Torokhov
able() and move clock enabling/disabling into hwrnd inti(0 and cleanup() methods so the clock stays off until rng is used. Signed-off-by: Dmitry Torokhov --- drivers/char/hw_random/bcm63xx-rng.c | 87 +--- 1 file changed, 31 insertions(+), 56 deletions(-) di

[PATCH 3/6] hwrng: exynos - make use of devm_hwrng_register

2015-03-12 Thread Dmitry Torokhov
This allows us to get rid of remove() method. Signed-off-by: Dmitry Torokhov --- drivers/char/hw_random/exynos-rng.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/char/hw_random/exynos-rng.c b/drivers/char/hw_random/exynos-rng.c index fed0830..dc4701f

Re: [PATCH 2/4] hwrng: omap - remove #ifdefery around PM methods

2015-03-11 Thread Dmitry Torokhov
On Thu, Mar 12, 2015 at 08:00:35AM +1100, Herbert Xu wrote: > On Wed, Mar 11, 2015 at 08:44:07AM -0700, Dmitry Torokhov wrote: > > > > SIMPLE_DEV_PM_OPS() produces an empty omap_rng_pm structure in case of > > !CONFIG_PM_SLEEP so neither omap_rng_suspend nor omap_rng_resume

[RESEND PATCH] hwrng: omap - remove #ifdefery around PM methods

2015-03-11 Thread Dmitry Torokhov
ither omap_rng_suspend nor omap_rng_resume will end up being referenced and the change will not result in increasing image size. Signed-off-by: Dmitry Torokhov --- drivers/char/hw_random/omap-rng.c | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/char/hw_random/omap-

Re: [PATCH 2/4] hwrng: omap - remove #ifdefery around PM methods

2015-03-11 Thread Dmitry Torokhov
Hi Herbert, On Wed, Mar 11, 2015 at 09:59:57PM +1100, Herbert Xu wrote: > On Mon, Mar 09, 2015 at 10:36:36AM -0700, Dmitry Torokhov wrote: > > Instead of using #ifdefs let's mark suspend and resume methods as > > __maybe_unused which will suppress compiler warnings about them

[PATCH] crypto: amcc: remove incorrect __init/__exit markups

2015-03-09 Thread Dmitry Torokhov
attributes. Signed-off-by: Dmitry Torokhov --- drivers/crypto/amcc/crypto4xx_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/amcc/crypto4xx_core.c b/drivers/crypto/amcc/crypto4xx_core.c index d02b771..3b28e8c 100644 --- a/drivers/crypto/amcc

[PATCH] crypto: qat - remove incorrect __exit markup

2015-03-09 Thread Dmitry Torokhov
PCI bus is hot-pluggable, and even if it wasn't one can still unbind the device from driver via sysfs, so we should not make driver's remove method as __exit. Signed-off-by: Dmitry Torokhov --- drivers/crypto/qat/qat_dh895xcc/adf_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH 2/4] hwrng: omap - remove #ifdefery around PM methods

2015-03-09 Thread Dmitry Torokhov
Instead of using #ifdefs let's mark suspend and resume methods as __maybe_unused which will suppress compiler warnings about them being unused and provide better compile coverage. This will not increase image size. Signed-off-by: Dmitry Torokhov --- drivers/char/hw_random/omap-rng.c

[PATCH 3/4] hwrng: octeon - remove incorrect __exit markups

2015-03-09 Thread Dmitry Torokhov
: Dmitry Torokhov --- drivers/char/hw_random/octeon-rng.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/char/hw_random/octeon-rng.c b/drivers/char/hw_random/octeon-rng.c index be1c3f6..6234a4a 100644 --- a/drivers/char/hw_random/octeon-rng.c +++ b/drivers/char

[PATCH 4/4] hwrng: pseries-rng - remove incorrect __init/__exit markups

2015-03-09 Thread Dmitry Torokhov
() methods should not be marked __init unless platform_driver_probe() is used. Signed-off-by: Dmitry Torokhov --- drivers/char/hw_random/pseries-rng.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/char/hw_random/pseries-rng.c b/drivers/char/hw_random/pseries

[PATCH 1/4] hwrng: omap - remove incorrect __exit markups

2015-03-09 Thread Dmitry Torokhov
: Dmitry Torokhov --- drivers/char/hw_random/omap-rng.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c index d14dcf7..7f3597d 100644 --- a/drivers/char/hw_random/omap-rng.c +++ b/drivers/char/hw_random