2007-02-26 07:27:12

by Petri T. Koistinen

[permalink] [raw]
Subject: D-Link DGE-528T (r8159) autonegotation of 1000 Mbps link does not work

Hi!

I just brought two D-Link DGE-528T (uses r8159 driver) network adapters
to have nice 1 Gbps home network between two computers.

I have gigabit crossover cable that is connected like this

Pin Connector #1 Connector #2
1 white/orange white/green
2 orange green
3 white/green white/orange
4 blue white/brown
5 white/blue brown
6 green orange
7 white/brown blue
8 brown white/blue
(from: http://logout.sh/computers/net/gigabit/)

and when I use this cable I only get 10 Mbps connection when connected
another D-Link DGE-528T.

However if I connect other end of cable to Intel EtherExpress 100 Mbps
card, I get 100 Mbps connection auto-negotiated OK.

I can however force gigabit link on both D-Link DGE-528T using

insmod ./r8169.ko media=0x10

command. And I get about 15 MiB/s transfer speed when testing
with netcat and pmr[1] (without NAPI). Which I count as some kind of
sucky gigabit connection.

Few questions for you:

Do anyone know if there some known bug in auto-negotiation with
Realtek 8159 chip? (Or is that just wrong cable?)

Can I force 1000 Mbps link on some other way than giving option to
insmod? Using /proc or something?

What kind of transfer speed you have reached with these cards? That
15 MiB/s is not what I expected.

Thanks!

Best regards,
Petri Koistinen

[1]
Test setup:
Server: nc -l -p 2000 </dev/zero
Client: nc 192.168.1.1 2000 | pmr >/dev/null

pmr (ex. pipemeter) is a command line filter that measures
bandwidth going through the pipe:
http://zakalwe.fi/~shd/foss/pmr/pmr-0.12.tar.bz2


2007-02-26 20:03:11

by Francois Romieu

[permalink] [raw]
Subject: Re: D-Link DGE-528T (r8159) autonegotation of 1000 Mbps link does not work

Please Cc: the maintainer from the MAINTAINERS file.

Petri T. Koistinen <[email protected]> :
[...]
> I just brought two D-Link DGE-528T (uses r8159 driver) network adapters
> to have nice 1 Gbps home network between two computers.

- which kernel ?
- dmesg please ?

[...]
> and when I use this cable I only get 10 Mbps connection when connected
> another D-Link DGE-528T.

Try a straight cable between the two D-Link adapters.

[...]
> Do anyone know if there some known bug in auto-negotiation with
> Realtek 8159 chip? (Or is that just wrong cable?)
>
> Can I force 1000 Mbps link on some other way than giving option to
> insmod? Using /proc or something?

mii-tool or (better) ethtool.

[...]
> What kind of transfer speed you have reached with these cards ? That
> 15 MiB/s is not what I expected.

It smells like fast ethernet. Even my old PII does better than that with
a 8169.

Please send 'mii-tool -vv' and/or ethtool output + vmstat 1 during test.

--
Ueimor

2007-02-27 21:49:56

by H. Peter Anvin

[permalink] [raw]
Subject: Re: D-Link DGE-528T (r8159) autonegotation of 1000 Mbps link does not work

Petri T. Koistinen wrote:
> Hi!
>
> I just brought two D-Link DGE-528T (uses r8159 driver) network adapters
> to have nice 1 Gbps home network between two computers.
>
> I have gigabit crossover cable that is connected like this...
>
> Pin Connector #1 Connector #2
> 1 white/orange white/green
> 2 orange green
> 3 white/green white/orange
> 4 blue white/brown
> 5 white/blue brown
> 6 green orange
> 7 white/brown blue
> 8 brown white/blue
> (from: http://logout.sh/computers/net/gigabit/)

That's just plain screwy. Gigabit doesn't use crossover cables *AT
ALL*, although some of them *tolerate* the green and orange pairs being
crossed for compatibility with older crossover cables. However, the
cable above is just plain weird. There is absolutely no reason to cross
the blue and brown pair.

If you know both ends are gigabit, always use a straight-through cable.
If you know at least one end is gigabit (or auto MDI/MDIX), you can
almost always use a straight-through cable as well. Use crossover
cables for 10/100 equipment only.

-hpa