[USBOHCI_NEW] Bring-in the USB OHCI miniport driver created by Vadim Galyant.#30
[USBOHCI_NEW] Bring-in the USB OHCI miniport driver created by Vadim Galyant.#30AmineKhaldi wants to merge 196 commits intoreactos:usbohci_newfrom
Conversation
| // &OperationalRegs->HcRhPortStatus[Port-1].AsULONG); | ||
|
|
||
| if ( portStatus && !(portStatus & 0xFFE0FCE0) ) | ||
| break; |
There was a problem hiding this comment.
What is status 0xFFE0FCE0 ?
| OperationalRegs = OhciExtension->OperationalRegs; | ||
|
|
||
| WRITE_REGISTER_ULONG(&OperationalRegs->HcRhPortStatus[Port-1].AsULONG, | ||
| 2); |
There was a problem hiding this comment.
Please use a constant for this
| OperationalRegs = OhciExtension->OperationalRegs; | ||
|
|
||
| WRITE_REGISTER_ULONG(&OperationalRegs->HcRhPortStatus[Port-1].AsULONG, | ||
| 4); |
There was a problem hiding this comment.
Please use a constant for this
| OperationalRegs = OhciExtension->OperationalRegs; | ||
|
|
||
| WRITE_REGISTER_ULONG(&OperationalRegs->HcRhPortStatus[Port-1].AsULONG, | ||
| 1); |
There was a problem hiding this comment.
please use a constant for this
| OperationalRegs = OhciExtension->OperationalRegs; | ||
|
|
||
| WRITE_REGISTER_ULONG(&OperationalRegs->HcRhPortStatus[Port-1].AsULONG, | ||
| 0x200); |
There was a problem hiding this comment.
please use a constant for this
| OperationalRegs = OhciExtension->OperationalRegs; | ||
|
|
||
| WRITE_REGISTER_ULONG(&OperationalRegs->HcRhPortStatus[Port-1].AsULONG, | ||
| 8); |
There was a problem hiding this comment.
please use a constant for this
| OperationalRegs = OhciExtension->OperationalRegs; | ||
|
|
||
| WRITE_REGISTER_ULONG(&OperationalRegs->HcRhPortStatus[Port-1].AsULONG, | ||
| 0x20000); |
There was a problem hiding this comment.
please use a constant for this
| OperationalRegs = OhciExtension->OperationalRegs; | ||
|
|
||
| WRITE_REGISTER_ULONG(&OperationalRegs->HcRhPortStatus[Port-1].AsULONG, | ||
| 0x10000); |
There was a problem hiding this comment.
please use a constant for this
| OperationalRegs = OhciExtension->OperationalRegs; | ||
|
|
||
| WRITE_REGISTER_ULONG(&OperationalRegs->HcRhPortStatus[Port-1].AsULONG, | ||
| 0x100000); |
There was a problem hiding this comment.
please use a constant for this
| OperationalRegs = OhciExtension->OperationalRegs; | ||
|
|
||
| WRITE_REGISTER_ULONG(&OperationalRegs->HcRhPortStatus[Port-1].AsULONG, | ||
| 0x40000); |
There was a problem hiding this comment.
please use a constant for this
| if (Port) | ||
| { | ||
| WRITE_REGISTER_ULONG(&OperationalRegs->HcRhPortStatus[Port-1].AsULONG, | ||
| 0x80000); |
| else | ||
| { | ||
| WRITE_REGISTER_ULONG(&OperationalRegs->HcRhStatus.AsULONG, | ||
| 0x20000); |
| DPRINT("OHCI_RH_DisableIrq: OhciExtension - %p\n", OhciExtension); | ||
|
|
||
| WRITE_REGISTER_ULONG(&OhciExtension->OperationalRegs->HcInterruptDisable.AsULONG, | ||
| 0x40); |
| DPRINT("OHCI_RH_EnableIrq: OhciExtension - %p\n", OhciExtension); | ||
|
|
||
| WRITE_REGISTER_ULONG(&OhciExtension->OperationalRegs->HcInterruptEnable.AsULONG, | ||
| 0x40); |
| { | ||
| InsertHeadList(HeadLink, &ED->HcdEDLink); | ||
|
|
||
| if (HeadED->Type & 0x20) // ControlTransfer or BulkTransfer |
| DPRINT_OHCI("OHCI_QueryEndpointRequirements: IsoTransfer\n"); | ||
| *((PULONG)EndpointRequirements + 1) = 0x10000; | ||
| *EndpointRequirements = sizeof(OHCI_HCD_ED) + | ||
| 0x40 * sizeof(OHCI_HCD_TD); |
| DPRINT_OHCI("OHCI_QueryEndpointRequirements: ControlTransfer\n"); | ||
| *((PULONG)EndpointRequirements + 1) = 0x10000; | ||
| *EndpointRequirements = sizeof(OHCI_HCD_ED) + | ||
| 0x26 * sizeof(OHCI_HCD_TD); |
| NTAPI | ||
| OHCI_SubmitTransfer(IN PVOID ohciExtension, | ||
| IN PVOID ohciEndpoint, | ||
| IN PVOID transferParameters, |
There was a problem hiding this comment.
I missed this the first time around: should this always be PUSBPORT_TRANSFER_PARAMETERS?
| IN PVOID ohciEndpoint, | ||
| IN PVOID transferParameters, | ||
| IN PVOID ohciTransfer, | ||
| IN PVOID sgList) |
There was a problem hiding this comment.
... and this PUSBPORT_SCATTER_GATHER_LIST?
| NTAPI | ||
| OHCI_SubmitIsoTransfer(IN PVOID ohciExtension, | ||
| IN PVOID ohciEndpoint, | ||
| IN PVOID transferParameters, |
There was a problem hiding this comment.
... and the same here for SubmitIsoTransfer?
| OhciExtension, | ||
| Port); | ||
|
|
||
| ASSERT(Port >= 0); |
There was a problem hiding this comment.
The issue here got fixed by moving the StatusReg assignment inside each if block. The assert is not needed (and is a tautology since USHORT is always >= 0)
No description provided.