Gutsy, FS V5535 Laptop, ndiswrapper, ssh problems

M. Emal Alekozai memala at gmx.net
Fri Jan 18 17:40:13 UTC 2008


hi,
the nic (SiS191) now works under my FS V5535 laptop. Yiepiiii :-) .
Here is a short howto.

Emal



---INSTALL PATCHED SIS190 DRIVER
Solving the network interface  problem is in general quite simple (if one knows how ;-) ).
For the FS laptop V5535 the file "sis190.c" in the kernel 2.6.24 has a small "bug".
A patch is available to solve this problem.
Ubuntu Gutsy has a 2.6.22 kernel, for the patch the kernel 2.6.24 from Ubuntu Hardy is necessary.
What make the procedure a little complicated is to update the kernel without a network interface over a usb stick from 2.6.22 (Gutsy) to  2.6.24 (Hardy).
All the following commands have to be executed as root.


#*****0. INITIAL STUFF
$ sudo su # become root


#*****1. UPDATE KERNEL FROM 2.6.22 (GUTSY) TO 2.6.24 (HARDY)
# READ:
# - http://ubuntuforums.org/showthread.php?t=646755

####On Ubuntu laptop: Add the Hardy repository
echo 'deb http://archive.ubuntu.com/ubuntu/ hardy main restricted' |sudo tee /etc/apt/sources.list.d/hardy.list

####On computer with internet access: download package list and copy to usb stick
$ cd /media/usbStick/
$ wget -O archive.ubuntu.com_ubuntu_dists_hardy_main_binary-i386_Packages.gz http://archive.ubuntu.com/ubuntu/dists/hardy/main/binary-i386/Packages.gz
$ wget -O archive.ubuntu.com_ubuntu_dists_hardy_restricted_binary-i386_Packages.gz http://archive.ubuntu.com/ubuntu/dists/hardy/restricted/binary-i386/Packages.gz
$ gunzip *.gz

####On Ubuntu laptop: create wget script
$ cd /media/usbStick/
$ cp archive.ubuntu.com_ubuntu_dists_hardy_main_binary-i386_Packages archive.ubuntu.com_ubuntu_dists_hardy_restricted_binary-i386_Packages /var/lib/apt/lists/.
$ apt-get -y -qq --print-uris install linux linux-generic linux-headers-generic linux-image-generic linux-restricted-modules-generic linux-source >uris.txt
$ awk '{print "wget -O " $2 " " $1}' < uris.txt > wget-script

####On computer with internet access: download deb packages
$ cd /media/usbStick/
$ ./wget-script

####On Ubuntu laptop: install kernel packages
$ cd /media/usbStick
$ mkdir partial
$ apt-get -o dir::cache::archives="/media/usbStick/" install linux linux-generic linux-headers-generic linux-image-generic linux-restricted-modules-generic linux-source

####On Ubuntu laptop: remove Hardy repository
$ rm /etc/apt/sources.list.d/hardy.list



#*****2. PATCH 2.6.24 (HARDY) KERNEL
# All steps have to be done on the Ubuntu laptop.
#
# READ:
# - http://www.sysresccd.org/forums/viewtopic.php?t=1777
# - http://bugzilla.kernel.org/show_bug.cgi?id=9467

$ cd /usr/src/
$ tar xvvf /usr/src/linux-source-2.6.24.tar.bz2
$ cd /usr/src/linux-source-2.6.24
$ wget -O zoz http://bugzilla.kernel.org/attachment.cgi?id=13803

$ less zoz
diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c
index 7200883..51bbb60 100644
--- a/drivers/net/sis190.c
+++ b/drivers/net/sis190.c
@@ -1549,28 +1549,31 @@ static int __devinit sis190_get_mac_addr_from_eeprom(struct pci_dev *pdev,
  }

  /**
- *	sis190_get_mac_addr_from_apc - Get MAC address for SiS965 model
+ *	sis190_get_mac_addr_from_apc - Get MAC address for SiS96x model
   *	@pdev: PCI device
   *	@dev:  network device to get address for
   *
- *	SiS965 model, use APC CMOS RAM to store MAC address.
+ *	SiS96x model, use APC CMOS RAM to store MAC address.
   *	APC CMOS RAM is accessed through ISA bridge.
   *	MAC address is read into @net_dev->dev_addr.
   */
  static int __devinit sis190_get_mac_addr_from_apc(struct pci_dev *pdev,
  						  struct net_device *dev)
  {
+	static const u16 __devinitdata ids[] = { 0x0965, 0x0966, 0x0968 };
  	struct sis190_private *tp = netdev_priv(dev);
  	struct pci_dev *isa_bridge;
  	u8 reg, tmp8;
-	int i;
+	unsigned int i;

  	net_probe(tp, KERN_INFO "%s: Read MAC address from APC.\n",
  		  pci_name(pdev));

-	isa_bridge = pci_get_device(PCI_VENDOR_ID_SI, 0x0965, NULL);
-	if (!isa_bridge)
-		isa_bridge = pci_get_device(PCI_VENDOR_ID_SI, 0x0966, NULL);
+	for (i = 0; i < ARRAY_SIZE(ids); i++) {
+		isa_bridge = pci_get_device(PCI_VENDOR_ID_SI, ids[i], NULL);
+		if (isa_bridge)
+			break;
+	}

  	if (!isa_bridge) {
  		net_probe(tp, KERN_INFO "%s: Can not find ISA bridge.\n",


$ cp drivers/net/sis190.c  /lib/modules/2.6.24-4-generic/kernel/drivers/net/sis190.c
$ patch -p1 <zoz # apply kernel patch
$ make menuconfig # select "Exit" and "Yes" to save configuration
$ mkdir .tmp_versions
$ make drivers/net/sis190.ko
$ rmmod drivers/net/sis190

$ mv /lib/modules/2.6.24-4-generic/kernel/drivers/net/sis190.ko  /lib/modules/2.6.24-4-generic/kernel/drivers/net/sis190.ko_ubuntu2.6.24-4-generic_unpatched
$ cp drivers/net/sis190.ko  /lib/modules/2.6.24-4-generic/kernel/drivers/net/sis190.ko
$ modprobe sis190
$ dmesg # should cotain "eth0" interface
$ ifconfig # should contain "eth0" interface
$ ifconfig eth0 192.168.1.20 netmask 255.255.255.0 up # setup "eth0"


#*****3. UPDATE REPOSITORIES TO STOP PULLING FROM HARDY REPOSITORY
# READ:
# - http://ubuntuforums.org/showthread.php?t=646755
#
# Setup internet connection and connect to internet.

$ sudo apt-get update


---CHECK
$ less /etc/modprobe.d/blacklist # should not contain "sis190"




More information about the ubuntu-users mailing list