Date: Wed, 23 Mar 2011 19:41:44 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r219930 - head/sys/dev/usb/controller Message-ID: <201103231941.p2NJfi6E005140@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Wed Mar 23 19:41:44 2011 New Revision: 219930 URL: http://svn.freebsd.org/changeset/base/219930 Log: Comply with style(9). Reported by: gavin MFC after: 14 days Approved by: thompsa (mentor) Modified: head/sys/dev/usb/controller/ehci.c Modified: head/sys/dev/usb/controller/ehci.c ============================================================================== --- head/sys/dev/usb/controller/ehci.c Wed Mar 23 19:30:47 2011 (r219929) +++ head/sys/dev/usb/controller/ehci.c Wed Mar 23 19:41:44 2011 (r219930) @@ -1183,18 +1183,18 @@ _ehci_remove_qh(ehci_qh_t *sqh, ehci_qh_ 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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103231941.p2NJfi6E005140>