Hi,

On 15.08.2017 12:49, Felipe Balbi wrote:
> Dmitry Osipenko <dig...@gmail.com> writes:
>> This quirk is required to make USB Ethernet gadget working with HW that
>> can't cope with unaligned DMA. For some reason only f_ncm handles that
>> quirk, let's handle it in the rest of the network models. All models have
>> been tested with a ChipIdea UDC driver on NVIDIA Tegra20 SoC that require
>> DMA to be aligned.
>>
>> Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
>> ---
>>  drivers/usb/gadget/function/f_ecm.c   | 7 +++++++
>>  drivers/usb/gadget/function/f_eem.c   | 5 +++++
>>  drivers/usb/gadget/function/f_rndis.c | 4 ++++
>>  3 files changed, 16 insertions(+)
>>
>> diff --git a/drivers/usb/gadget/function/f_ecm.c 
>> b/drivers/usb/gadget/function/f_ecm.c
>> index 4c488d15b6f6..1d198055fd74 100644
>> --- a/drivers/usb/gadget/function/f_ecm.c
>> +++ b/drivers/usb/gadget/function/f_ecm.c
>> @@ -584,6 +584,13 @@ static int ecm_set_alt(struct usb_function *f, unsigned 
>> intf, unsigned alt)
>>                       */
>>                      ecm->port.is_zlp_ok =
>>                              gadget_is_zlp_supported(cdev->gadget);
>> +
>> +                    /* Setup DMA alignment workaround for UDC's that
>> +                     * need it.
>> +                     */
>> +                    ecm->port.no_skb_reserve =
>> +                            gadget_avoids_skb_reserve(cdev->gadget);
> 
> looks like the quirk should be moved to u_ether.c instead.
> 

Indeed, thank you very much for the suggestion. I'll prepare a new revision of
the patch.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to