--- a/kernel/eka/drivers/usbcc/ps_usbc.cpp Tue Aug 31 16:34:26 2010 +0300
+++ b/kernel/eka/drivers/usbcc/ps_usbc.cpp Wed Sep 01 12:34:56 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2000-2010 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of the License "Eclipse Public License v1.0"
@@ -23,11 +23,6 @@
*/
#include <drivers/usbc.h>
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "ps_usbcTraces.h"
-#endif
-
/**
@@ -123,8 +118,7 @@
*/
DUsbClientController::~DUsbClientController()
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_DUSBCLIENTCONTROLLER_DES, "DUsbClientController::~DUsbClientController()" );
-
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::~DUsbClientController()"));
if (iPowerHandler)
{
iPowerHandler->Remove();
@@ -133,7 +127,7 @@
// ResetAndDestroy() will call for every array element the destructor of the pointed-to object,
// before deleting the element itself, and closing the array.
iConfigs.ResetAndDestroy();
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_DUSBCLIENTCONTROLLER_DES_DUP1, "DUsbClientController::~DUsbClientController(): Done." );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::~DUsbClientController(): Done."));
}
@@ -153,17 +147,17 @@
*/
EXPORT_C void DUsbClientController::DisableClientStack()
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_DISABLECLIENTSTACK, "DUsbClientController::DisableClientStack()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::DisableClientStack()"));
if (!iStackIsActive)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_DISABLECLIENTSTACK_DUP1, " Already disabled - returning" );
+ __KTRACE_OPT(KUSB, Kern::Printf(" Already disabled - returning"));
return;
}
iOtgClientConnect = EFalse;
TInt r = EvaluateOtgConnectFlags(); // will disconnect UDC
if (r != KErrNone)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_DISABLECLIENTSTACK_DUP2, " Error: EvaluateOtgConnectFlags() failed: %d", r );
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: EvaluateOtgConnectFlags() failed: %d", r));
}
// Reset OTG features, leave attributes as is (just as in USB Reset case)
@@ -211,10 +205,10 @@
*/
EXPORT_C void DUsbClientController::EnableClientStack()
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_ENABLECLIENTSTACK, "DUsbClientController::EnableClientStack()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::EnableClientStack()"));
if (iStackIsActive)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_ENABLECLIENTSTACK_DUP1, " Already enabled - returning" );
+ __KTRACE_OPT(KUSB, Kern::Printf(" Already enabled - returning"));
return;
}
iStackIsActive = ETrue;
@@ -222,13 +216,13 @@
TInt r = ActivateHardwareController();
if (r != KErrNone)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_ENABLECLIENTSTACK_DUP2, " Error: ActivateHardwareController() failed: %d", r);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: ActivateHardwareController() failed: %d", r));
}
iOtgClientConnect = ETrue;
r = EvaluateOtgConnectFlags(); // may connect UDC
if (r != KErrNone)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_ENABLECLIENTSTACK_DUP3, " Error: EvaluateOtgConnectFlags() failed: %d", r);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: EvaluateOtgConnectFlags() failed: %d", r));
}
}
@@ -239,7 +233,7 @@
*/
EXPORT_C TBool DUsbClientController::IsActive()
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_ISACTIVE, "DUsbClientController::IsActive()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::IsActive()"));
return iStackIsActive;
}
@@ -250,12 +244,11 @@
*/
EXPORT_C TInt DUsbClientController::RegisterClientCallback(TUsbcClientCallback& aCallback)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_REGISTERCLIENTCALLBACK, "DUsbClientController::RegisterClientCallback()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::RegisterClientCallback()"));
if (iClientCallbacks.Elements() == KUsbcMaxListLength)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_REGISTERCLIENTCALLBACK_DUP1, " Error: Maximum list length reached: %d",
- KUsbcMaxListLength);
-
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Maximum list length reached: %d",
+ KUsbcMaxListLength));
return KErrGeneral;
}
TSglQueIter<TUsbcClientCallback> iter(iClientCallbacks);
@@ -263,7 +256,7 @@
while ((p = iter++) != NULL)
if (p == &aCallback)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_REGISTERCLIENTCALLBACK_DUP2, " Error: ClientCallback @ 0x%x already registered", &aCallback);
+ __KTRACE_OPT(KUSB, Kern::Printf(" Error: ClientCallback @ 0x%x already registered", &aCallback));
return KErrAlreadyExists;
}
iClientCallbacks.AddLast(aCallback);
@@ -281,10 +274,10 @@
*/
EXPORT_C DUsbClientController* DUsbClientController::UsbcControllerPointer(TInt aUdc)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_USBCCONTROLLERPOINTER, "DUsbClientController::UsbcControllerPointer()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::UsbcControllerPointer()"));
if (aUdc < 0 || aUdc > 1)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_USBCCONTROLLERPOINTER_DUP1, " Error: aUdc out of range (%d)", aUdc);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: aUdc out of range (%d)", aUdc));
return NULL;
}
return UsbClientController[aUdc];
@@ -304,7 +297,7 @@
*/
EXPORT_C void DUsbClientController::EndpointCaps(const DBase* aClientId, TDes8& aCapsBuf) const
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_ENDPOINTCAPS, "DUsbClientController::EndpointCaps()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::EndpointCaps()"));
// Here we do not simply call DUsbClientController::DeviceEndpointCaps(),
// because that function fills an array which comprises of _all_ endpoints,
// whereas this function omits ep0 and all unusable endpoints.
@@ -313,10 +306,10 @@
const TInt ifcset_num = ClientId2InterfaceNumber(aClientId);
for (TInt i = 2, j = 0; i < iDeviceTotalEndpoints; ++i)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_ENDPOINTCAPS_DUP1, "DUsbClientController::Caps: RealEndpoint #%d", i);
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::Caps: RealEndpoint #%d", i));
if (iRealEndpoints[i].iCaps.iTypesAndDir != KUsbEpNotAvailable)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_ENDPOINTCAPS_DUP2, "DUsbClientController::Caps: --> UsableEndpoint #%d", j);
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::Caps: --> UsableEndpoint #%d", j));
data[j].iCaps = iRealEndpoints[i].iCaps;
if (ifcset_num < 0)
{
@@ -361,7 +354,7 @@
*/
EXPORT_C void DUsbClientController::DeviceCaps(const DBase* aClientId, TDes8& aCapsBuf) const
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_DEVICECAPS, "DUsbClientController::DeviceCaps()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::DeviceCaps()"));
TUsbDeviceCaps caps;
caps().iTotalEndpoints = iDeviceUsableEndpoints; // not DeviceTotalEndpoints()!
caps().iConnect = SoftConnectCaps();
@@ -442,18 +435,17 @@
const TUsbcEndpointInfoArray aEndpointData,
TInt aRealEpNumbers[], TUint32 aFeatureWord)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_SETINTERFACE, "DUsbClientController::SetInterface()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::SetInterface()"));
if (aInterfaceNum != 0)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_SETINTERFACE_DUP1, " alternate interface setting request: #%d", aInterfaceNum);
-
+ __KTRACE_OPT(KUSB, Kern::Printf(" alternate interface setting request: #%d", aInterfaceNum));
}
#ifndef USB_SUPPORTS_CONTROLENDPOINTS
for (TInt i = 0; i < aTotalEndpointsUsed; ++i)
{
if (aEndpointData[i].iType == KUsbEpTypeControl)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETINTERFACE_DUP2, " Error: control endpoints not supported");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: control endpoints not supported"));
return KErrNotSupported;
}
}
@@ -463,21 +455,21 @@
// The passed-in ifcset_num may be -1 now, but that's intended.
if (!CheckEpAvailability(aTotalEndpointsUsed, aEndpointData, ifcset_num))
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETINTERFACE_DUP3, " Error: endpoints not (all) available");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: endpoints not (all) available"));
return KErrInUse;
}
// Create & setup new interface
TUsbcInterface* ifc = CreateInterface(aClientId, aInterfaceNum, aFeatureWord);
if (ifc == NULL)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETINTERFACE_DUP4, " Error: ifc == NULL");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: ifc == NULL"));
return KErrGeneral;
}
// Create logical endpoints
TInt r = CreateEndpoints(ifc, aTotalEndpointsUsed, aEndpointData, aRealEpNumbers);
if (r != KErrNone)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETINTERFACE_DUP5, " Error: CreateEndpoints() != KErrNone");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: CreateEndpoints() != KErrNone"));
DeleteInterface(ifc->iInterfaceSet->iInterfaceNumber, aInterfaceNum);
return r;
}
@@ -504,31 +496,31 @@
*/
EXPORT_C TInt DUsbClientController::ReleaseInterface(const DBase* aClientId, TInt aInterfaceNum)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_RELEASEINTERFACE, "DUsbClientController::ReleaseInterface(..., %d)", aInterfaceNum);
-
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::ReleaseInterface(..., %d)", aInterfaceNum));
const TInt ifcset = ClientId2InterfaceNumber(aClientId);
if (ifcset < 0)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_RELEASEINTERFACE_DUP1, " interface not found");
+ __KTRACE_OPT(KUSB, Kern::Printf(" interface not found")); // no error
return KErrNone;
}
TUsbcInterfaceSet* const ifcset_ptr = InterfaceNumber2InterfacePointer(ifcset);
if (!ifcset_ptr)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_RELEASEINTERFACE_DUP2, "Error: interface number %d doesn't exist", ifcset);
+ __KTRACE_OPT(KUSB, Kern::Printf(" Error: interface number %d doesn't exist", ifcset));
return KErrNotFound;
}
const TInt setting_count = ifcset_ptr->iInterfaces.Count();
if ((setting_count - 1) != aInterfaceNum)
{
- OstTraceDefExt3(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_RELEASEINTERFACE_DUP3, "> Error: interface settings must be released in descending order:\n\r"
- " %d setting(s) exist, #%d was requested to be released.\n\r"
- " (#%d has to be released first)",
- setting_count, aInterfaceNum, setting_count - 1);
+ __KTRACE_OPT(KUSB,
+ Kern::Printf(" > Error: interface settings must be released in descending order:\n\r"
+ " %d setting(s) exist, #%d was requested to be released.\n\r"
+ " (#%d has to be released first)",
+ setting_count, aInterfaceNum, setting_count - 1));
return KErrArgument;
}
// Tear down current setting (invalidate configured state)
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_RELEASEINTERFACE_DUP4, " > tearing down InterfaceSet %d", ifcset);
+ __KTRACE_OPT(KUSB, Kern::Printf(" > tearing down InterfaceSet %d", ifcset));
// Cancel all transfers on the current setting of this interface and deconfigure all its endpoints.
InterfaceSetTeardown(ifcset_ptr);
// 'Setting 0' means: delete all existing settings.
@@ -579,7 +571,7 @@
// If it was the last interface(set)...
if (iConfigs[0]->iInterfaceSets.Count() == 0)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_RELEASEINTERFACE_DUP5, " No ifc left -> turning off UDC");
+ __KTRACE_OPT(KUSB, Kern::Printf(" No ifc left -> turning off UDC"));
// First disconnect the device from the bus
UsbDisconnect();
DeActivateHardwareController();
@@ -596,13 +588,13 @@
*/
EXPORT_C TInt DUsbClientController::ReEnumerate()
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_REENUMERATE, "DUsbClientController::ReEnumerate()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::ReEnumerate()"));
// If, in an OTG setup, the client stack is disabled, there's no point in
// trying to reenumerate the device. In fact, we then don't even want to
// turn on the UDC via ActivateHardwareController().
if (!iStackIsActive)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_REENUMERATE_DUP1, " Client stack disabled -> returning here" );
+ __KTRACE_OPT(KUSB, Kern::Printf(" Client stack disabled -> returning here"));
return KErrNotReady;
}
// We probably don't check here whether SoftConnectCaps() is ETrue, and
@@ -611,7 +603,7 @@
// no-ops if not supported by the PSL.
if (iConfigs[0]->iInterfaceSets.Count() == 0)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_REENUMERATE_DUP2, " > No interface registered -> no need to re-enumerate" );
+ __KTRACE_OPT(KUSB, Kern::Printf(" > No interface registered -> no need to re-enumerate"));
return KErrNone;;
}
if (!iHardwareActivated)
@@ -620,7 +612,7 @@
const TInt r = ActivateHardwareController();
if (r != KErrNone)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_REENUMERATE_DUP3, " Error: ActivateHardwareController() failed: %d", r);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: ActivateHardwareController() failed: %d", r));
return r;
}
// Finally connect the device to the bus
@@ -646,25 +638,25 @@
*/
EXPORT_C TInt DUsbClientController::PowerUpUdc()
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_POWERUPUDC, "DUsbClientController::PowerUpUdc()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::PowerUpUdc()"));
// If, in an OTG setup, the client stack is disabled, we mustn't turn on
// the UDC via ActivateHardwareController() as that would already configure
// Ep0.
if (!iStackIsActive)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_POWERUPUDC_DUP1, " Client stack disabled -> returning here" );
+ __KTRACE_OPT(KUSB, Kern::Printf(" Client stack disabled -> returning here"));
return KErrNotReady;
}
if (iConfigs[0]->iInterfaceSets.Count() == 0)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_POWERUPUDC_DUP2, " > No interface registered -> won't power up UDC" );
+ __KTRACE_OPT(KUSB, Kern::Printf(" > No interface registered -> won't power up UDC"));
return KErrNotReady;
}
// If the UDC is still off, we switch it on here.
const TInt r = ActivateHardwareController();
if (r != KErrNone)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_POWERUPUDC_DUP3, " Error: ActivateHardwareController() failed: %d", r);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: ActivateHardwareController() failed: %d", r));
}
return r;
}
@@ -678,14 +670,14 @@
*/
EXPORT_C TInt DUsbClientController::UsbConnect()
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_USBCONNECT, "DUsbClientController::UsbConnect()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::UsbConnect()"));
#ifdef USB_OTG_CLIENT
iClientSupportReady = ETrue;
const TInt r = EvaluateOtgConnectFlags();
const TInt irq = __SPIN_LOCK_IRQSAVE(iUsbLock);
if (iUsbResetDeferred) // implies (iOtgHnpHandledByHw == ETrue)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_USBCONNECT_DUP1, " Resetting USB Reset 'defer' flag" );
+ __KTRACE_OPT(KUSB, Kern::Printf(" Resetting USB Reset 'defer' flag"));
iUsbResetDeferred = EFalse;
(void) ProcessResetEvent(EFalse);
}
@@ -705,7 +697,7 @@
*/
EXPORT_C TInt DUsbClientController::UsbDisconnect()
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_USBDISCONNECT, "DUsbClientController::UsbDisconnect()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::UsbDisconnect()"));
#ifdef USB_OTG_CLIENT
iClientSupportReady = EFalse;
const TInt r = EvaluateOtgConnectFlags();
@@ -741,16 +733,16 @@
*/
EXPORT_C TInt DUsbClientController::RegisterForStatusChange(TUsbcStatusCallback& aCallback)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_REGISTERFORSTATUSCHANGE, "DUsbClientController::RegisterForStatusChange()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::RegisterForStatusChange()"));
if (iStatusCallbacks.Elements() == KUsbcMaxListLength)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_REGISTERFORSTATUSCHANGE_DUP1, " Error: Maximum list length reached: %d",
- KUsbcMaxListLength);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Maximum list length reached: %d",
+ KUsbcMaxListLength));
return KErrGeneral;
}
if (IsInTheStatusList(aCallback))
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_REGISTERFORSTATUSCHANGE_DUP2, " Error: StatusCallback @ 0x%x already registered", &aCallback);
+ __KTRACE_OPT(KUSB, Kern::Printf(" Error: StatusCallback @ 0x%x already registered", &aCallback));
return KErrGeneral;
}
const TInt irq = __SPIN_LOCK_IRQSAVE(iUsbLock);
@@ -769,7 +761,7 @@
*/
EXPORT_C TInt DUsbClientController::DeRegisterForStatusChange(const DBase* aClientId)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_DEREGISTERFORSTATUSCHANGE, "DUsbClientController::DeRegisterForStatusChange()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::DeRegisterForStatusChange()"));
__ASSERT_DEBUG((aClientId != NULL), Kern::Fault(KUsbPILPanicCat, __LINE__));
const TInt irq = __SPIN_LOCK_IRQSAVE(iUsbLock);
TSglQueIter<TUsbcStatusCallback> iter(iStatusCallbacks);
@@ -778,13 +770,13 @@
{
if (p->Owner() == aClientId)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_DEREGISTERFORSTATUSCHANGE_DUP1, " removing StatusCallback @ 0x%x", p);
+ __KTRACE_OPT(KUSB, Kern::Printf(" removing StatusCallback @ 0x%x", p));
iStatusCallbacks.Remove(*p);
__SPIN_UNLOCK_IRQRESTORE(iUsbLock, irq);
return KErrNone;
}
}
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_DEREGISTERFORSTATUSCHANGE_DUP2, " client not found");
+ __KTRACE_OPT(KUSB, Kern::Printf(" client not found"));
__SPIN_UNLOCK_IRQRESTORE(iUsbLock, irq);
return KErrNotFound;
}
@@ -807,17 +799,16 @@
*/
EXPORT_C TInt DUsbClientController::RegisterForEndpointStatusChange(TUsbcEndpointStatusCallback& aCallback)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_REGISTERFORENDPOINTSTATUSCHANGE, "DUsbClientController::RegisterForEndpointStatusChange()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::RegisterForEndpointStatusChange()"));
if (iEpStatusCallbacks.Elements() == KUsbcMaxListLength)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_REGISTERFORENDPOINTSTATUSCHANGE_DUP1, " Error: Maximum list length reached: %d",
- KUsbcMaxListLength);
-
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Maximum list length reached: %d",
+ KUsbcMaxListLength));
return KErrGeneral;
}
if (IsInTheEpStatusList(aCallback))
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_REGISTERFORENDPOINTSTATUSCHANGE_DUP2, " Error: EpStatusCallback @ 0x%x already registered", &aCallback);
+ __KTRACE_OPT(KUSB, Kern::Printf(" Error: EpStatusCallback @ 0x%x already registered", &aCallback));
return KErrGeneral;
}
const TInt irq = __SPIN_LOCK_IRQSAVE(iUsbLock);
@@ -836,7 +827,7 @@
*/
EXPORT_C TInt DUsbClientController::DeRegisterForEndpointStatusChange(const DBase* aClientId)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_DEREGISTERFORENDPOINTSTATUSCHANGE, "DUsbClientController::DeRegisterForEndpointStatusChange()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::DeRegisterForEndpointStatusChange()"));
__ASSERT_DEBUG((aClientId != NULL), Kern::Fault(KUsbPILPanicCat, __LINE__));
const TInt irq = __SPIN_LOCK_IRQSAVE(iUsbLock);
TSglQueIter<TUsbcEndpointStatusCallback> iter(iEpStatusCallbacks);
@@ -845,13 +836,13 @@
{
if (p->Owner() == aClientId)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_DEREGISTERFORENDPOINTSTATUSCHANGE_DUP1, " removing EpStatusCallback @ 0x%x", p);
+ __KTRACE_OPT(KUSB, Kern::Printf(" removing EpStatusCallback @ 0x%x", p));
iEpStatusCallbacks.Remove(*p);
__SPIN_UNLOCK_IRQRESTORE(iUsbLock, irq);
return KErrNone;
}
}
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_DEREGISTERFORENDPOINTSTATUSCHANGE_DUP2, " client not found");
+ __KTRACE_OPT(KUSB, Kern::Printf(" client not found"));
__SPIN_UNLOCK_IRQRESTORE(iUsbLock, irq);
return KErrNotFound;
}
@@ -867,18 +858,17 @@
*/
EXPORT_C TInt DUsbClientController::GetInterfaceNumber(const DBase* aClientId, TInt& aInterfaceNum) const
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_GETINTERFACENUMBER, "DUsbClientController::GetInterfaceNumber()" );
-
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::GetInterfaceNumber()"));
const TInt ifcset = ClientId2InterfaceNumber(aClientId);
if (ifcset < 0)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_GETINTERFACENUMBER_DUP1, " Error (ifc < 0)");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error (ifc < 0)"));
return KErrNotFound;
}
const TUsbcInterfaceSet* const ifcset_ptr = InterfaceNumber2InterfacePointer(ifcset);
if (!ifcset_ptr)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_GETINTERFACENUMBER_DUP2, " Error: interface number %d doesn't exist", ifcset);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: interface number %d doesn't exist", ifcset));
return KErrNotFound;
}
aInterfaceNum = ifcset_ptr->iCurrentInterface;
@@ -903,8 +893,7 @@
*/
EXPORT_C TInt DUsbClientController::DeRegisterClient(const DBase* aClientId)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_DEREGISTERCLIENT, "DUsbClientController::DeRegisterClient(0x%x)", aClientId);
-
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::DeRegisterClient(0x%x)", aClientId));
// Cancel all device state notification requests
DeRegisterForStatusChange(aClientId);
// Cancel all endpoint state notification requests
@@ -916,7 +905,7 @@
const TInt r = ReleaseInterface(aClientId, 0);
// Cancel all remaining (if any) read/write requests
DeleteRequestCallbacks(aClientId);
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_DEREGISTERCLIENT_DUP1, "DUsbClientController::DeRegisterClient: Done.");
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::DeRegisterClient: Done."));
return r;
}
@@ -930,13 +919,12 @@
const TUsbcLogicalEndpoint* const ep = iRealEndpoints[0].iLEndpoint;
if (iHighSpeed)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_EP0PACKETSIZE, " Ep0 size = %d (HS)", ep->iEpSize_Hs);
-
+ __KTRACE_OPT(KUSB, Kern::Printf(" Ep0 size = %d (HS)", ep->iEpSize_Hs));
return ep->iEpSize_Hs;
}
else
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_EP0PACKETSIZE_DUP1, " Ep0 size = %d (FS)", ep->iEpSize_Fs);
+ __KTRACE_OPT(KUSB, Kern::Printf(" Ep0 size = %d (FS)", ep->iEpSize_Fs));
return ep->iEpSize_Fs;
}
}
@@ -950,7 +938,7 @@
*/
EXPORT_C TInt DUsbClientController::Ep0Stall(const DBase* aClientId)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_EP0STALL, "DUsbClientController::Ep0Stall()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::Ep0Stall()"));
if (aClientId == iEp0ClientId)
{
ResetEp0DataOutVars();
@@ -971,7 +959,7 @@
*/
EXPORT_C void DUsbClientController::SendEp0StatusPacket(const DBase* /* aClientId */)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_SENDEP0STATUSPACKET, "DUsbClientController::SendEp0StatusPacket()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::SendEp0StatusPacket()"));
SendEp0ZeroByteStatusPacket();
}
@@ -986,7 +974,7 @@
*/
EXPORT_C TUsbcDeviceState DUsbClientController::GetDeviceStatus() const
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_GETDEVICESTATUS, "DUsbClientController::GetDeviceStatus()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::GetDeviceStatus()"));
return iDeviceState;
}
@@ -1003,7 +991,7 @@
*/
EXPORT_C TEndpointState DUsbClientController::GetEndpointStatus(const DBase* aClientId, TInt aEndpointNum) const
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_GETENDPOINTSTATUS, "DUsbClientController::GetEndpointStatus()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::GetEndpointStatus()"));
return EndpointStallStatus(aEndpointNum) ?
EEndpointStateStalled :
EEndpointStateNotStalled;
@@ -1020,23 +1008,23 @@
*/
EXPORT_C TInt DUsbClientController::SetupReadBuffer(TUsbcRequestCallback& aCallback)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_SETUPREADBUFFER, "DUsbClientController::SetupReadBuffer()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::SetupReadBuffer()"));
const TInt ep = aCallback.iRealEpNum;
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_SETUPREADBUFFER_DUP1, " logical ep: #%d", aCallback.iEndpointNum);
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_SETUPREADBUFFER_DUP2, " real ep: #%d", ep);
+ __KTRACE_OPT(KUSB, Kern::Printf(" logical ep: #%d", aCallback.iEndpointNum));
+ __KTRACE_OPT(KUSB, Kern::Printf(" real ep: #%d", ep));
TInt err = KErrGeneral;
if (ep != 0)
{
if (iRequestCallbacks[ep])
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETUPREADBUFFER_DUP3, " Warning: RequestCallback already registered for that ep");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Warning: RequestCallback already registered for that ep"));
if (iRequestCallbacks[ep] == &aCallback)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETUPREADBUFFER_DUP4, " (this same RequestCallback @ 0x%x)", &aCallback);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" (this same RequestCallback @ 0x%x)", &aCallback));
}
else
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETUPREADBUFFER_DUP5, " (a different RequestCallback @ 0x%x)", &aCallback);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" (a different RequestCallback @ 0x%x)", &aCallback));
}
return KErrNone;
}
@@ -1046,12 +1034,12 @@
// an ISR) _before_ the SetupEndpointRead function returns. Since we don't know the
// outcome, we have to provide the callback before making the setup call.
//
- OstTraceDefExt2(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_SETUPREADBUFFER_DUP6, " adding RequestCallback[%d] @ 0x%x", ep, (TUint)&aCallback);
+ __KTRACE_OPT(KUSB, Kern::Printf(" adding RequestCallback[%d] @ 0x%x", ep, &aCallback));
iRequestCallbacks[ep] = &aCallback;
if ((err = SetupEndpointRead(ep, aCallback)) != KErrNone)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETUPREADBUFFER_DUP7, " removing RequestCallback @ 0x%x (due to error)",
- &aCallback);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" removing RequestCallback @ 0x%x (due to error)",
+ &aCallback));
iRequestCallbacks[ep] = NULL;
}
}
@@ -1059,24 +1047,24 @@
{
if (iEp0ReadRequestCallbacks.Elements() == KUsbcMaxListLength)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETUPREADBUFFER_DUP8, " Error: Maximum list length reached: %d",
- KUsbcMaxListLength);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Maximum list length reached: %d",
+ KUsbcMaxListLength));
return KErrGeneral;
}
if (IsInTheRequestList(aCallback))
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_SETUPREADBUFFER_DUP9, " RequestCallback @ 0x%x already registered", &aCallback);
+ __KTRACE_OPT(KUSB, Kern::Printf(" RequestCallback @ 0x%x already registered", &aCallback));
return KErrNone;
}
// Ep0 reads don't need to be prepared - there's always one pending
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_SETUPREADBUFFER_DUP10, " adding RequestCallback @ 0x%x (ep0)", &aCallback);
+ __KTRACE_OPT(KUSB, Kern::Printf(" adding RequestCallback @ 0x%x (ep0)", &aCallback));
const TInt irq = __SPIN_LOCK_IRQSAVE(iUsbLock);
iEp0ReadRequestCallbacks.AddLast(aCallback);
__SPIN_UNLOCK_IRQRESTORE(iUsbLock, irq);
err = KErrNone;
if (iEp0_RxExtraData)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_SETUPREADBUFFER_DUP11, " iEp0_RxExtraData: trying again...");
+ __KTRACE_OPT(KUSB, Kern::Printf(" iEp0_RxExtraData: trying again..."));
const TBool rx_data = iEp0DataReceiving;
const TInt irq = __SPIN_LOCK_IRQSAVE(iUsbLock);
err = ProcessEp0ReceiveDone(iEp0_RxExtraCount);
@@ -1094,11 +1082,11 @@
{
Ep0ReadSetupPktProceed();
}
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_SETUPREADBUFFER_DUP12, " :-)");
+ __KTRACE_OPT(KUSB, Kern::Printf(" :-)"));
}
else
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETUPREADBUFFER_DUP13, " Error: :-(");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: :-("));
err = KErrGeneral;
}
return err;
@@ -1118,23 +1106,22 @@
*/
EXPORT_C TInt DUsbClientController::SetupWriteBuffer(TUsbcRequestCallback& aCallback)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_SETUPWRITEBUFFER, "DUsbClientController::SetupWriteBuffer()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::SetupWriteBuffer()"));
TInt ep = aCallback.iRealEpNum;
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_SETUPWRITEBUFFER_DUP1, " logical ep: #%d", aCallback.iEndpointNum);
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_SETUPWRITEBUFFER_DUP2, " real ep: #%d", ep);
-
+ __KTRACE_OPT(KUSB, Kern::Printf(" logical ep: #%d", aCallback.iEndpointNum));
+ __KTRACE_OPT(KUSB, Kern::Printf(" real ep: #%d", ep));
if (iRequestCallbacks[ep])
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETUPWRITEBUFFER_DUP3, " Warning: RequestCallback already registered for that ep");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Warning: RequestCallback already registered for that ep"));
if (iRequestCallbacks[ep] == &aCallback)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETUPWRITEBUFFER_DUP4, " (this same RequestCallback @ 0x%x)", &aCallback);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" (this same RequestCallback @ 0x%x)", &aCallback));
return KErrNone;
}
else
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETUPWRITEBUFFER_DUP5, " (a different RequestCallback @ 0x%x - poss. error)",
- &aCallback);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" (a different RequestCallback @ 0x%x - poss. error)",
+ &aCallback));
return KErrGeneral;
}
}
@@ -1144,15 +1131,15 @@
{
if (iEp0_TxNonStdCount > aCallback.iLength)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETUPWRITEBUFFER_DUP6, " Warning: Ep0 is sending less data than requested");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Warning: Ep0 is sending less data than requested"));
if ((aCallback.iLength % iEp0MaxPacketSize == 0) && !aCallback.iZlpReqd)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETUPWRITEBUFFER_DUP7, " Warning: Zlp should probably be requested");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Warning: Zlp should probably be requested"));
}
}
else if (iEp0_TxNonStdCount < aCallback.iLength)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETUPWRITEBUFFER_DUP8, " Warning: Ep0 is sending more data than requested");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Warning: Ep0 is sending more data than requested"));
}
iEp0_TxNonStdCount = 0;
}
@@ -1164,21 +1151,22 @@
// However this is necessary because the transfer request might complete (through
// an ISR) _before_ the SetupEndpointWrite function returns. Since we don't know the
// outcome, we have to provide the callback before making the setup call.
- OstTraceDefExt2(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_SETUPWRITEBUFFER_DUP9, " adding RequestCallback[%d] @ 0x%x", ep, (TUint)&aCallback);
+ //
+ __KTRACE_OPT(KUSB, Kern::Printf(" adding RequestCallback[%d] @ 0x%x", ep, &aCallback));
iRequestCallbacks[ep] = &aCallback;
if (ep == KEp0_Tx)
{
iEp0ClientDataTransmitting = ETrue; // this must be set before calling SetupEndpointZeroWrite
if (SetupEndpointZeroWrite(aCallback.iBufferStart, aCallback.iLength, aCallback.iZlpReqd) != KErrNone)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETUPWRITEBUFFER_DUP10, " removing RequestCallback @ 0x%x (due to error)", &aCallback);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" removing RequestCallback @ 0x%x (due to error)", &aCallback));
iRequestCallbacks[ep] = NULL;
iEp0ClientDataTransmitting = EFalse;
}
}
else if (SetupEndpointWrite(ep, aCallback) != KErrNone)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETUPWRITEBUFFER_DUP11, " removing RequestCallback @ 0x%x (due to error)", &aCallback);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" removing RequestCallback @ 0x%x (due to error)", &aCallback));
iRequestCallbacks[ep] = NULL;
}
return KErrNone;
@@ -1195,11 +1183,10 @@
*/
EXPORT_C void DUsbClientController::CancelReadBuffer(const DBase* aClientId, TInt aRealEndpoint)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_CANCELREADBUFFER, "DUsbClientController::CancelReadBuffer(%d)", aRealEndpoint);
-
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::CancelReadBuffer(%d)", aRealEndpoint));
if (aRealEndpoint < 0)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_CANCELREADBUFFER_DUP1, " Error: ep # < 0: %d", aRealEndpoint);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: ep # < 0: %d", aRealEndpoint));
return;
}
// Note that we here don't cancel Ep0 read requests at the PSL level!
@@ -1222,11 +1209,10 @@
*/
EXPORT_C void DUsbClientController::CancelWriteBuffer(const DBase* aClientId, TInt aRealEndpoint)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_CANCELWRITEBUFFER, "DUsbClientController::CancelWriteBuffer(%d)", aRealEndpoint);
-
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::CancelWriteBuffer(%d)", aRealEndpoint));
if (aRealEndpoint < 0)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_CANCELWRITEBUFFER_DUP1, " Error: ep # < 0: %d", aRealEndpoint);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: ep # < 0: %d", aRealEndpoint));
return;
}
if (aRealEndpoint == 0)
@@ -1254,8 +1240,7 @@
*/
EXPORT_C TInt DUsbClientController::HaltEndpoint(const DBase* aClientId, TInt aEndpointNum)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_HALTENDPOINT, "DUsbClientController::HaltEndpoint(%d)", aEndpointNum);
-
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::HaltEndpoint(%d)", aEndpointNum));
const TInt r = StallEndpoint(aEndpointNum);
if (r == KErrNone)
{
@@ -1279,7 +1264,7 @@
*/
EXPORT_C TInt DUsbClientController::ClearHaltEndpoint(const DBase* aClientId, TInt aEndpointNum)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_CLEARHALTENDPOINT, "DUsbClientController::ClearHaltEndpoint(%d)", aEndpointNum);
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::ClearHaltEndpoint(%d)", aEndpointNum));
const TInt r = ClearStallEndpoint(aEndpointNum);
if (r == KErrNone)
{
@@ -1306,15 +1291,15 @@
*/
EXPORT_C TInt DUsbClientController::SetDeviceControl(const DBase* aClientId)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_SETDEVICECONTROL, "DUsbClientController::SetDeviceControl()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::SetDeviceControl()"));
if (iEp0DeviceControl)
{
if (iEp0DeviceControl == aClientId)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETDEVICECONTROL_DUP1, " Warning: Device Control already owned by this client" );
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Warning: Device Control already owned by this client"));
return KErrNone;
}
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETDEVICECONTROL_DUP2, " Error: Device Control already claimed by a different client");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Device Control already claimed by a different client"));
return KErrGeneral;
}
iEp0DeviceControl = aClientId;
@@ -1333,20 +1318,20 @@
*/
EXPORT_C TInt DUsbClientController::ReleaseDeviceControl(const DBase* aClientId)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_RELEASEDEVICECONTROL, "DUsbClientController::ReleaseDeviceControl()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::ReleaseDeviceControl()"));
if (iEp0DeviceControl)
{
if (iEp0DeviceControl == aClientId)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_RELEASEDEVICECONTROL_DUP1, " Releasing Device Control" );
+ __KTRACE_OPT(KUSB, Kern::Printf(" Releasing Device Control"));
iEp0DeviceControl = NULL;
return KErrNone;
}
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_RELEASEDEVICECONTROL_DUP2, " Error: Device Control owned by a different client" );
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Device Control owned by a different client"));
}
else
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_RELEASEDEVICECONTROL_DUP3, " Error: Device Control not owned by any client" );
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Device Control not owned by any client"));
}
return KErrGeneral;
}
@@ -1361,7 +1346,7 @@
*/
EXPORT_C TUint DUsbClientController::EndpointZeroMaxPacketSizes() const
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_ENDPOINTZEROMAXPACKETSIZES, "DUsbClientController::EndpointZeroMaxPacketSizes()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::EndpointZeroMaxPacketSizes()"));
return iRealEndpoints[0].iCaps.iSizes;
}
@@ -1377,9 +1362,8 @@
*/
EXPORT_C TInt DUsbClientController::SetEndpointZeroMaxPacketSize(TInt aMaxPacketSize)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_SETENDPOINTZEROMAXPACKETSIZE, "DUsbClientController::SetEndpointZeroMaxPacketSize(%d)",
- aMaxPacketSize);
-
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::SetEndpointZeroMaxPacketSize(%d)",
+ aMaxPacketSize));
if (DeviceHighSpeedCaps())
{
@@ -1389,12 +1373,12 @@
if (!(iRealEndpoints[0].iCaps.iSizes & PacketSize2Mask(aMaxPacketSize)))
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETENDPOINTZEROMAXPACKETSIZE_DUP1, " Error: invalid size");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: invalid size"));
return KErrNotSupported;
}
if (iRealEndpoints[0].iLEndpoint->iEpSize_Fs == aMaxPacketSize)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_SETENDPOINTZEROMAXPACKETSIZE_DUP2, " this packet size already set -> returning");
+ __KTRACE_OPT(KUSB, Kern::Printf(" this packet size already set -> returning"));
return KErrNone;
}
const TUsbcLogicalEndpoint* const ep0_0 = iRealEndpoints[0].iLEndpoint;
@@ -1431,7 +1415,7 @@
*/
EXPORT_C TInt DUsbClientController::GetDeviceDescriptor(DThread* aThread, TDes8& aDeviceDescriptor)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_GETDEVICEDESCRIPTOR, "DUsbClientController::GetDeviceDescriptor()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::GetDeviceDescriptor()"));
return iDescriptors.GetDeviceDescriptorTC(aThread, aDeviceDescriptor);
}
@@ -1447,7 +1431,7 @@
*/
EXPORT_C TInt DUsbClientController::SetDeviceDescriptor(DThread* aThread, const TDes8& aDeviceDescriptor)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_SETDEVICEDESCRIPTOR, "DUsbClientController::SetDeviceDescriptor()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::SetDeviceDescriptor()"));
return iDescriptors.SetDeviceDescriptorTC(aThread, aDeviceDescriptor);
}
@@ -1463,7 +1447,7 @@
*/
EXPORT_C TInt DUsbClientController::GetDeviceDescriptorSize(DThread* aThread, TDes8& aSize)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_GETDEVICEDESCRIPTORSIZE, "DUsbClientController::GetDeviceDescriptorSize()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::GetDeviceDescriptorSize()"));
// We do not really enquire here....
const TPtrC8 size(reinterpret_cast<const TUint8*>(&KUsbDescSize_Device), sizeof(KUsbDescSize_Device));
return Kern::ThreadDesWrite(aThread, &aSize, size, 0);
@@ -1481,7 +1465,7 @@
*/
EXPORT_C TInt DUsbClientController::GetConfigurationDescriptor(DThread* aThread, TDes8& aConfigurationDescriptor)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_GETCONFIGURATIONDESCRIPTOR, "DUsbClientController::GetConfigurationDescriptor()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::GetConfigurationDescriptor()"));
return iDescriptors.GetConfigurationDescriptorTC(aThread, aConfigurationDescriptor);
}
@@ -1498,7 +1482,7 @@
EXPORT_C TInt DUsbClientController::SetConfigurationDescriptor(DThread* aThread,
const TDes8& aConfigurationDescriptor)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_SETCONFIGURATIONDESCRIPTOR, "DUsbClientController::SetConfigurationDescriptor()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::SetConfigurationDescriptor()"));
return iDescriptors.SetConfigurationDescriptorTC(aThread, aConfigurationDescriptor);
}
@@ -1514,7 +1498,7 @@
*/
EXPORT_C TInt DUsbClientController::GetConfigurationDescriptorSize(DThread* aThread, TDes8& aSize)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_GETCONFIGURATIONDESCRIPTORSIZE, "DUsbClientController::GetConfigurationDescriptorSize()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::GetConfigurationDescriptorSize()"));
// We do not really enquire here....
const TPtrC8 size(reinterpret_cast<const TUint8*>(&KUsbDescSize_Config), sizeof(KUsbDescSize_Config));
return Kern::ThreadDesWrite(aThread, &aSize, size, 0);
@@ -1532,7 +1516,7 @@
*/
EXPORT_C TInt DUsbClientController::GetOtgDescriptor(DThread* aThread, TDes8& aOtgDesc) const
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_GETOTGDESCRIPTOR, "DUsbClientController::GetOtgDescriptor()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::GetOtgDescriptor()"));
if (!iOtgSupport)
{
return KErrNotSupported;
@@ -1550,7 +1534,7 @@
*/
EXPORT_C TInt DUsbClientController::SetOtgDescriptor(DThread* aThread, const TDesC8& aOtgDesc)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_SETOTGDESCRIPTOR, "DUsbClientController::SetOtgDescriptor()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::SetOtgDescriptor()"));
if (!iOtgSupport)
{
return KErrNotSupported;
@@ -1564,38 +1548,38 @@
// Check descriptor validity
if (otg[0] != KUsbDescSize_Otg || otg[1] != KUsbDescType_Otg || otg[2] > 3)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETOTGDESCRIPTOR_DUP1, " Error: Invalid OTG descriptor" );
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Invalid OTG descriptor"));
return KErrGeneral;
}
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_SETOTGDESCRIPTOR_DUP2, " iOtgFuncMap before: 0x%x", iOtgFuncMap);
+ __KTRACE_OPT(KUSB, Kern::Printf(" iOtgFuncMap before: 0x%x", iOtgFuncMap));
// Update value in controller as well
const TUint8 hnp = otg[2] & KUsbOtgAttr_HnpSupp;
const TUint8 srp = otg[2] & KUsbOtgAttr_SrpSupp;
if (hnp && !srp)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETOTGDESCRIPTOR_DUP3, " Warning: Invalid OTG attribute combination (HNP && !SRP");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Warning: Invalid OTG attribute combination (HNP && !SRP"));
}
if (hnp && !(iOtgFuncMap & KUsbOtgAttr_HnpSupp))
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_SETOTGDESCRIPTOR_DUP4, " Setting attribute KUsbOtgAttr_HnpSupp");
+ __KTRACE_OPT(KUSB, Kern::Printf(" Setting attribute KUsbOtgAttr_HnpSupp"));
iOtgFuncMap |= KUsbOtgAttr_HnpSupp;
}
else if (!hnp && (iOtgFuncMap & KUsbOtgAttr_HnpSupp))
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_SETOTGDESCRIPTOR_DUP5, " Removing attribute KUsbOtgAttr_HnpSupp");
+ __KTRACE_OPT(KUSB, Kern::Printf(" Removing attribute KUsbOtgAttr_HnpSupp"));
iOtgFuncMap &= ~KUsbOtgAttr_HnpSupp;
}
if (srp && !(iOtgFuncMap & KUsbOtgAttr_SrpSupp))
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_SETOTGDESCRIPTOR_DUP6, " Setting attribute KUsbOtgAttr_SrpSupp");
+ __KTRACE_OPT(KUSB, Kern::Printf(" Setting attribute KUsbOtgAttr_SrpSupp"));
iOtgFuncMap |= KUsbOtgAttr_SrpSupp;
}
else if (!srp && (iOtgFuncMap & KUsbOtgAttr_SrpSupp))
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_SETOTGDESCRIPTOR_DUP7, " Removing attribute KUsbOtgAttr_SrpSupp");
+ __KTRACE_OPT(KUSB, Kern::Printf(" Removing attribute KUsbOtgAttr_SrpSupp"));
iOtgFuncMap &= ~KUsbOtgAttr_SrpSupp;
}
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_SETOTGDESCRIPTOR_DUP8, " iOtgFuncMap after: 0x%x", iOtgFuncMap);
+ __KTRACE_OPT(KUSB, Kern::Printf(" iOtgFuncMap after: 0x%x", iOtgFuncMap));
return iDescriptors.SetOtgDescriptor(otg);
}
@@ -1609,7 +1593,7 @@
*/
EXPORT_C TInt DUsbClientController::GetOtgFeatures(DThread* aThread, TDes8& aFeatures) const
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_GETOTGFEATURES, "DUsbClientController::GetOtgFeatures()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::GetOtgFeatures()"));
if (!iOtgSupport)
{
return KErrNotSupported;
@@ -1628,7 +1612,7 @@
*/
EXPORT_C TInt DUsbClientController::GetCurrentOtgFeatures(TUint8& aFeatures) const
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_GETCURRENTOTGFEATURES, "DUsbClientController::GetCurrentOtgFeatures()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::GetCurrentOtgFeatures()"));
if (!iOtgSupport)
{
return KErrNotSupported;
@@ -1649,16 +1633,16 @@
*/
EXPORT_C TInt DUsbClientController::RegisterForOtgFeatureChange(TUsbcOtgFeatureCallback& aCallback)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_REGISTERFOROTGFEATURECHANGE, "DUsbClientController::RegisterForOtgFeatureChange()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::RegisterForOtgFeatureChange()"));
if (iOtgCallbacks.Elements() == KUsbcMaxListLength)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_REGISTERFOROTGFEATURECHANGE_DUP1, " Error: Maximum list length reached: %d",
- KUsbcMaxListLength);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Maximum list length reached: %d",
+ KUsbcMaxListLength));
return KErrGeneral;
}
if (IsInTheOtgFeatureList(aCallback))
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_REGISTERFOROTGFEATURECHANGE_DUP2, " Error: OtgFeatureCallback @ 0x%x already registered", &aCallback);
+ __KTRACE_OPT(KUSB, Kern::Printf(" Error: OtgFeatureCallback @ 0x%x already registered", &aCallback));
return KErrAlreadyExists;
}
const TInt irq = __SPIN_LOCK_IRQSAVE(iUsbLock);
@@ -1677,7 +1661,7 @@
*/
EXPORT_C TInt DUsbClientController::DeRegisterForOtgFeatureChange(const DBase* aClientId)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_DEREGISTERFOROTGFEATURECHANGE, "DUsbClientController::DeRegisterForOtgFeatureChange()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::DeRegisterForOtgFeatureChange()"));
__ASSERT_DEBUG((aClientId != NULL), Kern::Fault(KUsbPILPanicCat, __LINE__));
const TInt irq = __SPIN_LOCK_IRQSAVE(iUsbLock);
TSglQueIter<TUsbcOtgFeatureCallback> iter(iOtgCallbacks);
@@ -1686,13 +1670,13 @@
{
if (!aClientId || p->Owner() == aClientId)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_DEREGISTERFOROTGFEATURECHANGE_DUP1, " removing OtgFeatureCallback @ 0x%x", p);
+ __KTRACE_OPT(KUSB, Kern::Printf(" removing OtgFeatureCallback @ 0x%x", p));
iOtgCallbacks.Remove(*p);
__SPIN_UNLOCK_IRQRESTORE(iUsbLock, irq);
return KErrNone;
}
}
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_DEREGISTERFOROTGFEATURECHANGE_DUP2, " client not found");
+ __KTRACE_OPT(KUSB, Kern::Printf(" client not found"));
__SPIN_UNLOCK_IRQRESTORE(iUsbLock, irq);
return KErrNotFound;
}
@@ -1712,13 +1696,12 @@
EXPORT_C TInt DUsbClientController::GetInterfaceDescriptor(DThread* aThread, const DBase* aClientId,
TInt aSettingNum, TDes8& aInterfaceDescriptor)
{
- OstTraceDefExt2(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_GETINTERFACEDESCRIPTOR, "DUsbClientController::GetInterfaceDescriptor(x, 0x%08x, %d, y)",
- (TUint)aClientId, aSettingNum);
-
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::GetInterfaceDescriptor(x, 0x%08x, %d, y)",
+ aClientId, aSettingNum));
const TInt ifcset = ClientId2InterfaceNumber(aClientId);
if (ifcset < 0)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_GETINTERFACEDESCRIPTOR_DUP1, " Error: Interface not found from client ID");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Interface not found from client ID"));
return KErrNotFound;
}
return iDescriptors.GetInterfaceDescriptorTC(aThread, aInterfaceDescriptor, ifcset, aSettingNum);
@@ -1748,19 +1731,19 @@
EXPORT_C TInt DUsbClientController::SetInterfaceDescriptor(DThread* aThread, const DBase* aClientId,
TInt aSettingNum, const TDes8& aInterfaceDescriptor)
{
- OstTraceDefExt2(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_SETINTERFACEDESCRIPTOR, "DUsbClientController::SetInterfaceDescriptor(x, 0x%08x, %d, y)",
- (TUint)aClientId, aSettingNum);
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::SetInterfaceDescriptor(x, 0x%08x, %d, y)",
+ aClientId, aSettingNum));
const TInt ifcset = ClientId2InterfaceNumber(aClientId);
if (ifcset < 0)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETINTERFACEDESCRIPTOR_DUP1, " Error: Interface not found from client ID");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Interface not found from client ID"));
return KErrNotFound;
}
TBuf8<KUsbDescSize_Interface> new_ifc;
TInt r = Kern::ThreadDesRead(aThread, &aInterfaceDescriptor, new_ifc, 0);
if (r != KErrNone)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETINTERFACEDESCRIPTOR_DUP2, " Error: Copying interface descriptor buffer failed (%d)", r);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Copying interface descriptor buffer failed (%d)", r));
return r;
}
const TInt ifcset_new = new_ifc[2];
@@ -1768,7 +1751,7 @@
TUsbcInterfaceSet* const ifcset_ptr = InterfaceNumber2InterfacePointer(ifcset);
if (!ifcset_ptr)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETINTERFACEDESCRIPTOR_DUP3, " Error: interface number %d doesn't exist", ifcset);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: interface number %d doesn't exist", ifcset));
return KErrNotFound;
}
if (ifc_num_changes)
@@ -1777,32 +1760,32 @@
if (InterfaceExists(ifcset_new))
{
// Obviously we cannot accept a number that is already used by another interface.
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETINTERFACEDESCRIPTOR_DUP4, " Error: interface number %d already in use", ifcset_new);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: interface number %d already in use", ifcset_new));
return KErrArgument;
}
if (ifcset_ptr->iInterfaces.Count() > 1)
{
// We allow the interface number to be changed only when it's the only setting.
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETINTERFACEDESCRIPTOR_DUP5, " Error: interface has more than one alternate setting");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: interface has more than one alternate setting"));
return KErrArgument;
}
if (aSettingNum != 0)
{
// We allow the interface number to be changed only when it's the default setting.
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETINTERFACEDESCRIPTOR_DUP6, " Error: interface number can only be changed for setting 0");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: interface number can only be changed for setting 0"));
return KErrArgument;
}
}
if ((r = iDescriptors.SetInterfaceDescriptor(new_ifc, ifcset, aSettingNum)) != KErrNone)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETINTERFACEDESCRIPTOR_DUP7, " Error: iDescriptors.SetInterfaceDescriptorfailed");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: iDescriptors.SetInterfaceDescriptorfailed"));
return r;
}
if (ifc_num_changes)
{
// Alright then, let's do it...
- OstTraceDefExt2(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETINTERFACEDESCRIPTOR_DUP8, " about to change interface number from %d to %d",
- ifcset, ifcset_new);
+ __KTRACE_OPT(KUSB, Kern::Printf(" about to change interface number from %d to %d",
+ ifcset, ifcset_new));
ifcset_ptr->iInterfaceNumber = ifcset_new;
}
return KErrNone;
@@ -1823,11 +1806,11 @@
EXPORT_C TInt DUsbClientController::GetInterfaceDescriptorSize(DThread* aThread, const DBase* aClientId,
TInt /*aSettingNum*/, TDes8& aSize)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_GETINTERFACEDESCRIPTORSIZE, "DUsbClientController::GetInterfaceDescriptorSize()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::GetInterfaceDescriptorSize()"));
const TInt ifcset = ClientId2InterfaceNumber(aClientId);
if (ifcset < 0)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_GETINTERFACEDESCRIPTORSIZE_DUP1, " Error: Interface not found from client ID" );
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Interface not found from client ID"));
return KErrNotFound;
}
// Actually, we do not really enquire here....
@@ -1854,12 +1837,12 @@
TInt aSettingNum, TInt aEndpointNum,
TDes8& aEndpointDescriptor)
{
- OstTraceDefExt3(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_GETENDPOINTDESCRIPTOR, "DUsbClientController::GetEndpointDescriptor(x, 0x%08x, %d, %d, y)",
- (TUint)aClientId, aSettingNum, aEndpointNum);
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::GetEndpointDescriptor(x, 0x%08x, %d, %d, y)",
+ aClientId, aSettingNum, aEndpointNum));
const TInt ifcset = ClientId2InterfaceNumber(aClientId);
if (ifcset < 0)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_GETENDPOINTDESCRIPTOR_DUP1, " Error: Interface not found from client ID");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Interface not found from client ID"));
return KErrNotFound;
}
return iDescriptors.GetEndpointDescriptorTC(aThread, aEndpointDescriptor, ifcset,
@@ -1885,12 +1868,12 @@
TInt aSettingNum, TInt aEndpointNum,
const TDes8& aEndpointDescriptor)
{
- OstTraceDefExt3(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_SETENDPOINTDESCRIPTOR, "DUsbClientController::SetEndpointDescriptor(x, 0x%08x, %d, %d, y)",
- (TUint)aClientId, aSettingNum, aEndpointNum);
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::SetEndpointDescriptor(x, 0x%08x, %d, %d, y)",
+ aClientId, aSettingNum, aEndpointNum));
const TInt ifcset = ClientId2InterfaceNumber(aClientId);
if (ifcset < 0)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETENDPOINTDESCRIPTOR_DUP1, " Error: Interface not found from client ID");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Interface not found from client ID"));
return KErrNotFound;
}
return iDescriptors.SetEndpointDescriptorTC(aThread, aEndpointDescriptor, ifcset,
@@ -1915,12 +1898,12 @@
TInt aSettingNum, TInt aEndpointNum,
TDes8& aSize)
{
- OstTraceDefExt3(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_GETENDPOINTDESCRIPTORSIZE, "DUsbClientController::GetEndpointDescriptorSize(x, 0x%08x, %d, %d, y)",
- (TUint)aClientId, aSettingNum, aEndpointNum);
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::GetEndpointDescriptorSize(x, 0x%08x, %d, %d, y)",
+ aClientId, aSettingNum, aEndpointNum));
const TInt ifcset = ClientId2InterfaceNumber(aClientId);
if (ifcset < 0)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_GETENDPOINTDESCRIPTORSIZE_DUP1, "D Error: Interface not found from client ID");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Interface not found from client ID"));
return KErrNotFound;
}
TInt s;
@@ -1933,7 +1916,7 @@
}
else
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_GETENDPOINTDESCRIPTORSIZE_DUP2, " Error: endpoint descriptor not found");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: endpoint descriptor not found"));
}
return r;
}
@@ -1953,7 +1936,7 @@
EXPORT_C TInt DUsbClientController::GetDeviceQualifierDescriptor(DThread* aThread,
TDes8& aDeviceQualifierDescriptor)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_GETDEVICEQUALIFIERDESCRIPTOR, "DUsbClientController::GetDeviceQualifierDescriptor()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::GetDeviceQualifierDescriptor()"));
return iDescriptors.GetDeviceQualifierDescriptorTC(aThread, aDeviceQualifierDescriptor);
}
@@ -1973,7 +1956,7 @@
EXPORT_C TInt DUsbClientController::SetDeviceQualifierDescriptor(DThread* aThread,
const TDes8& aDeviceQualifierDescriptor)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_SETDEVICEQUALIFIERDESCRIPTOR, "DUsbClientController::SetDeviceQualifierDescriptor()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::SetDeviceQualifierDescriptor()"));
return iDescriptors.SetDeviceQualifierDescriptorTC(aThread, aDeviceQualifierDescriptor);
}
@@ -1992,7 +1975,7 @@
EXPORT_C TInt DUsbClientController::GetOtherSpeedConfigurationDescriptor(DThread* aThread,
TDes8& aConfigurationDescriptor)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_GETOTHERSPEEDCONFIGURATIONDESCRIPTOR, "DUsbClientController::GetOtherSpeedConfigurationDescriptor()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::GetOtherSpeedConfigurationDescriptor()"));
return iDescriptors.GetOtherSpeedConfigurationDescriptorTC(aThread, aConfigurationDescriptor);
}
@@ -2012,7 +1995,7 @@
EXPORT_C TInt DUsbClientController::SetOtherSpeedConfigurationDescriptor(DThread* aThread,
const TDes8& aConfigurationDescriptor)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_SETOTHERSPEEDCONFIGURATIONDESCRIPTOR, "DUsbClientController::SetOtherSpeedConfigurationDescriptor()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::SetOtherSpeedConfigurationDescriptor()"));
return iDescriptors.SetOtherSpeedConfigurationDescriptorTC(aThread, aConfigurationDescriptor);
}
@@ -2033,12 +2016,12 @@
TInt aSettingNum,
TDes8& aInterfaceDescriptor)
{
- OstTraceDefExt2(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_GETCSINTERFACEDESCRIPTORBLOCK, "DUsbClientController::GetCSInterfaceDescriptorBlock(x, 0x%08x, %d, y)",
- (TUint)aClientId, aSettingNum);
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::GetCSInterfaceDescriptorBlock(x, 0x%08x, %d, y)",
+ aClientId, aSettingNum));
const TInt ifcset = ClientId2InterfaceNumber(aClientId);
if (ifcset < 0)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_GETCSINTERFACEDESCRIPTORBLOCK_DUP1, "D Error: Interface not found from client ID");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Interface not found from client ID"));
return KErrNotFound;
}
return iDescriptors.GetCSInterfaceDescriptorTC(aThread, aInterfaceDescriptor, ifcset, aSettingNum);
@@ -2065,17 +2048,18 @@
TInt aSettingNum,
const TDes8& aInterfaceDescriptor, TInt aSize)
{
- OstTraceDefExt3(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_SETCSINTERFACEDESCRIPTORBLOCK, "DUsbClientController::SetCSInterfaceDescriptorBlock(x, 0x%08x, %d, y, %d)",
- (TUint)aClientId, aSettingNum, aSize);
+ __KTRACE_OPT(KUSB,
+ Kern::Printf("DUsbClientController::SetCSInterfaceDescriptorBlock(x, 0x%08x, %d, y, %d)",
+ aClientId, aSettingNum, aSize));
const TInt ifcset = ClientId2InterfaceNumber(aClientId);
if (ifcset < 0)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETCSINTERFACEDESCRIPTORBLOCK_DUP1, " Error: Interface not found from client ID");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Interface not found from client ID"));
return KErrNotFound;
}
if (aSize < 2)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETCSINTERFACEDESCRIPTORBLOCK_DUP2, " Error: aSize < 2 (%d)", aSize);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: aSize < 2 (%d)", aSize));
return KErrArgument;
}
return iDescriptors.SetCSInterfaceDescriptorTC(aThread, aInterfaceDescriptor, ifcset, aSettingNum, aSize);
@@ -2097,12 +2081,13 @@
EXPORT_C TInt DUsbClientController::GetCSInterfaceDescriptorBlockSize(DThread* aThread, const DBase* aClientId,
TInt aSettingNum, TDes8& aSize)
{
- OstTraceDefExt2(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_GETCSINTERFACEDESCRIPTORBLOCKSIZE, "DUsbClientController::GetCSInterfaceDescriptorBlockSize(x, 0x%08x, %d, y)",
- (TUint)aClientId, aSettingNum);
+ __KTRACE_OPT(KUSB,
+ Kern::Printf("DUsbClientController::GetCSInterfaceDescriptorBlockSize(x, 0x%08x, %d, y)",
+ aClientId, aSettingNum));
const TInt ifcset = ClientId2InterfaceNumber(aClientId);
if (ifcset < 0)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_GETCSINTERFACEDESCRIPTORBLOCKSIZE_DUP1, " Error: Interface not found from client ID");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Interface not found from client ID"));
return KErrNotFound;
}
TInt s;
@@ -2114,7 +2099,7 @@
}
else
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_GETCSINTERFACEDESCRIPTORBLOCKSIZE_DUP2, " Error: cs interface descriptor not found");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: cs interface descriptor not found"));
}
return r;
}
@@ -2137,12 +2122,13 @@
TInt aSettingNum, TInt aEndpointNum,
TDes8& aEndpointDescriptor)
{
- OstTraceDefExt3(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_GETCSENDPOINTDESCRIPTORBLOCK, "DUsbClientController::GetCSEndpointDescriptorBlock(x, 0x%08x, %d, %d, y)",
- (TUint)aClientId, aSettingNum, aEndpointNum);
+ __KTRACE_OPT(KUSB,
+ Kern::Printf("DUsbClientController::GetCSEndpointDescriptorBlock(x, 0x%08x, %d, %d, y)",
+ aClientId, aSettingNum, aEndpointNum));
const TInt ifcset = ClientId2InterfaceNumber(aClientId);
if (ifcset < 0)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_GETCSENDPOINTDESCRIPTORBLOCK_DUP1, " Error: Interface not found from client ID");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Interface not found from client ID"));
return KErrNotFound;
}
return iDescriptors.GetCSEndpointDescriptorTC(aThread, aEndpointDescriptor, ifcset,
@@ -2171,17 +2157,18 @@
TInt aSettingNum, TInt aEndpointNum,
const TDes8& aEndpointDescriptor, TInt aSize)
{
- OstTraceDefExt3(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_SETCSENDPOINTDESCRIPTORBLOCK, "DUsbClientController::SetCSEndpointDescriptorBlock(x, 0x%08x, %d, %d, y)",
- (TUint)aClientId, aSettingNum, aEndpointNum);
+ __KTRACE_OPT(KUSB,
+ Kern::Printf("DUsbClientController::SetCSEndpointDescriptorBlock(x, 0x%08x, %d, %d, y)",
+ aClientId, aSettingNum, aEndpointNum));
const TInt ifcset = ClientId2InterfaceNumber(aClientId);
if (ifcset < 0)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETCSENDPOINTDESCRIPTORBLOCK_DUP1, " Error: Interface not found from client ID");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Interface not found from client ID"));
return KErrNotFound;
}
if (aSize < 2)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETCSENDPOINTDESCRIPTORBLOCK_DUP2, " Error: aSize < 2 (%d)", aSize);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: aSize < 2 (%d)", aSize));
return KErrArgument;
}
return iDescriptors.SetCSEndpointDescriptorTC(aThread, aEndpointDescriptor, ifcset,
@@ -2206,12 +2193,13 @@
TInt aSettingNum, TInt aEndpointNum,
TDes8& aSize)
{
- OstTraceDefExt3(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_GETCSENDPOINTDESCRIPTORBLOCKSIZE, "DUsbClientController::GetCSEndpointDescriptorBlockSize(x, 0x%08x, %d, %d, y)",
- (TUint)aClientId, aSettingNum, aEndpointNum);
+ __KTRACE_OPT(KUSB,
+ Kern::Printf("DUsbClientController::GetCSEndpointDescriptorBlockSize(x, 0x%08x, %d, %d, y)",
+ aClientId, aSettingNum, aEndpointNum));
const TInt ifcset = ClientId2InterfaceNumber(aClientId);
if (ifcset < 0)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_GETCSENDPOINTDESCRIPTORBLOCKSIZE_DUP1, " Error: Interface not found from client ID");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Interface not found from client ID"));
return KErrNotFound;
}
TInt s;
@@ -2224,7 +2212,7 @@
}
else
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_GETCSENDPOINTDESCRIPTORBLOCKSIZE_DUP2, " Error: cs endpoint descriptor not found");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: cs endpoint descriptor not found"));
}
return r;
}
@@ -2241,7 +2229,7 @@
*/
EXPORT_C TInt DUsbClientController::GetStringDescriptorLangId(DThread* aThread, TDes8& aLangId)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_GETSTRINGDESCRIPTORLANGID, "DUsbClientController::GetStringDescriptorLangId()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::GetStringDescriptorLangId()"));
return iDescriptors.GetStringDescriptorLangIdTC(aThread, aLangId);
}
@@ -2254,7 +2242,7 @@
*/
EXPORT_C TInt DUsbClientController::SetStringDescriptorLangId(TUint16 aLangId)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_SETSTRINGDESCRIPTORLANGID, "DUsbClientController::SetStringDescriptorLangId()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::GetStringDescriptorLangId()"));
return iDescriptors.SetStringDescriptorLangId(aLangId);
}
@@ -2274,7 +2262,7 @@
*/
EXPORT_C TInt DUsbClientController::GetManufacturerStringDescriptor(DThread* aThread, TDes8& aString)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_GETMANUFACTURERSTRINGDESCRIPTOR, "DUsbClientController::GetManufacturerStringDescriptor()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::GetManufacturerStringDescriptor()"));
return iDescriptors.GetManufacturerStringDescriptorTC(aThread, aString);
}
@@ -2295,7 +2283,7 @@
*/
EXPORT_C TInt DUsbClientController::SetManufacturerStringDescriptor(DThread* aThread, const TDes8& aString)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_SETMANUFACTURERSTRINGDESCRIPTOR, "DUsbClientController::SetManufacturerStringDescriptor()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::SetManufacturerStringDescriptor()"));
return iDescriptors.SetManufacturerStringDescriptorTC(aThread, aString);
}
@@ -2307,7 +2295,7 @@
*/
EXPORT_C TInt DUsbClientController::RemoveManufacturerStringDescriptor()
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_REMOVEMANUFACTURERSTRINGDESCRIPTOR, "DUsbClientController::RemoveManufacturerStringDescriptor()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::RemoveManufacturerStringDescriptor()"));
return iDescriptors.RemoveManufacturerStringDescriptor();
}
@@ -2327,7 +2315,7 @@
*/
EXPORT_C TInt DUsbClientController::GetProductStringDescriptor(DThread* aThread, TDes8& aString)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_GETPRODUCTSTRINGDESCRIPTOR, "DUsbClientController::GetProductStringDescriptor()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::GetProductStringDescriptor()"));
return iDescriptors.GetProductStringDescriptorTC(aThread, aString);
}
@@ -2348,7 +2336,7 @@
*/
EXPORT_C TInt DUsbClientController::SetProductStringDescriptor(DThread* aThread, const TDes8& aString)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_SETPRODUCTSTRINGDESCRIPTOR, "DUsbClientController::SetProductStringDescriptor()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::SetProductStringDescriptor()"));
return iDescriptors.SetProductStringDescriptorTC(aThread, aString);
}
@@ -2360,7 +2348,7 @@
*/
EXPORT_C TInt DUsbClientController::RemoveProductStringDescriptor()
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_REMOVEPRODUCTSTRINGDESCRIPTOR, "DUsbClientController::RemoveProductStringDescriptor()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::RemoveProductStringDescriptor()"));
return iDescriptors.RemoveProductStringDescriptor();
}
@@ -2380,7 +2368,7 @@
*/
EXPORT_C TInt DUsbClientController::GetSerialNumberStringDescriptor(DThread* aThread, TDes8& aString)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_GETSERIALNUMBERSTRINGDESCRIPTOR, "DUsbClientController::GetSerialNumberStringDescriptor()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::GetSerialNumberStringDescriptor()"));
return iDescriptors.GetSerialNumberStringDescriptorTC(aThread, aString);
}
@@ -2401,7 +2389,7 @@
*/
EXPORT_C TInt DUsbClientController::SetSerialNumberStringDescriptor(DThread* aThread, const TDes8& aString)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_SETSERIALNUMBERSTRINGDESCRIPTOR, "DUsbClientController::SetSerialNumberStringDescriptor()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::SetSerialNumberStringDescriptor()"));
return iDescriptors.SetSerialNumberStringDescriptorTC(aThread, aString);
}
@@ -2413,7 +2401,7 @@
*/
EXPORT_C TInt DUsbClientController::RemoveSerialNumberStringDescriptor()
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_REMOVESERIALNUMBERSTRINGDESCRIPTOR, "DUsbClientController::RemoveSerialNumberStringDescriptor()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::RemoveSerialNumberStringDescriptor()"));
return iDescriptors.RemoveSerialNumberStringDescriptor();
}
@@ -2433,7 +2421,7 @@
*/
EXPORT_C TInt DUsbClientController::GetConfigurationStringDescriptor(DThread* aThread, TDes8& aString)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_GETCONFIGURATIONSTRINGDESCRIPTOR, "DUsbClientController::GetConfigurationStringDescriptor()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::GetConfigurationStringDescriptor()"));
return iDescriptors.GetConfigurationStringDescriptorTC(aThread, aString);
}
@@ -2454,7 +2442,7 @@
*/
EXPORT_C TInt DUsbClientController::SetConfigurationStringDescriptor(DThread* aThread, const TDes8& aString)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_SETCONFIGURATIONSTRINGDESCRIPTOR, "DUsbClientController::SetConfigurationStringDescriptor()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::SetConfigurationStringDescriptor()"));
return iDescriptors.SetConfigurationStringDescriptorTC(aThread, aString);
}
@@ -2466,7 +2454,7 @@
*/
EXPORT_C TInt DUsbClientController::RemoveConfigurationStringDescriptor()
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_REMOVECONFIGURATIONSTRINGDESCRIPTOR, "DUsbClientController::RemoveConfigurationStringDescriptor()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::RemoveConfigurationStringDescriptor()"));
return iDescriptors.RemoveConfigurationStringDescriptor();
}
@@ -2484,8 +2472,7 @@
*/
EXPORT_C TInt DUsbClientController::GetStringDescriptor(DThread* aThread, TUint8 aIndex, TDes8& aString)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_GETSTRINGDESCRIPTOR, "DUsbClientController::GetStringDescriptor(%d)", aIndex);
-
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::GetStringDescriptor(%d)", aIndex));
return iDescriptors.GetStringDescriptorTC(aThread, aIndex, aString);
}
@@ -2504,8 +2491,7 @@
*/
EXPORT_C TInt DUsbClientController::SetStringDescriptor(DThread* aThread, TUint8 aIndex, const TDes8& aString)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_SETSTRINGDESCRIPTOR, "DUsbClientController::SetStringDescriptor(%d)", aIndex);
-
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::SetStringDescriptor(%d)", aIndex));
return iDescriptors.SetStringDescriptorTC(aThread, aIndex, aString);
}
@@ -2518,8 +2504,7 @@
*/
EXPORT_C TInt DUsbClientController::RemoveStringDescriptor(TUint8 aIndex)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_REMOVESTRINGDESCRIPTOR, "DUsbClientController::RemoveStringDescriptor(%d)", aIndex);
-
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::RemoveStringDescriptor(%d)", aIndex));
return iDescriptors.RemoveStringDescriptor(aIndex);
}
@@ -2540,7 +2525,7 @@
EXPORT_C TInt DUsbClientController::AllocateEndpointResource(const DBase* /*aClientId*/, TInt aEndpointNum,
TUsbcEndpointResource aResource)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_ALLOCATEENDPOINTRESOURCE, "DUsbClientController::AllocateEndpointResource()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::AllocateEndpointResource()"));
return AllocateEndpointResource(aEndpointNum, aResource);
}
@@ -2559,7 +2544,7 @@
EXPORT_C TInt DUsbClientController::DeAllocateEndpointResource(const DBase* /*aClientId*/, TInt aEndpointNum,
TUsbcEndpointResource aResource)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_DEALLOCATEENDPOINTRESOURCE, "DUsbClientController::DeAllocateEndpointResource()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::DeAllocateEndpointResource()"));
return DeAllocateEndpointResource(aEndpointNum, aResource);
}
@@ -2579,19 +2564,20 @@
EXPORT_C TBool DUsbClientController::QueryEndpointResource(const DBase* /*aClientId*/, TInt aEndpointNum,
TUsbcEndpointResource aResource)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_QUERYENDPOINTRESOURCE, "DUsbClientController::QueryEndpointResource()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::QueryEndpointResource()"));
return QueryEndpointResource(aEndpointNum, aResource);
}
EXPORT_C TInt DUsbClientController::EndpointPacketSize(const DBase* aClientId, TInt aEndpointNum)
{
- OstTraceDefExt2(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_ENDPOINTPACKETSIZE, "DUsbClientController::EndpointPacketSize(0x%08x, %d)",
- (TUint)aClientId, aEndpointNum);
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::EndpointPacketSize(0x%08x, %d)",
+ aClientId, aEndpointNum));
+
const TUsbcInterfaceSet* const ifcset_ptr = ClientId2InterfacePointer(aClientId);
if (!ifcset_ptr)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_ENDPOINTPACKETSIZE_DUP1, " Error: interface or clientid not found");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: interface or clientid not found"));
return -1;
}
const TUsbcInterface* const ifc_ptr = ifcset_ptr->iInterfaces[ifcset_ptr->iCurrentInterface];
@@ -2602,14 +2588,14 @@
const TUsbcLogicalEndpoint* const ep = ep_array[i];
if (EpAddr2Idx(ep->iPEndpoint->iEndpointAddr) == static_cast<TUint>(aEndpointNum))
{
- OstTraceDefExt2(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_ENDPOINTPACKETSIZE_DUP2, " Endpoint packet sizes: FS = %d HS = %d",
- ep->iEpSize_Fs, ep->iEpSize_Hs);
+ __KTRACE_OPT(KUSB, Kern::Printf(" Endpoint packet sizes: FS = %d HS = %d",
+ ep->iEpSize_Fs, ep->iEpSize_Hs));
const TInt size = iHighSpeed ? ep->iEpSize_Hs : ep->iEpSize_Fs;
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_ENDPOINTPACKETSIZE_DUP3, " Returning %d", size);
+ __KTRACE_OPT(KUSB, Kern::Printf(" Returning %d", size));
return size;
}
}
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_ENDPOINTPACKETSIZE_DUP4, " Error: endpoint not found");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: endpoint not found"));
return -1;
}
@@ -2620,7 +2606,7 @@
EXPORT_C TBool DUsbClientController::CurrentlyUsingHighSpeed()
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_CURRENTLYUSINGHIGHSPEED, "DUsbClientController::CurrentlyUsingHighSpeed()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::CurrentlyUsingHighSpeed()"));
return EFalse;
}
@@ -2640,10 +2626,10 @@
*/
DUsbClientController* DUsbClientController::RegisterUdc(TInt aUdc)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_REGISTERUDC, "DUsbClientController::RegisterUdc()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::RegisterUdc()"));
if (aUdc < 0 || aUdc > (KUsbcMaxUdcs - 1))
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_REGISTERUDC_DUP1, " Error: aUdc out of range (%d)", aUdc);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: aUdc out of range (%d)", aUdc));
return NULL;
}
return UsbClientController[aUdc] = this;
@@ -2726,7 +2712,7 @@
TUsbcStringDescriptor* aConfig,
TUsbcOtgDescriptor* aOtgDesc)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_INITIALISEBASECLASS, "DUsbClientController::InitialiseBaseClass()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::InitialiseBaseClass()"));
// We don't want the host to see us (at least not yet):
UsbDisconnect();
@@ -2734,7 +2720,7 @@
if (iDescriptors.Init(aDeviceDesc, aConfigDesc, aLangId, aManufacturer, aProduct,
aSerialNum, aConfig, aOtgDesc) != KErrNone)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_INITIALISEBASECLASS_DUP1, " Error: Descriptor initialization failed");
+ __KTRACE_OPT(KUSB, Kern::Printf(" Error: Descriptor initialization failed"));
return EFalse;
}
@@ -2775,27 +2761,27 @@
// Initialise the array of physical endpoints
iDeviceTotalEndpoints = DeviceTotalEndpoints();
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_INITIALISEBASECLASS_DUP2, " DeviceTotalEndpoints: %d", iDeviceTotalEndpoints);
+ __KTRACE_OPT(KUSB, Kern::Printf(" DeviceTotalEndpoints: %d", iDeviceTotalEndpoints));
// KUsbcMaxEndpoints doesn't include ep 0
if ((iDeviceTotalEndpoints > (KUsbcMaxEndpoints + 2)) ||
((iDeviceTotalEndpoints * sizeof(TUsbcPhysicalEndpoint)) > sizeof(iRealEndpoints)))
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_INITIALISEBASECLASS_DUP3, " Error: too many endpoints! (change KUsbcMaxEndpoints: %d)",
- KUsbcMaxEndpoints);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: too many endpoints! (change KUsbcMaxEndpoints: %d)",
+ KUsbcMaxEndpoints));
goto exit_1;
}
caps = DeviceEndpointCaps();
for (TInt i = 0; i < iDeviceTotalEndpoints; ++i)
{
iRealEndpoints[i].iEndpointAddr = EpIdx2Addr(i);
- OstTraceDefExt3(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_INITIALISEBASECLASS_DUP4, " Caps[%02d] - iTypes: 0x%08x iSizes: 0x%08x",
- i, caps[i].iTypesAndDir, caps[i].iSizes);
+ __KTRACE_OPT(KUSB, Kern::Printf(" Caps[%02d] - iTypes: 0x%08x iSizes: 0x%08x",
+ i, caps[i].iTypesAndDir, caps[i].iSizes));
iRealEndpoints[i].iCaps = caps[i];
iRealEndpoints[i].iCaps.iReserved[0] = 0;
iRealEndpoints[i].iCaps.iReserved[1] = 0;
if ((i > 1) && (caps[i].iTypesAndDir != KUsbEpNotAvailable))
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_INITIALISEBASECLASS_DUP5, " --> UsableEndpoint: #%d", i);
+ __KTRACE_OPT(KUSB, Kern::Printf(" --> UsableEndpoint: #%d", i));
iDeviceUsableEndpoints++;
}
}
@@ -2804,14 +2790,14 @@
// and virtual 0 is real 0):
// -- Ep0 OUT
iEp0MaxPacketSize = caps[0].MaxPacketSize();
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_INITIALISEBASECLASS_DUP6, " using Ep0 maxpacketsize of %d bytes", iEp0MaxPacketSize);
+ __KTRACE_OPT(KUSB, Kern::Printf(" using Ep0 maxpacketsize of %d bytes", iEp0MaxPacketSize));
info.iSize = iEp0MaxPacketSize;
ep = new TUsbcLogicalEndpoint(this, 0, info, NULL, &iRealEndpoints[KEp0_Out]);
if (!ep)
{
goto exit_1;
}
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_INITIALISEBASECLASS_DUP7, " creating ep: mapping real ep %d --> logical ep 0", KEp0_Out);
+ __KTRACE_OPT(KUSB, Kern::Printf(" creating ep: mapping real ep %d --> logical ep 0", KEp0_Out));
iRealEndpoints[KEp0_Out].iLEndpoint = ep;
// -- Ep0 IN
info.iDir = KUsbEpDirIn;
@@ -2820,7 +2806,7 @@
{
goto exit_2;
}
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_INITIALISEBASECLASS_DUP8, " creating ep: mapping real ep %d --> logical ep 0", KEp0_In);
+ __KTRACE_OPT(KUSB, Kern::Printf(" creating ep: mapping real ep %d --> logical ep 0", KEp0_In));
iRealEndpoints[KEp0_In].iLEndpoint = ep;
// Create the power handler
@@ -2838,7 +2824,7 @@
// There shouldn't really be any PSL that doesn't support Device State
// tracking, but we cannot simply enforce it as we have to preserve
// backwards compatibility.
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_INITIALISEBASECLASS_DUP9, " Warning: USB Device State tracking not supported by PSL");
+ __KTRACE_OPT(KUSB, Kern::Printf(" Warning: USB Device State tracking not supported by PSL"));
}
return ETrue;
@@ -2915,7 +2901,7 @@
iDisablePullUpOnDPlus(NULL),
iOtgContext(NULL)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_DUSBCLIENTCONTROLLER_CONS, "DUsbClientController::DUsbClientController()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::DUsbClientController()"));
#ifndef SEPARATE_USB_DFC_QUEUE
iPowerUpDfc.SetDfcQ(Kern::DfcQue0());
@@ -2941,7 +2927,7 @@
*/
TInt DUsbClientController::DeviceEventNotification(TUsbcDeviceEvent anEvent)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_DEVICEEVENTNOTIFICATION, "DUsbClientController::DeviceEventNotification()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::DeviceEventNotification()"));
// This function may be called by the PSL from within an ISR -- so we have
// to take care what we do here (and also in all functions that get called
@@ -2975,8 +2961,8 @@
*/
void DUsbClientController::EndpointRequestComplete(TUsbcRequestCallback* aCallback)
{
- OstTraceDefExt1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_ENDPOINTREQUESTCOMPLETE, "DUsbClientController::EndpointRequestComplete(%p)", aCallback);
-
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::EndpointRequestComplete(%p)", aCallback));
+
// This function may be called by the PSL from within an ISR -- so we have
// to take care what we do here (and also in all functions that get called
// from here).
@@ -3009,17 +2995,16 @@
// This function is called by the PSL from within an ISR -- so we have to take care what we do here
// (and also in all functions that get called from here).
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_HANDLEHNPREQUEST, "DUsbClientController::HandleHnpRequest(%d)", aHnpState);
-
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::HandleHnpRequest(%d)", aHnpState));
if (!iOtgSupport)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_HANDLEHNPREQUEST_DUP1, " Error: Request only supported on a OTG device");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Request only supported on a OTG device"));
return;
}
if (!(iOtgFuncMap & KUsbOtgAttr_HnpSupp))
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_HANDLEHNPREQUEST_DUP2, " Error: Request only valid if OTG device supports HNP");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Request only valid if OTG device supports HNP"));
return;
}
// (case KUsbFeature_B_HnpEnable:)
@@ -3059,8 +3044,8 @@
*/
TInt DUsbClientController::Ep0RequestComplete(TInt aRealEndpoint, TInt aCount, TInt aError)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_EP0REQUESTCOMPLETE, "DUsbClientController::Ep0RequestComplete(%d)", aRealEndpoint);
-
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::Ep0RequestComplete(%d)", aRealEndpoint));
+
// This function may be called by the PSL from within an ISR -- so we have
// to take care what we do here (and also in all functions that get called
// from here).
@@ -3068,17 +3053,16 @@
__ASSERT_DEBUG((aRealEndpoint < 2), Kern::Fault(KUsbPILPanicCat, __LINE__));
if (aError != KErrNone && aError != KErrPrematureEnd)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_EP0REQUESTCOMPLETE_DUP1, " Error: Ep0 request failed (code %d). "
- "Setting up new Read request.", aError);
-
+ __KTRACE_OPT(KUSB, Kern::Printf(" Error: Ep0 request failed (code %d). "
+ "Setting up new Read request.", aError));
if (aRealEndpoint == KEp0_Rx)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_EP0REQUESTCOMPLETE_DUP2, " (RX request failed)");
+ __KTRACE_OPT(KUSB, Kern::Printf(" (RX request failed)"));
StallEndpoint(KEp0_Out);
}
else
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_EP0REQUESTCOMPLETE_DUP3, " (TX request failed)");
+ __KTRACE_OPT(KUSB, Kern::Printf(" (TX request failed)"));
iEp0WritePending = EFalse;
StallEndpoint(KEp0_In);
}
@@ -3106,7 +3090,7 @@
{
// we're done & no write request has been set up.
// so: setup an Ep0 read again
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_EP0REQUESTCOMPLETE_DUP4, " Setting up new Ep0 read request.");
+ __KTRACE_OPT(KUSB, Kern::Printf(" Setting up new Ep0 read request."));
SetupEndpointZeroRead();
}
return r;
@@ -3119,7 +3103,7 @@
*/
void DUsbClientController::MoveToAddressState()
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_MOVETOADDRESSSTATE, "DUsbClientController::MoveToAddressState()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::MoveToAddressState()"));
// This function may be called by the PSL from within an ISR -- so we have
// to take care what we do here (and also in all functions that get called
@@ -3140,8 +3124,8 @@
*/
void DUsbClientController::SetCurrent(TInt aCurrent)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_SETCURRENT, "DUsbClientController::SetCurrent(%d)", aCurrent);
-
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::SetCurrent(%d)", aCurrent));
+
// Not much for the moment... (What should we do here?)
return;
}
@@ -3153,21 +3137,20 @@
TInt DUsbClientController::OpenDmaChannel(TInt aRealEndpoint)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_OPENDMACHANNEL, "DUsbClientController::OpenDmaChannel(%d)", aRealEndpoint);
-
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::OpenDmaChannel(%d)", aRealEndpoint));
return KErrNone;
}
void DUsbClientController::CloseDmaChannel(TInt aRealEndpoint)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_CLOSEDMACHANNEL, "DUsbClientController::CloseDmaChannel(%d)", aRealEndpoint);
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::CloseDmaChannel(%d)", aRealEndpoint));
}
TBool DUsbClientController::CableDetectWithoutPowerCaps() const
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_CABLEDETECTWITHOUTPOWERCAPS, "DUsbClientController::CableDetectWithoutPowerCaps()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::CableDetectWithoutPowerCaps()"));
// Should be overridden in PSL if applicable.
return EFalse;
}
@@ -3175,7 +3158,7 @@
TBool DUsbClientController::DeviceHighSpeedCaps() const
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_DEVICEHIGHSPEEDCAPS, "DUsbClientController::DeviceHighSpeedCaps()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::DeviceHighSpeedCaps()"));
// Should be overridden in PSL if applicable.
return EFalse;
}
@@ -3183,7 +3166,7 @@
TBool DUsbClientController::DeviceResourceAllocV2Caps() const
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_DEVICERESOURCEALLOCV2CAPS, "DUsbClientController::DeviceResourceAllocV2Caps()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::DeviceResourceAllocV2Caps()"));
// Should be overridden in PSL if applicable.
return EFalse;
}
@@ -3191,7 +3174,7 @@
TBool DUsbClientController::DeviceHnpHandledByHardwareCaps() const
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_DEVICEHNPHANDLEDBYHARDWARECAPS, "DUsbClientController::DeviceHnpHandledByHardwareCaps()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::DeviceHnpHandledByHardwareCaps()"));
// Should be overridden in PSL if applicable.
return EFalse;
}
@@ -3199,8 +3182,7 @@
TInt DUsbClientController::EnterTestMode(TInt aTestSelector)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_ENTERTESTMODE, "DUsbClientController::EnterTestMode(%d)", aTestSelector);
-
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::EnterTestMode(%d)", aTestSelector));
// Should be overridden in PSL if applicable.
return KErrNotSupported;
}
@@ -3208,35 +3190,35 @@
TBool DUsbClientController::PowerDownWhenActive() const
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_POWERDOWNWHENACTIVE, "DUsbClientController::PowerDownWhenActive()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::PowerDownWhenActive()"));
return EFalse;
}
TInt DUsbClientController::PowerDown()
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_POWERDOWN, "DUsbClientController::PowerDown()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::PowerDown()"));
return KErrNone;
}
TInt DUsbClientController::PowerUp()
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_POWERUP, "DUsbClientController::PowerUp()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::PowerUp()"));
return KErrNone;
}
TInt DUsbClientController::OtgEnableUdc()
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_OTGENABLEUDC, "DUsbClientController::OtgEnableUdc()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::OtgEnableUdc()"));
return KErrNone;
}
TInt DUsbClientController::OtgDisableUdc()
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_OTGDISABLEUDC, "DUsbClientController::OtgDisableUdc()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::OtgDisableUdc()"));
return KErrNone;
}
@@ -3247,18 +3229,18 @@
TInt DUsbClientController::DeRegisterClientCallback(const DBase* aClientId)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_DEREGISTERCLIENTCALLBACK, "DUsbClientController::DeRegisterClientCallback()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::DeRegisterClientCallback()"));
__ASSERT_DEBUG((aClientId != NULL), Kern::Fault(KUsbPILPanicCat, __LINE__));
TSglQueIter<TUsbcClientCallback> iter(iClientCallbacks);
TUsbcClientCallback* p;
while ((p = iter++) != NULL)
if (p->Owner() == aClientId)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_DEREGISTERCLIENTCALLBACK_DUP1, " removing ClientCallback @ 0x%x", p);
+ __KTRACE_OPT(KUSB, Kern::Printf(" removing ClientCallback @ 0x%x", p));
iClientCallbacks.Remove(*p);
return KErrNone;
}
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_DEREGISTERCLIENTCALLBACK_DUP2, " Client not found");
+ __KTRACE_OPT(KUSB, Kern::Printf(" Client not found"));
return KErrNotFound;
}
@@ -3267,28 +3249,28 @@
const TUsbcEndpointInfoArray& aEndpointData,
TInt aIfcNumber) const
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_CHECKEPAVAILABILITY, "DUsbClientController::CheckEpAvailability()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::CheckEpAvailability()"));
if (aEndpointsUsed > KMaxEndpointsPerClient)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_CHECKEPAVAILABILITY_DUP1, " Error: too many endpoints claimed (%d)", aEndpointsUsed);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: too many endpoints claimed (%d)", aEndpointsUsed));
return EFalse;
}
TBool reserve[KUsbcEpArraySize]; // iDeviceTotalEndpoints can be equal to 32
memset(reserve, EFalse, sizeof(reserve)); // reset the array
for (TInt i = 0; i < aEndpointsUsed; ++i)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_CHECKEPAVAILABILITY_DUP2, " checking for (user) endpoint #%d availability...", i + 1);
+ __KTRACE_OPT(KUSB, Kern::Printf(" checking for (user) endpoint #%d availability...", i + 1));
TInt j = 2;
while (j < iDeviceTotalEndpoints)
{
if ((iRealEndpoints[j].EndpointSuitable(&aEndpointData[i], aIfcNumber)) &&
(reserve[j] == EFalse))
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_CHECKEPAVAILABILITY_DUP3, " ---> found suitable endpoint: RealEndpoint #%d", j);
+ __KTRACE_OPT(KUSB, Kern::Printf(" ---> found suitable endpoint: RealEndpoint #%d", j));
reserve[j] = ETrue; // found one: mark this ep as reserved
break;
}
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_CHECKEPAVAILABILITY_DUP4, " -> endpoint not suitable: RealEndpoint #%d", j);
+ __KTRACE_OPT(KUSB, Kern::Printf(" -> endpoint not suitable: RealEndpoint #%d", j));
j++;
}
if (j == iDeviceTotalEndpoints)
@@ -3305,8 +3287,7 @@
// concurrent interfaces supported by the configuration." But since we permit the user to
// change interface numbers, we can neither assume nor enforce anything about them here.
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_CREATEINTERFACE, "DUsbClientController::CreateInterface(x, aIfc=%d)", aIfc);
-
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::CreateInterface(x, aIfc=%d)", aIfc));
TUsbcInterfaceSet* ifcset_ptr = NULL;
TInt ifcset = ClientId2InterfaceNumber(aClientId);
TBool new_ifc;
@@ -3317,7 +3298,7 @@
const TInt num_ifcsets = iConfigs[0]->iInterfaceSets.Count();
if (num_ifcsets == 255)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_CREATEINTERFACE_DUP1, " Error: Too many interfaces already exist: 255");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Too many interfaces already exist: 255"));
return NULL;
}
// Find the smallest interface number that has not yet been used.
@@ -3328,7 +3309,7 @@
{
if ((iConfigs[0]->iInterfaceSets[i]->iInterfaceNumber) == ifcset)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_CREATEINTERFACE_DUP2, " interface number %d already used", ifcset);
+ __KTRACE_OPT(KUSB, Kern::Printf(" interface number %d already used", ifcset));
n_used = ETrue;
break;
}
@@ -3340,19 +3321,20 @@
}
if (ifcset == 256)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_CREATEINTERFACE_DUP3, " Error: no available interface number found");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: no available interface number found"));
return NULL;
}
// append the ifcset
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_CREATEINTERFACE_DUP4, " creating new InterfaceSet %d first", ifcset);
+ __KTRACE_OPT(KUSB, Kern::Printf(" creating new InterfaceSet %d first", ifcset));
if (aIfc != 0)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_CREATEINTERFACE_DUP5, " Error: invalid interface setting number (1): %d", aIfc);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: invalid interface setting number (1): %d", aIfc));
return NULL;
}
if ((ifcset_ptr = new TUsbcInterfaceSet(aClientId, ifcset)) == NULL)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_CREATEINTERFACE_DUP6, " Error: new TUsbcInterfaceSet(aClientId, ifcset_num) failed");
+ __KTRACE_OPT(KPANIC,
+ Kern::Printf(" Error: new TUsbcInterfaceSet(aClientId, ifcset_num) failed"));
return NULL;
}
iConfigs[0]->iInterfaceSets.Append(ifcset_ptr);
@@ -3361,20 +3343,20 @@
{
// use an existent ifcset
new_ifc = EFalse;
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_CREATEINTERFACE_DUP7, " using existing InterfaceSet %d", ifcset);
+ __KTRACE_OPT(KUSB, Kern::Printf(" using existing InterfaceSet %d", ifcset));
ifcset_ptr = InterfaceNumber2InterfacePointer(ifcset);
if (aIfc != ifcset_ptr->iInterfaces.Count())
{
// 9.2.3: "Alternate settings range from zero to one less than the number of alternate
// settings for a specific interface." (Thus we can here only append a setting.)
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_CREATEINTERFACE_DUP8, " Error: invalid interface setting number (2): %d", aIfc);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: invalid interface setting number (2): %d", aIfc));
return NULL;
}
// Check whether the existing interface belongs indeed to this client
if (ifcset_ptr->iClientId != aClientId)
{
- OstTraceDefExt2(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_CREATEINTERFACE_DUP9, " Error: iClientId (%p) != aClientId (%p)",
- ifcset_ptr->iClientId, aClientId);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: iClientId (%p) != aClientId (%p)",
+ ifcset_ptr->iClientId, aClientId));
return NULL;
}
}
@@ -3382,7 +3364,7 @@
TUsbcInterface* const ifc_ptr = new TUsbcInterface(ifcset_ptr, aIfc, no_ep0_requests);
if (!ifc_ptr)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_CREATEINTERFACE_DUP10, " Error: new TUsbcInterface(ifcset, aIfc) failed");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: new TUsbcInterface(ifcset, aIfc) failed"));
if (new_ifc)
{
DeleteInterfaceSet(ifcset);
@@ -3405,7 +3387,7 @@
const TUsbcEndpointInfoArray& aEndpointData,
TInt aRealEpNumbers[])
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_CREATEENDPOINTS, "DUsbClientController::CreateEndpoints()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::CreateEndpoints()"));
const TInt ifc_num = aIfc->iInterfaceSet->iInterfaceNumber;
const TInt start_ep = 2;
for (TInt i = 0; i < aEndpointsUsed; ++i)
@@ -3419,7 +3401,7 @@
aIfc, &iRealEndpoints[j]);
if (!ep)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_CREATEENDPOINTS_DUP1, " Error: new TUsbcLogicalEndpoint() failed");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: new TUsbcLogicalEndpoint() failed"));
aIfc->iEndpoints.ResetAndDestroy();
RESET_SETTINGRESERVE;
return KErrNoMemory;
@@ -3431,16 +3413,16 @@
// For details see last paragraph of 5.7.3 "Interrupt Transfer Packet Size Constraints".
if ((ep->iInfo.iType == KUsbEpTypeInterrupt) && (ep->iEpSize_Hs > 64))
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_CREATEENDPOINTS_DUP2, " Warning: INT ep HS size = %d on default ifc setting",
- ep->iEpSize_Hs);
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_CREATEENDPOINTS_DUP3, " (should be <= 64)");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Warning: INT ep HS size = %d on default ifc setting",
+ ep->iEpSize_Hs));
+ __KTRACE_OPT(KPANIC, Kern::Printf(" (should be <= 64)"));
}
// For details see last paragraph of 5.6.3 "Isochronous Transfer Packet Size Constraints".
else if ((ep->iInfo.iType == KUsbEpTypeIsochronous) && (ep->iInfo.iSize > 0))
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_CREATEENDPOINTS_DUP4, " Warning: ISO ep size = %d on default ifc setting",
- ep->iInfo.iSize);
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_CREATEENDPOINTS_DUP5, " (should be zero or ep non-existent)");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Warning: ISO ep size = %d on default ifc setting",
+ ep->iInfo.iSize));
+ __KTRACE_OPT(KPANIC, Kern::Printf(" (should be zero or ep non-existent)"));
}
}
// If the endpoint doesn't support DMA (now or never) the next operation
@@ -3448,21 +3430,23 @@
const TInt r = OpenDmaChannel(j);
if (r != KErrNone)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_CREATEENDPOINTS_DUP6, " Error: Opening of DMA channel failed");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Opening of DMA channel failed"));
aIfc->iEndpoints.ResetAndDestroy();
RESET_SETTINGRESERVE;
return r;
}
- OstTraceDefExt2(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_CREATEENDPOINTS_DUP7, " creating ep: mapping real ep %d -> logical ep %d",
- j, i + 1);
+ __KTRACE_OPT(KUSB, Kern::Printf(" creating ep: mapping real ep %d -> logical ep %d",
+ j, i + 1));
iRealEndpoints[j].iIfcNumber = &aIfc->iInterfaceSet->iInterfaceNumber;
iRealEndpoints[j].iSettingReserve = ETrue;
- OstTraceDefExt4(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_CREATEENDPOINTS_DUP8, " ep->iInfo: iType=0x%x iDir=0x%x iSize=%d iInterval=%d",
- ep->iInfo.iType, ep->iInfo.iDir, ep->iInfo.iSize,
- ep->iInfo.iInterval);
- OstTraceDefExt3(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_CREATEENDPOINTS_DUP9, " ep->iInfo: iInterval_Hs=%d iTransactions=%d iExtra=%d",
- ep->iInfo.iInterval_Hs, ep->iInfo.iTransactions,
- ep->iInfo.iExtra);
+ __KTRACE_OPT(KUSB,
+ Kern::Printf(" ep->iInfo: iType=0x%x iDir=0x%x iSize=%d iInterval=%d",
+ ep->iInfo.iType, ep->iInfo.iDir, ep->iInfo.iSize,
+ ep->iInfo.iInterval));
+ __KTRACE_OPT(KUSB,
+ Kern::Printf(" ep->iInfo: iInterval_Hs=%d iTransactions=%d iExtra=%d",
+ ep->iInfo.iInterval_Hs, ep->iInfo.iTransactions,
+ ep->iInfo.iExtra));
// Store real endpoint numbers:
// array[x] holds the number for logical ep x.
aRealEpNumbers[i + 1] = j;
@@ -3471,12 +3455,12 @@
}
}
aRealEpNumbers[0] = 0; // ep0: 0.
- OstTraceDefExt2(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_CREATEENDPOINTS_DUP10, " Endpoint Mapping for Interface %d / Setting %d:", ifc_num, aIfc->iSettingCode);
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_CREATEENDPOINTS_DUP11, "Logical | Real");
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_CREATEENDPOINTS_DUP12, "Endpoint | Endpoint");
- for (TInt ep = 0; ep <= aEndpointsUsed; ++ep)
- OstTraceDefExt2(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_CREATEENDPOINTS_DUP13, " %2d %3d",ep, aRealEpNumbers[ep]);
-
+ __KTRACE_OPT(KUSB,{
+ Kern::Printf(" Endpoint Mapping for Interface %d / Setting %d:", ifc_num, aIfc->iSettingCode);
+ Kern::Printf("Logical | Real");
+ Kern::Printf("Endpoint | Endpoint");
+ for (TInt ep = 0; ep <= aEndpointsUsed; ++ep) Kern::Printf(" %2d %3d",ep, aRealEpNumbers[ep]);
+ });
RESET_SETTINGRESERVE;
return KErrNone;
}
@@ -3485,7 +3469,7 @@
TInt DUsbClientController::SetupIfcDescriptor(TUsbcInterface* aIfc, TUsbcClassInfo& aClass, DThread* aThread,
TDesC8* aString, const TUsbcEndpointInfoArray& aEndpointData)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_SETUPIFCDESCRIPTOR, "DUsbClientController::SetupIfcDescriptor()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::SetupIfcDescriptor()"));
// Interface descriptor
TUsbcDescriptorBase* d = TUsbcInterfaceDescriptor::New(aIfc->iInterfaceSet->iInterfaceNumber,
@@ -3494,7 +3478,7 @@
aClass);
if (!d)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETUPIFCDESCRIPTOR_DUP1, " Error: Memory allocation for ifc desc failed." );
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Memory allocation for ifc desc failed."));
return KErrNoMemory;
}
iDescriptors.InsertDescriptor(d);
@@ -3506,13 +3490,13 @@
TUint strlen = Kern::ThreadGetDesLength(aThread, aString);
if (strlen > KUsbStringDescStringMaxSize)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETUPIFCDESCRIPTOR_DUP2, " Warning: $ descriptor too long - string will be truncated" );
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Warning: $ descriptor too long - string will be truncated"));
strlen = KUsbStringDescStringMaxSize;
}
HBuf8* const stringbuf = HBuf8::New(strlen);
if (!stringbuf)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETUPIFCDESCRIPTOR_DUP3, " Error: Memory allocation for ifc $ desc string failed." );
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Memory allocation for ifc $ desc string failed."));
iDescriptors.DeleteIfcDescriptor(aIfc->iInterfaceSet->iInterfaceNumber,
aIfc->iSettingCode);
return KErrNoMemory;
@@ -3522,7 +3506,7 @@
TInt r = Kern::ThreadDesRead(aThread, aString, *stringbuf, 0);
if (r != KErrNone)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETUPIFCDESCRIPTOR_DUP4, " Error: Thread read error" );
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Thread read error"));
iDescriptors.DeleteIfcDescriptor(aIfc->iInterfaceSet->iInterfaceNumber,
aIfc->iSettingCode);
delete stringbuf;
@@ -3531,7 +3515,7 @@
TUsbcStringDescriptor* const sd = TUsbcStringDescriptor::New(*stringbuf);
if (!sd)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETUPIFCDESCRIPTOR_DUP5, " Error: Memory allocation for ifc $ desc failed." );
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Memory allocation for ifc $ desc failed."));
iDescriptors.DeleteIfcDescriptor(aIfc->iInterfaceSet->iInterfaceNumber,
aIfc->iSettingCode);
delete stringbuf;
@@ -3555,8 +3539,8 @@
if (aEndpointData[i].iExtra != 2)
{
// ...then it must be a Audio Class endpoint descriptor. Else...
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETUPIFCDESCRIPTOR_DUP6, " Error: EP desc extension > 2 bytes (%d)",
- aEndpointData[i].iExtra);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: EP desc extension > 2 bytes (%d)",
+ aEndpointData[i].iExtra));
iDescriptors.DeleteIfcDescriptor(aIfc->iInterfaceSet->iInterfaceNumber,
aIfc->iSettingCode);
return KErrArgument;
@@ -3571,7 +3555,7 @@
}
if (!d)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_SETUPIFCDESCRIPTOR_DUP7, " Error: Memory allocation for ep desc #%d failed.", i);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Memory allocation for ep desc #%d failed.", i));
iDescriptors.DeleteIfcDescriptor(aIfc->iInterfaceSet->iInterfaceNumber,
aIfc->iSettingCode);
return KErrNoMemory;
@@ -3637,23 +3621,23 @@
TInt DUsbClientController::ActivateHardwareController()
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_ACTIVATEHARDWARECONTROLLER, "DUsbClientController::ActivateHardwareController()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::ActivateHardwareController()"));
if (iHardwareActivated)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_ACTIVATEHARDWARECONTROLLER_DUP1, " already active -> returning" );
+ __KTRACE_OPT(KUSB, Kern::Printf(" already active -> returning"));
return KErrNone;
}
// Initialise HW
TInt r = StartUdc();
if (r != KErrNone)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_ACTIVATEHARDWARECONTROLLER_DUP2, " Error: StartUdc() failed" );
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: StartUdc() failed"));
return KErrHardwareNotAvailable;
}
r = OtgEnableUdc(); // turn on UDC (OTG flavour)
if (r != KErrNone)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_ACTIVATEHARDWARECONTROLLER_DUP3, " Error: OtgEnableUdc() failed: %d", r);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: OtgEnableUdc() failed: %d", r));
}
iHardwareActivated = ETrue;
@@ -3674,7 +3658,7 @@
ConfigureEndpoint(1, ep0_1->iInfo);
iEp0MaxPacketSize = ep0_0->iInfo.iSize;
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_ACTIVATEHARDWARECONTROLLER_DUP4, " Controller activated.");
+ __KTRACE_OPT(KUSB, Kern::Printf(" Controller activated."));
if (UsbConnectionStatus())
{
if (iDeviceState == EUsbcDeviceStateUndefined)
@@ -3689,10 +3673,10 @@
void DUsbClientController::DeActivateHardwareController()
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_DEACTIVATEHARDWARECONTROLLER, "DUsbClientController::DeActivateHardwareController()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::DeActivateHardwareController()"));
if (!iHardwareActivated)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_DEACTIVATEHARDWARECONTROLLER_DUP1, " not active -> returning" );
+ __KTRACE_OPT(KUSB, Kern::Printf(" not active -> returning"));
return;
}
// Deconfigure & disable endpoint zero
@@ -3702,11 +3686,11 @@
TInt r = OtgDisableUdc(); // turn off UDC (OTG flavour)
if (r != KErrNone)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_DEACTIVATEHARDWARECONTROLLER_DUP2, " Error: OtgDisableUdc() failed: %d", r);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: OtgDisableUdc() failed: %d", r));
}
StopUdc();
iHardwareActivated = EFalse;
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_DEACTIVATEHARDWARECONTROLLER_DUP3, " Controller deactivated.");
+ __KTRACE_OPT(KUSB, Kern::Printf(" Controller deactivated."));
if (UsbConnectionStatus())
{
NextDeviceState(EUsbcDeviceStateAttached);
@@ -3717,18 +3701,17 @@
void DUsbClientController::DeleteInterfaceSet(TInt aIfcSet)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_DELETEINTERFACESET, "DUsbClientController::DeleteInterfaceSet(%d)", aIfcSet);
-
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::DeleteInterfaceSet(%d)", aIfcSet));
TUsbcInterfaceSet* const ifcset_ptr = InterfaceNumber2InterfacePointer(aIfcSet);
if (!ifcset_ptr)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_DELETEINTERFACESET_DUP1, " Error: invalid interface number: %d", aIfcSet);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: invalid interface number: %d", aIfcSet));
return;
}
const TInt idx = iConfigs[0]->iInterfaceSets.Find(ifcset_ptr);
if (idx == KErrNotFound)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_DELETEINTERFACESET_DUP2, " Error: interface not found in array");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: interface not found in array"));
return;
}
//Add this mutex to protect the interface set data structure
@@ -3748,17 +3731,16 @@
void DUsbClientController::DeleteInterface(TInt aIfcSet, TInt aIfc)
{
- OstTraceDefExt2(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_DELETEINTERFACE, "DUsbClientController::DeleteInterface(%d, %d)", aIfcSet, aIfc);
-
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::DeleteInterface(%d, %d)", aIfcSet, aIfc));
TUsbcInterfaceSet* const ifcset_ptr = InterfaceNumber2InterfacePointer(aIfcSet);
if (!ifcset_ptr)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_DELETEINTERFACE_DUP1, " Error: invalid interface number: %d", aIfcSet);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: invalid interface number: %d", aIfcSet));
return;
}
if (ifcset_ptr->iInterfaces.Count() <= aIfc)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_DELETEINTERFACE_DUP2, " Error: invalid interface setting: %d", aIfc);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: invalid interface setting: %d", aIfc));
return;
}
//Add this mutex to protect the interface set data structure
@@ -3772,7 +3754,7 @@
if (aIfc == ifcset_ptr->iCurrentInterface)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_DELETEINTERFACE_DUP3, " > Warning: deleting current interface setting");
+ __KTRACE_OPT(KUSB, Kern::Printf(" > Warning: deleting current interface setting"));
ifcset_ptr->iCurrentInterface = 0;
}
if (NKern::CurrentContext() == EThread)
@@ -3785,9 +3767,8 @@
void DUsbClientController::CancelTransferRequests(TInt aRealEndpoint)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_CANCELTRANSFERREQUESTS, "DUsbClientController::CancelTransferRequests(aRealEndpoint=%d)",
- aRealEndpoint);
-
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::CancelTransferRequests(aRealEndpoint=%d)",
+ aRealEndpoint));
const DBase* const clientId = PEndpoint2ClientId(aRealEndpoint);
if (EpIdx2Addr(aRealEndpoint) & KUsbEpAddress_In)
{
@@ -3803,7 +3784,7 @@
void DUsbClientController::DeleteRequestCallback(const DBase* aClientId, TInt aEndpointNum,
TTransferDirection aTransferDir)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_DELETEREQUESTCALLBACK, "DUsbClientController::DeleteRequestCallback()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::DeleteRequestCallback()"));
// Ep0 OUT
if (aEndpointNum == 0)
{
@@ -3816,7 +3797,7 @@
{
__ASSERT_DEBUG((p->iRealEpNum == 0), Kern::Fault(KUsbPILPanicCat, __LINE__));
__ASSERT_DEBUG((p->iTransferDir == EControllerRead), Kern::Fault(KUsbPILPanicCat, __LINE__));
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_DELETEREQUESTCALLBACK_DUP1, " removing RequestCallback @ 0x%x (ep0)", p);
+ __KTRACE_OPT(KUSB, Kern::Printf(" removing RequestCallback @ 0x%x (ep0)", p));
iEp0ReadRequestCallbacks.Remove(*p);
}
}
@@ -3829,7 +3810,7 @@
{
__ASSERT_DEBUG((p->Owner() == aClientId), Kern::Fault(KUsbPILPanicCat, __LINE__));
__ASSERT_DEBUG((p->iTransferDir == aTransferDir), Kern::Fault(KUsbPILPanicCat, __LINE__));
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_DELETEREQUESTCALLBACK_DUP2, " removing RequestCallback @ 0x%x", p);
+ __KTRACE_OPT(KUSB, Kern::Printf(" removing RequestCallback @ 0x%x", p));
iRequestCallbacks[aEndpointNum] = NULL;
}
}
@@ -3838,7 +3819,7 @@
void DUsbClientController::DeleteRequestCallbacks(const DBase* aClientId)
{
// aClientId being NULL means: delete all requests for *all* clients.
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_DELETEREQUESTCALLBACKS, "DUsbClientController::DeleteRequestCallbacks()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::DeleteRequestCallbacks()"));
// Ep0 OUT
const TInt irq = __SPIN_LOCK_IRQSAVE(iUsbLock);
TSglQueIter<TUsbcRequestCallback> iter(iEp0ReadRequestCallbacks);
@@ -3847,7 +3828,7 @@
{
if (!aClientId || p->Owner() == aClientId)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_DELETEREQUESTCALLBACKS_DUP1, " removing RequestCallback @ 0x%x (ep0)", p);
+ __KTRACE_OPT(KUSB, Kern::Printf(" removing RequestCallback @ 0x%x (ep0)", p));
iEp0ReadRequestCallbacks.Remove(*p);
}
}
@@ -3858,7 +3839,7 @@
TUsbcRequestCallback* const p = iRequestCallbacks[i];
if (p && (!aClientId || p->Owner() == aClientId))
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_DELETEREQUESTCALLBACKS_DUP2, " removing RequestCallback @ 0x%x", p);
+ __KTRACE_OPT(KUSB, Kern::Printf(" removing RequestCallback @ 0x%x", p));
iRequestCallbacks[i] = NULL;
}
}
@@ -3867,7 +3848,7 @@
void DUsbClientController::StatusNotify(TUsbcDeviceState aState, const DBase* aClientId)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_STATUSNOTIFY, "DUsbClientController::StatusNotify()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::StatusNotify()"));
// This function may be called by the PSL (via chapter9.cpp) from within an
// ISR -- so we have to take care what we do here (and also in all
@@ -3879,7 +3860,7 @@
{
if (!aClientId || aClientId == p->Owner())
{
- OstTraceDefExt2(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_STATUSNOTIFY_DUP1, " notifying LDD @ 0x%x about %d", (TUint)p->Owner(), (TUint)aState);
+ __KTRACE_OPT(KUSB, Kern::Printf(" notifying LDD @ 0x%x about %d", p->Owner(), aState));
p->SetState(aState);
p->DoCallback();
}
@@ -3889,7 +3870,7 @@
void DUsbClientController::EpStatusNotify(TInt aRealEndpoint)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_EPSTATUSNOTIFY, "DUsbClientController::EpStatusNotify()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::EpStatusNotify()"));
// This function may be called by the PSL (via chapter9.cpp) from within an
// ISR -- so we have to take care what we do here (and also in all
@@ -3898,7 +3879,7 @@
const DBase* const client_id = PEndpoint2ClientId(aRealEndpoint);
if (!client_id)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_EPSTATUSNOTIFY_DUP1, " Error: Client not found for real ep %d", aRealEndpoint);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Client not found for real ep %d", aRealEndpoint));
return;
}
// Check if there is a notification request queued for that client (if not, we can return here).
@@ -3913,25 +3894,25 @@
}
if (!p)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_EPSTATUSNOTIFY_DUP2, " No notification request for that client, returning");
+ __KTRACE_OPT(KUSB, Kern::Printf(" No notification request for that client, returning"));
return;
}
const TInt ifcset = ClientId2InterfaceNumber(client_id);
if (ifcset < 0)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_EPSTATUSNOTIFY_DUP3, " Error: Ifcset not found for clientid %d", client_id);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Ifcset not found for clientid %d", client_id));
return;
}
const TUsbcInterfaceSet* const ifcset_ptr = InterfaceNumber2InterfacePointer(ifcset);
if (!ifcset_ptr)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_EPSTATUSNOTIFY_DUP4, " Error: Ifcset pointer not found for ifcset %d", ifcset);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Ifcset pointer not found for ifcset %d", ifcset));
return;
}
const TUsbcInterface* const ifc_ptr = ifcset_ptr->CurrentInterface();
if (!ifc_ptr)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_EPSTATUSNOTIFY_DUP5, " Error: Current ifc pointer not found for ifcset %d", ifcset);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Current ifc pointer not found for ifcset %d", ifcset));
return;
}
TUint state = 0;
@@ -3939,20 +3920,20 @@
for (TInt i = 0; i < eps; i++)
{
const TUsbcLogicalEndpoint* const ep_ptr = ifc_ptr->iEndpoints[i];
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_EPSTATUSNOTIFY_DUP6, " checking logical ep #%d for stall state...",
- ep_ptr->iLEndpointNum);
+ __KTRACE_OPT(KUSB, Kern::Printf(" checking logical ep #%d for stall state...",
+ ep_ptr->iLEndpointNum));
if (ep_ptr->iPEndpoint->iHalt)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_EPSTATUSNOTIFY_DUP7, " -- stalled");
+ __KTRACE_OPT(KUSB, Kern::Printf(" -- stalled"));
// set the bit n to 1, where n is the logical endpoint number minus one
state |= (1 << (ep_ptr->iLEndpointNum - 1));
}
else
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_EPSTATUSNOTIFY_DUP8, " -- not stalled");
+ __KTRACE_OPT(KUSB, Kern::Printf(" -- not stalled"));
}
}
- OstTraceDefExt2(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_EPSTATUSNOTIFY_DUP9, " passing ep state 0x%x on to LDD @ 0x%x", (TUint)state, (TUint)client_id);
+ __KTRACE_OPT(KUSB, Kern::Printf(" passing ep state 0x%x on to LDD @ 0x%x", state, client_id));
p->SetState(state);
p->DoCallback();
}
@@ -3960,7 +3941,7 @@
void DUsbClientController::OtgFeaturesNotify()
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_OTGFEATURESNOTIFY, "DUsbClientController::OtgFeaturesNotify()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::OtgFeaturesNotify()"));
// This function may be called from the PSL (via PIL's chapter9.cpp) from
// within an ISR -- so we have to take care what we do here (and also in
@@ -3978,12 +3959,12 @@
void DUsbClientController::RunClientCallbacks()
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_RUNCLIENTCALLBACKS, "DUsbClientController::RunClientCallbacks()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::RunClientCallbacks()"));
TSglQueIter<TUsbcClientCallback> iter(iClientCallbacks);
TUsbcClientCallback* p;
while ((p = iter++) != NULL)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_RUNCLIENTCALLBACKS_DUP1, "Callback 0x%x", p);
+ __KTRACE_OPT(KUSB, Kern::Printf("Callback 0x%x", p));
p->DoCallback();
}
}
@@ -3991,7 +3972,7 @@
void DUsbClientController::ProcessDataTransferDone(TUsbcRequestCallback& aRcb)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_PROCESSDATATRANSFERDONE, "DUsbClientController::ProcessDataTransferDone()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::ProcessDataTransferDone()"));
// This piece can only be called in thread context from ProcessEp0DataReceived() /
// ProcessEp0SetupReceived() via the call to ProcessEp0ReceiveDone() in
// SetupReadBuffer(), which is guarded by an interrupt lock.
@@ -4012,7 +3993,7 @@
if (ep > 0) // not 'else'!
{
__ASSERT_DEBUG((iRequestCallbacks[ep] == &aRcb), Kern::Fault(KUsbPILPanicCat, __LINE__));
- OstTraceDefExt2(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_PROCESSDATATRANSFERDONE_DUP1, " > removing RequestCallback[%d] @ 0x%x", ep, (TUint)&aRcb);
+ __KTRACE_OPT(KUSB, Kern::Printf(" > removing RequestCallback[%d] @ 0x%x", ep, &aRcb));
iRequestCallbacks[ep] = NULL;
}
aRcb.DoCallback();
@@ -4021,21 +4002,18 @@
void DUsbClientController::NextDeviceState(TUsbcDeviceState aNextState)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_NEXTDEVICESTATE, "DUsbClientController::NextDeviceState()" );
-
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::NextDeviceState()"));
#ifdef _DEBUG
-#ifdef OST_TRACE_COMPILER_IN_USE
const char* const states[] = {"Undefined", "Attached", "Powered", "Default",
"Address", "Configured", "Suspended"};
-#endif
if ((aNextState >= EUsbcDeviceStateUndefined) &&
(aNextState <= EUsbcDeviceStateSuspended))
{
- OstTraceDefExt1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_NEXTDEVICESTATE_DUP1, " next device state: %s", states[aNextState]);
+ __KTRACE_OPT(KUSB, Kern::Printf(" next device state: %s", states[aNextState]));
}
else
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_NEXTDEVICESTATE_DUP2, " Error: Unknown next device state: %d", aNextState);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Unknown next device state: %d", aNextState));
}
// Print a warning when an invalid state transition is detected
// 'Undefined' is not a state that is mentioned in the USB spec, but
@@ -4098,12 +4076,12 @@
break;
goto OK;
default:
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_NEXTDEVICESTATE_DUP3, " Error: Unknown current device state: %d", iDeviceState);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Unknown current device state: %d", iDeviceState));
goto OK;
}
// KUSB only (instead of KPANIC) so as not to worry people too much where
// a particular h/w regularly enforces invalid (but harmless) transitions
- OstTraceDefExt1(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_NEXTDEVICESTATE_DUP4, " Warning: Invalid next state from %s", states[iDeviceState]);
+ __KTRACE_OPT(KUSB, Kern::Printf(" Warning: Invalid next state from %s", states[iDeviceState]));
OK:
#endif // _DEBUG
@@ -4114,7 +4092,7 @@
TInt DUsbClientController::ProcessSuspendEvent()
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_PROCESSSUSPENDEVENT, "DUsbClientController::ProcessSuspendEvent()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::ProcessSuspendEvent()"));
// A suspend interrupt has been received and needs attention.
iDeviceStateB4Suspend = iDeviceState;
// We have to move to the Suspend state immediately (in case it's a genuine Suspend)
@@ -4138,11 +4116,11 @@
//
TInt DUsbClientController::ProcessSuspendEventProceed()
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_PROCESSSUSPENDEVENTPROCEED, "DUsbClientController::ProcessSuspendEventProceed()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::ProcessSuspendEventProceed()"));
if (!UsbConnectionStatus())
{
// If we are no longer connected to the bus, we go into Undefined state (from Suspend).
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_PROCESSSUSPENDEVENTPROCEED_DUP1, " > USB cable detached" );
+ __KTRACE_OPT(KUSB, Kern::Printf(" > USB cable detached"));
NextDeviceState(EUsbcDeviceStateUndefined);
}
return KErrNone;
@@ -4151,7 +4129,7 @@
TInt DUsbClientController::ProcessResumeEvent()
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_PROCESSRESUMEEVENT, "DUsbClientController::ProcessResumeEvent()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::ProcessResumeEvent()"));
iCableStatusTimer.Cancel();
if (iDeviceState == EUsbcDeviceStateSuspended)
{
@@ -4164,7 +4142,7 @@
TInt DUsbClientController::ProcessResetEvent(TBool aPslUpcall)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_PROCESSRESETEVENT, "DUsbClientController::ProcessResetEvent()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::ProcessResetEvent()"));
if (aPslUpcall)
{
@@ -4172,16 +4150,17 @@
// Also, do it always, even when PIL processing will be deferred.
Reset();
}
+
#ifdef USB_OTG_CLIENT
if (iUsbResetDeferred) // implies (iOtgHnpHandledByHw == ETrue)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_PROCESSRESETEVENT_DUP1, " User-side (still) not ready -> returning" );
+ __KTRACE_OPT(KUSB, Kern::Printf(" User-side (still) not ready -> returning"));
return KErrNone;
}
else if (iOtgHnpHandledByHw && !iClientSupportReady)
{
// Wait with the PIL Reset processing until user-side is ready
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_PROCESSRESETEVENT_DUP2, " User-side not ready -> deferring" );
+ __KTRACE_OPT(KUSB, Kern::Printf(" User-side not ready -> deferring"));
iUsbResetDeferred = ETrue;
return KErrNone;
}
@@ -4216,19 +4195,19 @@
iHighSpeed = CurrentlyUsingHighSpeed();
if (!was_hs && iHighSpeed)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_PROCESSRESETEVENT_DUP3, " Moving to High-speed" );
+ __KTRACE_OPT(KUSB, Kern::Printf(" Moving to High-speed"));
EnterHighSpeed();
}
else if (was_hs && !iHighSpeed)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_PROCESSRESETEVENT_DUP4, " Moving to Full-speed" );
+ __KTRACE_OPT(KUSB, Kern::Printf(" Moving to Full-speed"));
EnterFullSpeed();
}
// Setup initial Ep0 read (SetupEndpointZeroRead never called from thread)
if (SetupEndpointZeroRead() != KErrNone)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_PROCESSRESETEVENT_DUP5, " Error: while setting up Ep0 read" );
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: while setting up Ep0 read"));
return KErrGeneral;
}
@@ -4238,10 +4217,9 @@
TInt DUsbClientController::ProcessCableInsertEvent()
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_PROCESSCABLEINSERTEVENT, "DUsbClientController::ProcessCableInsertEvent()" );
-
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::ProcessCableInsertEvent()"));
#ifdef USB_OTG_CLIENT
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_PROCESSCABLEINSERTEVENT_DUP1, " Error: EUsbEventCableInsert shouldn't be sent by an OTG Client PSL" );
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: EUsbEventCableInsert shouldn't be sent by an OTG Client PSL"));
return KErrArgument;
#else
NextDeviceState(EUsbcDeviceStateAttached);
@@ -4256,9 +4234,9 @@
TInt DUsbClientController::ProcessCableRemoveEvent()
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_PROCESSCABLEREMOVEEVENT, "DUsbClientController::ProcessCableRemoveEvent()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::ProcessCableRemoveEvent()"));
#ifdef USB_OTG_CLIENT
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_PROCESSCABLEREMOVEEVENT_DUP1, " Error: EUsbEventCableRemoved shouldn't be sent by an OTG Client PSL" );
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: EUsbEventCableRemoved shouldn't be sent by an OTG Client PSL"));
return KErrArgument;
#else
// Tear down the current configuration (if any)
@@ -4271,14 +4249,14 @@
void DUsbClientController::EnterFullSpeed()
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_ENTERFULLSPEED, "DUsbClientController::EnterFullSpeed()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::EnterFullSpeed()"));
iDescriptors.UpdateDescriptorsFs();
}
void DUsbClientController::EnterHighSpeed()
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_ENTERHIGHSPEED, "DUsbClientController::EnterHighSpeed()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::EnterHighSpeed()"));
iDescriptors.UpdateDescriptorsHs();
}
@@ -4288,7 +4266,7 @@
//
TInt DUsbClientController::EvaluateOtgConnectFlags()
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_EVALUATEOTGCONNECTFLAGS, "DUsbClientController::EvaluateOtgConnectFlags()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::EvaluateOtgConnectFlags()"));
TInt r = KErrNone;
@@ -4303,7 +4281,7 @@
else
{
// certain h/w: handles HNP connect/disconnect automatically
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_EVALUATEOTGCONNECTFLAGS_DUP1, " HNP-handling h/w: only considering user-side readiness" );
+ __KTRACE_OPT(KUSB, Kern::Printf(" HNP-handling h/w: only considering user-side readiness"));
enableDPlus = iClientSupportReady;
}
@@ -4315,7 +4293,7 @@
// There has been a changed requirement that must be serviced...
if (enableDPlus)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_EVALUATEOTGCONNECTFLAGS_DUP2, " calling (*iEnablePullUpOnDPlus)()" );
+ __KTRACE_OPT(KUSB, Kern::Printf(" calling (*iEnablePullUpOnDPlus)()"));
if (iEnablePullUpOnDPlus != NULL)
{
iDPlusEnabled = enableDPlus;
@@ -4343,12 +4321,12 @@
r = (*iEnablePullUpOnDPlus)(iOtgContext);
if (r != KErrNone)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_EVALUATEOTGCONNECTFLAGS_DUP3, " Error: iEnablePullUpOnDPlus() = %d", r);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: iEnablePullUpOnDPlus() = %d", r));
}
}
else
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_EVALUATEOTGCONNECTFLAGS_DUP4, " Warning: iEnablePullUpOnDPlus pointer not ready");
+ __KTRACE_OPT(KUSB, Kern::Printf(" Warning: iEnablePullUpOnDPlus pointer not ready"));
// We cannot enforce the presence of the pointer (via an ASSERT)
// since it might only be available at a later point.
// We shouldn't return an error at this point either, since the
@@ -4357,19 +4335,19 @@
}
else
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_EVALUATEOTGCONNECTFLAGS_DUP5, " calling (*iDisablePullUpOnDPlus)()");
+ __KTRACE_OPT(KUSB, Kern::Printf(" calling (*iDisablePullUpOnDPlus)()"));
if (iDisablePullUpOnDPlus != NULL)
{
iDPlusEnabled = enableDPlus;
r = (*iDisablePullUpOnDPlus)(iOtgContext);
if (r != KErrNone)
{
- OstTraceDef1(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_EVALUATEOTGCONNECTFLAGS_DUP6, " Error: iDisablePullUpOnDPlus() = %d", r);
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: iDisablePullUpOnDPlus() = %d", r));
}
}
else
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_EVALUATEOTGCONNECTFLAGS_DUP7, " Warning: iDisablePullUpOnDPlus pointer not ready");
+ __KTRACE_OPT(KUSB, Kern::Printf(" Warning: iDisablePullUpOnDPlus pointer not ready"));
// We cannot enforce the presence of the pointer (via an ASSERT)
// since it might only be available at a later point.
// We shouldn't return an error at this point either, since the
@@ -4385,10 +4363,10 @@
//
void DUsbClientController::ReconnectTimerCallback(TAny *aPtr)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_RECONNECTTIMERCALLBACK, "DUsbClientController::ReconnectTimerCallback()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::ReconnectTimerCallback()"));
if (!aPtr)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_RECONNECTTIMERCALLBACK_DUP1, " Error: !aPtr");
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: !aPtr"));
return;
}
DUsbClientController* const ptr = static_cast<DUsbClientController*>(aPtr);
@@ -4401,10 +4379,10 @@
//
void DUsbClientController::CableStatusTimerCallback(TAny *aPtr)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_CABLESTATUSTIMERCALLBACK, "DUsbClientController::CableStatusTimerCallback()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::CableStatusTimerCallback()"));
if (!aPtr)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_CABLESTATUSTIMERCALLBACK_DUP1, " Error: !aPtr" );
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: !aPtr"));
return;
}
DUsbClientController* const ptr = static_cast<DUsbClientController*>(aPtr);
@@ -4417,10 +4395,10 @@
//
void DUsbClientController::PowerUpDfc(TAny* aPtr)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_POWERUPDFC, "DUsbClientController::PowerUpDfc" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::PowerUpDfc"));
if (!aPtr)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_POWERUPDFC_DUP1, " Error: !aPtr" );
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: !aPtr"));
return;
}
DUsbClientController* const ptr = static_cast<DUsbClientController*>(aPtr);
@@ -4436,10 +4414,10 @@
//
void DUsbClientController::PowerDownDfc(TAny* aPtr)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FLOW, DUSBCLIENTCONTROLLER_POWERDOWNDFC, "DUsbClientController::PowerDownDfc" );
+ __KTRACE_OPT(KUSB, Kern::Printf("DUsbClientController::PowerDownDfc"));
if (!aPtr)
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_FATAL, DUSBCLIENTCONTROLLER_POWERDOWNDFC_DUP1, " Error: !aPtr" );
+ __KTRACE_OPT(KPANIC, Kern::Printf(" Error: !aPtr"));
return;
}
DUsbClientController* const ptr = static_cast<DUsbClientController*>(aPtr);
@@ -4449,13 +4427,13 @@
if (!ptr->iHardwareActivated || ptr->PowerDownWhenActive())
{
(void) ptr->PowerDown();
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_POWERDOWNDFC_DUP2, "Calling PowerHandler->PowerDownDone()" );
+ __KTRACE_OPT(KUSB, Kern::Printf("Calling PowerHandler->PowerDownDone()"));
ptr->iPowerHandler->PowerDownDone();
}
else
{
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_POWERDOWNDFC_DUP3, "Not calling PowerHandler->PowerDownDone()" );
- OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_POWERDOWNDFC_DUP4, " because UDC is active." );
+ __KTRACE_OPT(KUSB, Kern::Printf("Not calling PowerHandler->PowerDownDone()"));
+ __KTRACE_OPT(KUSB, Kern::Printf(" because UDC is active."));
}
}