VirtualBox

Changeset 104124 in vbox for trunk/src


Ignore:
Timestamp:
Mar 30, 2024 11:14:59 AM (10 months ago)
Author:
vboxsync
Message:

OHCI: Comments, typos.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/USB/DevOHCI.cpp

    r99739 r104124  
    7272 *         the host memory.
    7373 *
     74 * The guest can set the SKIP bit in an endpoint to pause USB traffic on
     75 * that endpoint. If we see the bit set, we need to cancel any URBs that might
     76 * be queued on that particular endpoint.
     77 *
     78 * In some situations, we might miss seeing the SKIP bit. Additionally, the
     79 * guest is not forced to set the SKIP bit and might rearrange the transfer
     80 * descriptors at any time, or remove EDs from the list entirely. We must
     81 * therefore keep track of which endpoints have URBs already in flight, and
     82 * cancel any and all such URBs if we detect that the guest is no longer
     83 * attempting to perform any transfers on them.
     84 *
     85 * When we submit a URB, we note the corresponding endpoint and transfer
     86 * descriptor information. URB completion checks if the descriptors in
     87 * guest memory are still the same; if not, the URB is effectively thrown
     88 * away (and nothing is placed on the corresponding done queue).
     89 *
     90 * For control and interrupt endpoints, we convert each TD into a URB. No
     91 * attempt is made to pipeline the traffic and submit multiple URBs for an
     92 * endpoint.
     93 *
     94 * For bulk endpoints, we use heuristics to decide when multiple TDs should
     95 * be coalesced into a single URB. This logic helps among others with MSDs
     96 * which tend to transfer data in larger chunks, such as 32 or 64 KB.
     97 *
    7498 * As for error handling OHCI allows for 3 retries before failing a transfer,
    7599 * an error count is stored in each transfer descriptor. A halt flag is also
    76100 * stored in the transfer descriptor. That allows for ED's to be disabled
    77  * without stopping the bus and de-queuing them.
     101 * by the HC without stopping the bus and de-queuing them.
    78102 *
    79103 * When the bus is started and stopped we call VUSBIDevPowerOn/Off() on our
     
    146170/* Macro to query the number of currently configured ports. */
    147171#define OHCI_NDP_CFG(pohci) ((pohci)->RootHub.desc_a & OHCI_RHA_NDP)
    148 /** Macro to convert a EHCI port index (zero based) to a VUSB roothub port ID (one based). */
     172/** Macro to convert an OHCI port index (zero based) to a VUSB roothub port ID (one based). */
    149173#define OHCI_PORT_2_VUSB_PORT(a_uPort) ((a_uPort) + 1)
    150174
     
    165189    RTGCPHYS32      TdAddr;
    166190    /** A copy of the TD. */
    167     uint32_t        TdCopy[16];
     191    uint32_t        TdCopy[8];
    168192} VUSBURBHCITDINT;
    169193
     
    34533477    {
    34543478        Log(("ITdAddr=%RX32 PSW%d.CC=%#x < 'Not Accessed'!\n", ITdAddr, R, pITd->aPSW[R] >> ITD_PSW_CC_SHIFT)); /* => Unrecoverable Error*/
    3455         pThis->intr_status |= OHCI_INTR_UNRECOVERABLE_ERROR;
     3479        ohciR3RaiseUnrecoverableError(pDevIns, pThis, 9);
    34563480        return false;
    34573481    }
     
    35793603     * hierarchy described in the documenation. This means that for an isochronous endpoint
    35803604     * with a 1 ms interval we expect to find in-flight TDs at the head of the list. We will
    3581      * skip over all in-flight TDs which timeframe has been exceed. Those which aren't in
     3605     * skip over all in-flight TDs whose timeframe has been exceeded. Those which aren't in
    35823606     * flight but which are too late will be retired (possibly out of order, but, we don't
    35833607     * care right now).
     
    37603784# if 1
    37613785            /*
    3762 
    37633786             * After we figured out that all the TDs submitted for dealing with MSD
    37643787             * read/write data really makes up on single URB, and that we must
     
    41814204                        pThisCC->aInFlight[j].fInactive = false;
    41824205                    TdAddr = Td.NextTD & ED_PTR_MASK;
    4183                     /* See #8125.
     4206                    /* See @bugref{8125}.
    41844207                     * Sometimes the ED is changed by the guest between ohciR3ReadEd above and here.
    41854208                     * Then the code reads TD pointed by the new TailP, which is not allowed.
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette