netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] e1000e: Avoid duplicated output of device name in kernel warning
  2008-08-18 10:19 e1000e: Silly repetition of PCI name in log message Frans Pop
@ 2008-08-25 18:02 ` Frans Pop
  0 siblings, 0 replies; 4+ messages in thread
From: Frans Pop @ 2008-08-25 18:02 UTC (permalink / raw)
  To: netdev; +Cc: linux-kernel

On Monday 18 August 2008, Frans Pop wrote:
> With 2.6.27-rc3 I noticed the following messages in my boot log:
> 0000:01:00.0: 0000:01:00.0: Warning: detected DSPD enabled in EEPROM
> 0000:01:00.0: eth0: (PCI Express:2.5GB/s:Width x1) 00:16:76:04:ff:09
>
> The second seems correct, but the first has a silly repetition of the
> PCI device before the actual message. The message originates from
> e1000_eeprom_checks in e1000e/netdev.c.

With the patch below the first message becomes
  e1000e 0000:01:00.0: Warning: detected DSPD enabled in EEPROM
which makes it similar to directly preceding messages.

> Other question is why this is a "Warning"? Isn't "Deep Smart Power
> Down" a desirable feature to have?

I'm still wondering about this...
Same goes for the "warning" about ASPM.

---
From: Frans Pop <elendil@planet.nl>

Use dev_warn instead of e_warn in e1000_eeprom_checks() as the
interface name has not yet been assigned at that point.
    
Signed-off-by: Frans Pop <elendil@planet.nl>

diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index d266510..d02a659 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -4335,13 +4335,15 @@ static void e1000_eeprom_checks(struct 
e1000_adapter *adapter)
 	ret_val = e1000_read_nvm(hw, NVM_INIT_CONTROL2_REG, 1, &buf);
 	if (!(le16_to_cpu(buf) & (1 << 0))) {
 		/* Deep Smart Power Down (DSPD) */
-		e_warn("Warning: detected DSPD enabled in EEPROM\n");
+		dev_warn(&adapter->pdev->dev,
+			 "Warning: detected DSPD enabled in EEPROM\n");
 	}
 
 	ret_val = e1000_read_nvm(hw, NVM_INIT_3GIO_3, 1, &buf);
 	if (le16_to_cpu(buf) & (3 << 2)) {
 		/* ASPM enable */
-		e_warn("Warning: detected ASPM enabled in EEPROM\n");
+		dev_warn(&adapter->pdev->dev,
+			 "Warning: detected ASPM enabled in EEPROM\n");
 	}
 }
 

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] e1000e: avoid duplicated output of device name in kernel warning
@ 2008-08-29  0:01 Jeff Kirsher
  2008-09-03 14:10 ` Jeff Garzik
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff Kirsher @ 2008-08-29  0:01 UTC (permalink / raw)
  To: jeff; +Cc: netdev, davem, Frans Pop, Andrew Morton, Jeff Kirsher

From: Frans Pop <elendil@planet.nl>

With 2.6.27-rc3 I noticed the following messages in my boot log:

0000:01:00.0: 0000:01:00.0: Warning: detected DSPD enabled in EEPROM
0000:01:00.0: eth0: (PCI Express:2.5GB/s:Width x1) 00:16:76:04:ff:09

The second seems correct, but the first has a silly repetition of the
PCI device before the actual message. The message originates from
e1000_eeprom_checks in e1000e/netdev.c.

With this patch below the first message becomes

  e1000e 0000:01:00.0: Warning: detected DSPD enabled in EEPROM

which makes it similar to directly preceding messages.

Use dev_warn instead of e_warn in e1000_eeprom_checks() as the interface
name has not yet been assigned at that point.

Signed-off-by: Frans Pop <elendil@planet.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/e1000e/netdev.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index d266510..4563f34 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -4335,13 +4335,15 @@ static void e1000_eeprom_checks(struct e1000_adapter *adapter)
 	ret_val = e1000_read_nvm(hw, NVM_INIT_CONTROL2_REG, 1, &buf);
 	if (!(le16_to_cpu(buf) & (1 << 0))) {
 		/* Deep Smart Power Down (DSPD) */
-		e_warn("Warning: detected DSPD enabled in EEPROM\n");
+		dev_warn(&adapter->pdev-dev,
+		         "Warning: detected DSPD enabled in EEPROM\n");
 	}
 
 	ret_val = e1000_read_nvm(hw, NVM_INIT_3GIO_3, 1, &buf);
 	if (le16_to_cpu(buf) & (3 << 2)) {
 		/* ASPM enable */
-		e_warn("Warning: detected ASPM enabled in EEPROM\n");
+		dev_warn(&adapter->pdev->dev,
+		         "Warning: detected ASPM enabled in EEPROM\n");
 	}
 }
 


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] e1000e: avoid duplicated output of device name in kernel warning
  2008-08-29  0:01 [PATCH] e1000e: avoid duplicated output of device name in kernel warning Jeff Kirsher
@ 2008-09-03 14:10 ` Jeff Garzik
  2008-09-03 14:43   ` Frans Pop
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff Garzik @ 2008-09-03 14:10 UTC (permalink / raw)
  To: Jeff Kirsher; +Cc: netdev, davem, Frans Pop, Andrew Morton

Jeff Kirsher wrote:
> From: Frans Pop <elendil@planet.nl>
> 
> With 2.6.27-rc3 I noticed the following messages in my boot log:
> 
> 0000:01:00.0: 0000:01:00.0: Warning: detected DSPD enabled in EEPROM
> 0000:01:00.0: eth0: (PCI Express:2.5GB/s:Width x1) 00:16:76:04:ff:09
> 
> The second seems correct, but the first has a silly repetition of the
> PCI device before the actual message. The message originates from
> e1000_eeprom_checks in e1000e/netdev.c.
> 
> With this patch below the first message becomes
> 
>   e1000e 0000:01:00.0: Warning: detected DSPD enabled in EEPROM
> 
> which makes it similar to directly preceding messages.
> 
> Use dev_warn instead of e_warn in e1000_eeprom_checks() as the interface
> name has not yet been assigned at that point.
> 
> Signed-off-by: Frans Pop <elendil@planet.nl>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> ---
> 
>  drivers/net/e1000e/netdev.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
> index d266510..4563f34 100644
> --- a/drivers/net/e1000e/netdev.c
> +++ b/drivers/net/e1000e/netdev.c
> @@ -4335,13 +4335,15 @@ static void e1000_eeprom_checks(struct e1000_adapter *adapter)
>  	ret_val = e1000_read_nvm(hw, NVM_INIT_CONTROL2_REG, 1, &buf);
>  	if (!(le16_to_cpu(buf) & (1 << 0))) {
>  		/* Deep Smart Power Down (DSPD) */
> -		e_warn("Warning: detected DSPD enabled in EEPROM\n");
> +		dev_warn(&adapter->pdev-dev,
> +		         "Warning: detected DSPD enabled in EEPROM\n");

breaks build, should be "pdev->dev"



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] e1000e: avoid duplicated output of device name in kernel warning
  2008-09-03 14:10 ` Jeff Garzik
@ 2008-09-03 14:43   ` Frans Pop
  0 siblings, 0 replies; 4+ messages in thread
From: Frans Pop @ 2008-09-03 14:43 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Jeff Kirsher, netdev, davem, Andrew Morton

On Wednesday 03 September 2008, Jeff Garzik wrote:
> Jeff Kirsher wrote:
> > From: Frans Pop <elendil@planet.nl>
> >
> > With 2.6.27-rc3 I noticed the following messages in my boot log:
> >
> > 0000:01:00.0: 0000:01:00.0: Warning: detected DSPD enabled in EEPROM
> > 0000:01:00.0: eth0: (PCI Express:2.5GB/s:Width x1) 00:16:76:04:ff:09
> >
> > The second seems correct, but the first has a silly repetition of the
> > PCI device before the actual message. The message originates from
> > e1000_eeprom_checks in e1000e/netdev.c.
> >
> > With this patch below the first message becomes
> >
> >   e1000e 0000:01:00.0: Warning: detected DSPD enabled in EEPROM
> >
> > which makes it similar to directly preceding messages.
> >
> > Use dev_warn instead of e_warn in e1000_eeprom_checks() as the
> > interface name has not yet been assigned at that point.
> >
> > Signed-off-by: Frans Pop <elendil@planet.nl>
> > Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> > Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> > ---
> >
> >  drivers/net/e1000e/netdev.c |    6 ++++--
> >  1 files changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/net/e1000e/netdev.c
> > b/drivers/net/e1000e/netdev.c index d266510..4563f34 100644
> > --- a/drivers/net/e1000e/netdev.c
> > +++ b/drivers/net/e1000e/netdev.c
> > @@ -4335,13 +4335,15 @@ static void e1000_eeprom_checks(struct
> > e1000_adapter *adapter) ret_val = e1000_read_nvm(hw,
> > NVM_INIT_CONTROL2_REG, 1, &buf); if (!(le16_to_cpu(buf) & (1 << 0)))
> > {
> >  		/* Deep Smart Power Down (DSPD) */
> > -		e_warn("Warning: detected DSPD enabled in EEPROM\n");
> > +		dev_warn(&adapter->pdev-dev,
> > +		         "Warning: detected DSPD enabled in EEPROM\n");
>
> breaks build, should be "pdev->dev"

It was correct in the original patch I submitted and IIRC Andrew already 
noticed that error and added a "fixup" patch in his tree.

Cheers.
FJP

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-09-03 14:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-29  0:01 [PATCH] e1000e: avoid duplicated output of device name in kernel warning Jeff Kirsher
2008-09-03 14:10 ` Jeff Garzik
2008-09-03 14:43   ` Frans Pop
  -- strict thread matches above, loose matches on Subject: below --
2008-08-18 10:19 e1000e: Silly repetition of PCI name in log message Frans Pop
2008-08-25 18:02 ` [PATCH] e1000e: Avoid duplicated output of device name in kernel warning Frans Pop

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).