D-Link DGE-560SX (Marvell 88E8061-based) doesn't see link

Pyun YongHyeon pyunyh at gmail.com
Fri Aug 21 22:20:13 UTC 2009


On Fri, Aug 21, 2009 at 05:20:39PM +0300, Eugene Perevyazko wrote:
> Hello, Freebsd-net subscribers!
> 
> This is on 7.2-Stable.
> I've got a D-Link DGE-560SX GigE fiber adapter. It's Marvell 88E8061 so
> I hoped it will work as msk(4).
> D-Link has changed PCI Id for the chip:
> none1 at pci0:1:0:0:       class=0x020000 card=0x4b021186 chip=0x4b021186 rev=0x10
> hdr=0x00
>     vendor     = 'D-Link System Inc'
>     device     = 'DGE-560SX PCIe Gigabit Ethernet Adapter'
>     class      = network
>     subclass   = ethernet
> 
> 
> So I've patched the driver to recognize new IDs. 
> 

Your patch looks to me.

[...]

> Then the driver recognizes the card:
> 
> mskc0: <D-Link 560SX Gigabit Ethernet> port 0x4000-0x40ff mem 0xdc100000-0xdc103fff irq 16 at device 0.0 on pci1
> msk0: <Marvell Technology Group Ltd. Yukon XL Id 0xb3 Rev 0x03> on mskc0
> msk0: Ethernet address: 00:21:91:52:4f:09
> miibus1: <MII bus> on msk0
> e1000phy0: <Marvell 88E1112 Gigabit PHY> PHY 0 on miibus1
> e1000phy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This part is problem, you have finer media, so you should have just
1000baseSX.

> mskc0: [FILTER]
> 
> Now I'm stuck because it doesn't see link.
> # ifconfig msk0 up
> # ifconfig -m msk0
> msk0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
>         options=11a<TXCSUM,VLAN_MTU,VLAN_HWTAGGING,TSO4>
>         capabilities=11a<TXCSUM,VLAN_MTU,VLAN_HWTAGGING,TSO4>
>         ether 00:21:91:52:4f:09
>         media: Ethernet autoselect (100baseTX <half-duplex>)
>         status: no carrier
>         supported media:
>                 media autoselect
>                 media 1000baseTX mediaopt full-duplex
>                 media 1000baseTX
>                 media 100baseTX mediaopt full-duplex
>                 media 100baseTX
>                 media 10baseT/UTP mediaopt full-duplex
>                 media 10baseT/UTP
>                 media none
> 
> The adapter is definitely not broken, I've tested it on Win and there it works 
> normally. Also on Win it has no speed/duplex settings, while msk driver allows 
> to change media.
> 

ATM there is no easy/clean way to pass driver specific data to mii
layer in FreeBSD so e1000phy(4) incorrectly thinks it found copper
PHY. Marvell PHYs seem to have no reliable way to know configured
media type of PHY hardware unless parent driver(msk) gives hint to
it. If you have just 1 NIC which uses e1000phy(4) on your system,
modify e1000phy(4) to force it having fiber media by inserting the
following line around line 114 in e1000phy.c. 

sc->mii_flags |= MIIF_HAVEFIBER;

 
> I've also tried Marvell's binary if_myk driver, but it doesn't know about d-link.
> 
> Can anyone propose something to get it working?
> 
> -- 
> Eugene Perevyazko


More information about the freebsd-net mailing list