Sony VAIO PCG-FX340 and RedHat Linux 7.3 - How I solved my USB problems

Note: The solution presented here will involve rebuilding your kernel. Although I provide step-by-step instructions for installing the patch and rebuilding the kernel RPM, it is not for the faint of heart. I present this information with absolutely no warranty of any kind. Use of this information is at your own risk!

I knew it was possible, and kind of figured that the inability to assign IRQ numbers using the Phoenix Bios was the root cause of the problem. After searching the Valhalla list archives, I came across a message that directed me to this page. The suggestion was to apply his patch and rebuild the kernel. Since I use stock RedHat RPMs for my kernel, I had to modify his patch a little and then apply it to the .spec and rebuild it using rpm. The steps I took are described below.

Applying a Vaio USB patch to a RedHat kernel

Here is the patch I used.

First, you need to have rpm-build installed. It will create a directory tree under /usr/src/redhat that you use to build and install the RPMs with.

Get a copy of the latest .src.rpm for your kernel. At the time I did this, the latest kernel was 2.4.18-10. Throughout this document, any reference to filenames are relative to this version. Modify them accordingly for your own kernel version.

Copy the .src.rpm to /usr/src/redhat/SRPMS. Change to that directory, then install it by typing (as root)

rpm -Uvh kernel-2.4.18-10.src.rpm

This will extract the patches to /usr/src/redhat/SOURCES and the .spec file to /usr/src/redhat/SPECS. Change to the SOURCES directory, copy the patch there and name it linux-2.4.18-vaioUSB.patch. Change to the SPECS directory, and edit the file kernel-2.4.spec. Since this patch will fix a driver, I put the reference to it in the Patches 1000 to 5000 area. The last patch in that area was 1490, so I added this line below it:

Patch1495: linux-2.4.18-vaioUSB.patch

Then, I added a reference to the patch so it gets applied. I put it after the command to apply patch 1490:

# apply vaio USB patch
%patch1495 -p1

Finally, you'll probably want to add an entry to the changelog for your own reference:

* Thu Oct 3 2002 fliptop <>
- added vaio USB patch that fixes IRQ conflicts
- see here for more details:

Now you're ready to build the new kernel RPM. In the SPECS directory, type:

rpm -ba -v kernel-2.4.spec

Note: If you receive an error similar to this:

1 out of 1 hunk FAILED

when the build process gets to the point where it's installing the patch, then you need to build your own patch using diff. Here's how.

Then, go have lunch, take a nap, or whatever. This process, if it proceeds correctly, will take quite a while (about 3 hours on my Vaio). When it's done, you should have a new rpm file /usr/src/redhat/RPMS/i386/kernel-2.4.18-10.i386.rpm (and possibly kernel-BOOT, kernel-source, and kernel-doc files). I chose to install, but not update, this new kernel so I could boot back to the old kernel if something went wrong. To do so, change to the RPMS/i386 directory, and type:

rpm -ivh kernel-2.4.18-10.i386.rpm

After the kernel installs itself, it will change some symbolic links in /boot. I use the LILO boot loader, so here's the changes I made to /etc/lilo.conf to make both kernels accessible (note, if you use the GRUB boot loader, you're on your own):

        append="hdc=ide-scsi idebus=66 pci=biosirq"

        append="hdc=ide-scsi idebus=66 pci=biosirq"

After saving, I ran:

lilo -v -v

And rebooted. While booting, I was able to choose from kernel linux or linux-old. The linux one booted just fine, and the USB devices were working. Here's what dmesg showed after I applied the patch and plugged in my USB device:

hub.c: USB new device connect on bus1/1, assigned device number 2
usb.c: USB device 2 (vend/prod 0x5dc/0x1) is not claimed by any active driver.
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
scsi1 : SCSI emulation for USB Mass Storage devices
  Vendor: Lexar     Model: Jumpshot USB CF   Rev: 0001
  Type:   Direct-Access                      ANSI SCSI revision: 02
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 2
USB Mass Storage support registered.

Success! Now I can use my Lexar Compact Flash Card Reader to get images taken on my Nikon Coolpix 990.

Back to the Sony Vaio / RedHat Linux 7.3 page

If you found this information helpful or have any comments/questions, feel free to drop me a line. I'd be happy to hear from you.

Copyright © 2002 by Peace Computer Systems