02.03.2014 Views

BSP Developer's Guide

BSP Developer's Guide

BSP Developer's Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

I<br />

Writing a SCSI-2 Device Driver<br />

SCSI Objects and Data Structures<br />

Figure I-2 illustrates the relationship between the various physical and logical<br />

SCSI objects and the corresponding data structures.<br />

Figure I-2<br />

Relationship of SCSI Devices and Data Structures<br />

hardware<br />

data structures<br />

representing<br />

SCSI logical<br />

devices<br />

disk drive<br />

tape drive<br />

BLK_DEV<br />

SEQ_DEV<br />

SCSI_PHYS_DEV<br />

SCSI_PHYS_DEV<br />

data structures<br />

representing<br />

SCSI physical<br />

devices<br />

SCSI_BVS<br />

SCSI_CTRL<br />

SCSI controller<br />

CPU<br />

DRAM<br />

data structure<br />

representing<br />

SCSI controller<br />

Figure I-3 describes the contents of these data structures and their relationships in<br />

more detail.<br />

I<br />

SCSI_CTRL<br />

This structure contains a list of all physical devices and all allocated SCSI<br />

threads.<br />

SCSI_THREAD<br />

Each thread is represented by a dynamic data structure, which is manipulated<br />

at various levels in scsi2Lib, scsiMgrLib, and the device drivers. It contains a<br />

SCSI_TRANSACTION and the rest of the thread-state information.<br />

SCSI_TRANSACTION<br />

Each SCSI command from the I/O system is translated into one of these<br />

structures, which consists of a SCSI command descriptor block plus all the<br />

required pointer addresses.<br />

319

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!