From owner-freebsd-net Sun Nov 25 4:20:59 2001 Delivered-To: freebsd-net@freebsd.org Received: from quack.kfu.com (quack.kfu.com [205.178.90.194]) by hub.freebsd.org (Postfix) with ESMTP id 0024337B417 for ; Sun, 25 Nov 2001 04:20:47 -0800 (PST) Received: from morpheus.kfu.com (morpheus.kfu.com [205.178.90.238]) by quack.kfu.com (8.11.6/8.11.6) with ESMTP id fAPCKfD36996 (using TLSv1/SSLv3 with cipher EDH-RSA-DES-CBC3-SHA (168 bits) verified OK) for ; Sun, 25 Nov 2001 04:20:42 -0800 (PST) (envelope-from nsayer@quack.kfu.com) Received: from quack.kfu.com (nospam@localhost [::1]) by morpheus.kfu.com (8.11.6/8.11.6) with ESMTP id fAPCKfH55943 for ; Sun, 25 Nov 2001 04:20:41 -0800 (PST) (envelope-from nsayer@quack.kfu.com) Message-ID: <3C00E219.30203@quack.kfu.com> Date: Sun, 25 Nov 2001 04:20:41 -0800 From: Nick Sayer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:0.9.5) Gecko/20011112 X-Accept-Language: en, en-US, en-GB MIME-Version: 1.0 To: freebsd-net@freebsd.org Subject: Help! if_dc is driving me insane Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org I have a Znyx quad 21143 card. dc0: port 0xd800-0xd87f mem 0xdf000000-0xdf0003ff irq 12 at device 4.0 on pci2 dc0: Ethernet address: 00:c0:95:e1:af:10 miibus0: on dc0 dcphy0: 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