I have a MAC to MAC MII interface between MPC8569 processor and BCM68610 controller , whose schematic design is followed from here. My linux kernel version is 2.6.32.
I want to ping one device from another. I have worked with MAC to PHY MII interface and it is working.
On processor side I have Ethernet port as eth2. I assigned IP to both devices in same network. (192.168.8.0/24)
According to guideline, I have to run this link in full duplex mode. So I checked output of ethtool
ethtool eth2
this is my output
Supported ports: [ ]
Supported link modes: 10baseT/Half
100baseT/Full
Supports auto-negotiation: No
Advertised link modes: 10baseT/Half
100baseT/Full
Advertised auto-negotiation: No
Speed: Unknown! (28271)
Duplex: Unknown! (110)
Port: MII
PHYAD: 67
Transceiver: external
Auto-negotiation: off
Current message level: 0x0000003f (63)
Link detected: yes
It can not detect Speed and Duplex setting. In case of MAC to PHY MII interface, PHY configure this in kernel. What should be done in case of MAC to MAC MII interface ?
EDIT
I forcefully set the speed and duplex settings of link by editing driver/net/ucc_geth.c function in kernel source code. I made these changes in init_phy() function
if (priv->phy_interface==PHY_INTERFACE_MODE_MII){
phydev->supported &= (ADVERTISED_10baseT_Half |
ADVERTISED_10baseT_Full |
ADVERTISED_100baseT_Half |
ADVERTISED_100baseT_Full);
// here I am setting speed and duplex
phydev->speed = SPEED_100;
phydev->duplex = DUPLEX_FULL;
phydev->advertising = phydev->supported;
priv->phydev = phydev;
return 0;
}
After doing this, In output of ethtool eth2, speed and duplex fields were changed to
Speed: 100 Mb/s
Duplex: FULL
But still, I am not able to ping another device.
Aucun commentaire:
Enregistrer un commentaire