IOUSBController_Errata.cpp [plain text]
#include <IOKit/system.h>
#include <IOKit/IOPlatformExpert.h>
#include <IOKit/usb/IOUSBController.h>
#include <IOKit/usb/IOUSBLog.h>
#define super IOUSBBus
#define self this
static ErrataListEntry errataList[] = {
{0x1095, 0x0670, 0, 0x0004, kErrataCMDDisableTestMode | kErrataOnlySinglePageTransfers | kErrataRetryBufferUnderruns}, {0x1045, 0xc861, 0, 0x001f, kErrataLSHSOpti}, {0x11C1, 0x5801, 0, 0xffff, kErrataDisableOvercurrent | kErrataLucentSuspendResume | kErrataNeedsWatchdogTimer}, {0x11C1, 0x5802, 0, 0xffff, kErrataDisableOvercurrent | kErrataLucentSuspendResume | kErrataNeedsWatchdogTimer}, {0x106b, 0x0019, 0, 0xffff, kErrataDisableOvercurrent | kErrataNeedsWatchdogTimer}, {0x106b, 0x0019, 0, 0, kErrataLucentSuspendResume }, {0x106b, 0x0026, 0, 0xffff, kErrataDisableOvercurrent | kErrataLucentSuspendResume | kErrataNeedsWatchdogTimer}, {0x106b, 0x003f, 0, 0xffff, kErrataDisableOvercurrent | kErrataNeedsWatchdogTimer}, {0x1033, 0x0035, 0, 0xffff, kErrataDisableOvercurrent | kErrataNECOHCIIsochWraparound | kErrataNECIncompleteWrite }, {0x1033, 0x00e0, 0, 0xffff, kErrataDisableOvercurrent | kErrataNECIncompleteWrite}, {0x1131, 0x1561, 0x30, 0x30, kErrataNeedsPortPowerOff }, {0x11C1, 0x5805, 0x11, 0x11, kErrataAgereEHCIAsyncSched },
{0x8086, 0x2658, 0x03, 0x04, kErrataICH6PowerSequencing | kErrataUHCISupportsOvercurrent | kErrataNeedsOvercurrentDebounce | kErrataSupportsPortResumeEnable | kErrataUHCISupportsResumeDetectOnConnect }, {0x8086, 0x2659, 0x03, 0x04, kErrataICH6PowerSequencing | kErrataUHCISupportsOvercurrent | kErrataNeedsOvercurrentDebounce | kErrataSupportsPortResumeEnable | kErrataUHCISupportsResumeDetectOnConnect }, {0x8086, 0x265A, 0x03, 0x04, kErrataICH6PowerSequencing | kErrataUHCISupportsOvercurrent | kErrataNeedsOvercurrentDebounce | kErrataSupportsPortResumeEnable | kErrataUHCISupportsResumeDetectOnConnect }, {0x8086, 0x265B, 0x03, 0x04, kErrataICH6PowerSequencing | kErrataUHCISupportsOvercurrent | kErrataNeedsOvercurrentDebounce | kErrataSupportsPortResumeEnable | kErrataUHCISupportsResumeDetectOnConnect }, {0x8086, 0x265C, 0x03, 0x04, kErrataICH6PowerSequencing | kErrataNeedsOvercurrentDebounce },
{0x8086, 0x2688, 0x00, 0xff, kErrataICH6PowerSequencing | kErrataUHCISupportsOvercurrent | kErrataNeedsOvercurrentDebounce | kErrataSupportsPortResumeEnable | kErrataUHCISupportsResumeDetectOnConnect }, {0x8086, 0x2689, 0x00, 0xff, kErrataICH6PowerSequencing | kErrataUHCISupportsOvercurrent | kErrataNeedsOvercurrentDebounce | kErrataSupportsPortResumeEnable | kErrataUHCISupportsResumeDetectOnConnect }, {0x8086, 0x268A, 0x00, 0xff, kErrataICH6PowerSequencing | kErrataUHCISupportsOvercurrent | kErrataNeedsOvercurrentDebounce | kErrataSupportsPortResumeEnable | kErrataUHCISupportsResumeDetectOnConnect }, {0x8086, 0x268B, 0x00, 0xff, kErrataICH6PowerSequencing | kErrataUHCISupportsOvercurrent | kErrataNeedsOvercurrentDebounce | kErrataSupportsPortResumeEnable | kErrataUHCISupportsResumeDetectOnConnect }, {0x8086, 0x268C, 0x00, 0xff, kErrataICH6PowerSequencing | kErrataNeedsOvercurrentDebounce },
{0x8086, 0x27C8, 0x00, 0xff, kErrataICH6PowerSequencing | kErrataUHCISupportsOvercurrent | kErrataNeedsOvercurrentDebounce | kErrataSupportsPortResumeEnable | kErrataUHCISupportsResumeDetectOnConnect }, {0x8086, 0x27C9, 0x00, 0xff, kErrataICH6PowerSequencing | kErrataUHCISupportsOvercurrent | kErrataNeedsOvercurrentDebounce | kErrataSupportsPortResumeEnable | kErrataUHCISupportsResumeDetectOnConnect }, {0x8086, 0x27CA, 0x00, 0xff, kErrataICH6PowerSequencing | kErrataUHCISupportsOvercurrent | kErrataNeedsOvercurrentDebounce | kErrataSupportsPortResumeEnable | kErrataUHCISupportsResumeDetectOnConnect }, {0x8086, 0x27CB, 0x00, 0xff, kErrataICH6PowerSequencing | kErrataUHCISupportsOvercurrent | kErrataNeedsOvercurrentDebounce | kErrataSupportsPortResumeEnable | kErrataUHCISupportsResumeDetectOnConnect }, {0x8086, 0x27CC, 0x00, 0xff, kErrataICH6PowerSequencing | kErrataICH7ISTBuffer | kErrataNeedsOvercurrentDebounce },
{0x8086, 0x2830, 0x00, 0xff, kErrataICH6PowerSequencing | kErrataUHCISupportsOvercurrent | kErrataNeedsOvercurrentDebounce | kErrataSupportsPortResumeEnable | kErrataUHCISupportsResumeDetectOnConnect }, {0x8086, 0x2831, 0x00, 0xff, kErrataICH6PowerSequencing | kErrataUHCISupportsOvercurrent | kErrataNeedsOvercurrentDebounce | kErrataSupportsPortResumeEnable | kErrataUHCISupportsResumeDetectOnConnect }, {0x8086, 0x2832, 0x00, 0xff, kErrataICH6PowerSequencing | kErrataUHCISupportsOvercurrent | kErrataNeedsOvercurrentDebounce | kErrataSupportsPortResumeEnable | kErrataUHCISupportsResumeDetectOnConnect }, {0x8086, 0x2834, 0x00, 0xff, kErrataICH6PowerSequencing | kErrataUHCISupportsOvercurrent | kErrataNeedsOvercurrentDebounce | kErrataSupportsPortResumeEnable | kErrataUHCISupportsResumeDetectOnConnect }, {0x8086, 0x2835, 0x00, 0xff, kErrataICH6PowerSequencing | kErrataUHCISupportsOvercurrent | kErrataNeedsOvercurrentDebounce | kErrataSupportsPortResumeEnable | kErrataUHCISupportsResumeDetectOnConnect }, {0x8086, 0x2836, 0x00, 0xff, kErrataICH6PowerSequencing | kErrataNeedsOvercurrentDebounce }, {0x8086, 0x283a, 0x00, 0xff, kErrataICH6PowerSequencing | kErrataNeedsOvercurrentDebounce },
{0x8086, 0x8114, 0x00, 0xff, kErrataICH6PowerSequencing | kErrataUHCISupportsOvercurrent | kErrataNeedsOvercurrentDebounce | kErrataSupportsPortResumeEnable }, {0x8086, 0x8115, 0x00, 0xff, kErrataICH6PowerSequencing | kErrataUHCISupportsOvercurrent | kErrataNeedsOvercurrentDebounce | kErrataSupportsPortResumeEnable }, {0x8086, 0x8116, 0x00, 0xff, kErrataICH6PowerSequencing | kErrataUHCISupportsOvercurrent | kErrataNeedsOvercurrentDebounce | kErrataSupportsPortResumeEnable }, {0x8086, 0x8117, 0x00, 0xff, kErrataICH6PowerSequencing | kErrataNeedsOvercurrentDebounce } ,
{0x10de, 0x0aa6, 0x00, 0xff, kErrataNoCSonSplitIsoch | kErrataMissingPortChangeInt | kErrataUse32bitEHCI}, {0x10de, 0x0aa9, 0x00, 0xff, kErrataNoCSonSplitIsoch | kErrataMissingPortChangeInt | kErrataUse32bitEHCI}, {0x10de, 0x0aa5, 0x00, 0xff, kErrataOHCINoGlobalSuspendOnSleep }, {0x10de, 0x0aa7, 0x00, 0xff, kErrataOHCINoGlobalSuspendOnSleep },
{0x8086, 0x3a34, 0x00, 0xff, kErrataICH6PowerSequencing | kErrataUHCISupportsOvercurrent | kErrataNeedsOvercurrentDebounce | kErrataSupportsPortResumeEnable | kErrataUHCISupportsResumeDetectOnConnect }, {0x8086, 0x3a35, 0x00, 0xff, kErrataICH6PowerSequencing | kErrataUHCISupportsOvercurrent | kErrataNeedsOvercurrentDebounce | kErrataSupportsPortResumeEnable | kErrataUHCISupportsResumeDetectOnConnect }, {0x8086, 0x3a36, 0x00, 0xff, kErrataICH6PowerSequencing | kErrataUHCISupportsOvercurrent | kErrataNeedsOvercurrentDebounce | kErrataSupportsPortResumeEnable | kErrataUHCISupportsResumeDetectOnConnect }, {0x8086, 0x3a37, 0x00, 0xff, kErrataICH6PowerSequencing | kErrataUHCISupportsOvercurrent | kErrataNeedsOvercurrentDebounce | kErrataSupportsPortResumeEnable | kErrataUHCISupportsResumeDetectOnConnect }, {0x8086, 0x3a38, 0x00, 0xff, kErrataICH6PowerSequencing | kErrataUHCISupportsOvercurrent | kErrataNeedsOvercurrentDebounce | kErrataSupportsPortResumeEnable | kErrataUHCISupportsResumeDetectOnConnect }, {0x8086, 0x3a39, 0x00, 0xff, kErrataICH6PowerSequencing | kErrataUHCISupportsOvercurrent | kErrataNeedsOvercurrentDebounce | kErrataSupportsPortResumeEnable | kErrataUHCISupportsResumeDetectOnConnect }, {0x8086, 0x3a3a, 0x00, 0xff, kErrataICH6PowerSequencing | kErrataNeedsOvercurrentDebounce }, {0x8086, 0x3a3c, 0x00, 0xff, kErrataICH6PowerSequencing | kErrataNeedsOvercurrentDebounce },
{0x8086, 0x3b36, 0x00, 0xff, kErrataDontUseCompanionController }, {0x8086, 0x3b37, 0x00, 0xff, kErrataDontUseCompanionController }, {0x8086, 0x3b38, 0x00, 0xff, kErrataDontUseCompanionController }, {0x8086, 0x3b39, 0x00, 0xff, kErrataDontUseCompanionController }, {0x8086, 0x3b3b, 0x00, 0xff, kErrataDontUseCompanionController }, {0x8086, 0x3b3e, 0x00, 0xff, kErrataDontUseCompanionController }, {0x8086, 0x3b3f, 0x00, 0xff, kErrataDontUseCompanionController }, {0x8086, 0x3b34, 0x00, 0xff, kErrataDontUseCompanionController }, {0x8086, 0x3b3c, 0x00, 0xff, kErrataDontUseCompanionController },
{0x8086, 0x1c27, 0x00, 0xff, kErrataDontUseCompanionController }, {0x8086, 0x1c28, 0x00, 0xff, kErrataDontUseCompanionController }, {0x8086, 0x1c29, 0x00, 0xff, kErrataDontUseCompanionController }, {0x8086, 0x1c2a, 0x00, 0xff, kErrataDontUseCompanionController }, {0x8086, 0x1c2c, 0x00, 0xff, kErrataDontUseCompanionController }, {0x8086, 0x1c2e, 0x00, 0xff, kErrataDontUseCompanionController }, {0x8086, 0x1c2f, 0x00, 0xff, kErrataDontUseCompanionController }, {0x8086, 0x1c26, 0x00, 0xff, kErrataDontUseCompanionController }, {0x8086, 0x1c2d, 0x00, 0xff, kErrataDontUseCompanionController },
{0x10de, 0x0d9d, 0x00, 0xff, kErrataIgnoreRootHubPowerClearFeature }, {0x10de, 0x0d9c, 0x00, 0xff, kErrataIgnoreRootHubPowerClearFeature },
{0x12d8, 0x400f, 0x00, 0x01, kErrataDisablePCIeLinkOnSleep}
};
#define errataListLength (sizeof(errataList)/sizeof(ErrataListEntry))
UInt32 IOUSBController::GetErrataBits(UInt16 vendorID, UInt16 deviceID, UInt16 revisionID)
{
ErrataListEntry *entryPtr;
UInt32 i, errata = 0;
for(i = 0, entryPtr = errataList; i < errataListLength; i++, entryPtr++)
{
if (vendorID == entryPtr->vendID &&
deviceID == entryPtr->deviceID &&
revisionID >= entryPtr->revisionLo &&
revisionID <= entryPtr->revisionHi)
{
errata |= entryPtr->errata;
}
}
return errata;
}