]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
usb: ehci: Do not disable an already disabled periodic schedule
authorHans de Goede <hdegoede@redhat.com>
Wed, 24 Sep 2014 12:06:03 +0000 (14:06 +0200)
committerMarek Vasut <marex@denx.de>
Tue, 4 Nov 2014 05:04:00 +0000 (06:04 +0100)
When periodic_schedules == 0, the schedule is disabled and there is no reason
to disable it again.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/usb/host/ehci-hcd.c

index 936d006ba414ca2bfea76ac5ab0b0d5dccc944ab..55f4436bebe51cce3b1d81c00b68506a8847e94d 100644 (file)
@@ -1249,9 +1249,11 @@ create_int_queue(struct usb_device *dev, unsigned long pipe, int queuesize,
                           ALIGN_END_ADDR(struct qTD, result->tds,
                                          queuesize));
 
-       if (disable_periodic(ctrl) < 0) {
-               debug("FATAL: periodic should never fail, but did");
-               goto fail3;
+       if (ctrl->periodic_schedules > 0) {
+               if (disable_periodic(ctrl) < 0) {
+                       debug("FATAL: periodic should never fail, but did");
+                       goto fail3;
+               }
        }
 
        /* hook up to periodic list */