0
|
1 |
// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
// All rights reserved.
|
|
3 |
// This component and the accompanying materials are made available
|
|
4 |
// under the terms of the License "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
//
|
|
15 |
|
|
16 |
/**
|
|
17 |
@file
|
|
18 |
@publishedPartner
|
|
19 |
@prototype
|
|
20 |
*/
|
|
21 |
|
|
22 |
#ifndef D32USBDI_ERRORS_H
|
|
23 |
#define D32USBDI_ERRORS_H
|
|
24 |
|
|
25 |
#ifndef __KERNEL_MODE__
|
|
26 |
#include <e32std.h>
|
|
27 |
#else
|
|
28 |
#include <kernel/kernel.h>
|
|
29 |
#endif
|
|
30 |
|
|
31 |
|
|
32 |
const TInt KErrUsbRequestsPending = -6640;
|
|
33 |
const TInt KErrUsbBadAddress = -6641;
|
|
34 |
const TInt KErrUsbNoAddress = -6642;
|
|
35 |
const TInt KErrUsbSetAddrFailed = -6643;
|
|
36 |
const TInt KErrUsbNoPower = -6644;
|
|
37 |
const TInt KErrUsbTooDeep = -6645;
|
|
38 |
const TInt KErrUsbIOError = -6646;
|
|
39 |
const TInt KErrUsbNotConfigured = -6647;
|
|
40 |
const TInt KErrUsbTimeout = -6648;
|
|
41 |
const TInt KErrUsbStalled = -6649;
|
|
42 |
const TInt KErrUsbTestFailure = -6650;
|
|
43 |
const TInt KErrUsbBadState = -6651;
|
|
44 |
const TInt KErrUsbDeviceSuspended = -6652;
|
|
45 |
|
|
46 |
/**
|
|
47 |
This error is returned when it is discovered that a bundle of USB descriptors
|
|
48 |
has a malformed topological layout.
|
|
49 |
*/
|
|
50 |
const TInt KErrUsbBadDescriptorTopology = -6653;
|
|
51 |
|
|
52 |
// Errors from DevMon events
|
|
53 |
const TInt KErrUsbDeviceRejected = -6654; // Should never happen -- the device has been rejected by the stack
|
|
54 |
const TInt KErrUsbDeviceFailed = -6655; // The device failed to be configured
|
|
55 |
const TInt KErrUsbBadDevice = -6656; // Hardware fault on device, eg. no Ep0
|
|
56 |
const TInt KErrUsbBadHubPosition = -6657; // Hub too deep, or bus powered attached to bus powered.
|
|
57 |
const TInt KErrUsbBadHub = -6658; // Hardware fault on hub, eg. no Ep0
|
|
58 |
const TInt KErrUsbEventOverflow = -6659; // Too many bus events undrained -- one or more events lost
|
|
59 |
|
|
60 |
// Inform caller of API Misuse
|
|
61 |
const TInt KErrUsbRemoteWakeupAlreadyEnabled = -6660;
|
|
62 |
const TInt KErrUsbRemoteWakeupAlreadyDisabled = -6661;
|
|
63 |
const TInt KErrUsbAlreadyResumed = -6662;
|
|
64 |
|
|
65 |
namespace UsbdiPanics
|
|
66 |
{
|
|
67 |
_LIT(KUsbHubDriverPanicCat, "USBHubDriver");
|
|
68 |
enum TUsbHubDriverPanics
|
|
69 |
{
|
|
70 |
EUsbHubDriverNoRollBackAfterFailedDeviceOpen = 0,
|
|
71 |
EUsbHubDriverRequestMadeWhileClosed = 1,
|
|
72 |
EUsbHubDriverInsufficientSizeToHoldStringDescriptor = 2,
|
|
73 |
EUsbHubDriverMultipleNotificationRequests = 3,
|
|
74 |
EUsbHubDriverTooManyDeviceHandles = 4,
|
|
75 |
EUsbHubDriverAlreadyOpened = 5,
|
|
76 |
};
|
|
77 |
|
|
78 |
_LIT(KUsbdiPanicCat, "USBDI");
|
|
79 |
enum TUsbdiPanics
|
|
80 |
{
|
|
81 |
ERequestAlreadyPending = 0,
|
|
82 |
ETooManyPipeHandles = 1,
|
|
83 |
EOutOfBoundsOfLengthArray = 2,
|
|
84 |
EBadIsocTransferDescriptorHandle = 3,
|
|
85 |
EBadIsocTransferDescriptorWriteHandle = 4,
|
|
86 |
EBadIntrTransferDescriptorHandle = 5,
|
|
87 |
EBadBulkTransferDescriptorHandle = 6,
|
|
88 |
ETransferDescriptorAlignmentOverPageBoundary = 7,
|
|
89 |
ETransferDescriptorAlignmentNotPowerOfTwo = 8,
|
|
90 |
ETransferDescriptorNoPacketsRequested = 9,
|
|
91 |
ETransferDescriptorSavedToMuchData = 10,
|
|
92 |
ETransferDescriptorNoPacketsToSave = 11,
|
|
93 |
ETransferDescriptorInvalidSaveCall = 12,
|
|
94 |
ETransferDescriptorSavedTooManyPackets = 13,
|
|
95 |
ETransferDescriptorSavingTooLargeAPacket = 14,
|
|
96 |
ETransferDescriptorReceivedTooLargeAPacket = 15,
|
|
97 |
ETransferDescriptorPacketNotInBounds = 16,
|
|
98 |
ETransferDescriptorTooFewPacketsRequested = 17,
|
|
99 |
ETransferDescriptorTooManyPacketsRequested = 18,
|
|
100 |
ETransferDescriptorFlagsBadZlp = 19,
|
|
101 |
ENoChunkAllocatedForInterface = 20,
|
|
102 |
EChunkAlreadyAllocatedForInterface = 21,
|
|
103 |
ETransferWrongDescriptorType = 22,
|
|
104 |
EIntrBulkTransferBadLength = 23,
|
|
105 |
EIsocTransferWrongDescriptorType = 24,
|
|
106 |
EIsocTransferNoPacketsRequested = 25,
|
|
107 |
EIsocTransferTooManyPackets = 26,
|
|
108 |
EIsocTransferPacketTooBig = 27,
|
|
109 |
EInterfaceSettingChangeWithPipeOpen = 28,
|
|
110 |
EUsbDeviceDeviceStateCancelledWithNoThread = 29,
|
|
111 |
ECpuPageSizeIsNotMulipleOfHcdPageSize = 30,
|
|
112 |
EPageListRegionSelectionUnderflow = 31,
|
|
113 |
EPageListRegionSelectionOverflow = 32,
|
|
114 |
EIsocTransferRequestCrossesPageBoundary = 33,
|
|
115 |
EIsocTransferResultCrossesPageBoundary = 34,
|
|
116 |
EPipeInvalidType = 35,
|
|
117 |
ETransferDescriptorRequestedLengthDiffers = 36,
|
|
118 |
ETransferDescriptorsAlreadyRegistered = 37,
|
|
119 |
EOutOfBoundsOfResultArray = 38,
|
|
120 |
EPipeRequestMadeWhileClosed = 39,
|
|
121 |
EBadInterfaceHandle = 40,
|
|
122 |
EUsbDeviceMultipleNotificationRequests = 41,
|
|
123 |
};
|
|
124 |
|
|
125 |
_LIT(KUsbDescPanicCat, "USBDesc");
|
|
126 |
enum TUsbDescPanics
|
|
127 |
{
|
|
128 |
/**
|
|
129 |
This panic is raised when the newly created TUsbGenericDescriptor object
|
|
130 |
created during parsing has not set the pointer fields iParent, iFirstChild
|
|
131 |
and iNextPeer to NULL.
|
|
132 |
*/
|
|
133 |
EUsbDescNonNullPointersAfterParsing = 0,
|
|
134 |
/**
|
|
135 |
This panic is raised when attempting to retrieve a wLangId from String
|
|
136 |
Descriptor Zero using a negative index.
|
|
137 |
*/
|
|
138 |
EUsbDescNegativeIndexToLangId = 1,
|
|
139 |
};
|
|
140 |
}
|
|
141 |
|
|
142 |
|
|
143 |
namespace UsbdiFaults
|
|
144 |
{
|
|
145 |
#ifndef __KERNEL_MODE__
|
|
146 |
_LIT(KUsbdiFaultCat, "USBDI-Fault");
|
|
147 |
#else // __KERNEL_MODE__
|
|
148 |
static const char* const KUsbdiFaultCat = "USBDI-Fault";
|
|
149 |
#endif // __KERNEL_MODE__
|
|
150 |
enum TUsbdiFaults
|
|
151 |
{
|
|
152 |
EUsbPipeCloseFailed = 0,
|
|
153 |
EUsbDeviceLingeringInterfacesOnDestroy = 1,
|
|
154 |
EUsbDeviceLingeringStateNotifyOnDestroy = 2,
|
|
155 |
EUsbDeviceCannotDestroySuspendTask = 3,
|
|
156 |
EUsbDeviceUnexpectedStateOnStateChange = 4,
|
|
157 |
EUsbDeviceUnexpectedSuspensionIssued = 5,
|
|
158 |
EUsbDeviceUnexpectedResumeIssued = 6,
|
|
159 |
EUsbTransferDescriptorBadHandle = 7,
|
|
160 |
EUsbTransferDescriptorBadWriteHandle = 8,
|
|
161 |
EUsbTransferDescriptorBadAlignment = 9,
|
|
162 |
EUsbTransferDescriptorNoPacketsLeftToStore = 10,
|
|
163 |
EUsbTransferDescriptorLengthsArrayBadAlignment = 11,
|
|
164 |
EUsbTransferDescriptorIncompleteInitialisation = 12,
|
|
165 |
EUsbTransferDescriptorInvalidHeaderOffset = 13,
|
|
166 |
EUsbPipeNoHandleOnCancel = 14,
|
|
167 |
EUsbPipeTransferCompleteWithoutTransfer = 15,
|
|
168 |
EUsbPipeTransferWithoutPageList = 16,
|
|
169 |
EUsbPipeFreeTransferHandleFailedAddToPool = 17,
|
|
170 |
EUsbPipeTransferCompleteNoThreadForRequest = 18,
|
|
171 |
EUsbPipeChannelRequestMadeWithoutChannel = 19,
|
|
172 |
EUsbHubDriverSuccessfulAttachButNoDevice = 20,
|
|
173 |
EUsbHubDriverPendingEventsAndPendingEventRequest= 21,
|
|
174 |
EUsbDeviceNoThreadProvided = 22,
|
|
175 |
EUsbPageListGoneBeyondHcdPageListBounds = 23,
|
|
176 |
EUsbTransferRequestNoThreadProvided = 24,
|
|
177 |
EUsbTransferRequestNoRequestProvided = 25,
|
|
178 |
EUsbTransferRequestDeletedWhileOutstanding = 26,
|
|
179 |
EUsbTransferRequestDeletedWithoutCompleting = 27,
|
|
180 |
EUsbTransferRequestFinalisedTwice = 28,
|
|
181 |
EUsbTransferRequestCompletedWithoutFinalising = 29,
|
|
182 |
EUsbPipeNoTransferRequestForTransfer = 30,
|
|
183 |
EUsbDeviceStateChangeRequestButNoThread = 31,
|
|
184 |
EUsbPageListInvalidRegion = 32,
|
|
185 |
EUsbTransferDescriptorUnexpectedEndOfIsocList = 33,
|
|
186 |
EUsbTransferDescriptorUnfillableElement = 34,
|
|
187 |
EUsbHubDriverPendingNoneEvent = 35,
|
|
188 |
EUsbTransferDescriptorResultsArrayBadAlignment = 36,
|
|
189 |
EUsbDeviceTooManyDevicesSignallingInactivity = 37,
|
|
190 |
EUsbHubDriverQueuedBusEventNotDeviceAttach = 38,
|
|
191 |
EUsbPipeHasHandleButNoInterface = 39,
|
|
192 |
EUsbDeviceHasHandleButNoHubDriver = 40,
|
|
193 |
EUsbDevMonDeviceAttachDenied = 41,
|
|
194 |
EUsbHubDriverZeroInterfaceTokenProduced = 42,
|
|
195 |
EUsbInterfaceSuccessfulPipeOpenWithNoPipe = 43,
|
|
196 |
};
|
|
197 |
|
|
198 |
_LIT(KUsbDescFaultCat, "USBDesc-Fault");
|
|
199 |
enum TUsbDescFaults
|
|
200 |
{
|
|
201 |
EUsbDescSuccessButDataLeftUnparsed = 0,
|
|
202 |
EUsbDescTreePointersAlreadySet = 1,
|
|
203 |
EUsbDescNoTopLevelDescriptorFound = 2,
|
|
204 |
EUsbDescRunOffTree = 3,
|
|
205 |
EUsbDescTreeMemberHasNoParent = 4,
|
|
206 |
};
|
|
207 |
}
|
|
208 |
|
|
209 |
#endif // D32USBDI_ERRORS_H
|