- Timestamp:
- Feb 2, 2010 6:58:33 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/pdmusb.h
r26162 r26163 106 106 * @returns VBox status. 107 107 * @param pUsbIns The USB device instance data. 108 * If the registration structure is needed, it canbe109 * access edthru pUsbDev->pReg.108 * If the registration structure is needed, it will be 109 * accessible thru pUsbDev->pReg. 110 110 * @param iInstance Instance number. Use this to figure out which registers 111 111 * and such to use. The instance number is also found in … … 654 654 R3PTRTYPE(PCPDMUSBHLP) pUsbHlp; 655 655 /** Pointer to the USB device registration structure. */ 656 R3PTRTYPE(PCPDMUSBREG) p Usb;656 R3PTRTYPE(PCPDMUSBREG) pReg; 657 657 /** Configuration handle. */ 658 658 R3PTRTYPE(PCFGMNODE) pCfg; -
trunk/src/VBox/VMM/PDM.cpp
r26162 r26163 544 544 for (PPDMUSBINS pUsbIns = pVM->pdm.s.pUsbInstances; pUsbIns; pUsbIns = pUsbIns->Internal.s.pNext) 545 545 { 546 pdmR3TermLuns(pVM, pUsbIns->Internal.s.pLuns, pUsbIns->p Usb->szDeviceName, pUsbIns->iInstance);547 548 if (pUsbIns->p Usb->pfnDestruct)546 pdmR3TermLuns(pVM, pUsbIns->Internal.s.pLuns, pUsbIns->pReg->szDeviceName, pUsbIns->iInstance); 547 548 if (pUsbIns->pReg->pfnDestruct) 549 549 { 550 550 LogFlow(("pdmR3DevTerm: Destroying - device '%s'/%d\n", 551 pUsbIns->p Usb->szDeviceName, pUsbIns->iInstance));552 pUsbIns->p Usb->pfnDestruct(pUsbIns);551 pUsbIns->pReg->szDeviceName, pUsbIns->iInstance)); 552 pUsbIns->pReg->pfnDestruct(pUsbIns); 553 553 } 554 554 … … 949 949 { 950 950 Assert(pUsbIns->Internal.s.fVMSuspended); 951 if (pUsbIns->p Usb->pfnVMPowerOn)952 { 953 LogFlow(("PDMR3PowerOn: Notifying - device '%s'/%d\n", pUsbIns->p Usb->szDeviceName, pUsbIns->iInstance));954 int rc = VINF_SUCCESS; pUsbIns->p Usb->pfnVMPowerOn(pUsbIns);951 if (pUsbIns->pReg->pfnVMPowerOn) 952 { 953 LogFlow(("PDMR3PowerOn: Notifying - device '%s'/%d\n", pUsbIns->pReg->szDeviceName, pUsbIns->iInstance)); 954 int rc = VINF_SUCCESS; pUsbIns->pReg->pfnVMPowerOn(pUsbIns); 955 955 if (RT_FAILURE(rc)) 956 956 { 957 LogRel(("PDMR3PowerOn: device '%s'/%d -> %Rrc\n", pUsbIns->p Usb->szDeviceName, pUsbIns->iInstance, rc));957 LogRel(("PDMR3PowerOn: device '%s'/%d -> %Rrc\n", pUsbIns->pReg->szDeviceName, pUsbIns->iInstance, rc)); 958 958 return rc; 959 959 } … … 1017 1017 for (PPDMLUN pLun = pUsbIns->Internal.s.pLuns; pLun && RT_SUCCESS(rc); pLun = pLun->pNext) 1018 1018 for (PPDMDRVINS pDrvIns = pLun->pTop; pDrvIns && RT_SUCCESS(rc); pDrvIns = pDrvIns->Internal.s.pDown) 1019 rc = pdmR3PowerOnDrv(pDrvIns, pUsbIns->p Usb->szDeviceName, pUsbIns->iInstance, pLun->iLun);1019 rc = pdmR3PowerOnDrv(pDrvIns, pUsbIns->pReg->szDeviceName, pUsbIns->iInstance, pLun->iLun); 1020 1020 if (RT_SUCCESS(rc)) 1021 1021 rc = pdmR3PowerOnUsb(pUsbIns); … … 1095 1095 { 1096 1096 pUsbIns->Internal.s.fVMReset = true; 1097 if (pUsbIns->p Usb->pfnVMReset)1097 if (pUsbIns->pReg->pfnVMReset) 1098 1098 { 1099 1099 if (!pUsbIns->Internal.s.pfnAsyncNotify) 1100 1100 { 1101 LogFlow(("PDMR3Reset: Notifying - device '%s'/%d\n", pUsbIns->p Usb->szDeviceName, pUsbIns->iInstance));1102 pUsbIns->p Usb->pfnVMReset(pUsbIns);1101 LogFlow(("PDMR3Reset: Notifying - device '%s'/%d\n", pUsbIns->pReg->szDeviceName, pUsbIns->iInstance)); 1102 pUsbIns->pReg->pfnVMReset(pUsbIns); 1103 1103 if (pUsbIns->Internal.s.pfnAsyncNotify) 1104 LogFlow(("PDMR3Reset: Async notification started - device '%s'/%d\n", pUsbIns->p Usb->szDeviceName, pUsbIns->iInstance));1104 LogFlow(("PDMR3Reset: Async notification started - device '%s'/%d\n", pUsbIns->pReg->szDeviceName, pUsbIns->iInstance)); 1105 1105 } 1106 1106 else if (pUsbIns->Internal.s.pfnAsyncNotify(pUsbIns)) 1107 1107 { 1108 LogFlow(("PDMR3Reset: Async notification completed - device '%s'/%d\n", pUsbIns->p Usb->szDeviceName, pUsbIns->iInstance));1108 LogFlow(("PDMR3Reset: Async notification completed - device '%s'/%d\n", pUsbIns->pReg->szDeviceName, pUsbIns->iInstance)); 1109 1109 pUsbIns->Internal.s.pfnAsyncNotify = NULL; 1110 1110 } … … 1232 1232 for (PPDMLUN pLun = pUsbIns->Internal.s.pLuns; pLun; pLun = pLun->pNext) 1233 1233 for (PPDMDRVINS pDrvIns = pLun->pTop; pDrvIns; pDrvIns = pDrvIns->Internal.s.pDown) 1234 if (!pdmR3ResetDrv(pDrvIns, &cAsync, pUsbIns->p Usb->szDeviceName, pUsbIns->iInstance, pLun->iLun))1234 if (!pdmR3ResetDrv(pDrvIns, &cAsync, pUsbIns->pReg->szDeviceName, pUsbIns->iInstance, pLun->iLun)) 1235 1235 break; 1236 1236 … … 1321 1321 { 1322 1322 pUsbIns->Internal.s.fVMSuspended = true; 1323 if (pUsbIns->p Usb->pfnVMSuspend)1323 if (pUsbIns->pReg->pfnVMSuspend) 1324 1324 { 1325 1325 if (!pUsbIns->Internal.s.pfnAsyncNotify) 1326 1326 { 1327 LogFlow(("PDMR3Suspend: Notifying - device '%s'/%d\n", pUsbIns->p Usb->szDeviceName, pUsbIns->iInstance));1328 pUsbIns->p Usb->pfnVMSuspend(pUsbIns);1327 LogFlow(("PDMR3Suspend: Notifying - device '%s'/%d\n", pUsbIns->pReg->szDeviceName, pUsbIns->iInstance)); 1328 pUsbIns->pReg->pfnVMSuspend(pUsbIns); 1329 1329 if (pUsbIns->Internal.s.pfnAsyncNotify) 1330 LogFlow(("PDMR3Suspend: Async notification started - device '%s'/%d\n", pUsbIns->p Usb->szDeviceName, pUsbIns->iInstance));1330 LogFlow(("PDMR3Suspend: Async notification started - device '%s'/%d\n", pUsbIns->pReg->szDeviceName, pUsbIns->iInstance)); 1331 1331 } 1332 1332 else if (pUsbIns->Internal.s.pfnAsyncNotify(pUsbIns)) 1333 1333 { 1334 LogFlow(("PDMR3Suspend: Async notification completed - device '%s'/%d\n", pUsbIns->p Usb->szDeviceName, pUsbIns->iInstance));1334 LogFlow(("PDMR3Suspend: Async notification completed - device '%s'/%d\n", pUsbIns->pReg->szDeviceName, pUsbIns->iInstance)); 1335 1335 pUsbIns->Internal.s.pfnAsyncNotify = NULL; 1336 1336 } … … 1438 1438 for (PPDMLUN pLun = pUsbIns->Internal.s.pLuns; pLun; pLun = pLun->pNext) 1439 1439 for (PPDMDRVINS pDrvIns = pLun->pTop; pDrvIns; pDrvIns = pDrvIns->Internal.s.pDown) 1440 if (!pdmR3SuspendDrv(pDrvIns, &cAsync, pUsbIns->p Usb->szDeviceName, pUsbIns->iInstance, pLun->iLun))1440 if (!pdmR3SuspendDrv(pDrvIns, &cAsync, pUsbIns->pReg->szDeviceName, pUsbIns->iInstance, pLun->iLun)) 1441 1441 break; 1442 1442 … … 1507 1507 { 1508 1508 Assert(pUsbIns->Internal.s.fVMSuspended); 1509 if (pUsbIns->p Usb->pfnVMResume)1510 { 1511 LogFlow(("PDMR3Resume: Notifying - device '%s'/%d\n", pUsbIns->p Usb->szDeviceName, pUsbIns->iInstance));1512 int rc = VINF_SUCCESS; pUsbIns->p Usb->pfnVMResume(pUsbIns);1509 if (pUsbIns->pReg->pfnVMResume) 1510 { 1511 LogFlow(("PDMR3Resume: Notifying - device '%s'/%d\n", pUsbIns->pReg->szDeviceName, pUsbIns->iInstance)); 1512 int rc = VINF_SUCCESS; pUsbIns->pReg->pfnVMResume(pUsbIns); 1513 1513 if (RT_FAILURE(rc)) 1514 1514 { 1515 LogRel(("PDMR3Resume: device '%s'/%d -> %Rrc\n", pUsbIns->p Usb->szDeviceName, pUsbIns->iInstance, rc));1515 LogRel(("PDMR3Resume: device '%s'/%d -> %Rrc\n", pUsbIns->pReg->szDeviceName, pUsbIns->iInstance, rc)); 1516 1516 return rc; 1517 1517 } … … 1575 1575 for (PPDMLUN pLun = pUsbIns->Internal.s.pLuns; pLun && RT_SUCCESS(rc); pLun = pLun->pNext) 1576 1576 for (PPDMDRVINS pDrvIns = pLun->pTop; pDrvIns && RT_SUCCESS(rc); pDrvIns = pDrvIns->Internal.s.pDown) 1577 rc = pdmR3ResumeDrv(pDrvIns, pUsbIns->p Usb->szDeviceName, pUsbIns->iInstance, pLun->iLun);1577 rc = pdmR3ResumeDrv(pDrvIns, pUsbIns->pReg->szDeviceName, pUsbIns->iInstance, pLun->iLun); 1578 1578 if (RT_SUCCESS(rc)) 1579 1579 rc = pdmR3ResumeUsb(pUsbIns); … … 1653 1653 { 1654 1654 pUsbIns->Internal.s.fVMSuspended = true; 1655 if (pUsbIns->p Usb->pfnVMPowerOff)1655 if (pUsbIns->pReg->pfnVMPowerOff) 1656 1656 { 1657 1657 if (!pUsbIns->Internal.s.pfnAsyncNotify) 1658 1658 { 1659 LogFlow(("PDMR3PowerOff: Notifying - device '%s'/%d\n", pUsbIns->p Usb->szDeviceName, pUsbIns->iInstance));1660 pUsbIns->p Usb->pfnVMPowerOff(pUsbIns);1659 LogFlow(("PDMR3PowerOff: Notifying - device '%s'/%d\n", pUsbIns->pReg->szDeviceName, pUsbIns->iInstance)); 1660 pUsbIns->pReg->pfnVMPowerOff(pUsbIns); 1661 1661 if (pUsbIns->Internal.s.pfnAsyncNotify) 1662 LogFlow(("PDMR3PowerOff: Async notification started - device '%s'/%d\n", pUsbIns->p Usb->szDeviceName, pUsbIns->iInstance));1662 LogFlow(("PDMR3PowerOff: Async notification started - device '%s'/%d\n", pUsbIns->pReg->szDeviceName, pUsbIns->iInstance)); 1663 1663 } 1664 1664 else if (pUsbIns->Internal.s.pfnAsyncNotify(pUsbIns)) 1665 1665 { 1666 LogFlow(("PDMR3PowerOff: Async notification completed - device '%s'/%d\n", pUsbIns->p Usb->szDeviceName, pUsbIns->iInstance));1666 LogFlow(("PDMR3PowerOff: Async notification completed - device '%s'/%d\n", pUsbIns->pReg->szDeviceName, pUsbIns->iInstance)); 1667 1667 pUsbIns->Internal.s.pfnAsyncNotify = NULL; 1668 1668 } … … 1763 1763 for (PPDMLUN pLun = pUsbIns->Internal.s.pLuns; pLun; pLun = pLun->pNext) 1764 1764 for (PPDMDRVINS pDrvIns = pLun->pTop; pDrvIns; pDrvIns = pDrvIns->Internal.s.pDown) 1765 if (!pdmR3PowerOffDrv(pDrvIns, &cAsync, pUsbIns->p Usb->szDeviceName, pUsbIns->iInstance, pLun->iLun))1765 if (!pdmR3PowerOffDrv(pDrvIns, &cAsync, pUsbIns->pReg->szDeviceName, pUsbIns->iInstance, pLun->iLun)) 1766 1766 break; 1767 1767 -
trunk/src/VBox/VMM/PDMDriver.cpp
r26162 r26163 502 502 pNew, pDrv->pReg->szDriverName, pNew->iInstance, 503 503 pLun->iLun, 504 pLun->pDevIns ? pLun->pDevIns->pReg->szDeviceName : pLun->pUsbIns->p Usb->szDeviceName,504 pLun->pDevIns ? pLun->pDevIns->pReg->szDeviceName : pLun->pUsbIns->pReg->szDeviceName, 505 505 pLun->pDevIns ? pLun->pDevIns->iInstance : pLun->pUsbIns->iInstance, 506 506 pDrvAbove, pDrvAbove ? pDrvAbove->pReg->szDriverName : "", pDrvAbove ? pDrvAbove->iInstance : -1));
Note:
See TracChangeset
for help on using the changeset viewer.