Linux Device Drivers -- 3rd Edition 
Jonathan Corbet, Alessandro Rubini, & Greg Kroah-Hartman
(c)2005 O'REILLY Media, Inc.
MSRP: 39.95 USD
Overall Rating:

Touted as the definitive guide to writing device drivers for the Linux kernel, I went into
LDD with high expectations. Granted, this book had a lot to live up to, but I was somewhat disappointed; the content was definitely on par, but it lacked that refinement found in most books O'Reilly publishes. There were several blatant typographical errors, and the book was literred with cross-references to non-existant sections in Chapter One. And just as a note, having the Documentation/ directory of the kernel sources open in a terminal would be handy, as the reader is often sent there for further information.
The book is laid out in a rather logical manner; new terms are defined as they become necessary, and each chapter deals with a different area of writing device drivers. The book starts off with a brief explanation of device drivers in general, how the kernel is made up, licensing issues, and some changes in the 2.6 Kernel. Then,
Linux Device Drivers goes on to explain how to build a module (including a sample 'Hello World' module) and run it. Then the reader is introduced to 'char drivers', debugging issues, timers, memory allocation, and other more specific (and often advanced) topics.
Perhaps this stems from the mere fact that this book has three authors, but the book has some continuity and flow issues. This is evident as early as the 'Hello World' module in Chapter Two. The book gives the source code, and the result of compiling/running the module, without even hinting at the fact that the necessary Makefile isn't given until much later in the chapter. In the third chapter, we are introduced to the 'scull' module, a software-based character driver. It is used throughout the first half of the book as an example, with each section adding new functionality to it. In the second half, 'sbull' and 'snull' (scull's block- and network-driver cousins) are introduced.
As I previously stated, the first eight chapters deal with such things as debugging a running kernel (considered by many a black art), racing/concurrency issues, writing atomic code, and how time is handled by the kernel. Finally, in chapter nine, the reader is introduced to actual hardware (in the form of a simple parallel port driver). Interrupts are the subject of Chapter 11, and the rest of the book is on more specialized topics such as Network Drivers, the USB Subsystem, and PCI Drivers, although there is a short chapter on Kernel data types shoved in the middle somewhere.
This is not to say that the book was all bad; on the contrary, the content was excellent! Before reading
LDD, I was completely lost when it came to answering Kernel-related questions, whereas I now feel ready to tackle some of the questions that people ask me. (Like how to implement non-blocking I/O, 'Why isn't printk showing up on my console?', etc.)
The book provided clear, concise explanations of everything, without trying to do too much. Several times throughout the text, the authors skipped over topics outside the book's scope, referring them to other books, articles, and websites.
At the end of every chapter was a summary of all functions and data structures introduced in that section. This was a very useful reference, especially as the chapters got longer and more complex (such as PCI Drivers or ksets), as it would potentially take five minutes to find the function defintion you wanted.
Bottom Line Linux Device Drivers is definitely a good book for anybody looking for an introduction into writing kernel modules for Linux. It toes the line between oversimplified and unneccesarily complex, and does a very good job of staying on topic. I went from a complete kernel newbie to having a very comfortable knowledge of how modules work, and more omportantly, how they are written.
Unfortunately,
LDD was a bit unpolished and seemed very rough around the edges. There were numerous cross-references to either non-existant sections, or to sections in the wrong Chapter. The number of typos was also disconcerting, and it didn't have the O'REILLY feel to it. Over all I give it:

3/5 Penguins
--
Andy Kissner