Modules/USB - Increased UHCI root hub poll period to 2s
[tpg/acess2.git] / KernelLand / Modules / USB / Core / usb_poll.c
index 6359665..27f4728 100644 (file)
@@ -5,7 +5,7 @@
  * usb_poll.c
  * - Endpoint polling
  */
-#define DEBUG  1
+#define DEBUG  0
 #include <usb_core.h>
 #include "usb.h"
 #include <timers.h>
@@ -61,10 +61,9 @@ void USB_StartPollingEndpoint(tUSBInterface *Iface, int Endpoint)
 
        endpt->InputData = malloc(endpt->MaxPacketSize);
        LOG("Polling 0x%x at %i ms", Iface->Dev->Address * 16 + endpt->EndpointNum, endpt->PollingPeriod);
-       Iface->Dev->Host->HostDef->InterruptIN(
-               Iface->Dev->Host->Ptr,
-               Iface->Dev->Address * 16 + endpt->EndpointNum,
-               endpt->PollingPeriod,
+       Iface->Dev->Host->HostDef->InitInterrupt(
+               Iface->Dev->Host->Ptr, Iface->Dev->Address * 16 + endpt->EndpointNum,
+               0, endpt->PollingPeriod,
                USB_int_PollCallback, endpt,
                endpt->InputData, endpt->MaxPacketSize
                );
@@ -82,10 +81,12 @@ int USB_PollThread(void *unused)
                // Check hosts
                for( tUSBHost *host = gUSB_Hosts; host; host = host->Next )
                {
-                       host->HostDef->CheckPorts(host->Ptr);
+                       if( host->HostDef->CheckPorts )
+                               host->HostDef->CheckPorts(host->Ptr);
                }
 
-               Time_Delay(100);
+               // 2s delay - fuck those with UHCI only :)
+               Time_Delay(2000);
        }
 }
 

UCC git Repository :: git.ucc.asn.au