1076 err = KErrNone; |
1076 err = KErrNone; |
1077 if (iEp0_RxExtraData) |
1077 if (iEp0_RxExtraData) |
1078 { |
1078 { |
1079 OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_SETUPREADBUFFER_DUP11, " iEp0_RxExtraData: trying again..."); |
1079 OstTraceDef0(OST_TRACE_CATEGORY_RND, TRACE_NORMAL, DUSBCLIENTCONTROLLER_SETUPREADBUFFER_DUP11, " iEp0_RxExtraData: trying again..."); |
1080 const TBool rx_data = iEp0DataReceiving; |
1080 const TBool rx_data = iEp0DataReceiving; |
1081 const TInt irq = __SPIN_LOCK_IRQSAVE(iUsbLock); |
1081 |
|
1082 //Note: Currently, ProcessEp0ReceiveDone() is only called in the thread context, |
|
1083 // but in the future, if this ProcessEp0ReceiveDone() is called in IRQ context, |
|
1084 // we have to notice that ProcessEp0ReceiveDone() has hold a fast mutex already. |
1082 err = ProcessEp0ReceiveDone(iEp0_RxExtraCount); |
1085 err = ProcessEp0ReceiveDone(iEp0_RxExtraCount); |
1083 __SPIN_UNLOCK_IRQRESTORE(iUsbLock, irq); |
|
1084 if (err == KErrNone) |
1086 if (err == KErrNone) |
1085 { |
1087 { |
1086 iEp0_RxExtraData = EFalse; |
1088 iEp0_RxExtraData = EFalse; |
1087 // Queue a new Ep0 read (because xxxProceed only re-enables the interrupt) |
1089 // Queue a new Ep0 read (because xxxProceed only re-enables the interrupt) |
1088 SetupEndpointZeroRead(); |
1090 SetupEndpointZeroRead(); |