svn commit: r331306 - head/sys/dev/usb/controller

Hans Petter Selasky hps at selasky.org
Thu Mar 22 12:08:14 UTC 2018


On 03/22/18 13:02, Andrew Turner wrote:
>> On 21 Mar 2018, at 21:54, Hans Petter Selasky <hps at selasky.org> wrote:
>>
>> On 03/21/18 17:45, Andrew Turner wrote:
>>>> On 21 Mar 2018, at 15:37, Hans Petter Selasky <hps at selasky.org> wrote:
>>>>
>>>> On 03/21/18 16:24, Kyle Evans wrote:
>>>>>> +       {
>>>>>> +               .ep_end = 7,
>>>>>> +               .ep_fifosz_shift = 9,
>>>>>> +               .ep_fifosz_reg = MUSB2_VAL_FIFOSZ_512 | MUSB2_MASK_FIFODB,
>>>>>> +       },
>>>>> I'm afraid I'm not familiar with this- why did .ep_fifosz_shift for
>>>>> this case drop to 9? frx = 10 in the temp < 8 case in the removals of
>>>>> the following hunks. Mostly curious because the others seemed to stay
>>>>> the same.
>>>>
>>>> Hi Andrew,
>>>>
>>>> It might be an idea to keep the fifosz_shift at 10, else high-speed BULK traffic won't be double buffered, and this might affect performance.
>>> Should the endpoint 1 size also be fixed? The register has it at 4k, but it wasn’t an 8k buffer.
>>
>> No, because High-Speed BULK will only use 512 byte packets, and 4k is reserved for isochronous, which doesn't need double buffering at the moment.
> 
> Ok, in that case should we remove the double buffer flag on endpoint 1? The Linux driver seems to always use a 512 byte buffer there, and always doubles the offset increment when the double buffer flag is set.

Hi Andrew,

That's a good question. I think you should leave the double buffer flag 
on for this register. Double buffering is then later on re-programmed by:

> static void
> musbotg_clear_stall_sub(struct musbotg_softc *sc, uint16_t wMaxPacket,
>     uint8_t ep_no, uint8_t ep_type, uint8_t ep_dir)

If you look at the writes to MUSB2_REG_TXDBDIS and MUSB2_REG_RXDBDIS.

I think those registers override the "master" register. You might want 
to check the PRM to be absolutely sure.

--HPS


More information about the svn-src-head mailing list