On 10/01/2014 03:16 PM, vichy wrote:
> hi David and All:
>>>> Because the trb buffers can't cross a 64k physical address boundary.
>>>
>>> Is it only specific to iso scheduling or bulk also need to take care?
>>> from your kind explanation, the trb buffer for Bulk also need to take
>>> care crossing 64k physical boundary.
>>> But i don't find it for bulk transfer.
>>> Below is excerpted from xhci_queue_bulk_tx
>>> while (running_total < urb->transfer_buffer_length) {
>>> num_trbs++;
>>> running_total += TRB_MAX_BUFF_SIZE;
>>> }
>>
>> Hmmm... that looks like a division by a power of 2!
> I am not quite understand what you mean "a division by a power of 2"
> Would you please give me more hint? ^^
>
>> The constraint applies to all TRB.
> i found where bulk handle 64k physical address boundary as you explain.
> it just a couple lines ahead of the source code I captured in the
> previous mail :P
> Meanwhile, I have another question:
> for iso transfer, the first iso trb cannot cross page boundary,
> but I cannot find this restriction in xhci driver.
>
> appreciate all your kind help,
> --
In xhci-ring.c, static int xhci_queue_isoc_tx():
/* Calculate TRB length */
trb_buff_len = TRB_MAX_BUFF_SIZE - (addr & ((1 << TRB_MAX_BUFF_SHIFT) - 1));
where addr = start_addr + urb->iso_frame_desc[i].offset;
this limits the trb_buff_len to stop the trb buffer at TRB_MAX_BUFF_SIZE
boundary
-Mathias
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html