|
The Pedigree Project 0.1
|
#include <Ohci.h>
Inheritance diagram for Ohci:
Collaboration diagram for Ohci:Classes | |
| struct | ED |
| struct | Hcca |
| struct | TD |
Public Member Functions | |
| Ohci (Device *pDev) | |
| bool | initialised () const |
| struct Ohci::TD | ALIGN (16) |
| struct Ohci::ED | ALIGN (16) |
| virtual void | getName (String &str) |
| virtual void | addTransferToTransaction (uintptr_t pTransaction, bool bToggle, UsbPid pid, uintptr_t pBuffer, size_t nBytes) |
| Adds a new transfer to an existent transaction. | |
| virtual uintptr_t | createTransaction (UsbEndpoint endpointInfo) |
| Creates a new transaction with the given endpoint data. | |
| virtual MUST_USE_RESULT bool | doAsync (uintptr_t pTransaction, void(*pCallback)(uintptr_t, ssize_t)=0, uintptr_t pParam=0) |
| virtual MUST_USE_RESULT bool | addInterruptInHandler (UsbEndpoint endpointInfo, uintptr_t pBuffer, uint16_t nBytes, void(*pCallback)(uintptr_t, ssize_t), UsbInterruptInHandle &handle, uintptr_t pParam=0) |
| Adds an owned recurring interrupt-IN transaction. | |
| IrqDisposition | irq (irq_id_t number) override |
| IRQ handler. | |
| virtual bool | portReset (uint8_t nPort, bool bErrorResponse=false) |
| Gets a UsbDevice from a given vendor:product pair. | |
Public Member Functions inherited from UsbHub | |
| UsbHub (Device *p) | |
| RootConnection | rootConnectionForChild (uint8_t childPort) const |
| virtual bool | controllerAssignsAddresses () const |
| virtual bool | supportsHubDevices () const |
| virtual bool | prepareDevice (uint8_t, const UsbEndpoint &) |
| virtual bool | addressDevice (uint8_t, const UsbEndpoint &) |
| virtual bool | resetEndpoint (const UsbEndpoint &) |
| virtual Type | getType () |
| bool | deviceConnected (uint8_t nPort, UsbSpeed speed) |
| Called when a device is connected to a port on the hub. | |
| void | deviceDisconnected (uint8_t nPort) |
| Called when a device is disconnected from a port on the hub. | |
| ssize_t | doSync (uintptr_t nTransaction, uint32_t timeout=5000) |
Public Member Functions inherited from Device | |
| Device (Device *p) | |
| Device * | getParent () const |
| void | setParent (Device *p) |
| virtual const String & | getSpecificType () |
| virtual void | setSpecificType (String str) |
| void | setPciPosition (uint32_t bus, uint32_t device, uint32_t func) |
| void | setPciIdentifiers (uint8_t classCode, uint8_t subclassCode, uint16_t vendorId, uint16_t deviceId, uint8_t progIf) |
| void | setPciConfigHeader (const PciBus::ConfigSpace &space) |
| PciBus::ConfigSpace | getPciConfigHeader () const |
| uint8_t | getPciClassCode () |
| uint8_t | getPciSubclassCode () |
| uint16_t | getPciVendorId () |
| uint16_t | getPciDeviceId () |
| uint8_t | getPciProgInterface () |
| uint32_t | getPciBusPosition () |
| uint32_t | getPciDevicePosition () |
| uint32_t | getPciFunctionNumber () |
| Device * | getPhysicalFunction () const |
| size_t | getVirtualFunctionIndex () const |
| void | setVirtualFunction (Device *physicalFunction, size_t index) |
| virtual void | dump (String &str) |
| virtual Vector< Address * > & | addresses () |
| virtual uintptr_t | getInterruptNumber () |
| virtual void | setInterruptNumber (uintptr_t n) |
| void | addChild (Device *pDevice) |
| Device * | getChild (size_t n) |
| size_t | getNumChildren () |
| void | removeChild (size_t n) |
| void | removeChild (Device *d) |
| void | replaceChild (Device *src, Device *dest) |
Public Member Functions inherited from IrqHandler | |
| virtual bool | acceptsSpuriousInterrupts () const |
Public Member Functions inherited from RequestQueue | |
| RequestQueue (const String &name) | |
| virtual void | initialise () |
| virtual void | destroy () |
| MUST_USE_RESULT uint64_t | addRequest (size_t priority, uint64_t p1=0, uint64_t p2=0, uint64_t p3=0, uint64_t p4=0, uint64_t p5=0, uint64_t p6=0, uint64_t p7=0, uint64_t p8=0) |
| MUST_USE_RESULT uint64_t | addRequest (size_t priority, ActionOnDuplicate action, uint64_t p1=0, uint64_t p2=0, uint64_t p3=0, uint64_t p4=0, uint64_t p5=0, uint64_t p6=0, uint64_t p7=0, uint64_t p8=0) |
| uint64_t | addAsyncRequest (size_t priority, uint64_t p1=0, uint64_t p2=0, uint64_t p3=0, uint64_t p4=0, uint64_t p5=0, uint64_t p6=0, uint64_t p7=0, uint64_t p8=0) |
| MUST_USE_RESULT bool | publishAsyncRequest (size_t priority, uint64_t p1=0, uint64_t p2=0, uint64_t p3=0, uint64_t p4=0, uint64_t p5=0, uint64_t p6=0, uint64_t p7=0, uint64_t p8=0) |
| bool | canWaitForCompletion () |
| MUST_USE_RESULT bool | waitForPreallocated (PreallocatedRequest &request) |
| MUST_USE_RESULT PreallocatedPublishResult | publishPreallocated (PreallocatedRequest &request, size_t priority, uint64_t p1=0, uint64_t p2=0, uint64_t p3=0, uint64_t p4=0, uint64_t p5=0, uint64_t p6=0, uint64_t p7=0, uint64_t p8=0) |
| MUST_USE_RESULT PreallocatedPublishResult | republishPreallocatedWhileReleasing (PreallocatedRequest &request, size_t priority, uint64_t p1=0, uint64_t p2=0, uint64_t p3=0, uint64_t p4=0, uint64_t p5=0, uint64_t p6=0, uint64_t p7=0, uint64_t p8=0) |
| MUST_USE_RESULT bool | halt () |
| MUST_USE_RESULT bool | resume () |
| LifecycleState | getLifecycleState () |
| bool | drain () |
Public Attributes | |
| struct Ohci::Hcca | PACKED |
Protected Member Functions | |
| virtual void | cancelAsyncAndDrain (uintptr_t pTransaction, void(*pCallback)(uintptr_t, ssize_t), uintptr_t pParam) |
| MUST_USE_RESULT bool | cancelInterruptInAndDrain (const UsbInterruptInToken &token, void(*callback)(uintptr_t, ssize_t), uintptr_t parameter, bool producerAlreadyStopped) override |
| bool | inInterruptCallbackContext () const override |
| void | replaySuppressedConnectionChange (size_t port) override |
| virtual uint64_t | executeRequest (uint64_t p1=0, uint64_t p2=0, uint64_t p3=0, uint64_t p4=0, uint64_t p5=0, uint64_t p6=0, uint64_t p7=0, uint64_t p8=0) |
| void | cancelRequest (const Request &request) override |
Protected Member Functions inherited from UsbHub | |
| virtual bool | portSpeed (uint8_t, UsbSpeed &) |
| virtual bool | beginStartupActivity () |
| virtual void | endStartupActivity (UsbStartup::Outcome) |
| virtual void | releaseDeviceAddress (uint8_t) |
| MUST_USE_RESULT bool | publishInterruptInHandle (UsbInterruptInHandle &handle, const UsbInterruptInToken &token, void(*callback)(uintptr_t, ssize_t), uintptr_t parameter) |
| void | disconnectAllDevices () |
| void | retainDisconnectedAddressesUntilControllerTeardown () |
| void | attachToUpstreamHub (UsbHub *upstream, const RootConnection &connection) |
| UsbHub * | rootHub () const |
| MUST_USE_RESULT bool | suppressConnectionChanges (size_t port, ConnectionChangeSuppression &suppression) |
| MUST_USE_RESULT bool | deferConnectionChangeIfSuppressed (size_t port) |
| virtual size_t | currentRootPortGeneration (size_t port) const |
Protected Member Functions inherited from Device | |
| NOT_COPYABLE_OR_ASSIGNABLE (Device) | |
Protected Member Functions inherited from IrqHandler | |
| virtual | ~IrqHandler () |
Protected Member Functions inherited from IrqHandlerBase | |
| virtual | ~IrqHandlerBase () |
Protected Member Functions inherited from RequestQueue | |
| virtual bool | workerPlacement (ThreadPlacement &) const |
| RequestQueue (const RequestQueue &) | |
| void | operator= (const RequestQueue &) |
| virtual bool | compareRequests (const Request &a, const Request &b) |
| int | work () |
| NextRequestResult | getNextRequest (Request *&request) |
| bool | drainIntakeLocked (size_t priority) |
| void | publishRequest (Request *request) |
| Request * | findDuplicate (const Request &request) |
| void | discardRequest (Request *request) |
| uint64_t | addAsyncRequestInternal (size_t priority, uint64_t p1, uint64_t p2, uint64_t p3, uint64_t p4, uint64_t p5, uint64_t p6, uint64_t p7, uint64_t p8) |
| PreallocatedPublishResult | publishPreallocatedRequest (PreallocatedRequest &request, PreallocatedRequest::State availableState, size_t priority, uint64_t p1, uint64_t p2, uint64_t p3, uint64_t p4, uint64_t p5, uint64_t p6, uint64_t p7, uint64_t p8) |
| void | releasePreallocatedRequest (Request *request) |
| void | invokeCancelRequest (const Request &request) |
| bool | callbackActiveOnCurrentThread () const |
| void | releaseRequest (Request *request) |
| uint64_t | waitForRequest (Request *request) |
| bool | startWorker () |
| bool | stopWorker () |
| void | closePreallocatedAdmission () |
| void | waitForPreallocatedPublishers () |
Private Types | |
| enum | Lists { PeriodicList = 0x4 , IsochronousList = 0x8 , ControlList = 0x10 , BulkList = 0x20 } |
| Enumeration of lists that can be stopped or started. More... | |
| enum | OhciConstants { OhciVersion = 0x00 , OhciControl = 0x04 , OhciCommandStatus = 0x08 , OhciInterruptStatus = 0x0c , OhciInterruptEnable = 0x10 , OhciInterruptDisable = 0x14 , OhciHcca = 0x18 , OhciControlHeadED = 0x20 , OhciControlCurrentED = 0x24 , OhciBulkHeadED = 0x28 , OhciBulkCurrentED = 0x2c , OhciFmInterval = 0x34 , OhciRhDescriptorA = 0x48 , OhciRhStatus = 0x50 , OhciRhPortStatus = 0x54 , OhciControlStateFunctionalMask = 0xC0 , OhciControlInterruptRoute = 0x100 , OhciControlStateRunning = 0x80 , OhciControlStateSuspended = 0xC0 , OhciControlListsEnable = 0x30 , OhciCommandRequestOwnership = 0x08 , OhciCommandBulkListFilled = 0x04 , OhciCommandControlListFilled = 0x02 , OhciCommandHcReset = 0x01 , OhciInterruptMIE = 0x80000000 , OhciInterruptOwnershipChange = 0x40000000 , OhciInterruptRhStsChange = 0x40 , OhciInterruptFrameNumberOverflow = 0x20 , OhciInterruptUnrecoverableError = 0x10 , OhciInterruptResumeDetected = 0x08 , OhciInterruptWbDoneHead = 0x02 , OhciInterruptSchedulingOverrun = 0x01 , OhciInterruptStartOfFrame = 0x04 , OhciInterruptAll = OhciInterruptMIE | OhciInterruptOwnershipChange | 0x7F , OhciInterruptOperational , OhciRhHubStsSetGlobalPower = 0x10000 , OhciRhHubStsOverCurrentCh = 0x20000 , OhciRhPortStsResCh = 0x100000 , OhciRhPortStsOverCurrentCh = 0x80000 , OhciRhPortStsSuspendCh = 0x40000 , OhciRhPortStsEnableCh = 0x20000 , OhciRhPortStsConnStsCh = 0x10000 , OhciRhPortStsChangeMask , OhciRhPortStsLoSpeed = 0x200 , OhciRhPortStsPower = 0x100 , OhciRhPortStsReset = 0x10 , OhciRhPortStsEnable = 0x02 , OhciRhPortStsConnected = 0x01 } |
| using | ControllerLock = Mutex |
| using | IrqProcessingLock = Mutex |
Private Member Functions | |
| void | stop (Lists list) |
| Stops the controller from processing the given list. | |
| void | start (Lists list) |
| Starts processing of the given list. | |
| void | setRootHubStatusChangeSource (bool enabled) |
| void | transitionControllerState (uint32_t control, const char *timeoutMessage) |
| void | removeED (ED *pED) |
| Detaches an ED and queues it for reclamation at the next frame. | |
| void | detachED (ED *pED) |
| void | removeFromFullSchedule (ED *pED) |
| void | removeFromDequeueList (ED *pED) |
| void | reclaimTransferDescriptors (ED *pED) |
| void | retireEDStorage (ED *pED) |
| UsbHcd::CallbackDeliveryQueue::Record * | prepareCompletion (ED *pED, const UsbHcd::TransferCompletion::Claim &claim) |
| void | terminalizeEDForTeardown (ED *pED, List< UsbHcd::CallbackDeliveryQueue::Record * > &completions) |
| physical_uintptr_t | vtp_ed (ED *pED) |
| Converts a software ED pointer to a physical address. | |
| ED * | ptv_ed (physical_uintptr_t phys) |
| Converts a physical address to an ED pointer. Maybe. | |
| Ohci (const Ohci &) | |
| void | operator= (const Ohci &) |
Static Private Member Functions | |
| static void | finishDeferredCompletion (void *context) |
Static Private Attributes | |
| static constexpr size_t | EdRegionBytes = 4096 |
| static constexpr size_t | EdRegionOffsetMask = EdRegionBytes - 1 |
Additional Inherited Members | |
Public Types inherited from Device | |
| enum | Type { Generic , Root , Disk , Bus , Display , Network , Sound , Console , Mouse , Controller , UsbController , UsbGeneric , UsbContainer } |
| typedef Device *(* | Callback) (Device *) |
Public Types inherited from RequestQueue | |
| enum class | OverrunStatus { Clear , Armed , Stalled , Overloaded } |
| enum class | PreallocatedPublishResult { Accepted , TokenBusy , QueueStopped , QueueFull , InvalidPriority } |
| enum | ActionOnDuplicate { Block , NewRequest , ReturnImmediately } |
| enum class | LifecycleState { Stopped , Accepting , Stopping , Destroyed } |
Static Public Member Functions inherited from Device | |
| static bool | treeLockHeldByCurrentThread () |
| static void | foreach (Callback callback, Device *root=0) |
| template<class F , class... Args> | |
| static void | foreach (pedigree_std::Callable< F > &callback, Device *root, Args... args) |
| static void | addToRoot (Device *device) |
| static void | searchByVendorId (uint16_t vendorId, void(*callback)(Device *), Device *root=0) |
| static void | searchByVendorIdAndDeviceId (uint16_t vendorId, uint16_t deviceId, void(*callback)(Device *), Device *root=0) |
| static void | searchByClass (uint16_t classCode, void(*callback)(Device *), Device *root=0) |
| static void | searchByClassAndSubclass (uint16_t classCode, uint16_t subclassCode, void(*callback)(Device *), Device *root=0) |
| static void | searchByClassSubclassAndProgInterface (uint16_t classCode, uint16_t subclassCode, uint8_t progInterface, void(*callback)(Device *), Device *root=0) |
Protected Types inherited from RequestQueue | |
| enum class | NextRequestResult { Item , Empty , Retry } |
Static Protected Member Functions inherited from Device | |
| static Device & | root () |
Static Protected Member Functions inherited from RequestQueue | |
| static int | trampoline (void *p) |
| static void | completeRequest (Request *request, uint64_t returnValue, bool rejected) |
| static void | retainRequest (Request *request) |
Protected Attributes inherited from Device | |
| Vector< Address * > | m_Addresses |
| Vector< Device * > | m_Children |
| Device * | m_pParent |
| Device * | m_PhysicalFunction |
| size_t | m_VirtualFunctionIndex |
| uintptr_t | m_InterruptNumber |
| String | m_SpecificType |
| PciBus::ConfigSpace | m_ConfigHeader |
| uint8_t | m_ClassCode |
| uint8_t | m_SubclassCode |
| uint16_t | m_VendorId |
| uint16_t | m_DeviceId |
| uint8_t | m_ProgInterface |
| uint32_t | m_PciBusPos |
| uint32_t | m_PciDevicePos |
| uint32_t | m_PciFunctionNum |
Protected Attributes inherited from RequestQueue | |
| IntakeLane | m_IntakeLanes [REQUEST_QUEUE_NUM_PRIORITIES] |
| Request * | m_pRequestQueue [REQUEST_QUEUE_NUM_PRIORITIES] |
| Request * | m_pRequestQueueTail [REQUEST_QUEUE_NUM_PRIORITIES] |
| Request * | m_pActiveRequest |
| Atomic< size_t > | m_State |
| Mutex | m_LifecycleMutex |
| WaitQueue | m_RequestQueueWaiters |
| WaitQueue | m_WorkerWaiters |
| Thread * | m_pThread |
| Atomic< PerProcessorScheduler * > | m_pWorkerScheduler |
| SchedulerWorkerWake | m_WorkerWake |
| Atomic< size_t > | m_bWorkerReady |
| Atomic< size_t > | m_bWorkerActive |
| size_t | m_WorkerProgressGeneration |
| RequestQueueOverrunChecker | m_OverrunChecker |
| Timer * | m_pOverrunTimer |
| Atomic< size_t > | m_PublicationState |
| size_t | m_nMaxAsyncRequests |
| Atomic< size_t > | m_nAsyncRequests |
| Atomic< size_t > | m_nTotalRequests |
| Atomic< size_t > | m_nActiveRequests |
| NormalStaticString | m_Name |
Static Protected Attributes inherited from Device | |
| static Device | m_Root |
| static Mutex | m_TreeLock |
Static Protected Attributes inherited from RequestQueue | |
| static constexpr size_t | PublicationClosed = static_cast<size_t>(1) << ((sizeof(size_t) * 8) - 1) |
| static constexpr size_t | PublicationCountMask = ~PublicationClosed |
|
private |
|
private |
|
private |
|
virtual |
|
virtual |
Adds a new transfer to an existent transaction.
Implements UsbHub.
Definition at line 1182 of file Ohci.cc.
References ExtensibleBitmap::clear(), ExtensibleBitmap::getFirstClear(), ProcessorBase::information(), m_IrqProcessingLock, m_Mutex, m_SubmissionOperations, List< T, nodePoolSize >::pushBack(), ExtensibleBitmap::set(), ExtensibleBitmap::test(), and OperationBarrier::tryAcquire().
|
protectedvirtual |
Cancels an accepted transaction or drains a completion which won the race. On return, the matching callback has run exactly once and the controller can no longer access any transfer buffer.
The callback and parameter identify the original transaction generation, preventing a stale numeric transaction handle from cancelling a reused controller slot.
Implements UsbHub.
Definition at line 1541 of file Ohci.cc.
References UsbHcd::TransferCompletion::claimCancellation(), List< T, nodePoolSize >::count(), UsbHcd::CallbackDeliveryQueue::deliver(), detachED(), UsbHcd::CallbackDeliveryQueue::drain(), m_CancellationOperations, m_CompletionDeliveries, m_IrqProcessingLock, m_Mutex, List< T, nodePoolSize >::popFront(), prepareCompletion(), UsbHcd::CallbackDeliveryQueue::publish(), List< T, nodePoolSize >::pushBack(), IoBase::read32(), removeFromDequeueList(), removeFromFullSchedule(), ExtensibleBitmap::test(), transitionControllerState(), OperationBarrier::tryAcquire(), and IoBase::write32().
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
Releases payload ownership for a request that will not execute.
This runs without the queue guard for rejected candidates (including stopped queues, duplicates and capacity limits) and queued requests cancelled by destroy(). Implementations used by allocation-free producers must not sleep. Derived destructors must call destroy() while their override and member state are still alive. During destroy(), the lifecycle is serialized: halt() and resume() on this queue return false, while recursive destroy() is a fatal contract violation.
Reimplemented from RequestQueue.
|
virtual |
Creates a new transaction with the given endpoint data.
Implements UsbHub.
Definition at line 1322 of file Ohci.cc.
References ExtensibleBitmap::getFirstClear(), m_IrqProcessingLock, m_Mutex, m_SubmissionOperations, Ohci::ED::MetaData::pCallback, ExtensibleBitmap::set(), and OperationBarrier::tryAcquire().
|
private |
Detaches a control or bulk ED without arming SOF or restarting a list.
Definition at line 645 of file Ohci.cc.
References EMIT_IF, m_BulkListChangeLock, m_ControlListChangeLock, vtp_ed(), and IoBase::write32().
Referenced by cancelAsyncAndDrain(), removeED(), and terminalizeEDForTeardown().
Here is the caller graph for this function:
|
virtual |
Performs a transaction asynchronously.
Returning true transfers one completion obligation to the controller: it must call the callback exactly once, and only after it can no longer access any transfer buffer. Returning false guarantees that the callback was not and will not be called, and that the rejected transaction no longer owns controller or transfer-buffer state.
Implements UsbHub.
Definition at line 1383 of file Ohci.cc.
References Spinlock::acquire(), UsbHcd::TransferCompletion::arm(), EMIT_IF, m_AcceptedOperations, m_BulkListChangeLock, m_CompletionDeliveries, m_ControlListChangeLock, m_FullSchedule, m_IrqProcessingLock, m_Mutex, m_SubmissionOperations, IoBase::read32(), Spinlock::release(), retireEDStorage(), start(), ExtensibleBitmap::test(), OperationBarrier::tryAcquire(), OperationBarrier::tryEnter(), vtp_ed(), and IoBase::write32().
|
protectedvirtual |
Callback - classes are expected to inherit and override this function. It's called when a request needs to be executed (by the worker thread).
Implements RequestQueue.
Definition at line 1762 of file Ohci.cc.
References Dec, UsbHub::deviceConnected(), UsbHub::deviceDisconnected(), Hex, portReset(), and IoBase::read32().
|
staticprivate |
|
inlinevirtual |
|
inlineoverrideprotectedvirtual |
True when this execution context must not wait for a USB callback.
Reimplemented from UsbHub.
Definition at line 208 of file Ohci.h.
References UsbHcd::CallbackDeliveryQueue::isInCallbackContext().
|
overridevirtual |
IRQ handler.
Implements IrqHandler.
Definition at line 817 of file Ohci.cc.
References List< T, nodePoolSize >::begin(), UsbHcd::TransferCompletion::captureNatural(), UsbHcd::TransferCompletion::claimCaptured(), List< T, nodePoolSize >::count(), Dec, UsbHub::deferConnectionChangeIfSuppressed(), UsbHcd::CallbackDeliveryQueue::deliver(), EMIT_IF, List< T, nodePoolSize >::end(), List< T, nodePoolSize >::erase(), Hex, m_CallbackOperations, m_CompletionDeliveries, m_DequeueList, m_DequeueListLock, m_FullSchedule, m_IrqProcessingLock, m_RootHubLock, Ohci::ED::MetaData::pCallback, List< T, nodePoolSize >::popFront(), prepareCompletion(), UsbHcd::CallbackDeliveryQueue::publish(), List< T, nodePoolSize >::pushBack(), List< T, nodePoolSize >::pushFront(), Quiesced, IoBase::read32(), removeED(), setRootHubStatusChangeSource(), start(), OperationBarrier::tryAcquire(), and IoBase::write32().
|
virtual |
Gets a UsbDevice from a given vendor:product pair.
Performs a port reset for the given port. Should only be used in situations where a device cannot recover from an error without a complete reset.
| bErrorResponse | true if this is a reset as a response to an error. Error responses are allowed to use significantly longer delays in their reset logic. |
Implements UsbHub.
Definition at line 1690 of file Ohci.cc.
References m_PortResetMutex, m_RootHubLock, IoBase::read32(), setRootHubStatusChangeSource(), and IoBase::write32().
Referenced by executeRequest().
Here is the caller graph for this function:
|
private |
Builds the sole delivery record for a claimed one-shot transfer.
Definition at line 781 of file Ohci.cc.
References m_CompletionDeliveries, and reclaimTransferDescriptors().
Referenced by cancelAsyncAndDrain(), irq(), and terminalizeEDForTeardown().
Here is the caller graph for this function:
|
inlineprivate |
|
private |
Releases every TD owned by an ED after the DMA ownership boundary.
Definition at line 735 of file Ohci.cc.
References List< T, nodePoolSize >::begin(), List< T, nodePoolSize >::clear(), ExtensibleBitmap::clear(), and List< T, nodePoolSize >::end().
Referenced by prepareCompletion(), and retireEDStorage().
Here is the caller graph for this function:
|
private |
Detaches an ED and queues it for reclamation at the next frame.
Definition at line 618 of file Ohci.cc.
References detachED(), EMIT_IF, m_DequeueList, m_DequeueListLock, stop(), and IoBase::write32().
Referenced by irq().
Here is the caller graph for this function:
|
private |
Removes an ED from the next-frame reclaim list if present.
Definition at line 724 of file Ohci.cc.
References m_DequeueList, and m_DequeueListLock.
Referenced by cancelAsyncAndDrain(), and terminalizeEDForTeardown().
Here is the caller graph for this function:
|
private |
Removes an ED from the software completion schedule if present.
Definition at line 713 of file Ohci.cc.
References m_FullSchedule.
Referenced by cancelAsyncAndDrain(), and terminalizeEDForTeardown().
Here is the caller graph for this function:
|
overrideprotectedvirtual |
Re-publishes one coalesced observation in ordinary thread context.
Reimplemented from UsbHub.
Definition at line 1658 of file Ohci.cc.
References Dec, m_IrqProcessingLock, m_RootHubLock, and setRootHubStatusChangeSource().
|
private |
Releases ED metadata and its accepted-operation lease.
Definition at line 758 of file Ohci.cc.
References ExtensibleBitmap::clear(), OperationBarrier::leave(), m_AcceptedOperations, and reclaimTransferDescriptors().
Referenced by doAsync(), and terminalizeEDForTeardown().
Here is the caller graph for this function:
|
private |
Changes only the RootHubStatusChange interrupt source.
Callers hold m_RootHubLock so reset and interrupt paths cannot race the source mask.
Definition at line 598 of file Ohci.cc.
References IoBase::read32(), and IoBase::write32().
Referenced by irq(), portReset(), and replaySuppressedConnectionChange().
Here is the caller graph for this function:
|
private |
Starts processing of the given list.
Definition at line 1807 of file Ohci.cc.
References IoBase::read32(), and IoBase::write32().
Referenced by doAsync(), and irq().
Here is the caller graph for this function:
|
private |
Stops the controller from processing the given list.
Definition at line 1798 of file Ohci.cc.
References IoBase::read32(), and IoBase::write32().
Referenced by removeED().
Here is the caller graph for this function:
|
private |
Claims and materializes one ED while the suspended controller is owned.
Definition at line 796 of file Ohci.cc.
References UsbHcd::TransferCompletion::claimForTeardown(), detachED(), prepareCompletion(), List< T, nodePoolSize >::pushBack(), removeFromDequeueList(), removeFromFullSchedule(), and retireEDStorage().
|
private |
Writes HcControl and waits for the requested functional state.
Definition at line 603 of file Ohci.cc.
References panic(), IoBase::read32(), and IoBase::write32().
Referenced by cancelAsyncAndDrain().
Here is the caller graph for this function:
|
inlineprivate |
Converts a software ED pointer to a physical address.
Definition at line 264 of file Ohci.h.
Referenced by detachED(), and doAsync().
Here is the caller graph for this function:
|
staticconstexprprivate |
|
staticconstexprprivate |
|
private |
One lease per accepted one-shot or periodic subscription.
Definition at line 453 of file Ohci.h.
Referenced by doAsync(), and retireEDStorage().
|
private |
|
private |
Lock for changing the bulk list.
Definition at line 399 of file Ohci.h.
Referenced by detachED(), and doAsync().
|
private |
|
private |
Cancellation calls remain admitted until terminal callbacks drain.
Definition at line 450 of file Ohci.h.
Referenced by cancelAsyncAndDrain().
|
private |
Per-generation callback publication and cancellation drain boundary.
Definition at line 382 of file Ohci.h.
Referenced by cancelAsyncAndDrain(), doAsync(), irq(), and prepareCompletion().
|
private |
|
private |
Lock for changing the control list.
Definition at line 396 of file Ohci.h.
Referenced by detachED(), and doAsync().
|
private |
|
private |
List of EDs ready for dequeue (reclaiming)
Definition at line 436 of file Ohci.h.
Referenced by irq(), removeED(), and removeFromDequeueList().
|
private |
Dequeue list lock.
Definition at line 429 of file Ohci.h.
Referenced by irq(), removeED(), and removeFromDequeueList().
|
private |
Lock for modifying the schedule list itself (m_FullSchedule)
Definition at line 379 of file Ohci.h.
Referenced by addTransferToTransaction(), cancelAsyncAndDrain(), createTransaction(), doAsync(), irq(), and replaySuppressedConnectionChange().
|
private |
Global lock.
Definition at line 369 of file Ohci.h.
Referenced by addTransferToTransaction(), cancelAsyncAndDrain(), createTransaction(), and doAsync().
|
private |
|
private |
|
private |
|
private |
|
private |
Serializes threaded root-port resets without holding an IRQ-safe lock while waiting for hardware.
Definition at line 373 of file Ohci.h.
Referenced by portReset().
|
private |
Serializes root-hub register access between reset and IRQ paths.
Definition at line 385 of file Ohci.h.
Referenced by irq(), portReset(), and replaySuppressedConnectionChange().
|
private |
Short-lived create/build/submit operations closed before ED scanning.
Definition at line 447 of file Ohci.h.
Referenced by addTransferToTransaction(), createTransaction(), and doAsync().
|
private |