]> git.karo-electronics.de Git - linux-beck.git/commit
usb: gadget: add a new quirk to avoid skb_reserve in u_ether.c
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Mon, 22 Aug 2016 08:48:25 +0000 (17:48 +0900)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Wed, 31 Aug 2016 07:06:03 +0000 (10:06 +0300)
commit60e7396f820fa67a007f2a2eb5d97d3e77a74881
tree1bf8a1405d8ff640d478b7ca078720bdfa1f0269
parenta00c9791a3e4f625840f1f0507ad3f191310abae
usb: gadget: add a new quirk to avoid skb_reserve in u_ether.c

Some platforms (e.g. USB-DMAC on R-Car SoCs) has memory alignment
restriction. If memory alignment is not match, the usb peripheral
driver decides not to use the DMA controller. Then, the performance
is not good.

In the case of u_ether.c, since it calls skb_reserve() in rx_submit(),
it is possible to cause memory alignment mismatch.

So, this patch adds a new quirk "quirk_avoids_skb_reserve" to avoid
skb_reserve() calling in u_ether.c to improve performance.

A peripheral driver will set this flag and network gadget drivers
(e.g. f_ncm.c) will reference the flag via gadget_avoids_skb_reserve().

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
include/linux/usb/gadget.h