Buying Options
Linux Device Drivers, Third Edition

Save a Tree - Go Digital What is this?

Ebook $31.99
Add to Cart
Print+Ebook $43.95
Add to Cart
Print $39.95
Add to Cart
Print £30.99 What is this?
Add to Cart
Safari Books Online
Read Now >

Product Editions

  1. Linux Device Drivers, Third Edition - February 2005
  2. Linux Device Drivers, Second Edition - June 2001 (out of print)
  3. Linux Device Drivers - February 1998 (out of print)
Description

Over the years, this bestselling guide has helped countless programmers learn how to support computer peripherals under the Linux operating system, and how to develop new hardware under Linux. Now, with this third edition, it's even more helpful, covering all the significant changes to Version 2.6 of the Linux kernel. Includes full-featured examples that programmers can compile and run without special hardware.

Full Description
Table of Contents
  1. Chapter 1 An Introduction to Device Drivers

    1. The Role of the Device Driver

    2. Splitting the Kernel

    3. Classes of Devices and Modules

    4. Security Issues

    5. Version Numbering

    6. License Terms

    7. Joining the Kernel Development Community

    8. Overview of the Book

  2. Chapter 2 Building and Running Modules

    1. Setting Up Your Test System

    2. The Hello World Module

    3. Kernel Modules Versus Applications

    4. Compiling and Loading

    5. The Kernel Symbol Table

    6. Preliminaries

    7. Initialization and Shutdown

    8. Module Parameters

    9. Doing It in User Space

    10. Quick Reference

  3. Chapter 3 Char Drivers

    1. The Design of scull

    2. Major and Minor Numbers

    3. Some Important Data Structures

    4. Char Device Registration

    5. open and release

    6. scull's Memory Usage

    7. read and write

    8. Playing with the New Devices

    9. Quick Reference

  4. Chapter 4 Debugging Techniques

    1. Debugging Support in the Kernel

    2. Debugging by Printing

    3. Debugging by Querying

    4. Debugging by Watching

    5. Debugging System Faults

    6. Debuggers and Related Tools

  5. Chapter 5 Concurrency and Race Conditions

    1. Pitfalls in scull

    2. Concurrency and Its Management

    3. Semaphores and Mutexes

    4. Completions

    5. Spinlocks

    6. Locking Traps

    7. Alternatives to Locking

    8. Quick Reference

  6. Chapter 6 Advanced Char Driver Operations

    1. ioctl

    2. Blocking I/O

    3. poll and select

    4. Asynchronous Notification

    5. Seeking a Device

    6. Access Control on a Device File

    7. Quick Reference

  7. Chapter 7 Time, Delays, and Deferred Work

    1. Measuring Time Lapses

    2. Knowing the Current Time

    3. Delaying Execution

    4. Kernel Timers

    5. Tasklets

    6. Workqueues

    7. Quick Reference

  8. Chapter 8 Allocating Memory

    1. The Real Story of kmalloc

    2. Lookaside Caches

    3. get_free_page and Friends

    4. vmalloc and Friends

    5. Per-CPU Variables

    6. Obtaining Large Buffers

    7. Quick Reference

  9. Chapter 9 Communicating with Hardware

    1. I/O Ports and I/O Memory

    2. Using I/O Ports

    3. An I/O Port Example

    4. Using I/O Memory

    5. Quick Reference

  10. Chapter 10 Interrupt Handling

    1. Preparing the Parallel Port

    2. Installing an Interrupt Handler

    3. Implementing a Handler

    4. Top and Bottom Halves

    5. Interrupt Sharing

    6. Interrupt-Driven I/O

    7. Quick Reference

  11. Chapter 11 Data Types in the Kernel

    1. Use of Standard C Types

    2. Assigning an Explicit Size to Data Items

    3. Interface-Specific Types

    4. Other Portability Issues

    5. Linked Lists

    6. Quick Reference

  12. Chapter 12 PCI Drivers

    1. The PCI Interface

    2. A Look Back: ISA

    3. PC/104 and PC/104+

    4. Other PC Buses

    5. SBus

    6. NuBus

    7. External Buses

    8. Quick Reference

  13. Chapter 13 USB Drivers

    1. USB Device Basics

    2. USB and Sysfs

    3. USB Urbs

    4. Writing a USB Driver

    5. USB Transfers Without Urbs

    6. Quick Reference

  14. Chapter 14 The Linux Device Model

    1. Kobjects, Ksets, and Subsystems

    2. Low-Level Sysfs Operations

    3. Hotplug Event Generation

    4. Buses, Devices, and Drivers

    5. Classes

    6. Putting It All Together

    7. Hotplug

    8. Dealing with Firmware

    9. Quick Reference

  15. Chapter 15 Memory Mapping and DMA

    1. Memory Management in Linux

    2. The mmap Device Operation

    3. Performing Direct I/O

    4. Direct Memory Access

    5. Quick Reference

  16. Chapter 16 Block Drivers

    1. Registration

    2. The Block Device Operations

    3. Request Processing

    4. Some Other Details

    5. Quick Reference

  17. Chapter 17 Network Drivers

    1. How snull Is Designed

    2. Connecting to the Kernel

    3. The net_device Structure in Detail

    4. Opening and Closing

    5. Packet Transmission

    6. Packet Reception

    7. The Interrupt Handler

    8. Receive Interrupt Mitigation

    9. Changes in Link State

    10. The Socket Buffers

    11. MAC Address Resolution

    12. Custom ioctl Commands

    13. Statistical Information

    14. Multicast

    15. A Few Other Details

    16. Quick Reference

  18. Chapter 18 TTY Drivers

    1. A Small TTY Driver

    2. tty_driver Function Pointers

    3. TTY Line Settings

    4. ioctls

    5. proc and sysfs Handling of TTY Devices

    6. The tty_driver Structure in Detail

    7. The tty_operations Structure in Detail

    8. The tty_struct Structure in Detail

    9. Quick Reference

  19. Chapter 19 Bibliography

    1. Books

    2. Web Sites

    View Full Table of Contents
    Product Details
    Title:
    Linux Device Drivers, Third Edition
    By:
    Jonathan Corbet, Alessandro Rubini, Greg Kroah-Hartman
    Publisher:
    O'Reilly Media
    Formats:
    • Print
    • Ebook
    • Safari Books Online
    Print Release:
    February 2005
    Ebook Release:
    February 2009
    Pages:
    640
    Print ISBN:
    978-0-596-00590-0
    | ISBN 10:
    0-596-00590-3
    Ebook ISBN:
    978-0-596-15974-0
    | ISBN 10:
    0-596-15974-9
    Customer Reviews
    About the Authors
    1. Jonathan Corbet

      Jonathan Corbet got his first look at the BSD Unix source back in 1981, when an instructor at the University of Colorado let him "fix" the paging algorithm. He has been digging around inside every system he could get his hands on ever since, working on drivers for VAX, Sun, Ardent, and x86 systems on the way. He got his first Linux system in 1993, and has never looked back. Mr. Corbet is currently the co-founder and executive editor of Linux Weekly News (http://LWN.net/); he lives in Boulder, Colorado with his wife and two children.

      View Jonathan Corbet's full profile page.

    2. Alessandro Rubini

      Alessandro installed Linux 0.99.14 soon after getting his degree as electronic engineer. He then received a Ph.D. in computer science at the University of Pavia despite his aversion toward modern technology. He left the University after getting his Ph.D. because he didn't want to write articles. He now works as a free lancer writing device drivers and, um...articles. He used to be a young hacker before his babies were born; he's now an old advocate of Free Software who developed a bias for non-PC computer platforms.

      View Alessandro Rubini's full profile page.

    3. Greg Kroah-Hartman

      Greg Kroah-Hartman has been writing Linux kernel drivers since 1999, and is currently the maintainer for the USB, PCI, I2C, driver core, and sysfs kernel subsystems. He is also the maintainer of the udev and hotplug userspace programs, as well as being a Gentoo kernel maintainer, ensuring that his email inbox is never empty. He is a contributing editor to Linux Journal Magazine, and works for IBM's Linux Technology Center, doing various Linux kernel related tasks.

      View Greg Kroah-Hartman's full profile page.

    Colophon

    Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects. The image on the cover of Linux Device Drivers, Third Edition is a bucking bronco. A colorful description of this animal appears in Marvels of the New West: A Vivid Portrayal of the Stupendous Marvels in the Vast Wonderland West of the Missouri River, by William Thayer (The Henry Bill Publishing Co., Norwich, CT, 1888). Thayer quotes a stockman, who gives this description of a bucking horse: "When a horse bucks he puts his head down between his legs, arches his back like an angry cat, and springs into the air with all his legs at once, coming down again with a frightful jar, and he sometimes keeps on repeating the performance until he is completely worn out with the excursion. The rider is apt to feel rather worn out too by that time, if he has kept his seat, which is not a very easy matter, especially if the horse is a real scientific bucker, and puts a kind of side action into every jump. The double girth commonly attached to these Mexican saddles is useful for keeping the saddle in its place during one of those bouts, but there is no doubt that they frequently make a horse buck who would not do so with a single girth. With some animals you can never draw up the flank girth without setting them bucking." Matt Hutchinson was the production editor for Linux Device Drivers, Third Edition. Octal Publishing, Inc. provided production services. Genevieve d'Entremont, Sanders Kleinfeld, and Claire Cloutier provided quality control.

    Edie Freedman designed the cover of this book, based on a series design by herself and Hanna Dyer. The cover image is a 19th-century engraving from the Dover Pictorial Archive. Emma Colby produced the cover layout with Adobe InDesign CS using Adobe's ITC Garamond font.

    Melanie Wang designed the interior layout, based on a series design by David Futato. The chapter opening images are from the Dover Pictorial Archive, Marvels of the New West, and The Pioneer History of America: A Popular Account of the Heroes and Adventures, by Augustus Lynch Mason, A.M. (The Jones Brothers Publishing Company, 1884). This book was converted by Julie Hawks to FrameMaker 5.5.6 with a format conversion tool created by Erik Ray, Jason McIntosh, Neil Walls, and Mike Sierra that uses Perl and XML technologies. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is LucasFont's TheSans Mono Condensed. The illustrations that appear in the book were produced by Robert Romano, Jessamyn Read, and Lesley Borash using Macromedia FreeHand MX and Adobe Photoshop CS. The tip and warning icons were drawn by Christopher Bing.

    • Book cover of Linux Device Drivers