Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Devices /
Chapter 4 - SCSI Manager 4.3 / SCSI Manager 4.3 Reference
SCSI Manager 4.3 Functions / SIM Internal Functions


NewOldCall

The XPT calls this function when a client calls any of the original SCSI Manager functions other than SCSISelect (which is handled by SCSIOldCall). The NewOldCall function must conform to the following type definition:

typedef void (*SIMActionProc) (void * scsiPB, Ptr SIMGlobals);
scsiPB
A pointer to a SCSI I/O parameter block, which is described on page 4-23.
SIMGlobals
A pointer to the SIM's static data storage.
-->scsiPBLengthUInt16The size of the parameter block.
<--scsiResultOSErrThe SCSIComplete result code.
-->scsiDeviceDeviceIdentThe device identification record.
-->scsiCompletionCallbackProcA pointer to a completion routine.
If this field is set to nil, the function is executed synchronously.
-->scsiDriverStorageUInt8 *Optional pointer to the device driver's private storage.
<--scsiCurrentPhaseUInt16The current SCSI bus phase.
-->scsiSelectorSInt16The _SCSIDispatch trap selector.
<--scsiOldCallResultOSErrThe function result code.
<--scsiSCSImessageUInt8The SCSIComplete message byte.

DESCRIPTION
After an original SCSI Manager transaction begins, the NewOldCall function receives all subsequent original SCSI Manager function requests until the transaction is completed. The XPT converts all original SCSI Manager function requests (except SCSIGet and SCSIStat) into SCSI Manager 4.3 parameter block requests and sends them to the appropriate SIM.

A SIM uses the scsiSelector field of the parameter block to determine which function to perform and should return the current bus phase and message byte in the appropriate fields after each request.

The XPT converts a SCSIReset request into a SCSIResetBus request and sends it to all SIMs that support original SCSI Manager emulation. The XPT handles SCSIStat requests itself, using the information returned in the scsiCurrentPhase field.

RESULT CODES
Result codes from all emulated functions except SCSIComplete are returned in the scsiOldCallResult field. The SCSIComplete result is returned in scsiResult. This indicates to the XPT that the transaction is complete and that the SIM is ready to start a new original SCSI Manager transaction. See the chapter "SCSI Manager" in this book for a list of original SCSI Manager result codes.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996