IOATABusCommand |
Inherits from: | |
Declared In: |
ATA Device (disk) drivers should use the superclass, IOATACommand and may not derive or use any subclass of IOATACommand.
IOATABusCommand is the subclass of IOATACommand used by IOATAControllers. Controller classes may override this class to provide additional fields as their needs dictate or may use this as a concrete class if it is sufficient.
IOATAControllers are always paired with specific IOATADevices and each specific subclass of IOATADevice is in turn the factory method for IOATACommands for use by disk drivers.
In this manner, mass-storage device drivers (disk drivers, clients of ATA bus controllers) see only the generalized interface of IOATADevice and the generalized interface of IOATACommand. This provides isolation from specific bus details for disk drivers and offers flexibility to controllers to add per-command fields and state variables for their own internal use.
factory method to create an instance of this class used by subclasses of IOATADevice
call the completion callback function
get pointer to the memory descriptor for this transaction
return the byte count for this transaction to transfer.
return the callback pointer
return the flags for this command.
return the command opcode
return pointer to the array of packet data.
return the size of atapi packet if any.
the position within the memory buffer for the transaction.
get the register mask for desired regs
return the taskfile structure pointer.
return the timeout value for this command
number of bytes between interrupts.
return the unit id (0 master, 1 slave)
Zeroes all data, returns false if allocation fails. protected.
set the byte count of bytes actually transferred.
mark the command as being in progress.
set the result code
set to blank state, call prior to re-use of this object
allocateCmd |
factory method to create an instance of this class used by subclasses of IOATADevice
public
static IOATABusCommand* allocateCmd( void);
executeCallback |
call the completion callback function
public
virtual void executeCallback( void);
getBuffer |
get pointer to the memory descriptor for this transaction
public
virtual IOMemoryDescriptor* getBuffer ( void);
getByteCount |
return the byte count for this transaction to transfer.
public
virtual IOByteCount getByteCount ( void);
getCallbackPtr |
return the callback pointer
public
virtual IOATACompletionFunction* getCallbackPtr ( void );
getFlags |
return the flags for this command.
public
virtual ataFlags getFlags ( void );
getOpcode |
return the command opcode
public
virtual ataOpcode getOpcode( void );
getPacketData |
return pointer to the array of packet data.
public
virtual UInt16* getPacketData( void);
getPacketSize |
return the size of atapi packet if any.
public
virtual UInt16 getPacketSize( void);
getPosition |
the position within the memory buffer for the transaction.
public
virtual IOByteCount getPosition ( void);
getRegMask |
get the register mask for desired regs
public
virtual ataRegMask getRegMask( void );
getTaskFilePtr |
return the taskfile structure pointer.
public
virtual ataTaskFile* getTaskFilePtr( void);
getTimeoutMS |
return the timeout value for this command
public
virtual UInt32 getTimeoutMS ( void );
getTransferChunkSize |
number of bytes between interrupts.
public
virtual IOByteCount getTransferChunkSize( void);
getUnit |
return the unit id (0 master, 1 slave)
public
virtual ataUnitID getUnit( void );
init |
Zeroes all data, returns false if allocation fails. protected.
protected
virtual bool init();
setActualTransfer |
set the byte count of bytes actually transferred.
public
virtual void setActualTransfer ( IOByteCount bytesTransferred );
setCommandInUse |
mark the command as being in progress.
public
virtual void setCommandInUse( bool inUse = true);
setResult |
set the result code
public
virtual void setResult( IOReturn );
zeroCommand |
set to blank state, call prior to re-use of this object
public
virtual void zeroCommand( void);
ExpansionData |
protected
struct ExpansionData { };
This structure will be used to expand the capablilties of the IOWorkLoop in the future.
queueChain |
public
queue_chain_t queueChain;
queue header for use by IOATAController.
reserved |
protected
ExpansionData *reserved;
Reserved for future use. (Internal use only)
state |
public
UInt32 state;
state-semaphore for use by IOATAController
syncer |
public
IOSyncer* syncer;
IOSyncer for use by IOATAController
Last Updated: 2010-07-29