summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/controller/ehci.c
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2011-03-23 19:41:44 +0000
committerhselasky <hselasky@FreeBSD.org>2011-03-23 19:41:44 +0000
commit604af2144d9109f96fa51b0535a0b1674f650e66 (patch)
treee801d1840b8024f7120f0c4a9b0e6aca52f6da7f /sys/dev/usb/controller/ehci.c
parentfc3bd08464304e1545289cff932b2d056014abd5 (diff)
downloadFreeBSD-src-604af2144d9109f96fa51b0535a0b1674f650e66.zip
FreeBSD-src-604af2144d9109f96fa51b0535a0b1674f650e66.tar.gz
Comply with style(9).
Reported by: gavin MFC after: 14 days Approved by: thompsa (mentor)
Diffstat (limited to 'sys/dev/usb/controller/ehci.c')
-rw-r--r--sys/dev/usb/controller/ehci.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/usb/controller/ehci.c b/sys/dev/usb/controller/ehci.c
index 812e422..9d73d4a 100644
--- a/sys/dev/usb/controller/ehci.c
+++ b/sys/dev/usb/controller/ehci.c
@@ -1183,18 +1183,18 @@ _ehci_remove_qh(ehci_qh_t *sqh, ehci_qh_t *last)
static void
ehci_data_toggle_update(struct usb_xfer *xfer, uint16_t actlen, uint16_t xlen)
{
- uint8_t full = (actlen == xlen);
+ uint16_t rem;
uint8_t dt;
/* count number of full packets */
dt = (actlen / xfer->max_packet_size) & 1;
/* cumpute remainder */
- actlen = actlen % xfer->max_packet_size;
+ rem = actlen % xfer->max_packet_size;
- if (actlen > 0)
+ if (rem > 0)
dt ^= 1; /* short packet at the end */
- else if (!full)
+ else if (actlen != xlen)
dt ^= 1; /* zero length packet at the end */
xfer->endpoint->toggle_next ^= dt;
OpenPOWER on IntegriCloud