Mac OS 9
SCSI.h File Reference

SCSI Family Interfaces. More...

#include <MacTypes.h>
#include <MixedMode.h>
#include <AppleDiskPartitions.h>

Go to the source code of this file.

Data Structures

struct  SCSIInstr
 
struct  DeviceIdent
 
struct  DeviceIdentATA
 
struct  PatchDescriptor
 
struct  PatchList
 
union  CDB
 
struct  SGRecord
 
struct  SCSIHdr
 
struct  SCSI_PB
 
struct  SCSI_IO
 
struct  SCSIBusInquiryPB
 
struct  SCSIAbortCommandPB
 
struct  SCSITerminateIOPB
 
struct  SCSIResetBusPB
 
struct  SCSIResetDevicePB
 
struct  SCSIReleaseQPB
 
struct  SCSIGetVirtualIDInfoPB
 
struct  SCSIDriverPB
 
struct  SCSILoadDriverPB
 
struct  SIMInitInfo
 

Macros

#define NewAENCallbackUPP(userRoutine)
 
#define NewSIMInitUPP(userRoutine)
 
#define NewSIMActionUPP(userRoutine)
 
#define NewSCSIUPP(userRoutine)
 
#define NewSCSIMakeCallbackUPP(userRoutine)
 
#define NewSCSIInterruptPollUPP(userRoutine)
 
#define NewSCSIInterruptUPP(userRoutine)
 
#define DisposeAENCallbackUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeSIMInitUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeSIMActionUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeSCSIUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeSCSIMakeCallbackUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeSCSIInterruptPollUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeSCSIInterruptUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define InvokeAENCallbackUPP(userUPP)    CALL_ZERO_PARAMETER_UPP((userUPP), uppAENCallbackProcInfo)
 
#define InvokeSIMInitUPP(SIMinfoPtr, userUPP)    (OSErr) CALL_ONE_PARAMETER_UPP((userUPP), uppSIMInitProcInfo, (SIMinfoPtr))
 
#define InvokeSIMActionUPP(scsiPB, SIMGlobals, userUPP)
 
#define InvokeSCSIUPP(userUPP)    CALL_ZERO_PARAMETER_UPP((userUPP), uppSCSIProcInfo)
 
#define InvokeSCSIMakeCallbackUPP(scsiPB, userUPP)    CALL_ONE_PARAMETER_UPP((userUPP), uppSCSIMakeCallbackProcInfo, (scsiPB))
 
#define InvokeSCSIInterruptPollUPP(SIMGlobals, userUPP)
 
#define InvokeSCSIInterruptUPP(SIMGlobals, userUPP)
 
#define NewAENCallbackProc(userRoutine)   NewAENCallbackUPP(userRoutine)
 
#define NewSIMInitProc(userRoutine)   NewSIMInitUPP(userRoutine)
 
#define NewSIMActionProc(userRoutine)   NewSIMActionUPP(userRoutine)
 
#define NewSCSIProc(userRoutine)   NewSCSIUPP(userRoutine)
 
#define NewSCSIMakeCallbackProc(userRoutine)   NewSCSIMakeCallbackUPP(userRoutine)
 
#define NewSCSIInterruptPollProc(userRoutine)    NewSCSIInterruptPollUPP(userRoutine)
 
#define NewSCSIInterruptProc(userRoutine)   NewSCSIInterruptUPP(userRoutine)
 
#define CallAENCallbackProc(userRoutine)   InvokeAENCallbackUPP(userRoutine)
 
#define CallSIMInitProc(userRoutine, SIMinfoPtr)    InvokeSIMInitUPP(SIMinfoPtr, userRoutine)
 
#define CallSIMActionProc(userRoutine, scsiPB, SIMGlobals)    InvokeSIMActionUPP(scsiPB, SIMGlobals, userRoutine)
 
#define CallSCSIProc(userRoutine)   InvokeSCSIUPP(userRoutine)
 
#define CallSCSIMakeCallbackProc(userRoutine, scsiPB)    InvokeSCSIMakeCallbackUPP(scsiPB, userRoutine)
 
#define CallSCSIInterruptPollProc(userRoutine, SIMGlobals)    InvokeSCSIInterruptPollUPP(SIMGlobals, userRoutine)
 
#define CallSCSIInterruptProc(userRoutine, SIMGlobals)    InvokeSCSIInterruptUPP(SIMGlobals, userRoutine)
 
#define NewSCSICallbackUPP(userRoutine)
 
#define DisposeSCSICallbackUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define InvokeSCSICallbackUPP(scsiPB, userUPP)    CALL_ONE_PARAMETER_UPP((userUPP), uppSCSICallbackProcInfo, (scsiPB))
 
#define NewSCSICallbackProc(userRoutine)   NewSCSICallbackUPP(userRoutine)
 
#define CallSCSICallbackProc(userRoutine, scsiPB)    InvokeSCSICallbackUPP(scsiPB, userRoutine)
 
#define SCSIPBHdr
 

Typedefs

typedef struct SCSIInstr SCSIInstr
 
typedef Ptr SIMGlobals
 
typedef struct DeviceIdent DeviceIdent
 
typedef struct DeviceIdentATA DeviceIdentATA
 
typedef struct PatchDescriptor PatchDescriptor
 
typedef struct PatchList PatchList
 
typedef DeviceIdent myDevID
 
typedef union CDB CDB
 
typedef CDBCDBPtr
 
typedef struct SGRecord SGRecord
 
typedef struct SCSIHdr SCSIHdr
 
typedef struct SCSI_PB SCSI_PB
 
typedef struct SCSI_IO SCSI_IO
 
typedef SCSI_IO SCSIExecIOPB
 
typedef struct SCSIBusInquiryPB SCSIBusInquiryPB
 
typedef struct SCSIAbortCommandPB SCSIAbortCommandPB
 
typedef struct SCSITerminateIOPB SCSITerminateIOPB
 
typedef struct SCSIResetBusPB SCSIResetBusPB
 
typedef struct SCSIResetDevicePB SCSIResetDevicePB
 
typedef struct SCSIReleaseQPB SCSIReleaseQPB
 
typedef struct SCSIGetVirtualIDInfoPB SCSIGetVirtualIDInfoPB
 
typedef struct SCSIDriverPB SCSIDriverPB
 
typedef struct SCSILoadDriverPB SCSILoadDriverPB
 
typedef struct SIMInitInfo SIMInitInfo
 

Enumerations

enum  {
  scCommErr = 2 , scArbNBErr = 3 , scBadParmsErr = 4 , scPhaseErr = 5 ,
  scCompareErr = 6 , scMgrBusyErr = 7 , scSequenceErr = 8 , scBusTOErr = 9 ,
  scComplPhaseErr = 10
}
 
enum  {
  scInc = 1 , scNoInc = 2 , scAdd = 3 , scMove = 4 ,
  scLoop = 5 , scNop = 6 , scStop = 7 , scComp = 8
}
 
enum  {
  kDataOutPhase = 0 , kDataInPhase = 1 , kCommandPhase = 2 , kStatusPhase = 3 ,
  kPhaseIllegal0 = 4 , kPhaseIllegal1 = 5 , kMessageOutPhase = 6 , kMessageInPhase = 7 ,
  kBusFreePhase = 8 , kArbitratePhase = 9 , kSelectPhase = 10 , kMessageInPhaseNACK = 11
}
 
enum  { scsiVERSION = 43 }
 
enum  { uppAENCallbackProcInfo = 0x00000001 }
 
enum  { uppSIMInitProcInfo = 0x000000E1 }
 
enum  { uppSIMActionProcInfo = 0x000003C1 }
 
enum  { uppSCSIProcInfo = 0x00000001 }
 
enum  { uppSCSIMakeCallbackProcInfo = 0x000000C1 }
 
enum  { uppSCSIInterruptPollProcInfo = 0x000000F1 }
 
enum  { uppSCSIInterruptProcInfo = 0x000000F1 }
 
enum  { uppSCSICallbackProcInfo = 0x000000C0 }
 
enum  {
  SCSINop = 0x00 , SCSIExecIO = 0x01 , SCSIBusInquiry = 0x03 , SCSIReleaseQ = 0x04 ,
  SCSIAbortCommand = 0x10 , SCSIResetBus = 0x11 , SCSIResetDevice = 0x12 , SCSITerminateIO = 0x13
}
 
enum  {
  SCSIGetVirtualIDInfo = 0x80 , SCSILoadDriver = 0x82 , SCSIOldCall = 0x84 , SCSICreateRefNumXref = 0x85 ,
  SCSILookupRefNumXref = 0x86 , SCSIRemoveRefNumXref = 0x87 , SCSIRegisterWithNewXPT
}
 
enum  { vendorUnique = 0xC0 }
 
enum  { handshakeDataLength = 8 , maxCDBLength = 16 , vendorIDLength = 16 }
 
enum  { kBusTypeSCSI = 0 , kBusTypeATA = 1 , kBusTypePCMCIA = 2 , kBusTypeMediaBay = 3 }
 
enum  { kRequiredPatch = 0x00000001 }
 
enum  { scsiTransferBlind = 0 , scsiTransferPolled = 1 }
 
enum  { scsiErrorBase = -7936 }
 
enum  {
  scsiRequestInProgress = 1 , scsiRequestAborted , scsiUnableToAbort , scsiNonZeroStatus ,
  scsiUnused05 = scsiErrorBase + 5 , scsiUnused06 = scsiErrorBase + 6 , scsiUnused07 = scsiErrorBase + 7 , scsiUnused08 = scsiErrorBase + 8 ,
  scsiUnableToTerminate , scsiSelectTimeout = scsiErrorBase + 10 , scsiCommandTimeout = scsiErrorBase + 11 , scsiIdentifyMessageRejected = scsiErrorBase + 12 ,
  scsiMessageRejectReceived , scsiSCSIBusReset , scsiParityError , scsiAutosenseFailed ,
  scsiUnused11 = scsiErrorBase + 17 , scsiDataRunError , scsiUnexpectedBusFree = scsiErrorBase + 19 , scsiSequenceFailed ,
  scsiWrongDirection , scsiUnused16 = scsiErrorBase + 22 , scsiBDRsent , scsiTerminated ,
  scsiNoNexus = scsiErrorBase + 25 , scsiCDBReceived , scsiTooManyBuses , scsiBusy = scsiErrorBase + 49 ,
  scsiProvideFail , scsiDeviceNotThere , scsiNoHBA = scsiErrorBase + 52 , scsiDeviceConflict ,
  scsiNoSuchXref = scsiErrorBase + 54 , scsiQLinkInvalid , scsiPBLengthError , scsiFunctionNotAvailable ,
  scsiRequestInvalid = scsiErrorBase + 66 , scsiBusInvalid = scsiErrorBase + 67 , scsiTIDInvalid , scsiLUNInvalid = scsiErrorBase + 69 ,
  scsiIDInvalid = scsiErrorBase + 70 , scsiDataTypeInvalid , scsiTransferTypeInvalid , scsiCDBLengthInvalid
}
 
enum  {
  scsiUnused74 = scsiErrorBase + 74 , scsiUnused75 = scsiErrorBase + 75 , scsiBadDataLength = scsiErrorBase + 76 , scsiPartialPrepared ,
  scsiInvalidMsgType , scsiUnused79 = scsiErrorBase + 79 , scsiBadConnID = scsiErrorBase + 80 , scsiUnused81 = scsiErrorBase + 81 ,
  scsiIOInProgress , scsiTargetReserved = scsiErrorBase + 83 , scsiUnused84 = scsiErrorBase + 84 , scsiUnused85 = scsiErrorBase + 85 ,
  scsiBadConnType = scsiErrorBase + 86 , scsiCannotLoadPlugin
}
 
enum  { scsiFamilyInternalError , scsiPluginInternalError , scsiVendorSpecificErrorBase , scsiVendorSpecificErrorCount = 16 }
 
enum  { scsiExecutionErrors = scsiErrorBase , scsiNotExecutedErrors = scsiTooManyBuses , scsiParameterErrors = scsiPBLengthError }
 
enum  { scsiSIMQFrozen = 0x0001 , scsiAutosenseValid = 0x0002 , scsiBusNotFree = 0x0004 }
 
enum  {
  kbSCSIDisableAutosense = 29 , kbSCSIFlagReservedA = 28 , kbSCSIFlagReserved0 = 27 , kbSCSICDBLinked = 26 ,
  kbSCSIQEnable = 25 , kbSCSICDBIsPointer = 24 , kbSCSIFlagReserved1 = 23 , kbSCSIInitiateSyncData = 22 ,
  kbSCSIDisableSyncData = 21 , kbSCSISIMQHead = 20 , kbSCSISIMQFreeze = 19 , kbSCSISIMQNoFreeze = 18 ,
  kbSCSIDoDisconnect = 17 , kbSCSIDontDisconnect = 16 , kbSCSIDataReadyForDMA = 15 , kbSCSIFlagReserved3 = 14 ,
  kbSCSIDataPhysical = 13 , kbSCSISensePhysical = 12 , kbSCSIFlagReserved5 = 11 , kbSCSIFlagReserved6 = 10 ,
  kbSCSIFlagReserved7 = 9 , kbSCSIFlagReserved8 = 8 , kbSCSIDataBufferValid = 7 , kbSCSIStatusBufferValid = 6 ,
  kbSCSIMessageBufferValid = 5 , kbSCSIFlagReserved9 = 4
}
 
enum  {
  scsiDirectionMask = (long)0xC0000000 , scsiDirectionNone = (long)0xC0000000 , scsiDirectionReserved = 0x00000000 , scsiDirectionOut = (long)0x80000000 ,
  scsiDirectionIn = 0x40000000 , scsiDisableAutosense = 0x20000000 , scsiFlagReservedA = 0x10000000 , scsiFlagReserved0 = 0x08000000 ,
  scsiCDBLinked = 0x04000000 , scsiQEnable = 0x02000000 , scsiCDBIsPointer = 0x01000000 , scsiFlagReserved1 = 0x00800000 ,
  scsiInitiateSyncData = 0x00400000 , scsiDisableSyncData = 0x00200000 , scsiSIMQHead = 0x00100000 , scsiSIMQFreeze = 0x00080000 ,
  scsiSIMQNoFreeze = 0x00040000 , scsiDoDisconnect = 0x00020000 , scsiDontDisconnect = 0x00010000 , scsiDataReadyForDMA = 0x00008000 ,
  scsiFlagReserved3 = 0x00004000 , scsiDataPhysical = 0x00002000 , scsiSensePhysical = 0x00001000 , scsiFlagReserved5 = 0x00000800 ,
  scsiFlagReserved6 = 0x00000400 , scsiFlagReserved7 = 0x00000200 , scsiFlagReserved8 = 0x00000100
}
 
enum  {
  scsiNoParityCheck = 0x0002 , scsiDisableSelectWAtn = 0x0004 , scsiSavePtrOnDisconnect = 0x0008 , scsiNoBucketIn = 0x0010 ,
  scsiNoBucketOut = 0x0020 , scsiDisableWide = 0x0040 , scsiInitiateWide = 0x0080 , scsiRenegotiateSense ,
  scsiDisableDiscipline , scsiIOFlagReserved0080 = 0x0080 , scsiIOFlagReserved8000 = 0x8000
}
 
enum  {
  scsiBusMDP = 0x80 , scsiBusWide32 = 0x40 , scsiBusWide16 = 0x20 , scsiBusSDTR = 0x10 ,
  scsiBusLinkedCDB = 0x08 , scsiBusTagQ = 0x02 , scsiBusSoftReset = 0x01
}
 
enum  { scsiDataBuffer = 0 , scsiDataTIB = 1 , scsiDataSG = 2 , scsiDataIOTable = 3 }
 
enum  {
  scsiBusDataTIB = (1 << scsiDataTIB) , scsiBusDataBuffer , scsiBusDataSG = (1 << scsiDataSG) , scsiBusDataIOTable ,
  scsiBusDataReserved = (long)0x80000000
}
 
enum  { scsiBusScansDevices = 0x80 , scsiBusScansOnInit = 0x40 , scsiBusLoadsROMDrivers = 0x20 }
 
enum  {
  scsiBusUltra4SCSI = 0x00000800 , scsiBusLVD = 0x00000400 , scsiBusUltra3SCSI = 0x00000200 , scsiBusUltra2SCSI = 0x00000100 ,
  scsiBusInternalExternalMask = 0x000000C0 , scsiBusInternalExternalUnknown , scsiBusInternalExternal , scsiBusInternal = 0x00000080 ,
  scsiBusExternal = 0x00000040 , scsiBusCacheCoherentDMA = 0x00000020 , scsiBusOldCallCapable = 0x00000010 , scsiBusUltraSCSI = 0x00000008 ,
  scsiBusDifferential = 0x00000004 , scsiBusFastSCSI = 0x00000002 , scsiBusDMAavailable = 0x00000001
}
 
enum  {
  scsiOddDisconnectUnsafeRead1 , scsiOddDisconnectUnsafeWrite1 , scsiBusErrorsUnsafe = 0x0004 , scsiRequiresHandshake ,
  scsiTargetDrivenSDTRSafe = 0x0010 , scsiOddCountForPhysicalUnsafe , scsiAbortCmdFixed , scsiMeshACKTimingFixed
}
 
enum  {
  scsiMotherboardBus = 0x00 , scsiNuBus = 0x01 , scsiPDSBus = 0x03 , scsiPCIBus = 0x04 ,
  scsiPCMCIABus = 0x05 , scsiFireWireBridgeBus = 0x06 , scsiUSBBus = 0x07
}
 
enum  { scsiDeviceSensitive = 0x0001 , scsiDeviceNoOldCallAccess = 0x0002 }
 
enum  {
  xptSCSIAction = 0x0001 , xptSCSIRegisterBus = 0x0002 , xptSCSIDeregisterBus = 0x0003 , xptSCSIReregisterBus = 0x0004 ,
  xptSCSIKillXPT = 0x0005 , xptSCSIInitialize = 0x000A
}
 
enum  {
  scsiStatGood = 0x00 , scsiStatCheckCondition = 0x02 , scsiStatConditionMet = 0x04 , scsiStatBusy = 0x08 ,
  scsiStatIntermediate = 0x10 , scsiStatIntermedMet = 0x14 , scsiStatResvConflict = 0x18 , scsiStatTerminated = 0x22 ,
  scsiStatQFull = 0x28
}
 
enum  {
  kCmdCompleteMsg = 0 , kExtendedMsg = 1 , kSaveDataPointerMsg = 2 , kRestorePointersMsg = 3 ,
  kDisconnectMsg = 4 , kInitiatorDetectedErrorMsg = 5 , kAbortMsg = 6 , kMsgRejectMsg = 7 ,
  kNoOperationMsg = 8 , kMsgParityErrorMsg = 9 , kLinkedCmdCompleteMsg = 10 , kLinkedCmdCompleteWithFlagMsg = 11 ,
  kBusDeviceResetMsg = 12 , kAbortTagMsg = 13 , kClearQueueMsg = 14 , kInitiateRecoveryMsg = 15 ,
  kReleaseRecoveryMsg = 16 , kTerminateIOProcessMsg = 17 , kSimpleQueueTag = 0x20 , kHeadOfQueueTagMsg = 0x21 ,
  kOrderedQueueTagMsg = 0x22 , kIgnoreWideResidueMsg = 0x23
}
 

Functions

OSErr SCSIReset (void)
 Reset the SCSI bus. More...
 
OSErr SCSIGet (void)
 Arbitrate for use of the SCSI bus. More...
 
OSErr SCSISelect (short targetID)
 Select a SCSI device with a specific ID. More...
 
OSErr SCSICmd (Ptr buffer, short count)
 Send a command to the selected target device. More...
 
OSErr SCSIRead (Ptr tibPtr)
 Transfer data from the target to the initiator. More...
 
OSErr SCSIRBlind (Ptr tibPtr)
 Transfer data without polling and waiting for /REQ line. More...
 
OSErr SCSIWrite (Ptr tibPtr)
 Transfer data from the initiator to the target. More...
 
OSErr SCSIWBlind (Ptr tibPtr)
 Transfer data without polling and waiting for /REQ line. More...
 
OSErr SCSIComplete (short *stat, short *message, unsigned long wait)
 Give current command specific number of ticks to complete. More...
 
short SCSIStat (void)
 Get bit map of SCSI control and status bits. More...
 
OSErr SCSISelAtn (short targetID)
 Select SCSI device and signal intention to send a message. More...
 
OSErr SCSIMsgIn (short *message)
 Get a message from the SCSI device. More...
 
OSErr SCSIMsgOut (short message)
 Send a message to the SCSI device. More...
 
typedef CALLBACK_API_C (void, AENCallbackProcPtr)(void)
 
typedef CALLBACK_API_C (OSErr, SIMInitProcPtr)(Ptr SIMinfoPtr)
 
typedef CALLBACK_API_C (void, SIMActionProcPtr)(void *scsiPB
 
typedef CALLBACK_API_C (void, SCSIProcPtr)(void)
 
typedef CALLBACK_API_C (void, SCSIMakeCallbackProcPtr)(void *scsiPB)
 
typedef CALLBACK_API_C (long, SCSIInterruptPollProcPtr)(Ptr SIMGlobals)
 
typedef CALLBACK_API_C (long, SCSIInterruptProcPtr)(Ptr SIMGlobals)
 
typedef STACK_UPP_TYPE (AENCallbackProcPtr) AENCallbackUPP
 
typedef STACK_UPP_TYPE (SIMInitProcPtr) SIMInitUPP
 
typedef STACK_UPP_TYPE (SIMActionProcPtr) SIMActionUPP
 
typedef STACK_UPP_TYPE (SCSIProcPtr) SCSIUPP
 
typedef STACK_UPP_TYPE (SCSIMakeCallbackProcPtr) SCSIMakeCallbackUPP
 
typedef STACK_UPP_TYPE (SCSIInterruptPollProcPtr) SCSIInterruptPollUPP
 
typedef STACK_UPP_TYPE (SCSIInterruptProcPtr) SCSIInterruptUPP
 
AENCallbackUPP NewAENCallbackUPP (AENCallbackProcPtr userRoutine)
 
SIMInitUPP NewSIMInitUPP (SIMInitProcPtr userRoutine)
 
SIMActionUPP NewSIMActionUPP (SIMActionProcPtr userRoutine)
 
SCSIUPP NewSCSIUPP (SCSIProcPtr userRoutine)
 
SCSIMakeCallbackUPP NewSCSIMakeCallbackUPP (SCSIMakeCallbackProcPtr userRoutine)
 
SCSIInterruptPollUPP NewSCSIInterruptPollUPP (SCSIInterruptPollProcPtr userRoutine)
 
SCSIInterruptUPP NewSCSIInterruptUPP (SCSIInterruptProcPtr userRoutine)
 
void DisposeAENCallbackUPP (AENCallbackUPP userUPP)
 
void DisposeSIMInitUPP (SIMInitUPP userUPP)
 
void DisposeSIMActionUPP (SIMActionUPP userUPP)
 
void DisposeSCSIUPP (SCSIUPP userUPP)
 
void DisposeSCSIMakeCallbackUPP (SCSIMakeCallbackUPP userUPP)
 
void DisposeSCSIInterruptPollUPP (SCSIInterruptPollUPP userUPP)
 
void DisposeSCSIInterruptUPP (SCSIInterruptUPP userUPP)
 
void InvokeAENCallbackUPP (AENCallbackUPP userUPP)
 
OSErr InvokeSIMInitUPP (Ptr SIMinfoPtr, SIMInitUPP userUPP)
 
void InvokeSIMActionUPP (void *scsiPB, Ptr SIMGlobals, SIMActionUPP userUPP)
 
void InvokeSCSIUPP (SCSIUPP userUPP)
 
void InvokeSCSIMakeCallbackUPP (void *scsiPB, SCSIMakeCallbackUPP userUPP)
 
long InvokeSCSIInterruptPollUPP (Ptr SIMGlobals, SCSIInterruptPollUPP userUPP)
 
long InvokeSCSIInterruptUPP (Ptr SIMGlobals, SCSIInterruptUPP userUPP)
 
typedef CALLBACK_API (void, SCSICallbackProcPtr)(void *scsiPB)
 
typedef STACK_UPP_TYPE (SCSICallbackProcPtr) SCSICallbackUPP
 
SCSICallbackUPP NewSCSICallbackUPP (SCSICallbackProcPtr userRoutine)
 
void DisposeSCSICallbackUPP (SCSICallbackUPP userUPP)
 
void InvokeSCSICallbackUPP (void *scsiPB, SCSICallbackUPP userUPP)
 
typedef CALLBACK_API (OSErr, PatchEntryPoint)(PatchDescriptor *myPatch
 
OSErr SCSIAction (SCSI_PB *parameterBlock)
 
OSErr SCSIRegisterBus (SIMInitInfo *parameterBlock)
 
OSErr SCSIDeregisterBus (SCSI_PB *parameterBlock)
 
OSErr SCSIReregisterBus (SIMInitInfo *parameterBlock)
 
OSErr SCSIKillXPT (SIMInitInfo *parameterBlock)
 

Detailed Description

SCSI Family Interfaces.

Introduced In: SCSI 4.3
Avaliable From: Universal Interfaces 3.4.1
Copyright: � 1986-2001 by Apple Computer, Inc., all rights reserved

For bug reports, consult the following page on the World Wide Web:

http://developer.apple.com/bugreporter/

Macro Definition Documentation

◆ InvokeSCSIInterruptPollUPP

#define InvokeSCSIInterruptPollUPP (   SIMGlobals,
  userUPP 
)
Value:
(long)CALL_ONE_PARAMETER_UPP((userUPP), uppSCSIInterruptPollProcInfo, \
(SIMGlobals))

◆ InvokeSCSIInterruptUPP

#define InvokeSCSIInterruptUPP (   SIMGlobals,
  userUPP 
)
Value:
(long)CALL_ONE_PARAMETER_UPP((userUPP), uppSCSIInterruptProcInfo, \
(SIMGlobals))

◆ InvokeSIMActionUPP

#define InvokeSIMActionUPP (   scsiPB,
  SIMGlobals,
  userUPP 
)
Value:
CALL_TWO_PARAMETER_UPP((userUPP), uppSIMActionProcInfo, (scsiPB), \
(SIMGlobals))

◆ NewAENCallbackUPP

#define NewAENCallbackUPP (   userRoutine)
Value:
(AENCallbackUPP) \
NewRoutineDescriptor((ProcPtr)(userRoutine), uppAENCallbackProcInfo, \
GetCurrentArchitecture())
UniversalProcPtr NewRoutineDescriptor(ProcPtr theProc, ProcInfoType theProcInfo, ISAType theISA)

◆ NewSCSICallbackUPP

#define NewSCSICallbackUPP (   userRoutine)
Value:
(SCSICallbackUPP) \
NewRoutineDescriptor((ProcPtr)(userRoutine), uppSCSICallbackProcInfo, \
GetCurrentArchitecture())

◆ NewSCSIInterruptPollUPP

#define NewSCSIInterruptPollUPP (   userRoutine)
Value:
(SCSIInterruptPollUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), \
uppSCSIInterruptPollProcInfo, \
GetCurrentArchitecture())

◆ NewSCSIInterruptUPP

#define NewSCSIInterruptUPP (   userRoutine)
Value:
(SCSIInterruptUPP) \
NewRoutineDescriptor((ProcPtr)(userRoutine), uppSCSIInterruptProcInfo, \
GetCurrentArchitecture())

◆ NewSCSIMakeCallbackUPP

#define NewSCSIMakeCallbackUPP (   userRoutine)
Value:
(SCSIMakeCallbackUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), \
uppSCSIMakeCallbackProcInfo, \
GetCurrentArchitecture())

◆ NewSCSIUPP

#define NewSCSIUPP (   userRoutine)
Value:
(SCSIUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppSCSIProcInfo, \
GetCurrentArchitecture())

◆ NewSIMActionUPP

#define NewSIMActionUPP (   userRoutine)
Value:
(SIMActionUPP) NewRoutineDescriptor( \
(ProcPtr)(userRoutine), uppSIMActionProcInfo, GetCurrentArchitecture())

◆ NewSIMInitUPP

#define NewSIMInitUPP (   userRoutine)
Value:
(SIMInitUPP) NewRoutineDescriptor( \
(ProcPtr)(userRoutine), uppSIMInitProcInfo, GetCurrentArchitecture())

◆ SCSIPBHdr

#define SCSIPBHdr
Value:
struct SCSIHdr *qLink; \
short scsiReserved1; \
UInt16 scsiPBLength; \
UInt8 scsiFunctionCode; \
UInt8 scsiReserved2; \
volatile OSErr scsiResult; \
DeviceIdent scsiDevice; \
SCSICallbackUPP scsiCompletion; \
UInt32 scsiFlags; \
UInt8 *scsiDriverStorage; \
Ptr scsiXPTprivate; \
long scsiReserved3;
Definition: SCSI.h:1316

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

SCSI Manager 4.3 function codes

◆ anonymous enum

anonymous enum

scsiFamilyInternalError and scsiPluginInternalError are intended to handle consistency check failures. For example, if the family stores a record on a lookaside queue, but does not find that record it can use this error to report this failure. SCSI Manager 4.3 uses dsIOCoreErr in a few places, but this is probably not the best error. In general, internal errors should be reported as bugs.

The following range of errors is provided for third-party (non-Apple) SCSI SIM and device driver vendors. In general, they would be used for error conditions that are not covered by the standardized errors. They should not normally be conveyed to normal applications, but might be used for communication between a plug-in and a vendor-provided device driver (for example, to manage RAID hot-swapping).

Note: I don't know how many SCSI errors are reserved in the error code architecture. Don't assume that we'll actually get sixteen, but we should reserve at least one.

◆ anonymous enum

anonymous enum

SCSI bus status. These values are returned by the SCSI target in the status phase. They are not related to Macintosh status values (except that values other than scsiStatusGood will result in scsiResult set to scsiNonZeroStatus).

Function Documentation

◆ CALLBACK_API()

typedef CALLBACK_API ( void  ,
SCSICallbackProcPtr   
)

SCSI Completion routine callback for SCSIAction.

◆ CALLBACK_API_C()

typedef CALLBACK_API_C ( void  ,
AENCallbackProcPtr   
)

SCSI Callback Procedure Prototypes. Several of these are only callable from SCSI Manager 4.3 SIM and XPT contexts.

◆ DisposeAENCallbackUPP()

void DisposeAENCallbackUPP ( AENCallbackUPP  userUPP)

DisposeAENCallbackUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ DisposeSCSICallbackUPP()

void DisposeSCSICallbackUPP ( SCSICallbackUPP  userUPP)

DisposeSCSICallbackUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.3 and later
Mac OS X: in version 10.0 and later

◆ DisposeSCSIInterruptPollUPP()

void DisposeSCSIInterruptPollUPP ( SCSIInterruptPollUPP  userUPP)

DisposeSCSIInterruptPollUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ DisposeSCSIInterruptUPP()

void DisposeSCSIInterruptUPP ( SCSIInterruptUPP  userUPP)

DisposeSCSIInterruptUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ DisposeSCSIMakeCallbackUPP()

void DisposeSCSIMakeCallbackUPP ( SCSIMakeCallbackUPP  userUPP)

DisposeSCSIMakeCallbackUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ DisposeSCSIUPP()

void DisposeSCSIUPP ( SCSIUPP  userUPP)

DisposeSCSIUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ DisposeSIMActionUPP()

void DisposeSIMActionUPP ( SIMActionUPP  userUPP)

DisposeSIMActionUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ DisposeSIMInitUPP()

void DisposeSIMInitUPP ( SIMInitUPP  userUPP)

DisposeSIMInitUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ InvokeAENCallbackUPP()

void InvokeAENCallbackUPP ( AENCallbackUPP  userUPP)

InvokeAENCallbackUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ InvokeSCSICallbackUPP()

void InvokeSCSICallbackUPP ( void *  scsiPB,
SCSICallbackUPP  userUPP 
)

InvokeSCSICallbackUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.3 and later
Mac OS X: in version 10.0 and later

◆ InvokeSCSIInterruptPollUPP()

long InvokeSCSIInterruptPollUPP ( Ptr  SIMGlobals,
SCSIInterruptPollUPP  userUPP 
)

InvokeSCSIInterruptPollUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ InvokeSCSIInterruptUPP()

long InvokeSCSIInterruptUPP ( Ptr  SIMGlobals,
SCSIInterruptUPP  userUPP 
)

InvokeSCSIInterruptUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ InvokeSCSIMakeCallbackUPP()

void InvokeSCSIMakeCallbackUPP ( void *  scsiPB,
SCSIMakeCallbackUPP  userUPP 
)

InvokeSCSIMakeCallbackUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ InvokeSCSIUPP()

void InvokeSCSIUPP ( SCSIUPP  userUPP)

InvokeSCSIUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ InvokeSIMActionUPP()

void InvokeSIMActionUPP ( void *  scsiPB,
Ptr  SIMGlobals,
SIMActionUPP  userUPP 
)

InvokeSIMActionUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ InvokeSIMInitUPP()

OSErr InvokeSIMInitUPP ( Ptr  SIMinfoPtr,
SIMInitUPP  userUPP 
)

InvokeSIMInitUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ NewAENCallbackUPP()

AENCallbackUPP NewAENCallbackUPP ( AENCallbackProcPtr  userRoutine)

NewAENCallbackUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ NewSCSICallbackUPP()

SCSICallbackUPP NewSCSICallbackUPP ( SCSICallbackProcPtr  userRoutine)

NewSCSICallbackUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.3 and later
Mac OS X: in version 10.0 and later

◆ NewSCSIInterruptPollUPP()

SCSIInterruptPollUPP NewSCSIInterruptPollUPP ( SCSIInterruptPollProcPtr  userRoutine)

NewSCSIInterruptPollUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ NewSCSIInterruptUPP()

SCSIInterruptUPP NewSCSIInterruptUPP ( SCSIInterruptProcPtr  userRoutine)

NewSCSIInterruptUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ NewSCSIMakeCallbackUPP()

SCSIMakeCallbackUPP NewSCSIMakeCallbackUPP ( SCSIMakeCallbackProcPtr  userRoutine)

NewSCSIMakeCallbackUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ NewSCSIUPP()

SCSIUPP NewSCSIUPP ( SCSIProcPtr  userRoutine)

NewSCSIUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ NewSIMActionUPP()

SIMActionUPP NewSIMActionUPP ( SIMActionProcPtr  userRoutine)

NewSIMActionUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ NewSIMInitUPP()

SIMInitUPP NewSIMInitUPP ( SIMInitProcPtr  userRoutine)

NewSIMInitUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ SCSIAction()

OSErr SCSIAction ( SCSI_PB parameterBlock)

SCSIAction()

Availability:

Non-Carbon CFM: in InterfaceLib 7.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SCSICmd()

OSErr SCSICmd ( Ptr  buffer,
short  count 
)

Send a command to the selected target device.

SCSICmd sends the command pointed to by buffer to the selected target
device. The size of the command in bytes is specified in count.
bufferis a pointer to a command descriptor block; the SCSI command
structure is outlined in ANSC document X3T0.2/82-2.
countis the size of the command descriptor block pointer to by buffer.
Returns
an error code indicating success or failure of the function. It will be
one of:
noErr(0) No error
scCommErr (2) Breakdown in SCSI protocols
scPhaseErr (5) Phase error
Note
 The error codes returned by SCSI Manager routines typically indicate
only that a given operation has failed. To determine the actual cause of the
failure, another SCSI command needs to be sent asking the device what went
wrong.
Use SCSISelect to specify the target device.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ SCSIComplete()

OSErr SCSIComplete ( short *  stat,
short *  message,
unsigned long  wait 
)

Give current command specific number of ticks to complete.

SCSIComplete gives the current command wait number of ticks to complete;
the two completion bytes are returned in stat and message.
Returns
an error code indicating success or failure of the function. It will be
one of:
noErr(0)No error
scCommErr (2)Breakdown in SCSI protocols
scPhaseErr (5)Phase error
Note
 The error codes returned by SCSI Manager routines typically indicate
only that a given operation has failed. To determine the actual cause of the
failure, another SCSI command needs to be sent asking the device what went
wrong.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ SCSIDeregisterBus()

OSErr SCSIDeregisterBus ( SCSI_PB parameterBlock)

SCSIDeregisterBus()

Availability:

Non-Carbon CFM: in InterfaceLib 7.5 and later
Carbon Lib: not available
Mac OS X: not available

◆ SCSIGet()

OSErr SCSIGet ( void  )

Arbitrate for use of the SCSI bus.

SCSIGet arbitrates for use of the SCSI bus.
Returns
an error code indicating success or failure of the function. It will be
one of:
noErr(0) No error
scCommErr (2) Breakdown in SCSI protocols
Note
 The error codes returned by SCSI Manager routines typically indicate
only that a given operation has failed. To determine the actual cause of the
failure, another SCSI command needs to be sent asking the device what went
wrong.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ SCSIKillXPT()

OSErr SCSIKillXPT ( SIMInitInfo parameterBlock)

SCSIKillXPT()

Availability:

Non-Carbon CFM: in InterfaceLib 7.5 and later
Carbon Lib: not available
Mac OS X: not available

◆ SCSIMsgIn()

OSErr SCSIMsgIn ( short *  message)

Get a message from the SCSI device.

SCSIMsgIn gets a message from the external drive.
 message is in the low-order byte of the message parameter.
Returns
an error code indicating success or failure of the function. It will be
one of:
noErr(0) No error
scArbNBErr (3) Arbitration failure during SCSIGet; bus busy
scMgrBusyErr (7) SCSI Manager already occupied when SCSIGet was called
scSequenceErr (8) Operation out of sequence
scBusTOErr (9) Bus timeout before data ready on blind read or write
scComplPhaseErr (10) Bus not in Status phase; SCSIComplete call failed
Note
 Message values are listed in SCSI documentation from the American
National Standards Institute. This routine leaves the Attention bus line
undisturbed if it is already asserted.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ SCSIMsgOut()

OSErr SCSIMsgOut ( short  message)

Send a message to the SCSI device.

SCSIMsgOut sends a message to the external drive.
 message is an ANSI-defined value in the low-order byte of the message
parameter.
Returns
an error code indicating success or failure of the function. It will be
one of:
noErr(0) No error
scArbNBErr (3) Arbitration failure during SCSIGet; bus busy
scMgrBusyErr (7) SCSI Manager already occupied when SCSIGet was called
scSequenceErr (8) Operation out of sequence
scBusTOErr (9) Bus timeout before data ready on blind read or write
scComplPhaseErr (10) Bus not Out Status phase; SCSIComplete call failed
Note
 Message values are listed in SCSI documentation from the American
National Standards Institute.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ SCSIRBlind()

OSErr SCSIRBlind ( Ptr  tibPtr)

Transfer data without polling and waiting for /REQ line.

SCSIRBlind transfers data from the target to the initiator, as specified by
the transfer instructions block pointed to by tibPtr. It is functionally
equivalent to SCSIRead , but it does not poll and wait for the /REQ line on each
data byte. Rather the /REQ line is polled only for the first byte transferred by
each scInc, scNoInc or scComp instruction.
Given the following instruction block:
scOpcode scParam1 scParam2
scInc 0x67B50 512
scLoop -10 6
scStop
SCSIRBlind polls and wait only for the first byte of each 512-byte block
transferred.
Returns
an error code indicating success or failure of the function. It will be
one of:
noErr(0)No error
scBadParmsErr (4)Unrecognized instruction in transfer instruction block
scCommErr (2)Breakdown in SCSI protocols
scCompareErr (6)Data comparison error
scPhaseErr (5)Phase error
Note
 The error codes returned by SCSI Manager routines typically indicate
only that a given operation has failed. To determine the actual cause of the
failure, another SCSI command needs to be sent asking the device what went
wrong.
A transfer instructions block tells the SCSI Manager what to do
with the data bytes transferred during the data phase. A transfer instruction
block contains a pseudo-program consisting of a variable number of
instructions; it's similar to a subroutine except that the instructions are
provided and interpreted by the SCSI Manager itself. The instructions are
of a fixed size and are of type SCSIInstr . See SCSIInstr for more
information on the the instructions that are available.
Use SCSISelect to specify the target device.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ SCSIRead()

OSErr SCSIRead ( Ptr  tibPtr)

Transfer data from the target to the initiator.

SCSIRead transfers data from the target to the initiator, as specified by the
transfer instructions block pointed to by tibPtr.
Returns
an error code indicating success or failure of the function. It will be
one of:
noErr(0)No error
scBadParmsErr (4)Unrecognized instruction in transfer instruction block
scCommErr (2)Breakdown in SCSI protocols
scCompareErr (6)Data comparison error (with scComp command in
tranfer instruction block)
scPhaseErr (5)Phase error
Note
 The error codes returned by SCSI Manager routines typically indicate
only that a given operation has failed. To determine the actual cause of the
failure, another SCSI command needs to be sent asking the device what went
wrong.
A transfer instructions block tells the SCSI Manager what to do
with the data bytes transferred during the data phase. A transfer instruction
block contains a pseudo-program consisting of a variable number of
instructions; it's similar to a subroutine except that the instructions are
provided and interpreted by the SCSI Manager itself. The instructions are
of a fixed size and are of type SCSIInstr . See SCSIInstr for more
information on the the instructions that are available.
Use SCSISelect to specify the target device.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ SCSIRegisterBus()

OSErr SCSIRegisterBus ( SIMInitInfo parameterBlock)

SCSIRegisterBus()

Availability:

Non-Carbon CFM: in InterfaceLib 7.5 and later
Carbon Lib: not available
Mac OS X: not available

◆ SCSIReregisterBus()

OSErr SCSIReregisterBus ( SIMInitInfo parameterBlock)

SCSIReregisterBus()

Availability:

Non-Carbon CFM: in InterfaceLib 7.5 and later
Carbon Lib: not available
Mac OS X: not available

◆ SCSIReset()

OSErr SCSIReset ( void  )

Reset the SCSI bus.

SCSIReset resets the SCSI bus.
Returns
an error code indicating success or failure of the function. It will be
one of:
noErr(0) No error
scCommErr (2) Breakdown in SCSI protocols
Note
 The error codes returned by SCSI Manager routines typically indicate
only that a given operation has failed. To determine the actual cause of the
failure, another SCSI command needs to be sent asking the device what went
wrong.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ SCSISelAtn()

OSErr SCSISelAtn ( short  targetID)

Select SCSI device and signal intention to send a message.

SCSISelAtn is the same as SCSISelect except that it also asserts the bus's
Attention line to indicate that there is a message pending for that drive.
targetID identifies the selected SCSI device.
Returns
an error code indicating success or failure of the function. It will be
one of:
noErr(0) No error
scArbNBErr (3) Arbitration failure during SCSIGet; bus busy
scMgrBusyErr (7) SCSI Manager already occupied when SCSIGet was called
scSequenceErr (8) Operation out of sequence
scBusTOErr (9) Bus timeout before data ready on blind read or write
scComplPhaseErr (10) Bus not in Status phase; SCSIComplete call failed
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ SCSISelect()

OSErr SCSISelect ( short  targetID)

Select a SCSI device with a specific ID.

SCSISelect selects the device whose ID is targetID.
Returns
an error code indicating success or failure of the function. It will be
one of:
noErr(0) No error
scCommErr (2) Breakdown in SCSI protocols
Note
 The error codes returned by SCSI Manager routines typically indicate
only that a given operation has failed. To determine the actual cause of the
failure, another SCSI command needs to be sent asking the device what went
wrong.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ SCSIStat()

short SCSIStat ( void  )

Get bit map of SCSI control and status bits.

SCSIStat returns a bit map of SCSI control and status bits; these bits are
given below. See the NCR 5380 SCSI chip documentation for a description of
these signals (Bits 0-9 are complements of the SCSI bus standard signals.)
Bit Signal BitSignal
15END DMA 7RST
14DMA REQ 6BSY
13PTY ERR 5REQ
12INT REQ 4MSG
11PHS MAT 3C/D
10BSY ERR 2I/O
9ATN 1SEL
8ACK 0DBP
Returns
an error code indicating success or failure of the function. It will be
one of:
noErr(0)No error
scCommErr (2)Breakdown in SCSI protocols
scPhaseErr (5)Phase error
Note
 The error codes returned by SCSI Manager routines typically indicate
only that a given operation has failed. To determine the actual cause of the
failure, another SCSI command needs to be sent asking the device what went
wrong.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ SCSIWBlind()

OSErr SCSIWBlind ( Ptr  tibPtr)

Transfer data without polling and waiting for /REQ line.

SCSIWBlind transfers data from the initiator to the target, as specified by
the transfer instructions block pointed to by tibPtr. SCSIWBlind is
functionally identical to SCSIWrite , but does not poll and wait for the /REQ
line on each data byte. As with SCSIRBlind , SCSIWBlind polls the /REQ
line only for the first byte transferred by each scInc, scNoInc, or scComp
instruction.
Returns
an error code indicating success or failure of the function. It will be
one of:
noErr(0)No error
scBadParmsErr (4)Unrecognized instruction in transfer instruction block
scCommErr (2)Breakdown in SCSI protocols
scPhaseErr (5)Phase error
Note
 The error codes returned by SCSI Manager routines typically indicate
only that a given operation has failed. To determine the actual cause of the
failure, another SCSI command needs to be sent asking the device what went
wrong.
A transfer instructions block tells the SCSI Manager what to do
with the data bytes transferred during the data phase. A transfer instruction
block contains a pseudo-program consisting of a variable number of
instructions; it's similar to a subroutine except that the instructions are
provided and interpreted by the SCSI Manager itself. The instructions are
of a fixed size and are of type SCSIInstr . See SCSIInstr for more
information on the the instructions that are available.
Use SCSISelect to specify the target device.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ SCSIWrite()

OSErr SCSIWrite ( Ptr  tibPtr)

Transfer data from the initiator to the target.

SCSIWrite transfers data from the initiator to the target, as specified by
the transfer instructions block pointed to by tibPtr.
Returns
an error code indicating success or failure of the function. It will be
one of:
noErr(0)No error
scBadParmsErr (4)Unrecognized instruction in transfer instruction block
scCommErr (2)Breakdown in SCSI protocols
scPhaseErr (5)Phase error
Note
 The error codes returned by SCSI Manager routines typically indicate
only that a given operation has failed. To determine the actual cause of the
failure, another SCSI command needs to be sent asking the device what went
wrong.
A transfer instructions block tells the SCSI Manager what to do
with the data bytes transferred during the data phase. A transfer instruction
block contains a pseudo-program consisting of a variable number of
instructions; it's similar to a subroutine except that the instructions are
provided and interpreted by the SCSI Manager itself. The instructions are
of a fixed size and are of type SCSIInstr . See SCSIInstr for more
information on the the instructions that are available.
Use SCSISelect to specify the target device.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available