mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 06:53:37 +00:00
[CMAKE]
- Sync with trunk 50501 - fix a couple of merge artifacts (indentation) svn path=/branches/cmake-bringup/; revision=50505
This commit is contained in:
parent
e2b7eacdd5
commit
8191f95396
40 changed files with 844 additions and 1333 deletions
|
@ -48,10 +48,10 @@ EhciDefferedRoutine(PKDPC Dpc, PVOID DeferredContext, PVOID SystemArgument1, PVO
|
|||
PQUEUE_HEAD CompletedQH, NextQH;
|
||||
PQUEUE_TRANSFER_DESCRIPTOR CompletedTD, NextTD;
|
||||
|
||||
/* AsyncListAddr Register will have the next QueueHead to execute */
|
||||
/* AsyncListAddr Register will have the next QueueHead to execute */
|
||||
CurrentAddr = GetAsyncListQueueRegister(hcd);
|
||||
|
||||
/* Calculate the VA for the next QueueHead */
|
||||
/* Calculate the VA for the next QueueHead */
|
||||
OffSet = CurrentAddr - (ULONG)FdoDeviceExtension->hcd.CommonBufferPA.LowPart;
|
||||
NextQH = (PQUEUE_HEAD)((ULONG)FdoDeviceExtension->hcd.CommonBufferVA + OffSet);
|
||||
|
||||
|
@ -62,14 +62,14 @@ EhciDefferedRoutine(PKDPC Dpc, PVOID DeferredContext, PVOID SystemArgument1, PVO
|
|||
|
||||
//DumpQueueHead(CompletedQH);
|
||||
|
||||
/* Free memory for the Descriptors */
|
||||
/* Free memory for the Descriptors */
|
||||
CompletedTD = CompletedQH->TransferDescriptor;
|
||||
NextTD = CompletedTD;
|
||||
while (NextTD)
|
||||
{
|
||||
CompletedTD = NextTD;
|
||||
NextTD = NextTD->NextDescriptor;
|
||||
FreeDescriptor(CompletedTD);
|
||||
FreeDescriptor(CompletedTD);
|
||||
}
|
||||
|
||||
/* If the Event is set then release waiter */
|
||||
|
@ -80,19 +80,19 @@ EhciDefferedRoutine(PKDPC Dpc, PVOID DeferredContext, PVOID SystemArgument1, PVO
|
|||
|
||||
/* Free the Mdl if there was one */
|
||||
if(CompletedQH->MdlToFree)
|
||||
IoFreeMdl(CompletedQH->MdlToFree);
|
||||
IoFreeMdl(CompletedQH->MdlToFree);
|
||||
|
||||
/* Is there an IRP that needs to be completed */
|
||||
if (CompletedQH->IrpToComplete)
|
||||
{
|
||||
PIRP Irp;
|
||||
PIO_STACK_LOCATION Stack;
|
||||
PURB Urb;
|
||||
PIRP Irp;
|
||||
PIO_STACK_LOCATION Stack;
|
||||
PURB Urb;
|
||||
|
||||
Irp = CompletedQH->IrpToComplete;
|
||||
Stack = IoGetCurrentIrpStackLocation(Irp);
|
||||
ASSERT(Stack);
|
||||
Urb = (PURB) Stack->Parameters.Others.Argument1;
|
||||
Stack = IoGetCurrentIrpStackLocation(Irp);
|
||||
ASSERT(Stack);
|
||||
Urb = (PURB) Stack->Parameters.Others.Argument1;
|
||||
|
||||
/* Check for error */
|
||||
if (CStatus & EHCI_ERROR_INT)
|
||||
|
|
|
@ -538,7 +538,8 @@ NTSTATUS HandleUrbRequest(PPDO_DEVICE_EXTENSION PdoDeviceExtension, PIRP Irp)
|
|||
}
|
||||
|
||||
if (!(PdoDeviceExtension->Ports[Urb->UrbControlVendorClassRequest.Index-1].PortStatus & 0x8000))
|
||||
CompletePendingURBRequest(PdoDeviceExtension);
|
||||
CompletePendingURBRequest(PdoDeviceExtension);
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -635,19 +636,19 @@ CompletePendingURBRequest(PPDO_DEVICE_EXTENSION DeviceExtension)
|
|||
KeReleaseSpinLock(&DeviceExtension->IrpQueueLock, oldIrql);
|
||||
return;
|
||||
}
|
||||
NextIrp = RemoveHeadList(&DeviceExtension->IrpQueue);
|
||||
Irp = CONTAINING_RECORD(NextIrp, IRP, Tail.Overlay.ListEntry);
|
||||
NextIrp = RemoveHeadList(&DeviceExtension->IrpQueue);
|
||||
Irp = CONTAINING_RECORD(NextIrp, IRP, Tail.Overlay.ListEntry);
|
||||
|
||||
if (!Irp)
|
||||
{
|
||||
if (!Irp)
|
||||
{
|
||||
DPRINT1("No Irp\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
IoSetCancelRoutine(Irp, NULL);
|
||||
KeReleaseSpinLock(&DeviceExtension->IrpQueueLock, oldIrql);
|
||||
IoSetCancelRoutine(Irp, NULL);
|
||||
KeReleaseSpinLock(&DeviceExtension->IrpQueueLock, oldIrql);
|
||||
|
||||
HandleUrbRequest(DeviceExtension, Irp);
|
||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||
HandleUrbRequest(DeviceExtension, Irp);
|
||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||
}
|
||||
|
||||
|
|
|
@ -159,18 +159,18 @@ SubmitControlTransfer(PEHCI_HOST_CONTROLLER hcd,
|
|||
|
||||
if (TransferBuffer)
|
||||
{
|
||||
/* Allocate Mdl for Buffer */
|
||||
pMdl = IoAllocateMdl(TransferBuffer,
|
||||
TransferBufferLength,
|
||||
FALSE,
|
||||
FALSE,
|
||||
NULL);
|
||||
/* Allocate Mdl for Buffer */
|
||||
pMdl = IoAllocateMdl(TransferBuffer,
|
||||
TransferBufferLength,
|
||||
FALSE,
|
||||
FALSE,
|
||||
NULL);
|
||||
|
||||
/* Lock Physical Pages */
|
||||
MmBuildMdlForNonPagedPool(pMdl);
|
||||
//MmProbeAndLockPages(pMdl, KernelMode, IoReadAccess);
|
||||
/* Lock Physical Pages */
|
||||
MmBuildMdlForNonPagedPool(pMdl);
|
||||
//MmProbeAndLockPages(pMdl, KernelMode, IoReadAccess);
|
||||
|
||||
MdlPhysicalAddr = MmGetPhysicalAddress((PVOID)TransferBuffer).LowPart;
|
||||
MdlPhysicalAddr = MmGetPhysicalAddress((PVOID)TransferBuffer).LowPart;
|
||||
}
|
||||
|
||||
QueueHead = CreateQueueHead(hcd);
|
||||
|
@ -187,8 +187,8 @@ SubmitControlTransfer(PEHCI_HOST_CONTROLLER hcd,
|
|||
|
||||
if (TransferBuffer)
|
||||
{
|
||||
Descriptor[1] = CreateDescriptor(hcd,
|
||||
PID_CODE_IN_TOKEN,
|
||||
Descriptor[1] = CreateDescriptor(hcd,
|
||||
PID_CODE_IN_TOKEN,
|
||||
TransferBufferLength);
|
||||
}
|
||||
|
||||
|
@ -202,10 +202,10 @@ SubmitControlTransfer(PEHCI_HOST_CONTROLLER hcd,
|
|||
|
||||
if (TransferBuffer)
|
||||
{
|
||||
Descriptor[0]->NextDescriptor = Descriptor[1];
|
||||
Descriptor[1]->NextDescriptor = Descriptor[2];
|
||||
Descriptor[1]->PreviousDescriptor = Descriptor[0];
|
||||
Descriptor[2]->PreviousDescriptor = Descriptor[1];
|
||||
Descriptor[0]->NextDescriptor = Descriptor[1];
|
||||
Descriptor[1]->NextDescriptor = Descriptor[2];
|
||||
Descriptor[1]->PreviousDescriptor = Descriptor[0];
|
||||
Descriptor[2]->PreviousDescriptor = Descriptor[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -218,8 +218,8 @@ SubmitControlTransfer(PEHCI_HOST_CONTROLLER hcd,
|
|||
|
||||
if (TransferBuffer)
|
||||
{
|
||||
Descriptor[1]->BufferPointer[0] = MdlPhysicalAddr;
|
||||
Descriptor[0]->NextPointer = Descriptor[1]->PhysicalAddr;
|
||||
Descriptor[1]->BufferPointer[0] = MdlPhysicalAddr;
|
||||
Descriptor[0]->NextPointer = Descriptor[1]->PhysicalAddr;
|
||||
Descriptor[1]->NextPointer = Descriptor[2]->PhysicalAddr;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <ntifs.h>
|
||||
#include <ntddk.h>
|
||||
#include <stdio.h>
|
||||
#define NDEBUG
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
#include <hubbusif.h>
|
||||
#include <usbioctl.h>
|
||||
|
@ -12,16 +12,17 @@
|
|||
|
||||
#define USB_POOL_TAG (ULONG)'ebsu'
|
||||
|
||||
#define DEVICEINTIALIZED 0x01
|
||||
#define DEVICESTARTED 0x02
|
||||
#define DEVICEBUSY 0x04
|
||||
#define DEVICESTOPPED 0x08
|
||||
#define DEVICESTALLED 0x10
|
||||
#define DEVICEINTIALIZED 0x01
|
||||
#define DEVICESTARTED 0x02
|
||||
#define DEVICEBUSY 0x04
|
||||
#define DEVICESTOPPED 0x08
|
||||
#define DEVICESTALLED 0x10
|
||||
#define DEVICEREMOVED 0x20
|
||||
#define DEVICEREMOVED 0x20
|
||||
|
||||
|
||||
#define MAX_USB_DEVICES 127
|
||||
#define EHCI_MAX_SIZE_TRANSFER 0x100000
|
||||
#define MAX_USB_DEVICES 127
|
||||
#define EHCI_MAX_SIZE_TRANSFER 0x100000
|
||||
|
||||
#define C_HUB_LOCAL_POWER 0
|
||||
#define C_HUB_OVER_CURRENT 1
|
||||
|
|
|
@ -338,7 +338,7 @@ RemoveUsbDevice(PVOID BusContext, PUSB_DEVICE_HANDLE DeviceHandle, ULONG Flags)
|
|||
case USBD_MARK_DEVICE_BUSY:
|
||||
UsbDevice->DeviceState |= DEVICEBUSY;
|
||||
/* Fall through */
|
||||
case USBD_KEEP_DEVICE_DATA:
|
||||
case USBD_KEEP_DEVICE_DATA:
|
||||
UsbDevice->DeviceState |= DEVICEREMOVED;
|
||||
break;
|
||||
default:
|
||||
|
@ -469,9 +469,9 @@ QueryDeviceInformation(PVOID BusContext,
|
|||
}
|
||||
else
|
||||
{
|
||||
DeviceInfo->CurrentConfigurationValue = UsbDevice->ActiveConfig->ConfigurationDescriptor.bConfigurationValue;
|
||||
DeviceInfo->CurrentConfigurationValue = UsbDevice->ActiveConfig->ConfigurationDescriptor.bConfigurationValue;
|
||||
/* FIXME: Use correct number of open pipes instead of all available */
|
||||
DeviceInfo->NumberOfOpenPipes = UsbDevice->ActiveInterface->InterfaceDescriptor.bNumEndpoints;
|
||||
DeviceInfo->NumberOfOpenPipes = UsbDevice->ActiveInterface->InterfaceDescriptor.bNumEndpoints;
|
||||
DeviceInfo->PortNumber = UsbDevice->Port;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue