Changeset 43393 in vbox for trunk/src/VBox/Devices/Parallel
- Timestamp:
- Sep 21, 2012 10:54:07 AM (12 years ago)
- Location:
- trunk/src/VBox/Devices/Parallel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Parallel/DevParallel.cpp
r43383 r43393 475 475 rc = VINF_IOM_R3_IOPORT_READ; 476 476 #else 477 LogFlow(("Read Status \n"));478 477 if (RT_LIKELY(pThis->pDrvHostParallelConnector)) 479 478 { 480 LogFlow(("Call to Read Status \n"));481 479 rc = pThis->pDrvHostParallelConnector->pfnReadStatus(pThis->pDrvHostParallelConnector, &pThis->regStatus); 482 480 AssertRC(rc); 483 481 } 484 482 *pu32 = pThis->regStatus; 485 486 LogFlow(("Call to parallel IRQ . Status=%d\n", *pu32));487 483 parallelIrqClear(pThis); 488 484 #endif -
trunk/src/VBox/Devices/Parallel/DrvHostParallel.cpp
r43383 r43393 403 403 hDevInfo = SetupDiGetClassDevs(NULL, 0, 0, DIGCF_PRESENT | DIGCF_ALLCLASSES); 404 404 if (hDevInfo == INVALID_HANDLE_VALUE) 405 {406 LogFlowFunc(("Invalid Handle \n"));407 405 return VERR_INVALID_HANDLE; 408 }409 406 410 407 /* Enumerate through all devices in Set. */ … … 427 424 } 428 425 if(!pBuf) 429 {430 LogFlowFunc(("No Memory to save ParportString\n"));431 426 return VERR_NO_MEMORY; 432 } 433 LogFlowFunc(("%s\n", (char*)pBuf)); 427 434 428 if (RTStrStr((char*)pBuf, "LPT")) 435 429 { … … 478 472 pThis->u32LptAddrStatus = pThis->u32LptAddr + STATUS_REG_OFFSET; 479 473 } 480 else481 LogFlowFunc(("u32Parport Addr No Available \n"));482 474 if (pThis->fParportAvail) 483 {484 LogFlow(("Parport found . Break from inner loop \n"));485 475 break; 486 }487 476 } 488 else489 LogFlow(("LPT: Parallel Port not available \n"));490 477 if (pBuf) 491 478 RTMemFree(pBuf); 492 479 if (pThis->fParportAvail) 493 480 { 494 LogFlow(("Parport Available. Break from outer loop \n"));495 481 /* Parallel port address has been found. No need to iterate further. */ 496 482 break; … … 600 586 rc = RTErrConvertFromErrno(errno); 601 587 # else /* VBOX_WITH_WIN_PARPORT_SUP */ 602 if (!pThis->fParportAvail) 603 LogFlowFunc(("Parport Not Available\n")); 604 //if (pThis->fParportAvail) 588 if (pThis->fParportAvail) 605 589 { 606 590 for (size_t i = 0; i < cbWrite; i++) … … 645 629 rc = RTErrConvertFromErrno(errno); 646 630 # else /* VBOX_WITH_WIN_PARPORT_SUP */ 647 if (!pThis->fParportAvail) 648 LogFlowFunc(("Parport Not Available\n")); 649 //if (pThis->fParportAvail) 631 if (pThis->fParportAvail) 650 632 { 651 633 *((uint8_t*)(pvBuf)) = 0; /* Initialize the buffer. */ … … 677 659 uint64_t u64Data; 678 660 u64Data = (uint8_t)iMode; 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)); 661 LogFlowFunc(("calling R0 to write CTRL, data=%#x\n", u64Data)); 662 if (pThis->fParportAvail) 663 { 684 664 rc = PDMDrvHlpCallR0(pThis->CTX_SUFF(pDrvIns), DRVHOSTPARALLELR0OP_SETPORTDIRECTION, u64Data); 685 665 AssertRC(rc); … … 706 686 uint64_t u64Data; 707 687 u64Data = (uint8_t)fReg; 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)); 688 LogFlowFunc(("calling R0 to write CTRL, data=%#x\n", u64Data)); 689 if (pThis->fParportAvail) 690 { 713 691 rc = PDMDrvHlpCallR0(pThis->CTX_SUFF(pDrvIns), DRVHOSTPARALLELR0OP_WRITECONTROL, u64Data); 714 692 AssertRC(rc); … … 740 718 # else /* VBOX_WITH_WIN_PARPORT_SUP */ 741 719 *pfReg = 0; /* Initialize the buffer*/ 742 if (!pThis->fParportAvail) 743 LogFlowFunc(("Parport Not Available\n")); 744 //if (pThis->fParportAvail) 720 if (pThis->fParportAvail) 745 721 { 746 722 LogFlowFunc(("calling R0 to read control from parallel port\n")); … … 762 738 int rcLnx = 0; 763 739 uint8_t fReg = 0; 764 LogFlowFunc(("%d Status Reg\n", *pfReg));765 740 # ifndef VBOX_WITH_WIN_PARPORT_SUP 766 741 rcLnx = ioctl(RTFileToNative(pThis->hFileDevice), PPRSTATUS, &fReg); … … 774 749 # else /* VBOX_WITH_WIN_PARPORT_SUP */ 775 750 *pfReg = 0; /* Intialize the buffer. */ 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")); 751 if (pThis->fParportAvail) 752 { 753 LogFlowFunc(("calling R0 to read status from parallel port\n")); 781 754 rc = PDMDrvHlpCallR0(pThis->CTX_SUFF(pDrvIns), DRVHOSTPARALLELR0OP_READSTATUS, 0); 782 755 AssertRC(rc); 783 LogFlow(("value read from status = %d\n", *pfReg));784 756 *pfReg = pThis->u8ReadInStatus; 785 757 } 786 787 758 # endif /* VBOX_WITH_WIN_PARPORT_SUP */ 788 759 return rc; … … 1024 995 rc = RTFileOpen(&pThis->hWinFileDevice, (char *)pThis->szParportName, 1025 996 RTFILE_O_READWRITE | RTFILE_O_OPEN | RTFILE_O_DENY_NONE); 1026 LogFlowFunc(("RTFileOpen Return = %d\n", rc));1027 997 } 1028 998 #endif
Note:
See TracChangeset
for help on using the changeset viewer.