summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/controller/ehci.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/usb/controller/ehci.c')
-rw-r--r--sys/dev/usb/controller/ehci.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/dev/usb/controller/ehci.c b/sys/dev/usb/controller/ehci.c
index eb4ccb9..7f9547c 100644
--- a/sys/dev/usb/controller/ehci.c
+++ b/sys/dev/usb/controller/ehci.c
@@ -1659,8 +1659,7 @@ restart:
/* update data toggle */
- if (((average + temp->max_frame_size - 1) /
- temp->max_frame_size) & 1) {
+ if (howmany(average, temp->max_frame_size) & 1) {
temp->qtd_status ^=
htohc32(temp->sc, EHCI_QTD_TOGGLE_MASK);
}
OpenPOWER on IntegriCloud