SitemapLinux Device Drivers, 3rd EditionTable of ContentsPrefaceJon's IntroductionAlessandro's IntroductionGreg's IntroductionAudience for This BookOrganization of the MaterialBackground InformationOnline Version and LicenseConventions Used in This BookUsing Code ExamplesWe'd Like to Hear from YouSafari EnabledAcknowledgmentsChapter 1. An Introduction to Device Drivers1.1. The Role of the Device Driver1.2. Splitting the Kernel1.3. Classes of Devices and Modules1.4. Security Issues1.5. Version Numbering1.6. License Terms1.7. Joining the Kernel Development Community1.8. Overview of the BookChapter 2. Building and Running Modules2.1. Setting Up Your Test System2.2. The Hello World Module2.3. Kernel Modules Versus Applications2.4. Compiling and Loading2.5. The Kernel Symbol Table2.6. Preliminaries2.7. Initialization and Shutdown2.8. Module Parameters2.8. Module Parameters2.9. Doing It in User Space2.10. Quick ReferenceChapter 3. Char Drivers3.1. The Design of scull3.2. Major and Minor Numbers3.3. Some Important Data Structures3.4. Char Device Registration3.5. open and release3.6. scull's Memory Usage3.7. read and write3.8. Playing with the New Devices3.9. Quick ReferenceChapter 4. Debugging Techniques4.1. Debugging Support in the Kernel4.2. Debugging by Printing4.3. Debugging by Querying4.4. Debugging by Watching4.5. Debugging System Faults4.6. Debuggers and Related ToolsChapter 5. Concurrency and Race Conditions5.1. Pitfalls in scull5.2. Concurrency and Its Management5.3. Semaphores and Mutexes5.4. Completions5.5. Spinlocks5.6. Locking Traps5.7. Alternatives to Locking5.8. Quick ReferenceChapter 6. Advanced Char Driver Operations6.1. ioctl6.2. Blocking I/O6.3. poll and select6.4. Asynchronous Notification6.5. Seeking a Device6.6. Access Control on a Device File6.7. Quick ReferenceChapter 7. Time, Delays, and Deferred Work7.1. Measuring Time Lapses7.2. Knowing the Current Time7.3. Delaying Execution7.4. Kernel Timers7.5. Tasklets7.6. Workqueues7.7. Quick ReferenceChapter 8. Allocating Memory8.1. The Real Story of kmalloc8.2. Lookaside Caches8.3. get_free_page and Friends8.4. vmalloc and Friends8.5. Per-CPU Variables8.6. Obtaining Large Buffers8.7. Quick ReferenceChapter 9. Communicating with Hardware9.1. I/O Ports and I/O Memory9.2. Using I/O Ports9.3. An I/O Port Example9.4. Using I/O Memory9.5. Quick ReferenceChapter 10. Interrupt Handling10.1. Preparing the Parallel Port10.2. Installing an Interrupt Handler10.3. Implementing a Handler10.4. Top and Bottom Halves10.5. Interrupt Sharing10.6. Interrupt-Driven I/O10.7. Quick ReferenceChapter 11. Data Types in the Kernel11.1. Use of Standard C Types11.2. Assigning an Explicit Size to Data Items11.3. Interface-Specific Types11.4. Other Portability Issues11.5. Linked Lists11.6. Quick ReferenceChapter 12. PCI Drivers12.1. The PCI Interface12.2. A Look Back: ISA12.3. PC/104 and PC/104+12.4. Other PC Buses12.5. SBus12.6. NuBus12.7. External Buses12.8. Quick ReferenceChapter 13. USB Drivers13.1. USB Device Basics13.2. USB and Sysfs13.3. USB Urbs13.4. Writing a USB Driver13.5. USB Transfers Without Urbs13.6. Quick ReferenceChapter 14. The Linux Device Model14.1. Kobjects, Ksets, and Subsystems14.2. Low-Level Sysfs Operations14.3. Hotplug Event Generation14.4. Buses, Devices, and Drivers14.5. Classes14.6. Putting It All Together14.7. Hotplug14.8. Dealing with Firmware14.9. Quick ReferenceChapter 15. Memory Mapping and DMA15.1. Memory Management in Linux15.2. The mmap Device Operation15.3. Performing Direct I/O15.4. Direct Memory Access15.5. Quick ReferenceChapter 16. Block Drivers16.1. Registration16.2. The Block Device Operations16.3. Request Processing16.4. Some Other Details16.5. Quick ReferenceChapter 17. Network Drivers17.1. How snull Is Designed17.2. Connecting to the Kernel17.3. The net_device Structure in Detail17.4. Opening and Closing17.5. Packet Transmission17.6. Packet Reception17.7. The Interrupt Handler17.8. Receive Interrupt Mitigation17.9. Changes in Link State17.10. The Socket Buffers17.11. MAC Address Resolution17.12. Custom ioctl Commands17.13. Statistical Information17.14. Multicast17.15. A Few Other Details17.16. Quick ReferenceChapter 18. TTY Drivers18.1. A Small TTY Driver18.2. tty_driver Function Pointers18.3. TTY Line Settings18.4. ioctls18.5. proc and sysfs Handling of TTY Devices18.6. The tty_driver Structure in Detail18.7. The tty_operations Structure in Detail18.8. The tty_struct Structure in Detail18.9. Quick ReferenceChapter 19. Bibliography19.1. Books19.2. Web SitesIndexindex_SYMBOLindex_Aindex_Bindex_Cindex_Dindex_Eindex_Findex_Gindex_Hindex_Iindex_Jindex_Kindex_Lindex_Mindex_Nindex_Oindex_Pindex_Qindex_Rindex_Sindex_Tindex_Uindex_Vindex_Windex_Xindex_Z |