From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: <gregkh@linuxfoundation.org>
Cc: <linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<dan.j.williams@intel.com>,
Mathias Nyman <mathias.nyman@linux.intel.com>,
stable@vger.kernel.org
Subject: [PATCH 2/5] xhci: correct burst count field for isoc transfers on 1.0 xhci hosts
Date: Tue, 24 Jun 2014 17:14:41 +0300 [thread overview]
Message-ID: <1403619322-24704-2-git-send-email-mathias.nyman@linux.intel.com> (raw)
In-Reply-To: <1403619322-24704-1-git-send-email-mathias.nyman@linux.intel.com>
The transfer burst count (TBC) field in xhci 1.0 hosts should be set
to the number of bursts needed to transfer all packets in a isoc TD.
Supported values are 0-2 (1 to 3 bursts per service interval).
Formula for TBC calculation is given in xhci spec section 4.11.2.3:
TBC = roundup( Transfer Descriptor Packet Count / Max Burst Size +1 ) - 1
This patch should be applied to stable kernels since 3.0 that contain
the commit 5cd43e33b9519143f06f507dd7cbee6b7a621885
"xhci 1.0: Set transfer burst count field."
Cc: stable@vger.kernel.org # 3.0
Suggested-by: ShiChun Ma <masc2008@qq.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
---
drivers/usb/host/xhci-ring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 71657d3..749fc68 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -3537,7 +3537,7 @@ static unsigned int xhci_get_burst_count(struct xhci_hcd *xhci,
return 0;
max_burst = urb->ep->ss_ep_comp.bMaxBurst;
- return roundup(total_packet_count, max_burst + 1) - 1;
+ return DIV_ROUND_UP(total_packet_count, max_burst + 1) - 1;
}
/*
--
1.8.3.2
next prev parent reply other threads:[~2014-06-24 14:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-24 13:54 [PATCH 0/5] xhci fixes for 3.16-rc usb-linus Mathias Nyman
2014-06-24 14:14 ` [PATCH 1/5] xhci: Use correct SLOT ID when handling a reset device command Mathias Nyman
2014-06-24 14:06 ` David Laight
2014-06-24 14:14 ` Mathias Nyman [this message]
2014-06-24 14:14 ` [PATCH 3/5] usb: xhci: Correct last context entry calculation for Configure Endpoint Mathias Nyman
2014-06-24 14:10 ` Greg KH
2014-06-24 14:51 ` Mathias Nyman
2014-06-24 14:47 ` Greg KH
2014-06-24 14:14 ` [PATCH 4/5] xhci: clear root port wake on bits if controller isn't wake-up capable Mathias Nyman
2014-06-24 14:14 ` [PATCH 5/5] xhci: Fix runtime suspended xhci from blocking system suspend Mathias Nyman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1403619322-24704-2-git-send-email-mathias.nyman@linux.intel.com \
--to=mathias.nyman@linux.intel.com \
--cc=dan.j.williams@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox