ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
April 2011
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
19 participants
296 discussions
Start a n
N
ew thread
[jimtabor] 51403: [Win32k] - Replace patch point for forced DC removal. See bug 6119.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Tue Apr 19 17:18:05 2011 New Revision: 51403 URL:
http://svn.reactos.org/svn/reactos?rev=51403&view=rev
Log: [Win32k] - Replace patch point for forced DC removal. See bug 6119. Modified: trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c Modified: trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c [iso-8859-1] Tue Apr 19 17:18:05 2011 @@ -868,6 +868,10 @@ Entry->UserData = NULL; } break; + + case GDI_OBJECT_TYPE_DC: +// DC_FreeDcAttr(hObject); + break; } return NULL != hObject
13 years, 8 months
1
0
0
0
[mjmartin] 51402: [USBEHCI_NEW] - Initialize the MemoryManager only after allocating a CommonBuffer to pass to it. - Create a QueueHead to put into the AsyncList Register.
by mjmartin@svn.reactos.org
Author: mjmartin Date: Tue Apr 19 15:06:26 2011 New Revision: 51402 URL:
http://svn.reactos.org/svn/reactos?rev=51402&view=rev
Log: [USBEHCI_NEW] - Initialize the MemoryManager only after allocating a CommonBuffer to pass to it. - Create a QueueHead to put into the AsyncList Register. Modified: branches/usb-bringup/drivers/usb/usbehci_new/hardware.cpp branches/usb-bringup/drivers/usb/usbehci_new/usb_queue.cpp Modified: branches/usb-bringup/drivers/usb/usbehci_new/hardware.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbehci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbehci_new/hardware.cpp [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbehci_new/hardware.cpp [iso-8859-1] Tue Apr 19 15:06:26 2011 @@ -97,8 +97,10 @@ EHCI_CAPS m_Capabilities; USHORT m_VendorID; USHORT m_DeviceID; + PQUEUE_HEAD AsyncQueueHead; PUSBQUEUE m_UsbQueue; PDMAMEMORYMANAGER m_MemoryManager; + VOID SetCommandRegister(PEHCI_USBCMD_CONTENT UsbCmd); VOID GetCommandRegister(PEHCI_USBCMD_CONTENT UsbCmd); ULONG EHCI_READ_REGISTER_ULONG(ULONG Offset); @@ -155,16 +157,6 @@ if (!NT_SUCCESS(Status)) { DPRINT1("Failed to create UsbQueue!\n"); - return Status; - } - - // - // Initialize the DMAMemoryManager - // - Status = m_MemoryManager->Initialize(this, &m_Lock, PAGE_SIZE * 4, VirtualBase, PhysicalAddress, 32); - if (!NT_SUCCESS(Status)) - { - DPRINT1("Failed to initialize the DMAMemoryManager\n"); return Status; } @@ -250,6 +242,7 @@ ULONG Index, Count; PCM_PARTIAL_RESOURCE_DESCRIPTOR ResourceDescriptor; DEVICE_DESCRIPTION DeviceDescription; + PHYSICAL_ADDRESS AsyncPhysicalAddress; PVOID ResourceBase; NTSTATUS Status; @@ -383,6 +376,16 @@ return Status; // + // Initialize the DMAMemoryManager + // + Status = m_MemoryManager->Initialize(this, &m_Lock, PAGE_SIZE * 4, VirtualBase, PhysicalAddress, 32); + if (!NT_SUCCESS(Status)) + { + DPRINT1("Failed to initialize the DMAMemoryManager\n"); + return Status; + } + + // // Initialize the UsbQueue now that we have an AdapterObject. // Status = m_UsbQueue->Initialize(PUSBHARDWAREDEVICE(this), m_Adapter, NULL); @@ -392,10 +395,29 @@ return Status; } + // + // Create a queuehead for the Async Register + // + m_MemoryManager->Allocate(sizeof(QUEUE_HEAD), (PVOID*)&AsyncQueueHead, &AsyncPhysicalAddress); + + AsyncQueueHead->AlternateNextPointer = TERMINATE_POINTER; + AsyncQueueHead->NextPointer = TERMINATE_POINTER; + AsyncQueueHead->PhysicalAddr = AsyncPhysicalAddress.LowPart; + AsyncQueueHead->HorizontalLinkPointer = AsyncQueueHead->PhysicalAddr | QH_TYPE_QH; + AsyncQueueHead->EndPointCharacteristics.QEDTDataToggleControl = FALSE; + AsyncQueueHead->Token.Bits.InterruptOnComplete = FALSE; + AsyncQueueHead->EndPointCharacteristics.HeadOfReclamation = TRUE; + AsyncQueueHead->Token.Bits.Halted = TRUE; + AsyncQueueHead->EndPointCharacteristics.MaximumPacketLength = 64; + AsyncQueueHead->EndPointCharacteristics.NakCountReload = 0xF; + AsyncQueueHead->EndPointCharacteristics.EndPointSpeed = QH_ENDPOINT_HIGHSPEED; + AsyncQueueHead->EndPointCapabilities.NumberOfTransactionPerFrame = 0x03; + + SetAsyncListRegister(AsyncQueueHead->PhysicalAddr); + // // Start the controller // - DPRINT1("Starting Controller\n"); return StartController(); } Modified: branches/usb-bringup/drivers/usb/usbehci_new/usb_queue.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbehci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbehci_new/usb_queue.cpp [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbehci_new/usb_queue.cpp [iso-8859-1] Tue Apr 19 15:06:26 2011 @@ -93,9 +93,6 @@ // KeInitializeSpinLock(&m_Lock); - // - // FIXME: Need to set AsyncRegister with a QUEUEHEAD - // return Status; }
13 years, 8 months
1
0
0
0
[mjmartin] 51401: [USBEHCI_NEW] - hub_controller: Implement Status Change Endpoint for RootHub. Handling the URB can return STATUS_PENDING, as in the new SCE code. Check for this before completing ...
by mjmartin@svn.reactos.org
Author: mjmartin Date: Tue Apr 19 13:57:32 2011 New Revision: 51401 URL:
http://svn.reactos.org/svn/reactos?rev=51401&view=rev
Log: [USBEHCI_NEW] - hub_controller: Implement Status Change Endpoint for RootHub. Handling the URB can return STATUS_PENDING, as in the new SCE code. Check for this before completing the Irp. Uncomment calls to PortStatus, SetPortFeature, and ClearPortStatus now that they are implemented. - For function receiving a port number check that its not larger than the actual number of ports on the controller. Modified: branches/usb-bringup/drivers/usb/usbehci_new/hardware.cpp branches/usb-bringup/drivers/usb/usbehci_new/hub_controller.cpp branches/usb-bringup/drivers/usb/usbehci_new/usb_request.cpp Modified: branches/usb-bringup/drivers/usb/usbehci_new/hardware.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbehci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbehci_new/hardware.cpp [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbehci_new/hardware.cpp [iso-8859-1] Tue Apr 19 13:57:32 2011 @@ -602,6 +602,9 @@ { ULONG PortStatus; + if (PortIndex > m_Capabilities.HCSParams.PortCount) + return STATUS_UNSUCCESSFUL; + PortStatus = EHCI_READ_REGISTER_ULONG(EHCI_PORTSC + (4 * PortIndex)); if (PortStatus & EHCI_PRT_SLOWSPEEDLINE) { @@ -640,7 +643,8 @@ return STATUS_SUCCESS; } -NTSTATUS CUSBHardwareDevice::GetPortStatus( +NTSTATUS +CUSBHardwareDevice::GetPortStatus( ULONG PortId, OUT USHORT *PortStatus, OUT USHORT *PortChange) @@ -648,6 +652,11 @@ ULONG Value; USHORT Status = 0, Change = 0; + DPRINT1("CUSBHardwareDevice::GetPortStatus\n"); + + if (PortId > m_Capabilities.HCSParams.PortCount) + return STATUS_UNSUCCESSFUL; + // // Get the value of the Port Status and Control Register // @@ -703,15 +712,27 @@ if (Value & EHCI_PRT_ENABLEDSTATUSCHANGE) Change |= USB_PORT_STATUS_ENABLE; + *PortStatus = Status; + *PortChange = Change; + + //HACK: Maybe + if (Status == (USB_PORT_STATUS_HIGH_SPEED | USB_PORT_STATUS_CONNECT | USB_PORT_STATUS_POWER)) + *PortChange = USB_PORT_STATUS_CONNECT; return STATUS_SUCCESS; } -NTSTATUS CUSBHardwareDevice::ClearPortStatus( +NTSTATUS +CUSBHardwareDevice::ClearPortStatus( ULONG PortId, ULONG Status) { ULONG Value; + + DPRINT1("CUSBHardwareDevice::ClearPortStatus\n"); + + if (PortId > m_Capabilities.HCSParams.PortCount) + return STATUS_UNSUCCESSFUL; Value = EHCI_READ_REGISTER_ULONG(EHCI_PORTSC + (4 * PortId)); @@ -737,18 +758,26 @@ } -NTSTATUS CUSBHardwareDevice::SetPortFeature( +NTSTATUS +CUSBHardwareDevice::SetPortFeature( ULONG PortId, ULONG Feature) { ULONG Value; + DPRINT1("CUSBHardwareDevice::SetPortFeature\n"); + + if (PortId > m_Capabilities.HCSParams.PortCount) + return STATUS_UNSUCCESSFUL; + Value = EHCI_READ_REGISTER_ULONG(EHCI_PORTSC + (4 * PortId)); + if (Feature == PORT_ENABLE) { // // FIXME: EHCI Ports can only be disabled via reset // + DPRINT1("PORT_ENABLE not supported for EHCI\n"); } if (Feature == PORT_RESET) @@ -757,7 +786,6 @@ { DPRINT1("Non HighSpeed device. Releasing Ownership\n"); } - // // Reset and clean enable // @@ -769,17 +797,21 @@ } if (Feature == PORT_POWER) - DPRINT1("Not implemented\n"); - - return STATUS_SUCCESS; -} - -VOID CUSBHardwareDevice::SetAsyncListRegister(ULONG PhysicalAddress) + DPRINT1("PORT_POWER Not implemented\n"); + + return STATUS_SUCCESS; +} + +VOID +CUSBHardwareDevice::SetAsyncListRegister( + ULONG PhysicalAddress) { EHCI_WRITE_REGISTER_ULONG(EHCI_ASYNCLISTBASE, PhysicalAddress); } -VOID CUSBHardwareDevice::SetPeriodicListRegister(ULONG PhysicalAddress) +VOID +CUSBHardwareDevice::SetPeriodicListRegister( + ULONG PhysicalAddress) { EHCI_WRITE_REGISTER_ULONG(EHCI_PERIODICLISTBASE, PhysicalAddress); } Modified: branches/usb-bringup/drivers/usb/usbehci_new/hub_controller.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbehci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbehci_new/hub_controller.cpp [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbehci_new/hub_controller.cpp [iso-8859-1] Tue Apr 19 13:57:32 2011 @@ -90,6 +90,7 @@ RTL_BITMAP m_DeviceAddressBitmap; PULONG m_DeviceAddressBitmapBuffer; LIST_ENTRY m_UsbDeviceList; + PIRP m_PendingSCEIrp; }; typedef struct @@ -692,6 +693,60 @@ IN OUT PIRP Irp, PURB Urb) { + ULONG PortCount, PortId; + USHORT PortStatus, PortChange; + + // + // First check if the request is for the Status Change Endpoint + // + + // + // Is the Request for the root hub + // + if (Urb->UrbHeader.UsbdDeviceHandle==0) + { + // + // There should only be one SCE request pending at a time + // + ASSERT (m_PendingSCEIrp == NULL); + + // + // Get the number of ports and check each one for device connected + // + m_Hardware->GetDeviceDetails(NULL, NULL, &PortCount, NULL); + DPRINT1("SCE Request\n"); + DPRINT1("PortCount %d\n", PortCount); + ((PULONG)Urb->UrbBulkOrInterruptTransfer.TransferBuffer)[0] = 0; + for (PortId = 0; PortId < PortCount; PortId++) + { + m_Hardware->GetPortStatus(PortId, &PortStatus, &PortChange); + + DPRINT1("Port %d: Status %x, Change %x\n", PortId, PortStatus, PortChange); + + // + // FIXME: Verify that this is correct. + // + if ((PortStatus & USB_PORT_STATUS_CONNECT) && (PortChange & USB_PORT_STATUS_CONNECT)) + { + DPRINT1("Device is connected on port %d\n", PortId); + ((PUCHAR)Urb->UrbBulkOrInterruptTransfer.TransferBuffer)[0] = 1 << ((PortId + 1) & 7); + break; + } + } + + // + // If there were changes then return SUCCESS + // + if (((PULONG)Urb->UrbBulkOrInterruptTransfer.TransferBuffer)[0] != 0) + return STATUS_SUCCESS; + + // + // Else pend the IRP, to be completed when a device connects or disconnects. + // + m_PendingSCEIrp = Irp; + IoMarkIrpPending(Irp); + return STATUS_PENDING; + } UNIMPLEMENTED return STATUS_NOT_IMPLEMENTED; } @@ -743,9 +798,8 @@ // // get port status // - //Status = m_Hardware->GetPortStatus(PortId, &PortStatus, &PortChange); - - Status = STATUS_SUCCESS; + Status = m_Hardware->GetPortStatus(PortId, &PortStatus, &PortChange); + if (NT_SUCCESS(Status)) { // @@ -771,10 +825,10 @@ switch (Urb->UrbControlVendorClassRequest.Value) { case C_PORT_CONNECTION: - //Status = m_Hardware->ClearPortStatus(PortId, C_PORT_CONNECTION); + Status = m_Hardware->ClearPortStatus(PortId, C_PORT_CONNECTION); break; case C_PORT_RESET: - //Status= m_Hardware->ClearPortStatus(PortId, C_PORT_RESET); + Status= m_Hardware->ClearPortStatus(PortId, C_PORT_RESET); break; default: DPRINT("Unknown Value for Clear Feature %x \n", Urb->UrbControlVendorClassRequest.Value); @@ -806,7 +860,7 @@ // // set suspend port feature // - Status = STATUS_SUCCESS; //m_Hardware->SetPortFeature(PortId, PORT_SUSPEND); + Status = m_Hardware->SetPortFeature(PortId, PORT_SUSPEND); break; } case PORT_POWER: @@ -814,7 +868,7 @@ // // set power feature on port // - Status = STATUS_SUCCESS; //m_Hardware->SetPortFeature(PortId, PORT_POWER); + Status = m_Hardware->SetPortFeature(PortId, PORT_POWER); break; } @@ -1232,9 +1286,12 @@ break; } } - - Irp->IoStatus.Status = Status; - IoCompleteRequest(Irp, IO_NO_INCREMENT); + if (Status != STATUS_PENDING) + { + Irp->IoStatus.Status = Status; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + } + return Status; } Modified: branches/usb-bringup/drivers/usb/usbehci_new/usb_request.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbehci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbehci_new/usb_request.cpp [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbehci_new/usb_request.cpp [iso-8859-1] Tue Apr 19 13:57:32 2011 @@ -70,6 +70,7 @@ PQUEUE_HEAD m_QueueHead; PQUEUE_TRANSFER_DESCRIPTOR m_TransferDescriptors[3]; PUSB_DEFAULT_PIPE_SETUP_PACKET m_DescriptorPacket; + PHYSICAL_ADDRESS m_DescriptorSetupPacket; }; //---------------------------------------------------------------------------------------- @@ -570,14 +571,15 @@ } // - // FIXME: where put MDL virtual address? - // - - - // - // link setup packet into buffer - VIRTUAL Address!!! - // - m_TransferDescriptors[0]->BufferPointer[0] = (ULONG)PtrToUlong(m_DescriptorPacket); + // Control Transfers have only one in or out buffer if one at all. Put in the QueueHead the + // same as BulkTransfers. USBQueue will use the Mdl to fill in the BufferPointers + // + QueueHead->Mdl = m_TransferBufferMDL; + + // + // link setup packet into buffer - Physical Address!!! + // + m_TransferDescriptors[0]->BufferPointer[0] = (ULONG)PtrToUlong(m_DescriptorSetupPacket.LowPart); // // link transfer descriptors to queue head @@ -791,6 +793,7 @@ // copy setup packet // RtlCopyMemory(m_DescriptorPacket, m_SetupPacket, sizeof(USB_DEFAULT_PIPE_SETUP_PACKET)); + m_DescriptorSetupPacket = PhysicalAddress; } //
13 years, 8 months
1
0
0
0
[ilardig] 51400: [winetests] Add new lines to test results for kernel32/dosdev.c
by ilardig@svn.reactos.org
Author: ilardig Date: Tue Apr 19 09:15:05 2011 New Revision: 51400 URL:
http://svn.reactos.org/svn/reactos?rev=51400&view=rev
Log: [winetests] Add new lines to test results for kernel32/dosdev.c Modified: trunk/rostests/winetests/kernel32/dosdev.c Modified: trunk/rostests/winetests/kernel32/dosdev.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/dosdev…
============================================================================== --- trunk/rostests/winetests/kernel32/dosdev.c [iso-8859-1] (original) +++ trunk/rostests/winetests/kernel32/dosdev.c [iso-8859-1] Tue Apr 19 09:15:05 2011 @@ -33,13 +33,13 @@ BOOL Result; Result = DefineDosDeviceA(0, Drive, "C:\\temp"); - ok(Result, "Failed to subst drive using lowercase drive letter"); + ok(Result, "Failed to subst drive using lowercase drive letter\n"); Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, Drive, "C:\\temp"); - ok(Result, "Failed to remove subst drive using lowercase drive letter"); - - Result = QueryDosDeviceA(Drive, Target, MAX_PATH); - ok(!Result, "Subst drive is present even after remove attempt"); + ok(Result, "Failed to remove subst drive using lowercase drive letter\n"); + + Result = QueryDosDeviceA(Drive, Target, MAX_PATH); + ok(!Result, "Subst drive is present even after remove attempt\n"); } static void test_DefineDosDeviceA2(void) @@ -50,13 +50,13 @@ BOOL Result; Result = DefineDosDeviceA(0, Drive, "C:\\temp"); - ok(!Result, "Subst drive using trailing path seperator"); + ok(!Result, "Subst drive using trailing path seperator\n"); Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, Drive, "C:\\temp"); - ok(!Result, "Subst drive using trailing path seperator"); - - Result = QueryDosDeviceA(Drive, Target, MAX_PATH); - ok(!Result, "Subst drive is present when it should not be created in the first place"); + ok(!Result, "Subst drive using trailing path seperator\n"); + + Result = QueryDosDeviceA(Drive, Target, MAX_PATH); + ok(!Result, "Subst drive is present when it should not be created in the first place\n"); } static void test_DefineDosDeviceA3(void) @@ -67,13 +67,13 @@ BOOL Result; Result = DefineDosDeviceA(0, Drive, "C:\\temp"); - ok(Result, "Failed to subst drive using non-DOS drive name"); + ok(Result, "Failed to subst drive using non-DOS drive name\n"); Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, Drive, "C:\\temp"); - ok(Result, "Failed to subst drive using non-DOS drive name"); - - Result = QueryDosDeviceA(Drive, Target, MAX_PATH); - ok(!Result, "Subst drive is present even after remove attempt"); + ok(Result, "Failed to subst drive using non-DOS drive name\n"); + + Result = QueryDosDeviceA(Drive, Target, MAX_PATH); + ok(!Result, "Subst drive is present even after remove attempt\n"); } static void test_DefineDosDeviceA4(void) @@ -84,13 +84,13 @@ BOOL Result; Result = DefineDosDeviceA(0, Drive, "C:\\temp"); - ok(Result, "Failed to subst drive"); + ok(Result, "Failed to subst drive\n"); Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION, Drive, NULL); - ok(Result, "Failed to remove subst drive using NULL Target name"); - - Result = QueryDosDeviceA(Drive, Target, MAX_PATH); - ok(!Result, "Subst drive is present even after remove attempt"); + ok(Result, "Failed to remove subst drive using NULL Target name\n"); + + Result = QueryDosDeviceA(Drive, Target, MAX_PATH); + ok(!Result, "Subst drive is present even after remove attempt\n"); } static void test_DefineDosDeviceA5(void) @@ -101,31 +101,31 @@ BOOL Result; Result = DefineDosDeviceA(0, Drive, "C:\\temp1"); - ok(Result, "Failed to subst drive"); + ok(Result, "Failed to subst drive\n"); Result = DefineDosDeviceA(0, Drive, "C:\\temp2"); - ok(Result, "Failed to subst drive"); + ok(Result, "Failed to subst drive\n"); Result = DefineDosDeviceA(0, Drive, "C:\\temp3"); - ok(Result, "Failed to subst drive"); + ok(Result, "Failed to subst drive\n"); Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, Drive, "C:\\temp1"); - ok(Result, "Failed to remove subst drive"); - Result = QueryDosDeviceA(Drive, Target, MAX_PATH); - ok(Result, "Failed to query subst drive"); - if (Result) - ok((_stricmp(Target, "\\??\\C:\\temp3") == 0), "Subst drive is not pointing to correct target"); + ok(Result, "Failed to remove subst drive\n"); + Result = QueryDosDeviceA(Drive, Target, MAX_PATH); + ok(Result, "Failed to query subst drive\n"); + if (Result) + ok((_stricmp(Target, "\\??\\C:\\temp3") == 0), "Subst drive is not pointing to correct target\n"); Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, Drive, "C:\\temp2"); - ok(Result, "Failed to remove subst drive"); - Result = QueryDosDeviceA(Drive, Target, MAX_PATH); - ok(Result, "Failed to query subst drive"); - if (Result) - ok((_stricmp(Target, "\\??\\C:\\temp3") == 0), "Subst drive is not pointing to correct target"); + ok(Result, "Failed to remove subst drive\n"); + Result = QueryDosDeviceA(Drive, Target, MAX_PATH); + ok(Result, "Failed to query subst drive\n"); + if (Result) + ok((_stricmp(Target, "\\??\\C:\\temp3") == 0), "Subst drive is not pointing to correct target\n"); Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, Drive, "C:\\temp3"); - ok(Result, "Failed to remove subst drive"); - - Result = QueryDosDeviceA(Drive, Target, MAX_PATH); - ok(!Result, "Subst drive is present even after remove attempt"); + ok(Result, "Failed to remove subst drive\n"); + + Result = QueryDosDeviceA(Drive, Target, MAX_PATH); + ok(!Result, "Subst drive is present even after remove attempt\n"); } static void test_DefineDosDeviceA6(void) @@ -136,31 +136,31 @@ BOOL Result; Result = DefineDosDeviceA(0, Drive, "C:\\temp1"); - ok(Result, "Failed to subst drive"); + ok(Result, "Failed to subst drive\n"); Result = DefineDosDeviceA(0, Drive, "C:\\temp2"); - ok(Result, "Failed to subst drive"); + ok(Result, "Failed to subst drive\n"); Result = DefineDosDeviceA(0, Drive, "C:\\temp3"); - ok(Result, "Failed to subst drive"); + ok(Result, "Failed to subst drive\n"); Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, Drive, "C:\\temp3"); - ok(Result, "Failed to remove subst drive"); - Result = QueryDosDeviceA(Drive, Target, MAX_PATH); - ok(Result, "Failed to query subst drive"); - if (Result) - ok((_stricmp(Target, "\\??\\C:\\temp2") == 0), "Subst drive is not pointing to correct target"); + ok(Result, "Failed to remove subst drive\n"); + Result = QueryDosDeviceA(Drive, Target, MAX_PATH); + ok(Result, "Failed to query subst drive\n"); + if (Result) + ok((_stricmp(Target, "\\??\\C:\\temp2") == 0), "Subst drive is not pointing to correct target\n"); Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, Drive, "C:\\temp2"); - ok(Result, "Failed to remove subst drive"); - Result = QueryDosDeviceA(Drive, Target, MAX_PATH); - ok(Result, "Failed to query subst drive"); - if (Result) - ok((_stricmp(Target, "\\??\\C:\\temp1") == 0), "Subst drive is not pointing to correct target"); + ok(Result, "Failed to remove subst drive\n"); + Result = QueryDosDeviceA(Drive, Target, MAX_PATH); + ok(Result, "Failed to query subst drive\n"); + if (Result) + ok((_stricmp(Target, "\\??\\C:\\temp1") == 0), "Subst drive is not pointing to correct target\n"); Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, Drive, "C:\\temp1"); - ok(Result, "Failed to remove subst drive"); - - Result = QueryDosDeviceA(Drive, Target, MAX_PATH); - ok(!Result, "Subst drive is present even after remove attempt"); + ok(Result, "Failed to remove subst drive\n"); + + Result = QueryDosDeviceA(Drive, Target, MAX_PATH); + ok(!Result, "Subst drive is present even after remove attempt\n"); } static void test_DefineDosDeviceA7(void) @@ -171,49 +171,49 @@ BOOL Result; Result = DefineDosDeviceA(0, Drive, "C:\\temp1"); - ok(Result, "Failed to subst drive"); + ok(Result, "Failed to subst drive\n"); Result = DefineDosDeviceA(0, Drive, "C:\\temp2"); - ok(Result, "Failed to subst drive"); + ok(Result, "Failed to subst drive\n"); Result = DefineDosDeviceA(0, Drive, "C:\\temp3"); - ok(Result, "Failed to subst drive"); + ok(Result, "Failed to subst drive\n"); Result = DefineDosDeviceA(0, Drive, "C:\\temp4"); - ok(Result, "Failed to subst drive"); + ok(Result, "Failed to subst drive\n"); Result = DefineDosDeviceA(0, Drive, "C:\\temp5"); - ok(Result, "Failed to subst drive"); + ok(Result, "Failed to subst drive\n"); Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, Drive, "C:\\temp2"); - ok(Result, "Failed to remove subst drive"); - Result = QueryDosDeviceA(Drive, Target, MAX_PATH); - ok(Result, "Failed to query subst drive"); - if (Result) - ok((_stricmp(Target, "\\??\\C:\\temp5") == 0), "Subst drive is not pointing to correct target"); + ok(Result, "Failed to remove subst drive\n"); + Result = QueryDosDeviceA(Drive, Target, MAX_PATH); + ok(Result, "Failed to query subst drive\n"); + if (Result) + ok((_stricmp(Target, "\\??\\C:\\temp5") == 0), "Subst drive is not pointing to correct target\n"); Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, Drive, "C:\\temp5"); - ok(Result, "Failed to remove subst drive"); - Result = QueryDosDeviceA(Drive, Target, MAX_PATH); - ok(Result, "Failed to query subst drive"); + ok(Result, "Failed to remove subst drive\n"); + Result = QueryDosDeviceA(Drive, Target, MAX_PATH); + ok(Result, "Failed to query subst drive\n"); + if (Result) + ok((_stricmp(Target, "\\??\\C:\\temp4") == 0), "Subst drive is not pointing to correct target\n"); + + Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, Drive, "C:\\temp1"); + ok(Result, "Failed to remove subst drive\n"); + Result = QueryDosDeviceA(Drive, Target, MAX_PATH); + ok(Result, "Failed to query subst drive\n"); + if (Result) + ok((_stricmp(Target, "\\??\\C:\\temp4") == 0), "Subst drive is not pointing to correct target\n"); + + Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, Drive, "C:\\temp3"); + ok(Result, "Failed to remove subst drive\n"); + Result = QueryDosDeviceA(Drive, Target, MAX_PATH); + ok(Result, "Failed to query subst drive\n"); if (Result) ok((_stricmp(Target, "\\??\\C:\\temp4") == 0), "Subst drive is not pointing to correct target"); - Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, Drive, "C:\\temp1"); - ok(Result, "Failed to remove subst drive"); - Result = QueryDosDeviceA(Drive, Target, MAX_PATH); - ok(Result, "Failed to query subst drive"); - if (Result) - ok((_stricmp(Target, "\\??\\C:\\temp4") == 0), "Subst drive is not pointing to correct target"); - - Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, Drive, "C:\\temp3"); - ok(Result, "Failed to remove subst drive"); - Result = QueryDosDeviceA(Drive, Target, MAX_PATH); - ok(Result, "Failed to query subst drive"); - if (Result) - ok((_stricmp(Target, "\\??\\C:\\temp4") == 0), "Subst drive is not pointing to correct target"); - Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, Drive, "C:\\temp4"); - ok(Result, "Failed to remove subst drive"); - - Result = QueryDosDeviceA(Drive, Target, MAX_PATH); - ok(!Result, "Subst drive is present even after remove attempt"); + ok(Result, "Failed to remove subst drive\n"); + + Result = QueryDosDeviceA(Drive, Target, MAX_PATH); + ok(!Result, "Subst drive is present even after remove attempt\n"); } START_TEST(dosdev)
13 years, 8 months
1
0
0
0
[ilardig] 51399: [win32csr/file.c] Add missing new lines to some DPRINT1
by ilardig@svn.reactos.org
Author: ilardig Date: Tue Apr 19 07:59:23 2011 New Revision: 51399 URL:
http://svn.reactos.org/svn/reactos?rev=51399&view=rev
Log: [win32csr/file.c] Add missing new lines to some DPRINT1 Modified: trunk/reactos/subsystems/win32/csrss/win32csr/file.c Modified: trunk/reactos/subsystems/win32/csrss/win32csr/file.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
============================================================================== --- trunk/reactos/subsystems/win32/csrss/win32csr/file.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/csrss/win32csr/file.c [iso-8859-1] Tue Apr 19 07:59:23 2011 @@ -82,7 +82,7 @@ Status = RtlEnterCriticalSection(&Win32CsrDefineDosDeviceCritSec); if (! NT_SUCCESS(Status)) { - DPRINT1("RtlEnterCriticalSection() failed (Status %lx)", + DPRINT1("RtlEnterCriticalSection() failed (Status %lx)\n", Status); return Status; } @@ -149,7 +149,7 @@ if (! NT_SUCCESS(Status)) { - DPRINT1("NtQuerySymbolicLinkObject(%wZ) failed (Status %lx)", + DPRINT1("NtQuerySymbolicLinkObject(%wZ) failed (Status %lx)\n", &DeviceName, Status); _SEH2_LEAVE; } @@ -270,7 +270,7 @@ Status = NtMakeTemporaryObject(LinkHandle); if (! NT_SUCCESS(Status)) { - DPRINT1("NtMakeTemporaryObject(%wZ) failed (Status %lx)", + DPRINT1("NtMakeTemporaryObject(%wZ) failed (Status %lx)\n", &DeviceName, Status); _SEH2_LEAVE; } @@ -279,7 +279,7 @@ LinkHandle = NULL; if (! NT_SUCCESS(Status)) { - DPRINT1("NtClose(%wZ) failed (Status %lx)", + DPRINT1("NtClose(%wZ) failed (Status %lx)\n", &DeviceName, Status); _SEH2_LEAVE; } @@ -396,7 +396,7 @@ SECURITY_DESCRIPTOR_REVISION); if (! NT_SUCCESS(Status)) { - DPRINT1("RtlCreateSecurityDescriptor() failed (Status %lx)", + DPRINT1("RtlCreateSecurityDescriptor() failed (Status %lx)\n", Status); _SEH2_LEAVE; } @@ -406,7 +406,7 @@ ACL_REVISION); if (! NT_SUCCESS(Status)) { - DPRINT1("RtlCreateAcl() failed (Status %lx)", + DPRINT1("RtlCreateAcl() failed (Status %lx)\n", Status); _SEH2_LEAVE; } @@ -430,7 +430,7 @@ FALSE); if (! NT_SUCCESS(Status)) { - DPRINT1("RtlSetDaclSecurityDescriptor() failed (Status %lx)", + DPRINT1("RtlSetDaclSecurityDescriptor() failed (Status %lx)\n", Status); _SEH2_LEAVE; } @@ -449,13 +449,13 @@ Status = NtMakePermanentObject(LinkHandle); if (! NT_SUCCESS(Status)) { - DPRINT1("NtMakePermanentObject(%wZ) failed (Status %lx)", + DPRINT1("NtMakePermanentObject(%wZ) failed (Status %lx)\n", &DeviceName, Status); } } else { - DPRINT1("NtCreateSymbolicLinkObject(%wZ) failed (Status %lx)", + DPRINT1("NtCreateSymbolicLinkObject(%wZ) failed (Status %lx)\n", &DeviceName, Status); } }
13 years, 8 months
1
0
0
0
[mjmartin] 51398: [USBEHCI_NEW] - Forgotten changes in r51397.
by mjmartin@svn.reactos.org
Author: mjmartin Date: Tue Apr 19 07:36:44 2011 New Revision: 51398 URL:
http://svn.reactos.org/svn/reactos?rev=51398&view=rev
Log: [USBEHCI_NEW] - Forgotten changes in r51397. Modified: branches/usb-bringup/drivers/usb/usbehci_new/interfaces.h Modified: branches/usb-bringup/drivers/usb/usbehci_new/interfaces.h URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbehci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbehci_new/interfaces.h [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbehci_new/interfaces.h [iso-8859-1] Tue Apr 19 07:36:44 2011 @@ -209,7 +209,31 @@ // virtual NTSTATUS ResetPort(ULONG PortNumber) = 0; - + +//----------------------------------------------------------------------------------------- +// +// GetPortStatus +// +// Description: this functions return status and change state of port +// + virtual NTSTATUS GetPortStatus(ULONG PortId, OUT USHORT *PortStatus, OUT USHORT *PortChange) = 0; + +//----------------------------------------------------------------------------------------- +// +// ClearPortStatus +// +// Description: Clears Status of Port, for example Connection, Enable and Reset +// + virtual NTSTATUS ClearPortStatus(ULONG PortId, ULONG Status) = 0; + +//----------------------------------------------------------------------------------------- +// +// SetPortFeature +// +// Description: this functions Sets Feature on Port, for example Enable, Power and Reset +// + virtual NTSTATUS SetPortFeature(ULONG PortId, ULONG Feature) = 0; + //----------------------------------------------------------------------------------------- // // SetAsyncListRegister
13 years, 8 months
1
0
0
0
[mjmartin] 51397: [USBEHCI_NEW] - Move USB_REQUEST_SET_FEATURE / USB_REQUEST_GET_FEATURE flags to header file. - Remove QueueHead and Descriptor creation as its in UsbRequest. - Move DMACommon Buff...
by mjmartin@svn.reactos.org
Author: mjmartin Date: Tue Apr 19 06:56:30 2011 New Revision: 51397 URL:
http://svn.reactos.org/svn/reactos?rev=51397&view=rev
Log: [USBEHCI_NEW] - Move USB_REQUEST_SET_FEATURE / USB_REQUEST_GET_FEATURE flags to header file. - Remove QueueHead and Descriptor creation as its in UsbRequest. - Move DMACommon Buffer allocation back to UsbHardwareDevice class. - Implement Port Handling functions GetPortStatus, ClearPortStatus and SetPortFeature. - Implement GetUSBQueue for returning pointer to UsbQueue and GetDMA to return DMAMemoryManager. - Fix a typo in one of the defines for Port Register Flags. Modified: branches/usb-bringup/drivers/usb/usbehci_new/hardware.cpp branches/usb-bringup/drivers/usb/usbehci_new/hardware.h branches/usb-bringup/drivers/usb/usbehci_new/hub_controller.cpp branches/usb-bringup/drivers/usb/usbehci_new/usb_queue.cpp branches/usb-bringup/drivers/usb/usbehci_new/usbehci.h Modified: branches/usb-bringup/drivers/usb/usbehci_new/hardware.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbehci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbehci_new/hardware.cpp [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbehci_new/hardware.cpp [iso-8859-1] Tue Apr 19 06:56:30 2011 @@ -52,13 +52,17 @@ NTSTATUS PnpStop(void); NTSTATUS HandlePower(PIRP Irp); NTSTATUS GetDeviceDetails(PUSHORT VendorId, PUSHORT DeviceId, PULONG NumberOfPorts, PULONG Speed); - NTSTATUS GetDmaAdapter(OUT PDMA_ADAPTER AdapterObject); + NTSTATUS GetDMA(OUT struct IDMAMemoryManager **m_DmaManager); NTSTATUS GetUSBQueue(OUT struct IUSBQueue **OutUsbQueue); NTSTATUS StartController(); NTSTATUS StopController(); NTSTATUS ResetController(); NTSTATUS ResetPort(ULONG PortIndex); + + NTSTATUS GetPortStatus(ULONG PortId, OUT USHORT *PortStatus, OUT USHORT *PortChange); + NTSTATUS ClearPortStatus(ULONG PortId, ULONG Status); + NTSTATUS SetPortFeature(ULONG PortId, ULONG Feature); VOID SetAsyncListRegister(ULONG PhysicalAddress); VOID SetPeriodicListRegister(ULONG PhysicalAddress); @@ -85,6 +89,8 @@ KSPIN_LOCK m_Lock; PKINTERRUPT m_Interrupt; KDPC m_IntDpcObject; + PVOID VirtualBase; + PHYSICAL_ADDRESS PhysicalAddress; PULONG m_Base; PDMA_ADAPTER m_Adapter; ULONG m_MapRegisters; @@ -92,7 +98,7 @@ USHORT m_VendorID; USHORT m_DeviceID; PUSBQUEUE m_UsbQueue; - + PDMAMEMORYMANAGER m_MemoryManager; VOID SetCommandRegister(PEHCI_USBCMD_CONTENT UsbCmd); VOID GetCommandRegister(PEHCI_USBCMD_CONTENT UsbCmd); ULONG EHCI_READ_REGISTER_ULONG(ULONG Offset); @@ -133,12 +139,32 @@ DPRINT1("CUSBHardwareDevice::Initialize\n"); // + // Create DMAMemoryManager for use with QueueHeads and Transfer Descriptors. + // + Status = CreateDMAMemoryManager(&m_MemoryManager); + if (!NT_SUCCESS(Status)) + { + DPRINT1("Failed to create DMAMemoryManager Object\n"); + return Status; + } + + // // Create the UsbQueue class that will handle the Asynchronous and Periodic Schedules // Status = CreateUSBQueue(&m_UsbQueue); if (!NT_SUCCESS(Status)) { DPRINT1("Failed to create UsbQueue!\n"); + return Status; + } + + // + // Initialize the DMAMemoryManager + // + Status = m_MemoryManager->Initialize(this, &m_Lock, PAGE_SIZE * 4, VirtualBase, PhysicalAddress, 32); + if (!NT_SUCCESS(Status)) + { + DPRINT1("Failed to initialize the DMAMemoryManager\n"); return Status; } @@ -337,6 +363,19 @@ } // + // Create Common Buffer + // + VirtualBase = m_Adapter->DmaOperations->AllocateCommonBuffer(m_Adapter, + PAGE_SIZE * 4, + &PhysicalAddress, + FALSE); + if (!VirtualBase) + { + DPRINT1("Failed to allocate a common buffer\n"); + return STATUS_INSUFFICIENT_RESOURCES; + } + + // // Stop the controller before modifying schedules // Status = StopController(); @@ -395,13 +434,25 @@ return STATUS_SUCCESS; } +NTSTATUS CUSBHardwareDevice::GetDMA( + OUT struct IDMAMemoryManager **OutDMAMemoryManager) +{ + if (!m_MemoryManager) + return STATUS_UNSUCCESSFUL; + *OutDMAMemoryManager = m_MemoryManager; + return STATUS_SUCCESS; +} + NTSTATUS CUSBHardwareDevice::GetUSBQueue( OUT struct IUSBQueue **OutUsbQueue) { - UNIMPLEMENTED - return STATUS_NOT_IMPLEMENTED; -} + if (!m_UsbQueue) + return STATUS_UNSUCCESSFUL; + *OutUsbQueue = m_UsbQueue; + return STATUS_SUCCESS; +} + NTSTATUS CUSBHardwareDevice::StartController(void) @@ -589,6 +640,140 @@ return STATUS_SUCCESS; } +NTSTATUS CUSBHardwareDevice::GetPortStatus( + ULONG PortId, + OUT USHORT *PortStatus, + OUT USHORT *PortChange) +{ + ULONG Value; + USHORT Status = 0, Change = 0; + + // + // Get the value of the Port Status and Control Register + // + Value = EHCI_READ_REGISTER_ULONG(EHCI_PORTSC + (4 * PortId)); + + // + // If the PowerPortControl is 0 then host controller does not have power control switches + if (!m_Capabilities.HCSParams.PortPowerControl) + { + Status |= USB_PORT_STATUS_POWER; + } + else + { + // Check the value of PortPower + if (Value & EHCI_PRT_POWER) + { + Status |= USB_PORT_STATUS_POWER; + } + } + + // Get Speed. If SlowSpeedLine flag is there then its a slow speed device + if (Value & EHCI_PRT_SLOWSPEEDLINE) + Status |= USB_PORT_STATUS_LOW_SPEED; + else + Status |= USB_PORT_STATUS_HIGH_SPEED; + + // Get Connected Status + if (Value & EHCI_PRT_CONNECTED) + Status |= USB_PORT_STATUS_CONNECT; + + // Get Enabled Status + if (Value & EHCI_PRT_ENABLED) + Status |= USB_PORT_STATUS_ENABLE; + + // Is it suspended? + if (Value & EHCI_PRT_SUSPEND) + Status |= USB_PORT_STATUS_SUSPEND; + + // a overcurrent is active? + if (Value & EHCI_PRT_OVERCURRENTACTIVE) + Status |= USB_PORT_STATUS_OVER_CURRENT; + + // In a reset state? + if (Value & EHCI_PRT_RESET) + Status |= USB_PORT_STATUS_RESET; + + // + // FIXME: Is the Change here correct? + // + if (Value & EHCI_PRT_CONNECTSTATUSCHANGE) + Change |= USB_PORT_STATUS_CONNECT; + + if (Value & EHCI_PRT_ENABLEDSTATUSCHANGE) + Change |= USB_PORT_STATUS_ENABLE; + + + return STATUS_SUCCESS; +} + +NTSTATUS CUSBHardwareDevice::ClearPortStatus( + ULONG PortId, + ULONG Status) +{ + ULONG Value; + + Value = EHCI_READ_REGISTER_ULONG(EHCI_PORTSC + (4 * PortId)); + + if (Status == C_PORT_RESET) + { + if (Value & EHCI_PRT_RESET) + { + Value &= ~EHCI_PRT_RESET; + EHCI_WRITE_REGISTER_ULONG(EHCI_PORTSC + (4 * PortId), Value); + KeStallExecutionProcessor(100); + } + } + + if (Status == C_PORT_CONNECTION) + { + // FIXME: Make sure its the Connection and Enable Change status. + Value |= EHCI_PRT_CONNECTSTATUSCHANGE; + Value |= EHCI_PRT_ENABLEDSTATUSCHANGE; + EHCI_WRITE_REGISTER_ULONG(EHCI_PORTSC + (4 * PortId), Value); + } + + return STATUS_SUCCESS; +} + + +NTSTATUS CUSBHardwareDevice::SetPortFeature( + ULONG PortId, + ULONG Feature) +{ + ULONG Value; + + Value = EHCI_READ_REGISTER_ULONG(EHCI_PORTSC + (4 * PortId)); + if (Feature == PORT_ENABLE) + { + // + // FIXME: EHCI Ports can only be disabled via reset + // + } + + if (Feature == PORT_RESET) + { + if (Value & EHCI_PRT_SLOWSPEEDLINE) + { + DPRINT1("Non HighSpeed device. Releasing Ownership\n"); + } + + // + // Reset and clean enable + // + Value |= EHCI_PRT_RESET; + Value &= ~EHCI_PRT_ENABLED; + EHCI_WRITE_REGISTER_ULONG(EHCI_PORTSC + (4 * PortId), Value); + + KeStallExecutionProcessor(100); + } + + if (Feature == PORT_POWER) + DPRINT1("Not implemented\n"); + + return STATUS_SUCCESS; +} + VOID CUSBHardwareDevice::SetAsyncListRegister(ULONG PhysicalAddress) { EHCI_WRITE_REGISTER_ULONG(EHCI_ASYNCLISTBASE, PhysicalAddress); @@ -693,12 +878,12 @@ // // Device connected or removed // - if (PortStatus & EHCI_PRT_CONNECTSTATUSCHAGE) + if (PortStatus & EHCI_PRT_CONNECTSTATUSCHANGE) { // // Clear the port change status // - This->EHCI_WRITE_REGISTER_ULONG(EHCI_PORTSC + (4 * i), PortStatus & EHCI_PRT_CONNECTSTATUSCHAGE); + This->EHCI_WRITE_REGISTER_ULONG(EHCI_PORTSC + (4 * i), PortStatus | EHCI_PRT_CONNECTSTATUSCHANGE); if (PortStatus & EHCI_PRT_CONNECTED) { Modified: branches/usb-bringup/drivers/usb/usbehci_new/hardware.h URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbehci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbehci_new/hardware.h [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbehci_new/hardware.h [iso-8859-1] Tue Apr 19 06:56:30 2011 @@ -46,7 +46,7 @@ // Port Register Flags // #define EHCI_PRT_CONNECTED 0x01 -#define EHCI_PRT_CONNECTSTATUSCHAGE 0x02 +#define EHCI_PRT_CONNECTSTATUSCHANGE 0x02 #define EHCI_PRT_ENABLED 0x04 #define EHCI_PRT_ENABLEDSTATUSCHANGE 0x08 #define EHCI_PRT_OVERCURRENTACTIVE 0x10 @@ -192,7 +192,7 @@ LIST_ENTRY LinkedQueueHeads; PQUEUE_TRANSFER_DESCRIPTOR TransferDescriptor; PIRP IrpToComplete; - PMDL MdlToFree; + PMDL Mdl; PKEVENT Event; } QUEUE_HEAD, *PQUEUE_HEAD; Modified: branches/usb-bringup/drivers/usb/usbehci_new/hub_controller.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbehci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbehci_new/hub_controller.cpp [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbehci_new/hub_controller.cpp [iso-8859-1] Tue Apr 19 06:56:30 2011 @@ -156,20 +156,6 @@ 0x08, 0x00, /* wMaxPacketSize; 1 + (MAX_ROOT_PORTS / 8) */ 0xFF /* bInterval; (255ms -- usb 2.0 spec) */ }; - -// -// flags for handling USB_REQUEST_SET_FEATURE / USB_REQUEST_GET_FEATURE -// -#define PORT_ENABLE 1 -#define PORT_SUSPEND 2 -#define PORT_OVER_CURRENT 3 -#define PORT_RESET 4 -#define PORT_POWER 8 -#define C_PORT_CONNECTION 16 -#define C_PORT_ENABLE 17 -#define C_PORT_SUSPEND 18 -#define C_PORT_OVER_CURRENT 19 -#define C_PORT_RESET 20 //---------------------------------------------------------------------------------------- NTSTATUS Modified: branches/usb-bringup/drivers/usb/usbehci_new/usb_queue.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbehci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbehci_new/usb_queue.cpp [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbehci_new/usb_queue.cpp [iso-8859-1] Tue Apr 19 06:56:30 2011 @@ -48,14 +48,9 @@ LONG m_Ref; KSPIN_LOCK m_Lock; PDMA_ADAPTER m_Adapter; - PVOID VirtualBase; - PHYSICAL_ADDRESS PhysicalAddress; PQUEUE_HEAD AsyncQueueHead; PQUEUE_HEAD PendingQueueHead; - IDMAMemoryManager *m_MemoryManager; - - PQUEUE_HEAD CreateQueueHead(); - PQUEUE_TRANSFER_DESCRIPTOR CreateDescriptor(UCHAR PIDCode, ULONG TotalBytesToTransfer); + VOID LinkQueueHead(PQUEUE_HEAD HeadQueueHead, PQUEUE_HEAD NewQueueHead); VOID UnlinkQueueHead(PQUEUE_HEAD QueueHead); VOID LinkQueueHeadChain(PQUEUE_HEAD HeadQueueHead, PQUEUE_HEAD NewQueueHead); @@ -87,35 +82,11 @@ PDMA_ADAPTER AdapterObject, IN OPTIONAL PKSPIN_LOCK Lock) { - NTSTATUS Status; + NTSTATUS Status = STATUS_SUCCESS; DPRINT1("CUSBQueue::Initialize()\n"); ASSERT(Hardware); - ASSERT(AdapterObject); - - // - // Create Common Buffer - // - VirtualBase = AdapterObject->DmaOperations->AllocateCommonBuffer(AdapterObject, - PAGE_SIZE * 4, - &PhysicalAddress, - FALSE); - if (!VirtualBase) - { - DPRINT1("Failed to allocate a common buffer\n"); - return STATUS_INSUFFICIENT_RESOURCES; - } - - // - // Create DMAMemoryManager for use with QueueHeads and Transfer Descriptors. - // - Status = CreateDMAMemoryManager(&m_MemoryManager); - if (!NT_SUCCESS(Status)) - { - DPRINT1("Failed to create DMAMemoryManager Object\n"); - return Status; - } // // initialize device lock @@ -123,46 +94,20 @@ KeInitializeSpinLock(&m_Lock); // - // Initialize the DMAMemoryManager - // - Status = m_MemoryManager->Initialize(Hardware, &m_Lock, PAGE_SIZE * 4, VirtualBase, PhysicalAddress, 32); - if (!NT_SUCCESS(Status)) - { - DPRINT1("Failed to initialize the DMAMemoryManager\n"); - return Status; - } - - // - // Create a QueueHead for use in Async Register - // - AsyncQueueHead = CreateQueueHead(); - AsyncQueueHead->HorizontalLinkPointer = AsyncQueueHead->PhysicalAddr | QH_TYPE_QH; - AsyncQueueHead->EndPointCharacteristics.QEDTDataToggleControl = FALSE; - AsyncQueueHead->Token.Bits.InterruptOnComplete = FALSE; - AsyncQueueHead->EndPointCharacteristics.HeadOfReclamation = TRUE; - AsyncQueueHead->Token.Bits.Halted = TRUE; - - Hardware->SetAsyncListRegister(AsyncQueueHead->PhysicalAddr); - - // - // Create a Unused QueueHead to hold pending QueueHeads - // - PendingQueueHead = CreateQueueHead(); - PendingQueueHead->Token.Bits.Halted = TRUE; - - // - // Initialize ListHead in QueueHeads - // - InitializeListHead(&AsyncQueueHead->LinkedQueueHeads); - InitializeListHead(&PendingQueueHead->LinkedQueueHeads); - - return STATUS_SUCCESS; + // FIXME: Need to set AsyncRegister with a QUEUEHEAD + // + return Status; } ULONG CUSBQueue::GetPendingRequestCount() { - UNIMPLEMENTED + // + // Loop through the pending list and iterrate one for each QueueHead that + // has a IRP to complete. + // + + return 0; } @@ -195,84 +140,6 @@ { UNIMPLEMENTED return STATUS_NOT_IMPLEMENTED; -} - -PQUEUE_HEAD -CUSBQueue::CreateQueueHead() -{ - PQUEUE_HEAD QueueHead; - PHYSICAL_ADDRESS PhysicalAddress; - NTSTATUS Status; - // - // Create the QueueHead from Common Buffer - // - Status = m_MemoryManager->Allocate(sizeof(QUEUE_HEAD), - (PVOID*)&QueueHead, - &PhysicalAddress); - if (!NT_SUCCESS(Status)) - return NULL; - - // - // Initialize default values - // - - QueueHead->PhysicalAddr = PhysicalAddress.LowPart; - QueueHead->HorizontalLinkPointer = TERMINATE_POINTER; - QueueHead->AlternateNextPointer = TERMINATE_POINTER; - QueueHead->NextPointer = TERMINATE_POINTER; - - // 1 for non high speed, 0 for high speed device - QueueHead->EndPointCharacteristics.ControlEndPointFlag = 0; - QueueHead->EndPointCharacteristics.HeadOfReclamation = FALSE; - QueueHead->EndPointCharacteristics.MaximumPacketLength = 64; - - // Set NakCountReload to max value possible - QueueHead->EndPointCharacteristics.NakCountReload = 0xF; - - // Get the Initial Data Toggle from the Queue Element Desriptor - QueueHead->EndPointCharacteristics.QEDTDataToggleControl = FALSE; - - QueueHead->EndPointCharacteristics.EndPointSpeed = QH_ENDPOINT_HIGHSPEED; - - QueueHead->EndPointCapabilities.NumberOfTransactionPerFrame = 0x03; - - // Interrupt when QueueHead is processed - QueueHead->Token.Bits.InterruptOnComplete = FALSE; - - return QueueHead; -} - -PQUEUE_TRANSFER_DESCRIPTOR -CUSBQueue::CreateDescriptor( - UCHAR PIDCode, - ULONG TotalBytesToTransfer) -{ - PQUEUE_TRANSFER_DESCRIPTOR Descriptor; - PHYSICAL_ADDRESS PhysicalAddress; - NTSTATUS Status; - - // - // Create the Descriptor from Common Buffer - // - Status = m_MemoryManager->Allocate(sizeof(QUEUE_TRANSFER_DESCRIPTOR), - (PVOID*)&Descriptor, - &PhysicalAddress); - if (!NT_SUCCESS(Status)) - return NULL; - - // - // Set default values - // - Descriptor->NextPointer = TERMINATE_POINTER; - Descriptor->AlternateNextPointer = TERMINATE_POINTER; - Descriptor->Token.Bits.DataToggle = TRUE; - Descriptor->Token.Bits.ErrorCounter = 0x03; - Descriptor->Token.Bits.Active = TRUE; - Descriptor->Token.Bits.PIDCode = PIDCode; - Descriptor->Token.Bits.TotalBytesToTransfer = TotalBytesToTransfer; - Descriptor->PhysicalAddr = PhysicalAddress.LowPart; - - return Descriptor; } // Modified: branches/usb-bringup/drivers/usb/usbehci_new/usbehci.h URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbehci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbehci_new/usbehci.h [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbehci_new/usbehci.h [iso-8859-1] Tue Apr 19 06:56:30 2011 @@ -7,6 +7,10 @@ #include <hubbusif.h> #include <usbbusif.h> #include <usbioctl.h> +// +// FIXME: +// #include <usbprotocoldefs.h> +// #include <usb.h> #include <stdio.h> #include <wdmguid.h> @@ -20,6 +24,20 @@ #include <kcom.h> #include "interfaces.h" + +// +// flags for handling USB_REQUEST_SET_FEATURE / USB_REQUEST_GET_FEATURE +// +#define PORT_ENABLE 1 +#define PORT_SUSPEND 2 +#define PORT_OVER_CURRENT 3 +#define PORT_RESET 4 +#define PORT_POWER 8 +#define C_PORT_CONNECTION 16 +#define C_PORT_ENABLE 17 +#define C_PORT_SUSPEND 18 +#define C_PORT_OVER_CURRENT 19 +#define C_PORT_RESET 20 typedef struct {
13 years, 8 months
1
0
0
0
[janderwald] 51396: [USBEHCI_NEW] - Null terminate buffer from IOCTL_USB_GET_ROOT_HUB_NAME, fixes usbview problems - Implement URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER, IUSBHardware needs more work ...
by janderwald@svn.reactos.org
Author: janderwald Date: Tue Apr 19 01:21:10 2011 New Revision: 51396 URL:
http://svn.reactos.org/svn/reactos?rev=51396&view=rev
Log: [USBEHCI_NEW] - Null terminate buffer from IOCTL_USB_GET_ROOT_HUB_NAME, fixes usbview problems - Implement URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER, IUSBHardware needs more work - Silence debug traces - Start implementing IUSBRequest interfaces - Complete unhandled major irp with status success Added: branches/usb-bringup/drivers/usb/usbehci_new/usb_request.cpp (with props) Modified: branches/usb-bringup/drivers/usb/usbehci_new/CMakeLists.txt branches/usb-bringup/drivers/usb/usbehci_new/hcd_controller.cpp branches/usb-bringup/drivers/usb/usbehci_new/hub_controller.cpp branches/usb-bringup/drivers/usb/usbehci_new/interfaces.h branches/usb-bringup/drivers/usb/usbehci_new/usb_device.cpp branches/usb-bringup/drivers/usb/usbehci_new/usbehci.cpp Modified: branches/usb-bringup/drivers/usb/usbehci_new/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbehci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbehci_new/CMakeLists.txt [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbehci_new/CMakeLists.txt [iso-8859-1] Tue Apr 19 01:21:10 2011 @@ -7,6 +7,7 @@ add_library(usbehci SHARED usbehci.cpp usb_device.cpp + usb_request.cpp usb_queue.cpp hcd_controller.cpp hardware.cpp Modified: branches/usb-bringup/drivers/usb/usbehci_new/hcd_controller.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbehci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbehci_new/hcd_controller.cpp [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbehci_new/hcd_controller.cpp [iso-8859-1] Tue Apr 19 01:21:10 2011 @@ -327,8 +327,11 @@ if (NT_SUCCESS(Status)) { // - // informal debug print - // + // null terminate it + // + PC_ASSERT(IoStack->Parameters.DeviceIoControl.OutputBufferLength - sizeof(ULONG) - sizeof(WCHAR) >= ResultLength); + + DriverKey->DriverKeyName[ResultLength / sizeof(WCHAR)] = L'\0'; DPRINT1("Result %S\n", DriverKey->DriverKeyName); } @@ -552,7 +555,6 @@ } default: { - DPRINT1("CHCDController::HandlePnp Dispatch to lower device object %lx\n", IoStack->MinorFunction); // // forward irp to next device object // Modified: branches/usb-bringup/drivers/usb/usbehci_new/hub_controller.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbehci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbehci_new/hub_controller.cpp [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbehci_new/hub_controller.cpp [iso-8859-1] Tue Apr 19 01:21:10 2011 @@ -61,6 +61,8 @@ NTSTATUS HandleGetStatusFromDevice(IN OUT PIRP Irp, PURB Urb); NTSTATUS HandleSelectConfiguration(IN OUT PIRP Irp, PURB Urb); NTSTATUS HandleClassOther(IN OUT PIRP Irp, PURB Urb); + NTSTATUS HandleBulkOrInterruptTransfer(IN OUT PIRP Irp, PURB Urb); + // constructor / destructor CHubController(IUnknown *OuterUnknown){} @@ -154,6 +156,20 @@ 0x08, 0x00, /* wMaxPacketSize; 1 + (MAX_ROOT_PORTS / 8) */ 0xFF /* bInterval; (255ms -- usb 2.0 spec) */ }; + +// +// flags for handling USB_REQUEST_SET_FEATURE / USB_REQUEST_GET_FEATURE +// +#define PORT_ENABLE 1 +#define PORT_SUSPEND 2 +#define PORT_OVER_CURRENT 3 +#define PORT_RESET 4 +#define PORT_POWER 8 +#define C_PORT_CONNECTION 16 +#define C_PORT_ENABLE 17 +#define C_PORT_SUSPEND 18 +#define C_PORT_OVER_CURRENT 19 +#define C_PORT_RESET 20 //---------------------------------------------------------------------------------------- NTSTATUS @@ -653,7 +669,9 @@ } default: { - DPRINT1("CHubController::HandlePnp Unhandeled %x\n", IoStack->MinorFunction); + // + // ignore request with default status + // Status = Irp->IoStatus.Status; break; } @@ -682,6 +700,15 @@ IoCompleteRequest(Irp, IO_NO_INCREMENT); return STATUS_NOT_IMPLEMENTED; } +//----------------------------------------------------------------------------------------- +NTSTATUS +CHubController::HandleBulkOrInterruptTransfer( + IN OUT PIRP Irp, + PURB Urb) +{ + UNIMPLEMENTED + return STATUS_NOT_IMPLEMENTED; +} //----------------------------------------------------------------------------------------- NTSTATUS @@ -689,11 +716,143 @@ IN OUT PIRP Irp, PURB Urb) { - DPRINT1("CHubController::HandleClassOther> Request %x Value %x not implemented\n", Urb->UrbControlVendorClassRequest.Request, Urb->UrbControlVendorClassRequest.Value); - - // - // FIXME implement me - // + NTSTATUS Status = STATUS_NOT_IMPLEMENTED; + USHORT PortStatus = 0, PortChange = 0; + PUSHORT Buffer; + ULONG NumPort; + ULONG PortId; + + //DPRINT1("CHubController::HandleClassOther> Request %x Value %x not implemented\n", Urb->UrbControlVendorClassRequest.Request, Urb->UrbControlVendorClassRequest.Value); + + // + // get number of ports available + // + Status = m_Hardware->GetDeviceDetails(NULL, NULL, &NumPort, NULL); + PC_ASSERT(Status == STATUS_SUCCESS); + + // + // sanity check + // + PC_ASSERT(Urb->UrbControlVendorClassRequest.Index - 1 < NumPort); + + // + // port range reported start from 1 -n + // convert back port id so it matches the hardware + // + PortId = Urb->UrbControlVendorClassRequest.Index - 1; + + // + // check request code + // + switch(Urb->UrbControlVendorClassRequest.Request) + { + case USB_REQUEST_GET_STATUS: + { + // + // sanity check + // + PC_ASSERT(Urb->UrbControlVendorClassRequest.TransferBufferLength == sizeof(USHORT) * 2); + PC_ASSERT(Urb->UrbControlVendorClassRequest.TransferBuffer); + + // + // get port status + // + //Status = m_Hardware->GetPortStatus(PortId, &PortStatus, &PortChange); + + Status = STATUS_SUCCESS; + if (NT_SUCCESS(Status)) + { + // + // request contains buffer of 2 ushort which are used from submitting port status and port change status + // + Buffer = (PUSHORT)Urb->UrbControlVendorClassRequest.TransferBuffer; + + // + // store status, then port change + // + *Buffer = PortStatus; + Buffer++; + *Buffer = PortChange; + } + + // + // done + // + break; + } + case USB_REQUEST_CLEAR_FEATURE: + { + switch (Urb->UrbControlVendorClassRequest.Value) + { + case C_PORT_CONNECTION: + //Status = m_Hardware->ClearPortStatus(PortId, C_PORT_CONNECTION); + break; + case C_PORT_RESET: + //Status= m_Hardware->ClearPortStatus(PortId, C_PORT_RESET); + break; + default: + DPRINT("Unknown Value for Clear Feature %x \n", Urb->UrbControlVendorClassRequest.Value); + PC_ASSERT(FALSE); + break; + } + + Status = STATUS_SUCCESS; + break; + } + case USB_REQUEST_SET_FEATURE: + { + // + // request set feature + // + switch(Urb->UrbControlVendorClassRequest.Value) + { + case PORT_ENABLE: + { + // + // port enable is a no-op for EHCI + // + Status = STATUS_SUCCESS; + break; + } + + case PORT_SUSPEND: + { + // + // set suspend port feature + // + Status = STATUS_SUCCESS; //m_Hardware->SetPortFeature(PortId, PORT_SUSPEND); + break; + } + case PORT_POWER: + { + // + // set power feature on port + // + Status = STATUS_SUCCESS; //m_Hardware->SetPortFeature(PortId, PORT_POWER); + break; + } + + case PORT_RESET: + { + // + // reset port feature + // + Status = m_Hardware->ResetPort(PortId); + PC_ASSERT(Status == STATUS_SUCCESS); + break; + } + default: + DPRINT1("Unsupported request id %x\n", Urb->UrbControlVendorClassRequest.Value); + PC_ASSERT(FALSE); + } + break; + } + default: + DPRINT1("CHubController::HandleClassOther Unknown request code %x\n", Urb->UrbControlVendorClassRequest.Request); + PC_ASSERT(0); + Status = STATUS_INVALID_DEVICE_REQUEST; + } + return STATUS_SUCCESS; } @@ -862,7 +1021,6 @@ if (Urb->UrbHeader.UsbdDeviceHandle == NULL) { - DPRINT1("Root Hub descriptor\n"); // // copy root hub device descriptor // @@ -960,13 +1118,6 @@ // DeviceExtension = (PCOMMON_DEVICE_EXTENSION)DeviceObject->DeviceExtension; - - DPRINT1("HandleDeviceControl>Type: FDO %u IoCtl %x InputBufferLength %lu OutputBufferLength %lu\n", - DeviceExtension->IsFDO, - IoStack->Parameters.DeviceIoControl.IoControlCode, - IoStack->Parameters.DeviceIoControl.InputBufferLength, - IoStack->Parameters.DeviceIoControl.OutputBufferLength); - // // determine which request should be performed // @@ -979,8 +1130,6 @@ // Urb = (PURB)IoStack->Parameters.Others.Argument1; PC_ASSERT(Urb); - - DPRINT1("IOCTL_INTERNAL_USB_SUBMIT_URB Function %x Length %lu Status %x Handle %p Flags %x UNIMPLEMENTED\n", Urb->UrbHeader.Function, Urb->UrbHeader.Length, Urb->UrbHeader.Status, Urb->UrbHeader.UsbdDeviceHandle, Urb->UrbHeader.UsbdFlags); switch (Urb->UrbHeader.Function) { @@ -999,6 +1148,12 @@ case URB_FUNCTION_CLASS_OTHER: Status = HandleClassOther(Irp, Urb); break; + case URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER: + Status = HandleBulkOrInterruptTransfer(Irp, Urb); + break; + default: + DPRINT1("IOCTL_INTERNAL_USB_SUBMIT_URB Function %x NOT IMPLEMENTED\n", Urb->UrbHeader.Function); + break; } // // request completed @@ -1007,7 +1162,7 @@ } case IOCTL_INTERNAL_USB_GET_DEVICE_HANDLE: { - DPRINT1("IOCTL_INTERNAL_USB_GET_DEVICE_HANDLE\n"); + DPRINT("IOCTL_INTERNAL_USB_GET_DEVICE_HANDLE\n"); if (IoStack->Parameters.Others.Argument1) { @@ -1032,7 +1187,7 @@ } case IOCTL_INTERNAL_USB_GET_ROOTHUB_PDO: { - DPRINT1("IOCTL_INTERNAL_USB_GET_ROOTHUB_PDO\n"); + DPRINT("IOCTL_INTERNAL_USB_GET_ROOTHUB_PDO\n"); // // this is the first request send, it delivers the PDO to the caller @@ -1061,7 +1216,7 @@ } case IOCTL_INTERNAL_USB_GET_HUB_COUNT: { - DPRINT1("IOCTL_INTERNAL_USB_GET_HUB_COUNT\n"); + DPRINT("IOCTL_INTERNAL_USB_GET_HUB_COUNT\n"); // // after IOCTL_INTERNAL_USB_GET_ROOTHUB_PDO is delivered, the usbhub driver @@ -1080,6 +1235,14 @@ // Status = STATUS_SUCCESS; Irp->IoStatus.Information = sizeof(ULONG); + break; + } + default: + { + DPRINT1("HandleDeviceControl>Type: IoCtl %x InputBufferLength %lu OutputBufferLength %lu NOT IMPLEMENTED\n", + IoStack->Parameters.DeviceIoControl.IoControlCode, + IoStack->Parameters.DeviceIoControl.InputBufferLength, + IoStack->Parameters.DeviceIoControl.OutputBufferLength); break; } } @@ -1921,7 +2084,37 @@ ULONG ControllerInformationBufferLength, PULONG LengthReturned) { - UNIMPLEMENTED + PUSB_CONTROLLER_INFORMATION_0 ControllerInfo; + + DPRINT1("USBHI_GetControllerInformation\n"); + + // + // sanity checks + // + PC_ASSERT(ControllerInformationBuffer); + PC_ASSERT(ControllerInformationBufferLength >= sizeof(USB_CONTROLLER_INFORMATION_0)); + + // + // get controller info buffer + // + ControllerInfo = (PUSB_CONTROLLER_INFORMATION_0)ControllerInformationBuffer; + + // + // FIXME only version 0 is supported for now + // + PC_ASSERT(ControllerInfo->InformationLevel == 0); + + // + // fill in information + // + ControllerInfo->ActualLength = sizeof(USB_CONTROLLER_INFORMATION_0); + ControllerInfo->SelectiveSuspendEnabled = FALSE; //FIXME + ControllerInfo->IsHighSpeedController = TRUE; + + // + // set length returned + // + *LengthReturned = ControllerInfo->ActualLength; return STATUS_NOT_IMPLEMENTED; } Modified: branches/usb-bringup/drivers/usb/usbehci_new/interfaces.h URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbehci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbehci_new/interfaces.h [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbehci_new/interfaces.h [iso-8859-1] Tue Apr 19 01:21:10 2011 @@ -312,6 +312,8 @@ // CancelCallback routine is invoked. // +struct _QUEUE_HEAD; + DECLARE_INTERFACE_(IUSBRequest, IUnknown) { DEFINE_ABSTRACT_UNKNOWN() @@ -324,44 +326,39 @@ // If there is a TransferBuffer, the TransferBufferLength contains the length of the buffer - virtual NTSTATUS InitializeWithSetupPacket(IN PUSB_DEFAULT_PIPE_SETUP_PACKET SetupPacket, - IN ULONG TransferBufferLength, - IN PVOID TransferBuffer) = 0; - -// -//TODO: find required parameters for different packet types -// - - -//----------------------------------------------------------------------------------------- -// -// SetEndPoint -// -// Description: sets the endpoint of the request. - - virtual NTSTATUS SetEndPoint(PUSB_ENDPOINT_DESCRIPTOR EndPoint); - -//----------------------------------------------------------------------------------------- -// -// SetCompletionDetails -// -// Description: sets up how the request should be completed -// If an irp is passed, then it is completed with status code of the -// CompletionCallback or CancelCallback -// If an event is passed, then the event is signaled - - virtual NTSTATUS SetCompletionDetails(IN OPTIONAL PIRP Irp, - IN OPTIONAL PKEVENT Event) = 0; + virtual NTSTATUS InitializeWithSetupPacket(IN PDMAMEMORYMANAGER DmaManager, + IN PUSB_DEFAULT_PIPE_SETUP_PACKET SetupPacket, + IN OUT ULONG TransferBufferLength, + IN OUT PMDL TransferBuffer) = 0; + +//----------------------------------------------------------------------------------------- +// +// InitializeWithIrp +// +// Description: initializes the request with an IRP +// The irp contains an URB block which contains all necessary information + + virtual NTSTATUS InitializeWithIrp(IN PDMAMEMORYMANAGER DmaManager, + IN OUT PIRP Irp); + +//----------------------------------------------------------------------------------------- +// +// SetCompletionEvent +// +// Description: sets up completion event which is signaled when the +// request is completed or cancelled + + virtual NTSTATUS SetCompletionEvent(IN PKEVENT Event) = 0; //----------------------------------------------------------------------------------------- // // CompletionCallback // -// Description: called when request has been completed. It is called when +// Description: called when request has been completed. It is called when // IUSBQueue completes the request virtual VOID CompletionCallback(IN NTSTATUS NtStatusCode, - IN ULONG UrbStatusCode) = 0; + IN ULONG UrbStatusCode) = 0; //----------------------------------------------------------------------------------------- // @@ -370,6 +367,31 @@ // Description: called when request is cancelled. Called by IUSBQueue virtual VOID CancelCallback(IN NTSTATUS NtStatusCode) = 0; + +//----------------------------------------------------------------------------------------- +// +// GetQueueHead +// +// Description: returns an initialized queue head with contains the all transfer descriptors + + virtual NTSTATUS GetQueueHead(struct _QUEUE_HEAD ** OutHead) = 0; + +//----------------------------------------------------------------------------------------- +// +// IsRequestComplete +// +// Description: returns true when the request has been completed +// Should be called after the CompletionCallback has been invoked + + virtual BOOLEAN IsRequestComplete() = 0; + +//----------------------------------------------------------------------------------------- +// +// GetTransferType +// +// Description: returns the type of the request: control, bulk, iso, interrupt + + virtual ULONG GetTransferType() = 0; }; Modified: branches/usb-bringup/drivers/usb/usbehci_new/usb_device.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbehci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbehci_new/usb_device.cpp [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbehci_new/usb_device.cpp [iso-8859-1] Tue Apr 19 01:21:10 2011 @@ -68,6 +68,7 @@ USB_DEVICE_DESCRIPTOR m_DeviceDescriptor; ULONG m_PortStatus; PUSBQUEUE m_Queue; + PDMAMEMORYMANAGER m_DmaManager; }; //---------------------------------------------------------------------------------------- @@ -125,6 +126,21 @@ } // + // FIXME: get dma manager + // + //Status = m_Device->GetDMA(&m_DmaManager); + if (!NT_SUCCESS(Status)) + { + // + // failed to get usb queue + // + DPRINT1("CUSBDevice::Initialize GetUsbQueue failed with %x\n", Status); + return Status; + } + + + + // // zero descriptor // RtlZeroMemory(&m_DeviceDescriptor, sizeof(USB_DEVICE_DESCRIPTOR)); @@ -293,7 +309,7 @@ // initialize request // CtrlSetup.bRequest = USB_REQUEST_SET_ADDRESS; - CtrlSetup.wValue.W = DeviceAddress; + CtrlSetup.wValue.W = (USHORT)DeviceAddress; // // set device address @@ -386,6 +402,8 @@ PUSBREQUEST Request; KEVENT Event; BOOLEAN Wait = FALSE; + PMDL Mdl = 0; + if (!m_Queue) { @@ -409,10 +427,12 @@ return Status; } + /* FIXME build MDL */ + // // initialize request // - Status = Request->InitializeWithSetupPacket(Packet, BufferLength, Buffer); + Status = Request->InitializeWithSetupPacket(m_DmaManager, Packet, BufferLength, Mdl); if (!NT_SUCCESS(Status)) { // @@ -439,7 +459,7 @@ // // set completion details // - Status = Request->SetCompletionDetails(Irp, pEvent); + Status = Request->SetCompletionEvent(pEvent); if (!NT_SUCCESS(Status)) { // Added: branches/usb-bringup/drivers/usb/usbehci_new/usb_request.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbehci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbehci_new/usb_request.cpp (added) +++ branches/usb-bringup/drivers/usb/usbehci_new/usb_request.cpp [iso-8859-1] Tue Apr 19 01:21:10 2011 @@ -1,0 +1,801 @@ +/* + * PROJECT: ReactOS Universal Serial Bus Bulk Enhanced Host Controller Interface + * LICENSE: GPL - See COPYING in the top level directory + * FILE: drivers/usb/usbehci/usb_request.cpp + * PURPOSE: USB EHCI device driver. + * PROGRAMMERS: + * Michael Martin (michael.martin(a)reactos.org) + * Johannes Anderwald (johannes.anderwald(a)reactos.org) + */ + +#define INITGUID + +#include "usbehci.h" +#include "hardware.h" + +class CUSBRequest : public IUSBRequest +{ +public: + STDMETHODIMP QueryInterface( REFIID InterfaceId, PVOID* Interface); + + STDMETHODIMP_(ULONG) AddRef() + { + InterlockedIncrement(&m_Ref); + return m_Ref; + } + STDMETHODIMP_(ULONG) Release() + { + InterlockedDecrement(&m_Ref); + + if (!m_Ref) + { + delete this; + return 0; + } + return m_Ref; + } + + // IUSBRequest interface functions + virtual NTSTATUS InitializeWithSetupPacket(IN PDMAMEMORYMANAGER DmaManager, IN PUSB_DEFAULT_PIPE_SETUP_PACKET SetupPacket, IN OUT ULONG TransferBufferLength, IN OUT PMDL TransferBuffer); + virtual NTSTATUS InitializeWithIrp(IN PDMAMEMORYMANAGER DmaManager, IN OUT PIRP Irp); + virtual NTSTATUS SetCompletionEvent(IN PKEVENT Event); + virtual VOID CompletionCallback(IN NTSTATUS NtStatusCode, IN ULONG UrbStatusCode); + virtual VOID CancelCallback(IN NTSTATUS NtStatusCode); + virtual NTSTATUS GetQueueHead(struct _QUEUE_HEAD ** OutHead); + virtual BOOLEAN IsRequestComplete(); + virtual ULONG GetTransferType(); + + // local functions + ULONG InternalGetTransferType(); + NTSTATUS BuildControlTransferQueueHead(PQUEUE_HEAD * OutHead); + NTSTATUS BuildBulkTransferQueueHead(PQUEUE_HEAD * OutHead); + NTSTATUS CreateDescriptor(PQUEUE_TRANSFER_DESCRIPTOR *OutDescriptor); + NTSTATUS CreateQueueHead(PQUEUE_HEAD *OutQueueHead); + ULONG GetDeviceAddress(); + NTSTATUS BuildSetupPacket(); + + // constructor / destructor + CUSBRequest(IUnknown *OuterUnknown){} + virtual ~CUSBRequest(){} + +protected: + LONG m_Ref; + PDMAMEMORYMANAGER m_DmaManager; + PUSB_DEFAULT_PIPE_SETUP_PACKET m_SetupPacket; + ULONG m_TransferBufferLength; + PMDL m_TransferBufferMDL; + PIRP m_Irp; + PKEVENT m_CompletionEvent; + + PQUEUE_HEAD m_QueueHead; + PQUEUE_TRANSFER_DESCRIPTOR m_TransferDescriptors[3]; + PUSB_DEFAULT_PIPE_SETUP_PACKET m_DescriptorPacket; +}; + +//---------------------------------------------------------------------------------------- +NTSTATUS +STDMETHODCALLTYPE +CUSBRequest::QueryInterface( + IN REFIID refiid, + OUT PVOID* Output) +{ + return STATUS_UNSUCCESSFUL; +} + +//---------------------------------------------------------------------------------------- +NTSTATUS +CUSBRequest::InitializeWithSetupPacket( + IN PDMAMEMORYMANAGER DmaManager, + IN PUSB_DEFAULT_PIPE_SETUP_PACKET SetupPacket, + IN OUT ULONG TransferBufferLength, + IN OUT PMDL TransferBuffer) +{ + // + // sanity checks + // + PC_ASSERT(DmaManager); + PC_ASSERT(SetupPacket); + + // + // initialize packet + // + m_DmaManager = DmaManager; + m_SetupPacket = SetupPacket; + m_TransferBufferLength = TransferBufferLength; + m_TransferBufferMDL = TransferBuffer; + + // + // done + // + return STATUS_SUCCESS; +} +//---------------------------------------------------------------------------------------- +NTSTATUS +CUSBRequest::InitializeWithIrp( + IN PDMAMEMORYMANAGER DmaManager, + IN OUT PIRP Irp) +{ + PIO_STACK_LOCATION IoStack; + PURB Urb; + NTSTATUS Status; + + // + // sanity checks + // + PC_ASSERT(DmaManager); + PC_ASSERT(Irp); + + // + // get current irp stack location + // + IoStack = IoGetCurrentIrpStackLocation(Irp); + + // + // sanity check + // + PC_ASSERT(IoStack->MajorFunction == IRP_MJ_INTERNAL_DEVICE_CONTROL); + PC_ASSERT(IoStack->Parameters.DeviceIoControl.IoControlCode == IOCTL_INTERNAL_USB_SUBMIT_URB); + PC_ASSERT(IoStack->Parameters.Others.Argument1 != 0); + + // + // get urb + // + Urb = (PURB)IoStack->Parameters.Others.Argument1; + + // + // store irp + // + m_Irp = Irp; + + // + // check function type + // + switch (Urb->UrbHeader.Function) + { + // + // luckily those request have the same structure layout + // + case URB_FUNCTION_CLASS_INTERFACE: + case URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE: + case URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER: + { + // + // bulk / interrupt transfer + // + if (Urb->UrbBulkOrInterruptTransfer.TransferBufferLength) + { + // + // it must have an MDL + // + PC_ASSERT(Urb->UrbBulkOrInterruptTransfer.TransferBufferMDL); + + // + // get mdl buffer + // + m_TransferBufferMDL = Urb->UrbBulkOrInterruptTransfer.TransferBufferMDL; + m_TransferBufferLength = Urb->UrbBulkOrInterruptTransfer.TransferBufferLength; + } + break; + } + default: + DPRINT1("URB Function: not supported %x\n", Urb->UrbHeader.Function); + PC_ASSERT(FALSE); + } + + // + // done + // + return STATUS_SUCCESS; + +} +//---------------------------------------------------------------------------------------- +NTSTATUS +CUSBRequest::SetCompletionEvent( + IN PKEVENT Event) +{ + if (m_QueueHead) + { + // + // WTF? operation is already in progress + // + return STATUS_UNSUCCESSFUL; + } + + // + // store completion event + // + m_CompletionEvent = Event; + + // + // done + // + return STATUS_SUCCESS; +} +//---------------------------------------------------------------------------------------- +VOID +CUSBRequest::CompletionCallback( + IN NTSTATUS NtStatusCode, + IN ULONG UrbStatusCode) +{ + PIO_STACK_LOCATION IoStack; + PURB Urb; + + if (m_Irp) + { + // + // set irp completion status + // + m_Irp->IoStatus.Status = NtStatusCode; + + // + // get current irp stack location + // + IoStack = IoGetCurrentIrpStackLocation(m_Irp); + + // + // get urb + // + Urb = (PURB)IoStack->Parameters.Others.Argument1; + + // + // store urb status + // + Urb->UrbHeader.Status = UrbStatusCode; + + // + // check if the request was successfull + // + if (!NT_SUCCESS(NtStatusCode)) + { + // + // set returned length to zero in case of error + // + Urb->UrbHeader.Length = 0; + } + + // + // FIXME: check if the transfer was split + // if yes dont complete irp yet + // + IoCompleteRequest(m_Irp, IO_NO_INCREMENT); + } + + if (m_CompletionEvent) + { + // + // FIXME: make sure the request was not split + // + KeSetEvent(m_CompletionEvent, 0, FALSE); + } +} +//---------------------------------------------------------------------------------------- +VOID +CUSBRequest::CancelCallback( + IN NTSTATUS NtStatusCode) +{ + PIO_STACK_LOCATION IoStack; + PURB Urb; + + if (m_Irp) + { + // + // set irp completion status + // + m_Irp->IoStatus.Status = NtStatusCode; + + // + // get current irp stack location + // + IoStack = IoGetCurrentIrpStackLocation(m_Irp); + + // + // get urb + // + Urb = (PURB)IoStack->Parameters.Others.Argument1; + + // + // store urb status + // + Urb->UrbHeader.Status = USBD_STATUS_CANCELED; + Urb->UrbHeader.Length = 0; + + // + // FIXME: check if the transfer was split + // if yes dont complete irp yet + // + IoCompleteRequest(m_Irp, IO_NO_INCREMENT); + } + + if (m_CompletionEvent) + { + // + // FIXME: make sure the request was not split + // + KeSetEvent(m_CompletionEvent, 0, FALSE); + } +} +//---------------------------------------------------------------------------------------- +NTSTATUS +CUSBRequest::GetQueueHead( + struct _QUEUE_HEAD ** OutHead) +{ + ULONG TransferType; + NTSTATUS Status; + + // + // first get transfer type + // + TransferType = InternalGetTransferType(); + + // + // build request depending on type + // + switch(TransferType) + { + case USB_ENDPOINT_TYPE_CONTROL: + Status = BuildControlTransferQueueHead(OutHead); + break; + case USB_ENDPOINT_TYPE_BULK: + Status = BuildBulkTransferQueueHead(OutHead); + break; + case USB_ENDPOINT_TYPE_INTERRUPT: + DPRINT1("USB_ENDPOINT_TYPE_INTERRUPT not implemented\n"); + Status = STATUS_NOT_IMPLEMENTED; + break; + case USB_ENDPOINT_TYPE_ISOCHRONOUS: + DPRINT1("USB_ENDPOINT_TYPE_ISOCHRONOUS not implemented\n"); + Status = STATUS_NOT_IMPLEMENTED; + break; + } + + if (NT_SUCCESS(Status)) + { + // + // store queue head + // + m_QueueHead = *OutHead; + } + + // + // done + // + return Status; +} + +//---------------------------------------------------------------------------------------- +BOOLEAN +CUSBRequest::IsRequestComplete() +{ + // + // FIXME: check if request was split + // + return TRUE; +} +//---------------------------------------------------------------------------------------- +ULONG +CUSBRequest::GetTransferType() +{ + // + // call internal implementation + // + return InternalGetTransferType(); +} + +//---------------------------------------------------------------------------------------- +ULONG +CUSBRequest::InternalGetTransferType() +{ + PIO_STACK_LOCATION IoStack; + PURB Urb; + PUSB_ENDPOINT_DESCRIPTOR EndpointDescriptor; + ULONG TransferType; + + // + // check if an irp is provided + // + if (m_Irp) + { + // + // get stack location + // + IoStack = IoGetCurrentIrpStackLocation(m_Irp); + + // + // get urb + // + Urb = (PURB)IoStack->Parameters.Others.Argument1; + + // + // check if there is a handle + // + if (Urb->UrbBulkOrInterruptTransfer.PipeHandle) + { + // + // cast to end point + // + EndpointDescriptor = (PUSB_ENDPOINT_DESCRIPTOR)Urb->UrbBulkOrInterruptTransfer.PipeHandle; + + // + // end point is defined in the low byte of bmAttributes + // + TransferType = (EndpointDescriptor->bmAttributes & USB_ENDPOINT_TYPE_MASK); + } + else + { + // + // no pipe handle, assume it is a control transfer + // + TransferType = USB_ENDPOINT_TYPE_CONTROL; + } + } + else + { + // + // initialized with setup packet, must be a control transfer + // + TransferType = USB_ENDPOINT_TYPE_CONTROL; + } + + // + // done + // + return TransferType; +} + +//---------------------------------------------------------------------------------------- +NTSTATUS +CUSBRequest::BuildControlTransferQueueHead( + PQUEUE_HEAD * OutHead) +{ + NTSTATUS Status; + ULONG NumTransferDescriptors, Index; + PQUEUE_HEAD QueueHead; + + + // + // first allocate the queue head + // + Status = CreateQueueHead(&QueueHead); + if (!NT_SUCCESS(Status)) + { + // + // failed to allocate queue head + // + return STATUS_INSUFFICIENT_RESOURCES; + } + + // + // create setup packet + // + Status = BuildSetupPacket(); + if (!NT_SUCCESS(Status)) + { + // + // failed to allocate setup packet + // + return STATUS_INSUFFICIENT_RESOURCES; + } + + // + // calculate num of transfer descriptors + // + NumTransferDescriptors = m_TransferBufferMDL != 0 ? 3 : 2; + + // + // allocate transfer descriptors + // + for(Index = 0; Index < NumTransferDescriptors; Index++) + { + // + // allocate transfer descriptor + // + Status = CreateDescriptor(&m_TransferDescriptors[Index]); + if (!NT_SUCCESS(Status)) + { + // + // failed to allocate transfer descriptor + // + return Status; + } + } + + // + // now initialize the queue head + // + QueueHead->EndPointCharacteristics.DeviceAddress = GetDeviceAddress(); + + //if (PipeHandle) + // QueueHead->EndPointCharacteristics.EndPointNumber = ((PUSB_ENDPOINT_DESCRIPTOR)PipeHandle)->bEndpointAddress & 0x0F; + + QueueHead->Token.Bits.DataToggle = TRUE; + + // + // setup descriptors + // + m_TransferDescriptors[0]->Token.Bits.PIDCode = PID_CODE_SETUP_TOKEN; + m_TransferDescriptors[0]->Token.Bits.TotalBytesToTransfer = sizeof(USB_DEFAULT_PIPE_SETUP_PACKET); + m_TransferDescriptors[0]->Token.Bits.DataToggle = FALSE; + + if (m_TransferBufferMDL) + { + // + // setup in descriptor + // + m_TransferDescriptors[1]->Token.Bits.PIDCode = PID_CODE_IN_TOKEN; + m_TransferDescriptors[1]->Token.Bits.TotalBytesToTransfer = m_TransferBufferLength; + + // + // setup out descriptor + // + m_TransferDescriptors[2]->Token.Bits.PIDCode = PID_CODE_OUT_TOKEN; + m_TransferDescriptors[2]->Token.Bits.TotalBytesToTransfer = 0; + + // + // link descriptors + // + m_TransferDescriptors[0]->NextPointer = m_TransferDescriptors[1]->PhysicalAddr; + + // + // special case, setup alternative next descriptor in case of error + // HAIKU links to dead descriptor + // + m_TransferDescriptors[0]->AlternateNextPointer = m_TransferDescriptors[2]->PhysicalAddr; + m_TransferDescriptors[1]->NextPointer = m_TransferDescriptors[2]->PhysicalAddr; + m_TransferDescriptors[1]->AlternateNextPointer = m_TransferDescriptors[2]->PhysicalAddr; + + // + // interrupt on completion + // + m_TransferDescriptors[2]->Token.Bits.InterruptOnComplete = TRUE; + + } + else + { + // + // no buffer, setup in descriptor + // + m_TransferDescriptors[1]->Token.Bits.PIDCode = PID_CODE_IN_TOKEN; + m_TransferDescriptors[1]->Token.Bits.TotalBytesToTransfer = 0; + + // + // link descriptors + // + m_TransferDescriptors[0]->NextPointer = m_TransferDescriptors[1]->PhysicalAddr; + m_TransferDescriptors[0]->AlternateNextPointer = m_TransferDescriptors[1]->PhysicalAddr; + + // + // interrupt on completion + // + m_TransferDescriptors[1]->Token.Bits.InterruptOnComplete = TRUE; + } + + // + // FIXME: where put MDL virtual address? + // + + + // + // link setup packet into buffer - VIRTUAL Address!!! + // + m_TransferDescriptors[0]->BufferPointer[0] = (ULONG)PtrToUlong(m_DescriptorPacket); + + // + // link transfer descriptors to queue head + // + QueueHead->NextPointer = m_TransferDescriptors[0]->PhysicalAddr; + + // + // store result + // + *OutHead = QueueHead; + + // + // done + // + return STATUS_SUCCESS; +} + +//---------------------------------------------------------------------------------------- +NTSTATUS +CUSBRequest::BuildBulkTransferQueueHead( + PQUEUE_HEAD * OutHead) +{ + UNIMPLEMENTED + return STATUS_NOT_IMPLEMENTED; +} + +//---------------------------------------------------------------------------------------- +NTSTATUS +CUSBRequest::CreateDescriptor( + PQUEUE_TRANSFER_DESCRIPTOR *OutDescriptor) +{ + PQUEUE_TRANSFER_DESCRIPTOR Descriptor; + NTSTATUS Status; + PHYSICAL_ADDRESS TransferDescriptorPhysicalAddress; + + // + // allocate descriptor + // + Status = m_DmaManager->Allocate(sizeof(QUEUE_TRANSFER_DESCRIPTOR), (PVOID*)&Descriptor, &TransferDescriptorPhysicalAddress); + if (!NT_SUCCESS(Status)) + { + // + // failed to allocate transfer descriptor + // + return STATUS_INSUFFICIENT_RESOURCES; + } + + // + // initialize transfer descriptor + // + Descriptor->NextPointer = TERMINATE_POINTER; + Descriptor->AlternateNextPointer = TERMINATE_POINTER; + Descriptor->Token.Bits.DataToggle = TRUE; + Descriptor->Token.Bits.ErrorCounter = 0x03; + Descriptor->Token.Bits.Active = TRUE; + Descriptor->PhysicalAddr = TransferDescriptorPhysicalAddress.LowPart; + + // + // store result + // + *OutDescriptor = Descriptor; + + // + // done + // + return Status; +} + +//---------------------------------------------------------------------------------------- +NTSTATUS +CUSBRequest::CreateQueueHead( + PQUEUE_HEAD *OutQueueHead) +{ + PQUEUE_HEAD QueueHead; + PHYSICAL_ADDRESS QueueHeadPhysicalAddress; + NTSTATUS Status; + + // + // allocate queue head + // + Status = m_DmaManager->Allocate(sizeof(QUEUE_HEAD), (PVOID*)&QueueHead, &QueueHeadPhysicalAddress); + if (!NT_SUCCESS(Status)) + { + // + // failed to allocate queue head + // + return STATUS_INSUFFICIENT_RESOURCES; + } + + // + // initialize queue head + // + QueueHead->HorizontalLinkPointer = TERMINATE_POINTER; + QueueHead->AlternateNextPointer = TERMINATE_POINTER; + QueueHead->NextPointer = TERMINATE_POINTER; + + // + // 1 for non high speed, 0 for high speed device + // + QueueHead->EndPointCharacteristics.ControlEndPointFlag = 0; + QueueHead->EndPointCharacteristics.HeadOfReclamation = FALSE; + QueueHead->EndPointCharacteristics.MaximumPacketLength = 64; + + // + // Set NakCountReload to max value possible + // + QueueHead->EndPointCharacteristics.NakCountReload = 0xF; + + // + // Get the Initial Data Toggle from the QEDT + // + QueueHead->EndPointCharacteristics.QEDTDataToggleControl = FALSE; + + // + // FIXME: check if High Speed Device + // + QueueHead->EndPointCharacteristics.EndPointSpeed = QH_ENDPOINT_HIGHSPEED; + QueueHead->EndPointCapabilities.NumberOfTransactionPerFrame = 0x03; + QueueHead->Token.DWord = 0; + QueueHead->Token.Bits.InterruptOnComplete = FALSE; + + // + // FIXME check if that is really needed + // + QueueHead->PhysicalAddr = QueueHeadPhysicalAddress.LowPart; + + // + // done + // + return STATUS_SUCCESS; +} + +//---------------------------------------------------------------------------------------- +ULONG +CUSBRequest::GetDeviceAddress() +{ + PIO_STACK_LOCATION IoStack; + PURB Urb; + PUSBDEVICE UsbDevice; + + // + // check if there is an irp provided + // + if (!m_Irp) + { + // + // no irp is provided + // assume it is for device address 0 + return 0; + } + + // + // get current stack location + // + IoStack = IoGetCurrentIrpStackLocation(m_Irp); + + // + // get contained urb + // + Urb = (PURB)IoStack->Parameters.Others.Argument1; + + // + // check if there is a pipe handle provided + // + if (Urb->UrbHeader.UsbdDeviceHandle) + { + // + // there is a device handle provided + // + UsbDevice = (PUSBDEVICE)Urb->UrbHeader.UsbdDeviceHandle; + + // + // return device address + // + return UsbDevice->GetDeviceAddress(); + } + + // + // no device handle provided, it is the host root bus + // + return 0; +} + +//---------------------------------------------------------------------------------------- +NTSTATUS +CUSBRequest::BuildSetupPacket() +{ + NTSTATUS Status; + PHYSICAL_ADDRESS PhysicalAddress; + + // + // FIXME: generate setup packet from urb request + // + PC_ASSERT(m_SetupPacket); + + // + // allocate common buffer setup packet + // + Status = m_DmaManager->Allocate(sizeof(USB_DEFAULT_PIPE_SETUP_PACKET), (PVOID*)&m_DescriptorPacket, &PhysicalAddress); + if (!NT_SUCCESS(Status)) + { + // + // no memory + // + return Status; + } + + if (m_SetupPacket) + { + // + // copy setup packet + // + RtlCopyMemory(m_DescriptorPacket, m_SetupPacket, sizeof(USB_DEFAULT_PIPE_SETUP_PACKET)); + } + + // + // done + // + return Status; +} + Propchange: branches/usb-bringup/drivers/usb/usbehci_new/usb_request.cpp ------------------------------------------------------------------------------ svn:eol-style = native Modified: branches/usb-bringup/drivers/usb/usbehci_new/usbehci.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbehci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbehci_new/usbehci.cpp [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbehci_new/usbehci.cpp [iso-8859-1] Tue Apr 19 01:21:10 2011 @@ -64,8 +64,6 @@ PIO_STACK_LOCATION IoStack; NTSTATUS Status; - DPRINT1("EHCI_Dispatch\n"); - // // get common device extension // @@ -106,19 +104,10 @@ // return DeviceExtension->Dispatcher->HandleDeviceControl(DeviceObject, Irp); } - case IRP_MJ_CREATE: - { - // - // dispatch create request - // - Status = STATUS_SUCCESS; - - break; - } default: { - DPRINT1("EHCI_Dispatch> Major %lu Minor %lu not supported\n", IoStack->MajorFunction, IoStack->MinorFunction); - Status = STATUS_NOT_SUPPORTED; + DPRINT1("EHCI_Dispatch> Major %lu Minor %lu unhandeled\n", IoStack->MajorFunction, IoStack->MinorFunction); + Status = STATUS_SUCCESS; } }
13 years, 8 months
1
0
0
0
[akhaldi] 51395: * Fix build.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Mon Apr 18 22:17:25 2011 New Revision: 51395 URL:
http://svn.reactos.org/svn/reactos?rev=51395&view=rev
Log: * Fix build. Modified: trunk/reactos/dll/win32/kernel32/file/dosdev.c Modified: trunk/reactos/dll/win32/kernel32/file/dosdev.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/do…
============================================================================== --- trunk/reactos/dll/win32/kernel32/file/dosdev.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/file/dosdev.c [iso-8859-1] Mon Apr 18 22:17:25 2011 @@ -14,7 +14,7 @@ #include <k32.h> #define NDEBUG #include <debug.h> -#include <Dbt.h> +#include <dbt.h> DEBUG_CHANNEL(kernel32file); /* FUNCTIONS *****************************************************************/
13 years, 8 months
1
0
0
0
[fireball] 51394: [KERNEL32_WINETEST] - Sam Arun Raj Seeniraj: Added new test cases to QueryDosDevice(). Should be sent to Wine (tm). See issue #993 for more details.
by fireball@svn.reactos.org
Author: fireball Date: Mon Apr 18 21:56:44 2011 New Revision: 51394 URL:
http://svn.reactos.org/svn/reactos?rev=51394&view=rev
Log: [KERNEL32_WINETEST] - Sam Arun Raj Seeniraj: Added new test cases to QueryDosDevice(). Should be sent to Wine (tm). See issue #993 for more details. Added: trunk/rostests/winetests/kernel32/dosdev.c (with props) Modified: trunk/rostests/winetests/kernel32/CMakeLists.txt trunk/rostests/winetests/kernel32/kernel32.rbuild trunk/rostests/winetests/kernel32/testlist.c Modified: trunk/rostests/winetests/kernel32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/CMakeL…
============================================================================== --- trunk/rostests/winetests/kernel32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/winetests/kernel32/CMakeLists.txt [iso-8859-1] Mon Apr 18 21:56:44 2011 @@ -40,6 +40,7 @@ version.c virtual.c volume.c + dosdev.c testlist.c resource.rc) Added: trunk/rostests/winetests/kernel32/dosdev.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/dosdev…
============================================================================== --- trunk/rostests/winetests/kernel32/dosdev.c (added) +++ trunk/rostests/winetests/kernel32/dosdev.c [iso-8859-1] Mon Apr 18 21:56:44 2011 @@ -1,0 +1,228 @@ +/* + * Unit test suite for virtual substituted drive functions. + * + * Copyright 2011 Sam Arun Raj + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include <stdarg.h> + +#include "wine/test.h" +#include "windef.h" +#include "winbase.h" +#include "winerror.h" + +static void test_DefineDosDeviceA1(void) +{ + /* Test using lowercase drive letters */ + CHAR Target[MAX_PATH]; + CHAR Drive[] = "m:"; + BOOL Result; + + Result = DefineDosDeviceA(0, Drive, "C:\\temp"); + ok(Result, "Failed to subst drive using lowercase drive letter"); + + Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, Drive, "C:\\temp"); + ok(Result, "Failed to remove subst drive using lowercase drive letter"); + + Result = QueryDosDeviceA(Drive, Target, MAX_PATH); + ok(!Result, "Subst drive is present even after remove attempt"); +} + +static void test_DefineDosDeviceA2(void) +{ + /* Test using trailing \ against drive letter */ + CHAR Target[MAX_PATH]; + CHAR Drive[] = "Q:\\"; + BOOL Result; + + Result = DefineDosDeviceA(0, Drive, "C:\\temp"); + ok(!Result, "Subst drive using trailing path seperator"); + + Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, Drive, "C:\\temp"); + ok(!Result, "Subst drive using trailing path seperator"); + + Result = QueryDosDeviceA(Drive, Target, MAX_PATH); + ok(!Result, "Subst drive is present when it should not be created in the first place"); +} + +static void test_DefineDosDeviceA3(void) +{ + /* Test using arbitary string, not necessarily a DOS drive letter */ + CHAR Target[MAX_PATH]; + CHAR Drive[] = "!QHello:"; + BOOL Result; + + Result = DefineDosDeviceA(0, Drive, "C:\\temp"); + ok(Result, "Failed to subst drive using non-DOS drive name"); + + Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, Drive, "C:\\temp"); + ok(Result, "Failed to subst drive using non-DOS drive name"); + + Result = QueryDosDeviceA(Drive, Target, MAX_PATH); + ok(!Result, "Subst drive is present even after remove attempt"); +} + +static void test_DefineDosDeviceA4(void) +{ + /* Test remove without using DDD_EXACT_MATCH_ON_REMOVE */ + CHAR Target[MAX_PATH]; + CHAR Drive[] = "M:"; + BOOL Result; + + Result = DefineDosDeviceA(0, Drive, "C:\\temp"); + ok(Result, "Failed to subst drive"); + + Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION, Drive, NULL); + ok(Result, "Failed to remove subst drive using NULL Target name"); + + Result = QueryDosDeviceA(Drive, Target, MAX_PATH); + ok(!Result, "Subst drive is present even after remove attempt"); +} + +static void test_DefineDosDeviceA5(void) +{ + /* Test multiple adds and multiple removes in add order */ + CHAR Target[MAX_PATH]; + CHAR Drive[] = "M:"; + BOOL Result; + + Result = DefineDosDeviceA(0, Drive, "C:\\temp1"); + ok(Result, "Failed to subst drive"); + Result = DefineDosDeviceA(0, Drive, "C:\\temp2"); + ok(Result, "Failed to subst drive"); + Result = DefineDosDeviceA(0, Drive, "C:\\temp3"); + ok(Result, "Failed to subst drive"); + + Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, Drive, "C:\\temp1"); + ok(Result, "Failed to remove subst drive"); + Result = QueryDosDeviceA(Drive, Target, MAX_PATH); + ok(Result, "Failed to query subst drive"); + if (Result) + ok((_stricmp(Target, "\\??\\C:\\temp3") == 0), "Subst drive is not pointing to correct target"); + + Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, Drive, "C:\\temp2"); + ok(Result, "Failed to remove subst drive"); + Result = QueryDosDeviceA(Drive, Target, MAX_PATH); + ok(Result, "Failed to query subst drive"); + if (Result) + ok((_stricmp(Target, "\\??\\C:\\temp3") == 0), "Subst drive is not pointing to correct target"); + + Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, Drive, "C:\\temp3"); + ok(Result, "Failed to remove subst drive"); + + Result = QueryDosDeviceA(Drive, Target, MAX_PATH); + ok(!Result, "Subst drive is present even after remove attempt"); +} + +static void test_DefineDosDeviceA6(void) +{ + /* Test multiple adds and multiple removes in reverse order */ + CHAR Target[MAX_PATH]; + CHAR Drive[] = "M:"; + BOOL Result; + + Result = DefineDosDeviceA(0, Drive, "C:\\temp1"); + ok(Result, "Failed to subst drive"); + Result = DefineDosDeviceA(0, Drive, "C:\\temp2"); + ok(Result, "Failed to subst drive"); + Result = DefineDosDeviceA(0, Drive, "C:\\temp3"); + ok(Result, "Failed to subst drive"); + + Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, Drive, "C:\\temp3"); + ok(Result, "Failed to remove subst drive"); + Result = QueryDosDeviceA(Drive, Target, MAX_PATH); + ok(Result, "Failed to query subst drive"); + if (Result) + ok((_stricmp(Target, "\\??\\C:\\temp2") == 0), "Subst drive is not pointing to correct target"); + + Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, Drive, "C:\\temp2"); + ok(Result, "Failed to remove subst drive"); + Result = QueryDosDeviceA(Drive, Target, MAX_PATH); + ok(Result, "Failed to query subst drive"); + if (Result) + ok((_stricmp(Target, "\\??\\C:\\temp1") == 0), "Subst drive is not pointing to correct target"); + + Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, Drive, "C:\\temp1"); + ok(Result, "Failed to remove subst drive"); + + Result = QueryDosDeviceA(Drive, Target, MAX_PATH); + ok(!Result, "Subst drive is present even after remove attempt"); +} + +static void test_DefineDosDeviceA7(void) +{ + /* Test multiple adds and multiple removes out of order */ + CHAR Target[MAX_PATH]; + CHAR Drive[] = "M:"; + BOOL Result; + + Result = DefineDosDeviceA(0, Drive, "C:\\temp1"); + ok(Result, "Failed to subst drive"); + Result = DefineDosDeviceA(0, Drive, "C:\\temp2"); + ok(Result, "Failed to subst drive"); + Result = DefineDosDeviceA(0, Drive, "C:\\temp3"); + ok(Result, "Failed to subst drive"); + Result = DefineDosDeviceA(0, Drive, "C:\\temp4"); + ok(Result, "Failed to subst drive"); + Result = DefineDosDeviceA(0, Drive, "C:\\temp5"); + ok(Result, "Failed to subst drive"); + + Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, Drive, "C:\\temp2"); + ok(Result, "Failed to remove subst drive"); + Result = QueryDosDeviceA(Drive, Target, MAX_PATH); + ok(Result, "Failed to query subst drive"); + if (Result) + ok((_stricmp(Target, "\\??\\C:\\temp5") == 0), "Subst drive is not pointing to correct target"); + + Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, Drive, "C:\\temp5"); + ok(Result, "Failed to remove subst drive"); + Result = QueryDosDeviceA(Drive, Target, MAX_PATH); + ok(Result, "Failed to query subst drive"); + if (Result) + ok((_stricmp(Target, "\\??\\C:\\temp4") == 0), "Subst drive is not pointing to correct target"); + + Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, Drive, "C:\\temp1"); + ok(Result, "Failed to remove subst drive"); + Result = QueryDosDeviceA(Drive, Target, MAX_PATH); + ok(Result, "Failed to query subst drive"); + if (Result) + ok((_stricmp(Target, "\\??\\C:\\temp4") == 0), "Subst drive is not pointing to correct target"); + + Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, Drive, "C:\\temp3"); + ok(Result, "Failed to remove subst drive"); + Result = QueryDosDeviceA(Drive, Target, MAX_PATH); + ok(Result, "Failed to query subst drive"); + if (Result) + ok((_stricmp(Target, "\\??\\C:\\temp4") == 0), "Subst drive is not pointing to correct target"); + + Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, Drive, "C:\\temp4"); + ok(Result, "Failed to remove subst drive"); + + Result = QueryDosDeviceA(Drive, Target, MAX_PATH); + ok(!Result, "Subst drive is present even after remove attempt"); +} + +START_TEST(dosdev) +{ + test_DefineDosDeviceA1(); + test_DefineDosDeviceA2(); + test_DefineDosDeviceA3(); + test_DefineDosDeviceA4(); + test_DefineDosDeviceA5(); + test_DefineDosDeviceA6(); + test_DefineDosDeviceA7(); +} Propchange: trunk/rostests/winetests/kernel32/dosdev.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/rostests/winetests/kernel32/kernel32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/kernel…
============================================================================== --- trunk/rostests/winetests/kernel32/kernel32.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/kernel32/kernel32.rbuild [iso-8859-1] Mon Apr 18 21:56:44 2011 @@ -40,6 +40,7 @@ <file>version.c</file> <file>virtual.c</file> <file>volume.c</file> + <file>dosdev.c</file> <file>testlist.c</file> <file>resource.rc</file> </module> Modified: trunk/rostests/winetests/kernel32/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/testli…
============================================================================== --- trunk/rostests/winetests/kernel32/testlist.c [iso-8859-1] (original) +++ trunk/rostests/winetests/kernel32/testlist.c [iso-8859-1] Mon Apr 18 21:56:44 2011 @@ -42,6 +42,7 @@ extern void func_virtual(void); extern void func_version(void); extern void func_volume(void); +extern void func_dosdev(void); const struct test winetest_testlist[] = { @@ -78,6 +79,7 @@ { "virtual", func_virtual }, { "version", func_version }, { "volume", func_volume }, + { "dosdev", func_dosdev }, { 0, 0 } };
13 years, 8 months
1
0
0
0
← Newer
1
...
9
10
11
12
13
14
15
...
30
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Results per page:
10
25
50
100
200