Skip to contentSkip to conversation

3.0.0rc6: ethtool not working without a cable

DISCUSSION Arkadiusz Miskiewicz 3 participants 10 messages Jul 6, 2011 – Jul 20, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

3.0.0rc6, thinkpad t400 notebook.

If there is no cable then ethtool reports no device. It wasn't that before AFAIK.

ethtool version 2.6.36

cable disconnected:

[root@t400 ~]# ethtool eth0
Settings for eth0:
Cannot get device settings: No such device Cannot get wake-on-lan settings: No such device Cannot get message level: No such device Cannot get link status: No such device No data available
zsh: exit 75 ethtool eth0
[root@t400 ~]# ethtool -i eth0
Cannot get driver information: No such device
zsh: exit 71 ethtool -i eth0

cable connected:

[root@t400 ~]# ethtool -i eth0
driver: e1000e
version: 1.3.10-k2
firmware-version: 1.8-3
bus-info: 0000:00:19.0
[root@t400 ~]# ethtool eth0
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full 1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full 1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 2
Transceiver: internal
Auto-negotiation: on
MDI-X: off
Supports Wake-on: pumbg
Wake-on: d
Current message level: 0x00000001 (1)
drv
Link detected: yes

Signature · 2 lines
Arkadiusz Miśkiewicz        PLD/Linux Team
arekm / maven.pl            http://ftp.pld-linux.org/
#1 lore raw
Quoted 10 lines · Arkadiusz Miskiewicz

3.0.0rc6, thinkpad t400 notebook.

If there is no cable then ethtool reports no device. It wasn't that before AFAIK.

ethtool version 2.6.36

cable disconnected:

Quoted 11 lines

[root@t400 ~]# ethtool eth0
Settings for eth0:
Cannot get device settings: No such device Cannot get wake-on-lan settings: No such device Cannot get message level: No such device Cannot get link status: No such device No data available
zsh: exit 75 ethtool eth0
[root@t400 ~]# ethtool -i eth0
Cannot get driver information: No such device
zsh: exit 71 ethtool -i eth0

[...]

Then there really isn't a device under that name. Maybe the driver is getting a bogus MAC address, so that the device is renamed by udev.

Check which devices do exist, and the MAC addresses they have, using 'ip link'.

Ben.

Signature · 3 lines
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
#2 lore raw
Quoted 23 lines · Ben Hutchings
Quoted 10 lines · Arkadiusz Miskiewicz

3.0.0rc6, thinkpad t400 notebook.

If there is no cable then ethtool reports no device. It wasn't that before AFAIK.

ethtool version 2.6.36

cable disconnected:

Quoted 11 lines

[root@t400 ~]# ethtool eth0
Settings for eth0:
Cannot get device settings: No such device Cannot get wake-on-lan settings: No such device Cannot get message level: No such device Cannot get link status: No such device No data available
zsh: exit 75 ethtool eth0
[root@t400 ~]# ethtool -i eth0
Cannot get driver information: No such device
zsh: exit 71 ethtool -i eth0

Quoted 4 lines

[...]

Then there really isn't a device under that name. Maybe the driver is getting a bogus MAC address, so that the device is renamed by udev.

No, no, device exists:

[arekm@t400 ~]$ ip l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN

    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state 
DOWN qlen 1000
    link/ether 00:21:86:a2:19:06 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc sfq state UP qlen 
1000
    link/ether 00:16:eb:05:5d:08 brd ff:ff:ff:ff:ff:ff

[arekm@t400 ~]$ ethtool eth0
Settings for eth0:
Cannot get device settings: No such device Cannot get wake-on-lan settings: No such device Cannot get message level: No such device Cannot get link status: No such device No data available
zsh: exit 75 ethtool eth0
[arekm@t400 ~]$

Signature · 1 line
Arkadiusz Miśkiewicz
#3 lore raw
Quoted 40 lines · Arkadiusz Miskiewicz
Quoted 23 lines · Ben Hutchings
Quoted 10 lines · Arkadiusz Miskiewicz

3.0.0rc6, thinkpad t400 notebook.

If there is no cable then ethtool reports no device. It wasn't that before AFAIK.

ethtool version 2.6.36

cable disconnected:

Quoted 11 lines

[root@t400 ~]# ethtool eth0
Settings for eth0:
Cannot get device settings: No such device Cannot get wake-on-lan settings: No such device Cannot get message level: No such device Cannot get link status: No such device No data available
zsh: exit 75 ethtool eth0
[root@t400 ~]# ethtool -i eth0
Cannot get driver information: No such device
zsh: exit 71 ethtool -i eth0

Quoted 4 lines

[...]

Then there really isn't a device under that name. Maybe the driver is getting a bogus MAC address, so that the device is renamed by udev.

No, no, device exists:

[arekm@t400 ~]$ ip l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN

    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state 
DOWN qlen 1000
    link/ether 00:21:86:a2:19:06 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc sfq state UP qlen 
1000
    link/ether 00:16:eb:05:5d:08 brd ff:ff:ff:ff:ff:ff
Quoted 9 lines

[arekm@t400 ~]$ ethtool eth0
Settings for eth0:
Cannot get device settings: No such device Cannot get wake-on-lan settings: No such device Cannot get message level: No such device Cannot get link status: No such device No data available
zsh: exit 75 ethtool eth0
[arekm@t400 ~]$

Then the only other explanation I can think of is that the driver has 'detached' the device due to some kind of error. The ethtool core does have a check for that.

Ben.

Signature · 3 lines
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
#4 lore raw
Quoted 9 lines · Ben Hutchings
Quoted 8 lines · Arkadiusz Miskiewicz
Quoted 7 lines · Ben Hutchings
Quoted 6 lines · Arkadiusz Miskiewicz

3.0.0rc6, thinkpad t400 notebook.

If there is no cable then ethtool reports no device. It wasn't that before AFAIK.

ethtool version 2.6.36

snip

Quoted 3 lines

Then the only other explanation I can think of is that the driver has 'detached' the device due to some kind of error. The ethtool core does have a check for that.

could it be that aspm is enabled or that you've enabled runtime power management?

#5 lore raw
Quoted 11 lines · Jesse
Quoted 9 lines · Ben Hutchings
Quoted 8 lines · Arkadiusz Miskiewicz
Quoted 7 lines · Ben Hutchings
Quoted 6 lines · Arkadiusz Miskiewicz

3.0.0rc6, thinkpad t400 notebook.

If there is no cable then ethtool reports no device. It wasn't that before AFAIK.

ethtool version 2.6.36

Quoted 7 lines

snip

Quoted 3 lines

Then the only other explanation I can think of is that the driver has 'detached' the device due to some kind of error. The ethtool core does have a check for that.

could it be that aspm is enabled

I have CONFIG_PCIEASPM=y

Quoted 2 lines

or that you've enabled runtime power
management?

In e1000e? no (unless it's default somehow).

Signature · 2 lines
Arkadiusz Miśkiewicz        PLD/Linux Team
arekm / maven.pl            http://ftp.pld-linux.org/
#6 lore raw
Quoted 18 lines · Arkadiusz Miskiewicz
Quoted 17 lines · Jesse
Quoted 9 lines · Ben Hutchings
Quoted 8 lines · Arkadiusz Miskiewicz
Quoted 7 lines · Ben Hutchings
Quoted 6 lines · Arkadiusz Miskiewicz

3.0.0rc6, thinkpad t400 notebook.

If there is no cable then ethtool reports no device. It wasn't that before AFAIK.

ethtool version 2.6.36

snip

Quoted 3 lines

Then the only other explanation I can think of is that the driver has 'detached' the device due to some kind of error. The ethtool core does have a check for that.

Quoted 8 lines
Quoted 1 line

could it be that aspm is enabled

I have CONFIG_PCIEASPM=y

Quoted 2 lines

or that you've enabled runtime power
management?

In e1000e? no (unless it's default somehow).

And if this is normal behaviour (when apsm is enabled) then maybe ethtool could disable apsm/power management for device for time of querying?

Signature · 2 lines
Arkadiusz Miśkiewicz        PLD/Linux Team
arekm / maven.pl            http://ftp.pld-linux.org/
#7 lore raw
Quoted 23 lines · Arkadiusz Miskiewicz
Quoted 22 lines · Arkadiusz Miskiewicz
Quoted 11 lines · Jesse
Quoted 9 lines · Ben Hutchings
Quoted 8 lines · Arkadiusz Miskiewicz
Quoted 7 lines · Ben Hutchings
Quoted 6 lines · Arkadiusz Miskiewicz

3.0.0rc6, thinkpad t400 notebook.

If there is no cable then ethtool reports no device. It wasn't that before AFAIK.

ethtool version 2.6.36

Quoted 7 lines

snip

Quoted 3 lines

Then the only other explanation I can think of is that the driver has 'detached' the device due to some kind of error. The ethtool core does have a check for that.

could it be that aspm is enabled

I have CONFIG_PCIEASPM=y

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

or that you've enabled runtime power
management?

In e1000e? no (unless it's default somehow).

And if this is normal behaviour (when apsm is enabled) then maybe ethtool could disable apsm/power management for device for time of querying?

No, it's a driver bug if the device comes up in a 'detached' state.

Ben.

Signature · 3 lines
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
#8 lore raw
In reply to Arkadiusz Miskiewicz
Quoted 9 lines · Arkadiusz Miskiewicz
Quoted 8 lines · Ben Hutchings
Quoted 8 lines

If there is no cable then ethtool reports no device. It wasn't that before AFAIK.

ethtool version 2.6.36

cable disconnected:

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines

[root@t400 ~]# ethtool eth0
Settings for eth0:
Cannot get device settings: No such device Cannot get wake-on-lan settings: No such device Cannot get message level: No such device Cannot get link status: No such device No data available
zsh: exit 75 ethtool eth0
[root@t400 ~]# ethtool -i eth0
Cannot get driver information: No such device
zsh: exit 71 ethtool -i eth0

please check lspci -vvv on your device when cable is unplugged. I'm wondering if OSPM (os power management) is kicking in (if enabled in your kernel) and somehow interacting badly with ethtool.

if the device is in D3, then most ethtool stuff won't work, since all the registers in the device (except in config space) don't work when in D3.

#9 lore raw
Quoted 22 lines · Jesse
Quoted 9 lines · Arkadiusz Miskiewicz
Quoted 8 lines · Ben Hutchings
Quoted 8 lines

If there is no cable then ethtool reports no device. It wasn't that before AFAIK.

ethtool version 2.6.36

cable disconnected:

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines

[root@t400 ~]# ethtool eth0
Settings for eth0:
Cannot get device settings: No such device Cannot get wake-on-lan settings: No such device Cannot get message level: No such device Cannot get link status: No such device No data available
zsh: exit 75 ethtool eth0
[root@t400 ~]# ethtool -i eth0
Cannot get driver information: No such device
zsh: exit 71 ethtool -i eth0

Quoted 6 lines

please check lspci -vvv on your device when cable is unplugged. I'm wondering if OSPM (os power management) is kicking in (if enabled in your kernel) and somehow interacting badly with ethtool.

if the device is in D3, then most ethtool stuff won't work, since all the registers in the device (except in config space) don't work when in D3.

00:19.0 Ethernet controller: Intel Corporation 82567LM Gigabit Network Connection (rev 03)
Subsystem: Lenovo Device 20ee
Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR+ FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Interrupt: pin A routed to IRQ 20
Region 0: Memory at fc000000 (32-bit, non-prefetchable) [disabled]
[size=128K]

        Region 1: Memory at fc025000 (32-bit, non-prefetchable) [disabled] 

[size=4K]
Region 2: I/O ports at 1840 [disabled] [size=32]
Capabilities: [c8] Power Management version 2
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA
PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D3 NoSoftRst- PME-Enable+ DSel=0 DScale=1 PME-
Capabilities: [d0] MSI: Enable- Count=1/1 Maskable- 64bit+
Address: 00000000fee0300c Data: 41c5
Capabilities: [e0] PCI Advanced Features
AFCap: TP+ FLR+
AFCtrl: FLR-
AFStatus: TP-
Kernel driver in use: e1000e
Kernel modules: e1000e

Signature · 2 lines
Arkadiusz Miśkiewicz        PLD/Linux Team
arekm / maven.pl            http://ftp.pld-linux.org/