next up previous contents
Next: File Systems Up: Where to Start Looking Previous: Interrupt Handling

Device Drivers

Most of the lines of the Linux kernel's source code are in its device drivers. All of Linux's device driver sources are held in /drivers but these are further broken out by type:

block device drivers such as ide (in ide.c). If you want to look at how all of the devices that could possibly contain file systems are initialized then you should look at device_setup() in /drivers/block/genhd.c. It not only initializes the hard disks but also the network as you need a network to mount nfs file systems. Block devices include both IDE and SCSI based devices.

This the place to look for character based devices such as ttys, serial ports, mice and sound cards.

All of the CDROM code for Linux. It is here that the special CDROM devices (such as Soundblaster CDROM) can be found. Note that the ide CD driver is ide-cd.c in /drivers/block and that the SCSI CD driver is in scsi.c in /drivers/scsi.

This are the sources for the PCI pseudo-driver. A good place to look at how the PCI subsystem is mapped and initialized. The Alpha AXP PCI fixup code is also worth looking at in /arch/alpha/kernel/bios32.c.


This is where to find all of the SCSI code as well as all of the drivers for the scsi devices supported by Linux.

This is where to look to find the network device drivers such as the DECChip 21040 PCI ethernet driver which is in tulip.c.


David A. Rusling