How To Create The Sis191 Gigabit Ethernet Driver On Linux 2.6
How To Create The Sis191 Gigabit Ethernet Driver On Linux 2.6Sis191 Driver ProblemThis how-to is for those people wich have a sis191 gigabit ethernet integrated interface (on-board LAN), but cannot get sis191 default driver working (actually, the driver is called sis190, the FastEthernet version of this card). My Acer Aspire SA90 is one good example. NOTE: this howto was created using Ubuntu 7.10 with kernel 2.6.22
The ProblemWhen executing modprobe sis190 , under a vanilla 2.6.x kernel (mine is 2.6.22 from ubuntu 7.10), you will see this error: 'Can not find ISA bridge' And no networking interface will be found. If you're unlucky, as I was until I bought a PCI network card, you'll have no network so this how-to will be impossible for you to reach. The reason is that vanilla driver searches for ISA bridge ID 965, but mine is 968, as I saught executing lspci -nn 00:02.0 ISA bridge [0601]: Silicon Integrated Systems [SiS] SiS968 [MuTIOL Media IO] [1039:0968] (rev 01) [...] 00:04.0 Ethernet controller [0200]: Silicon Integrated Systems [SiS] 191 Gigabit Ethernet Adapter [1039:0191] (rev 02) As you can see, I actually have an Ethernet controller model 191 from SIS ;)
The SolutionWe must change the ISA bridge ID from the vanilla driver, from 0x965 to 0x968, or whatever ID you have (see output from lspci) Ignore the sis191 official driver download. It is completely out-of date (see www.sis.com/download, then Download Center > Network Driver : SiS191 Gigabit & SiS190 LAN : Linux) Instead, go to www.kernel.org and grab the .tar.gz file for your current kernel version (see uname -r ). Once uncompressed with tar -xvzf [file.tar.gz] edit the driver' source file in '[kernel_src_folder]/drivers/net/sis190.c'. At line 1576 you'll find this section: * sis190_get_mac_addr_from_apc - Get MAC address for SiS965 model Now change the line isa_bridge = pci_find_device(0x1039, 0x0965, isa_bridge); to isa_bridge = pci_find_device(0x1039, 0x0968, isa_bridge); Or whatever ID you actually have (mine is 0x0968, remember).
Compile And Use The New ModuleNow copy your kernel config file (in ubuntu, located in /boot/config-2.6.22-14-generic) to your kernel source folder, and rename it to ".config". This step might be unnecesary if you know what to do with a kernel source. Now exec make oldconfig and then make modules but quit it using Ctrl+C after 10 seconds or so, in order to avoid compiling the whole kernel tree. If we don't make modules, the temporary files needed to do the next step won't be created. The important thing to build is _only_ our driver, and we can make it executing make drivers/net/sis190.ko This is a "wrong" way of compiling kernel modules, but is the easiest and fastest way. Once compiled, try to load it with insmod drivers/net/sis190.ko You might need to unload first the current, vanilla driver with rmmod sis190 You can see if it has worked by typing dmesg and ifconfig -a Enable the interface manuall (with ifconfig) or automatically (with dhclient or equivalent DHCP client command). Now to permanently install the new driver, copy the sis190.ko file into the modules directory. Mine is located in /lib/modules/2.6.22-14-generic/kernel/drivers/net. But first do a backup of the original one! In order to copy, is as simply as typing cp [kernel_src_folder]/drivers/net/sis190.ko /lib/modules/2.6.22-14-generic/kernel/drivers/net And that's all, folks! Good luck!
|






Recent comments
3 hours 53 min ago
4 hours 28 min ago
6 hours 7 min ago
7 hours 28 min ago
10 hours 43 min ago
11 hours 31 min ago
13 hours 27 min ago
13 hours 33 min ago
14 hours 57 min ago
15 hours 44 min ago