VirtualBox

Changeset 43383 in vbox for trunk/src/VBox/Devices/Parallel


Ignore:
Timestamp:
Sep 21, 2012 8:12:41 AM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
80854
Message:

Devices/Parallel: Added more debug statements for enhanced logging.. Need to give debug build to user for debugging. Will revert the changes soon.

Location:
trunk/src/VBox/Devices/Parallel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Parallel/DevParallel.cpp

    r40280 r43383  
    475475                    rc = VINF_IOM_R3_IOPORT_READ;
    476476#else
     477                    LogFlow(("Read Status \n"));
    477478                    if (RT_LIKELY(pThis->pDrvHostParallelConnector))
    478479                    {
     480                        LogFlow(("Call to Read Status \n"));
    479481                        rc = pThis->pDrvHostParallelConnector->pfnReadStatus(pThis->pDrvHostParallelConnector, &pThis->regStatus);
    480482                        AssertRC(rc);
    481483                    }
    482484                    *pu32 = pThis->regStatus;
     485
     486                    LogFlow(("Call to parallel IRQ . Status=%d\n", *pu32));
    483487                    parallelIrqClear(pThis);
    484488#endif
  • trunk/src/VBox/Devices/Parallel/DrvHostParallel.cpp

    r43093 r43383  
    403403    hDevInfo = SetupDiGetClassDevs(NULL, 0, 0, DIGCF_PRESENT | DIGCF_ALLCLASSES);
    404404    if (hDevInfo == INVALID_HANDLE_VALUE)
     405    {
     406        LogFlowFunc(("Invalid Handle \n"));
    405407        return VERR_INVALID_HANDLE;
     408    }
    406409
    407410    /* Enumerate through all devices in Set. */
     
    424427        }
    425428        if(!pBuf)
     429        {
     430            LogFlowFunc(("No Memory to save ParportString\n"));
    426431            return VERR_NO_MEMORY;
    427 
     432        }
     433        LogFlowFunc(("%s\n", (char*)pBuf));
    428434        if (RTStrStr((char*)pBuf, "LPT"))
    429435        {
     
    472478                pThis->u32LptAddrStatus  = pThis->u32LptAddr + STATUS_REG_OFFSET;
    473479            }
     480            else
     481                LogFlowFunc(("u32Parport Addr No Available \n"));
    474482            if (pThis->fParportAvail)
     483            {
     484                LogFlow(("Parport found . Break from inner loop \n"));
    475485                break;
     486            }
    476487        }
     488        else
     489            LogFlow(("LPT: Parallel Port not available \n"));
    477490        if (pBuf)
    478491            RTMemFree(pBuf);
    479492        if (pThis->fParportAvail)
    480493        {
     494            LogFlow(("Parport Available. Break from outer loop \n"));
    481495            /* Parallel port address has been found. No need to iterate further. */
    482496            break;
     
    586600        rc = RTErrConvertFromErrno(errno);
    587601# else /* VBOX_WITH_WIN_PARPORT_SUP */
    588     if (pThis->fParportAvail)
     602    if (!pThis->fParportAvail)
     603        LogFlowFunc(("Parport Not Available\n"));
     604    //if (pThis->fParportAvail)
    589605    {
    590606        for (size_t i = 0; i < cbWrite; i++)
     
    629645        rc = RTErrConvertFromErrno(errno);
    630646# else  /* VBOX_WITH_WIN_PARPORT_SUP */
    631     if (pThis->fParportAvail)
     647    if (!pThis->fParportAvail)
     648        LogFlowFunc(("Parport Not Available\n"));
     649    //if (pThis->fParportAvail)
    632650    {
    633651        *((uint8_t*)(pvBuf)) = 0; /* Initialize the buffer. */
     
    659677    uint64_t u64Data;
    660678    u64Data = (uint8_t)iMode;
    661     LogFlowFunc(("calling R0 to write CTRL, data=%#x\n", u64Data));
    662     if (pThis->fParportAvail)
    663     {
     679    if (!pThis->fParportAvail)
     680        LogFlowFunc(("Parport Not available\n"));
     681    //if (pThis->fParportAvail)
     682    {
     683        LogFlowFunc(("calling R0 to SetPortDirection, data=%#x\n", u64Data));
    664684        rc = PDMDrvHlpCallR0(pThis->CTX_SUFF(pDrvIns), DRVHOSTPARALLELR0OP_SETPORTDIRECTION, u64Data);
    665685        AssertRC(rc);
     
    686706    uint64_t u64Data;
    687707    u64Data = (uint8_t)fReg;
    688     LogFlowFunc(("calling R0 to write CTRL, data=%#x\n", u64Data));
    689     if (pThis->fParportAvail)
    690     {
     708    if (!pThis->fParportAvail)
     709        LogFlowFunc(("Parport Not Available\n"));
     710    //if (pThis->fParportAvail)
     711    {
     712        LogFlowFunc(("calling R0 to write CTRL, data=%#x\n", u64Data));
    691713        rc = PDMDrvHlpCallR0(pThis->CTX_SUFF(pDrvIns), DRVHOSTPARALLELR0OP_WRITECONTROL, u64Data);
    692714        AssertRC(rc);
     
    718740# else /* VBOX_WITH_WIN_PARPORT_SUP */
    719741    *pfReg = 0; /* Initialize the buffer*/
    720     if (pThis->fParportAvail)
     742    if (!pThis->fParportAvail)
     743        LogFlowFunc(("Parport Not Available\n"));
     744    //if (pThis->fParportAvail)
    721745    {
    722746        LogFlowFunc(("calling R0 to read control from parallel port\n"));
     
    738762    int rcLnx = 0;
    739763    uint8_t fReg = 0;
     764    LogFlowFunc(("%d Status  Reg\n", *pfReg));
    740765# ifndef  VBOX_WITH_WIN_PARPORT_SUP
    741766    rcLnx = ioctl(RTFileToNative(pThis->hFileDevice), PPRSTATUS, &fReg);
     
    749774# else /* VBOX_WITH_WIN_PARPORT_SUP */
    750775    *pfReg = 0; /* Intialize the buffer. */
    751     if (pThis->fParportAvail)
    752     {
    753         LogFlowFunc(("calling R0 to read status from parallel port\n"));
     776    if (!pThis->fParportAvail)
     777        LogFlowFunc(("fParport Not Available.. Error!!!!!!!!!! \n"));
     778    //if (pThis->fParportAvail)
     779    {
     780        LogFlowFunc(("calling R0 to read status from parallel port. fParport should be available\n"));
    754781        rc = PDMDrvHlpCallR0(pThis->CTX_SUFF(pDrvIns), DRVHOSTPARALLELR0OP_READSTATUS, 0);
    755782        AssertRC(rc);
     783        LogFlow(("value read from status = %d\n", *pfReg));
    756784        *pfReg = pThis->u8ReadInStatus;
    757785    }
     786
    758787# endif /* VBOX_WITH_WIN_PARPORT_SUP */
    759788    return rc;
     
    9951024        rc = RTFileOpen(&pThis->hWinFileDevice, (char *)pThis->szParportName,
    9961025                        RTFILE_O_READWRITE | RTFILE_O_OPEN | RTFILE_O_DENY_NONE);
     1026        LogFlowFunc(("RTFileOpen Return = %d\n", rc));
    9971027    }
    9981028#endif
Note: See TracChangeset for help on using the changeset viewer.

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