Bug#511395: mii-tool: link parter capabilities wrong

2009-10-02 Thread Ben Hutchings
Yes, the 1000BASE-T capabilities are clearly the wrong way round.

Patch:

--- net-tools-1.60.orig/mii-tool.c
+++ net-tools-1.60/mii-tool.c
@@ -355,9 +355,9 @@
printf(remote fault, );
printf((bmsr  MII_BMSR_LINK_VALID) ? link ok : no link);
printf(\n  capabilities:%s, media_list(bmsr  6, bmcr2, 0));
-   printf(\n  advertising: %s, media_list(advert, lpa2  2, 0));
+   printf(\n  advertising: %s, media_list(advert, bmcr2, 0));
if (lkpar  MII_AN_ABILITY_MASK)
-   printf(\n  link partner:%s, media_list(lkpar, bmcr2, 0));
+   printf(\n  link partner:%s, media_list(lkpar, lpa2  2, 0));
printf(\n);
 }
 fflush(stdout);
--- END ---

Ben.

-- 
Ben Hutchings
Who are all these weirdos? - David Bowie, about L-Space IRC channel #afp


signature.asc
Description: This is a digitally signed message part


Bug#511395: mii-tool: link parter capabilities wrong

2009-01-23 Thread Bjørn Mork
Package: net-tools
Version: 1.60-22
Followup-For: Bug #511395

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Just some additional data points for this bug.

This interface is connected to a 100baseTx switch port. mii-tool shows
the correct negotiation result, but seems to mixup the advertised modes
and the link partner capabilities:

klodrik:~# mii-tool -v eth0
eth0: negotiated 100baseTx-FD, link ok
  product info: vendor 00:13:74, model 1 rev 5
  basic mode:   autonegotiation enabled
  basic status: autonegotiation complete, link ok
  capabilities: 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
  advertising:  100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control
  link partner: 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD


ethtool gets the advertised modes right, but doesn't show the link partner's 
capabilities:
  
klodrik:~# 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 auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: g
Wake-on: d
Current message level: 0x003f (63)
Link detected: yes

The driver is atl1 if that matters (dont' think so - see below):

klodrik:~# lspci -vvnns 02:00.0
02:00.0 Ethernet controller [0200]: Attansic Technology Corp. L1 Gigabit 
Ethernet Adapter [1969:1048] (rev b0)
Subsystem: ASUSTeK Computer Inc. Device [1043:8226]
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-
Latency: 0, Cache Line Size: 32 bytes
Interrupt: pin A routed to IRQ 1276
Region 0: Memory at febc (64-bit, non-prefetchable) [size=256K]
Expansion ROM at feba [disabled] [size=128K]
Capabilities: [40] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA 
PME(D0-,D1-,D2-,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [48] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 
Enable+
Address: fee0100c  Data: 4191
Capabilities: [58] Express (v1) Endpoint, MSI 00
DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s 4us, L1 
unlimited
ExtTag- AttnBtn+ AttnInd+ PwrInd+ RBE- FLReset-
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- 
Unsupported-
RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
MaxPayload 128 bytes, MaxReadReq 512 bytes
DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr+ 
TransPend-
LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 
unlimited, L1 unlimited
ClockPM- Suprise- LLActRep- BwNot-
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ 
DLActive- BWMgmt- ABWMgmt-
Capabilities: [6c] Vital Product Data ?
Capabilities: [100] Advanced Error Reporting ?
Kernel driver in use: atl1
Kernel modules: atl1

The switch shows these properties on the connected port:

c2950a#sh interfaces Fa0/20 capabilities 
FastEthernet0/20
  Model: WS-C2950G-24-EI
  Type:  10/100BaseTX
  Speed: 10,100,auto
  Duplex:half,full,auto
  UDLD:  yes
  Trunk encap. type: 802.1Q
  Trunk mode:on,off,desirable,nonegotiate
  Channel:   yes
  Broadcast suppression: percentage(0-100)
  Flowcontrol:   rx-(none),tx-(none)
  Fast Start:yes
  CoS rewrite:   yes
  ToS rewrite:   yes
  Inline power:  no
  SPAN:  source/destination
  PortSecure:Yes
  Dot1x: Yes

c2950a#sh interfaces Fa0/20 transceiver properties 
Name : Fa0/20
Administrative Speed: auto
Administrative Duplex: auto
Administrative Auto-MDIX: N/A 
Operational Speed: 100
Operational Duplex: full
Operational Auto-MDIX: N/A 


Example from another box having the same net-tools version, but another driver 
and switchport (1000BaseT capable):

canardo:/home/bjorn# mii-tool -v eth1
eth1: negotiated flow-control, link ok
  product info: Yukon 88E1011 rev 5
  basic mode:   

Bug#511395: mii-tool: link parter capabilities wrong

2009-01-10 Thread Kurt Roeckx
Package: mii-tool
Version: 1.60-22

Hi,

When looking at mii-tool -v's output, I see:
eth0: negotiated 100baseTx-FD flow-control, link ok
  product info: Yukon 88E1011 rev 5
  basic mode:   autonegotiation enabled
  basic status: autonegotiation complete, link ok
  capabilities: 1000baseT-HD 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 
10baseT-HD
  advertising:  100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control
  link partner: 1000baseT-HD 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 
10baseT-HD flow-control


The switch I'm using only supports 100 mbit, but the card itself
supports gigabit.

So the link partner advertising 1000baseT-HD looks wrong to me.

On the other hand, I only seem to be advertising 100baseTx-FD while
I can do 100baseTx-FD.  It looks like those 2 lines are inverted?

Anyway, ethtool shows:
Supported link modes:   10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Advertised link modes:  10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full

Which makes more sense.  However, it doesn't show the link
partner.


Looking at an other host, I see:
eth0: negotiated 100baseTx-FD, link ok
  product info: vendor 00:00:00, model 0 rev 0
  basic mode:   autonegotiation enabled
  basic status: autonegotiation complete, link ok
  capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
  advertising:  100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
  link partner: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control


Which seems to suggest that the flow-control part is
at the correct line.


Kurt




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org