|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. ! 3: * ! 4: * @APPLE_LICENSE_HEADER_START@ ! 5: * ! 6: * The contents of this file constitute Original Code as defined in and ! 7: * are subject to the Apple Public Source License Version 1.1 (the ! 8: * "License"). You may not use this file except in compliance with the ! 9: * License. Please obtain a copy of the License at ! 10: * http://www.apple.com/publicsource and read it before using this file. ! 11: * ! 12: * This Original Code and all software distributed under the License are ! 13: * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER ! 14: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, ! 15: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, ! 16: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the ! 17: * License for the specific language governing rights and limitations ! 18: * under the License. ! 19: * ! 20: * @APPLE_LICENSE_HEADER_END@ ! 21: */ ! 22: /* ! 23: * Copyright (c) 1998 Apple Computer, Inc. All rights reserved. ! 24: * ! 25: * HISTORY ! 26: * 08 Dec 98 ehewitt created. ! 27: * ! 28: */ ! 29: ! 30: #include <IOKit/system.h> ! 31: ! 32: ! 33: #include <IOKit/usb/IOUSBController.h> ! 34: ! 35: #define super IOUSBBus ! 36: #define self this ! 37: ! 38: /* ! 39: This table contains the list of errata that are necessary for known ! 40: problems with particular silicon. The format is vendorID, revisionID, ! 41: lowest revisionID needing errata, highest rev needing errata, errataBits. ! 42: The result of all matches is ORed together, so more than one entry may ! 43: match. Typically for a given errata a list of chips revisions that ! 44: this applies to is supplied. ! 45: */ ! 46: static ErrataListEntry errataList[] = { ! 47: // CMD 670 ! 48: {0x1095, 0x670, 0, 0xffff, kErrataCMDDisableTestMode | ! 49: kErrataOnlySinglePageTransfers | ! 50: kErrataRetryBufferUnderruns}, ! 51: // Opti 1045 ! 52: {0x1045, 0xc861, 0, 0xffff, kErrataLSHSOpti}, ! 53: }; ! 54: ! 55: #define errataListLength (sizeof(errataList)/sizeof(ErrataListEntry)) ! 56: ! 57: UInt32 IOUSBController::GetErrataBits(UInt16 vendorID, UInt16 deviceID, UInt16 revisionID) ! 58: { ! 59: ErrataListEntry *entryPtr; ! 60: UInt32 i, errata = 0; ! 61: ! 62: for(i = 0, entryPtr = errataList; i < errataListLength; i++, entryPtr++) ! 63: { ! 64: if (vendorID == entryPtr->vendID && ! 65: deviceID == entryPtr->deviceID && ! 66: revisionID >= entryPtr->revisionLo && ! 67: revisionID <= entryPtr->revisionHi) ! 68: { ! 69: // we match, add this errata to our list ! 70: errata |= entryPtr->errata; ! 71: } ! 72: } ! 73: return(errata); ! 74: } ! 75: ! 76:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.