Sony VAIO PCG-FX340 and RedHat Linux 7.3 - How I solved my USB problems - using diff to create a patch

If you used my patch on a version of the 7.3 kernel that's later than my version (2.4.18-10), and then received an error message when building that is similar to "1 out of 1 hunk FAILED", then you need to build your own patch using diff.

Using diff to make your own Vaio USB patch

There should be a file in the SOURCES directory that is named linux-2.4.18.tar.bz2. Uncompress that file as such:

bunzip2 linux-2.4.18.tar.bz2
tar -xvf linux-2.4.18.tar

This should create a directory linux-2.4.18 that contains the source code for the kernel. Change to the directory that contains the pci-irq.c file. This probably will vary depending on the current version, so it's best to search for it first:

cd linux-2.4.18
find ./ -name pci-irq.c
When it's found, change to the dir and copy the pci-irq.c file to a file called pci-irq.c.orig. Then edit the pci-irq.c file. Search for a line like this:

} else if (r->get && (irq = r->get(pirq_router_dev, dev, pirq))) {

and replace it with these lines:

} else if (r->get && (irq=r->get(pirq_router_dev, dev, pirq)) 
                  && !(dev->vendor==0x8086 && dev->device==0x2442)) {

and save the file. Change back to the SOURCES dir and type:

diff -u linux-2.4.18/path/to/pci-irq.c.orig linux-2.4.18/path/to/pci-irq.c > ~/linux-2.4.18-vaioUSB.patch
Use this patch when you rebuild the kernel.

Back to the How i solved my USB problems page


Copyright © 2002 by Peace Computer Systems