lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 12 Aug 2020 11:01:50 +0000
From:   Peter Chen <peter.chen@....com>
To:     Wesley Cheng <wcheng@...eaurora.org>,
        Peter Chen <hzpeterchen@...il.com>
CC:     "agross@...nel.org" <agross@...nel.org>,
        "bjorn.andersson@...aro.org" <bjorn.andersson@...aro.org>,
        "balbi@...nel.org" <balbi@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>,
        lkml <linux-kernel@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-arm-msm@...r.kernel.org" <linux-arm-msm@...r.kernel.org>,
        USB list <linux-usb@...r.kernel.org>,
        "jackp@...eaurora.org" <jackp@...eaurora.org>
Subject: RE: [RFC v4 1/3] usb: dwc3: Resize TX FIFOs to meet EP bursting
 requirements

 
 
> 
> Thank you for your input.  I've actually considered doing some matching/resizing in
> the .match_ep route as well, but it doesn't work well for situations where multiple
> configurations are in play. The reason being that if you look at the epautoconf APIs,
> the configfs driver will use the usb_ep_autoconfig_reset() to reset the endpoints
> claimed between initialization of each configuration.  This means that the
> epautoconf driver expects to re-use the usb_endpoints:
> 
> static int configfs_composite_bind(struct usb_gadget *gadget,
> 	struct usb_gadget_driver *gdriver)
> {
> ...
> 
> /* Go through all configs, attach all functions */ list_for_each_entry(c, &gi-
> >cdev.configs, list) { ...
> list_for_each_entry_safe(f, tmp, &cfg->func_list, list) {
> 	list_del(&f->list);
> 	ret = usb_add_function(c, f);
> 	if (ret) {
> 		list_add(&f->list, &cfg->func_list);
> 		goto err_purge_funcs;
> 	}
> }
> usb_ep_autoconfig_reset(cdev->gadget);
> }
> 
> So in this situation, I wouldn't want the dwc3 gadget driver to assign a different
> dwc3 ep for endpoints in each configuration, when we know that only one set of
> EPs will be active when the host chooses.  I hope I understood your feedback
> correctly, and definitely appreciate the input!
> 
 
Thanks for mention that, we didn't consider multiple configurations use case, it needs
the UDC driver to record the configuration information, it is too complex at current framework.

I think your solution is OK, reserving one packet for each IN endpoint to avoid running out of
FIFO for later endpoints and fit the first endpoints with larger FIFO room to get the best
performance, it could use as many as FIFOs the device owns.

Peter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ