Subject: Re: wm(4) versus em(4)
To: Brian Buhrow <buhrow@lothlorien.nfbcal.org>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 12/11/2006 14:10:05
--eqp4TxRxnD4KrmFZ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Doh! I thought I'd sent this! Sorry.

On Thu, Dec 07, 2006 at 12:14:30PM -0800, Brian Buhrow wrote:
> 	Hello.  recently, I've been trying to get the wm(4) driver to work
> with  some Intel fiber based gigE cards.  I've been having a lot of troub=
le
> getting the driver to autonegotiate with Cisco 35XX switch gear, and when=
 I
> try to disable autonegotiation, things get even worse.  In looking at the
> driver, it seems like it's out of date with respect to the behaviors of t=
he
> newer Intel 8254x chips, especially the fiber based ones.  The freeBSD and
> OpenBSD folks are using Intel written drivers which seem to deal quite we=
ll
> with the various version of the chip.  At this moment, I'm trying to deci=
de
> if it's easier to whip the wm(4) driver into shape, or if it would be
> easier to port the em(4) driver from OpenBSD to NetBSD.  I'm sort of
> leaning toward the latter, but wanted to ask here if anyone has thoughts =
on
> the matter.  Is there any advantage to retaining the wm(4) driver over
> porting the em(4) driver from Free/OpenBSD? =20
> 	If I were to port the driver, would there be a lot of objection to
> putting it in the tree?

As noted, yes, there'd be objection. The problems are that em lacks a=20
number of optimizations that wm has, and is much larger.

The problem is with phy handling and with borken phys that get used with=20
these chips. The phy is supposed to update the ethernet chip with the=20
result of autonego, but it doesn't work right.

The correct solution would be to detect if the chip and phy disagree about=
=20
link rate (and directionality?), then set the chip manually.

Take care,

Bill

--eqp4TxRxnD4KrmFZ
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (NetBSD)

iD8DBQFFfdc8Wz+3JHUci9cRAilwAJ9LAC/FEIkKQlVDo0ttIVZ3nY1rjgCfSw62
DSjm0FbhenI8jU3vQGhIdfg=
=ECyN
-----END PGP SIGNATURE-----

--eqp4TxRxnD4KrmFZ--