Next Previous Contents

# The Linux SCSI programming HOWTO

## Heiko Eißfeldt `heiko@colossus.escape.de`

v1.5, 7 May 1996

This document deals with programming the Linux generic SCSI interface.

Archived Document Notice: This document has been archived by the LDP because it does not apply to modern Linux systems. It is no longer being actively maintained.

## 1. What's New?

## 2. Introduction

## 3. What Is The Generic SCSI Interface?

## 4. What Are The Requirements To Use It?

- 4.1 Kernel Configuration
- 4.2 Device Files
- 4.3 Device Mapping

## 5. Programmers Guide

## 6. Overview Of Device Programming

## 7. Opening The Device

## 8. The Header Structure

## 9. Inquiry Command Example

## 10. The Sense Buffer

## 11. Example Using Sense Buffer

## 12. Ioctl Functions

## 13. Driver Defaults

- 13.1 Transfer Lengths
- 13.2 Timeout And Retry Values

## 14. Obtaining The Scsi Specifications

## 15. Related Information Sources

- 15.1 HOWTOs and FAQs
- 15.2 Mailing list
- 15.3 Example code

## 16. Other useful stuff

- 16.1 Device driver writer helpers
- 16.2 Utilities

## 17. Other SCSI Access Interfaces

## 18. Final Comments

## 19. Acknowledgments

## Appendix

## 20. Appendix

## 21. Error handling

- 21.1 Error status decoding
- 21.2 Status codes
- 21.3 SCSI Sense Keys
- 21.4 Host codes
- 21.5 Driver codes

## 22. Additional sense codes and additional sense code qualifiers

- 22.1 ASC and ASCQ in lexical order
- 22.2 ASC and ASCQ in numerical order

## 23. A SCSI command code quick reference

## 24. Example programs

Next Previous Contents