Commit 0852659e authored by Dmitry Osipenko's avatar Dmitry Osipenko Committed by Felipe Balbi

usb: gadget: f_ncm/u_ether: Move 'SKB reserve' quirk setup to u_ether

That quirk is required to make USB Ethernet gadget working on HW that
can't cope with unaligned DMA. For some reason only f_ncm sets up that
quirk, let's setup it directly in u_ether so other network models would
have that quirk applied as well. All network models have been tested with
ChipIdea UDC driver on NVIDIA Tegra20 SoC that require DMA to be aligned.
Signed-off-by: default avatarDmitry Osipenko <digetx@gmail.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent daa35bd9
...@@ -925,8 +925,6 @@ static int ncm_set_alt(struct usb_function *f, unsigned intf, unsigned alt) ...@@ -925,8 +925,6 @@ static int ncm_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
*/ */
ncm->port.is_zlp_ok = ncm->port.is_zlp_ok =
gadget_is_zlp_supported(cdev->gadget); gadget_is_zlp_supported(cdev->gadget);
ncm->port.no_skb_reserve =
gadget_avoids_skb_reserve(cdev->gadget);
ncm->port.cdc_filter = DEFAULT_FILTER; ncm->port.cdc_filter = DEFAULT_FILTER;
DBG(cdev, "activate ncm\n"); DBG(cdev, "activate ncm\n");
net = gether_connect(&ncm->port); net = gether_connect(&ncm->port);
......
...@@ -1073,7 +1073,7 @@ struct net_device *gether_connect(struct gether *link) ...@@ -1073,7 +1073,7 @@ struct net_device *gether_connect(struct gether *link)
if (result == 0) { if (result == 0) {
dev->zlp = link->is_zlp_ok; dev->zlp = link->is_zlp_ok;
dev->no_skb_reserve = link->no_skb_reserve; dev->no_skb_reserve = gadget_avoids_skb_reserve(dev->gadget);
DBG(dev, "qlen %d\n", qlen(dev->gadget, dev->qmult)); DBG(dev, "qlen %d\n", qlen(dev->gadget, dev->qmult));
dev->header_len = link->header_len; dev->header_len = link->header_len;
......
...@@ -64,7 +64,6 @@ struct gether { ...@@ -64,7 +64,6 @@ struct gether {
struct usb_ep *out_ep; struct usb_ep *out_ep;
bool is_zlp_ok; bool is_zlp_ok;
bool no_skb_reserve;
u16 cdc_filter; u16 cdc_filter;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment