diff mbox

[3/5] tpm_tis: avoid scaring users when probing IRQs

Message ID 1448026354-6807-4-git-send-email-martin.wilck@ts.fujitsu.com (mailing list archive)
State New, archived
Headers show

Commit Message

Martin Wilck Nov. 20, 2015, 1:32 p.m. UTC
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.

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>
---
 drivers/char/tpm/tpm_tis.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Jarkko Sakkinen Nov. 21, 2015, 1:05 p.m. UTC | #1
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

------------------------------------------------------------------------------
diff mbox

Patch

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;
 			}