Re: [PATCH 8/8] usb: cdns3: gadget: enlarge the TRB ring length

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Peter Chen <peter.chen@xxxxxxx> writes:
> On 20-09-08 09:32:32, Felipe Balbi wrote:
>> 
>> Hi,
>> 
>> Peter Chen <peter.chen@xxxxxxx> writes:
>> > At Android ADB and MTP use case, it uses f_fs which supports scatter list,
>> > it means one request may need several TRBs for it. Besides, TRB consumes
>> > very fast compared to TRB has prepared for above use case, so we need to
>> > enlarge the TRB ring length to avoid "no free TRB error".
>> 
>> can you give a little more detail here?
>
> I will.
>
>> How many sg entries do you get with ADB? What's the size of each TRB?
>
> I remembered it is about 120 requests for ADB and MTP use case, 16KB for
> each sg entry, so four TRBs (4KB/TRB) per sg entry at worst case.

I wonder why this isn't a problem for other UDCs, though. I haven't had
a similar report on dwc3, where we use 256 (255 + 1 link) TRBs for each
endpoint and we never use more than one segment. What you describe here
would amount of 480 TRBs worst case.

Anyway, this is hypothetical, something to keep an eye for dwc3 users
too, I guess.

>> How many memory does 600 TRBs
>> actually amount to? How many segments are you using per endpoint?
>> 
>
> Each TRB consumes 3 * 32 bits =  12 bytes, 600 TRB consumes 7200 bytes.
> One segment for each endpoint, one segment includes 600 TRBs.

thanks for the info

-- 
balbi

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux