DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Writing a SCSI peripheral driver

intr

intr( ) is the SCSI peripheral driver's callback function. It is called by the host adapter driver's intr( ) routine at interrupt time to either inform the user-level process that the I/O has completed or to inform a sleeping process that a free request block is available. If the SCSI host adapter queues requests, the intr( ) routine attempts to dispatch another request block to the device using the start( ) routine.

Syntax:

#include "sys/scsi.h"

int xxintr(req_p) REQ_IO *req_p;

  1. Determine which SCSI peripheral device caused the interrupt. If the interrupt is spurious, display a message on the console and return.

  2. Check the status flags for the host adapter and device. If an error occurred, put error information in the driver's xxtab structure. Otherwise, put I/O completion and status information in xxtab. In both cases, call iodone and then clear the request block.

  3. Call xxstart to handle any outstanding requests.

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