CompuServe Messages

SCSI-Interface

    10-Mar-94 13:54:48
Sb: SCSI-Interface
Fm: john elemans 76106,3443
To: Steve Fransen 74007,2224
Steve, Sorry I took so long to respond. There definitely is a sequence of commands. They are not the ones that you have listed, though. First, if you are not sure of the state of the device, then you may need to do a request sense etc., but you should usually know what is going on. I start out by reseting the device that I am using when I start. Here is the sequence of scsi commands that you need; This example performs a request sense; scsiINQ.opCode = REQSENSE; scsiINQ.logicalUnit = 0x00; scsiINQ.res1 = 0; scsiINQ.res2 = 0; scsiINQ.allocationLength = sizeof(dvSensePage); scsiINQ.controlByte = 0; firstInstr.scOpcode = 2; /* scNoInc */ firstInstr.scParam1 = (long)&senseData; firstInstr.scParam2 = sizeof(dvSensePage); secondInstr.scOpcode = 7; /* scStop */ secondInstr.scParam1 = 0; secondInstr.scParam2 = 0; if(0 != (gErr = SCSIGet())) return; if(0 != (jErr = SCSISelect(unitID))) return; cErr = SCSICmd((Ptr)&scsiINQ,6); rErr = SCSIRead((Ptr)&firstInstr); cmpErr = SCSIComplete((short *)&status,(short *)&message,2000); sErr = SCSIStat(); You always need SCSIGet, SCSISelect, SCSICmd, SCSIRead (or SCSIWrite), SCSIComplete. I think the SCSIStat is optional. But remember that all this is for the old SCSI manager only. The new one is different, completely.