#include <IOKit/IOTypes.h>
#include "IOATATypes.h"
#include "IOATADevice.h"
#include "IOATAController.h"
#ifdef DLOG
#undef DLOG
#endif
#ifdef ATA_DEBUG
#define DLOG(fmt, args...) IOLog(fmt, ## args)
#else
#define DLOG(fmt, args...)
#endif
#define super IOService
OSDefineMetaClass( IOATADevice, IOService )
OSDefineAbstractStructors( IOATADevice, IOService )
OSMetaClassDefineReservedUnused(IOATADevice, 0);
OSMetaClassDefineReservedUnused(IOATADevice, 1);
OSMetaClassDefineReservedUnused(IOATADevice, 2);
OSMetaClassDefineReservedUnused(IOATADevice, 3);
OSMetaClassDefineReservedUnused(IOATADevice, 4);
OSMetaClassDefineReservedUnused(IOATADevice, 5);
OSMetaClassDefineReservedUnused(IOATADevice, 6);
OSMetaClassDefineReservedUnused(IOATADevice, 7);
OSMetaClassDefineReservedUnused(IOATADevice, 8);
OSMetaClassDefineReservedUnused(IOATADevice, 9);
OSMetaClassDefineReservedUnused(IOATADevice, 10);
OSMetaClassDefineReservedUnused(IOATADevice, 11);
OSMetaClassDefineReservedUnused(IOATADevice, 12);
OSMetaClassDefineReservedUnused(IOATADevice, 13);
OSMetaClassDefineReservedUnused(IOATADevice, 14);
OSMetaClassDefineReservedUnused(IOATADevice, 15);
OSMetaClassDefineReservedUnused(IOATADevice, 16);
OSMetaClassDefineReservedUnused(IOATADevice, 17);
OSMetaClassDefineReservedUnused(IOATADevice, 18);
OSMetaClassDefineReservedUnused(IOATADevice, 19);
OSMetaClassDefineReservedUnused(IOATADevice, 20);
ataUnitID
IOATADevice::getUnitID( void )
{
return _unitNumber;
}
ataDeviceType
IOATADevice::getDeviceType( void )
{
return _deviceType;
}
IOReturn
IOATADevice::provideBusInfo( IOATABusInfo* getInfo)
{
if( !_provider )
return -1;
return _provider->provideBusInfo(getInfo);
}
IOReturn
IOATADevice::selectConfig( IOATADevConfig* configRequest)
{
return _provider->selectConfig( configRequest, _unitNumber);
}
IOReturn
IOATADevice::provideConfig( IOATADevConfig* configRequest)
{
return _provider->getConfig( configRequest, _unitNumber);
}
IOReturn
IOATADevice::executeCommand(IOATACommand* command)
{
return -1;
}
IOATACommand*
IOATADevice::allocCommand( void )
{
return 0L;
}
void
IOATADevice::freeCommand( IOATACommand* inCommand)
{
}
void
IOATADevice::notifyEvent( UInt32 event )
{
messageClients( event );
}
bool
IOATADevice::matchPropertyTable(OSDictionary * table)
{
bool result;
result = compareProperty ( table, "IOUnit" );
return result;
}
bool
IOATADevice::matchPropertyTable(OSDictionary * table, SInt32 * score )
{
bool result;
result = compareProperty ( table, kATADevPropertyKey );
if ( result == false )
{
*score = 0;
}
return result;
}
IOService *
IOATADevice::matchLocation(IOService * client)
{
return this;
}