Matching Hardware to Drivers

After you've identified a chipset, you need to match that chipset to an appropriate Linux driver. If you're recompiling the kernel, this task usually involves reading the descriptions for various devices in the relevant category until you find a match. Even if you're not installing a new kernel, this approach can be useful. Locate your device in a kernel configuration tool and make note of what it's called in that tool. Your driver is probably called something similar to this.

You can also try searching through the kernel source code. For instance, suppose you want to identify the driver that supports the Promise PDC20267 chip shown in Figure

1.2. You could use grep to locate files in the /usr/src/linux/drivers/ide directory tree that contain this number:

$ cd /usr/src/linux/drivers/ide $ grep -r "20267" ./

,/pci/pdc202xx_old.h: .device = PCI_DEVICE_ID_PRC>MISE_20267, ,/pci/pdc202xx_old.h: .name = "PDC20267", ,/pci/pdc202xx_old.c: case PCI_DEVICE_ID_PRC>MISE_20267:

Note The /usr/src/linux directory is often a symbolic link to a directory named after a specific kernel version, such as /usr/src/linux-2.4.20. Red Hat uses /usr/src/linux-2.4 instead of/usr/src/linux for its symbolic link to 2.4-series kernels.

In this example, the pdc202xx_old driver should do the job. Given the filename, you might also try the pdc202xx_new driver, despite the fact that it doesn't contain the string 20267.

As with chipset identification, matching hardware can benefit by a web search. This is particularly likely when you need to resort to third-party drivers, such as the alternative sound drivers described in the upcoming section, "When Standard Drivers Aren't Enough."

It's possible you'll find a match to a driver in the kernel source tree but you won't find a driver module precompiled by your distribution vendor. In some cases, this means that the driver's been compiled directly into the main kernel file. This practice is common with EIDE and SCSI drivers, because Linux needs access to these drivers when booting. Other times, the driver might be obsolete or might have been omitted because the device is very rare. In such cases, you may need to recompile your kernel, or at least that one device file, in order to use the device.

0 0

Post a comment