SCSIResetBusYou use the
SCSIResetBusfunction to reset a SCSI bus.
OSErr SCSIAction(SCSI_PB *scsiPB);
- A pointer to a SCSI Manager parameter block.
--> scsiPBLength UInt16 The size of the parameter block. --> scsiFunctionCode UInt8 The
SCSIResetBusfunction selector code (0x11).
<-- scsiResult OSErr The returned result code. --> scsiDevice DeviceIdent The device identification record. Only the bus number is required. --> scsiCompletion CallbackProc A pointer to a completion routine. If set to
nil, the function is executed synchronously.
--> scsiDriverStorage UInt8 * Optional pointer to the device driver's private storage.
SCSIResetBusfunction directs the HBA to assert the SCSI bus reset signal, causing all devices on the bus to clear pending I/O and forcing the bus into the bus free phase. In addition, the SIM calls the completion routines for all requests that were already delivered to devices. The appropriate LUN queue is frozen for each of the requests that were reset, unless the scsiSIMQNoFreeze flag is set.
SCSIResetBusfunction interrupts SCSI communications and can cause data loss. You should use this function only to restore operation in the event that a device refuses to release the bus. You can use the
SCSIResetDevicefunction to reset a single device when the SCSI bus is operational and the device is still responding to selection.
noErr 0 No error scsiBusInvalid -7869 The bus ID is invalid scsiRequestInvalid -7870 The parameter block request is invalid scsiPBLengthError -7872 The parameter block is too small for this SIM scsiQLinkInvalid -7881 The
qLinkfield was not 0