Re: musb: bluk_split only worked for the first segment(PIO only)

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

 



> It is by hardware, but in some platforms, for example TI AM335x, these
> features are not supported even though the register bits are set.
It's a weird registers, so I think it should do a special
musb_read_configdata
and return the right register value. Then the musb_core_init will do the right
thing.
> So in AM335x Arago 3.2 kernel, struct musb_hdrc_config has two flags
> to specify if the features are supported or not. For mainline kernel,
> I would think we need a flag in dtb to workaround this bug.
>


On Thu, Nov 28, 2013 at 2:20 AM, Bin Liu <binmlist@xxxxxxxxx> wrote:
> On Tue, Nov 26, 2013 at 8:22 PM, Yingchun Li <sword.l.dragon@xxxxxxxxx> wrote:
>> On Wed, Nov 27, 2013 at 12:38 AM, Bin Liu <binmlist@xxxxxxxxx> wrote:
>>> On Thu, Nov 21, 2013 at 4:40 AM, Yingchun Li <sword.l.dragon@xxxxxxxxx> wrote:
>>>> hi,
>>>>    if musb bulk_split is enable, the segment size will be set according
>>>> to hw_ep->max_packet_sz_tx, and the segment will be writen to fifo.
>>>>    But after the first tranfser end, the segment size will be set no larger
>>>> than qh->maxpacket (in musb_host_tx),and the bluk_split  make no sense.
>>>>    so please check the following patch, I have tested it on my board.
>>>
>>> For the platforms which do not support bulk split/combine, I would
>>> think the right fix should be set musb->bulk_combine = false, and
>>> musb->bulk_split = false at the end of musb_core_init() in
>>> musb_core.c.
>> Is it enabled/disabled by hardware features:
>> musb_core.c-->musb_core_init
>>   if (reg & MUSB_CONFIGDATA_MPTXE) {
>>        strcat(aInfo, ", bulk split");
>>        musb->bulk_split = true;
>>  }
>
> It is by hardware, but in some platforms, for example TI AM335x, these
> features are not supported even though the register bits are set.
>
> So in AM335x Arago 3.2 kernel, struct musb_hdrc_config has two flags
> to specify if the features are supported or not. For mainline kernel,
> I would think we need a flag in dtb to workaround this bug.
>
> -Bin.
>
>>> -Bin.
>>>
>>>>
>>>> diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
>>>> index 6582a20..f251132 100644
>>>> --- a/drivers/usb/musb/musb_host.c
>>>> +++ b/drivers/usb/musb/musb_host.c
>>>> @@ -1455,8 +1455,8 @@ done:
>>>>   * (and presumably, FIFO is not half-full) we should write *two*
>>>>   * packets before updating TXCSR; other docs disagree...
>>>>   */
>>>> - if (length > qh->maxpacket)
>>>> - length = qh->maxpacket;
>>>> + if (length > qh->segsize)
>>>> + length = qh->segsize;
>>>>   /* Unmap the buffer so that CPU can use it */
>>>>   usb_hcd_unmap_urb_for_dma(musb->hcd, urb);
>>>> --
>>>> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
>>>> the body of a message to majordomo@xxxxxxxxxxxxxxx
>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




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

  Powered by Linux