IOFireWireSerialBusProtocolTransport

Inherits from
IOSCSIProtocolServices
Availability
Available in OS X v10.0 and later.
Declared in
IOFireWireSerialBusProtocolTransport.h

Overview

SCSI Protocol Driver Family for FireWire SBP2 Devices.

IOFireWireSerialBusProtocolTransport contains all the bus specific support for FireWire SBP2 compliant devices. To add vendor specific features or workarounds you will sub-class the appropriate methods of this family.

Tasks

Miscellaneous

Instance Methods

AbortSCSICommand

This method is intended to abort an in progress SCSI Task.

virtual SCSIServiceResponse AbortSCSICommand ( SCSITaskIdentifier request );
Return Value

See SCSITask.h for SCSIServiceResponse codes.

Discussion

Currently not implemented in super class. This is a stub method for adding the abort command in the near future.

AllocateResources

Allocate Resources.

virtual IOReturn AllocateResources ( void );
Discussion

Called from start method to allocate needed resources.

cleanUp

cleanUp is called to tear down IOFireWireSerialBusProtocolTransport.

virtual void cleanUp ( void );
Discussion

cleanUp is called when we receive a kIOFWMessageServiceIsRequestingClose message or if we fail our initialization.

CoalesceSenseData

CoalesceSenseData convert a SBP-2 status block into a SPC-2 sense block.

SCSITaskStatus CoalesceSenseData ( FWSBP2StatusBlock *sourceData, UInt8 quadletCount, SCSI_Sense_Data *targetData );
Discussion

CoalesceSenseData pulls the appropriate bits out of the SBP2 sense block as defined in SBP-2 Annex B section B.2 and dynamically builds a sense data block as defined in SPC-2 section 7.23.2.

CommandORBAccessor

accessor function for fORB.

IOFireWireSBP2ORB * CommandORBAccessor ( void );
Discussion

xxx.

CompleteSCSITask

This qualifies and sets appropriate data then calls CommandCompleted.

virtual void CompleteSCSITask ( IOFireWireSBP2ORB *orb );
Discussion

See IOSCSIProtocolServices.h for more details regarding CommandCompleted.

CriticalOrbSubmission

xxx.

void CriticalOrbSubmission ( IOFireWireSBP2ORB *orb, SCSITaskIdentifier request );
Return Value

none.

Discussion

xxx.

DeallocateResources

Deallocate Resources.

virtual void DeallocateResources ( void );
Discussion

Called from cleanUp method to deallocate resources.

finalize

See IOService for discussion.

virtual bool finalize ( IOOptionBits options );
Return Value

Returns true.

free

virtual void free ( void );
Return Value

none.

Discussion

See IOService for discussion.

HandleProtocolServiceFeature

Handle specified feature supported by the protocol layer.

virtual bool HandleProtocolServiceFeature ( SCSIProtocolFeature feature, void *serviceValue );
Return Value

Will return true if the specified feature is supported by the protocol layer.

Discussion

See IOSCSIProtocolServices.h for more details regarding HandleProtocolServiceFeature.

init

See IOService for discussion.

bool init ( OSDictionary *propTable );
Discussion

Setup and prime class into known state.

IsProtocolServiceSupported

Determine is specified feature is supported by the protocol layer.

virtual bool IsProtocolServiceSupported ( SCSIProtocolFeature feature, void *serviceValue );
Return Value

Will return true if the specified feature is supported by the protocol layer.

Discussion

If the service has a value that must be returned, it will be returned in the serviceValue output parameter. See IOSCSIProtocolServices.h for more details regarding IsProtocolServiceSupported.

LoginCompletion

Completion routine for login complete.

virtual void LoginCompletion ( FWSBP2LoginCompleteParams *params );
Discussion

See IOFireWireSBP2Lib.h for details regarding the FWSBP2LogoutCompleteParams structure that is passed in to the completion.

LogoutCompletion

Completion routine for logout complete.

virtual void LogoutCompletion ( FWSBP2LogoutCompleteParams *params );
Discussion

See IOFireWireSBP2Lib.h for details regarding the FWSBP2LogoutCompleteParams structure that is passed in to the completion.

LunResetComplete

Callback to submit Fetch Agent Reset.

virtual void LunResetComplete ( IOReturn status, IOFireWireSBP2ManagementORB *orb );
Discussion

See IOFireWireSBP2Lib.h for details regarding the submitFetchAgentReset method.

SBP2LoginAccessor

accessor function for fLogin.

IOFireWireSBP2Login * SBP2LoginAccessor ( void );
Discussion

xxx.

SendSCSICommand

Prepare and send a SCSI command to the device.

virtual bool SendSCSICommand ( SCSITaskIdentifier request, SCSIServiceResponse *serviceResponse, SCSITaskStatus *taskStatus );
Return Value

If the command was sent to the device and is pending completion, the subclass should return true and return back the kSCSIServiceResponse_Request_In_Process response. If the command completes immediately with an error, the subclass will return true and return back the appropriate status. If the subclass is currently processing all the commands it can, the subclass will return false and the command will be resent next time CommandCompleted is called.

Discussion

The incoming SCSITaskIdentifier gets turned into a IOFireWireSBP2ORB and is submitted to the SBP2 layer. See IOSCSIProtocolServices.h for more details regarding SendSCSICommand. Also see IOFireWireSBP2Lib.h for details regarding the IOFireWireSBP2ORB structure and the submitORB method.

SetCommandBuffers

Method to set orb's buffers.

virtual IOReturn SetCommandBuffers ( IOFireWireSBP2ORB *orb, SCSITaskIdentifier request );
Return Value

xxx.

Discussion

This method was added so that subclasses can override and massage buffers as needed. The default simply calls setCommandBuffers. See IOFireWireSBP2Lib.h for details regarding the setCommandBuffers method.

SetValidAutoSenseData

Set the auto sense data that was returned for a given SCSI Task.

void SetValidAutoSenseData ( SBP2ClientOrbData *clientData, FWSBP2StatusBlock *statusBlock, SCSI_Sense_Data *targetData );
Discussion

SetValidAutoSenseData is called to qualify sense data that is copied to the client via the SetAutoSenseData method. See IOSCSIProtocolServices.h for more details regarding SetAutoSenseData.

start

virtual bool start ( IOService *provider );
Return Value

Return true if the start was successful, false otherwise ( which will cause the instance to be detached and usually freed ).

Discussion

See IOService for discussion.

StatusNotify

This is our handler for status.

virtual void StatusNotify ( FWSBP2NotifyParams *params );
Discussion

See IOFireWireSBP2Lib.h for details regarding the FWSBP2NotifyParams structure that is passed in to the completion..

UnsolicitedStatusNotify

This is our handler for unsolicited status.

virtual void UnsolicitedStatusNotify ( FWSBP2NotifyParamsPtr params );
Discussion

After we have parsed and handled the unsolicited status we call enableUnsolicitedStatus. See IOFireWireSBP2Lib.h for details regarding the enableUnsolicitedStatus method.

SBP2ClientOrbData

typedef struct {
      IOFireWireSBP2ORB *orb;
      SCSITaskIdentifier scsiTask;
      SCSIServiceResponse serviceResponse;
      SCSITaskStatus taskStatus;
      IOBufferMemoryDescriptor *quadletAlignedBuffer;
} SBP2ClientOrbData;
Discussion

This structure is stuffed into the refcon so we can associate which IOFireWireSBP2ORB and SCSITaskIdentifier is completing.