The <#1337#> queuecommand()<#1337#> function sets up the host adapter for processing
a SCSI command and then returns. When the command is finished, the
71 function is called with the 72 structure
pointer as a parameter. This allows the SCSI command to be executed in an
interrupt-driven fashion. Before returning, the 73
function must do several things:
- Save the pointer to the 74 structure.
- Save the pointer to the 75 function in the
76 function pointer in the 77 structure.
See section~#secdone#1339> for more information.
- Set up the special 78 variables required by the driver.
See section~#secscsicmnd#1340> for detailed information on the
79 structure.
- Start the SCSI command. For an advanced host adapter, this may be as
simple as sending the command to a host adapter ``mailbox.'' For less
advanced host adapters, the ARBITRATION phase is manually started.
The 80 function is called <#1342#> only<#1342#> if the
81 variable (see section~#seccanqueue#1343>) is non-zero.
Otherwise the 82 function is used for all SCSI requests. The
83 function should return zero on success (the current
high-level SCSI code presently ignores the return value).