mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-11 05:17:10 +09:00
xhci: correct burst count field for isoc transfers on 1.0 xhci hosts
commit3213b15138upstream. 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 commit5cd43e33b9"xhci 1.0: Set transfer burst count field." Suggested-by: ShiChun Ma <masc2008@qq.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
58f550fa31
commit
5f84a7feac
@@ -3590,7 +3590,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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user