usb: gadget: f_ecm/f_ncm: check quirk instead of UDC name
Use generic mechanism to check if UDC controller supports zlp. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:

committed by
Felipe Balbi

parent
a4cc42157f
commit
7a896d4052
@@ -585,8 +585,8 @@ static int ecm_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
|
|||||||
/* Enable zlps by default for ECM conformance;
|
/* Enable zlps by default for ECM conformance;
|
||||||
* override for musb_hdrc (avoids txdma ovhead).
|
* override for musb_hdrc (avoids txdma ovhead).
|
||||||
*/
|
*/
|
||||||
ecm->port.is_zlp_ok = !(gadget_is_musbhdrc(cdev->gadget)
|
ecm->port.is_zlp_ok =
|
||||||
);
|
gadget_is_zlp_supported(cdev->gadget);
|
||||||
ecm->port.cdc_filter = DEFAULT_FILTER;
|
ecm->port.cdc_filter = DEFAULT_FILTER;
|
||||||
DBG(cdev, "activate ecm\n");
|
DBG(cdev, "activate ecm\n");
|
||||||
net = gether_connect(&ecm->port);
|
net = gether_connect(&ecm->port);
|
||||||
|
@@ -853,9 +853,8 @@ static int ncm_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
|
|||||||
/* Enable zlps by default for NCM conformance;
|
/* Enable zlps by default for NCM conformance;
|
||||||
* override for musb_hdrc (avoids txdma ovhead)
|
* override for musb_hdrc (avoids txdma ovhead)
|
||||||
*/
|
*/
|
||||||
ncm->port.is_zlp_ok = !(
|
ncm->port.is_zlp_ok =
|
||||||
gadget_is_musbhdrc(cdev->gadget)
|
gadget_is_zlp_supported(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);
|
||||||
|
Reference in New Issue
Block a user