On our custom AVR32 board, we've a pair of NatSemi DP83848 PHYs.
dmesg shows the following:-
eth0: Atmel MACB at 0xfff01800 irq 25 (00:19:66:88:76:a4)
eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:01, irq=-1)
macb macb.1: invalid hw address, using random
eth1: Atmel MACB at 0xfff01c00 irq 26 (42:36:af:ab:e4:b5)
eth1: attached PHY driver [Generic PHY] (mii_bus:phy_addr=1:03, irq=-1)
Can anyone shed some light on how I might read / write the PHY registers from userspace ?
I've looked at ethtool, but it doesn't appear to work:-
# ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
Advertised auto-negotiation: Yes
Link detected: yes
# ethtool -d eth0
Cannot get register dump: Operation not supported
Anyone got some sample code (I guess using sockets and ioctl calls ?) I could take a look at ?