Date: Sun, 25 Nov 2001 04:20:41 -0800 From: Nick Sayer <nsayer@quack.kfu.com> To: freebsd-net@freebsd.org Subject: Help! if_dc is driving me insane Message-ID: <3C00E219.30203@quack.kfu.com>
next in thread | raw e-mail | index | archive | help
I have a Znyx quad 21143 card. dc0: <Intel 21143 10/100BaseTX> port 0xd800-0xd87f mem 0xdf000000-0xdf0003ff irq 12 at device 4.0 on pci2 dc0: Ethernet address: 00:c0:95:e1:af:10 miibus0: <MII bus> on dc0 dcphy0: <Intel 21143 NWAY media interface> on miibus0 dcphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto (the other 3 ports look pretty much the same) None of the ports on this card will in any way correctly connect to a 10baseT half duplex hub. I have to lie and tell it that it's connecting at full-duplex, which sort of works, but drops lots of frames. I have poked around the driver trying to fix this, but have utterly failed. There are at least two different code paths that appear to be being used to fiddle with the registers pertaining to this. One code path is in /sys/pci/if_dc.c, the other is in /sys/dev/mii/dcphy.c. Both code paths appear to do the same sorts of operations in a different order. Both, according to my tombstoning, are actually being used :-( . The bit in if_dc.c leaves out setting or clearing DC_NETCFG_FULLDUPLEX (but having it do that does not fix the problem), and both code paths appear to me to be using the wrong constant for DC_10BTCTRL. The Intel datasheet does indeed says 0x7F3F, but I don't see why the correct value isn't 0x7F7D (0x7F3F does not set the half-duplex bit, but turns on internal loopback instead, according to the datasheet). Changing this value doesn't appear to fix it either. I am left to ponder the purpose of dc_apply_fixup(), which appears to do things that are so mysterious that I can do nothing but throw my hands up in defeat and dispair. I tried looking at the NetBSD driver, but it is also maze twisty of alike a passages all. Oh, and for extra credit, the LEDs on the card don't work right either. But I don't even care about that so long as "ifconfig dc2 media 10baseT/UTP" would just do the right thing. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C00E219.30203>