[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tpmdd-devel
Subject:    Re: [tpmdd-devel] [PATCH 3/5] tpm_tis: avoid scaring users when probing IRQs
From:       Jarkko Sakkinen <jarkko.sakkinen () linux ! intel ! com>
Date:       2015-11-21 13:05:00
Message-ID: 20151121130500.GB4732 () intel ! com
[Download RAW message or body]

On Fri, Nov 20, 2015 at 02:32:32PM +0100, martin.wilck@ts.fujitsu.com wrote:
> From: Martin Wilck <Martin.Wilck@ts.fujitsu.com>
> 
> For any IRQ probed by tpm_tis, a scary-looking kernel trace will
> be emitted if the IRQ has been requested earlier without IRQF_SHARED.
> Inform the user that this failure is non-fatal.

Someone who looks at the klog is not a standard user. Log mesages are
not scaary. Log flood is.

> Furthermore, as IRQ probing can take a long time, Inform users what's going on.
> 
> v2: print less clutter.
> Signed-off-by: Martin Wilck <Martin.Wilck@ts.fujitsu.com>

/Jarkko

> ---
>  drivers/char/tpm/tpm_tis.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
> index f417b40..360bccc 100644
> --- a/drivers/char/tpm/tpm_tis.c
> +++ b/drivers/char/tpm/tpm_tis.c
> @@ -779,6 +779,7 @@ static int tpm_tis_init(struct device *dev, struct tpm_info *tpm_info,
>  			irq_e = 15;
>  		}
>  
> +		dev_info(dev, "Probing IRQ - this may take some time.\n");
>  		for (i = irq_s; i <= irq_e && chip->vendor.irq == 0; i++) {
>  			iowrite8(i, chip->vendor.iobase +
>  				 TPM_INT_VECTOR(chip->vendor.locality));
> @@ -786,7 +787,7 @@ static int tpm_tis_init(struct device *dev, struct tpm_info *tpm_info,
>  			    (dev, i, tis_int_probe, IRQF_SHARED,
>  			     chip->devname, chip) != 0) {
>  				dev_info(chip->pdev,
> -					 "Unable to request irq: %d for probe\n",
> +					 "Unable to request irq: %d for probe (this is non-fatal)\n",
>  					 i);
>  				continue;
>  			}
> -- 
> 1.8.3.1
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> tpmdd-devel mailing list
> tpmdd-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tpmdd-devel

------------------------------------------------------------------------------
_______________________________________________
tpmdd-devel mailing list
tpmdd-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tpmdd-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic