Wednesday, January 04, 2006

SiS Ethernet 0190 [sis190] patch, try 3

SiS Ethernet 0190 [sis190] patch, try 3

Supported (tested) kernels:
2.6.14-1.1653_FC4
2.6.14-1.1656_FC4

Problem:
On original Fedora kernel the module for SiS Ethernet controller model 190/191 hang the system if there is no response on the network, like an DHPC server failure.

Bugzilla:
Number 176969 at http://bugzilla.redhat.com/

1. You need to disable network and reboot, to avoid system hang:

chkconfig --level 345 network off

2. Get and install the kernel source that applies:

3. Unpack the kernel:

cd /usr/src/redhat/SPEC
rpmbuild -bp --target=i686 kernel-2.6.spec

4. Get the SiS driver for Linux
To take the driver by yourself go to SiS download center and chose:
Network Driver -> SiS190 Gigabit & SiS191 LAN -> Linux -> GO
Than proceed to the download of "SiS190 / SiS191 Gigabit LAN / LAN driver for Linux kernal 2.6.9 or later."

5. Extract the file [sis190.c] and make a patch from it:

tar -vxzf sis190191_linux.tar.gz -C /tmp/ # file from SiS
mkdir -p /tmp/a/drivers/net/
mkdir -p /tmp/b/drivers/net/
cp /tmp/sis190_20041220/sis190.c /tmp/b/drivers/net/
cp /usr/src/redhat/BUILD/kernel-2.6.14/linux-2.6.14/drivers/net/sis190.c /tmp/a/drivers/net
cd /tmp/
diff -Nup a/drivers/net/sis190.c b/drivers/net/sis190.c > /usr/src/redhat/SOURCES/linux-2.6-sis190.patch # create a patch file for later
cp /tmp/b/drivers/net/sis190.c /usr/src/redhat/BUILD/kernel-2.6.14/linux-2.6.14/drivers/net/ # this will patch the actual expansion to make a new module right now.

6. Prepare the kernel to compile the modules:

cd /usr/src/redhat/BUILD/kernel-2.6.14/linux-2.6.14/
cp /usr/src/redhat/SOURCES/kernel-2.6.14-i686.config .config # for normal i686
# cp /usr/src/redhat/SOURCES/kernel-2.6.14-i686-smp.config .config # for i686 SMP

5. Compile the modules and copy override the old driver

cd /usr/src/redhat/BUILD/kernel-2.6.14/linux-2.6.14/
make modules
cp /usr/src/redhat/BUILD/kernel-2.6.14/linux-2.6.14/drivers/net/sis190.ko /lib/modules/2.6.14-1.1644_FC4/kernel/drivers/net/sis190.ko # for normal i686
depmode -eaF /boot/System.map-2.6.14-1.1653_FC4 2.6.14-1.1644_FC4 # for normal i686
#cp /usr/src/redhat/BUILD/kernel-2.6.14/linux-2.6.14/drivers/net/sis190.ko /lib/modules/2.6.14-1.1644_FC4smp/kernel/drivers/net/sis190.ko # for i686 SMP
#depmode -eaF /boot/System.map-2.6.14-1.1644_FC4smp 2.6.14-1.1653_FC4smp # for i686 SMP

6. Reenable the network and reboot

chkconfig --level 345 network on
shutdown -r now

Please always address to my hardware, os and kernel patching general procedures before posting a question.

No comments: