|
|
When the data transfer is completed, the following steps are taken:
In either case, the event that wakes up the adapter driver is communicated through the Programmable Interrupt Controller (PIC) which arbitrates interrupts to the CPU. Polling is initiated when the PIC generates the clock interrupt; the clock interrupt handling routine then calls poll( ) routines that have been registered by various drivers.
The following discussion assumes hardware for SCSI host adapters and SCSI peripheral devices that generate interrupts and whose drivers are coded with interrupt handlers. The details are much the same for devices that use poll( ) to announce I/O completion except that it is invoked indirectly by the clock interrupt routine.
io_intr
member
of the REQ_IO structure
which identifies the peripheral driver's
intr( )
routine. For example:
(*REQ_IO->io_intr)()In this case, the peripheral driver's interrupt handling routine is intr( ).
The host adapter's intr( ) routine then calls the peripheral driver's intr( ) routine to notify the peripheral driver that the I/O operation is complete.