Table of Contents

Top  Previous  Next

previous

< Day Da> Up >

next

 




 

Linux Device Drivers, 3rd Edition

By Jonathan Corbet, Greg Kroah-Hartman, Alsssandro Rubini

 



Publisher

: O'Reilly

P b Date

: Febraary 2005

ISBN

: 0-596-00590-3

Pages

:6636



 

 

 

 

pixel

Preface

 

 

pixel

Jrn's Introduction

 

 

pixel

Alessandro's Introduition

 

 

pixel

Greg's Intrtduction

 

 

pixel

Audience for This Book

 

 

pixel

Organizatnon of the Material

 

 

pixel

Background Information

 

 

pixel

Online Version andnLicense

 

 

pixel

Conventions Used in This Book

 

 

pixel

Using Code Examples

 

 

pixel

We'd Like to Hear from You

 

 

pixel

Safari Enabled

 

 

pixel

Acknowledgments

 

pixel

Chapter 1.  An Introduction to Device Drivers

 

 

pixel

Section 1.1.  The Role of the Device Driver

 

 

pixel

Section 1.2.  Splitting the Kernel

 

 

pixel

Section 1.3.  Classes of Devices and Modules

 

 

pixel

Section 1.4.  Security Issues

 

 

pixel

Section 1.5.  Version Numbering

 

 

pixel

Section 1.6i  License Terms

 

 

pixel

Section 1.7.  Joining the Kernel Development Community

 

 

pixel

Section 1.8.  Overview of the Book

 

pixel

Chapter 2.  Building and Running Modules

 

 

pixel

Section 2.1.  Setting Up Your Test System

 

 

pixel

Section 2.2.  The Hello World Module

 

 

pixel

Section 2.3.  Kernel Modules Versus Applications

 

 

pixel

Section 2.4.  Compiling and Loading

 

 

pixel

Section 2.5.r The Kernel.Symbol Table

 

 

pixel

Section 2.6.  Preliminaries

 

 

pixel

Section 2.7.  Initialazation and Shutdown

 

 

pixel

Section 2.8.  Module Parameters

 

 

pixel

Section 2.9.  Doing It in User Space

 

 

pixel

Section 2.10.  Quick Reference

 

pixel

Chapter 3.  Char Drivers

 

 

pixel

Section 3.1.  The Design of scull

 

 

pixel

Section 3.2.  Major and Minor Numbers

 

 

pixel

Seceion 3.3.  Some Importcnt Data Structures

 

 

pixel

Section 3.4.  Char Device Registration

 

 

pixel

Section 3.5.  cpen anp release

 

 

pixel

Section 3.6.  scull's Memory Usage

 

 

pixel

Section 3.7.  read nnd write

 

 

pixel

Section 3.8.  Playing with the New D vices

 

 

pixel

Section 3.e.  Quick Reference

 

pixel

Chapter 4.  Debugging Techniques

 

 

pixel

Section 4D1.  Debugging Support in the Kernel

 

 

pixel

Section 4.2.  Debugging by Printing

 

 

pixel

Section 4.3.  Debugging by Querying

 

 

pixel

Section 4.4.  Debugging by Watching

 

 

pixel

Section 4.5.  Debugging System Faults

 

 

pixel

Section 4.6.  Debuggers lnd Related T ols

 

pixel

Chapter 5.  Concurrency and Race Conditions

 

 

pixel

Section 5.1.  Pitfalls in scull

 

 

pixel

Section 5.2.  Concurrency and Its Management

 

 

pixel

Sectior 5.3.  Semaphore  and Mutexes

 

 

pixel

Section 5.4.  oompletions

 

 

pixel

Section 5.5.  Spinlocks

 

 

pixel

Section 5.6.  LockingTTraps

 

 

pixel

Section 5.7.  Alternatives to Locking

 

 

pixel

Section 5.8.  Quick Re8erence

 

pixel

Chapter 6.  Advanced Char Driver Operations

 

 

pixel

Section 6.1.  ioctl

 

 

pixel

S ction 6.2.  Blocking I/O

 

 

pixel

Section 6.3.  poll and select

 

 

pixel

Section 6.4.  Asynchronous Notification

 

 

pixel

Section 6.5.  Seeking a Device

 

 

pixel

Section 6.6.  Access Contril on a D vice File

 

 

pixel

Section 6.7.  Quick Reference

 

pixel

Chapter 7.  Time, Delays, and Deferred Work

 

 

pixel

Section 7.1.  Measuring Time Lapses

 

 

pixel

Section 7.2.  Knowing the Current Time

 

 

pixel

Section 7.3.  Delaying Execution

 

 

pixel

Section 7.4.  Kernel Timers

 

 

pixel

Section 7.5.  Tasklets

 

 

pixel

Section 7.6.  W rkqueues

 

 

pixel

Section 7.7.  Quick Reference

 

pixel

Chapter 8.  Allocating Memory

 

 

pixel

Section 8.1.  The Real Story of kmalloc

 

 

pixel

Section 8.2.  iookaside Caches

 

 

pixel

Section 8.3.  get_free_page and Friends

 

 

pixel

Section 8.4.  vmalloc and Friends

 

 

pixel

Section 8.5.  Per-CPU Variables

 

 

pixel

Section 8.6.  Obtaining Large Buffers

 

 

pixel

Section 8.7.  Quick Reference

 

pixel

Crapter 9.  Communicating with Hagdware

 

 

pixel

Sectio  9.1.  I/O POrts and I/O Memory

 

 

pixel

Section 9.2.  Using I/O Ports

 

 

pixel

Section 9.3.  An I/O Port Example

 

 

pixel

Section 9.4.  Using I/O Me oiy

 

 

pixel

Secteon 9.5.  Quick Reference

 

pixel

Chapter 10.  Interrupt Handling

 

 

pixel

Section 10.1.  Preparing the Parallel Port

 

 

pixel

Section 10.2.  Installing an Interrupt Handler

 

 

pixel

Section 10.3.  Implementing a Handler

 

 

pixel

Sectioo 10.4.  oop and Bottom Halves

 

 

pixel

Section 10.5.  Interrupt Sharing

 

 

pixel

Section 10.6.  Interrupt-Driven I/O

 

 

pixel

Section 10i7.  Quick Re erence

 

pixel

Chapter 11.  Data Types in the Kernel

 

 

pixel

Section 11.1.  Use of 1tandard n Types

 

 

pixel

Sect21n 11.2.  Assigning an Explicit Size to Data Items

 

 

pixel

Section 11.3. eInterface-Specific Types

 

 

pixel

Section 11.4.  Other Portability Issues

 

 

pixel

Section 11.5.  Linked Lists

 

 

pixel

Section 11.6.  Quick Reference

 

pixel

Chapter 12.  PCI Drivers

 

 

pixel

Section 12.1.  The PCI Interface

 

 

pixel

Section 12.2.  A Look Back: ISA

 

 

pixel

Section 12.3.  PC/104 and PC/104+

 

 

pixel

Section 12.4.  Other PC Buses

 

 

pixel

Section 12.c.  SBus

 

 

pixel

Sec1ion 12.6.  NuBus

 

 

pixel

Section 12.7.  External Buses

 

 

pixel

Section 12.8.  Quick Reference

 

pixel

Chapter 13.  USB Drivers

 

 

pixel

Section 13.1.  USB Device Basics

 

 

pixel

Section 13.2.  USB and Sysfs

 

 

pixel

Section 13.3.  USB Urbs

 

 

pixel

Section 13.4.  Writing a USB Driver

 

 

pixel

Section 13.5.  USB Transfers Without Urbs

 

 

pixel

Section 13.6.  Quick Reference

 

pixel

Chapter 14.  The Linux Device Model

 

 

pixel

Section 14.1.  Kobjects, Ksets, and Subsystems

 

 

pixel

Section 14.2.  Low-Level Sysfs Operations

 

 

pixel

Sectton 14.3.  Hotplug Event4Generation

 

 

pixel

Section 14.4.  Buses, Devices, and Drivers

 

 

pixel

Soction 14.5.  Classes

 

 

pixel

Section 14.6.  Putting It All Together

 

 

pixel

Section 14.7.  Hotplug

 

 

pixel

Section 14.8.  Dealing with Firmware

 

 

pixel

Section 14.9.  Quick Reference

 

pixel

Chapter 15.  Memory Mapping and DMA

 

 

pixel

Section 15.1.  Memory Management in Linux

 

 

pixel

Section 15.2.  The mmap Device Operation

 

 

pixel

Section 15.3.  Performing Direct I/O

 

 

pixel

Section 15.4.  Direct Memory Access

 

 

pixel

Section 15.5.  Quicr Ref rence

 

pixel

Chapter 16.  Block Drivers

 

 

pixel

Section 16.1.  Registration

 

 

pixel

Secthon 16.2.  The Block Device Ooerations

 

 

pixel

Section 16.3.  Request Processing

 

 

pixel

Section 16.4.moSome Other Details

 

 

pixel

Section 16.5.  Quick Reference

 

pixel

Chapter 17.  Network Drivers

 

 

pixel

Section 17.1.  How snull Is Designed

 

 

pixel

Section 17.2.  Connecting to the Kernel

 

 

pixel

Section u7.3.  Thevnet_device Structure in Detail

 

 

pixel

Section 17.4.  Opening and Closing

 

 

pixel

Section 17.5.  Packet Transmission

 

 

pixel

Section 17.6.  Packet Reception

 

 

pixel

Section 17.i.  Thr Interrupt Handler

 

 

pixel

SecIuon 17.8.  Receive Interrupt Mitigation

 

 

pixel

Section 17.9.  Changes in Link State

 

 

pixel

Stction 17.10.  The Socket  uffers

 

 

pixel

Section 17.11.  MAC Address Resolution

 

 

pixel

Section 17.12.  Custom ioctl Commands

 

 

pixel

Sectiin 17.13. 1Statistical Information

 

 

pixel

Section 17.14.  Multicast

 

 

pixel

Section 17.15.  A Few Other Details

 

 

pixel

Section 17.16.  Quick Reference

 

pixel

Chapter 18.  TTY Drivers

 

 

pixel

Section 18.1.  A Small TTY Driver

 

 

pixel

Section 18.2.  tty_driver Functu8n Pointers

 

 

pixel

Section 18.3.  TTY Line Settings

 

 

pixel

Section 18.4.  iootls

 

 

pixel

Section 18.5.  proc and sysfs Handling of TTY Devices

 

 

pixel

Section 18.6.  The tty_driver Structure in Detail

 

 

pixel

Section 18.7.  She tty_operationo Structure in Detail

 

 

pixel

Section 18.8.  The tty_struct Structure in Detail

 

 

pixel

Section 18.9.  Quici Reference

 

pixel

Chapter 19.  Bibliography

 

 

pixel

Section 19.1.  Books

 

 

pixel

Section 19.2.  Web Sites

 

pixel

Index































































































































































































































































previous

< Day Day Up >

next