DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Introduction to SCSI drivers

Sending the command

SCSI peripheral drivers communicate with host adapter drivers using the scsi_io_req(D4osdi) structure. The peripheral driver calls the adapter driver's _entry( ) routine with the pointer to a struct scsi_io_req as it argument.

The _entry( ) routine returns 0 if the command was accepted for processing. It returns -1 if the command was rejected, although using this return value to notify a peripheral driver of an adapter fault in this way is not recommended since control typically returns to the peripheral driver before the request is processed. Commands may be rejected because the host adapter cannot currently accept additional commands, or because a fault was detected in the adapter driver.

By default, the Disk driver is capable of submitting up to 5 requests per configured target on the SCSI bus. Set the SDSKOUT tunable parameter to change this limit.

Adapter drivers should not reject commands because they detect an error in the scsi_io_req structure. Instead, they should set the host_sts field in the scsi_io_req structure to indicate an error and return the request block to the peripheral driver's callback function.

The _entry( ) routine always runs in interrupt context; see ``Context of a driver''.


© 2005 The SCO Group, Inc. All rights reserved.