IOUserSCSIParallelInterfaceController
A DriverKit provider object that manages communications with SCSI-based devices.
Declaration
class IOUserSCSIParallelInterfaceController;Overview
Implement your driver by subclassing this class and overriding all pure virtual methods.
The DriverKit framework starts the Default dispatch queue. The system expects your dext to create two additional dispatch queues, named AuxiliaryQueue and InterruptQueue. The UserCreateTargetForID method uses the AuxiliaryQueue to avoid deadlock during start and initialization.
The framework invokes the dext class’s Start and other methods to initialize the SCSI controller. Because these calls occur during DriverKit’s matching, it’s important to complete them quickly, to prevent keeping IORegsitry in a busy state for a long time. In some cases, probing the media may take a long time and delay the initialization, especially when working with HDDs. Defer these tasks if they take a long time to complete.
The framework provides the UserReportHBAConstraints API to report controller I/O constraints. Make sure your dext reports these constraints accurately — particularly all mandatory keys — during initialization. This helps prevent intermittent failures, such as controller firmware buffer overflows.
Support power capabilities
IOUserSCSIParallelInterfaceController supports the following power capabilities:
Implement the SetPowerState method in your service object and use it to put your driver in a safe state for the new power setting. Call super either as the last step in your implementation, or when the dext is ready to acknowledge the power state transition.
The following code example implements SetPowerState by performing a check to see if the new state is kIOServicePowerCapabilityOn. If it is, the implementation calls a private IssueHardReset() method.
kern_return_t
IMPL ( ExampleSCSIDext, SetPowerState )
{
kern_return_t ret = kIOReturnError;
…
if ( powerState == kIOServicePowerCapabilityOn )
{
ret = IssueHardReset ( );
ivars->fCurrentPowerState = kIOServicePowerCapabilityOn;
}
return ret;
}The hypothetical driver in this example still needs to acknowledge the power state change when it’s appropriate. For example, it can ensure a rescan brought up all its targets, and then call SetPowerState ( powerState, SUPERDISPATCH );.
Topics
Managing controllers
Managing tasks
Managing bundled parallel tasks
UserProcessBundledParallelTasksUserMapBundledParallelTaskCommandAndResponseBuffersBundledParallelTaskCompletionkMaxBundledParallelTasks
Managing targets
UserInitializeTargetForIDUserCreateTargetForIDUserDestroyTargetForIDUserTargetPresentForIDUserSetTargetPropertiesUserRemoveTargetProperties
Performing SCSI standard task management
UserAbortTaskRequestUserAbortTaskSetRequestUserClearACARequestUserClearTaskSetRequestUserLogicalUnitResetRequestUserTargetResetRequest
Managing host bus adapters
UserReportInitiatorIdentifierUserReportHighestSupportedDeviceIDUserReportMaximumTaskCountUserDoesHBAPerformDeviceManagementUserReportHBAHighestLogicalUnitNumberUserDoesHBAPerformAutoSenseUserDoesHBASupportMultiPathingUserDoesHBASupportSCSIParallelFeatureSCSIParallelFeatureUserMapHBADataUserSetHBAPropertiesUserRemoveHBAPropertiesUserReportHBAConstraints