From owner-freebsd-hardware@FreeBSD.ORG Wed Aug 6 04:21:55 2003 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9FC9F37B401 for ; Wed, 6 Aug 2003 04:21:55 -0700 (PDT) Received: from anchor-post-39.mail.demon.net (anchor-post-39.mail.demon.net [194.217.242.80]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8903643F93 for ; Wed, 6 Aug 2003 04:21:54 -0700 (PDT) (envelope-from darren@dazdaz.org) Received: from no-dns-yet.demon.co.uk ([62.49.203.115] helo=localhost) by anchor-post-39.mail.demon.net with esmtp (Exim 3.36 #2) id 19kMMb-00051L-0U for freebsd-hardware@freebsd.org; Wed, 06 Aug 2003 12:21:53 +0100 Date: Wed, 6 Aug 2003 12:21:39 +0100 From: Darren X-Mailer: The Bat! (v1.61) X-Priority: 3 (Normal) Message-ID: <3110704552.20030806122139@dazdaz.org> To: "freebsd-hardware@freebsd.org" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: 3c900 NIC statistics X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Darren List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Aug 2003 11:21:55 -0000 Hi, I would like to dump all possible statistics for my 3Com NIC. $ sudo /usr/X11R6/bin/scanpci | grep -1 3Com pci bus 0x0000 cardnum 0x0d function 0x00: vendor 0x10b7 device 0x9001 3Com Corporation 3c900 Combo [Boomerang] $ sudo pciconf -l | grep xl0 xl0@pci0:13:0: class=0x020000 card=0x00000000 chip=0x900110b7 rev=0x00 hdr=0x00 Ideally i'd like to be able to find out firmware version, which interface port is active and all the rest of the settings as i've yet to find a FreeBSD program that will tell me these details. This the driver code. /usr/src/sys/pci/if_xl.c /usr/src/sys/pci/if_xlreg.h I would presume it's a case of reading the structure, finding the offset and feeding it into pcitweak. This is the bit where I get lost, is my approach correct or am I off? If so why and can anyone help me to decode this some more, it's proving to be an interesting learning exercise. $ sudo /usr/X11R6/bin/pcitweak -r 00:0d:0 60 Ultimately this could turn into a useful 3Com diagnostic program. One day I would like to be able to understand how to change some of these NIC options without booting to a DOS bootdisk although i'm not sure if a reboot would be required or not after a change had been made. -- Best regards, Darren mailto:darren@dazdaz.org