|
Mac Dev Center
Mac OS X Reference Library Drivers, Kernel, & Hardware: Kernel Device Drivers Kernel Framework Reference
|
IOATADevice |
| Inherits from: | |
| Declared In: |
This object implements a relay to an ATA Bus where a drive is attached.
IOATADevice is the superclass which represents a particular device attached to a particular IOATAController (bus). IOATADevice is the provider for ATA mass-storage device drivers.IOATADevice is the factory for all IOATACommand objects and is responsible for creating and freeing IOATACommands. IOATAControllers will create an instance of IOATADevice for each device physically connected to the ata bus. IOATADevice is virtual and specific subclass should be implemented for particular types of IOATAController. In this manner, controller-specifc IOATACommands may be paired with the proper type of controller.
create IOATACommands. Device drivers should allocate command objects only through this method.
Submit IO requests
release a command object that is no longer needed. Do not free an object in use and do not release the object anymore times than you have retained it.
Find out what kind of device this nub is (ata or atapi)
Determine whether this device is number 0 or 1 (ie, master/slave)
matching stuff for IOBSDInit and so on.
matching stuff for IOBSDInit and so on.
matching stuff for IOBSDInit and so on.
called by controllers when they need to send a message to client (disk) drivers.
Find out the bus capability so the client can choose the features to set and commands to run.
Find out what speed the bus has configured for this unit.
Tell the bus what speed to use for your device.
allocCommand |
create IOATACommands. Device drivers should allocate command objects only through this method.
public
virtual IOATACommand* allocCommand( void );
null if allocation failed. Retain count is one.
executeCommand |
Submit IO requests
public
virtual IOReturn executeCommand( IOATACommand *command);
commandpointer to a valid IOATACommand with the command to be executed.
kIOSuccess (0) if the command was successfully queued in the controller.
freeCommand |
release a command object that is no longer needed. Do not free an object in use and do not release the object anymore times than you have retained it.
public
virtual void freeCommand( IOATACommand *inCommand);
inCommandthe command to be released.
getDeviceType |
Find out what kind of device this nub is (ata or atapi)
public
virtual ataDeviceType getDeviceType( void );
ataDeviceType as defined in IOATATypes.h
getUnitID |
Determine whether this device is number 0 or 1 (ie, master/slave)
public
virtual ataUnitID getUnitID( void );
ataUnitID - 0 or 1.
matchLocation |
matching stuff for IOBSDInit and so on.
matchPropertyTable(OSDictionary *) |
matching stuff for IOBSDInit and so on.
public
virtual bool matchPropertyTable( OSDictionary *table);
matchPropertyTable(OSDictionary *, SInt32 *) |
matching stuff for IOBSDInit and so on.
public
virtual bool matchPropertyTable( OSDictionary *table, SInt32 *score);
notifyEvent |
called by controllers when they need to send a message to client (disk) drivers.
public
virtual void notifyEvent( UInt32 event );
provideBusInfo |
Find out the bus capability so the client can choose the features to set and commands to run.
public
virtual IOReturn provideBusInfo( IOATABusInfo *getInfo);
getInfoa pointer to a valid IOATABusInfo object.
kIOSuccess (0) and the getInfo object will be filled out by the bus controller with information about the bus.
provideConfig |
Find out what speed the bus has configured for this unit.
public
virtual IOReturn provideConfig( IOATADevConfig *configRequest);
configRequestpointer to a valid IOATADevConfig object.
kIOSuccess (0) on successful completion and configRequest will contain the configuration information.
selectConfig |
Tell the bus what speed to use for your device.
public
virtual IOReturn selectConfig( IOATADevConfig *configRequest);
configRequestpointer to a valid and initialized IOATADevConfig object.
kIOSuccess (0) if the configuration was succesfully selected.
This should only be called once during a disk drivers start method before registering its availability, and must be called prior to issuing any data IO transactions.
ExpansionData |
protected
struct ExpansionData { };
This structure will be used to expand the capablilties of the IOWorkLoop in the future.
reserved |
protected
ExpansionData *reserved;
Reserved for future use. (Internal use only)
Last Updated: 2009-10-14