]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Revert latest two Aleš' commits
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Mon, 5 Jul 2010 23:55:26 +0000 (01:55 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Mon, 5 Jul 2010 23:55:26 +0000 (01:55 +0200)
ChangeLog
bus/usb/uhci.c
bus/usb/usbhub.c

index 5b5717c18ac20a35eb11eda1aa5f0fad8bb47f33..81dfc1c78a8a4fa947e0db2116982a4320447b40 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,3 @@
-2010-07-05  Ales Nesrsta <starous@volny.cz>
-       * bus/usb/usbhub.c, usbtrans.h: Simple USB hub support
-       * bus/usb/uhci.c: UHCI portstatus correction
-
 2010-07-05  Colin Watson  <cjwatson@ubuntu.com>
 
        * docs/grub.texi (Features): Update list of supported file systems.
index e85f07a6faf8c948b2cb8f2c9016ed5bc5a09360..1510f98e84d39cd260bfab86ccb2ccd43a33f05f 100644 (file)
@@ -612,23 +612,8 @@ grub_uhci_portstatus (grub_usb_controller_t dev,
   status = grub_uhci_readreg16 (u, reg);
   grub_dprintf ("uhci", "detect=0x%02x\n", status);
 
-  if (!enable) /* We don't need reset port */
-    {
-      /* Disable the port.  */
-      grub_uhci_writereg16 (u, reg, 0 << 2);
-      grub_dprintf ("uhci", "waiting for the port to be disabled\n");
-      endtime = grub_get_time_ms () + 1000;
-      while ((grub_uhci_readreg16 (u, reg) & (1 << 2)))
-        if (grub_get_time_ms () > endtime)
-          return grub_error (GRUB_ERR_IO, "UHCI Timed out");
-
-      status = grub_uhci_readreg16 (u, reg);
-      grub_dprintf ("uhci", ">3detect=0x%02x\n", status);
-      return GRUB_ERR_NONE;
-    }
-    
   /* Reset the port.  */
-  grub_uhci_writereg16 (u, reg, 1 << 9);
+  grub_uhci_writereg16 (u, reg, enable << 9);
 
   /* Wait for the reset to complete.  XXX: How long exactly?  */
   grub_millisleep (50); /* For root hub should be nominaly 50ms */
@@ -638,7 +623,7 @@ grub_uhci_portstatus (grub_usb_controller_t dev,
   grub_millisleep (10);
 
   /* Enable the port.  */
-  grub_uhci_writereg16 (u, reg, 1 << 2);
+  grub_uhci_writereg16 (u, reg, enable << 2);
   grub_millisleep (10);
 
   grub_dprintf ("uhci", "waiting for the port to be enabled\n");
index 2bbc850d0516385806a28bf26dcca63363c1f965..034ccbe8d556e456e74d1fabb44d03cd4a8776ef 100644 (file)
@@ -21,7 +21,6 @@
 #include <grub/mm.h>
 #include <grub/usb.h>
 #include <grub/misc.h>
-#include <grub/time.h>
 
 /* USB Supports 127 devices, with device 0 as special case.  */
 static struct grub_usb_device *grub_usb_devs[128];