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 / Client Functions


You use the SCSIBusInquiry function to get information about a SCSI bus.

OSErr SCSIAction(SCSIBusInquiryPB *scsiPB);
A pointer to a SCSI bus inquiry parameter block, which is described on page 4-28.
-->scsiPBLengthUInt16The size of the parameter block.
-->scsiFunctionCodeUInt8The SCSIBusInquiry function selector code (0x03).
<--scsiResultOSErrThe returned result code.
-->scsiDeviceDeviceIdentThe device identification record. Only the bus number is required.
-->scsiCompletionCallbackProcUnused. Must be nil.
<--scsiEngineCountUInt16The number of HBA engines.
<--scsiMaxTransferTypeUInt16The number of data transfer types available on the HBA.
<--scsiDataTypesUInt32The data types supported.
<--scsiIOpbSizeUInt16The minimum parameter block size for this SIM.
<--scsiMaxIOpbSizeUInt16The largest parameter block size currently registered.
<--scsiFeatureFlagsUInt32Features of the SIM/HBA.
<--scsiVersionNumberUInt8The version of the SIM/HBA
<--scsiHBAInquiryUInt8Features of the SIM/HBA.
<--scsiSIMPrivatesPtrUInt32A pointer to the SIM's storage.
<--scsiSIMPrivatesSizeUInt32The size of the SIM's storage.
<--scsiHiBusIDUInt8The highest registered bus number.
<--scsiInitiatorIDUInt8SCSI ID of the HBA.
<--scsiFlagsSupportedUInt32Bit mask of supported scsiFlags.
<--scsiIOFlagsSupportedUInt16Bit mask of supported scsiIOFlags.
<--scsiWeirdStuffUInt16Additional flags.
<--scsiMaxTargetUInt16The highest SCSI ID value supported by the HBA.
<--scsiMaxLUNUInt16The highest logical unit number supported by the HBA.
<--scsiSIMVendorSInt8[16]SIM vendor string.
<--scsiHBAVendorSInt8[16]HBA vendor string.
<--scsiControllerFamilySInt8[16]Controller family string.
<--scsiControllerTypeSInt8[16]Controller type string.
<--scsiXPTversionSInt8[4]XPT version string.
<--scsiSIMversionSInt8[4]SIM version string.
<--scsiHBAversionSInt8[4]HBA version string.
<--scsiHBAslotTypeUInt8The slot type of the HBA.
<--scsiHBAslotNumberUInt8The slot number of the HBA.
<--scsiSIMsRsrcIDUInt16The sResource ID of the SIM.
<--scsiAdditionalLengthUInt16The additional size of this parameter block, if any.

The SCSIBusInquiry function returns information about the SIM and HBA for a bus. This function is typically used to find the minimum size of the SCSI I/O parameter block for a particular SIM. You can also use this function to determine whether a bus supports various optional features such as synchronous or wide transfer modes. Because this function is always executed synchronously, the scsiCompletion field must be set to nil.

To find all buses, first request information about the XPT by setting the bus number in the scsiDevice field to 0xFF, then use the value returned in the scsiHiBusID field to set the limits of the search.

noErr0No error
scsiBusInvalid-7869The bus ID is invalid
scsiRequestInvalid-7870The parameter block request is invalid
scsiPBLengthError-7872The parameter block is too small for this SIM
scsiQLinkInvalid-7881The qLink field was not 0
scsiNoHBA-7884No HBA detected
scsiBusy-7887SCSI subsystem is busy

Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996