Changeset 27686 in vbox for trunk/src/VBox/Devices/USB
- Timestamp:
- Mar 24, 2010 9:00:35 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/USB/DevOHCI.cpp
r27290 r27686 4524 4524 #endif 4525 4525 4526 4527 4526 /* Write to clear any of the change bits: CSC, PESC, PSSC, OCIC and PRSC */ 4528 if ( val & OHCI_PORT_W_CLEAR_CHANGE_MASK)4527 if (val & OHCI_PORT_W_CLEAR_CHANGE_MASK) 4529 4528 p->fReg &= ~(val & OHCI_PORT_W_CLEAR_CHANGE_MASK); 4530 4529 4531 if ( val & OHCI_PORT_W_CLEAR_ENABLE)4530 if (val & OHCI_PORT_W_CLEAR_ENABLE) 4532 4531 { 4533 4532 p->fReg &= ~OHCI_PORT_R_ENABLE_STATUS; … … 4535 4534 } 4536 4535 4537 if ( rhport_set_if_connected(&pOhci->RootHub, i, val & OHCI_PORT_W_SET_ENABLE))4536 if (rhport_set_if_connected(&pOhci->RootHub, i, val & OHCI_PORT_W_SET_ENABLE)) 4538 4537 Log2(("HcRhPortStatus_w(): port %u: ENABLE\n", i)); 4539 4538 4540 if ( rhport_set_if_connected(&pOhci->RootHub, i, val & OHCI_PORT_W_SET_SUSPEND))4539 if (rhport_set_if_connected(&pOhci->RootHub, i, val & OHCI_PORT_W_SET_SUSPEND)) 4541 4540 Log2(("HcRhPortStatus_w(): port %u: SUSPEND - not implemented correctly!!!\n", i)); 4542 4541 4543 if (val & OHCI_PORT_W_SET_RESET) { 4544 if ( rhport_set_if_connected(&pOhci->RootHub, i, val & OHCI_PORT_W_SET_RESET) ) 4542 if (val & OHCI_PORT_W_SET_RESET) 4543 { 4544 if (rhport_set_if_connected(&pOhci->RootHub, i, val & OHCI_PORT_W_SET_RESET)) 4545 4545 { 4546 4546 PVM pVM = PDMDevHlpGetVM(pOhci->CTX_SUFF(pDevIns)); … … 4548 4548 VUSBIDevReset(p->pDev, false /* don't reset on linux */, uchi_port_reset_done, pOhci, pVM); 4549 4549 } 4550 else if ( p->fReg & OHCI_PORT_R_RESET_STATUS)4550 else if (p->fReg & OHCI_PORT_R_RESET_STATUS) 4551 4551 { 4552 4552 /* the guest is getting impatient. */ … … 4556 4556 } 4557 4557 4558 if ( !(pOhci->RootHub.desc_a & OHCI_RHA_NPS))4558 if (!(pOhci->RootHub.desc_a & OHCI_RHA_NPS)) 4559 4559 { 4560 4560 /** @todo To implement per-device power-switching … … 4562 4562 * sure it isn't gang powered 4563 4563 */ 4564 if ( val & OHCI_PORT_W_CLEAR_POWER)4564 if (val & OHCI_PORT_W_CLEAR_POWER) 4565 4565 rhport_power(&pOhci->RootHub, i, false /* power down */); 4566 if ( val & OHCI_PORT_W_SET_POWER)4566 if (val & OHCI_PORT_W_SET_POWER) 4567 4567 rhport_power(&pOhci->RootHub, i, true /* power up */); 4568 4568 } 4569 4569 4570 4570 /** @todo r=frank: ClearSuspendStatus. Timing? */ 4571 if ( val & OHCI_PORT_W_CLEAR_SUSPEND_STATUS)4571 if (val & OHCI_PORT_W_CLEAR_SUSPEND_STATUS) 4572 4572 { 4573 4573 rhport_power(&pOhci->RootHub, i, true /* power up */); … … 4576 4576 } 4577 4577 4578 if ( p->fReg != old_state)4578 if (p->fReg != old_state) 4579 4579 { 4580 4580 uint32_t res = p->fReg; … … 5280 5280 pOhci->PciDev.config[0x0b] = 0xc; 5281 5281 pOhci->PciDev.config[0x3d] = 0x01; 5282 pOhci->RootHub.pOhci = pOhci; 5282 5283 pOhci->RootHub.IBase.pfnQueryInterface = ohciRhQueryInterface; 5283 5284 pOhci->RootHub.IRhPort.pfnGetAvailablePorts = ohciRhGetAvailablePorts;
Note:
See TracChangeset
for help on using the changeset viewer.