VirtualBox

Changeset 43458 in vbox


Ignore:
Timestamp:
Sep 28, 2012 6:52:23 AM (12 years ago)
Author:
vboxsync
Message:

Devices/Parallel: reverted all the extra debug logs that were added to debug the user parallel port issue. The problem has been fixed.

File:
1 edited

Legend:

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

    r43454 r43458  
    351351        return 0;
    352352    }
    353 
     353    /* This loop is based on the fact that only one resourece is assigned to
     354     * the LPT port. If multiple resources (address range) are assigned to
     355     * to LPT port, it will pick and return the last one
     356     */
    354357    for (;;)
    355358    {
     
    383386        if (pBuf)
    384387            u32ParportAddr = ((IO_DES *)pBuf)->IOD_Alloc_Base;
    385         else
    386             LogFlowFunc(("pBuf Not Available \n"));
    387388        LogFlowFunc(("called GetIOResource, ret=%#x\n", u32ParportAddr));
    388389        rdPrevResDes = 0;
     
    421422    hDevInfo = SetupDiGetClassDevs(NULL, 0, 0, DIGCF_PRESENT | DIGCF_ALLCLASSES);
    422423    if (hDevInfo == INVALID_HANDLE_VALUE)
    423     {
    424         LogFlowFunc(("Invalid Handle \n"));
    425424        return VERR_INVALID_HANDLE;
    426     }
    427425
    428426    /* Enumerate through all devices in Set. */
     
    443441                if (pBuf)
    444442                    RTMemFree(pBuf);
    445                  /* Max size will never be more than 2048 bytes */
    446                 if (dwBufSize > 1024 || dwBufSize < 0)
    447                     dwBufSize = 1024;
    448443                pBuf = (uint8_t *)RTMemAlloc(dwBufSize * 2);
    449444            }
    450445            else
    451446            {
     447                /* No need to bother about this error (in most cases its errno=13,
     448                 * INVALID_DATA . Just break from here and proceed to next device
     449                 * enumerated item
     450                 */
    452451                LogFlow(("GetDevProp Error = %d & dwBufSz = %d\n", GetLastError(), dwBufSize));
    453452                break;
    454453            }
    455454        }
    456         if(pBuf)
    457             LogFlowFunc(("Got Device Entity %s\n", pBuf));
     455
    458456        if (RTStrStr((char*)pBuf, "LPT"))
    459457        {
     
    505503                LogFlowFunc(("u32Parport Addr No Available \n"));
    506504            if (pThis->fParportAvail)
    507             {
    508                 LogFlow(("Parport found . Break from inner loop \n"));
    509505                break;
    510             }
    511         }
    512         else
    513         {
    514             LogFlow(("LPT: Parallel Port not available \n"));
    515506        }
    516507        if (pBuf)
     
    518509        if (pThis->fParportAvail)
    519510        {
    520             LogFlow(("Parport Available. Break from outer loop \n"));
    521511            /* Parallel port address has been found. No need to iterate further. */
    522512            break;
     
    626616        rc = RTErrConvertFromErrno(errno);
    627617# else /* VBOX_WITH_WIN_PARPORT_SUP */
    628     if (!pThis->fParportAvail)
    629         LogFlowFunc(("Parport Not Available\n"));
    630     //if (pThis->fParportAvail)
     618    if (pThis->fParportAvail)
    631619    {
    632620        for (size_t i = 0; i < cbWrite; i++)
     
    671659        rc = RTErrConvertFromErrno(errno);
    672660# else  /* VBOX_WITH_WIN_PARPORT_SUP */
    673     if (!pThis->fParportAvail)
    674         LogFlowFunc(("Parport Not Available\n"));
    675     //if (pThis->fParportAvail)
     661    if (pThis->fParportAvail)
    676662    {
    677663        *((uint8_t*)(pvBuf)) = 0; /* Initialize the buffer. */
     
    703689    uint64_t u64Data;
    704690    u64Data = (uint8_t)iMode;
    705     if (!pThis->fParportAvail)
    706         LogFlowFunc(("Parport Not available\n"));
    707     //if (pThis->fParportAvail)
    708     {
    709         LogFlowFunc(("calling R0 to SetPortDirection, data=%#x\n", u64Data));
     691    if (pThis->fParportAvail)
     692    {
     693        LogFlowFunc(("calling R0 to write CTRL, data=%#x\n", u64Data));
    710694        rc = PDMDrvHlpCallR0(pThis->CTX_SUFF(pDrvIns), DRVHOSTPARALLELR0OP_SETPORTDIRECTION, u64Data);
    711695        AssertRC(rc);
     
    732716    uint64_t u64Data;
    733717    u64Data = (uint8_t)fReg;
    734     if (!pThis->fParportAvail)
    735         LogFlowFunc(("Parport Not Available\n"));
    736     //if (pThis->fParportAvail)
     718    if (pThis->fParportAvail)
    737719    {
    738720        LogFlowFunc(("calling R0 to write CTRL, data=%#x\n", u64Data));
     
    766748# else /* VBOX_WITH_WIN_PARPORT_SUP */
    767749    *pfReg = 0; /* Initialize the buffer*/
    768     if (!pThis->fParportAvail)
    769         LogFlowFunc(("Parport Not Available\n"));
    770     //if (pThis->fParportAvail)
     750    if (pThis->fParportAvail)
    771751    {
    772752        LogFlowFunc(("calling R0 to read control from parallel port\n"));
     
    788768    int rcLnx = 0;
    789769    uint8_t fReg = 0;
    790     LogFlowFunc(("%d Status  Reg\n", *pfReg));
    791770# ifndef  VBOX_WITH_WIN_PARPORT_SUP
    792771    rcLnx = ioctl(RTFileToNative(pThis->hFileDevice), PPRSTATUS, &fReg);
     
    800779# else /* VBOX_WITH_WIN_PARPORT_SUP */
    801780    *pfReg = 0; /* Intialize the buffer. */
    802     if (!pThis->fParportAvail)
    803         LogFlowFunc(("fParport Not Available.. Error!!!!!!!!!! \n"));
    804     //if (pThis->fParportAvail)
    805     {
    806         LogFlowFunc(("calling R0 to read status from parallel port. fParport should be available\n"));
     781    if (pThis->fParportAvail)
     782    {
     783        LogFlowFunc(("calling R0 to read status from parallel port\n"));
    807784        rc = PDMDrvHlpCallR0(pThis->CTX_SUFF(pDrvIns), DRVHOSTPARALLELR0OP_READSTATUS, 0);
    808785        AssertRC(rc);
    809         LogFlow(("value read from status = %d\n", *pfReg));
    810786        *pfReg = pThis->u8ReadInStatus;
    811787    }
    812 
    813788# endif /* VBOX_WITH_WIN_PARPORT_SUP */
    814789    return rc;
     
    10501025        rc = RTFileOpen(&pThis->hWinFileDevice, (char *)pThis->szParportName,
    10511026                        RTFILE_O_READWRITE | RTFILE_O_OPEN | RTFILE_O_DENY_NONE);
    1052         LogFlowFunc(("RTFileOpen Return = %d\n", rc));
    10531027    }
    10541028#endif
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