Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Jan 2001 01:08:45 -0800 (PST)
From:      Oliver Crow <ocrow@skymind.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: SiS630E / SiS 900 Ethernet MAC address all zeros
Message-ID:  <Pine.BSF.4.21.0101110057140.88382-100000@iguana.skymind.com>
In-Reply-To: <Pine.BSF.4.21.0012011724340.75528-100000@iguana.skymind.com>

next in thread | previous in thread | raw e-mail | index | archive | help


Following up to my earlier question (see below) Ben Hochstrasser pointed
out that one can set a MAC address manually.  Whilst this isn't quite as
nice as getting the hardware address correctly, it provides a very
reasonable workaround:

$ ifconfig dc0 lladdr 60:00:00:00:00:00

Ben also pointed out that there is an official locally administered
address (LAA) range -- 40:00:00:00:00:00 to 7F:FF:FF:FF:FF:FF that can be
used when the hardware address is for some reason unavailable.

Thanks Ben,

Oliver


On Fri, 1 Dec 2000, Oliver Crow wrote:

> 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: <SiS 900 10/100BaseTX> 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.  It works
> fine except that the other stations on the network get all zero's as the
> Mac address for that station, which (I imagine) could cause some problems.
> 
> 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, which is where
> the FreeBSD driver wants to find it. On the SiS630 the MAC address is
> stored in the "APC CMOS RAM", whatever that is.  That's where the updated
> Linux driver looks if it detects a SiS630e chipset.
> 
> 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
> 
> Here's the source code URLs:
> http://www.sis.com.tw/ftp/Drivers/linux/630s/sis900.c
> http://www.sis.com.tw/ftp/Drivers/linux/630s/sis900.h
> 
> The functions I'm looking at are:
> sis900_get_mac_addr()  : line 209 -- get address the old way
> sis630e_get_mac_addr() : line 231 -- get address on the 630e chipset





To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0101110057140.88382-100000>