From: Peter Chen <hzpeterchen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Thierry Reding
<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Felipe Balbi <balbi-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Greg Kroah-Hartman
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
Peter Chen <Peter.Chen-3arQi8VN3Tc@public.gmane.org>,
Jonathan Hunter
<jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
Marc Dietrich <marvin24-Mmb7MZpHnFY@public.gmane.org>,
Nicolas Chauvet <kwizart-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v1 1/9] usb: gadget: f_ecm/f_eem/f_rndis: Setup quirk_avoids_skb_reserve
Date: Thu, 6 Jul 2017 09:12:14 +0800 [thread overview]
Message-ID: <20170706011214.GA24420@b29397-desktop> (raw)
In-Reply-To: <a2f60b1ee32dba0adb7dfaaab7b1ee4d67699107.1499273075.git.digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On Wed, Jul 05, 2017 at 08:19:50PM +0300, Dmitry Osipenko wrote:
> 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 <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> drivers/usb/gadget/function/f_ecm.c | 2 ++
> drivers/usb/gadget/function/f_eem.c | 2 ++
> drivers/usb/gadget/function/f_rndis.c | 4 ++++
> 3 files changed, 8 insertions(+)
>
> diff --git a/drivers/usb/gadget/function/f_ecm.c b/drivers/usb/gadget/function/f_ecm.c
> index 4c488d15b6f6..01150f7864c7 100644
> --- a/drivers/usb/gadget/function/f_ecm.c
> +++ b/drivers/usb/gadget/function/f_ecm.c
> @@ -584,6 +584,8 @@ static int ecm_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
> */
> ecm->port.is_zlp_ok =
> gadget_is_zlp_supported(cdev->gadget);
> + ecm->port.no_skb_reserve =
> + gadget_avoids_skb_reserve(cdev->gadget);
> ecm->port.cdc_filter = DEFAULT_FILTER;
> DBG(cdev, "activate ecm\n");
> net = gether_connect(&ecm->port);
> diff --git a/drivers/usb/gadget/function/f_eem.c b/drivers/usb/gadget/function/f_eem.c
> index 007ec6e4a5d4..3b70b9ccfd2d 100644
> --- a/drivers/usb/gadget/function/f_eem.c
> +++ b/drivers/usb/gadget/function/f_eem.c
> @@ -215,6 +215,8 @@ static int eem_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
> */
> eem->port.is_zlp_ok = 1;
> eem->port.cdc_filter = DEFAULT_FILTER;
> + eem->port.no_skb_reserve =
> + gadget_avoids_skb_reserve(cdev->gadget);
> DBG(cdev, "activate eem\n");
> net = gether_connect(&eem->port);
> if (IS_ERR(net))
> diff --git a/drivers/usb/gadget/function/f_rndis.c b/drivers/usb/gadget/function/f_rndis.c
> index 16562e461121..1b379c051a84 100644
> --- a/drivers/usb/gadget/function/f_rndis.c
> +++ b/drivers/usb/gadget/function/f_rndis.c
> @@ -593,6 +593,10 @@ static int rndis_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
> */
> rndis->port.cdc_filter = 0;
>
> + /* Setup DMA alignment workaround for UDC's that need it */
> + rndis->port.no_skb_reserve =
> + gadget_avoids_skb_reserve(cdev->gadget);
> +
You may add above comments for other two changes.
> DBG(cdev, "RNDIS RX/TX early activation ... \n");
> net = gether_connect(&rndis->port);
> if (IS_ERR(net))
> --
> 2.13.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Best Regards,
Peter Chen
next prev parent reply other threads:[~2017-07-06 1:12 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-05 17:19 [PATCH v1 0/9] Support UDC on Tegra 20/30/114/124 Dmitry Osipenko
[not found] ` <cover.1499273075.git.digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-07-05 17:19 ` [PATCH v1 1/9] usb: gadget: f_ecm/f_eem/f_rndis: Setup quirk_avoids_skb_reserve Dmitry Osipenko
[not found] ` <a2f60b1ee32dba0adb7dfaaab7b1ee4d67699107.1499273075.git.digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-07-06 1:12 ` Peter Chen [this message]
2017-07-06 10:13 ` Dmitry Osipenko
2017-07-05 17:19 ` [PATCH v1 2/9] usb: chipidea: udc: Support SKB alignment quirk Dmitry Osipenko
[not found] ` <719de7513f42948f5f75742c31f4cc09582411fd.1499273075.git.digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-07-06 1:13 ` Peter Chen
2017-07-05 17:19 ` [PATCH v1 3/9] usb: chipidea: Add support for Tegra20/30/114/124 Dmitry Osipenko
[not found] ` <9e0127ea9b580e1af334c4c3bcb8b3c0705614ea.1499273075.git.digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-07-06 1:23 ` Peter Chen
2017-07-06 10:09 ` Dmitry Osipenko
[not found] ` <59e943b8-8771-0b1e-36fa-babd5e52a6d5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-07-07 1:10 ` Peter Chen
2017-07-07 8:28 ` Dmitry Osipenko
2017-07-05 17:19 ` [PATCH v1 4/9] ARM: tegra: Enable UDC on TrimSlice Dmitry Osipenko
[not found] ` <82321d32d968c6b9481a77fbecae8c0756d37f0f.1499273075.git.digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-07-06 1:24 ` Peter Chen
2017-07-06 10:24 ` Dmitry Osipenko
[not found] ` <d23f841a-f46d-bf3f-cdb6-9d9c033e80bd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-07-06 10:43 ` Dmitry Osipenko
2017-07-06 12:51 ` Marcel Ziswiler
[not found] ` <1499345493.4445.12.camel-2KBjVHiyJgBBDgjK7y7TUQ@public.gmane.org>
2017-07-06 16:15 ` Dmitry Osipenko
2017-07-06 16:46 ` Stephen Warren
[not found] ` <7717016d-6da4-6933-a36e-4a6bf45646ab-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2017-07-06 17:16 ` Dmitry Osipenko
[not found] ` <8c56c8e4-0c61-9400-5f52-0e6c00b51310-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-07-06 18:03 ` Stephen Warren
[not found] ` <52a9941a-59a5-5b49-be67-3b4991497395-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2017-07-06 19:14 ` Dmitry Osipenko
2017-07-06 16:35 ` Stephen Warren
2017-07-05 17:19 ` [PATCH v1 5/9] ARM: tegra: Enable UDC on Beaver Dmitry Osipenko
[not found] ` <39b0632e80a95ec0208e3ed867033ec8de898624.1499273075.git.digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-07-06 16:43 ` Stephen Warren
[not found] ` <1d7ffa85-edae-fb1a-d013-cd44d11e1536-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2017-07-06 16:52 ` Dmitry Osipenko
2017-07-05 17:19 ` [PATCH v1 6/9] ARM: tegra: Enable UDC on Dalmore Dmitry Osipenko
[not found] ` <6756bf3afa16e414c924ec1b4b2608731a9ebcea.1499273075.git.digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-07-06 16:42 ` Stephen Warren
2017-07-05 17:19 ` [PATCH v1 7/9] ARM: tegra: Enable UDC on Jetson TK1 Dmitry Osipenko
[not found] ` <c6b78a8d149eb9341f41a6b1181569c4b78df1af.1499273075.git.digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-07-06 16:44 ` Stephen Warren
2017-07-05 17:19 ` [PATCH v1 8/9] ARM: tegra: Enable UDC on AC100 Dmitry Osipenko
[not found] ` <a0923f46a14c27afd7d2595dfb8878c2ebf02230.1499273075.git.digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-07-06 16:38 ` Stephen Warren
[not found] ` <402c57db-a01b-33eb-28d4-7f4b372351f2-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2017-07-06 16:57 ` Dmitry Osipenko
[not found] ` <32f880f8-a49c-8f29-fe26-f50cae31e215-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-07-06 18:00 ` Stephen Warren
[not found] ` <33990cfa-f2f8-48ba-240b-ad088ba50bb5-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2017-07-06 21:23 ` Marc Dietrich
2017-07-07 8:27 ` Dmitry Osipenko
2017-07-05 17:19 ` [PATCH v1 9/9] ARM: defconfig: tegra: Enable ChipIdea UDC driver Dmitry Osipenko
[not found] ` <5eac9306f4049ba51ed8b7f53820d28f294725cb.1499273075.git.digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-07-05 20:33 ` Stephen Warren
[not found] ` <3fe1b3b2-6473-399a-807e-f007a10c05cd-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2017-07-05 22:57 ` Dmitry Osipenko
2017-07-05 20:31 ` [PATCH v1 0/9] Support UDC on Tegra 20/30/114/124 Stephen Warren
[not found] ` <b5c54655-ccf4-2d4e-59fe-4a9e4609605a-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2017-07-05 22:13 ` Dmitry Osipenko
[not found] ` <c8d9740a-7792-87d9-9466-8d3a45280403-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-07-05 22:54 ` Stephen Warren
[not found] ` <63e87e5c-5331-2680-7686-5ed22718a2bd-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2017-07-05 23:20 ` Dmitry Osipenko
[not found] ` <94e2532d-d342-3062-ec7a-6dfd865c1b62-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-07-06 12:03 ` Thierry Reding
[not found] ` <20170706120328.GB1229-m5CkvRiFyV9wFLYp8hBm2A@public.gmane.org>
2017-07-06 13:04 ` Marcel Ziswiler
[not found] ` <1499346277.4445.15.camel-2KBjVHiyJgBBDgjK7y7TUQ@public.gmane.org>
2017-07-06 15:11 ` Thierry Reding
[not found] ` <20170706151118.GA3736-m5CkvRiFyV9wFLYp8hBm2A@public.gmane.org>
2017-07-06 15:52 ` Dmitry Osipenko
2017-07-07 1:12 ` Peter Chen
2017-07-07 8:49 ` Dmitry Osipenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170706011214.GA24420@b29397-desktop \
--to=hzpeterchen-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=Peter.Chen-3arQi8VN3Tc@public.gmane.org \
--cc=balbi-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=kwizart-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=marvin24-Mmb7MZpHnFY@public.gmane.org \
--cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox