e1000e: Silly repetition of PCI name in log message
Subsystems (2)
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.
Is this because e_warn in (which calls e_printk from e1000e/e1000.h) is used before adapter->netdev->name has been properly set? Looks likely as the eeprom checks are done some time before the device is registered.
Other question is why this is a "Warning"? Isn't "Deep Smart Power Down" a desirable feature to have?
Cheers,
FJP
PATCH 1/1 e1000e: Avoid duplicated output of device name in kernel warning
Quoted 7 lines · Frans Pop
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:09The second seems correct, but the first has a silly repetition of the PCI device before the actual message. The message originates from
e1000_eeprom_checksine1000e/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.
Quoted 2 lines
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 <[email protected]>
Use dev_warn instead of e_warn in e1000_eeprom_checks() as the interface name has not yet been assigned at that point.
drivers/net/e1000e/netdev.c +0 -0
@@ -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");
}
}