]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
.../serial/common.c - added missing configuration
authorstarous <starous@pracovna>
Tue, 21 Sep 2010 19:57:57 +0000 (21:57 +0200)
committerstarous <starous@pracovna>
Tue, 21 Sep 2010 19:57:57 +0000 (21:57 +0200)
ChangeLog
grub-core/bus/usb/serial/common.c

index 272264165bf84931cb96c92255e077540d5960fe..2a7889bf759b8157b5278d95d87c282075917759 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-09-21  Aleš Nesrsta <starous@volny.cz>
+
+       * grub-core/bus/usb/serial/common.c (grub_usbserial_attach):
+       Added missing configuration of USB device.
+
 2010-09-21  Colin Watson  <cjwatson@ubuntu.com>
 
        * grub-core/normal/menu_entry.c (run): Make sure we always return
index 6b5b9005903be28d3bf3d105a3e833a78feffdec..ee8794de0900fce7b2697392025fff61fb7b48dd 100644 (file)
@@ -44,6 +44,7 @@ grub_usbserial_attach (grub_usb_device_t usbdev, int configno, int interfno,
   struct grub_serial_port *port;
   int j;
   struct grub_usb_desc_if *interf;
+  grub_usb_err_t err = GRUB_USB_ERR_NONE;
 
   interf = usbdev->config[configno].interf[interfno].descif;
 
@@ -80,7 +81,12 @@ grub_usbserial_attach (grub_usb_device_t usbdev, int configno, int interfno,
          port->out_endp = endp;
        }
     }
-  if (!port->out_endp || !port->in_endp)
+
+  /* Configure device */
+  if (port->out_endp && port->in_endp)
+    err = grub_usb_set_configuration (usbdev, configno + 1);
+  
+  if (!port->out_endp || !port->in_endp || err)
     {
       grub_free (port->name);
       grub_free (port);