Author: rgampa
Date: Wed Aug 23 11:05:53 2017
New Revision: 75648

URL: http://svn.reactos.org/svn/reactos?rev=75648&view=rev
Log:
[USBXHCI]
- small changes after merging with the trunk
CORE-13344


Modified:
    branches/GSoC_2017/usbxhci/reactos/drivers/usb/usbxhci/roothub.c
    branches/GSoC_2017/usbxhci/reactos/drivers/usb/usbxhci/usbxhci.c

Modified: branches/GSoC_2017/usbxhci/reactos/drivers/usb/usbxhci/roothub.c
URL: 
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/usbxhci/reactos/drivers/usb/usbxhci/roothub.c?rev=75648&r1=75647&r2=75648&view=diff
==============================================================================
--- branches/GSoC_2017/usbxhci/reactos/drivers/usb/usbxhci/roothub.c    
[iso-8859-1] (original)
+++ branches/GSoC_2017/usbxhci/reactos/drivers/usb/usbxhci/roothub.c    
[iso-8859-1] Wed Aug 23 11:05:53 2017
@@ -28,7 +28,8 @@
         Identifies a Compound Device: Hub is not part of a compound device.
         Over-current Protection Mode: Global Over-current Protection.
     */
-    RootHubData->HubCharacteristics &= 3;
+    //RootHubData->HubCharacteristics &= 3;
+    RootHubData->HubCharacteristics.AsUSHORT &= 3;
     RootHubData->PowerOnToPowerGood = 2;
     RootHubData->HubControlCurrent = 0;
 }
@@ -53,7 +54,8 @@
     PXHCI_EXTENSION XhciExtension;
     PULONG PortStatusRegPointer;
     XHCI_PORT_STATUS_CONTROL PortStatusRegister;
-    USBHUB_PORT_STATUS portstatus;
+    //USBHUB_PORT_STATUS portstatus;
+    USB_PORT_STATUS_AND_CHANGE  portstatus;
     
     XhciExtension = (PXHCI_EXTENSION)xhciExtension;
     ASSERT(Port != 0 && Port <= XhciExtension->NumberOfPorts);
@@ -112,33 +114,32 @@
     ULONG DeviceRemovable                       : 1;
     ULONG WarmPortReset                         : 1;
     */
-    portstatus.AsULONG = 0;
-    portstatus.UsbPortStatus.ConnectStatus = 
PortStatusRegister.CurrentConnectStatus;
-    portstatus.UsbPortStatus.EnableStatus = 
PortStatusRegister.PortEnableDisable;
-    portstatus.UsbPortStatus.SuspendStatus = 
0;//PortStatusRegister.PortEnableDisable;
-    portstatus.UsbPortStatus.OverCurrent = 
PortStatusRegister.OverCurrentActive;
-    portstatus.UsbPortStatus.ResetStatus = PortStatusRegister.PortReset;
-    portstatus.UsbPortStatus.PowerStatus = PortStatusRegister.PortPower;
-    portstatus.UsbPortStatus.LsDeviceAttached = 
0;//PortStatusRegister.PortEnableDisable;
+   
+    portstatus.AsUlong32 = 0;
+    portstatus.PortStatus.Usb20PortStatus.CurrentConnectStatus = 
PortStatusRegister.CurrentConnectStatus;
+    portstatus.PortStatus.Usb20PortStatus.PortEnabledDisabled = 
PortStatusRegister.PortEnableDisable;
+    portstatus.PortStatus.Usb20PortStatus.Suspend = 
0;//PortStatusRegister.PortEnableDisable;
+    portstatus.PortStatus.Usb20PortStatus.OverCurrent = 
PortStatusRegister.OverCurrentActive;
+    portstatus.PortStatus.Usb20PortStatus.Reset = PortStatusRegister.PortReset;
+    portstatus.PortStatus.Usb20PortStatus.PortPower = 
PortStatusRegister.PortPower;
+    portstatus.PortStatus.Usb20PortStatus.LowSpeedDeviceAttached = 
0;//PortStatusRegister.PortEnableDisabl
+    //portstatus.PortStatus.Usb20PortStatus.LsDeviceAttached = 
0;//PortStatusRegister.PortEnableDisable;
    // if (PortStatusRegister.PortSpeed) 
    //{  // this check is not needed in vmware. removed for testing.
-        portstatus.UsbPortStatus.HsDeviceAttached =  
PortStatusRegister.CurrentConnectStatus;
+        //portstatus.PortStatus.Usb20PortStatus.HsDeviceAttached =  
PortStatusRegister.CurrentConnectStatus;
+        portstatus.PortStatus.Usb20PortStatus.HighSpeedDeviceAttached =  
PortStatusRegister.CurrentConnectStatus;
    //}
-    portstatus.UsbPortStatus.TestMode = 0;//PortStatusRegister.PortPower;
-    portstatus.UsbPortStatus.IndicatorControl = 
0;//PortStatusRegister.PortIndicatorControl;
-    
-    portstatus.UsbPortStatusChange.ConnectStatusChange = 
PortStatusRegister.ConnectStatusChange;
-    portstatus.UsbPortStatusChange.EnableStatusChange = 
PortStatusRegister.PortEnableDisableChange;
-    portstatus.UsbPortStatusChange.SuspendStatusChange = 
0;//PortStatusRegister.ConnectStatusChange;
-    portstatus.UsbPortStatusChange.OverCurrentChange = 
PortStatusRegister.OverCurrentChange;
-    portstatus.UsbPortStatusChange.ResetStatusChange = 
PortStatusRegister.PortResetChange;
-    portstatus.UsbPortStatusChange.PowerStatusChange = 
0;//PortStatusRegister.ConnectStatusChange;
-    portstatus.UsbPortStatusChange.LsDeviceAttachedChange = 
0;//PortStatusRegister.ConnectStatusChange;
-    portstatus.UsbPortStatusChange.HsDeviceAttachedChange = 
PortStatusRegister.ConnectStatusChange;
-    portstatus.UsbPortStatusChange.TestModeChange = 
0;//PortStatusRegister.ConnectStatusChange;
-    portstatus.UsbPortStatusChange.IndicatorControlChange = 0;// 
PortStatusRegister.ConnectStatusChange;
-   
-    *PortStatus = portstatus.AsULONG;
+   
+    portstatus.PortStatus.Usb20PortStatus.PortTestMode = 
0;//PortStatusRegister.PortPower;
+    portstatus.PortStatus.Usb20PortStatus.PortIndicatorControl = 
0;//PortStatusRegister.PortIndicatorControl;
+    
+    portstatus.PortChange.Usb20PortChange.ConnectStatusChange = 
PortStatusRegister.ConnectStatusChange;
+    portstatus.PortChange.Usb20PortChange.PortEnableDisableChange = 
PortStatusRegister.PortEnableDisableChange;
+    portstatus.PortChange.Usb20PortChange.SuspendChange = 
0;//PortStatusRegister.ConnectStatusChange;
+    portstatus.PortChange.Usb20PortChange.OverCurrentIndicatorChange = 
PortStatusRegister.OverCurrentChange;
+    portstatus.PortChange.Usb20PortChange.ResetChange = 
PortStatusRegister.PortResetChange;
+
+    *PortStatus = portstatus.AsUlong32;
     
     return MP_STATUS_SUCCESS;
 }

Modified: branches/GSoC_2017/usbxhci/reactos/drivers/usb/usbxhci/usbxhci.c
URL: 
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/usbxhci/reactos/drivers/usb/usbxhci/usbxhci.c?rev=75648&r1=75647&r2=75648&view=diff
==============================================================================
--- branches/GSoC_2017/usbxhci/reactos/drivers/usb/usbxhci/usbxhci.c    
[iso-8859-1] (original)
+++ branches/GSoC_2017/usbxhci/reactos/drivers/usb/usbxhci/usbxhci.c    
[iso-8859-1] Wed Aug 23 11:05:53 2017
@@ -423,7 +423,7 @@
     CommandLinkTRB.GenericTRB.Word3 = 0;
     
     RingStartAddr.AsULONGLONG = HcResourcesPA.QuadPart + 
FIELD_OFFSET(XHCI_HC_RESOURCES, CommandRing.firstSeg);
-    CommandLinkTRB.GenericTRB.RsvdZ1 = 0; 
+    CommandLinkTRB.LinkTRB.RsvdZ1 = 0; 
     CommandLinkTRB.LinkTRB.RingSegmentPointerLo = 
RingStartAddr.RingSegmentPointerLo;
     CommandLinkTRB.LinkTRB.RingSegmentPointerHi = 
RingStartAddr.RingSegmentPointerHi;
     CommandLinkTRB.LinkTRB.InterrupterTarget = 0;
@@ -621,11 +621,11 @@
     USHORT MaxScratchPadBuffers;
     XHCI_HC_STRUCTURAL_PARAMS_2 HCSPARAMS2;
     
-    if ((Resources->TypesResources & (USBPORT_RESOURCES_MEMORY | 
USBPORT_RESOURCES_INTERRUPT)) !=
+    if ((Resources->ResourcesTypes & (USBPORT_RESOURCES_MEMORY | 
USBPORT_RESOURCES_INTERRUPT)) !=
                                      (USBPORT_RESOURCES_MEMORY | 
USBPORT_RESOURCES_INTERRUPT))
     {
-        DPRINT1("XHCI_StartController: Resources->TypesResources - %x\n",
-                Resources->TypesResources);
+        DPRINT1("XHCI_StartController: Resources->ResourcesTypes - %x\n",
+                Resources->ResourcesTypes);
 
         return MP_STATUS_ERROR;
     }


Reply via email to