Changeset 81031 in vbox for trunk/src/VBox/Devices/USB
- Timestamp:
- Sep 26, 2019 7:26:33 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 133634
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/USB/DevOHCI.cpp
r80704 r81031 255 255 typedef struct OHCI 256 256 { 257 /** The PCI device. */258 PDMPCIDEV PciDev;259 260 257 /** Pointer to the device instance - R3 ptr. */ 261 258 PPDMDEVINSR3 pDevInsR3; … … 4256 4253 pThis->dqic = 0x7; 4257 4254 4258 Log(("ohci: %s: Bus started\n", pThis->PciDev.pszNameR3));4255 Log(("ohci: Bus started\n")); 4259 4256 4260 4257 pThis->SofTime = PDMDevHlpTMTimeVirtGet(pThis->CTX_SUFF(pDevIns)); … … 4994 4991 if ((val & (OHCI_RHA_NDP | OHCI_RHA_DT)) != OHCI_NDP_CFG(pThis)) 4995 4992 { 4996 Log(("ohci: %s: invalid write to NDP or DT in roothub descriptor A!!! val=0x%.8x\n", 4997 pThis->PciDev.pszNameR3, val)); 4993 Log(("ohci: invalid write to NDP or DT in roothub descriptor A!!! val=0x%.8x\n", val)); 4998 4994 val &= ~(OHCI_RHA_NDP | OHCI_RHA_DT); 4999 4995 val |= OHCI_NDP_CFG(pThis); … … 5030 5026 5031 5027 if ( pThis->RootHub.desc_b != val ) 5032 Log(("ohci: %s: unsupported write to root descriptor B!!! 0x%.8x -> 0x%.8x\n", 5033 pThis->PciDev.pszNameR3, pThis->RootHub.desc_b, val)); 5028 Log(("ohci: unsupported write to root descriptor B!!! 0x%.8x -> 0x%.8x\n", pThis->RootHub.desc_b, val)); 5034 5029 pThis->RootHub.desc_b = val; 5035 5030 return VINF_SUCCESS; … … 5075 5070 { 5076 5071 unsigned i; 5077 Log2(("ohci: %s: global power up\n", pThis->PciDev.pszNameR3));5072 Log2(("ohci: global power up\n")); 5078 5073 for (i = 0; i < OHCI_NDP_CFG(pThis); i++) 5079 5074 ohciR3RhPortPower(&pThis->RootHub, i, true /* power up */); … … 5084 5079 { 5085 5080 unsigned i; 5086 Log2(("ohci: %s: global power down\n", pThis->PciDev.pszNameR3));5081 Log2(("ohci: global power down\n")); 5087 5082 for (i = 0; i < OHCI_NDP_CFG(pThis); i++) 5088 5083 ohciR3RhPortPower(&pThis->RootHub, i, false /* power down */); … … 5468 5463 RTGCPHYS GCPhysAddress, RTGCPHYS cb, PCIADDRESSSPACE enmType) 5469 5464 { 5470 RT_NOREF(iRegion, enmType); 5471 POHCI pThis = (POHCI)pPciDev; 5465 POHCI pThis = PDMINS_2_DATA(pDevIns, POHCI); 5466 RT_NOREF(pPciDev, iRegion, enmType); 5467 Assert(pPciDev == pDevIns->apPciDevs[0]); 5468 5472 5469 int rc = PDMDevHlpMMIORegister(pDevIns, GCPhysAddress, cb, NULL /*pvUser*/, 5473 5470 IOMMMIO_FLAGS_READ_DWORD | IOMMMIO_FLAGS_WRITE_DWORD_ZEROED … … 5961 5958 pThis->pDevInsRC = PDMDEVINS_2_RCPTR(pDevIns); 5962 5959 5963 PCIDevSetVendorId (&pThis->PciDev, 0x106b); 5964 PCIDevSetDeviceId (&pThis->PciDev, 0x003f); 5965 PCIDevSetClassProg (&pThis->PciDev, 0x10); /* OHCI */ 5966 PCIDevSetClassSub (&pThis->PciDev, 0x03); 5967 PCIDevSetClassBase (&pThis->PciDev, 0x0c); 5968 PCIDevSetInterruptPin (&pThis->PciDev, 0x01); 5960 PPDMPCIDEV pPciDev = pDevIns->apPciDevs[0]; 5961 PDMPCIDEV_ASSERT_VALID(pDevIns, pPciDev); 5962 5963 PDMPciDevSetVendorId(pPciDev, 0x106b); 5964 PDMPciDevSetDeviceId(pPciDev, 0x003f); 5965 PDMPciDevSetClassProg(pPciDev, 0x10); /* OHCI */ 5966 PDMPciDevSetClassSub(pPciDev, 0x03); 5967 PDMPciDevSetClassBase(pPciDev, 0x0c); 5968 PDMPciDevSetInterruptPin(pPciDev, 0x01); 5969 5969 #ifdef VBOX_WITH_MSI_DEVICES 5970 P CIDevSetStatus (&pThis->PciDev,VBOX_PCI_STATUS_CAP_LIST);5971 P CIDevSetCapabilityList(&pThis->PciDev, 0x80);5970 PDMPciDevSetStatus(pPciDev, VBOX_PCI_STATUS_CAP_LIST); 5971 PDMPciDevSetCapabilityList(pPciDev, 0x80); 5972 5972 #endif 5973 5973 … … 6013 6013 * Register PCI device and I/O region. 6014 6014 */ 6015 rc = PDMDevHlpPCIRegister(pDevIns, &pThis->PciDev);6015 rc = PDMDevHlpPCIRegister(pDevIns, pPciDev); 6016 6016 if (RT_FAILURE(rc)) 6017 6017 return rc; … … 6026 6026 if (RT_FAILURE(rc)) 6027 6027 { 6028 P CIDevSetCapabilityList(&pThis->PciDev, 0x0);6028 PDMPciDevSetCapabilityList(pPciDev, 0x0); 6029 6029 /* That's OK, we can work without MSI */ 6030 6030 }
Note:
See TracChangeset
for help on using the changeset viewer.