]> xenbits.xensource.com Git - seabios.git/commitdiff
uhci: Enable "depth" tree traversal for bulk transfers
authorKevin O'Connor <kevin@koconnor.net>
Wed, 31 Dec 2014 06:40:07 +0000 (01:40 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Thu, 1 Jan 2015 18:51:22 +0000 (13:51 -0500)
Set the "depth" flag on bulk transactions.  Since SeaBIOS doesn't use
bandwidth reclamation, without the depth flag the uhci controller will
only transfer one bulk packet per 1 ms frame.  This results in a
maximum of 64 bytes per millisecond, which severely limits the
transfer rate.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
src/hw/usb-uhci.c

index 6dcc3401d5800adfe4e558db7c5a7d39c9ff37bf..7ef50d118c912ecf3817fc07844e9a93cc665bff 100644 (file)
@@ -537,9 +537,9 @@ uhci_send_bulk(struct usb_pipe *p, int dir, void *data, int datasize)
         int transfer = datasize;
         if (transfer > maxpacket)
             transfer = maxpacket;
-        struct uhci_td *nexttd_fl = MAKE_FLATPTR(GET_SEG(SS)
-                                                 , &tds[tdpos % STACKTDS]);
-        td->link = (transfer==datasize ? UHCI_PTR_TERM : (u32)nexttd_fl);
+        u32 nexttd = (u32)MAKE_FLATPTR(GET_SEG(SS), &tds[tdpos % STACKTDS]);
+        td->link = (transfer==datasize
+                    ? UHCI_PTR_TERM : (nexttd | UHCI_PTR_DEPTH));
         td->token = (uhci_explen(transfer) | toggle
                      | (devaddr << TD_TOKEN_DEVADDR_SHIFT)
                      | (dir ? USB_PID_IN : USB_PID_OUT));