From owner-freebsd-hardware Tue Nov 21 21:55:59 2000 Delivered-To: freebsd-hardware@freebsd.org Received: from iguana.skymind.com (adsl-216-103-84-145.dsl.snfc21.pacbell.net [216.103.84.145]) by hub.freebsd.org (Postfix) with ESMTP id 36CCE37B4CF for ; Tue, 21 Nov 2000 21:55:53 -0800 (PST) Received: from localhost (localhost.skymind.com [127.0.0.1]) by iguana.skymind.com (8.9.3/8.9.3) with ESMTP id VAA02915 for ; Tue, 21 Nov 2000 21:55:52 -0800 (PST) (envelope-from ocrow@skymind.com) Date: Tue, 21 Nov 2000 21:55:52 -0800 (PST) From: Oliver Crow To: freebsd-hardware@freebsd.org Subject: SiS630E / SiS 900 Ethernet MAC address all zeros Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hardware@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi, I have an Asus CUSI-FX motherboard based on the SiS630E chipset. I'm trying to get the onboard ethernet working. Evidently the SiS630E chipset includes a variant of the SiS 900 network hardware. The kernel recognizes the network device thusly: sis0: port 0xd400-0xd4ff mem 0xeb800000-0xeb800fff irq 10 at device 1.1 on pci0 sis0: Ethernet address: 00:00:00:00:00:00 So, the driver loads, but the MAC address isn't set correctly. On the SiS site they have an updated ('beta') version of the Linux SiS 900 driver that's supposed to handle the SiS630E chipset. Comparing the updated driver with the original Linux driver and the new FreeBSD driver, I discovered that there is a change in the way the ethernet address is stored between the old SiS 900 NIC and the newer SiS630 series chipsets. On the SiS 900 the MAC address was stored in the EEPROM. On the SiS630 the MAC address is stored in the "APC CMOS RAM", whatever that is. Evidently the trick to getting the MAC address is to set some flag in the SiS PCI/ISA bridge, then do some mysterious jigger-ing with inb and outb. I don't know much about kernel hacking, you understand. So my questions are: 1) What is the FreeBSD equivalent of the Linux pci_find_device() function? -- ie get a pci device address from the vendor and product IDs 2) Is use of inb and outb basically the same as in Linux? 3) What the heck is the Linux code doing? Also there seem to be some other 630E specific code sections in the Linux driver, to handle "bugs on default value of PHY registers" and the "630E equalizer workaroung rule". Are these important, I wonder? The updated 630E Linux driver is available for download on this page: http://www.sis.com.tw/support/download/linux.htm#linuxlan Oliver To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hardware" in the body of the message